1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-28 00:41:08 +00:00

getPendingAmount only for "send" transaction

This commit is contained in:
Szymon Lesisz 2019-01-09 14:33:19 +01:00
parent b1c3396f61
commit 75cfd44b3c

View File

@ -95,6 +95,7 @@ export const getPendingSequence = (pending: Array<Transaction>): number => pendi
}, 0);
export const getPendingAmount = (pending: Array<Transaction>, currency: string, token: boolean = false): BigNumber => pending.reduce((value: BigNumber, tx: Transaction): BigNumber => {
if (tx.type !== 'send') return value;
if (!token) {
// regular transactions
// add fees from token txs and amount from regular txs