From a46ec83c9b258a3aed65e1ef08769300c01ca13b Mon Sep 17 00:00:00 2001 From: Thomas Huang Date: Mon, 1 Apr 2019 20:03:54 -0500 Subject: Remove NoticeController (#6382) --- ui/app/store/actions.js | 57 ------------------------------------------------- 1 file changed, 57 deletions(-) (limited to 'ui/app/store') diff --git a/ui/app/store/actions.js b/ui/app/store/actions.js index e5825b5f6..7d369fdb9 100644 --- a/ui/app/store/actions.js +++ b/ui/app/store/actions.js @@ -51,13 +51,6 @@ var actions = { // remote state UPDATE_METAMASK_STATE: 'UPDATE_METAMASK_STATE', updateMetamaskState: updateMetamaskState, - // notices - MARK_NOTICE_READ: 'MARK_NOTICE_READ', - markNoticeRead: markNoticeRead, - SHOW_NOTICE: 'SHOW_NOTICE', - showNotice: showNotice, - CLEAR_NOTICES: 'CLEAR_NOTICES', - clearNotices: clearNotices, markAccountsFound, // intialize screen CREATE_NEW_VAULT_IN_PROGRESS: 'CREATE_NEW_VAULT_IN_PROGRESS', @@ -1857,47 +1850,6 @@ function goBackToInitView () { } } -// -// notice -// - -function markNoticeRead (notice) { - return (dispatch) => { - dispatch(actions.showLoadingIndication()) - log.debug(`background.markNoticeRead`) - return new Promise((resolve, reject) => { - background.markNoticeRead(notice, (err, notice) => { - dispatch(actions.hideLoadingIndication()) - if (err) { - dispatch(actions.displayWarning(err.message)) - return reject(err) - } - - if (notice) { - dispatch(actions.showNotice(notice)) - resolve(true) - } else { - dispatch(actions.clearNotices()) - resolve(false) - } - }) - }) - } -} - -function showNotice (notice) { - return { - type: actions.SHOW_NOTICE, - value: notice, - } -} - -function clearNotices () { - return { - type: actions.CLEAR_NOTICES, - } -} - function markAccountsFound () { log.debug(`background.markAccountsFound`) return callBackgroundThenUpdate(background.markAccountsFound) @@ -2491,15 +2443,6 @@ function setCompletedOnboarding () { return async dispatch => { dispatch(actions.showLoadingIndication()) - try { - await pify(background.markAllNoticesRead).call(background) - } catch (err) { - dispatch(actions.displayWarning(err.message)) - throw err - } - - dispatch(actions.clearNotices()) - try { await pify(background.completeOnboarding).call(background) } catch (err) { -- cgit