use smart_decode on transaction parsing to support legacy claims
This commit is contained in:
parent
d9fcc458dc
commit
f01ad0e4bd
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ import struct
|
|||
from binascii import hexlify, unhexlify
|
||||
from typing import List, Iterable, Optional
|
||||
|
||||
from lbryschema.decode import smart_decode
|
||||
from .account import Account
|
||||
from torba.basetransaction import BaseTransaction, BaseInput, BaseOutput
|
||||
from torba.hash import hash160
|
||||
|
@ -58,7 +59,7 @@ class Output(BaseOutput):
|
|||
@property
|
||||
def claim(self) -> ClaimDict:
|
||||
if self.script.is_claim_name or self.script.is_update_claim:
|
||||
return ClaimDict.deserialize(self.script.values['claim'])
|
||||
return smart_decode(self.script.values['claim'])
|
||||
raise ValueError('Only claim name and claim update have the claim payload.')
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in a new issue