From 8819475a2ed2ee7c34e983ebb5ab12661be1a961 Mon Sep 17 00:00:00 2001 From: Kevin Serrano Date: Wed, 7 Dec 2016 14:34:15 -0800 Subject: Add ability to show notices to user & get confirmation. Implement generation of markdown for notice files. Create npm command. Enhance notice generation. Add test files to test multiple notices. Add basic markdown support to notices. Interval checks for updates. Add extensionizer and linker Add terms and conditions state file Add link support to disclaimer. Changelog addition. --- ui/app/reducers/metamask.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ui/app/reducers/metamask.js') diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 84953d734..9a1c5814d 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -17,6 +17,8 @@ function reduceMetamask (state, action) { currentFiat: 'USD', conversionRate: 0, conversionDate: 'N/A', + noActiveNotices: true, + lastUnreadNotice: undefined, }, state.metamask) switch (action.type) { @@ -26,6 +28,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) -- cgit