1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Merge branch 'dev' into failing-tests

This commit is contained in:
Kevin Serrano 2016-11-18 15:40:25 -08:00
commit c695d54b01
No known key found for this signature in database
GPG Key ID: 7CC862A58D2889B4
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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 },
}
}