aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-02 02:51:51 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-02 02:51:51 +0800
commit498b30bddcfa16f587a9f62b74a5d9fceb04cb07 (patch)
treeaef4b7be1a4238c09360b593fe6e5fa5fa22cf38
parentdb356a181a3fde4ad528c699f6da517053171866 (diff)
downloadtangerine-wallet-browser-498b30bddcfa16f587a9f62b74a5d9fceb04cb07.tar
tangerine-wallet-browser-498b30bddcfa16f587a9f62b74a5d9fceb04cb07.tar.gz
tangerine-wallet-browser-498b30bddcfa16f587a9f62b74a5d9fceb04cb07.tar.bz2
tangerine-wallet-browser-498b30bddcfa16f587a9f62b74a5d9fceb04cb07.tar.lz
tangerine-wallet-browser-498b30bddcfa16f587a9f62b74a5d9fceb04cb07.tar.xz
tangerine-wallet-browser-498b30bddcfa16f587a9f62b74a5d9fceb04cb07.tar.zst
tangerine-wallet-browser-498b30bddcfa16f587a9f62b74a5d9fceb04cb07.zip
Fix seed phrase restore
-rw-r--r--app/scripts/keyring-controller.js2
-rw-r--r--ui/app/actions.js1
-rw-r--r--ui/app/keychains/hd/restore-vault.js6
3 files changed, 4 insertions, 5 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index f6e71b005..2681b3d48 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.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)
})
}
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 458145380..0586e07a3 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -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))
})
}
diff --git a/ui/app/keychains/hd/restore-vault.js b/ui/app/keychains/hd/restore-vault.js
index 15690a159..3fa25a2eb 100644
--- a/ui/app/keychains/hd/restore-vault.js
+++ b/ui/app/keychains/hd/restore-vault.js
@@ -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()
}
}