Skip to content

Commit

Permalink
feat: Remove blockaid migration BannerAlert (#25556)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

On #23743, we
introduced a BannerAlert that warns the user if they migrated from
OpenSea to Blockaid security alerts and they are on a network that
doesn't support them.

Since enough time has passed, this PR removes that logic

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25556?quickstart=1)

## **Related issues**

#23743

## **Manual testing steps**

See instructions on
#23743

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
pedronfigueiredo authored Jul 1, 2024
1 parent df81e73 commit 699ddcc
Show file tree
Hide file tree
Showing 33 changed files with 0 additions and 434 deletions.
9 changes: 0 additions & 9 deletions app/_locales/de/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/el/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/es/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/fr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/hi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/id/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/ja/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/ko/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/pt/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/ru/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/tl/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/tr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/vi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/_locales/zh_CN/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions app/scripts/controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export default class PreferencesController {
eth_sign: false,
},
useMultiAccountBalanceChecker: true,
hasDismissedOpenSeaToBlockaidBanner: false,
useSafeChainsListValidation: true,
// set to true means the dynamic list from the API is being used
// set to false will be using the static list from contract-metadata
Expand Down Expand Up @@ -191,14 +190,6 @@ export default class PreferencesController {
this.store.updateState({ useMultiAccountBalanceChecker: val });
}

/**
* Setter for the `dismissOpenSeaToBlockaidBanner` property
*
*/
dismissOpenSeaToBlockaidBanner() {
this.store.updateState({ hasDismissedOpenSeaToBlockaidBanner: true });
}

/**
* Setter for the `useSafeChainsListValidation` property
*
Expand Down
17 changes: 0 additions & 17 deletions app/scripts/controllers/preferences.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,23 +308,6 @@ describe('preferences controller', () => {
});
});

describe('dismissOpenSeaToBlockaidBanner', () => {
it('hasDismissedOpenSeaToBlockaidBanner should default to false', () => {
expect(
preferencesController.store.getState()
.hasDismissedOpenSeaToBlockaidBanner,
).toStrictEqual(false);
});

it('should set the hasDismissedOpenSeaToBlockaidBanner property in state', () => {
preferencesController.dismissOpenSeaToBlockaidBanner();
expect(
preferencesController.store.getState()
.hasDismissedOpenSeaToBlockaidBanner,
).toStrictEqual(true);
});
});

describe('setUseSafeChainsListValidation', function () {
it('should default to true', function () {
const state = preferencesController.store.getState();
Expand Down
1 change: 0 additions & 1 deletion app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ export const SENTRY_BACKGROUND_STATE = {
useRequestQueue: true,
useTransactionSimulations: true,
enableMV3TimestampSave: true,
hasDismissedOpenSeaToBlockaidBanner: true,
},
PushPlatformNotificationsController: {
fcmToken: false,
Expand Down
4 changes: 0 additions & 4 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2982,10 +2982,6 @@ export default class MetamaskController extends EventEmitter {
preferencesController.setUseMultiAccountBalanceChecker.bind(
preferencesController,
),
dismissOpenSeaToBlockaidBanner:
preferencesController.dismissOpenSeaToBlockaidBanner.bind(
preferencesController,
),
setUseSafeChainsListValidation:
preferencesController.setUseSafeChainsListValidation.bind(
preferencesController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@
"dismissSeedBackUpReminder": true,
"disabledRpcMethodPreferences": { "eth_sign": false },
"useMultiAccountBalanceChecker": true,
"hasDismissedOpenSeaToBlockaidBanner": false,
"useSafeChainsListValidation": "boolean",
"useTokenDetection": false,
"useNftDetection": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
"dismissSeedBackUpReminder": true,
"disabledRpcMethodPreferences": { "eth_sign": false },
"useMultiAccountBalanceChecker": true,
"hasDismissedOpenSeaToBlockaidBanner": false,
"useSafeChainsListValidation": true,
"useTokenDetection": false,
"useNftDetection": false,
Expand Down
Loading

0 comments on commit 699ddcc

Please sign in to comment.