From 16bc650d6a61d46066c62d807cd1b0236ec5753c Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Wed, 20 Sep 2017 10:39:51 -0400 Subject: [PATCH] fix sign on some transaction outpoints --- ui/js/selectors/wallet.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/js/selectors/wallet.js b/ui/js/selectors/wallet.js index fbf63770f..8aafcf6dc 100644 --- a/ui/js/selectors/wallet.js +++ b/ui/js/selectors/wallet.js @@ -55,7 +55,11 @@ export const selectTransactionItems = createSelector( items.push( ...append.map(item => { - const amount = parseFloat(item.value || -1 * item.amount); //it's value on a transaction, amount on an outpoint (which has the sign the opposite way) + //value on transaction, amount on outpoint + //amount is always positive, but should match sign of value + const amount = parseFloat( + item.value || (item.value < 0 ? -1 : 1) * item.amount + ); return { txid: txid,