diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-09-07 10:07:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-07 10:07:30 +0800 |
commit | 54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57 (patch) | |
tree | d20df5faf6c355247ea4a15173d061f2de6fd851 /app | |
parent | b1cd7ebc47f8ec2170c03cff67a0f8fd870a325a (diff) | |
parent | 2564c0c51c39e428540e38b80558e45ec44357a8 (diff) | |
download | tangerine-wallet-browser-54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57.tar tangerine-wallet-browser-54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57.tar.gz tangerine-wallet-browser-54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57.tar.bz2 tangerine-wallet-browser-54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57.tar.lz tangerine-wallet-browser-54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57.tar.xz tangerine-wallet-browser-54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57.tar.zst tangerine-wallet-browser-54425f4ee767fcbd50ac6d9e7fe23e6ab4a3ff57.zip |
Merge pull request #617 from MetaMask/i616-FixListenerLeak
I616 fix listener leak
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/background.js | 1 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 2 |
2 files changed, 2 insertions, 1 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)) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 83827ec76..5373cf0d9 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -220,7 +220,7 @@ module.exports = class MetamaskController { } enforceTxValidations (txParams) { - if (txParams.value.indexOf('-') === 0) { + if (('value' in txParams) && txParams.value.indexOf('-') === 0) { const msg = `Invalid transaction value of ${txParams.value} not a positive number.` return new Error(msg) } |