Merge pull request #2803 from lbryio/fix-2802

fix claim apis failing with --resolve if no claims are present
This commit is contained in:
Jack Robison 2020-02-13 15:15:56 -05:00 committed by GitHub
commit 5c6d63c93d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -630,7 +630,8 @@ class Ledger(metaclass=LedgerRegistry):
raise asyncio.TimeoutError('Timed out waiting for transaction.') raise asyncio.TimeoutError('Timed out waiting for transaction.')
async def _inflate_outputs(self, query, accounts) -> Tuple[List[Output], dict, int, int]: async def _inflate_outputs(self, query, accounts) -> Tuple[List[Output], dict, int, int]:
outputs = Outputs.from_base64(await query) encoded_outputs = await query
outputs = Outputs.from_base64(encoded_outputs or b'') # TODO: why is the server returning None?
txs = [] txs = []
if len(outputs.txs) > 0: if len(outputs.txs) > 0:
txs: List[Transaction] = await asyncio.gather(*( txs: List[Transaction] = await asyncio.gather(*(

View file

@ -403,6 +403,8 @@ class ClaimCommands(ClaimTestCase):
self.assertEqual({'stream', 'channel'}, {c['value_type'] for c in r}) self.assertEqual({'stream', 'channel'}, {c['value_type'] for c in r})
async def test_claim_stream_channel_list_with_resolve(self): async def test_claim_stream_channel_list_with_resolve(self):
self.assertListEqual([], await self.claim_list(resolve=True))
await self.channel_create() await self.channel_create()
await self.stream_create() await self.stream_create()