From ef5d171f544ec13db6d8310c54445b96ce543ca0 Mon Sep 17 00:00:00 2001 From: Olusegun Akintayo Date: Wed, 2 Aug 2023 16:14:02 +0100 Subject: [PATCH] Whats new blockaid popup (#20071) * deprecate opensea security alerts check Signedoff-by: Olusegun Akintayo set metrics to [] Signed-off-by: Olusegun Akintayo fix jest tests Signed-off-by: Olusegun Akintayo Remove sec provider spec Signed-off-by: Olusegun Akintayo lint fix Signed-off-by: Olusegun Akintayo What's new for blockaid...with placeholder texts Signed-off-by: Olusegun Akintayo i18n Signed-off-by: Olusegun Akintayo lint fixes Rebase to develop Add image to whatsnew blockaid. Signed-off-by: Olusegun Akintayo Fixed i18n Fixed snapshot for ui/pages/settings/experimental-tab/experimental-tab.test.js Signed-off-by: Olusegun Akintayo Fix i18n messages Signed-off-by: Olusegun Akintayo lint fixes Signed-off-by: Olusegun Akintayo Add unit tests Lint fixes use new image that works for both dark and light mode 22 is taken Signed-off-by: Olusegun Akintayo * comment out blockaid Signed-off-by: Olusegun Akintayo * rever change in builds.yml Signed-off-by: Olusegun Akintayo * reverted changes in test/e2e/tests/security-provider.spec.js * fix unit test Signed-off-by: Olusegun Akintayo --------- Signed-off-by: Olusegun Akintayo --- app/_locales/en/messages.json | 15 +++++++++ app/images/blockaid-security-provider.png | Bin 0 -> 13550 bytes shared/notifications/index.js | 29 +++++++++++++++++- test/e2e/fixture-builder.js | 7 +++++ .../app/whats-new-popup/whats-new-popup.js | 10 ++++++ .../whats-new-popup/whats-new-popup.test.js | 17 ++++++++++ ui/selectors/selectors.js | 3 ++ 7 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 app/images/blockaid-security-provider.png diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 2eb501c72..d26d5ec3a 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -2756,6 +2756,21 @@ "notifications22Title": { "message": "Looking for your account details or the block explorer URL?" }, + "notifications23ActionText": { + "message": "Enable security alerts" + }, + "notifications23DescriptionOne": { + "message": "Steer clear of known scams while still preserving your privacy with security alerts powered by Blockaid." + }, + "notifications23DescriptionThree": { + "message": "If you enabled security alerts from OpenSea, we've moved you over to this feature." + }, + "notifications23DescriptionTwo": { + "message": "Always do your own due diligence before approving requests." + }, + "notifications23Title": { + "message": "Stay safe with security alerts" + }, "notifications3ActionText": { "message": "Read more", "description": "The 'call to action' on the button, or link, of the 'Stay secure' notification. Upon clicking, users will be taken to a page about security on the metamask support website." diff --git a/app/images/blockaid-security-provider.png b/app/images/blockaid-security-provider.png new file mode 100644 index 0000000000000000000000000000000000000000..34f9ac1a476d5f5121b8158c8aa83257ba5349a6 GIT binary patch literal 13550 zcmb7LV{;`;)81Gcdt>7yC$^mpPi$;#+qP|OY#SSGY~S&TZR_3VC%j*#dTOSoW}4OA z*F=I8q>vGRAb$Jy4f&_ExbnAe5VZg3M0nVLqeBZ7+P81)EkDIYR6QUra*+}Umpre& zHU+MHt=*|EP8kD3SfpWjNGS+Jm~Ue}@#z}^1Cl$r@Dj6Chw;|bYNJ?s)jAHO|5hM! zl5cFNdaOGpc&;^s7>|iSu1k~tg2G6O+3M2%S+$v)>+XK!Q+70&b9s`P>ucrq^j_)J z^>%-P|k023LUqn|O*MYTkZ8!(ysmS_K zggVkgSO-dwC7}J?qLdeoAkSa)$$&nbf#mH+VgNc5V?O0kOQz{TLCtrVj;P;Q_>abY7Yg^!pTAz>xWu=+UoF;*vAJ_Nyo z6hQVgM}}Gp;>oeAO%n_v92F?)E=bUjtdk2_z|xV7^^Ayx70ihX1XPkadSbb`_=rbU zmw>$Zf@}&e=x0PlG!cXLX-otmRh7tSMtCiYc04imUi()NzKk@)Cjyl?F2QbmDEQrs@lSuO!xbJtRzEP$q6= zCm_MDJE_C(mz)M9h?W`;gA}7|QTY*V8a0h@h5_YkbvLSOb_jRUWY$HShEHFLkosXnPAjtR)(*Oe zAfyzTHQYitIl)bh&ITQZ+YvwA|Du1CZG6C!>q&l+sw`Dh=In-rSO!ad{C*z?oNE-F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p)$q(uIQ7y9X;4-fgdJEk>eFXO&U zQFrnG-djX>K9q5spTB{f-h~VNSp7-)`O4H6V($M;0i>RLhw_=5N9urYX_?-+p~Jwy zARIWe(tB(;Fx?Xs#gi5udI_P`D4uIcKWJkzKR~z6thX^eN>bl93E2({A(W{oLp%$}IDDD&z~3K*rm+Ff&>yHe;#LQUz>ri=d9JEKh>_ z4q5%5G8Nn=iCn1N!>e(;+K;AkqbD?~|HKhZ&RbfWE{9S;*4Wyf|MCk(!iZd!kWF_= zkE|y2dj2T*#uW*H%S#QP;{TvlrR#Y(l|P~`)y;Ru||m!4FSkG9G<#C;<>#(PxC18<085xhq|?|=Z56E1@5zS z|33w5y+yTFgDhHut=iJ9gK_UbEyb!#0{SDWe$rjCkZ38(fpIe2I0iri)2;X2_`sf~ ztQVP{pa!9ao{$yhKi3!XZkU5AO-idEUaMInEb^jV8DI4H58e!-wMrA7oy8F;{6{5x a!4k;OU&dW4KmGg1^zEm_zulsSLH`G1ylHR% literal 0 HcmV?d00001 diff --git a/shared/notifications/index.js b/shared/notifications/index.js index bc74e3222..ece5f297b 100644 --- a/shared/notifications/index.js +++ b/shared/notifications/index.js @@ -122,10 +122,20 @@ export const UI_NOTIFICATIONS = { width: '100%', }, }, + ///: BEGIN:ONLY_INCLUDE_IN(blockaid) + 23: { + id: 23, + date: null, + image: { + src: 'images/blockaid-security-provider.png', + width: '100%', + }, + }, + ///: END:ONLY_INCLUDE_IN }; export const getTranslatedUINotifications = (t, locale) => { - const formattedLocale = locale.replace('_', '-'); + const formattedLocale = locale?.replace('_', '-'); return { 1: { ...UI_NOTIFICATIONS[1], @@ -332,5 +342,22 @@ export const getTranslatedUINotifications = (t, locale) => { ) : '', }, + ///: BEGIN:ONLY_INCLUDE_IN(blockaid) + 23: { + ...UI_NOTIFICATIONS[23], + title: t('notifications23Title'), + description: [ + t('notifications23DescriptionOne'), + t('notifications23DescriptionTwo'), + t('notifications23DescriptionThree'), + ], + actionText: t('notifications23ActionText'), + date: UI_NOTIFICATIONS[23].date + ? new Intl.DateTimeFormat(formattedLocale).format( + new Date(UI_NOTIFICATIONS[23].date), + ) + : '', + }, + ///: END:ONLY_INCLUDE_IN }; }; diff --git a/test/e2e/fixture-builder.js b/test/e2e/fixture-builder.js index ed3e3aaac..6d5d850b0 100644 --- a/test/e2e/fixture-builder.js +++ b/test/e2e/fixture-builder.js @@ -146,6 +146,13 @@ function defaultFixture() { id: 22, isShown: true, }, + ///: BEGIN:ONLY_INCLUDE_IN(blockaid) + 23: { + date: null, + id: 23, + isShown: false, + }, + ///: END:ONLY_INCLUDE_IN }, }, AppStateController: { 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 fb4ea7286..8ea65c88d 100644 --- a/ui/components/app/whats-new-popup/whats-new-popup.js +++ b/ui/components/app/whats-new-popup/whats-new-popup.js @@ -100,6 +100,12 @@ function getActionFunctionById(id, history) { updateViewedNotifications({ 21: true }); history.push(PREPARE_SWAP_ROUTE); }, + ///: BEGIN:ONLY_INCLUDE_IN(blockaid) + 23: () => { + updateViewedNotifications({ 23: true }); + history.push(`${EXPERIMENTAL_ROUTE}#transaction-security-check`); + }, + ///: END:ONLY_INCLUDE_IN }; return actionFunctions[id]; @@ -116,6 +122,7 @@ const renderDescription = (description) => { const isLast = index === description.length - 1; return ( { id: 13, isShown: true, }, + 23: { + date: '2022-07-24', + id: 23, + isShown: false, + }, }, }, }); @@ -118,4 +123,16 @@ describe('WhatsNewPopup', () => { render(); expect(screen.getByTestId('popover-close')).toBeInTheDocument(); }); + it('renders WhatsNewPopup component and shows blockaid messages', () => { + render(); + expect( + screen.getByTestId('whats-new-description-item-0'), + ).toBeInTheDocument(); + expect( + screen.getByTestId('whats-new-description-item-1'), + ).toBeInTheDocument(); + expect( + screen.getByTestId('whats-new-description-item-2'), + ).toBeInTheDocument(); + }); }); diff --git a/ui/selectors/selectors.js b/ui/selectors/selectors.js index 54a8ef7ff..e1d2a0663 100644 --- a/ui/selectors/selectors.js +++ b/ui/selectors/selectors.js @@ -1008,6 +1008,9 @@ function getAllowedAnnouncementIds(state) { 19: false, 20: currentKeyringIsLedger && isFirefox, 21: isSwapsChain, + ///: BEGIN:ONLY_INCLUDE_IN(blockaid) + 23: true, + ///: END:ONLY_INCLUDE_IN }; }