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

fix: Add migration to fix NotificationServicesController bug #12219

Merged
merged 13 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
20 changes: 20 additions & 0 deletions app/store/migrations/060.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { ensureValidState } from "./util";

Check failure on line 1 in app/store/migrations/060.ts

View workflow job for this annotation

GitHub Actions / scripts (lint)

Strings must use singlequote

export default function migrate(state: unknown) {
if (!ensureValidState(state, 60)) {
return state;
}
state.engine.backgroundState.NotificationServicesController = {
kylanhurt marked this conversation as resolved.
Show resolved Hide resolved
isCheckingAccountsPresence: false,
isFeatureAnnouncementsEnabled: false,
isFetchingMetamaskNotifications: false,
isMetamaskNotificationsFeatureSeen: false,
isNotificationServicesEnabled: false,
isUpdatingMetamaskNotifications: false,
isUpdatingMetamaskNotificationsAccount: [],
metamaskNotificationsList: [],
metamaskNotificationsReadList: [],
subscriptionAccountsSeen: [],
}

Check warning on line 18 in app/store/migrations/060.ts

View workflow job for this annotation

GitHub Actions / scripts (lint)

Missing semicolon
return state;
}

Check warning on line 20 in app/store/migrations/060.ts

View workflow job for this annotation

GitHub Actions / scripts (lint)

Newline required at end of file but not found
kylanhurt marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions app/store/migrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import migration56 from './056';
import migration57 from './057';
import migration58 from './058';
import migration59 from './059';
import migration60 from './060';

type MigrationFunction = (state: unknown) => unknown;
type AsyncMigrationFunction = (state: unknown) => Promise<unknown>;
Expand Down Expand Up @@ -132,6 +133,7 @@ export const migrationList: MigrationsList = {
57: migration57,
58: migration58,
59: migration59,
60: migration60
};

// Enable both synchronous and asynchronous migrations
Expand Down
Loading