dont fail when claim is not decodable
This commit is contained in:
parent
091221ba2c
commit
f06192601c
1 changed files with 4 additions and 1 deletions
|
@ -39,7 +39,10 @@ class WalletDatabase(BaseDatabase):
|
||||||
def txo_to_row(self, tx, address, txo):
|
def txo_to_row(self, tx, address, txo):
|
||||||
row = super().txo_to_row(tx, address, txo)
|
row = super().txo_to_row(tx, address, txo)
|
||||||
if txo.is_claim:
|
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:
|
elif txo.is_support:
|
||||||
row['txo_type'] = TXO_TYPES['support']
|
row['txo_type'] = TXO_TYPES['support']
|
||||||
if txo.script.is_claim_involved:
|
if txo.script.is_claim_involved:
|
||||||
|
|
Loading…
Add table
Reference in a new issue