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 532719b commit b753405
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

1 comment on commit b753405

@github-actions
Copy link

Choose a reason for hiding this comment

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

Title Lines Statements Branches Functions
apps/desktop Coverage: 83%
83.74% (1788/2135) 79.43% (850/1070) 78.27% (454/580)
apps/web Coverage: 83%
83.74% (1788/2135) 79.43% (850/1070) 78.27% (454/580)
packages/components Coverage: 97%
97.53% (198/203) 95.69% (89/93) 88.33% (53/60)
packages/core Coverage: 81%
82.37% (215/261) 72.51% (95/131) 81.66% (49/60)
packages/crypto Coverage: 100%
100% (43/43) 90.9% (10/11) 100% (7/7)
packages/data-polling Coverage: 96%
94.66% (142/150) 87.5% (21/24) 92.85% (39/42)
packages/multisig Coverage: 98%
98.47% (129/131) 85.71% (18/21) 100% (36/36)
packages/social-auth Coverage: 95%
95.45% (21/22) 91.66% (11/12) 100% (3/3)
packages/state Coverage: 83%
82.86% (832/1004) 78.68% (192/244) 76.2% (301/395)
packages/tezos Coverage: 89%
88.4% (122/138) 92.68% (38/41) 87.17% (34/39)
packages/tzkt Coverage: 89%
87.32% (62/71) 87.5% (14/16) 80.48% (33/41)

Please sign in to comment.