aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/token-balance.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-07-11 02:32:05 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-07-11 02:32:05 +0800
commit28c509914bf09850dd9aaef52b212f6271633e93 (patch)
tree049373cf51ae16580a5f18dd29e195e68d4f7b53 /ui/app/components/token-balance.js
parent94a4f99115cf549a3014d29d828e7a432bf36a62 (diff)
parentf6de948e42ae633d40aef72595a01caa622a280d (diff)
downloadtangerine-wallet-browser-28c509914bf09850dd9aaef52b212f6271633e93.tar
tangerine-wallet-browser-28c509914bf09850dd9aaef52b212f6271633e93.tar.gz
tangerine-wallet-browser-28c509914bf09850dd9aaef52b212f6271633e93.tar.bz2
tangerine-wallet-browser-28c509914bf09850dd9aaef52b212f6271633e93.tar.lz
tangerine-wallet-browser-28c509914bf09850dd9aaef52b212f6271633e93.tar.xz
tangerine-wallet-browser-28c509914bf09850dd9aaef52b212f6271633e93.tar.zst
tangerine-wallet-browser-28c509914bf09850dd9aaef52b212f6271633e93.zip
Merge branch 'develop' of https://github.com/MetaMask/metamask-extension into i#3896
Diffstat (limited to 'ui/app/components/token-balance.js')
-rw-r--r--ui/app/components/token-balance.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/app/components/token-balance.js b/ui/app/components/token-balance.js
index df3bd59bb..99ca7335c 100644
--- a/ui/app/components/token-balance.js
+++ b/ui/app/components/token-balance.js
@@ -98,6 +98,10 @@ TokenBalance.prototype.componentDidUpdate = function (nextProps) {
}
TokenBalance.prototype.updateBalance = function (tokens = []) {
+ if (!this.tracker.running) {
+ return
+ }
+
const [{ string, symbol }] = tokens
this.setState({
@@ -110,5 +114,7 @@ TokenBalance.prototype.updateBalance = function (tokens = []) {
TokenBalance.prototype.componentWillUnmount = function () {
if (!this.tracker) return
this.tracker.stop()
+ this.tracker.removeListener('update', this.balanceUpdater)
+ this.tracker.removeListener('error', this.showError)
}