Skip to content

Commit

Permalink
Update migration after removing the blacklisted keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinkyaraj-23 committed Feb 12, 2025
1 parent e3fc4f8 commit 7d45b80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
9 changes: 0 additions & 9 deletions packages/state/src/migrations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ describe("migrations", () => {
expect(mainStoreMigrations[0]({ multisigs: {} })).toEqual({ multisigs: { labelsMap: {} } });
});

test("1", () => {
expect(mainStoreMigrations[1]({})).toEqual({
announcement: {
html: "",
seen: true,
},
});
});

test("5", () => {
expect(
mainStoreMigrations[5]({
Expand Down
8 changes: 7 additions & 1 deletion packages/state/src/migrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export const mainStoreMigrations = {
}),
1: (state: any) =>
produce(state, (draft: any) => {
draft.announcement = announcementsInitialState;
if (draft.announcement) {
draft.announcement = announcementsInitialState;
}
}),
2: identity,
3: (state: any) =>
Expand Down Expand Up @@ -58,6 +60,9 @@ export const mainStoreMigrations = {
},
7: (state: any) =>
produce(state, (draft: any) => {
if (!draft.assets) {
return;
}
draft.assets.accountStates = {};
draft.assets.block = { level: draft.assets.blockLevel };
delete draft.assets["blockLevel"];
Expand All @@ -80,6 +85,7 @@ export const mainStoreMigrations = {
}
}
}),
10: identity,
} as any;

export const accountsMigrations = {
Expand Down

0 comments on commit 7d45b80

Please sign in to comment.