aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-10-21 07:44:31 +0800
committerDan Finlay <dan@danfinlay.com>2016-10-21 07:45:58 +0800
commit55d56f77cf42a9c4e80768fd7e4a9bb6f0485606 (patch)
tree188e95248f865459b5a816ea51f889145f43d92b /ui/app/actions.js
parent351c8e2086e043ee66e42f653dcb2b446dd88808 (diff)
downloadtangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar
tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.gz
tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.bz2
tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.lz
tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.xz
tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.zst
tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.zip
Began adding first basic keyring
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js16
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,