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. 1
      ui/pages/swaps/index.js

@ -298,6 +298,7 @@ export default function Swap() {
// "setBalanceError" is just a warning, a user can still click on the "Review Swap" button.
dispatch(setBalanceError(balanceError));
setTokenFromError(
fromToken &&
countDecimals(newInputValue) > fromToken.decimals
? 'tooManyDecimals'
: null,

Loading…
Cancel
Save