diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-06-17 08:07:12 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-06-17 08:07:12 +0800 |
commit | 0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa (patch) | |
tree | 04fc3248e18f0b78be1efb01566be8dd150ccc4e /app/scripts/metamask-controller.js | |
parent | e672f2da0d74bc1e001acb35be0345e49663463e (diff) | |
parent | 7ec7e1226691474ea200ccf867f7a7d1f0c1086a (diff) | |
download | tangerine-wallet-browser-0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa.tar tangerine-wallet-browser-0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa.tar.gz tangerine-wallet-browser-0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa.tar.bz2 tangerine-wallet-browser-0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa.tar.lz tangerine-wallet-browser-0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa.tar.xz tangerine-wallet-browser-0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa.tar.zst tangerine-wallet-browser-0d8c02db35ac56acb2552c30e7a1bb9f1c1193aa.zip |
Merge branch 'master' into nonce-tracker
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r-- | app/scripts/metamask-controller.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 006a32eac..755bf3289 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -23,6 +23,7 @@ const autoFaucet = require('./lib/auto-faucet') const nodeify = require('./lib/nodeify') const accountImporter = require('./account-import-strategies') const getBuyEthUrl = require('./lib/buy-eth-url') +const debounce = require('debounce') const version = require('../manifest.json').version @@ -30,6 +31,9 @@ module.exports = class MetamaskController extends EventEmitter { constructor (opts) { super() + + this.sendUpdate = debounce(this.privateSendUpdate.bind(this), 200) + this.opts = opts const initState = opts.initState || {} @@ -98,6 +102,7 @@ module.exports = class MetamaskController extends EventEmitter { provider: this.provider, blockTracker: this.provider, ethQuery: this.ethQuery, + ethStore: this.ethStore, }) // notices @@ -354,7 +359,7 @@ module.exports = class MetamaskController extends EventEmitter { ) } - sendUpdate () { + privateSendUpdate () { this.emit('update', this.getState()) } |