aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-01-30 10:44:43 +0800
committerAlexander Tseung <alextsg@users.noreply.github.com>2018-01-30 10:44:43 +0800
commit100642c0eacb5a54f35b7f4cb756a79fe1f354f0 (patch)
treede8643c38550163292bfb10068ecfcacb5305bbb
parentb63f0f3de2fe646bebd5bf20e8f009153129e740 (diff)
downloadtangerine-wallet-browser-100642c0eacb5a54f35b7f4cb756a79fe1f354f0.tar.gz
tangerine-wallet-browser-100642c0eacb5a54f35b7f4cb756a79fe1f354f0.tar.zst
tangerine-wallet-browser-100642c0eacb5a54f35b7f4cb756a79fe1f354f0.zip
Fix bug stemming from erroneously persistant unlock failure error message. (#3123)
-rw-r--r--ui/app/actions.js10
-rw-r--r--ui/app/reducers/app.js5
2 files changed, 15 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 25cb2c23f..c52b3cf93 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,
@@ -284,6 +286,7 @@ function tryUnlockMetamask (password) {
if (err) {
dispatch(actions.unlockFailed(err.message))
} else {
+ dispatch(actions.unlockSucceeded())
dispatch(actions.transitionForward())
forceUpdateMetamaskState(dispatch)
}
@@ -890,6 +893,13 @@ function unlockFailed (message) {
}
}
+function unlockSucceeded (message) {
+ return {
+ type: actions.UNLOCK_SUCCEEDED,
+ value: message,
+ }
+}
+
function unlockMetamask (account) {
return {
type: actions.UNLOCK_METAMASK,
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index c3ade5cdc..6885d029a 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -484,6 +484,11 @@ function reduceApp (state, action) {
warning: action.value || 'Incorrect password. Try again.',
})
+ case actions.UNLOCK_SUCCEEDED:
+ return extend(appState, {
+ warning: '',
+ })
+
case actions.SHOW_LOADING:
return extend(appState, {
isLoading: true,