1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-03-02 17:26:13 +00:00

convert normal notation, converting exp notation will fail

This commit is contained in:
slowbackspace 2019-01-08 14:04:42 +01:00
parent 8970f90d45
commit bbfd3cafce

View File

@ -339,7 +339,7 @@ export const dataValidation = ($state: State): PayloadAction<State> => (): State
export const calculateFee = (gasPrice: string, gasLimit: string): string => {
try {
return EthereumjsUnits.convert(new BigNumber(gasPrice).times(gasLimit), 'gwei', 'ether');
return EthereumjsUnits.convert(new BigNumber(gasPrice).times(gasLimit).toFixed(), 'gwei', 'ether');
} catch (error) {
return '0';
}