mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-31 17:31:29 +00:00
fix claim_show
This commit is contained in:
parent
89b4487eb9
commit
fa49b40389
3 changed files with 4 additions and 6 deletions
|
@ -18,6 +18,7 @@ at anytime.
|
||||||
* issue where an `AuthAPIClient` (used by `lbrynet-cli`) would fail to update its session secret and keep making new auth sessions, with every other request failing
|
* issue where an `AuthAPIClient` (used by `lbrynet-cli`) would fail to update its session secret and keep making new auth sessions, with every other request failing
|
||||||
* `use_auth_http` in a config file being overridden by the default command line argument to `lbrynet-daemon`, now the command line value will only override the config file value if it is provided
|
* `use_auth_http` in a config file being overridden by the default command line argument to `lbrynet-daemon`, now the command line value will only override the config file value if it is provided
|
||||||
* `lbrynet-cli` not automatically switching to the authenticated client if the server is detected to be using authentication. This resulted in `lbrynet-cli` failing to run when `lbrynet-daemon` was run with the `--http-auth` flag
|
* `lbrynet-cli` not automatically switching to the authenticated client if the server is detected to be using authentication. This resulted in `lbrynet-cli` failing to run when `lbrynet-daemon` was run with the `--http-auth` flag
|
||||||
|
* fixed error when using `claim_show` with `txid` and `nout` arguments
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
*
|
*
|
||||||
|
|
|
@ -446,14 +446,12 @@ class Wallet(object):
|
||||||
defer.returnValue(claims)
|
defer.returnValue(claims)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_claim_by_outpoint(self, claim_outpoint, check_expire=True):
|
def get_claim_by_outpoint(self, txid, nout, check_expire=True):
|
||||||
txid, nout = claim_outpoint.split(":")
|
|
||||||
nout = int(nout)
|
|
||||||
claim = yield self._get_claim_by_outpoint(txid, nout)
|
claim = yield self._get_claim_by_outpoint(txid, nout)
|
||||||
try:
|
try:
|
||||||
result = self._handle_claim_result(claim)
|
result = self._handle_claim_result(claim)
|
||||||
yield self.save_claim(result)
|
yield self.save_claim(result)
|
||||||
except (UnknownOutpoint) as err:
|
except UnknownOutpoint as err:
|
||||||
result = {'error': err.message}
|
result = {'error': err.message}
|
||||||
defer.returnValue(result)
|
defer.returnValue(result)
|
||||||
|
|
||||||
|
|
|
@ -1488,8 +1488,7 @@ 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.session.wallet.get_claim_by_claim_id(claim_id)
|
claim_results = yield self.session.wallet.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:
|
||||||
outpoint = ClaimOutpoint(txid, nout)
|
claim_results = yield self.session.wallet.get_claim_by_outpoint(txid, int(nout))
|
||||||
claim_results = yield self.session.wallet.get_claim_by_outpoint(outpoint)
|
|
||||||
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)
|
response = yield self._render_response(claim_results)
|
||||||
|
|
Loading…
Add table
Reference in a new issue