mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-09-06 10:39:47 +00:00
return false from claim_show when claim is not found
This commit is contained in:
parent
f38120fdfc
commit
31b5026570
1 changed files with 8 additions and 5 deletions
|
@ -1412,6 +1412,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
"""
|
"""
|
||||||
return self.jsonrpc_claim_show(**kwargs)
|
return self.jsonrpc_claim_show(**kwargs)
|
||||||
|
|
||||||
|
@defer.inlineCallbacks
|
||||||
def jsonrpc_claim_show(self, name, txid=None, nout=None, claim_id=None):
|
def jsonrpc_claim_show(self, name, txid=None, nout=None, claim_id=None):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -1436,11 +1437,13 @@ class Daemon(AuthJSONRPCServer):
|
||||||
'supports': (list) list of supports associated with claim
|
'supports': (list) list of supports associated with claim
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
d = self.session.wallet.get_claim_info(name, txid, nout, claim_id)
|
claim_results = yield self.session.wallet.get_claim_info(name, txid, nout, claim_id)
|
||||||
d.addCallback(format_json_out_amount_as_float)
|
result = format_json_out_amount_as_float(claim_results)
|
||||||
d.addCallback(lambda r: self._render_response(r))
|
except (TypeError, UnknownNameError):
|
||||||
return d
|
result = False
|
||||||
|
response = yield self._render_response(result)
|
||||||
|
defer.returnValue(response)
|
||||||
|
|
||||||
@AuthJSONRPCServer.auth_required
|
@AuthJSONRPCServer.auth_required
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
|
|
Loading…
Add table
Reference in a new issue