diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 5 | ||||
-rw-r--r-- | ui/app/reducers/app.js | 2 | ||||
-rw-r--r-- | ui/app/unlock.js | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 0586e07a3..8218e05ef 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -161,7 +161,7 @@ function tryUnlockMetamask (password) { background.submitPassword(password, (err, newState) => { dispatch(actions.hideLoadingIndication()) if (err) { - dispatch(actions.unlockFailed()) + dispatch(actions.unlockFailed(err.message)) } else { dispatch(this.updateMetamaskState(newState)) let selectedAccount @@ -407,9 +407,10 @@ function unlockInProgress () { } } -function unlockFailed () { +function unlockFailed (message) { return { type: actions.UNLOCK_FAILED, + value: message, } } diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index d34cd1c2a..49507eb30 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -335,7 +335,7 @@ function reduceApp (state, action) { case actions.UNLOCK_FAILED: return extend(appState, { - warning: 'Incorrect password. Try again.', + warning: action.value || 'Incorrect password. Try again.', }) case actions.SHOW_LOADING: diff --git a/ui/app/unlock.js b/ui/app/unlock.js index 5c9a94f39..ec467f483 100644 --- a/ui/app/unlock.js +++ b/ui/app/unlock.js @@ -55,6 +55,8 @@ UnlockScreen.prototype.render = function () { h('.error', { style: { display: warning ? 'block' : 'none', + padding: '0 20px', + textAlign: 'center', }, }, warning), |