From ef50e3b4196837b3e43422ed6e6d89ac8657635c Mon Sep 17 00:00:00 2001 From: LazyAfternoons Date: Thu, 2 Jan 2025 15:14:59 +0100 Subject: [PATCH 1/3] refactor: rename routes and screens --- ts/features/onboarding/navigation/routes.ts | 2 +- .../wallet/components/ActivationBanner.tsx | 2 +- .../wallet/navigation/WalletNavigator.tsx | 16 ++++---- ts/features/wallet/navigation/routes.ts | 8 ++-- .../wallet/saga/handleGetAttestation.ts | 40 ------------------- .../{Failure.tsx => PidIssuanceFailure.tsx} | 4 +- .../{Issuance.tsx => PidIssuanceRequest.tsx} | 8 ++-- .../{Success.tsx => PidIssuanceSuccess.tsx} | 4 +- .../pidIssuance/WalletInstanceCreation.tsx | 4 +- ts/navigation/RootStacknavigator.tsx | 4 +- ts/navigation/routes.tsx | 2 +- ts/screens/WalletHome.tsx | 2 +- 12 files changed, 28 insertions(+), 68 deletions(-) delete mode 100644 ts/features/wallet/saga/handleGetAttestation.ts rename ts/features/wallet/screens/pidIssuance/{Failure.tsx => PidIssuanceFailure.tsx} (94%) rename ts/features/wallet/screens/pidIssuance/{Issuance.tsx => PidIssuanceRequest.tsx} (94%) rename ts/features/wallet/screens/pidIssuance/{Success.tsx => PidIssuanceSuccess.tsx} (95%) diff --git a/ts/features/onboarding/navigation/routes.ts b/ts/features/onboarding/navigation/routes.ts index 6f4e6cb..f45066f 100644 --- a/ts/features/onboarding/navigation/routes.ts +++ b/ts/features/onboarding/navigation/routes.ts @@ -1,5 +1,5 @@ /** - * Routes configuration for the {@link OnboardingNavigator.tsx} + * Routes configuration for the {@link OnBoardingNavigator.tsx} */ const ONBOARDING_ROUTES = { // Onboarding section diff --git a/ts/features/wallet/components/ActivationBanner.tsx b/ts/features/wallet/components/ActivationBanner.tsx index 92db32d..66cfad0 100644 --- a/ts/features/wallet/components/ActivationBanner.tsx +++ b/ts/features/wallet/components/ActivationBanner.tsx @@ -49,7 +49,7 @@ export const ActivationBanner = ({ labelClose={labelClose} onPress={() => navigation.navigate('MAIN_WALLET', { - screen: 'INSTANCE_CREATION' + screen: 'PID_ISSUANCE_INSTANCE_CREATION' }) } onClose={onClose} diff --git a/ts/features/wallet/navigation/WalletNavigator.tsx b/ts/features/wallet/navigation/WalletNavigator.tsx index 8e8a921..3cec934 100644 --- a/ts/features/wallet/navigation/WalletNavigator.tsx +++ b/ts/features/wallet/navigation/WalletNavigator.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; -import Failure from '../screens/pidIssuance/Failure'; +import PidIssuanceFailure from '../screens/pidIssuance/PidIssuanceFailure'; import WalletInstanceCreation from '../screens/pidIssuance/WalletInstanceCreation'; -import Issuance from '../screens/pidIssuance/Issuance'; -import Success from '../screens/pidIssuance/Success'; +import PidIssuancRequest from '../screens/pidIssuance/PidIssuanceRequest'; +import PidIssuanceSuccess from '../screens/pidIssuance/PidIssuanceSuccess'; import WALLET_ROUTES from './routes'; /** @@ -12,7 +12,7 @@ import WALLET_ROUTES from './routes'; */ export type WalletNavigatorParamsList = { [WALLET_ROUTES.PID_ISSUANCE.INSTANCE_CREATION]: undefined; - [WALLET_ROUTES.PID_ISSUANCE.ISSUANCE]: undefined; + [WALLET_ROUTES.PID_ISSUANCE.REQUEST]: undefined; [WALLET_ROUTES.PID_ISSUANCE.SUCCESS]: undefined; [WALLET_ROUTES.PID_ISSUANCE.FAILURE]: undefined; }; @@ -34,15 +34,15 @@ const WalletNavigator = () => ( /> diff --git a/ts/features/wallet/navigation/routes.ts b/ts/features/wallet/navigation/routes.ts index 5fa739c..ccb4a3b 100644 --- a/ts/features/wallet/navigation/routes.ts +++ b/ts/features/wallet/navigation/routes.ts @@ -3,10 +3,10 @@ */ const WALLET_ROUTES = { PID_ISSUANCE: { - INSTANCE_CREATION: 'INSTANCE_CREATION', - ISSUANCE: 'ISSUANCE', - SUCCESS: 'SUCCESS', - FAILURE: 'FAILURE' + INSTANCE_CREATION: 'PID_ISSUANCE_INSTANCE_CREATION', + REQUEST: 'PID_ISSUANCE_REQUEST', + SUCCESS: 'PID_ISSUANCE_SUCCESS', + FAILURE: 'PID_ISSUANCE_FAILURE' } as const } as const; diff --git a/ts/features/wallet/saga/handleGetAttestation.ts b/ts/features/wallet/saga/handleGetAttestation.ts deleted file mode 100644 index fb17a3a..0000000 --- a/ts/features/wallet/saga/handleGetAttestation.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {call, select} from 'typed-redux-saga'; -import Config from 'react-native-config'; -import { - createCryptoContextFor, - WalletInstanceAttestation -} from '@pagopa/io-react-native-wallet'; -import {regenerateCryptoKey} from '../../../utils/crypto'; -import {WIA_KEYTAG} from '../utils/crypto'; -import {getIntegrityContext} from '../utils/integrity'; -import {createWalletProviderFetch} from '../utils/fetch'; -import {selectSessionId} from '../../../store/reducers/preferences'; - -/** - * Utility generator function to obtain a wallet attestation. - * @param instanceKeyTag - the keytag bound to the wallet instance for which the attestation is requested. - * @returns the attestation for the wallet instance. - * @throws {@link Errors.WalletProviderResponseError} if the wallet provider returns an error. - */ -export function* getAttestation(instanceKeyTag: string) { - const sessionId = yield* select(selectSessionId); - const walletProviderBaseUrl = Config.WALLET_PROVIDER_BASE_URL; - const appFetch = createWalletProviderFetch(walletProviderBaseUrl, sessionId); - - const integrityContext = getIntegrityContext(instanceKeyTag); - // generate Key for Wallet Instance Attestation - // ensure the key esists befor starting the issuing process - yield* call(regenerateCryptoKey, WIA_KEYTAG); - const wiaCryptoContext = createCryptoContextFor(WIA_KEYTAG); - - /** - * Obtains a new Wallet Instance Attestation. - * WARNING: The integrity context must be the same used when creating the Wallet Instance with the same keytag. - */ - return yield* call(WalletInstanceAttestation.getAttestation, { - wiaCryptoContext, - integrityContext, - walletProviderBaseUrl, - appFetch - }); -} diff --git a/ts/features/wallet/screens/pidIssuance/Failure.tsx b/ts/features/wallet/screens/pidIssuance/PidIssuanceFailure.tsx similarity index 94% rename from ts/features/wallet/screens/pidIssuance/Failure.tsx rename to ts/features/wallet/screens/pidIssuance/PidIssuanceFailure.tsx index 259687f..fb461e1 100644 --- a/ts/features/wallet/screens/pidIssuance/Failure.tsx +++ b/ts/features/wallet/screens/pidIssuance/PidIssuanceFailure.tsx @@ -10,7 +10,7 @@ import {useHardwareBackButton} from '../../../../hooks/useHardwareBackButton'; * Filure screen of the pid issuance flow. * Currently it only shows a message and a button to go back to the main screen. */ -const Failure = () => { +const PidIssuanceFailure = () => { const {t} = useTranslation(['global', 'wallet']); const navigation = useNavigation(); const dispatch = useAppDispatch(); @@ -37,4 +37,4 @@ const Failure = () => { ); }; -export default Failure; +export default PidIssuanceFailure; diff --git a/ts/features/wallet/screens/pidIssuance/Issuance.tsx b/ts/features/wallet/screens/pidIssuance/PidIssuanceRequest.tsx similarity index 94% rename from ts/features/wallet/screens/pidIssuance/Issuance.tsx rename to ts/features/wallet/screens/pidIssuance/PidIssuanceRequest.tsx index 34547c0..c77f051 100644 --- a/ts/features/wallet/screens/pidIssuance/Issuance.tsx +++ b/ts/features/wallet/screens/pidIssuance/PidIssuanceRequest.tsx @@ -29,7 +29,7 @@ import {addCredential} from '../../store/credentials'; * A loading screen is shown until the PID is issued, then the user can see a preview of the PID and decide to add it to the wallet. * If the PID issuance fails, the user is redirected to the failure screen. */ -const Issuance = () => { +const PidIssuanceRequest = () => { const {t} = useTranslation(['wallet', 'global']); const navigation = useNavigation(); const dispatch = useAppDispatch(); @@ -43,7 +43,7 @@ const Issuance = () => { useEffect(() => { if (error.status === true) { navigation.navigate('MAIN_WALLET', { - screen: 'FAILURE' + screen: 'PID_ISSUANCE_FAILURE' }); } }, [error, navigation]); @@ -60,7 +60,7 @@ const Issuance = () => { const onAdd = (pidToAdd: StoredCredential) => { dispatch(addCredential({credential: pidToAdd})); dispatch(setLifecycle({lifecycle: Lifecycle.LIFECYCLE_VALID})); - navigation.navigate('MAIN_WALLET', {screen: 'SUCCESS'}); + navigation.navigate('MAIN_WALLET', {screen: 'PID_ISSUANCE_SUCCESS'}); }; const PidPreview = ({credential}: {credential: StoredCredential}) => ( @@ -103,7 +103,7 @@ const Issuance = () => { ); }; -export default Issuance; +export default PidIssuanceRequest; const styles = StyleSheet.create({ scroll: { diff --git a/ts/features/wallet/screens/pidIssuance/Success.tsx b/ts/features/wallet/screens/pidIssuance/PidIssuanceSuccess.tsx similarity index 95% rename from ts/features/wallet/screens/pidIssuance/Success.tsx rename to ts/features/wallet/screens/pidIssuance/PidIssuanceSuccess.tsx index 8022742..cc509bd 100644 --- a/ts/features/wallet/screens/pidIssuance/Success.tsx +++ b/ts/features/wallet/screens/pidIssuance/PidIssuanceSuccess.tsx @@ -10,7 +10,7 @@ import {useAppDispatch} from '../../../../store'; * It currently shows a message and two buttons: one to add the PID to the wallet and one to add it later. * They both redirect to the main screen. */ -const Success = () => { +const PidIssuanceSuccess = () => { const {t} = useTranslation(['wallet']); const navigation = useNavigation(); const dispatch = useAppDispatch(); @@ -40,4 +40,4 @@ const Success = () => { ); }; -export default Success; +export default PidIssuanceSuccess; diff --git a/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx b/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx index dded81f..de6456b 100644 --- a/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx +++ b/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx @@ -31,7 +31,7 @@ const WalletInstanceCreation = () => { useEffect(() => { if (success.status === true) { navigation.navigate('MAIN_WALLET', { - screen: 'ISSUANCE' + screen: 'PID_ISSUANCE_REQUEST' }); dispatch(resetInstanceCreation()); } @@ -40,7 +40,7 @@ const WalletInstanceCreation = () => { useEffect(() => { if (error.status === true) { navigation.navigate('MAIN_WALLET', { - screen: 'FAILURE' + screen: 'PID_ISSUANCE_FAILURE' }); } }, [error, navigation]); diff --git a/ts/navigation/RootStacknavigator.tsx b/ts/navigation/RootStacknavigator.tsx index 02cf6cf..9270974 100644 --- a/ts/navigation/RootStacknavigator.tsx +++ b/ts/navigation/RootStacknavigator.tsx @@ -21,7 +21,7 @@ import MAIN_ROUTES from './main/routes'; export type RootStackParamList = { // Main - [ROOT_ROUTES.TAB_NAV]: NavigatorScreenParams; + [ROOT_ROUTES.MAIN]: NavigatorScreenParams; [ROOT_ROUTES.ERROR]: undefined; [ROOT_ROUTES.LOADING]: undefined; [ROOT_ROUTES.ERROR]: undefined; @@ -63,7 +63,7 @@ export const RootStackNavigator = () => { case 'DONE': // Startup is done, check if onboarding is completed return isOnboardingCompleted - ? {name: ROOT_ROUTES.TAB_NAV, component: MainStackNavigator} + ? {name: ROOT_ROUTES.MAIN, component: MainStackNavigator} : {name: ROOT_ROUTES.ONBOARDING, component: OnboardingNavigator}; case 'ERROR': // An error occurred during startup diff --git a/ts/navigation/routes.tsx b/ts/navigation/routes.tsx index 43ee77f..eea409b 100644 --- a/ts/navigation/routes.tsx +++ b/ts/navigation/routes.tsx @@ -3,7 +3,7 @@ */ const ROOT_ROUTES = { // Main section - TAB_NAV: 'ROOT_TAB_NAV', + MAIN: 'ROOT_MAIN', ERROR: 'ROOT_ERROR', LOADING: 'ROOT_LOADING', diff --git a/ts/screens/WalletHome.tsx b/ts/screens/WalletHome.tsx index ef1aec2..9a2b2de 100644 --- a/ts/screens/WalletHome.tsx +++ b/ts/screens/WalletHome.tsx @@ -25,7 +25,7 @@ const WalletHome = () => { firstAction={{ icon: 'coggle', onPress: () => - navigation.navigate('ROOT_TAB_NAV', {screen: 'MAIN_SETTINGS'}), + navigation.navigate('ROOT_MAIN', {screen: 'MAIN_SETTINGS'}), accessibilityLabel: t('global:settings.title') }} /> From 5b5f62eba26bb5f875fba3bf7ac9d4e67df0d6b7 Mon Sep 17 00:00:00 2001 From: LazyAfternoons Date: Thu, 2 Jan 2025 15:25:40 +0100 Subject: [PATCH 2/3] refactor: add nav suffix for screens which contain a navigator --- ts/features/onboarding/screens/OnboardingCarousel.tsx | 2 +- ts/features/onboarding/screens/OnboardingStart.tsx | 2 +- ts/features/wallet/components/ActivationBanner.tsx | 2 +- .../wallet/screens/pidIssuance/PidIssuanceRequest.tsx | 4 ++-- .../screens/pidIssuance/WalletInstanceCreation.tsx | 4 ++-- ts/navigation/RootStacknavigator.tsx | 10 +++++----- ts/navigation/main/MainStackNavigator.tsx | 4 ++-- ts/navigation/main/routes.ts | 2 +- ts/navigation/routes.tsx | 4 ++-- ts/screens/WalletHome.tsx | 2 +- ts/screens/pin/PinCreation.tsx | 6 +++--- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ts/features/onboarding/screens/OnboardingCarousel.tsx b/ts/features/onboarding/screens/OnboardingCarousel.tsx index 940bb11..c710c01 100644 --- a/ts/features/onboarding/screens/OnboardingCarousel.tsx +++ b/ts/features/onboarding/screens/OnboardingCarousel.tsx @@ -27,7 +27,7 @@ export const OnboardingCarousel = () => { const {t} = useTranslation(['global', 'onboarding']); const skipCarousel = useCallback(() => { - navigation.navigate('ROOT_ONBOARDING', {screen: 'ONBOARDING_START'}); + navigation.navigate('ROOT_ONBOARDING_NAV', {screen: 'ONBOARDING_START'}); }, [navigation]); const nextStep = useCallback(() => { diff --git a/ts/features/onboarding/screens/OnboardingStart.tsx b/ts/features/onboarding/screens/OnboardingStart.tsx index 938e0d7..1a848a3 100644 --- a/ts/features/onboarding/screens/OnboardingStart.tsx +++ b/ts/features/onboarding/screens/OnboardingStart.tsx @@ -26,7 +26,7 @@ const OnboardingStart = () => { }); const onStartPress = () => - navigation.navigate('ROOT_ONBOARDING', { + navigation.navigate('ROOT_ONBOARDING_NAV', { screen: 'ONBOARDING_PIN_CREATION', params: {isOnboarding: true} }); diff --git a/ts/features/wallet/components/ActivationBanner.tsx b/ts/features/wallet/components/ActivationBanner.tsx index 66cfad0..a70e2e0 100644 --- a/ts/features/wallet/components/ActivationBanner.tsx +++ b/ts/features/wallet/components/ActivationBanner.tsx @@ -48,7 +48,7 @@ export const ActivationBanner = ({ action={action} labelClose={labelClose} onPress={() => - navigation.navigate('MAIN_WALLET', { + navigation.navigate('MAIN_WALLET_NAV', { screen: 'PID_ISSUANCE_INSTANCE_CREATION' }) } diff --git a/ts/features/wallet/screens/pidIssuance/PidIssuanceRequest.tsx b/ts/features/wallet/screens/pidIssuance/PidIssuanceRequest.tsx index c77f051..982e524 100644 --- a/ts/features/wallet/screens/pidIssuance/PidIssuanceRequest.tsx +++ b/ts/features/wallet/screens/pidIssuance/PidIssuanceRequest.tsx @@ -42,7 +42,7 @@ const PidIssuanceRequest = () => { useEffect(() => { if (error.status === true) { - navigation.navigate('MAIN_WALLET', { + navigation.navigate('MAIN_WALLET_NAV', { screen: 'PID_ISSUANCE_FAILURE' }); } @@ -60,7 +60,7 @@ const PidIssuanceRequest = () => { const onAdd = (pidToAdd: StoredCredential) => { dispatch(addCredential({credential: pidToAdd})); dispatch(setLifecycle({lifecycle: Lifecycle.LIFECYCLE_VALID})); - navigation.navigate('MAIN_WALLET', {screen: 'PID_ISSUANCE_SUCCESS'}); + navigation.navigate('MAIN_WALLET_NAV', {screen: 'PID_ISSUANCE_SUCCESS'}); }; const PidPreview = ({credential}: {credential: StoredCredential}) => ( diff --git a/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx b/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx index de6456b..3c53297 100644 --- a/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx +++ b/ts/features/wallet/screens/pidIssuance/WalletInstanceCreation.tsx @@ -30,7 +30,7 @@ const WalletInstanceCreation = () => { useEffect(() => { if (success.status === true) { - navigation.navigate('MAIN_WALLET', { + navigation.navigate('MAIN_WALLET_NAV', { screen: 'PID_ISSUANCE_REQUEST' }); dispatch(resetInstanceCreation()); @@ -39,7 +39,7 @@ const WalletInstanceCreation = () => { useEffect(() => { if (error.status === true) { - navigation.navigate('MAIN_WALLET', { + navigation.navigate('MAIN_WALLET_NAV', { screen: 'PID_ISSUANCE_FAILURE' }); } diff --git a/ts/navigation/RootStacknavigator.tsx b/ts/navigation/RootStacknavigator.tsx index 9270974..a55f5bc 100644 --- a/ts/navigation/RootStacknavigator.tsx +++ b/ts/navigation/RootStacknavigator.tsx @@ -21,17 +21,17 @@ import MAIN_ROUTES from './main/routes'; export type RootStackParamList = { // Main - [ROOT_ROUTES.MAIN]: NavigatorScreenParams; + [ROOT_ROUTES.MAIN_NAV]: NavigatorScreenParams; [ROOT_ROUTES.ERROR]: undefined; [ROOT_ROUTES.LOADING]: undefined; [ROOT_ROUTES.ERROR]: undefined; // Onboarding - [ROOT_ROUTES.ONBOARDING]: NavigatorScreenParams; + [ROOT_ROUTES.ONBOARDING_NAV]: NavigatorScreenParams; // Main navigator when onboarding is completed [MAIN_ROUTES.TAB_NAV]: undefined; - [MAIN_ROUTES.WALLET]: NavigatorScreenParams; + [MAIN_ROUTES.WALLET_NAV]: NavigatorScreenParams; }; const Stack = createNativeStackNavigator(); @@ -63,8 +63,8 @@ export const RootStackNavigator = () => { case 'DONE': // Startup is done, check if onboarding is completed return isOnboardingCompleted - ? {name: ROOT_ROUTES.MAIN, component: MainStackNavigator} - : {name: ROOT_ROUTES.ONBOARDING, component: OnboardingNavigator}; + ? {name: ROOT_ROUTES.MAIN_NAV, component: MainStackNavigator} + : {name: ROOT_ROUTES.ONBOARDING_NAV, component: OnboardingNavigator}; case 'ERROR': // An error occurred during startup return {name: ROOT_ROUTES.ERROR, component: () => <>}; // TODO: Add error screen diff --git a/ts/navigation/main/MainStackNavigator.tsx b/ts/navigation/main/MainStackNavigator.tsx index 6c1476e..08a9f37 100644 --- a/ts/navigation/main/MainStackNavigator.tsx +++ b/ts/navigation/main/MainStackNavigator.tsx @@ -14,7 +14,7 @@ import MAIN_ROUTES from './routes'; */ export type MainNavigatorParamsList = { [MAIN_ROUTES.TAB_NAV]: undefined; - [MAIN_ROUTES.WALLET]: NavigatorScreenParams; + [MAIN_ROUTES.WALLET_NAV]: NavigatorScreenParams; [MAIN_ROUTES.SETTINGS]: undefined; }; @@ -29,7 +29,7 @@ const MainStackNavigator = () => ( initialRouteName={MAIN_ROUTES.TAB_NAV} screenOptions={{headerShown: false}}> - + ); diff --git a/ts/navigation/main/routes.ts b/ts/navigation/main/routes.ts index 1ccb91b..4d0b9e5 100644 --- a/ts/navigation/main/routes.ts +++ b/ts/navigation/main/routes.ts @@ -4,7 +4,7 @@ const MAIN_ROUTES = { // Main section TAB_NAV: 'MAIN_TAB_NAV', - WALLET: 'MAIN_WALLET', + WALLET_NAV: 'MAIN_WALLET_NAV', SETTINGS: 'MAIN_SETTINGS' } as const; diff --git a/ts/navigation/routes.tsx b/ts/navigation/routes.tsx index eea409b..6e994ca 100644 --- a/ts/navigation/routes.tsx +++ b/ts/navigation/routes.tsx @@ -3,12 +3,12 @@ */ const ROOT_ROUTES = { // Main section - MAIN: 'ROOT_MAIN', + MAIN_NAV: 'ROOT_MAIN_NAV', ERROR: 'ROOT_ERROR', LOADING: 'ROOT_LOADING', // Onboarding - ONBOARDING: 'ROOT_ONBOARDING' + ONBOARDING_NAV: 'ROOT_ONBOARDING_NAV' } as const; export default ROOT_ROUTES; diff --git a/ts/screens/WalletHome.tsx b/ts/screens/WalletHome.tsx index 9a2b2de..dbdcd0d 100644 --- a/ts/screens/WalletHome.tsx +++ b/ts/screens/WalletHome.tsx @@ -25,7 +25,7 @@ const WalletHome = () => { firstAction={{ icon: 'coggle', onPress: () => - navigation.navigate('ROOT_MAIN', {screen: 'MAIN_SETTINGS'}), + navigation.navigate('ROOT_MAIN_NAV', {screen: 'MAIN_SETTINGS'}), accessibilityLabel: t('global:settings.title') }} /> diff --git a/ts/screens/pin/PinCreation.tsx b/ts/screens/pin/PinCreation.tsx index fdde13f..75132ab 100644 --- a/ts/screens/pin/PinCreation.tsx +++ b/ts/screens/pin/PinCreation.tsx @@ -75,19 +75,19 @@ export const PinCreation = () => { */ if (isOnboarding) { if (biometricState === 'Available') { - navigation.navigate('ROOT_ONBOARDING', { + navigation.navigate('ROOT_ONBOARDING_NAV', { screen: 'ONBOARDING_BIOMETRIC_AVAILABLE' }); return; } else { if (!hasDeviceScreenLock) { - navigation.navigate('ROOT_ONBOARDING', { + navigation.navigate('ROOT_ONBOARDING_NAV', { screen: 'ONBOARDING_BIOMETRIC_NO_SCREEN_LOCK' }); return; } if (biometricState === 'NotEnrolled') { - navigation.navigate('ROOT_ONBOARDING', { + navigation.navigate('ROOT_ONBOARDING_NAV', { screen: 'ONBOARDING_BIOMETRIC_NOT_ENROLLED' }); return; From 6c994aea3fdf8c079d32ff1fe821867dc95dee26 Mon Sep 17 00:00:00 2001 From: LazyAfternoons Date: Wed, 8 Jan 2025 15:19:37 +0100 Subject: [PATCH 3/3] fix: wrong navigation after merge conflict --- ts/features/wallet/saga/pid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/features/wallet/saga/pid.ts b/ts/features/wallet/saga/pid.ts index ec4aa87..e7dabf1 100644 --- a/ts/features/wallet/saga/pid.ts +++ b/ts/features/wallet/saga/pid.ts @@ -193,7 +193,7 @@ function* storePidWithIdentification( if (setIdentificationIdentified.match(resAction)) { yield* put(addCredential({credential: action.payload.credential})); yield* put(setLifecycle({lifecycle: Lifecycle.LIFECYCLE_VALID})); - navigate('MAIN_WALLET', {screen: 'SUCCESS'}); + navigate('MAIN_WALLET_NAV', {screen: 'PID_ISSUANCE_SUCCESS'}); } else { return; }