aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index bf3617310..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 () {
@@ -286,8 +300,8 @@ function navigateToNewAccountScreen() {
}
}
-function addNewAccount (ringNumber = 0) {
- return callBackgroundThenUpdate(background.addNewAccount, ringNumber)
+function addNewAccount () {
+ return callBackgroundThenUpdate(background.addNewAccount)
}
function showInfoPage () {