aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/background.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-09-07 09:56:26 +0800
committerDan Finlay <dan@danfinlay.com>2016-09-07 09:56:26 +0800
commitbfea26d3e3d12de6ce9bbc01ad24a42d846021e5 (patch)
treeb9e69d4d05f5845d2edf51fb5987374e603a1729 /app/scripts/background.js
parentb1cd7ebc47f8ec2170c03cff67a0f8fd870a325a (diff)
downloadtangerine-wallet-browser-bfea26d3e3d12de6ce9bbc01ad24a42d846021e5.tar
tangerine-wallet-browser-bfea26d3e3d12de6ce9bbc01ad24a42d846021e5.tar.gz
tangerine-wallet-browser-bfea26d3e3d12de6ce9bbc01ad24a42d846021e5.tar.bz2
tangerine-wallet-browser-bfea26d3e3d12de6ce9bbc01ad24a42d846021e5.tar.lz
tangerine-wallet-browser-bfea26d3e3d12de6ce9bbc01ad24a42d846021e5.tar.xz
tangerine-wallet-browser-bfea26d3e3d12de6ce9bbc01ad24a42d846021e5.tar.zst
tangerine-wallet-browser-bfea26d3e3d12de6ce9bbc01ad24a42d846021e5.zip
Ensure listener is cleaned up
Also fixed bug when validating a tx with no value.
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r--app/scripts/background.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 21a5eea65..18aaed7bf 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -86,6 +86,7 @@ function setupControllerConnection (stream) {
stream.pipe(dnode).pipe(stream)
dnode.on('remote', (remote) => {
// push updates to popup
+ controller.ethStore.removeListener('update', controller.sendUpdate.bind(controller))
controller.ethStore.on('update', controller.sendUpdate.bind(controller))
controller.listeners.push(remote)
idStore.on('update', controller.sendUpdate.bind(controller))