fix claim_list for channels

This commit is contained in:
Victor Shyba 2019-01-22 12:24:42 -03:00 committed by Lex Berezhny
parent 94dc8c8520
commit 368f0683ec

View file

@ -281,8 +281,9 @@ class LbryWalletManager(BaseWalletManager):
async def get_claims_for_name(self, name: str): async def get_claims_for_name(self, name: str):
response = await self.ledger.network.get_claims_for_name(name) response = await self.ledger.network.get_claims_for_name(name)
if 'claims' in response: if 'claims' in response:
to_resolve = [(claim['name'] + '#' + claim['claim_id']) for claim in response['claims']] resolutions = await self.resolve(*[f"{claim['name']}#{claim['claim_id']}" for claim in response['claims']])
response['claims'] = [resolution['claim'] for resolution in (await self.resolve(*to_resolve)).values()] resolutions = resolutions.values()
response['claims'] = [resolution.get('claim', resolution.get('certificate')) for resolution in resolutions]
return response return response
async def address_is_mine(self, unknown_address, account): async def address_is_mine(self, unknown_address, account):