From c4c50699cc6c8b3b6cc0b6b44ae87ccbf5befc38 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Tue, 29 Oct 2019 21:01:53 -0400 Subject: [PATCH] fix transaction_list for purchases correctly showing balance_delta --- lbry/lbry/wallet/ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbry/lbry/wallet/ledger.py b/lbry/lbry/wallet/ledger.py index d10af6e65..49254e350 100644 --- a/lbry/lbry/wallet/ledger.py +++ b/lbry/lbry/wallet/ledger.py @@ -277,7 +277,7 @@ class MainNetLedger(BaseLedger): for txo in tx.any_purchase_outputs: item['purchase_info'].append({ 'address': txo.get_address(self), - 'balance_delta': dewies_to_lbc(txo.amount), + 'balance_delta': dewies_to_lbc(txo.amount if not is_my_inputs else -txo.amount), 'amount': dewies_to_lbc(txo.amount), 'claim_id': txo.purchased_claim_id, 'nout': txo.position