diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-07-24 03:44:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 03:44:04 +0800 |
commit | fc3b035aac66c5636ef7d77c0659a157cdf4384d (patch) | |
tree | 08804400360bc9b210b2a2ad87a6099dcca63bee /app/scripts | |
parent | e81aa6073d30d5a93fce9a2414203e8367ae16b9 (diff) | |
download | tangerine-wallet-browser-fc3b035aac66c5636ef7d77c0659a157cdf4384d.tar.gz tangerine-wallet-browser-fc3b035aac66c5636ef7d77c0659a157cdf4384d.tar.zst tangerine-wallet-browser-fc3b035aac66c5636ef7d77c0659a157cdf4384d.zip |
Check balance before testing it w/ isZero (#6898)
Diffstat (limited to 'app/scripts')
-rw-r--r-- | app/scripts/controllers/detect-tokens.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/scripts/controllers/detect-tokens.js b/app/scripts/controllers/detect-tokens.js index e6940c613..f0ceab8e6 100644 --- a/app/scripts/controllers/detect-tokens.js +++ b/app/scripts/controllers/detect-tokens.js @@ -47,7 +47,7 @@ class DetectTokensController { } tokensToDetect.forEach((tokenAddress, index) => { const balance = result[index] - if (!balance.isZero()) { + if (balance && !balance.isZero()) { this._preferences.addToken(tokenAddress, contracts[tokenAddress].symbol, contracts[tokenAddress].decimals) } }) |