Check for the "fromToken" existance before checking decimals (#11606)

feature/default_network_editable
Daniel 3 years ago committed by GitHub
parent 5d92836c8c
commit 868d932165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui/pages/swaps/index.js

@ -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…
Cancel
Save