Skip to content
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
51bac69
chore: remove code related to mdl issuance async flow
gispada Oct 1, 2025
66a90d2
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 6, 2025
360bfd2
chore: remove locale strings
gispada Oct 6, 2025
96d6823
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 10, 2025
7bdf9ac
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 13, 2025
9b51ac0
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 20, 2025
75c2a0b
chore: restore async continuation screen
gispada Oct 20, 2025
1eb4058
chore: remove unused code
gispada Oct 20, 2025
4714526
chore: remove unused selector
gispada Oct 20, 2025
81a2533
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 21, 2025
e89ebc4
refactor: remove requestedCredentials from preferences
gispada Oct 21, 2025
9936f0b
refactor: remove requestedCredentials from tests
gispada Oct 21, 2025
f2043b2
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 24, 2025
a7002fe
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 30, 2025
f2a38b9
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Oct 30, 2025
4bc780d
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Nov 11, 2025
c86a9e6
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Nov 25, 2025
1a77acd
chore: reintroduce sequential issuing for mDL
gispada Nov 25, 2025
9a5c87a
chore: remove unused machine actions
gispada Nov 25, 2025
6616b42
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Nov 25, 2025
5719219
chore: migration test
gispada Nov 25, 2025
e208f9c
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Nov 26, 2025
f7c0032
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Nov 27, 2025
9eddf59
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Dec 1, 2025
5a473d7
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Dec 5, 2025
39f1720
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Dec 9, 2025
c255c86
Merge branch 'master' into SIW-2839-remove-mdl-async-flow
gispada Dec 11, 2025
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
5 changes: 0 additions & 5 deletions locales/de/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3571,11 +3571,6 @@
"body": "Vergewissere dich, dass du im Besitz des gültigen physischen Dokuments bist, bevor du dessen digitale Version anforderst.",
"primaryAction": "Verstanden"
},
"asyncCredentialError": {
"title": "Das Führerscheinamt bearbeitet deinen Antrag",
"body": "Du erhältst in der App eine Mitteilung, dass du fortfahren kannst, sobald dein Antrag bearbeitet ist.",
"primaryAction": "Verstanden"
},
"credentialAlreadyAdded": {
"title": "Du hast dieses Dokument bereits",
"body": "Die digitale Version des Dokuments befindet sich bereits in deinem Konto.",
Expand Down
5 changes: 0 additions & 5 deletions locales/en/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -4831,11 +4831,6 @@
"body": "Assicurati di avere il documento fisico valido prima di richiedere la sua versione digitale.",
"primaryAction": "Ho capito"
},
"asyncCredentialError": {
"title": "La Motorizzazione Civile ha preso in carico la tua richiesta",
"body": "Riceverai un messaggio in app per continuare appena La Motorizzazione Civile avrà elaborato la tua richiesta.",
"primaryAction": "Ho capito"
},
"issuerNotTrustedCommonError": {
"title": "Un problema non permette di continuare",
"subtitle": "Si è verificato un errore tecnico che impedisce di ottenere {{credential}}. Riprova.\nSe il problema persiste, contatta l’assistenza.",
Expand Down
11 changes: 6 additions & 5 deletions locales/it/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5002,11 +5002,6 @@
"body": "Assicurati di avere il documento fisico valido prima di richiedere la sua versione digitale.",
"primaryAction": "Ho capito"
},
"asyncCredentialError": {
"title": "La Motorizzazione Civile ha preso in carico la tua richiesta",
"body": "Riceverai un messaggio in app per continuare appena La Motorizzazione Civile avrà elaborato la tua richiesta.",
"primaryAction": "Ho capito"
},
"issuerNotTrustedCommonError": {
"title": "Un problema non permette di continuare",
"subtitle": "Si è verificato un errore tecnico che impedisce di ottenere {{credential}}. Riprova.\nSe il problema persiste, contatta l’assistenza.",
Expand Down Expand Up @@ -5050,6 +5045,12 @@
"cieNotRegistered": {
"title": "Registra la CIE in app CieID per continuare",
"subtitle": "Per ottenere IT-Wallet, completa prima la registrazione della tua CIE in app CieID e poi riprova."
},
"mdlMessageExpired": {
"title": "Richiesta scaduta",
"subtitleStart": "Questa richiesta non è più valida ma puoi aggiungere di nuovo la tua ",
"subtitleBold": "Patente su IO.",
"primaryAction": "Aggiungi di nuovo"
}
},
"notMatchingIdentityScreen": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ exports[`featuresPersistor should match snapshot 1`] = `
"_tag": "None",
},
},
"preferences": {
"requestedCredentials": {},
},
"preferences": {},
"securePreferences": {
"offlineAccessCounter": 0,
},
Expand Down
1 change: 0 additions & 1 deletion ts/features/itwallet/analytics/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export enum ITW_SCREENVIEW_EVENTS {
WALLET_ADD_LIST_ITEM = "WALLET_ADD_LIST_ITEM",
ITW_DATA_SHARE = "ITW_DATA_SHARE",
ITW_CREDENTIAL_DETAIL = "ITW_CREDENTIAL_DETAIL",
ITW_DEFERRED_ISSUING = "ITW_DEFERRED_ISSUING",
"ITW_CREDENTIAL_FAC-SIMILE" = "ITW_CREDENTIAL_FAC-SIMILE",
ITW_OFFLINE_WALLET = "ITW_OFFLINE_WALLET",
ITW_OFFLINE_BOTTOM_SHEET = "ITW_OFFLINE_BOTTOM_SHEET",
Expand Down
7 changes: 0 additions & 7 deletions ts/features/itwallet/analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,6 @@ export function trackItWalletCieCardReadingSuccess(itw_flow: ItwFlow) {
);
}

export function trackItWalletDeferredIssuing(credential: MixPanelCredential) {
void mixpanelTrack(
ITW_SCREENVIEW_EVENTS.ITW_DEFERRED_ISSUING,
buildEventProperties("UX", "screen_view", { credential })
);
}

export function trackWalletCredentialFAC_SIMILE(
credential: MixPanelCredential
) {
Expand Down
10 changes: 0 additions & 10 deletions ts/features/itwallet/common/store/actions/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ export const itwCloseDiscoveryBanner = createStandardAction(
"ITW_CLOSE_DISCOVERY_BANNER"
)();

export const itwFlagCredentialAsRequested = createStandardAction(
"ITW_FLAG_CREDENTIAL_AS_REQUESTED"
)<string>();

export const itwUnflagCredentialAsRequested = createStandardAction(
"ITW_UNFLAG_CREDENTIAL_AS_REQUESTED"
)<string>();

export const itwSetReviewPending = createStandardAction(
"ITW_SET_REVIEW_PENDING"
)<boolean>();
Expand Down Expand Up @@ -47,8 +39,6 @@ export const itwClearSimplifiedActivationRequirements = createStandardAction(

export type ItwPreferencesActions =
| ActionType<typeof itwCloseDiscoveryBanner>
| ActionType<typeof itwFlagCredentialAsRequested>
| ActionType<typeof itwUnflagCredentialAsRequested>
| ActionType<typeof itwSetReviewPending>
| ActionType<typeof itwSetAuthLevel>
| ActionType<typeof itwSetClaimValuesHidden>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ exports[`itWalletReducer should match snapshot [if this test fails, remember to
"_tag": "None",
},
},
"preferences": {
"requestedCredentials": {},
},
"preferences": {},
"securePreferences": {
"offlineAccessCounter": 0,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,18 @@ describe("itWalletReducer migrations", () => {
preferences: { requestedCredentials: {} }
});
});

