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:
commit
0ba63e0ead
@ -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)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user