diff options
Fix password validation and persistence issue
Was wiping the vault on each successful password attempt... :P
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r-- | app/scripts/keyring-controller.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index aa303c43c..81a05e133 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -131,9 +131,7 @@ module.exports = class KeyringController extends EventEmitter { this.keyrings.push(keyring) this.configManager.setSelectedAccount(keyring.getAccounts()[0]) } - return this.persistAllKeyrings().then(() => { - return key - }) + return key }) } @@ -144,6 +142,9 @@ module.exports = class KeyringController extends EventEmitter { return this.migrateAndGetKey(password) .then(() => { + return this.persistAllKeyrings() + }) + .then(() => { cb(null) }) .catch((err) => { @@ -173,7 +174,7 @@ module.exports = class KeyringController extends EventEmitter { }) } - placeSeedWords () { + placeSeedWords (cb) { const firstKeyring = this.keyrings[0] const seedWords = firstKeyring.serialize().mnemonic this.configManager.setSeedWords(seedWords) |