1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +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 GitHub
parent 5560b7c3e5
commit 8ae90aec0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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({