diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-11-02 13:19:04 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-11-02 13:19:04 +0800 |
commit | 8f3db0dbc0bafdc604bd7359bd41370f594c792c (patch) | |
tree | 6f9ce947f83a7c6dddf5803c39e69be044c11273 /app | |
parent | f2bfdd7f8ca4d79b3143f39a7bec3b585d9c74b7 (diff) | |
download | tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.gz tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.bz2 tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.lz tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.xz tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.zst tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.zip |
Add reveal of seed words.
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/keyring-controller.js | 10 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index b93d4a156..e6a7d95b2 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -132,8 +132,6 @@ module.exports = class KeyringController extends EventEmitter { .then((encryptedString) => { this.configManager.setVault(encryptedString) cb(null, serialized) - // NORMAL BEHAVIOR: - // return cb(null, this.getState()) }) .catch((err) => { cb(err) @@ -157,6 +155,14 @@ module.exports = class KeyringController extends EventEmitter { } } + placeSeedWords () { + const firstKeyring = this.keyrings[0] + const seedWords = firstKeyring.serialize().mnemonic + this.configManager.setSeedWords(seedWords) + } + + + submitPassword(password, cb) { this.loadKey(password) .then((key) => { diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 6dffefe98..a165a2e2a 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -59,6 +59,7 @@ module.exports = class MetamaskController { setGasMultiplier: this.setGasMultiplier.bind(this), // forward directly to keyringController + placeSeedWords: keyringController.placeSeedWords.bind(keyringController), createNewVaultAndKeychain: keyringController.createNewVaultAndKeychain.bind(keyringController), createNewVaultAndRestore: keyringController.createNewVaultAndRestore.bind(keyringController), clearSeedWordCache: keyringController.clearSeedWordCache.bind(keyringController), |