diff options
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/app.js | 18 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 13 |
2 files changed, 30 insertions, 1 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js index 67a926948..65a3dba49 100644 --- a/ui/app/reducers/app.js +++ b/ui/app/reducers/app.js @@ -72,6 +72,16 @@ function reduceApp (state, action) { name: 'restoreVault', }, transForward: true, + forgottenPassword: true, + }) + + case actions.FORGOT_PASSWORD: + return extend(appState, { + currentView: { + name: 'restoreVault', + }, + transForward: false, + forgottenPassword: true, }) case actions.SHOW_INIT_MENU: @@ -169,7 +179,7 @@ function reduceApp (state, action) { return extend(appState, { warning: null, transForward: true, - forgottenPassword: !appState.forgottenPassword, + forgottenPassword: false, currentView: { name: 'UnlockScreen', }, @@ -248,6 +258,12 @@ function reduceApp (state, action) { forgottenPassword: false, }) + case actions.SHOW_NOTICE: + return extend(appState, { + transForward: true, + isLoading: false, + }) + case actions.REVEAL_ACCOUNT: return extend(appState, { scrollToBottom: true, diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 1a4514a21..8679ab062 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -16,6 +16,8 @@ function reduceMetamask (state, action) { currentFiat: 'USD', conversionRate: 0, conversionDate: 'N/A', + noActiveNotices: true, + lastUnreadNotice: undefined, }, state.metamask) switch (action.type) { @@ -25,6 +27,17 @@ function reduceMetamask (state, action) { delete newState.seedWords return newState + case actions.SHOW_NOTICE: + return extend(metamaskState, { + noActiveNotices: false, + lastUnreadNotice: action.value, + }) + + case actions.CLEAR_NOTICES: + return extend(metamaskState, { + noActiveNotices: true, + }) + case actions.UPDATE_METAMASK_STATE: return extend(metamaskState, action.value) |