mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-08-30 08:51:27 +00:00
simplify claim_list
This commit is contained in:
parent
368f0683ec
commit
881e5aba68
1 changed files with 2 additions and 4 deletions
|
@ -280,10 +280,8 @@ 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:
|
resolutions = await self.resolve(*(f"{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'] = [value.get('claim', value.get('certificate')) for value in resolutions.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):
|
||||||
|
|
Loading…
Add table
Reference in a new issue