fix claim apis failing with --resolve if no claims are present

fixes https://github.com/lbryio/lbry-sdk/issues/2802
This commit is contained in:
Jack Robison 2020-02-13 14:58:51 -05:00
parent f4d3e9ea6a
commit c8c10d2bb0
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
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.')
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 = []
if len(outputs.txs) > 0:
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})
async def test_claim_stream_channel_list_with_resolve(self):
self.assertListEqual([], await self.claim_list(resolve=True))
await self.channel_create()
await self.stream_create()