Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 70cf708

Browse files
authored
Merge pull request #711 from lightninglabs/empty-fees
Display 0 instead of - for empty fees
2 parents 563a601 + 0da268f commit 70cf708

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/computed/transaction.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ const ComputedTransaction = store => {
2121
t.dateLabel = t.date.toLocaleDateString();
2222
t.dateTimeLabel = t.date.toLocaleString();
2323
t.amountLabel = toAmountLabel(t.amount, settings);
24-
t.feeLabel = Number.isInteger(t.fee)
25-
? toAmountLabel(t.fee, settings)
26-
: '-';
24+
t.feeLabel = toAmountLabel(t.fee || 0, settings);
2725
if (Number.isInteger(t.confirmations)) {
2826
t.confirmationsLabel = t.confirmations.toString();
2927
}

test/unit/computed/transaction.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('Computed Transactions Unit Tests', () => {
5656
expect(tx.feeLabel, 'to match', /0[,.]0000825/);
5757
expect(tx.confirmationsLabel, 'to equal', '0');
5858
const inv = store.computedTransactions.find(t => t.id === '2');
59-
expect(inv.feeLabel, 'to equal', '-');
59+
expect(inv.feeLabel, 'to equal', '0');
6060
expect(inv.confirmationsLabel, 'to be', undefined);
6161
});
6262

0 commit comments

Comments
 (0)