mirror of
https://github.com/trezor/trezor-wallet
synced 2025-05-13 04:18:46 +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 => {
|
export const calculateTotal = (amount: string, gasPrice: string, gasLimit: string): string => {
|
||||||
try {
|
try {
|
||||||
return new BigNumber(amount).plus(calculateFee(gasPrice, gasLimit)).toString(10);
|
return new BigNumber(amount).plus(calculateFee(gasPrice, gasLimit)).toFixed();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return '0';
|
return '0';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user