fix fee validation in publisher and clarify publish docstring

This commit is contained in:
Kay Kurokawa 2017-03-10 18:24:32 -05:00
parent 2303f88bd4
commit e7dc841bb7
2 changed files with 1 additions and 2 deletions

View file

@ -1692,7 +1692,7 @@ class Daemon(AuthJSONRPCServer):
'metadata': dict, Metadata compliant (can be missing sources if a file is provided) 'metadata': dict, Metadata compliant (can be missing sources if a file is provided)
'file_path' (optional): str, path to file to be associated with name, if not given 'file_path' (optional): str, path to file to be associated with name, if not given
the stream from your existing claim for the name will be used the stream from your existing claim for the name will be used
'fee' (optional): dict, FeeValidator compliant 'fee' (optional): dict, FeeValidator compliant (i.e. {'LBC':{'amount':10}} )
Returns: Returns:
'tx' : hex encoded transaction 'tx' : hex encoded transaction
'txid' : txid of resulting transaction 'txid' : txid of resulting transaction

View file

@ -22,7 +22,6 @@ class Publisher(object):
@defer.inlineCallbacks @defer.inlineCallbacks
def add_fee_to_metadata(self, metadata, fee): def add_fee_to_metadata(self, metadata, fee):
metadata['fee'] = FeeValidator(fee)
assert len(fee) == 1, "Too many fees" assert len(fee) == 1, "Too many fees"
for currency in fee: for currency in fee:
if 'address' not in fee[currency]: if 'address' not in fee[currency]: