mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Fix bug stemming from erroneously persistant unlock failure error message. (#3123)
This commit is contained in:
parent
b63f0f3de2
commit
100642c0ea
@ -55,6 +55,7 @@ var actions = {
|
|||||||
SET_NEW_ACCOUNT_FORM: 'SET_NEW_ACCOUNT_FORM',
|
SET_NEW_ACCOUNT_FORM: 'SET_NEW_ACCOUNT_FORM',
|
||||||
unlockMetamask: unlockMetamask,
|
unlockMetamask: unlockMetamask,
|
||||||
unlockFailed: unlockFailed,
|
unlockFailed: unlockFailed,
|
||||||
|
unlockSucceeded,
|
||||||
showCreateVault: showCreateVault,
|
showCreateVault: showCreateVault,
|
||||||
showRestoreVault: showRestoreVault,
|
showRestoreVault: showRestoreVault,
|
||||||
showInitializeMenu: showInitializeMenu,
|
showInitializeMenu: showInitializeMenu,
|
||||||
@ -78,6 +79,7 @@ var actions = {
|
|||||||
// unlock screen
|
// unlock screen
|
||||||
UNLOCK_IN_PROGRESS: 'UNLOCK_IN_PROGRESS',
|
UNLOCK_IN_PROGRESS: 'UNLOCK_IN_PROGRESS',
|
||||||
UNLOCK_FAILED: 'UNLOCK_FAILED',
|
UNLOCK_FAILED: 'UNLOCK_FAILED',
|
||||||
|
UNLOCK_SUCCEEDED: 'UNLOCK_SUCCEEDED',
|
||||||
UNLOCK_METAMASK: 'UNLOCK_METAMASK',
|
UNLOCK_METAMASK: 'UNLOCK_METAMASK',
|
||||||
LOCK_METAMASK: 'LOCK_METAMASK',
|
LOCK_METAMASK: 'LOCK_METAMASK',
|
||||||
tryUnlockMetamask: tryUnlockMetamask,
|
tryUnlockMetamask: tryUnlockMetamask,
|
||||||
@ -284,6 +286,7 @@ function tryUnlockMetamask (password) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
dispatch(actions.unlockFailed(err.message))
|
dispatch(actions.unlockFailed(err.message))
|
||||||
} else {
|
} else {
|
||||||
|
dispatch(actions.unlockSucceeded())
|
||||||
dispatch(actions.transitionForward())
|
dispatch(actions.transitionForward())
|
||||||
forceUpdateMetamaskState(dispatch)
|
forceUpdateMetamaskState(dispatch)
|
||||||
}
|
}
|
||||||
@ -890,6 +893,13 @@ function unlockFailed (message) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unlockSucceeded (message) {
|
||||||
|
return {
|
||||||
|
type: actions.UNLOCK_SUCCEEDED,
|
||||||
|
value: message,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function unlockMetamask (account) {
|
function unlockMetamask (account) {
|
||||||
return {
|
return {
|
||||||
type: actions.UNLOCK_METAMASK,
|
type: actions.UNLOCK_METAMASK,
|
||||||
|
@ -484,6 +484,11 @@ function reduceApp (state, action) {
|
|||||||
warning: action.value || 'Incorrect password. Try again.',
|
warning: action.value || 'Incorrect password. Try again.',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
case actions.UNLOCK_SUCCEEDED:
|
||||||
|
return extend(appState, {
|
||||||
|
warning: '',
|
||||||
|
})
|
||||||
|
|
||||||
case actions.SHOW_LOADING:
|
case actions.SHOW_LOADING:
|
||||||
return extend(appState, {
|
return extend(appState, {
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user