From a60a9217060f0fea93aabff390808d851017f1b6 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 30 Nov 2018 00:18:32 -0300 Subject: [PATCH] resolve claims on claim_list (#1483) --- lbrynet/extras/wallet/manager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lbrynet/extras/wallet/manager.py b/lbrynet/extras/wallet/manager.py index 161e410dd..a9960f4b6 100644 --- a/lbrynet/extras/wallet/manager.py +++ b/lbrynet/extras/wallet/manager.py @@ -279,8 +279,12 @@ class LbryWalletManager(BaseWalletManager): ).asFuture(asyncio.get_event_loop()) return results - def get_claims_for_name(self, name: str): - return self.ledger.network.get_claims_for_name(name) + async def get_claims_for_name(self, name: str): + response = await self.ledger.network.get_claims_for_name(name) + if 'claims' in response: + to_resolve = [(claim['name'] + '#' + claim['claim_id']) for claim in response['claims']] + response['claims'] = [resolution['claim'] for resolution in (await self.resolve(*to_resolve)).values()] + return response async def address_is_mine(self, unknown_address, account): match = await self.ledger.db.get_address(address=unknown_address, account=account)