aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-02-03 09:07:52 +0800
committerkumavis <aaron@kumavis.me>2017-02-03 09:07:52 +0800
commit79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100 (patch)
treeeb580ce11b04cc78fa3a8c3cf02cea3da83fdc57 /app
parent134a4c7bc3dcb8d750de4867f7dade413f438981 (diff)
downloadtangerine-wallet-browser-79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100.tar
tangerine-wallet-browser-79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100.tar.gz
tangerine-wallet-browser-79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100.tar.bz2
tangerine-wallet-browser-79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100.tar.lz
tangerine-wallet-browser-79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100.tar.xz
tangerine-wallet-browser-79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100.tar.zst
tangerine-wallet-browser-79ed2e902fa3e1d9aadd9e3ecd88f627de5bb100.zip
keyring - replace getState with memStore
Diffstat (limited to 'app')
-rw-r--r--app/scripts/keyring-controller.js30
-rw-r--r--app/scripts/metamask-controller.js2
2 files changed, 2 insertions, 30 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 59b8486ff..348f81fc9 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -53,35 +53,7 @@ class KeyringController extends EventEmitter {
// Not all methods end with this, that might be a nice refactor.
fullUpdate () {
this.emit('update')
- return Promise.resolve(this.getState())
- }
-
- // Get State
- // returns @object state
- //
- // This method returns a hash representing the current state
- // that the keyringController manages.
- //
- // It is extended in the MetamaskController along with the EthStore
- // state, and its own state, to create the metamask state branch
- // that is passed to the UI.
- //
- // This is currently a rare example of a synchronously resolving method
- // in this class, but will need to be Promisified when we move our
- // persistence to an async model.
- getState () {
-
- // old wallet
- const memState = this.memStore.getState()
- const result = {
- // computed
- isUnlocked: memState.isUnlocked,
- // memStore
- keyringTypes: memState.keyringTypes,
- identities: memState.identities,
- keyrings: memState.keyrings,
- }
- return result
+ return Promise.resolve(this.memStore.getState())
}
// Create New Vault And Keychain
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 695491c2a..02dd60528 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -177,7 +177,7 @@ module.exports = class MetamaskController extends EventEmitter {
this.ethStore.getState(),
this.txManager.getState(),
this.messageManager.getState(),
- this.keyringController.getState(),
+ this.keyringController.memStore.getState(),
this.preferencesController.store.getState(),
this.noticeController.getState(),
// config manager