aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-11-02 13:19:04 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-11-02 13:19:04 +0800
commit8f3db0dbc0bafdc604bd7359bd41370f594c792c (patch)
tree6f9ce947f83a7c6dddf5803c39e69be044c11273 /ui/app/actions.js
parentf2bfdd7f8ca4d79b3143f39a7bec3b585d9c74b7 (diff)
downloadtangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar
tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.gz
tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.bz2
tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.lz
tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.xz
tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.tar.zst
tangerine-wallet-browser-8f3db0dbc0bafdc604bd7359bd41370f594c792c.zip
Add reveal of seed words.
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 8218e05ef..070ba2da0 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -30,6 +30,10 @@ var actions = {
addNewAccount,
showNewVaultSeed: showNewVaultSeed,
showInfoPage: showInfoPage,
+ // seed recovery actions
+ REVEAL_SEED_CONFIRMATION: 'REVEAL_SEED_CONFIRMATION',
+ revealSeedConfirmation: revealSeedConfirmation,
+ requestRevealSeed: requestRevealSeed,
// unlock screen
UNLOCK_IN_PROGRESS: 'UNLOCK_IN_PROGRESS',
UNLOCK_FAILED: 'UNLOCK_FAILED',
@@ -213,6 +217,25 @@ function createNewVaultAndKeychain (password, entropy) {
}
}
+function revealSeedConfirmation () {
+ return {
+ type: this.REVEAL_SEED_CONFIRMATION,
+ }
+}
+
+function requestRevealSeed (password) {
+ return (dispatch) => {
+ dispatch(actions.showLoadingIndication())
+ background.submitPassword(password, (err, newState) => {
+ dispatch(actions.hideLoadingIndication())
+ if (err) return dispatch(actions.displayWarning(err.message))
+ background.placeSeedWords()
+ dispatch(actions.showNewVaultSeed())
+ })
+ }
+}
+
+
function addNewKeyring (type, opts) {
return (dispatch) => {
dispatch(actions.showLoadingIndication())