diff options
Configure BIP44 Keychain as default one
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 1f8ba7f04..3ae3a623d 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -25,7 +25,8 @@ var actions = { showInitializeMenu: showInitializeMenu, createNewVault: createNewVault, createNewVaultInProgress: createNewVaultInProgress, - addNewKeyring: addNewKeyring, + addNewKeyring, + addNewAccount, showNewVaultSeed: showNewVaultSeed, showInfoPage: showInfoPage, // unlock screen @@ -178,6 +179,7 @@ function createNewVault (password, entropy) { if (err) { return dispatch(actions.showWarning(err.message)) } + dispatch(this.updateMetamaskState(newState)) dispatch(this.showAccountsPage()) dispatch(this.hideLoadingIndication()) @@ -199,6 +201,19 @@ function addNewKeyring (type, opts) { } } +function addNewAccount (ringNumber = 0) { + return (dispatch) => { + dispatch(actions.showLoadingIndication()) + background.addNewAccount(ringNumber, (err, newState) => { + dispatch(this.hideLoadingIndication()) + if (err) { + return dispatch(actions.showWarning(err)) + } + dispatch(this.updateMetamaskState(newState)) + }) + } +} + function showInfoPage () { return { type: actions.SHOW_INFO_PAGE, |