aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/token-balance.js
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-05 20:54:01 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2018-07-05 21:24:51 +0800
commit0116ea9b95c5a9ab35d23e814a1783ef2bc11c25 (patch)
treebe153101d564a0f5c4f0f50b6572ac5bd86183c8 /ui/app/components/token-balance.js
parent46cda26f3b982fb7ff26c29d2137540a5dc49457 (diff)
downloadtangerine-wallet-browser-0116ea9b95c5a9ab35d23e814a1783ef2bc11c25.tar
tangerine-wallet-browser-0116ea9b95c5a9ab35d23e814a1783ef2bc11c25.tar.gz
tangerine-wallet-browser-0116ea9b95c5a9ab35d23e814a1783ef2bc11c25.tar.bz2
tangerine-wallet-browser-0116ea9b95c5a9ab35d23e814a1783ef2bc11c25.tar.lz
tangerine-wallet-browser-0116ea9b95c5a9ab35d23e814a1783ef2bc11c25.tar.xz
tangerine-wallet-browser-0116ea9b95c5a9ab35d23e814a1783ef2bc11c25.tar.zst
tangerine-wallet-browser-0116ea9b95c5a9ab35d23e814a1783ef2bc11c25.zip
Remove TokenTracker listeners when unmounting component
Diffstat (limited to 'ui/app/components/token-balance.js')
-rw-r--r--ui/app/components/token-balance.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/app/components/token-balance.js b/ui/app/components/token-balance.js
index df3bd59bb..5464294ce 100644
--- a/ui/app/components/token-balance.js
+++ b/ui/app/components/token-balance.js
@@ -110,5 +110,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)
}