1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
|
# File 'lib/hive/broadcast.rb', line 1277
def self.account_update2(options, &block)
required_fields = %i(account)
params = options[:params]
check_required_fields(params, *required_fields)
if !!params[:metadata] && !!params[:json_metadata]
raise Hive::ArgumentError, 'Assign either metadata or json_metadata, not both.'
end
metadata = params.delete(:metadata) || {}
metadata ||= (JSON[params[:json_metadata]] || nil) || {}
params[:json_metadata] = metadata.to_json
ops = [[:account_update2, params]]
process(options.merge(ops: ops), &block)
end
|