fix transaction_list for purchases correctly showing balance_delta

This commit is contained in:
Lex Berezhny 2019-10-29 21:01:53 -04:00
parent 6a3d760cfe
commit c4c50699cc

View file

@ -277,7 +277,7 @@ class MainNetLedger(BaseLedger):
for txo in tx.any_purchase_outputs: for txo in tx.any_purchase_outputs:
item['purchase_info'].append({ item['purchase_info'].append({
'address': txo.get_address(self), '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), 'amount': dewies_to_lbc(txo.amount),
'claim_id': txo.purchased_claim_id, 'claim_id': txo.purchased_claim_id,
'nout': txo.position 'nout': txo.position