Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2d6c3a8
fix: prevent multiple calls
LeleDallas Nov 7, 2025
ac9f130
Revert "fix: prevent multiple calls"
LeleDallas Nov 10, 2025
e2af20d
fix: duplicated wallet calls
LeleDallas Nov 10, 2025
b280663
chore: removed comment
LeleDallas Nov 10, 2025
3be60e4
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 10, 2025
9f4d3b3
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 10, 2025
2256346
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 10, 2025
f962fef
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 11, 2025
52dc0cd
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 11, 2025
e0b52cc
chore: restore old navigation behavior
LeleDallas Nov 11, 2025
c04f79f
chore: removed unnecessary force update calls
LeleDallas Nov 11, 2025
d8d7e29
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 12, 2025
fd53bf4
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 19, 2025
707b9a7
chore: [IOBP-2166] Saga improvements (#7618)
LeleDallas Nov 24, 2025
25168e6
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 24, 2025
e194044
chore: restore comment
LeleDallas Nov 25, 2025
cff94fa
chore: removed duplicated const
LeleDallas Nov 25, 2025
1d5358b
chore: removed wrong path
LeleDallas Nov 25, 2025
211717e
refactor: call eyca only if is CGN linking
LeleDallas Nov 25, 2025
1541a50
chore: include idpay path
LeleDallas Nov 25, 2025
c71a061
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 25, 2025
8a507b7
feat: startup completed action
LeleDallas Nov 26, 2025
76c6d3a
Revert "feat: startup completed action"
LeleDallas Nov 27, 2025
0a01895
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 27, 2025
8c1f05d
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Nov 27, 2025
bbade26
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Dec 1, 2025
350295b
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Dec 1, 2025
f1327d3
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Dec 2, 2025
b13ad8f
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
Hantex9 Dec 4, 2025
cc040da
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
LeleDallas Dec 5, 2025
e04919b
refactor: moved duplicated link in const
LeleDallas Dec 5, 2025
b7557d6
Merge branch 'master' into IOBP-000-fix-wallet-update-multiple-calls
Hantex9 Dec 9, 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
14 changes: 14 additions & 0 deletions ts/features/linking/sagas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
isSendAARLink,
navigateToSendAarFlowIfEnabled
} from "../../pn/aar/utils/deepLinking";
import { walletUpdate } from "../../wallet/store/actions";
import { clearLinkingUrl } from "../actions";
import { storedLinkingUrlSelector } from "../reducers";

export const isExternalDeepLink = (url: string): boolean =>
url.startsWith("https://continua.io.pagopa.it") ||
url.startsWith("ioit://") ||
url.includes("wallet") ||
url.includes("payment") ||
url.includes("idpay") ||
url.includes("cgn");

export function* handleStoredLinkingUrlIfNeeded() {
const storedLinkingUrl = yield* select(storedLinkingUrlSelector);
if (storedLinkingUrl !== undefined) {
// Check if it's an external deep link that should trigger wallet update
if (isExternalDeepLink(storedLinkingUrl)) {
yield* put(walletUpdate());
}

const shouldNavigateToAAR = yield* select(isSendAARLink, storedLinkingUrl);
if (shouldNavigateToAAR) {
const state = yield* select();
Expand Down
5 changes: 1 addition & 4 deletions ts/features/payments/common/saga/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SagaIterator } from "redux-saga";
import { fork, put, select, takeLatest } from "typed-redux-saga/macro";
import { fork, select, takeLatest } from "typed-redux-saga/macro";
import { isPagoPATestEnabledSelector } from "../../../../store/reducers/persistedPreferences";
import { walletApiBaseUrl, walletApiUatBaseUrl } from "../../../../config";
import { watchPaymentsOnboardingSaga } from "../../onboarding/saga";
Expand All @@ -14,7 +14,6 @@ import {
createTransactionClient,
createWalletClient
} from "../api/client";
import { walletUpdate } from "../../../wallet/store/actions";
import { handlePaymentsSessionToken } from "./handlePaymentsSessionToken";
import { handleResumePaymentsPendingActions } from "./handleResumePaymentsPendingActions";
import { cleanExpiredPaymentsOngoingFailed } from "./cleanExpiredPaymentsOngoingFailed";
Expand Down Expand Up @@ -48,6 +47,4 @@ export function* watchPaymentsSaga(walletToken: string): SagaIterator {
yield* fork(watchPaymentsMethodDetailsSaga, walletClient);
yield* fork(watchPaymentsReceiptSaga, transactionClient);
yield* fork(watchPaymentsCheckoutSaga, paymentClient);

yield* put(walletUpdate());
}
7 changes: 7 additions & 0 deletions ts/navigation/linkingSubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { Linking } from "react-native";
import { Action, Dispatch, Store } from "redux";
import { isLoggedIn } from "../features/authentication/common/store/utils/guards";
import { storeLinkingUrl } from "../features/linking/actions";
import { isExternalDeepLink } from "../features/linking/sagas";
import { resetMessageArchivingAction } from "../features/messages/store/actions/archiving";
import { isArchivingDisabledSelector } from "../features/messages/store/reducers/archiving";
import {
isSendAARLink,
navigateToSendAarFlowIfEnabled
} from "../features/pn/aar/utils/deepLinking";
import { processUtmLink } from "../features/utmLink";
import { walletUpdate } from "../features/wallet/store/actions";
import { GlobalState } from "../store/reducers/types";

export const linkingSubscription =
Expand All @@ -27,6 +29,11 @@ export const linkingSubscription =
}

if (isLoggedIn(state.authentication)) {
// Trigger wallet update for external deep links
if (isExternalDeepLink(url)) {
dispatch(walletUpdate());
}

// only when logged in we can navigate to the AAR screen.
if (isSendAARLink(state, url)) {
navigateToSendAarFlowIfEnabled(state, url);
Expand Down
Loading