aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 983a590d7..78e5a6f0a 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -53,15 +53,18 @@ module.exports = class MetamaskController {
}
getState () {
- return extend(
- this.state,
- this.ethStore.getState(),
- this.configManager.getConfig(),
- this.keyringController.getState(),
- this.noticeController.getState(), {
- lostAccounts: this.configManager.getLostAccounts(),
- }
- )
+ return this.keyringController.getState()
+ .then((keyringControllerState) => {
+ return extend(
+ this.state,
+ this.ethStore.getState(),
+ this.configManager.getConfig(),
+ keyringControllerState,
+ this.noticeController.getState(), {
+ lostAccounts: this.configManager.getLostAccounts(),
+ }
+ )
+ })
}
getApi () {
@@ -69,7 +72,7 @@ module.exports = class MetamaskController {
const noticeController = this.noticeController
return {
- getState: (cb) => { cb(null, this.getState()) },
+ getState: nodeify(this.getState.bind(this)),
setRpcTarget: this.setRpcTarget.bind(this),
setProviderType: this.setProviderType.bind(this),
useEtherscanProvider: this.useEtherscanProvider.bind(this),