diff options
Began adding first basic keyring
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 230ffee78..e49cac4b4 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -25,6 +25,7 @@ var actions = { showInitializeMenu: showInitializeMenu, createNewVault: createNewVault, createNewVaultInProgress: createNewVaultInProgress, + addNewKeyring: addNewKeyring, showNewVaultSeed: showNewVaultSeed, showInfoPage: showInfoPage, // unlock screen @@ -136,6 +137,7 @@ var actions = { SHOW_NEW_KEYCHAIN: 'SHOW_NEW_KEYCHAIN', showNewKeychain: showNewKeychain, + } module.exports = actions @@ -187,6 +189,20 @@ function createNewVault (password, entropy) { } } +function addNewKeyring (type, opts) { + return (dispatch) => { + dispatch(actions.showLoadingIndication()) + background.addNewKeyring(type, opts, (err, newState) => { + dispatch(this.hideLoadingIndication()) + if (err) { + return dispatch(actions.showWarning(err.message)) + } + dispatch(this.updateMetamaskState(newState)) + dispatch(this.showAccountsPage()) + }) + } +} + function showInfoPage () { return { type: actions.SHOW_INFO_PAGE, |