From 820b6eeadf9e58c1e5027fd4d92808ba817b410e Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 7 Dec 2018 13:12:01 -0500 Subject: [PATCH] fix: show fee on + balance_delta tx's --- dist/bundle.js | 5 +++-- src/redux/selectors/wallet.js | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 6b5ad24..9be7a66 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -4575,14 +4575,15 @@ var selectTransactionItems = exports.selectTransactionItems = (0, _reselect.crea // amount is always positive, but should match sign of value var balanceDelta = parseFloat(item.balance_delta); var value = parseFloat(item.value); - var amount = balanceDelta ? balanceDelta : value; + var amount = balanceDelta || value; + var fee = parseFloat(tx.fee); return { txid: txid, timestamp: tx.timestamp, date: tx.timestamp ? new Date(Number(tx.timestamp) * 1000) : null, amount: amount, - fee: amount <= 0 ? -1 * tx.fee / append.length : 0, + fee: fee, claim_id: item.claim_id, claim_name: item.claim_name, type: item.type || TRANSACTIONS.SPEND, diff --git a/src/redux/selectors/wallet.js b/src/redux/selectors/wallet.js index 4c7772a..6b0fe6a 100644 --- a/src/redux/selectors/wallet.js +++ b/src/redux/selectors/wallet.js @@ -130,13 +130,14 @@ export const selectTransactionItems = createSelector(selectTransactionsById, (by const balanceDelta = parseFloat(item.balance_delta); const value = parseFloat(item.value); const amount = balanceDelta || value; + const fee = parseFloat(tx.fee); return { txid, timestamp: tx.timestamp, date: tx.timestamp ? new Date(Number(tx.timestamp) * 1000) : null, amount, - fee: amount <= 0 ? -1 * tx.fee / append.length : 0, + fee, claim_id: item.claim_id, claim_name: item.claim_name, type: item.type || TRANSACTIONS.SPEND,