mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Check for the "fromToken" existance before checking decimals (#11606)
This commit is contained in:
parent
5d92836c8c
commit
868d932165
@ -298,7 +298,8 @@ export default function Swap() {
|
|||||||
// "setBalanceError" is just a warning, a user can still click on the "Review Swap" button.
|
// "setBalanceError" is just a warning, a user can still click on the "Review Swap" button.
|
||||||
dispatch(setBalanceError(balanceError));
|
dispatch(setBalanceError(balanceError));
|
||||||
setTokenFromError(
|
setTokenFromError(
|
||||||
countDecimals(newInputValue) > fromToken.decimals
|
fromToken &&
|
||||||
|
countDecimals(newInputValue) > fromToken.decimals
|
||||||
? 'tooManyDecimals'
|
? 'tooManyDecimals'
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user