aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-02-03 10:21:22 +0800
committerkumavis <aaron@kumavis.me>2017-02-03 10:21:22 +0800
commitbcb86f38cbe91fb814d30b3129de76dba45bff66 (patch)
tree37b3d7ed66d01d21540887d3004ebfbda2a13dd8 /app/scripts/metamask-controller.js
parent79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100 (diff)
downloadtangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar.gz
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.tar.zst
tangerine-wallet-browser-bcb86f38cbe91fb814d30b3129de76dba45bff66.zip
messageManager - move view state to obs-store
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 02dd60528..b6a096488 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -100,17 +100,19 @@ module.exports = class MetamaskController extends EventEmitter {
configManager: this.configManager,
})
- // manual state subscriptions
- this.ethStore.on('update', this.sendUpdate.bind(this))
- this.keyringController.on('update', this.sendUpdate.bind(this))
- this.txManager.on('update', this.sendUpdate.bind(this))
- this.messageManager.on('update', this.sendUpdate.bind(this))
+ // manual disk state subscriptions
this.keyringController.store.subscribe((state) => {
this.store.updateState({ KeyringController: state })
})
this.preferencesController.store.subscribe((state) => {
this.store.updateState({ PreferencesController: state })
})
+
+ // manual mem state subscriptions
+ this.ethStore.on('update', this.sendUpdate.bind(this))
+ this.keyringController.memStore.subscribe(this.sendUpdate.bind(this))
+ this.txManager.on('update', this.sendUpdate.bind(this))
+ this.messageManager.memStore.subscribe(this.sendUpdate.bind(this))
}
//
@@ -176,7 +178,7 @@ module.exports = class MetamaskController extends EventEmitter {
this.state,
this.ethStore.getState(),
this.txManager.getState(),
- this.messageManager.getState(),
+ this.messageManager.memStore.getState(),
this.keyringController.memStore.getState(),
this.preferencesController.store.getState(),
this.noticeController.getState(),