diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-02-01 10:24:20 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-02-01 10:24:20 +0800 |
commit | 4f1fe1da6295902e3e0fee633444f84f61f28449 (patch) | |
tree | a8e35564ec7963c70cd61868323c202bdc7131dd /ui/app/actions.js | |
parent | 0c6fef3dec4f3ba70e8e86275ee9db4f2d58d129 (diff) | |
parent | 78bce55858916ba9d3189f76db440768e6ae95b1 (diff) | |
download | tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.gz tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.bz2 tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.lz tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.xz tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.tar.zst tangerine-wallet-browser-4f1fe1da6295902e3e0fee633444f84f61f28449.zip |
Fix merge conflicts from uat-next
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index da69b8195..e5b35daaa 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -55,6 +55,7 @@ var actions = { SET_NEW_ACCOUNT_FORM: 'SET_NEW_ACCOUNT_FORM', unlockMetamask: unlockMetamask, unlockFailed: unlockFailed, + unlockSucceeded, showCreateVault: showCreateVault, showRestoreVault: showRestoreVault, showInitializeMenu: showInitializeMenu, @@ -78,6 +79,7 @@ var actions = { // unlock screen UNLOCK_IN_PROGRESS: 'UNLOCK_IN_PROGRESS', UNLOCK_FAILED: 'UNLOCK_FAILED', + UNLOCK_SUCCEEDED: 'UNLOCK_SUCCEEDED', UNLOCK_METAMASK: 'UNLOCK_METAMASK', LOCK_METAMASK: 'LOCK_METAMASK', tryUnlockMetamask: tryUnlockMetamask, @@ -281,12 +283,14 @@ function tryUnlockMetamask (password) { log.debug(`background.submitPassword`) return new Promise((resolve, reject) => { - background.submitPassword(password, err => { + background.submitPassword(password, (err) => { dispatch(actions.hideLoadingIndication()) if (err) { + dispatch(actions.unlockFailed(err.message)) reject(err) } else { + dispatch(actions.unlockSucceeded()) dispatch(actions.transitionForward()) return forceUpdateMetamaskState(dispatch).then(resolve) } @@ -967,6 +971,13 @@ function unlockFailed (message) { } } +function unlockSucceeded (message) { + return { + type: actions.UNLOCK_SUCCEEDED, + value: message, + } +} + function unlockMetamask (account) { return { type: actions.UNLOCK_METAMASK, |