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(IT Wallet): [SIW-1917] Fix crash in credentials onboarding screen #6544

Merged
merged 3 commits into from
Dec 12, 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`itWalletReducer should match snapshot 1`] = `
exports[`itWalletReducer should match snapshot [if this test fails, remember to add a migration to the store before updating the snapshot] 1`] = `
{
"credentials": {
"credentials": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { applicationChangeState } from "../../../../../../store/actions/applicat
import itWalletReducer from "../index";

describe("itWalletReducer", () => {
it("should match snapshot", () => {
it("should match snapshot [if this test fails, remember to add a migration to the store before updating the snapshot]", () => {
const itWalletState = itWalletReducer(
undefined,
applicationChangeState("active")
Expand Down
7 changes: 5 additions & 2 deletions ts/features/itwallet/common/store/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ const itwReducer = combineReducers({
preferences: preferencesReducer
});

const CURRENT_REDUX_ITW_STORE_VERSION = 0;
const CURRENT_REDUX_ITW_STORE_VERSION = 1;

const migrations: MigrationManifest = {
// Added preferences store
"0": (state: PersistedState): PersistedState =>
_.set(state, "preferences", {})
_.set(state, "preferences", {}),
// Added requestedCredentials to preferences store
"1": (state: PersistedState): PersistedState =>
_.set(state, "preferences.requestedCredentials", {})
};

const itwPersistConfig: PersistConfig = {
Expand Down
Loading