1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #964 from MetaMask/i963-BalancesNotUpdating

Update UI state on ethStore updates
This commit is contained in:
Kevin Serrano 2017-01-03 12:19:26 -08:00 committed by GitHub
commit 0ba63e0ead

View File

@ -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)
})
})
}