From f06192601cc54ee4163f9c14a3ca136f08f43e59 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Fri, 13 Sep 2019 09:32:34 -0400 Subject: [PATCH] dont fail when claim is not decodable --- lbry/lbry/wallet/database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lbry/lbry/wallet/database.py b/lbry/lbry/wallet/database.py index bd26c9344..8828ee973 100644 --- a/lbry/lbry/wallet/database.py +++ b/lbry/lbry/wallet/database.py @@ -39,7 +39,10 @@ class WalletDatabase(BaseDatabase): def txo_to_row(self, tx, address, txo): row = super().txo_to_row(tx, address, txo) if txo.is_claim: - row['txo_type'] = TXO_TYPES.get(txo.claim.claim_type, 0) + if txo.can_decode_claim: + row['txo_type'] = TXO_TYPES.get(txo.claim.claim_type, TXO_TYPES['stream']) + else: + row['txo_type'] = TXO_TYPES['stream'] elif txo.is_support: row['txo_type'] = TXO_TYPES['support'] if txo.script.is_claim_involved: