|
|
@ -59,6 +59,7 @@ IdentityStore.prototype.createNewVault = function (password, entropy, cb) { |
|
|
|
this.configManager.setShowSeedWords(true) |
|
|
|
this.configManager.setShowSeedWords(true) |
|
|
|
var seedWords = this._idmgmt.getSeed() |
|
|
|
var seedWords = this._idmgmt.getSeed() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cb(null, seedWords) |
|
|
|
cb(null, seedWords) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
@ -124,7 +125,7 @@ IdentityStore.prototype.getSelectedAddress = function () { |
|
|
|
return configManager.getSelectedAccount() |
|
|
|
return configManager.getSelectedAccount() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IdentityStore.prototype.setSelectedAddress = function (address, cb) { |
|
|
|
IdentityStore.prototype.setSelectedAddressSync = function (address) { |
|
|
|
const configManager = this.configManager |
|
|
|
const configManager = this.configManager |
|
|
|
if (!address) { |
|
|
|
if (!address) { |
|
|
|
var addresses = this._getAddresses() |
|
|
|
var addresses = this._getAddresses() |
|
|
@ -132,7 +133,12 @@ IdentityStore.prototype.setSelectedAddress = function (address, cb) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
configManager.setSelectedAccount(address) |
|
|
|
configManager.setSelectedAccount(address) |
|
|
|
if (cb) return cb(null, address) |
|
|
|
return address |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IdentityStore.prototype.setSelectedAddress = function (address, cb) { |
|
|
|
|
|
|
|
const resultAddress = this.setSelectedAddressSync(address) |
|
|
|
|
|
|
|
if (cb) return cb(null, resultAddress) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IdentityStore.prototype.revealAccount = function (cb) { |
|
|
|
IdentityStore.prototype.revealAccount = function (cb) { |
|
|
@ -477,6 +483,8 @@ IdentityStore.prototype._createIdmgmt = function (password, seedPhrase, entropy, |
|
|
|
configManager: this.configManager, |
|
|
|
configManager: this.configManager, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setSelectedAddressSync() |
|
|
|
|
|
|
|
|
|
|
|
cb() |
|
|
|
cb() |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|