aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-10-29 03:10:35 +0800
committerDan Finlay <dan@danfinlay.com>2016-10-29 03:10:35 +0800
commit6ec471c6dcc52a9d2b599b849fa5017f3056fd43 (patch)
treefba209ff6234299ba31c08a2d7cead3b29f1eae1 /ui/app/actions.js
parent2690d1acfd3042f468cb2cd7ccc2dccd63c20cc9 (diff)
downloadtangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.gz
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.bz2
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.lz
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.xz
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.zst
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.zip
Configure BIP44 Keychain as default one
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js17
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,