1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-14 04:19:09 +00:00

use faster toFixed()

This commit is contained in:
slowbackspace 2019-01-08 10:40:21 +01:00
parent ca160451fc
commit cc5d7a9b66

View File

@ -347,7 +347,7 @@ export const calculateFee = (gasPrice: string, gasLimit: string): string => {
export const calculateTotal = (amount: string, gasPrice: string, gasLimit: string): string => {
try {
return new BigNumber(amount).plus(calculateFee(gasPrice, gasLimit)).toString(10);
return new BigNumber(amount).plus(calculateFee(gasPrice, gasLimit)).toFixed();
} catch (error) {
return '0';
}