Merge pull request #524 from lbryio/fix_fee_validator

Fix fee validation in publisher and clarify publish docstring
This commit is contained in:
Umpei Kay Kurokawa 2017-03-10 18:38:07 -05:00 committed by GitHub
commit f409d43dcc
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)
'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
'fee' (optional): dict, FeeValidator compliant
'fee' (optional): dict, FeeValidator compliant (i.e. {'LBC':{'amount':10}} )
Returns:
'tx' : hex encoded transaction
'txid' : txid of resulting transaction

View file

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