fix: show fee on + balance_delta tx's
This commit is contained in:
parent
7087586ad4
commit
820b6eeadf
2 changed files with 5 additions and 3 deletions
5
dist/bundle.js
vendored
5
dist/bundle.js
vendored
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue