mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Captured #640 in failing test
This commit is contained in:
parent
6d6130e2a6
commit
6763871c41
@ -464,6 +464,11 @@ IdentityStore.prototype._createIdmgmt = function (password, seedPhrase, entropy,
|
|||||||
keyStore.keyFromPassword(password, (err, derivedKey) => {
|
keyStore.keyFromPassword(password, (err, derivedKey) => {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
|
|
||||||
|
this._ethStore._currentState = {
|
||||||
|
accounts: {},
|
||||||
|
transactions: {},
|
||||||
|
}
|
||||||
|
|
||||||
keyStore.addHdDerivationPath(this.hdPathString, derivedKey, {curve: 'secp256k1', purpose: 'sign'})
|
keyStore.addHdDerivationPath(this.hdPathString, derivedKey, {curve: 'secp256k1', purpose: 'sign'})
|
||||||
|
|
||||||
this._createFirstWallet(derivedKey)
|
this._createFirstWallet(derivedKey)
|
||||||
|
@ -83,9 +83,20 @@ describe('IdentityStore', function() {
|
|||||||
assert.ifError(err)
|
assert.ifError(err)
|
||||||
|
|
||||||
let newKeystore = idStore._idmgmt.keyStore
|
let newKeystore = idStore._idmgmt.keyStore
|
||||||
|
|
||||||
assert.equal(accounts[0], firstAccount)
|
assert.equal(accounts[0], firstAccount)
|
||||||
|
|
||||||
|
accounts = []
|
||||||
|
const secondSeed = 'radar blur cabbage chef fix engine embark joy scheme fiction master release'
|
||||||
|
const secondAcct = '0xac39b311dceb2a4b2f5d8461c1cdaf756f4f7ae9'
|
||||||
|
|
||||||
|
idStore.recoverFromSeed(password, secondSeed, (err) => {
|
||||||
|
|
||||||
|
let accounts = idStore._getAddresses()
|
||||||
|
assert.equal(accounts[0], secondAcct)
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user