metamask-controller - clear account labels on restore from seed phrase

feature/default_network_editable
kumavis 7 years ago
parent 54a9c62fd6
commit eb3241ccba
  1. 4
      app/scripts/metamask-controller.js

@ -458,7 +458,11 @@ module.exports = class MetamaskController extends EventEmitter {
async createNewVaultAndRestore (password, seed) {
const release = await this.createVaultMutex.acquire()
try {
// clear known identities
this.preferencesController.setAddresses([])
// create new vault
const vault = await this.keyringController.createNewVaultAndRestore(password, seed)
// set new identities
const accounts = await this.keyringController.getAccounts()
this.preferencesController.setAddresses(accounts)
this.selectFirstIdentity()

Loading…
Cancel
Save