diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-01-04 04:19:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-04 04:19:26 +0800 |
commit | 0ba63e0ead02e03e094788a874e185f38e0624be (patch) | |
tree | 313904aa4b9f9a729ffeedb8f53819a830c93afb /app | |
parent | 74cccb4f1de288b68f053a75514cf7fd6268388f (diff) | |
parent | 0a6d8af171b86c84bb730bf3feed6eeeddaf5531 (diff) | |
download | tangerine-wallet-browser-0ba63e0ead02e03e094788a874e185f38e0624be.tar tangerine-wallet-browser-0ba63e0ead02e03e094788a874e185f38e0624be.tar.gz tangerine-wallet-browser-0ba63e0ead02e03e094788a874e185f38e0624be.tar.bz2 tangerine-wallet-browser-0ba63e0ead02e03e094788a874e185f38e0624be.tar.lz tangerine-wallet-browser-0ba63e0ead02e03e094788a874e185f38e0624be.tar.xz tangerine-wallet-browser-0ba63e0ead02e03e094788a874e185f38e0624be.tar.zst tangerine-wallet-browser-0ba63e0ead02e03e094788a874e185f38e0624be.zip |
Merge pull request #964 from MetaMask/i963-BalancesNotUpdating
Update UI state on ethStore updates
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/metamask-controller.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 3e27272b9..c0d2f3b4c 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -60,6 +60,8 @@ module.exports = class MetamaskController { this.idStoreMigrator = new IdStoreMigrator({ configManager: this.configManager, }) + + this.ethStore.on('update', this.sendUpdate.bind(this)) } getState () { @@ -161,8 +163,12 @@ module.exports = class MetamaskController { } sendUpdate () { - this.listeners.forEach((remote) => { - remote.sendUpdate(this.getState()) + this.getState() + .then((state) => { + + this.listeners.forEach((remote) => { + remote.sendUpdate(state) + }) }) } |