diff options
author | Frankie <frankie.diamond@gmail.com> | 2017-01-25 07:44:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-25 07:44:02 +0800 |
commit | 4f39e8192cd94ad45d68992d5d1129f1612b1aa6 (patch) | |
tree | b87831b7cf4acb06a0bca115b12e8be64210f455 /ui | |
parent | 23c2b0b9a5d3f222bfeba7bcff5cf5a57367ffc8 (diff) | |
parent | 70b8e640f0170281b92ac610e063351a74d5333d (diff) | |
download | tangerine-wallet-browser-4f39e8192cd94ad45d68992d5d1129f1612b1aa6.tar tangerine-wallet-browser-4f39e8192cd94ad45d68992d5d1129f1612b1aa6.tar.gz tangerine-wallet-browser-4f39e8192cd94ad45d68992d5d1129f1612b1aa6.tar.bz2 tangerine-wallet-browser-4f39e8192cd94ad45d68992d5d1129f1612b1aa6.tar.lz tangerine-wallet-browser-4f39e8192cd94ad45d68992d5d1129f1612b1aa6.tar.xz tangerine-wallet-browser-4f39e8192cd94ad45d68992d5d1129f1612b1aa6.tar.zst tangerine-wallet-browser-4f39e8192cd94ad45d68992d5d1129f1612b1aa6.zip |
Merge pull request #1054 from MetaMask/i#1048
Background - Extracts primary account code from keyring controller
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index e722e2c7f..78af80886 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -231,7 +231,21 @@ function createNewVaultAndRestore (password, seed) { } function createNewVaultAndKeychain (password) { - return callBackgroundThenUpdate(background.createNewVaultAndKeychain, password) + return (dispatch) => { + dispatch(actions.showLoadingIndication()) + background.createNewVaultAndKeychain(password, (err, newState) => { + if (err) { + return dispatch(actions.displayWarning(err.message)) + } + background.placeSeedWords((err, newState) => { + if (err) { + return dispatch(actions.displayWarning(err.message)) + } + dispatch(actions.hideLoadingIndication()) + dispatch(actions.updateMetamaskState(newState)) + }) + }) + } } function revealSeedConfirmation () { |