From 5678becb5cdba3fcb8dd5dd92612bec385b9c681 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 6 Dec 2022 07:16:10 -0330 Subject: [PATCH] Revert "Added "What's New" Notification for Improved token allowance experience (#16465)" This reverts commit f9ed4a560b20ec961dcfca56f42b179826b9f2e9. --- app/_locales/en/messages.json | 9 --------- shared/notifications/index.js | 15 --------------- test/e2e/fixture-builder.js | 11 +++-------- .../app/whats-new-popup/whats-new-popup.js | 4 ---- ui/selectors/selectors.js | 7 +++---- 5 files changed, 6 insertions(+), 40 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index b09bfe668..27d3f802a 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2395,15 +2395,6 @@ "notifications15Title": { "message": "The Ethereum Merge is here!" }, - "notifications16ActionText": { - "message": "Try it out here" - }, - "notifications16Description": { - "message": "We redesigned our token allowance confirmation to help you make more informed decisions." - }, - "notifications16Title": { - "message": "Improved token allowance experience" - }, "notifications1Description": { "message": "MetaMask Mobile users can now swap tokens inside their mobile wallet. Scan the QR code to get the mobile app and start swapping.", "description": "Description of a notification in the 'See What's New' popup. Describes the swapping on mobile feature." diff --git a/shared/notifications/index.js b/shared/notifications/index.js index 099350364..9a3cb0351 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -78,10 +78,6 @@ export const UI_NOTIFICATIONS = { id: 15, date: '2022-09-15', }, - 16: { - id: 16, - date: null, - }, }; export const getTranslatedUINotifications = (t, locale) => { @@ -228,16 +224,5 @@ export const getTranslatedUINotifications = (t, locale) => { ) : '', }, - 16: { - ...UI_NOTIFICATIONS[16], - title: t('notifications16Title'), - description: t('notifications16Description'), - actionText: t('notifications16ActionText'), - date: UI_NOTIFICATIONS[16].date - ? new Intl.DateTimeFormat(formattedLocale).format( - new Date(UI_NOTIFICATIONS[16].date), - ) - : '', - }, }; }; diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index bcc8628e5..0eca41d41 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -74,12 +74,12 @@ function defaultFixture() { src: 'images/token-detection.svg', width: '100%', }, - isShown: false, + isShown: true, }, 11: { date: '2022-09-15', id: 11, - isShown: false, + isShown: true, }, 12: { date: '2022-05-18', @@ -98,16 +98,11 @@ function defaultFixture() { 14: { date: '2022-09-15', id: 14, - isShown: false, + isShown: true, }, 15: { date: '2022-09-15', id: 15, - isShown: false, - }, - 16: { - date: null, - id: 16, isShown: true, }, }, diff --git a/ui/components/app/whats-new-popup/whats-new-popup.js b/ui/components/app/whats-new-popup/whats-new-popup.js index e11405a56..858805978 100644 --- a/ui/components/app/whats-new-popup/whats-new-popup.js +++ b/ui/components/app/whats-new-popup/whats-new-popup.js @@ -58,10 +58,6 @@ function getActionFunctionById(id, history) { updateViewedNotifications({ 14: true }); history.push(`${ADVANCED_ROUTE}#backup-userdata`); }, - 16: () => { - updateViewedNotifications({ 16: true }); - history.push(EXPERIMENTAL_ROUTE); - }, }; return actionFunctions[id]; diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 3aec78d03..3b8c7b549 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -956,13 +956,12 @@ function getAllowedAnnouncementIds(state) { 7: false, 8: supportsWebHid && currentKeyringIsLedger && currentlyUsingLedgerLive, 9: false, - 10: false, - 11: false, + 10: true, + 11: true, 12: false, 13: false, 14: false, - 15: false, - 16: true, + 15: true, }; }