forked from LBRYCommunity/lbry-sdk
remove fees from value, abandon is positive
This commit is contained in:
parent
d64916a061
commit
92d1230a90
1 changed files with 2 additions and 1 deletions
|
@ -352,7 +352,7 @@ class LbryWalletManager(BaseWalletManager):
|
||||||
for txo in tx.my_abandon_outputs:
|
for txo in tx.my_abandon_outputs:
|
||||||
item['abandon_info'].append({
|
item['abandon_info'].append({
|
||||||
'address': txo.get_address(account.ledger),
|
'address': txo.get_address(account.ledger),
|
||||||
'balance_delta': dewies_to_lbc(-txo.amount),
|
'balance_delta': dewies_to_lbc(txo.amount),
|
||||||
'amount': dewies_to_lbc(txo.amount),
|
'amount': dewies_to_lbc(txo.amount),
|
||||||
'claim_id': txo.claim_id,
|
'claim_id': txo.claim_id,
|
||||||
'claim_name': txo.claim_name,
|
'claim_name': txo.claim_name,
|
||||||
|
@ -360,6 +360,7 @@ class LbryWalletManager(BaseWalletManager):
|
||||||
})
|
})
|
||||||
if all([txi.txo_ref.txo is not None for txi in tx.inputs]):
|
if all([txi.txo_ref.txo is not None for txi in tx.inputs]):
|
||||||
item['fee'] = dewies_to_lbc(tx.fee)
|
item['fee'] = dewies_to_lbc(tx.fee)
|
||||||
|
item['value'] -= item['fee']
|
||||||
else:
|
else:
|
||||||
item['fee'] = '0' # can't calculate fee without all input txos
|
item['fee'] = '0' # can't calculate fee without all input txos
|
||||||
history.append(item)
|
history.append(item)
|
||||||
|
|
Loading…
Reference in a new issue