From 881e5aba683ca66e1b0d0e1f39d62af1e892fa83 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 23 Jan 2019 12:45:18 -0300 Subject: [PATCH] simplify claim_list --- lbrynet/extras/wallet/manager.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lbrynet/extras/wallet/manager.py b/lbrynet/extras/wallet/manager.py index b0a73e828..ca12d8952 100644 --- a/lbrynet/extras/wallet/manager.py +++ b/lbrynet/extras/wallet/manager.py @@ -280,10 +280,8 @@ class LbryWalletManager(BaseWalletManager): async def get_claims_for_name(self, name: str): response = await self.ledger.network.get_claims_for_name(name) - if 'claims' in response: - resolutions = await self.resolve(*[f"{claim['name']}#{claim['claim_id']}" for claim in response['claims']]) - resolutions = resolutions.values() - response['claims'] = [resolution.get('claim', resolution.get('certificate')) for resolution in resolutions] + resolutions = await self.resolve(*(f"{claim['name']}#{claim['claim_id']}" for claim in response['claims'])) + response['claims'] = [value.get('claim', value.get('certificate')) for value in resolutions.values()] return response async def address_is_mine(self, unknown_address, account):