1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Remove unnecessary abstraction

This commit is contained in:
Dan Finlay 2016-03-31 10:24:39 -07:00
parent b81e2ccb7e
commit ea7b891729

View File

@ -221,7 +221,7 @@ IdentityStore.prototype._createIdmgmt = function(password, seed, entropy, cb){
// returning user, recovering from storage // returning user, recovering from storage
} else if (serializedKeystore) { } else if (serializedKeystore) {
keyStore = this.deserializeKeystore(serializedKeystore) keyStore = LightwalletKeyStore.deserialize(serializedKeystore)
var isCorrect = keyStore.isDerivedKeyCorrect(derivedKey) var isCorrect = keyStore.isDerivedKeyCorrect(derivedKey)
if (!isCorrect) return cb(new Error('Lightwallet - password incorrect')) if (!isCorrect) return cb(new Error('Lightwallet - password incorrect'))
@ -252,10 +252,6 @@ IdentityStore.prototype._restoreFromSeed = function(password, seed, derivedKey)
return keyStore return keyStore
} }
IdentityStore.prototype.deserializeKeystore = function(serializedKeystore) {
return LightwalletKeyStore.deserialize(serializedKeystore)
}
IdentityStore.prototype._createFirstWallet = function(entropy, derivedKey) { IdentityStore.prototype._createFirstWallet = function(entropy, derivedKey) {
var secretSeed = LightwalletKeyStore.generateRandomSeed(entropy) var secretSeed = LightwalletKeyStore.generateRandomSeed(entropy)
var keyStore = new LightwalletKeyStore(secretSeed, derivedKey, this.hdPathString) var keyStore = new LightwalletKeyStore(secretSeed, derivedKey, this.hdPathString)