forked from LBRYCommunity/lbry-sdk
better handle claims which fail to decode
This commit is contained in:
parent
3b8fd65fa9
commit
077dbb3138
2 changed files with 8 additions and 1 deletions
|
@ -59,7 +59,7 @@ class WalletDatabase(BaseDatabase):
|
|||
|
||||
channel_ids = set()
|
||||
for txo in txos:
|
||||
if txo.script.is_claim_name or txo.script.is_update_claim:
|
||||
if txo.is_claim and txo.can_decode_claim:
|
||||
if txo.claim.is_signed:
|
||||
channel_ids.add(txo.claim.signing_channel_id)
|
||||
if txo.claim.is_channel and my_account is not None:
|
||||
|
|
|
@ -87,6 +87,13 @@ class Output(BaseOutput):
|
|||
return self.script.values['claim']
|
||||
raise ValueError('Only claim name and claim update have the claim payload.')
|
||||
|
||||
@property
|
||||
def can_decode_claim(self):
|
||||
try:
|
||||
return self.claim
|
||||
except:
|
||||
return False
|
||||
|
||||
@property
|
||||
def permanent_url(self) -> str:
|
||||
if self.script.is_claim_involved:
|
||||
|
|
Loading…
Reference in a new issue