diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index 270dde189..070c77bd6 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -2155,11 +2155,11 @@ class Daemon(metaclass=JSONRPCServerType): accounts = wallet.get_accounts_or_all(funding_account_ids) txo = None if claim_id: - txo = await self.ledger.get_claim_by_claim_id(accounts, claim_id) + txo = await self.ledger.get_claim_by_claim_id(accounts, claim_id, include_purchase_receipt=True) if not isinstance(txo, Output) or not txo.is_claim: raise Exception(f"Could not find claim with claim_id '{claim_id}'. ") elif url: - txo = (await self.ledger.resolve(accounts, [url]))[url] + txo = (await self.ledger.resolve(accounts, [url], include_purchase_receipt=True))[url] if not isinstance(txo, Output) or not txo.is_claim: raise Exception(f"Could not find claim with url '{url}'. ") else: diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index a2dd469e0..b6870d636 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -752,8 +752,8 @@ class Ledger(metaclass=LedgerRegistry): include_is_my_output=include_is_my_output ) - async def get_claim_by_claim_id(self, accounts, claim_id) -> Output: - for claim in (await self.claim_search(accounts, claim_id=claim_id))[0]: + async def get_claim_by_claim_id(self, accounts, claim_id, **kwargs) -> Output: + for claim in (await self.claim_search(accounts, claim_id=claim_id, **kwargs))[0]: return claim async def _report_state(self): diff --git a/tests/integration/blockchain/test_purchase_command.py b/tests/integration/blockchain/test_purchase_command.py index ae68dd7f9..26aae8626 100644 --- a/tests/integration/blockchain/test_purchase_command.py +++ b/tests/integration/blockchain/test_purchase_command.py @@ -147,7 +147,7 @@ class PurchaseCommandTests(CommandTestCase): self.assertEqual(result[1]['claim_id'], result[1]['purchase_receipt']['claim_id']) url = result[0]['canonical_url'] - resolve = await self.resolve(url) + resolve = await self.resolve(url, include_purchase_receipt=True) self.assertEqual(result[0]['claim_id'], resolve['purchase_receipt']['claim_id']) self.assertItemCount(await self.daemon.jsonrpc_file_list(), 0)