diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 10d686e23..9046108c0 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -117,7 +117,6 @@ module.exports = class KeyringController extends EventEmitter { migrateAndGetKey (password) { let key const shouldMigrate = !!this.configManager.getWallet() && !this.configManager.getVault() - return this.loadKey(password) .then((derivedKey) => { key = derivedKey @@ -128,6 +127,7 @@ module.exports = class KeyringController extends EventEmitter { if (serialized && shouldMigrate) { const keyring = this.restoreKeyring(serialized) this.keyrings.push(keyring) + this.persistAllKeyrings() this.configManager.setSelectedAccount(keyring.getAccounts()[0]) } return key diff --git a/app/scripts/lib/idStore-migrator.js b/app/scripts/lib/idStore-migrator.js index 818364720..18134b677 100644 --- a/app/scripts/lib/idStore-migrator.js +++ b/app/scripts/lib/idStore-migrator.js @@ -37,11 +37,11 @@ module.exports = class IdentityStoreMigrator { serializeVault () { const mnemonic = this.idStore._idmgmt.getSeed() - const n = this.idStore._getAddresses().length + const numberOfAccounts = this.idStore._getAddresses().length return { type: 'HD Key Tree', - data: { mnemonic, n }, + data: { mnemonic, numberOfAccounts }, } }