1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Ensure exchange rate is stringified before passing to bignumber in confirm-token-transaction component (#12550)

This commit is contained in:
Dan J Miller 2021-11-02 05:53:12 -02:30 committed by ryanml
parent 429025380c
commit bd0a3fb416

View File

@ -35,7 +35,9 @@ export default function ConfirmTokenTransactionBase({
}
const decimalEthValue = new BigNumber(tokenAmount)
.times(new BigNumber(contractExchangeRate))
.times(
new BigNumber(contractExchangeRate ? String(contractExchangeRate) : 0),
)
.toFixed();
return getWeiHexFromDecimalValue({