1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

fix: calculate pending amount

This commit is contained in:
Szymon Lesisz 2018-05-28 19:42:19 +02:00
parent 46c1f8b2b7
commit 47af92ae2c

View File

@ -100,7 +100,7 @@ export const getPendingNonce = (pending: Array<PendingTx>): number => {
export const getPendingAmount = (pending: Array<PendingTx>, currency: string): BigNumber => { export const getPendingAmount = (pending: Array<PendingTx>, currency: string): BigNumber => {
return pending.reduce((value: BigNumber, tx: PendingTx) => { return pending.reduce((value: BigNumber, tx: PendingTx) => {
if (tx.currency === currency) { if (tx.currency === currency) {
return new BigNumber(value).plus(tx.amount); return new BigNumber(value).plus(tx.total);
} }
return value; return value;
}, new BigNumber('0')); }, new BigNumber('0'));