aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-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,