aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-01-27 12:17:36 +0800
committerkumavis <aaron@kumavis.me>2017-01-27 12:17:36 +0800
commit2f79781ab9fbdde018fc921da9be0b3411ed8cad (patch)
tree50fd0930f28261b4932c7e0b753bc193033f673e /app/scripts
parent2b34cb4564f7987e49a21d807df93223f2b16a23 (diff)
downloadtangerine-wallet-browser-2f79781ab9fbdde018fc921da9be0b3411ed8cad.tar
tangerine-wallet-browser-2f79781ab9fbdde018fc921da9be0b3411ed8cad.tar.gz
tangerine-wallet-browser-2f79781ab9fbdde018fc921da9be0b3411ed8cad.tar.bz2
tangerine-wallet-browser-2f79781ab9fbdde018fc921da9be0b3411ed8cad.tar.lz
tangerine-wallet-browser-2f79781ab9fbdde018fc921da9be0b3411ed8cad.tar.xz
tangerine-wallet-browser-2f79781ab9fbdde018fc921da9be0b3411ed8cad.tar.zst
tangerine-wallet-browser-2f79781ab9fbdde018fc921da9be0b3411ed8cad.zip
metamask controller - adopt clearSeedWords from keyring controller
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/keyring-controller.js11
-rw-r--r--app/scripts/metamask-controller.js13
2 files changed, 9 insertions, 15 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index 0a1965782..61840af4c 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -154,17 +154,6 @@ module.exports = class KeyringController extends EventEmitter {
.then(this.fullUpdate.bind(this))
}
- // ClearSeedWordCache
- //
- // returns Promise( @string currentSelectedAccount )
- //
- // Removes the current vault's seed words from the UI's state tree,
- // ensuring they are only ever available in the background process.
- clearSeedWordCache () {
- this.configManager.setSeedWords(null)
- return Promise.resolve(this.configManager.getSelectedAccount())
- }
-
// Set Locked
// returns Promise( @object state )
//
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 3e6ce0a2e..83dc2a9b9 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -146,7 +146,14 @@ module.exports = class MetamaskController extends EventEmitter {
promiseToCallback(this.keyringController.fullUpdate())(cb)
})
},
- clearSeedWordCache: nodeify(keyringController.clearSeedWordCache).bind(keyringController),
+ // ClearSeedWordCache
+ //
+ // Removes the primary account's seed words from the UI's state tree,
+ // ensuring they are only ever available in the background process.
+ clearSeedWordCache: (cb) => {
+ this.configManager.setSeedWords(null)
+ cb(null, this.configManager.getSelectedAccount())
+ },
setLocked: nodeify(keyringController.setLocked).bind(keyringController),
submitPassword: (password, cb) => {
this.migrateOldVaultIfAny(password)
@@ -321,9 +328,7 @@ module.exports = class MetamaskController extends EventEmitter {
setupPublicConfig (outStream) {
pipe(
this.publicConfigStore,
- outStream,
- // cleanup on disconnect
- () => this.publicConfigStore.unpipe(outStream)
+ outStream
)
}