Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove blockaid migration BannerAlert #25556

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for audit sake, I agree that no migration is needed for this since it's a single boolean rather than a large array or object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good shout, thanks for pointing it out

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