From f01ad0e4bdd8a86a717f7c2a905f4bd506158bc2 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 11 Oct 2018 02:57:48 -0300 Subject: [PATCH] use smart_decode on transaction parsing to support legacy claims --- lbrynet/wallet/transaction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/wallet/transaction.py b/lbrynet/wallet/transaction.py index 4e0a25da2..94d6b60be 100644 --- a/lbrynet/wallet/transaction.py +++ b/lbrynet/wallet/transaction.py @@ -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