From 0116ea9b95c5a9ab35d23e814a1783ef2bc11c25 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Thu, 5 Jul 2018 10:24:01 -0230 Subject: Remove TokenTracker listeners when unmounting component --- ui/app/components/token-balance.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/app/components/token-balance.js') 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) } -- cgit