mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Fix seed phrase restore
This commit is contained in:
parent
db356a181a
commit
498b30bddc
@ -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…
Reference in New Issue
Block a user