mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-09-03 02:35:14 +00:00
fix claim_show
This commit is contained in:
parent
8db7c15aa1
commit
f049109a38
1 changed files with 4 additions and 6 deletions
|
@ -1639,8 +1639,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
defer.returnValue(metadata)
|
defer.returnValue(metadata)
|
||||||
|
|
||||||
@requires(WALLET_COMPONENT)
|
@requires(WALLET_COMPONENT)
|
||||||
@defer.inlineCallbacks
|
async def jsonrpc_claim_show(self, txid=None, nout=None, claim_id=None):
|
||||||
def jsonrpc_claim_show(self, txid=None, nout=None, claim_id=None):
|
|
||||||
"""
|
"""
|
||||||
Resolve claim info from txid/nout or with claim ID
|
Resolve claim info from txid/nout or with claim ID
|
||||||
|
|
||||||
|
@ -1676,13 +1675,12 @@ class Daemon(AuthJSONRPCServer):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if claim_id is not None and txid is None and nout is None:
|
if claim_id is not None and txid is None and nout is None:
|
||||||
claim_results = yield self.wallet_manager.get_claim_by_claim_id(claim_id)
|
claim_results = await self.wallet_manager.get_claim_by_claim_id(claim_id)
|
||||||
elif txid is not None and nout is not None and claim_id is None:
|
elif txid is not None and nout is not None and claim_id is None:
|
||||||
claim_results = yield self.wallet_manager.get_claim_by_outpoint(txid, int(nout))
|
claim_results = await self.wallet_manager.get_claim_by_outpoint(txid, int(nout))
|
||||||
else:
|
else:
|
||||||
raise Exception("Must specify either txid/nout, or claim_id")
|
raise Exception("Must specify either txid/nout, or claim_id")
|
||||||
response = yield self._render_response(claim_results)
|
return claim_results
|
||||||
defer.returnValue(response)
|
|
||||||
|
|
||||||
@requires(WALLET_COMPONENT)
|
@requires(WALLET_COMPONENT)
|
||||||
async def jsonrpc_resolve(self, force=False, uri=None, uris=None):
|
async def jsonrpc_resolve(self, force=False, uri=None, uris=None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue