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:
parent
429025380c
commit
bd0a3fb416
@ -35,7 +35,9 @@ export default function ConfirmTokenTransactionBase({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const decimalEthValue = new BigNumber(tokenAmount)
|
const decimalEthValue = new BigNumber(tokenAmount)
|
||||||
.times(new BigNumber(contractExchangeRate))
|
.times(
|
||||||
|
new BigNumber(contractExchangeRate ? String(contractExchangeRate) : 0),
|
||||||
|
)
|
||||||
.toFixed();
|
.toFixed();
|
||||||
|
|
||||||
return getWeiHexFromDecimalValue({
|
return getWeiHexFromDecimalValue({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user