aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorHsuan Lee <jacky@17.media>2019-01-04 20:06:25 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-01-04 20:06:25 +0800
commitdd6d3232faf84282dd82ed1dc6be0dfbc56592c6 (patch)
treef2b607bffb464839a59e83ab2bcb6062291f7323 /ui
parentcb63e8efed2c71eb3a5eb58b8bb7cc2bbfa34ce9 (diff)
downloadtangerine-wallet-browser-dd6d3232faf84282dd82ed1dc6be0dfbc56592c6.tar
tangerine-wallet-browser-dd6d3232faf84282dd82ed1dc6be0dfbc56592c6.tar.gz
tangerine-wallet-browser-dd6d3232faf84282dd82ed1dc6be0dfbc56592c6.tar.bz2
tangerine-wallet-browser-dd6d3232faf84282dd82ed1dc6be0dfbc56592c6.tar.lz
tangerine-wallet-browser-dd6d3232faf84282dd82ed1dc6be0dfbc56592c6.tar.xz
tangerine-wallet-browser-dd6d3232faf84282dd82ed1dc6be0dfbc56592c6.tar.zst
tangerine-wallet-browser-dd6d3232faf84282dd82ed1dc6be0dfbc56592c6.zip
Fix ERC20 token value decoding (#5995)
When MetaMask user calls non-standard ERC20 methods such as `mint`, `tokenData` will be `undefined` and an uncaught error will break the UI
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/token-currency-display/token-currency-display.component.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/app/components/token-currency-display/token-currency-display.component.js b/ui/app/components/token-currency-display/token-currency-display.component.js
index 6e9a65300..f49846449 100644
--- a/ui/app/components/token-currency-display/token-currency-display.component.js
+++ b/ui/app/components/token-currency-display/token-currency-display.component.js
@@ -35,7 +35,7 @@ export default class TokenCurrencyDisplay extends PureComponent {
let displayValue
- if (tokenData.params && tokenData.params.length) {
+ if (tokenData && tokenData.params && tokenData.params.length) {
const tokenValue = getTokenValue(tokenData.params)
displayValue = calcTokenAmount(tokenValue, decimals).toString()
}