Fix seed phrase restore

feature/default_network_editable
Dan Finlay 8 years ago
parent db356a181a
commit 498b30bddc
  1. 2
      app/scripts/keyring-controller.js
  2. 1
      ui/app/actions.js
  3. 6
      ui/app/keychains/hd/restore-vault.js

@ -82,7 +82,7 @@ module.exports = class KeyringController extends EventEmitter {
if (err) return cb(err)
this.addNewKeyring('HD Key Tree', {
mnemonic: seed,
n: 0,
n: 1,
}, cb)
})
}

@ -195,7 +195,6 @@ function createNewVaultAndRestore (password, seed) {
background.createNewVaultAndRestore(password, seed, (err, newState) => {
dispatch(actions.hideLoadingIndication())
if (err) return dispatch(actions.displayWarning(err.message))
dispatch(this.updateMetamaskState(newState))
})
}

@ -66,7 +66,7 @@ RestoreVaultScreen.prototype.render = function () {
type: 'password',
id: 'password-box-confirm',
placeholder: 'Confirm Password',
onKeyPress: this.onMaybeCreate.bind(this),
onKeyPress: this.createOnEnter.bind(this),
dataset: {
persistentFormId: 'password-confirmation',
},
@ -110,9 +110,9 @@ RestoreVaultScreen.prototype.showInitializeMenu = function () {
this.props.dispatch(actions.showInitializeMenu())
}
RestoreVaultScreen.prototype.onMaybeCreate = function (event) {
RestoreVaultScreen.prototype.createOnEnter = function (event) {
if (event.key === 'Enter') {
this.restoreVault()
this.createNewVaultAndRestore()
}
}

Loading…
Cancel
Save