it("should migrate the store to version 9 and remove requestedCredentials", async () => {
const previousState = {
_persist: { version: 7, rehydrated: false },
preferences: { requestedCredentials: { MDL: true } }
};

const newState = await migrate(previousState, 9);

expect(newState).toEqual({
_persist: { version: 7, rehydrated: false },
preferences: {}
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import MockDate from "mockdate";
import { applicationChangeState } from "../../../../../../store/actions/application";
import {
itwCloseDiscoveryBanner,
itwFlagCredentialAsRequested,
itwSetAuthLevel,
itwSetClaimValuesHidden,
itwUnflagCredentialAsRequested
itwSetClaimValuesHidden
} from "../../actions/preferences";
import reducer, {
itwPreferencesInitialState,
Expand All @@ -15,9 +13,7 @@ import reducer, {
import { itwLifecycleStoresReset } from "../../../../lifecycle/store/actions";

describe("IT Wallet preferences reducer", () => {
const INITIAL_STATE: ItwPreferencesState = {
requestedCredentials: {}
};
const INITIAL_STATE: ItwPreferencesState = {};

it("should return the initial state", () => {
expect(reducer(undefined, applicationChangeState("active"))).toEqual(
Expand All @@ -40,48 +36,9 @@ describe("IT Wallet preferences reducer", () => {
MockDate.reset();
});

it("should handle itwFlagCredentialAsRequested action", () => {
const mockDate = "2024-11-14T20:43:21.361Z";
MockDate.set(mockDate);

const action = itwFlagCredentialAsRequested("MDL");
const newState = reducer(INITIAL_STATE, action);

expect(newState).toEqual({
...newState,
requestedCredentials: {
MDL: mockDate
}
});
MockDate.reset();
});

it("should handle itwRemoveRequestedCredential action", () => {
const mockDate = "2024-11-14T20:43:21.361Z";
MockDate.set(mockDate);

const action = itwUnflagCredentialAsRequested("MDL");
const newState = reducer(
{
...INITIAL_STATE,
requestedCredentials: {
MDL: mockDate
}
},
action
);

expect(newState).toEqual({
...newState,
requestedCredentials: {}
});
MockDate.reset();
});

it("should handle itwLifecycleStoresReset action and ensure some values are not reset", () => {
const initialState: ItwPreferencesState = {
hideDiscoveryBannerUntilDate: "2024-11-14T20:43:21.361Z",
requestedCredentials: { MDL: "2024-11-14T20:43:21.361Z" },
isPendingReview: true,
authLevel: "L2",
claimValuesHidden: true,
Expand Down Expand Up @@ -128,7 +85,6 @@ describe("IT Wallet preferences reducer", () => {
const newState = reducer(
{
hideDiscoveryBannerUntilDate: "abcd",
requestedCredentials: { MDL: "abcd" },
isPendingReview: true,
authLevel: "L2",
claimValuesHidden: true,
Expand Down
8 changes: 6 additions & 2 deletions ts/features/itwallet/common/store/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const itwReducer = combineReducers({
credentialsCatalogue: itwCredentialsCatalogueReducer
});

const CURRENT_REDUX_ITW_STORE_VERSION = 8;
const CURRENT_REDUX_ITW_STORE_VERSION = 9;

export const migrations: MigrationManifest = {
// Added preferences store
Expand Down Expand Up @@ -109,7 +109,11 @@ export const migrations: MigrationManifest = {

// Removed hideFeedbackBannerUntilDate from preferences
"8": (state: PersistedState): PersistedState =>
_.omit(state, "preferences.hideFeedbackBannerUntilDate")
_.omit(state, "preferences.hideFeedbackBannerUntilDate"),

// Removed requestedCredentials from preferences
"9": (state: PersistedState): PersistedState =>
_.omit(state, "preferences.requestedCredentials")
};

const itwPersistConfig: PersistConfig = {
Expand Down
33 changes: 1 addition & 32 deletions ts/features/itwallet/common/store/reducers/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { getType } from "typesafe-actions";
import { Action } from "../../../../../store/actions/types";
import {
itwCloseDiscoveryBanner,
itwFlagCredentialAsRequested,
itwSetAuthLevel,
itwSetClaimValuesHidden,
itwSetFiscalCodeWhitelisted,
itwSetReviewPending,
itwSetWalletInstanceRemotelyActive,
itwUnflagCredentialAsRequested,
itwSetWalletUpgradeMDLDetailsBannerHidden,
itwFreezeSimplifiedActivationRequirements,
itwClearSimplifiedActivationRequirements
Expand All @@ -20,10 +18,6 @@ import { ItwAuthLevel } from "../../utils/itwTypesUtils.ts";
export type ItwPreferencesState = {
// Date until which the discovery banner should be hidden
hideDiscoveryBannerUntilDate?: string;
// Stores the list of requested credentials which supports delayed issuance
// Each credential type is associated with a date (ISO string) which represents
// the date of the last issuance request.
requestedCredentials: { [credentialType: string]: string };
// Indicates whether the user should see the modal to review the app.
isPendingReview?: boolean;
// Indicates the SPID/CIE authentication level used to obtain the eid
Expand All @@ -42,9 +36,7 @@ export type ItwPreferencesState = {
isItwSimplifiedActivationRequired?: boolean;
};

export const itwPreferencesInitialState: ItwPreferencesState = {
requestedCredentials: {}
};
export const itwPreferencesInitialState: ItwPreferencesState = {};

const reducer = (
state: ItwPreferencesState = itwPreferencesInitialState,
Expand All @@ -58,29 +50,6 @@ const reducer = (
};
}

case getType(itwFlagCredentialAsRequested): {
return {
...state,
requestedCredentials: {
...state.requestedCredentials,
[action.payload]: new Date().toISOString()
}
};
}

case getType(itwUnflagCredentialAsRequested): {
if (action.payload in state.requestedCredentials) {
const { [action.payload]: _, ...requestedCredentials } =
state.requestedCredentials;

return {
...state,
requestedCredentials
};
}
return state;
}

case getType(itwSetReviewPending): {
return {
...state,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { applicationChangeState } from "../../../../../../store/actions/applicat
import { appReducer } from "../../../../../../store/reducers";
import {
itwAuthLevelSelector,
itwIsDiscoveryBannerHiddenSelector,
itwRequestedCredentialsSelector
itwIsDiscoveryBannerHiddenSelector
} from "../preferences";
import { ItwAuthLevel } from "../../../utils/itwTypesUtils.ts";

Expand All @@ -30,27 +29,6 @@ describe("itwIsDiscoveryBannerHiddenSelector", () => {
});
});

describe("itwRequestedCredentialsSelector", () => {
it("should return the list of requested credentials in the past 24 hours", () => {
MockDate.set("2023-11-15T20:43:21.361Z");

const globalState = appReducer(undefined, applicationChangeState("active"));

expect(
itwRequestedCredentialsSelector(
_.set(globalState, "features.itWallet.preferences", {
requestedCredentials: {
MDL: "2023-11-14T20:43:21.362Z",
EuropeanDisabilityCard: "2023-11-14T20:43:21.360Z",
EuropeanHealthInsuranceCard: "2023-11-14T20:43:21.361Z"
}
})
)
).toEqual(["MDL"]);
MockDate.reset();
});
});

describe("itwAuthLevelSelector", () => {
afterEach(() => {
// Always reset the date after each test to avoid side effects
Expand Down
17 changes: 1 addition & 16 deletions ts/features/itwallet/common/store/selectors/preferences.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addHours, isFuture, isPast } from "date-fns";
import { isPast } from "date-fns";
import { createSelector } from "reselect";
import { GlobalState } from "../../../../../store/reducers/types";
import { ItwPreferencesState } from "../reducers/preferences";
Expand All @@ -24,21 +24,6 @@ export const itwIsDiscoveryBannerHiddenSelector = createSelector(
isPastDate(hideDiscoveryBannerUntilDate)
);

/**
* Returns the list of requested credentials in the past 7 days.
*/
export const itwRequestedCredentialsSelector = createSelector(
itwPreferencesSelector,
({ requestedCredentials }: ItwPreferencesState) =>
Object.entries(requestedCredentials)
// This acts as a soft boolean flag: it is unlikely to happen that a credential remains
// in the "requested" status for this long. This allows for flexibility to adjust the
// timeframe in the future if needed.
// 09/01/25: The timeframe has been adjusted to 24 hours to match the new requirements.
.filter(([_, requestedAt]) => isFuture(addHours(requestedAt, 24)))
.map(([credentialType]) => credentialType)
);

/**
* Returns whether the app review modal should be shown.
*/
Expand Down
15 changes: 1 addition & 14 deletions ts/features/itwallet/common/store/selectors/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,7 @@ export const itwDisabledCredentialsSelector = createSelector(
);

/**
* Return the remote config content for the deferred issuance screen content.
*/
export const itwDeferredIssuanceScreenContentSelector = createSelector(
itwRemoteConfigSelector,
itwConfig =>
pipe(
itwConfig,
O.map(itw => itw.deferred_issuance_screen_content),
O.toUndefined
)
);

/**
* Return the remote config content for the deferred issuance screen content.
* Return the remote config content for the iPatente CTA's visibility.
*/
export const itwIsIPatenteCtaEnabledSelector = createSelector(
itwRemoteConfigSelector,
Expand Down
Loading
Loading