diff options
Diffstat (limited to 'ui/app/reducers/metamask.js')
-rw-r--r-- | ui/app/reducers/metamask.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index aa809b333..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,12 +27,23 @@ 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) case actions.AGREE_TO_DISCLAIMER: return extend(metamaskState, { - isConfirmed: true, + isDisclaimerConfirmed: true, }) case actions.UNLOCK_METAMASK: @@ -98,7 +111,6 @@ function reduceMetamask (state, action) { isUnlocked: true, isInitialized: true, selectedAccount: action.value, - selectedAddress: action.value, }) delete newState.seedWords return newState |