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:
parent
ca160451fc
commit
cc5d7a9b66
@ -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';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user