From 3a25733fa66ece1c3f2bc91e60a1f7b82567da25 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 15 Sep 2022 12:51:01 -0230 Subject: [PATCH] Add notification about the merge (#15846) --- app/_locales/en/messages.json | 7 +++++++ shared/notifications/index.js | 16 +++++++++++++++- test/e2e/fixtures/address-entry/state.json | 3 +++ test/e2e/fixtures/connected-state/state.json | 3 +++ test/e2e/fixtures/custom-rpc/state.json | 3 +++ test/e2e/fixtures/custom-token/state.json | 3 +++ test/e2e/fixtures/eip-1559-v2-dapp/state.json | 3 +++ test/e2e/fixtures/eip-1559-v2/state.json | 3 +++ test/e2e/fixtures/import-ui/state.json | 3 +++ test/e2e/fixtures/imported-account/state.json | 3 +++ test/e2e/fixtures/localization/state.json | 3 +++ test/e2e/fixtures/metrics-enabled/state.json | 3 +++ .../fixtures/navigate-transactions/state.json | 3 +++ test/e2e/fixtures/onboarding/state.json | 3 +++ test/e2e/fixtures/send-edit-v2/state.json | 3 +++ test/e2e/fixtures/send-edit/state.json | 3 +++ test/e2e/fixtures/special-settings/state.json | 3 +++ test/e2e/fixtures/threebox-enabled/state.json | 3 +++ ui/selectors/selectors.js | 1 + 19 files changed, 71 insertions(+), 1 deletion(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index b031cded5..43f1f7b34 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2360,6 +2360,13 @@ "notifications14Title": { "message": "3Box Deprecation" }, + "notifications15Description": { + "message": "There's no action required from you, so keep using your wallet as usual. Be aware of potential scams around the Merge.", + "description": "Description of a notification in the 'See What's New' popup. Advises users about the ethereum merge (https://ethereum.org/en/upgrades/merge/#main-content) and potential scams." + }, + "notifications15Title": { + "message": "The Ethereum Merge is here!" + }, "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 4d4325e1d..9a3cb0351 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -72,7 +72,11 @@ export const UI_NOTIFICATIONS = { }, 14: { id: 14, - date: null, + date: '2022-09-15', + }, + 15: { + id: 15, + date: '2022-09-15', }, }; @@ -210,5 +214,15 @@ export const getTranslatedUINotifications = (t, locale) => { ) : '', }, + 15: { + ...UI_NOTIFICATIONS[15], + title: t('notifications15Title'), + description: t('notifications15Description'), + date: UI_NOTIFICATIONS[15].date + ? new Intl.DateTimeFormat(formattedLocale).format( + new Date(UI_NOTIFICATIONS[15].date), + ) + : '', + }, }; }; diff --git a/test/e2e/fixtures/address-entry/state.json b/test/e2e/fixtures/address-entry/state.json index 45166bb83..5fbf10276 100644 --- a/test/e2e/fixtures/address-entry/state.json +++ b/test/e2e/fixtures/address-entry/state.json @@ -83,6 +83,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/connected-state/state.json b/test/e2e/fixtures/connected-state/state.json index 44a2648a5..28a206071 100644 --- a/test/e2e/fixtures/connected-state/state.json +++ b/test/e2e/fixtures/connected-state/state.json @@ -73,6 +73,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/custom-rpc/state.json b/test/e2e/fixtures/custom-rpc/state.json index af15763a4..8088a1799 100644 --- a/test/e2e/fixtures/custom-rpc/state.json +++ b/test/e2e/fixtures/custom-rpc/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/custom-token/state.json b/test/e2e/fixtures/custom-token/state.json index 6705b8016..5f447420b 100644 --- a/test/e2e/fixtures/custom-token/state.json +++ b/test/e2e/fixtures/custom-token/state.json @@ -86,6 +86,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/eip-1559-v2-dapp/state.json b/test/e2e/fixtures/eip-1559-v2-dapp/state.json index 1e3a6fe70..1b01bc077 100644 --- a/test/e2e/fixtures/eip-1559-v2-dapp/state.json +++ b/test/e2e/fixtures/eip-1559-v2-dapp/state.json @@ -70,6 +70,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/eip-1559-v2/state.json b/test/e2e/fixtures/eip-1559-v2/state.json index e355ecb34..0341d4ecb 100644 --- a/test/e2e/fixtures/eip-1559-v2/state.json +++ b/test/e2e/fixtures/eip-1559-v2/state.json @@ -70,6 +70,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/import-ui/state.json b/test/e2e/fixtures/import-ui/state.json index 6c9b44b14..9de1f31ff 100644 --- a/test/e2e/fixtures/import-ui/state.json +++ b/test/e2e/fixtures/import-ui/state.json @@ -122,6 +122,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/imported-account/state.json b/test/e2e/fixtures/imported-account/state.json index 2f9af570d..d89d6e2cf 100644 --- a/test/e2e/fixtures/imported-account/state.json +++ b/test/e2e/fixtures/imported-account/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/localization/state.json b/test/e2e/fixtures/localization/state.json index 84828b9e3..d5ba38d28 100644 --- a/test/e2e/fixtures/localization/state.json +++ b/test/e2e/fixtures/localization/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/metrics-enabled/state.json b/test/e2e/fixtures/metrics-enabled/state.json index 219cba208..683f6cda6 100644 --- a/test/e2e/fixtures/metrics-enabled/state.json +++ b/test/e2e/fixtures/metrics-enabled/state.json @@ -73,6 +73,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/navigate-transactions/state.json b/test/e2e/fixtures/navigate-transactions/state.json index 2542cf500..8d4734d54 100644 --- a/test/e2e/fixtures/navigate-transactions/state.json +++ b/test/e2e/fixtures/navigate-transactions/state.json @@ -69,6 +69,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/onboarding/state.json b/test/e2e/fixtures/onboarding/state.json index 32d270bd3..9bd17bc72 100644 --- a/test/e2e/fixtures/onboarding/state.json +++ b/test/e2e/fixtures/onboarding/state.json @@ -42,6 +42,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/send-edit-v2/state.json b/test/e2e/fixtures/send-edit-v2/state.json index 83394fab2..b414cf8d3 100644 --- a/test/e2e/fixtures/send-edit-v2/state.json +++ b/test/e2e/fixtures/send-edit-v2/state.json @@ -70,6 +70,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/send-edit/state.json b/test/e2e/fixtures/send-edit/state.json index 5f06fe431..30eee4e90 100644 --- a/test/e2e/fixtures/send-edit/state.json +++ b/test/e2e/fixtures/send-edit/state.json @@ -70,6 +70,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/special-settings/state.json b/test/e2e/fixtures/special-settings/state.json index c3c91d86d..57a4cd2c9 100644 --- a/test/e2e/fixtures/special-settings/state.json +++ b/test/e2e/fixtures/special-settings/state.json @@ -63,6 +63,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/test/e2e/fixtures/threebox-enabled/state.json b/test/e2e/fixtures/threebox-enabled/state.json index 46c0d69d6..e7b7d10a4 100644 --- a/test/e2e/fixtures/threebox-enabled/state.json +++ b/test/e2e/fixtures/threebox-enabled/state.json @@ -79,6 +79,9 @@ }, "14": { "isShown": true + }, + "15": { + "isShown": true } } }, diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 552c323c5..3febc928b 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -829,6 +829,7 @@ function getAllowedAnnouncementIds(state) { 12: false, 13: true, 14: threeBoxSyncingAllowed, + 15: true, }; }