From 5e261c68feedd675f07b92bcb284014e4c25349d Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Fri, 3 Oct 2025 23:02:57 -0700 Subject: [PATCH 1/9] refactor(screens): reorganize screen directories --- app/src/hooks/useModal.ts | 2 +- app/src/navigation/account.ts | 90 ++++++++++ app/src/navigation/account.web.ts | 38 +++++ app/src/navigation/{system.tsx => app.tsx} | 14 +- app/src/navigation/document.ts | 103 ------------ app/src/navigation/documents.ts | 155 ++++++++++++++++++ app/src/navigation/home.ts | 50 +----- app/src/navigation/index.tsx | 22 +-- app/src/navigation/onboarding.ts | 35 ++++ app/src/navigation/recovery.ts | 67 -------- app/src/navigation/settings.ts | 75 --------- app/src/navigation/settings.web.ts | 52 ------ .../navigation/{recovery.web.ts => shared.ts} | 17 +- .../navigation/{prove.ts => verification.ts} | 13 +- .../recovery/AccountRecoveryChoiceScreen.tsx | 0 .../recovery/AccountRecoveryScreen.tsx | 0 .../recovery/DocumentDataNotFoundScreen.tsx | 0 .../recovery/RecoverWithPhraseScreen.tsx | 0 .../settings/CloudBackupScreen.tsx | 0 .../{ => account}/settings/SettingsScreen.tsx | 0 .../settings/ShowRecoveryPhraseScreen.tsx | 0 .../DeferredLinkingInfoScreen.tsx | 0 .../screens/{system => app}/LaunchScreen.tsx | 0 .../Loading.tsx => app/LoadingScreen.tsx} | 0 .../screens/{system => app}/ModalScreen.tsx | 0 .../screens/{system => app}/SplashScreen.tsx | 0 .../aadhaar/AadhaarUploadErrorScreen.tsx | 0 .../aadhaar/AadhaarUploadScreen.tsx | 0 .../aadhaar/AadhaarUploadedSuccessScreen.tsx | 0 .../management}/DocumentDataInfoScreen.tsx | 0 .../management}/IdDetailsScreen.tsx | 0 .../management}/ManageDocumentsScreen.tsx | 0 .../scanning}/DocumentCameraScreen.tsx | 0 .../scanning}/DocumentCameraTroubleScreen.tsx | 0 .../DocumentNFCMethodSelectionScreen.tsx | 0 .../scanning}/DocumentNFCScanScreen.tsx | 0 .../scanning}/DocumentNFCScanScreen.web.tsx | 0 .../scanning}/DocumentNFCTroubleScreen.tsx | 0 .../selection}/ConfirmBelongingScreen.tsx | 2 +- .../selection}/CountryPickerScreen.tsx | 0 .../selection}/DocumentOnboardingScreen.tsx | 0 .../selection}/IDPickerScreen.tsx | 0 .../AccountVerifiedSuccessScreen.tsx | 2 +- .../{home => onboarding}/DisclaimerScreen.tsx | 0 .../SaveRecoveryPhraseScreen.tsx | 0 .../{document => shared}/ComingSoonScreen.tsx | 0 .../ProofRequestStatusScreen.tsx | 0 .../{prove => verification}/ProveScreen.tsx | 0 .../QRCodeTroubleScreen.tsx | 0 .../QRCodeViewFinderScreen.tsx | 0 app/vite.config.ts | 8 +- 51 files changed, 360 insertions(+), 385 deletions(-) create mode 100644 app/src/navigation/account.ts create mode 100644 app/src/navigation/account.web.ts rename app/src/navigation/{system.tsx => app.tsx} (77%) delete mode 100644 app/src/navigation/document.ts create mode 100644 app/src/navigation/documents.ts create mode 100644 app/src/navigation/onboarding.ts delete mode 100644 app/src/navigation/recovery.ts delete mode 100644 app/src/navigation/settings.ts delete mode 100644 app/src/navigation/settings.web.ts rename app/src/navigation/{recovery.web.ts => shared.ts} (52%) rename app/src/navigation/{prove.ts => verification.ts} (74%) rename app/src/screens/{ => account}/recovery/AccountRecoveryChoiceScreen.tsx (100%) rename app/src/screens/{ => account}/recovery/AccountRecoveryScreen.tsx (100%) rename app/src/screens/{ => account}/recovery/DocumentDataNotFoundScreen.tsx (100%) rename app/src/screens/{ => account}/recovery/RecoverWithPhraseScreen.tsx (100%) rename app/src/screens/{ => account}/settings/CloudBackupScreen.tsx (100%) rename app/src/screens/{ => account}/settings/SettingsScreen.tsx (100%) rename app/src/screens/{ => account}/settings/ShowRecoveryPhraseScreen.tsx (100%) rename app/src/screens/{system => app}/DeferredLinkingInfoScreen.tsx (100%) rename app/src/screens/{system => app}/LaunchScreen.tsx (100%) rename app/src/screens/{system/Loading.tsx => app/LoadingScreen.tsx} (100%) rename app/src/screens/{system => app}/ModalScreen.tsx (100%) rename app/src/screens/{system => app}/SplashScreen.tsx (100%) rename app/src/screens/{document => documents}/aadhaar/AadhaarUploadErrorScreen.tsx (100%) rename app/src/screens/{document => documents}/aadhaar/AadhaarUploadScreen.tsx (100%) rename app/src/screens/{document => documents}/aadhaar/AadhaarUploadedSuccessScreen.tsx (100%) rename app/src/screens/{settings => documents/management}/DocumentDataInfoScreen.tsx (100%) rename app/src/screens/{home => documents/management}/IdDetailsScreen.tsx (100%) rename app/src/screens/{settings => documents/management}/ManageDocumentsScreen.tsx (100%) rename app/src/screens/{document => documents/scanning}/DocumentCameraScreen.tsx (100%) rename app/src/screens/{document => documents/scanning}/DocumentCameraTroubleScreen.tsx (100%) rename app/src/screens/{document => documents/scanning}/DocumentNFCMethodSelectionScreen.tsx (100%) rename app/src/screens/{document => documents/scanning}/DocumentNFCScanScreen.tsx (100%) rename app/src/screens/{document => documents/scanning}/DocumentNFCScanScreen.web.tsx (100%) rename app/src/screens/{document => documents/scanning}/DocumentNFCTroubleScreen.tsx (100%) rename app/src/screens/{document => documents/selection}/ConfirmBelongingScreen.tsx (98%) rename app/src/screens/{document => documents/selection}/CountryPickerScreen.tsx (100%) rename app/src/screens/{document => documents/selection}/DocumentOnboardingScreen.tsx (100%) rename app/src/screens/{document => documents/selection}/IDPickerScreen.tsx (100%) rename app/src/screens/{recovery => onboarding}/AccountVerifiedSuccessScreen.tsx (96%) rename app/src/screens/{home => onboarding}/DisclaimerScreen.tsx (100%) rename app/src/screens/{recovery => onboarding}/SaveRecoveryPhraseScreen.tsx (100%) rename app/src/screens/{document => shared}/ComingSoonScreen.tsx (100%) rename app/src/screens/{prove => verification}/ProofRequestStatusScreen.tsx (100%) rename app/src/screens/{prove => verification}/ProveScreen.tsx (100%) rename app/src/screens/{prove => verification}/QRCodeTroubleScreen.tsx (100%) rename app/src/screens/{prove => verification}/QRCodeViewFinderScreen.tsx (100%) diff --git a/app/src/hooks/useModal.ts b/app/src/hooks/useModal.ts index 58198c96e..97aa6e0b5 100644 --- a/app/src/hooks/useModal.ts +++ b/app/src/hooks/useModal.ts @@ -5,7 +5,7 @@ import { useCallback, useRef, useState } from 'react'; import { useNavigation } from '@react-navigation/native'; -import type { ModalParams } from '@/screens/system/ModalScreen'; +import type { ModalParams } from '@/screens/app/ModalScreen'; import { getModalCallbacks, registerModalCallbacks, diff --git a/app/src/navigation/account.ts b/app/src/navigation/account.ts new file mode 100644 index 000000000..f56188c81 --- /dev/null +++ b/app/src/navigation/account.ts @@ -0,0 +1,90 @@ +// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. +// SPDX-License-Identifier: BUSL-1.1 +// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. + +import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; + +import AccountRecoveryChoiceScreen from '@/screens/account/recovery/AccountRecoveryChoiceScreen'; +import AccountRecoveryScreen from '@/screens/account/recovery/AccountRecoveryScreen'; +import DocumentDataNotFoundScreen from '@/screens/account/recovery/DocumentDataNotFoundScreen'; +import RecoverWithPhraseScreen from '@/screens/account/recovery/RecoverWithPhraseScreen'; +import CloudBackupScreen from '@/screens/account/settings/CloudBackupScreen'; +import SettingsScreen from '@/screens/account/settings/SettingsScreen'; +import ShowRecoveryPhraseScreen from '@/screens/account/settings/ShowRecoveryPhraseScreen'; +import { black, slate300, white } from '@/utils/colors'; + +const accountScreens = { + AccountRecovery: { + screen: AccountRecoveryScreen, + options: { + headerShown: false, + } as NativeStackNavigationOptions, + }, + AccountRecoveryChoice: { + screen: AccountRecoveryChoiceScreen, + options: { + headerShown: false, + } as NativeStackNavigationOptions, + }, + DocumentDataNotFound: { + screen: DocumentDataNotFoundScreen, + options: { + headerShown: false, + gestureEnabled: false, + animation: 'slide_from_bottom', + } as NativeStackNavigationOptions, + }, + RecoverWithPhrase: { + screen: RecoverWithPhraseScreen, + options: { + headerTintColor: black, + title: 'Enter Recovery Phrase', + headerStyle: { + backgroundColor: black, + }, + headerTitleStyle: { + color: slate300, + }, + headerBackTitle: 'close', + } as NativeStackNavigationOptions, + }, + CloudBackupSettings: { + screen: CloudBackupScreen, + options: { + title: 'Cloud backup', + headerStyle: { + backgroundColor: black, + }, + headerTitleStyle: { + color: slate300, + }, + } as NativeStackNavigationOptions, + }, + Settings: { + screen: SettingsScreen, + options: { + animation: 'slide_from_bottom', + title: 'Settings', + headerStyle: { + backgroundColor: white, + }, + headerTitleStyle: { + color: black, + }, + } as NativeStackNavigationOptions, + config: { + screens: {}, + }, + }, + ShowRecoveryPhrase: { + screen: ShowRecoveryPhraseScreen, + options: { + title: 'Recovery Phrase', + headerStyle: { + backgroundColor: white, + }, + } as NativeStackNavigationOptions, + }, +}; + +export default accountScreens; diff --git a/app/src/navigation/account.web.ts b/app/src/navigation/account.web.ts new file mode 100644 index 000000000..b0a0df4c9 --- /dev/null +++ b/app/src/navigation/account.web.ts @@ -0,0 +1,38 @@ +// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. +// SPDX-License-Identifier: BUSL-1.1 +// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. + +import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; + +import DocumentDataNotFoundScreen from '@/screens/account/recovery/DocumentDataNotFoundScreen'; +import SettingsScreen from '@/screens/account/settings/SettingsScreen'; +import { black, white } from '@/utils/colors'; + +const accountScreens = { + DocumentDataNotFound: { + screen: DocumentDataNotFoundScreen, + options: { + headerShown: false, + gestureEnabled: false, + animation: 'slide_from_bottom', + } as NativeStackNavigationOptions, + }, + Settings: { + screen: SettingsScreen, + options: { + animation: 'slide_from_bottom', + title: 'Settings', + headerStyle: { + backgroundColor: white, + }, + headerTitleStyle: { + color: black, + }, + } as NativeStackNavigationOptions, + config: { + screens: {}, + }, + }, +}; + +export default accountScreens; diff --git a/app/src/navigation/system.tsx b/app/src/navigation/app.tsx similarity index 77% rename from app/src/navigation/system.tsx rename to app/src/navigation/app.tsx index d019933dd..8b501fc15 100644 --- a/app/src/navigation/system.tsx +++ b/app/src/navigation/app.tsx @@ -8,13 +8,13 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stac import type { DocumentCategory } from '@selfxyz/common/utils/types'; -import DeferredLinkingInfoScreen from '@/screens/system/DeferredLinkingInfoScreen'; -import LaunchScreen from '@/screens/system/LaunchScreen'; -import LoadingScreen from '@/screens/system/Loading'; -import ModalScreen from '@/screens/system/ModalScreen'; -import SplashScreen from '@/screens/system/SplashScreen'; +import DeferredLinkingInfoScreen from '@/screens/app/DeferredLinkingInfoScreen'; +import LaunchScreen from '@/screens/app/LaunchScreen'; +import LoadingScreen from '@/screens/app/LoadingScreen'; +import ModalScreen from '@/screens/app/ModalScreen'; +import SplashScreen from '@/screens/app/SplashScreen'; -const systemScreens = { +const appScreens = { Launch: { screen: LaunchScreen, options: { @@ -56,4 +56,4 @@ const systemScreens = { }, }; -export default systemScreens; +export default appScreens; diff --git a/app/src/navigation/document.ts b/app/src/navigation/document.ts deleted file mode 100644 index 13406bcc0..000000000 --- a/app/src/navigation/document.ts +++ /dev/null @@ -1,103 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. -// SPDX-License-Identifier: BUSL-1.1 -// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. - -import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; - -import ComingSoonScreen from '@/screens/document/ComingSoonScreen'; -import ConfirmBelongingScreen from '@/screens/document/ConfirmBelongingScreen'; -import CountryPickerScreen from '@/screens/document/CountryPickerScreen'; -import DocumentCameraScreen from '@/screens/document/DocumentCameraScreen'; -import DocumentCameraTroubleScreen from '@/screens/document/DocumentCameraTroubleScreen'; -import DocumentNFCMethodSelectionScreen from '@/screens/document/DocumentNFCMethodSelectionScreen'; -import DocumentNFCScanScreen from '@/screens/document/DocumentNFCScanScreen'; -import DocumentNFCTroubleScreen from '@/screens/document/DocumentNFCTroubleScreen'; -import DocumentOnboardingScreen from '@/screens/document/DocumentOnboardingScreen'; -import IDPickerScreen from '@/screens/document/IDPickerScreen'; - -const documentScreens = { - DocumentCamera: { - screen: DocumentCameraScreen, - options: { - headerShown: false, - animation: 'slide_from_bottom', - } as NativeStackNavigationOptions, - }, - DocumentCameraTrouble: { - screen: DocumentCameraTroubleScreen, - options: { - headerShown: false, - animation: 'slide_from_bottom', - presentation: 'modal', - } as NativeStackNavigationOptions, - }, - DocumentNFCScan: { - screen: DocumentNFCScanScreen, - options: { - headerShown: false, - animation: 'slide_from_bottom', - } as NativeStackNavigationOptions, - initialParams: { - passportNumber: '', - dateOfBirth: '', - dateOfExpiry: '', - }, - }, - DocumentNFCTrouble: { - screen: DocumentNFCTroubleScreen, - options: { - headerShown: false, - animation: 'slide_from_bottom', - presentation: 'modal', - } as NativeStackNavigationOptions, - }, - DocumentOnboarding: { - screen: DocumentOnboardingScreen, - options: { - animation: 'slide_from_bottom', - // presentation: 'modal' wanted to do this but seems to break stuff - headerShown: false, - } as NativeStackNavigationOptions, - }, - ComingSoon: { - screen: ComingSoonScreen, - options: { - headerShown: false, - } as NativeStackNavigationOptions, - initialParams: { - countryCode: null, - documentCategory: null, - }, - }, - DocumentNFCMethodSelection: { - screen: DocumentNFCMethodSelectionScreen, - options: { - headerShown: false, - animation: 'slide_from_bottom', - } as NativeStackNavigationOptions, - }, - CountryPicker: { - screen: CountryPickerScreen, - options: { - headerShown: false, - } as NativeStackNavigationOptions, - }, - IDPicker: { - screen: IDPickerScreen, - options: { - headerShown: false, - } as NativeStackNavigationOptions, - initialParams: { - countryCode: '', - documentTypes: [], - }, - }, - ConfirmBelonging: { - screen: ConfirmBelongingScreen, - options: { - headerShown: false, - } as NativeStackNavigationOptions, - }, -}; - -export default documentScreens; diff --git a/app/src/navigation/documents.ts b/app/src/navigation/documents.ts new file mode 100644 index 000000000..f0837242a --- /dev/null +++ b/app/src/navigation/documents.ts @@ -0,0 +1,155 @@ +// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. +// SPDX-License-Identifier: BUSL-1.1 +// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. + +import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; + +import { AadhaarNavBar, IdDetailsNavBar } from '@/components/NavBar'; +import AadhaarUploadedSuccessScreen from '@/screens/documents/aadhaar/AadhaarUploadedSuccessScreen'; +import AadhaarUploadErrorScreen from '@/screens/documents/aadhaar/AadhaarUploadErrorScreen'; +import AadhaarUploadScreen from '@/screens/documents/aadhaar/AadhaarUploadScreen'; +import ConfirmBelongingScreen from '@/screens/documents/selection/ConfirmBelongingScreen'; +import CountryPickerScreen from '@/screens/documents/selection/CountryPickerScreen'; +import DocumentOnboardingScreen from '@/screens/documents/selection/DocumentOnboardingScreen'; +import IDPickerScreen from '@/screens/documents/selection/IDPickerScreen'; +import DocumentCameraScreen from '@/screens/documents/scanning/DocumentCameraScreen'; +import DocumentCameraTroubleScreen from '@/screens/documents/scanning/DocumentCameraTroubleScreen'; +import DocumentNFCMethodSelectionScreen from '@/screens/documents/scanning/DocumentNFCMethodSelectionScreen'; +import DocumentNFCScanScreen from '@/screens/documents/scanning/DocumentNFCScanScreen'; +import DocumentNFCTroubleScreen from '@/screens/documents/scanning/DocumentNFCTroubleScreen'; +import DocumentDataInfoScreen from '@/screens/documents/management/DocumentDataInfoScreen'; +import IdDetailsScreen from '@/screens/documents/management/IdDetailsScreen'; +import ManageDocumentsScreen from '@/screens/documents/management/ManageDocumentsScreen'; +import { black, white } from '@/utils/colors'; + +const documentsScreens = { + DocumentCamera: { + screen: DocumentCameraScreen, + options: { + headerShown: false, + animation: 'slide_from_bottom', + } as NativeStackNavigationOptions, + }, + DocumentCameraTrouble: { + screen: DocumentCameraTroubleScreen, + options: { + headerShown: false, + animation: 'slide_from_bottom', + presentation: 'modal', + } as NativeStackNavigationOptions, + }, + DocumentNFCScan: { + screen: DocumentNFCScanScreen, + options: { + headerShown: false, + animation: 'slide_from_bottom', + } as NativeStackNavigationOptions, + initialParams: { + passportNumber: '', + dateOfBirth: '', + dateOfExpiry: '', + }, + }, + DocumentNFCTrouble: { + screen: DocumentNFCTroubleScreen, + options: { + headerShown: false, + animation: 'slide_from_bottom', + presentation: 'modal', + } as NativeStackNavigationOptions, + }, + DocumentNFCMethodSelection: { + screen: DocumentNFCMethodSelectionScreen, + options: { + headerShown: false, + animation: 'slide_from_bottom', + } as NativeStackNavigationOptions, + }, + DocumentOnboarding: { + screen: DocumentOnboardingScreen, + options: { + animation: 'slide_from_bottom', + headerShown: false, + } as NativeStackNavigationOptions, + }, + CountryPicker: { + screen: CountryPickerScreen, + options: { + headerShown: false, + } as NativeStackNavigationOptions, + }, + IDPicker: { + screen: IDPickerScreen, + options: { + headerShown: false, + } as NativeStackNavigationOptions, + initialParams: { + countryCode: '', + documentTypes: [], + }, + }, + ConfirmBelonging: { + screen: ConfirmBelongingScreen, + options: { + headerShown: false, + } as NativeStackNavigationOptions, + }, + IdDetails: { + screen: IdDetailsScreen, + options: { + title: '', + header: IdDetailsNavBar, + headerBackVisible: false, + }, + }, + ManageDocuments: { + screen: ManageDocumentsScreen, + options: { + title: 'Manage Documents', + headerStyle: { + backgroundColor: white, + }, + headerTitleStyle: { + color: black, + }, + } as NativeStackNavigationOptions, + }, + DocumentDataInfo: { + screen: DocumentDataInfoScreen, + options: { + title: 'Document Data Info', + headerStyle: { + backgroundColor: white, + }, + } as NativeStackNavigationOptions, + }, + AadhaarUpload: { + screen: AadhaarUploadScreen, + options: { + title: 'AADHAAR REGISTRATION', + header: AadhaarNavBar, + headerBackVisible: false, + } as NativeStackNavigationOptions, + }, + AadhaarUploadSuccess: { + screen: AadhaarUploadedSuccessScreen, + options: { + title: 'AADHAAR REGISTRATION', + header: AadhaarNavBar, + headerBackVisible: false, + } as NativeStackNavigationOptions, + }, + AadhaarUploadError: { + screen: AadhaarUploadErrorScreen, + options: { + title: 'AADHAAR REGISTRATION', + header: AadhaarNavBar, + headerBackVisible: false, + } as NativeStackNavigationOptions, + initialParams: { + errorType: 'general', + }, + }, +}; + +export default documentsScreens; diff --git a/app/src/navigation/home.ts b/app/src/navigation/home.ts index dcedddebd..e8471cc6a 100644 --- a/app/src/navigation/home.ts +++ b/app/src/navigation/home.ts @@ -4,25 +4,12 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; -import { HomeNavBar, IdDetailsNavBar } from '@/components/NavBar'; -import { AadhaarNavBar } from '@/components/NavBar/AadhaarNavBar'; -import AadhaarUploadedSuccessScreen from '@/screens/document/aadhaar/AadhaarUploadedSuccessScreen'; -import AadhaarUploadErrorScreen from '@/screens/document/aadhaar/AadhaarUploadErrorScreen'; -import AadhaarUploadScreen from '@/screens/document/aadhaar/AadhaarUploadScreen'; -import DisclaimerScreen from '@/screens/home/DisclaimerScreen'; +import { HomeNavBar } from '@/components/NavBar'; import HomeScreen from '@/screens/home/HomeScreen'; -import IdDetailsScreen from '@/screens/home/IdDetailsScreen'; import ProofHistoryDetailScreen from '@/screens/home/ProofHistoryDetailScreen'; import ProofHistoryScreen from '@/screens/home/ProofHistoryScreen'; const homeScreens = { - Disclaimer: { - screen: DisclaimerScreen, - options: { - title: 'Disclaimer', - headerShown: false, - } as NativeStackNavigationOptions, - }, Home: { screen: HomeScreen, options: { @@ -44,41 +31,6 @@ const homeScreens = { title: 'Approval', }, }, - IdDetails: { - screen: IdDetailsScreen, - options: { - title: '', - header: IdDetailsNavBar, // Use custom header - headerBackVisible: false, // Hide default back button - }, - }, - AadhaarUpload: { - screen: AadhaarUploadScreen, - options: { - title: 'AADHAAR REGISTRATION', - header: AadhaarNavBar, - headerBackVisible: false, - } as NativeStackNavigationOptions, - }, - AadhaarUploadSuccess: { - screen: AadhaarUploadedSuccessScreen, - options: { - title: 'AADHAAR REGISTRATION', - header: AadhaarNavBar, - headerBackVisible: false, - } as NativeStackNavigationOptions, - }, - AadhaarUploadError: { - screen: AadhaarUploadErrorScreen, - options: { - title: 'AADHAAR REGISTRATION', - header: AadhaarNavBar, - headerBackVisible: false, - } as NativeStackNavigationOptions, - initialParams: { - errorType: 'general', - }, - }, }; export default homeScreens; diff --git a/app/src/navigation/index.tsx b/app/src/navigation/index.tsx index c91514daf..d2b72f97e 100644 --- a/app/src/navigation/index.tsx +++ b/app/src/navigation/index.tsx @@ -16,23 +16,25 @@ import { useSelfClient } from '@selfxyz/mobile-sdk-alpha'; import { DefaultNavBar } from '@/components/NavBar'; import AppLayout from '@/layouts/AppLayout'; +import accountScreens from '@/navigation/account'; +import appScreens from '@/navigation/app'; import devScreens from '@/navigation/devTools'; -import documentScreens from '@/navigation/document'; +import documentsScreens from '@/navigation/documents'; import homeScreens from '@/navigation/home'; -import proveScreens from '@/navigation/prove'; -import recoveryScreens from '@/navigation/recovery'; -import settingsScreens from '@/navigation/settings'; -import systemScreens from '@/navigation/system'; +import onboardingScreens from '@/navigation/onboarding'; +import sharedScreens from '@/navigation/shared'; +import verificationScreens from '@/navigation/verification'; import analytics from '@/utils/analytics'; import { setupUniversalLinkListenerInNavigation } from '@/utils/deeplinks'; export const navigationScreens = { - ...systemScreens, - ...documentScreens, + ...appScreens, + ...onboardingScreens, ...homeScreens, - ...proveScreens, - ...settingsScreens, - ...recoveryScreens, + ...documentsScreens, + ...verificationScreens, + ...accountScreens, + ...sharedScreens, ...devScreens, // allow in production for testing }; const AppNavigation = createNativeStackNavigator({ diff --git a/app/src/navigation/onboarding.ts b/app/src/navigation/onboarding.ts new file mode 100644 index 000000000..4c034a545 --- /dev/null +++ b/app/src/navigation/onboarding.ts @@ -0,0 +1,35 @@ +// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. +// SPDX-License-Identifier: BUSL-1.1 +// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. + +import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; + +import AccountVerifiedSuccessScreen from '@/screens/onboarding/AccountVerifiedSuccessScreen'; +import DisclaimerScreen from '@/screens/onboarding/DisclaimerScreen'; +import SaveRecoveryPhraseScreen from '@/screens/onboarding/SaveRecoveryPhraseScreen'; + +const onboardingScreens = { + Disclaimer: { + screen: DisclaimerScreen, + options: { + title: 'Disclaimer', + headerShown: false, + } as NativeStackNavigationOptions, + }, + SaveRecoveryPhrase: { + screen: SaveRecoveryPhraseScreen, + options: { + headerShown: false, + animation: 'slide_from_bottom', + } as NativeStackNavigationOptions, + }, + AccountVerifiedSuccess: { + screen: AccountVerifiedSuccessScreen, + options: { + headerShown: false, + animation: 'slide_from_bottom', + } as NativeStackNavigationOptions, + }, +}; + +export default onboardingScreens; diff --git a/app/src/navigation/recovery.ts b/app/src/navigation/recovery.ts deleted file mode 100644 index 6e98ff2b0..000000000 --- a/app/src/navigation/recovery.ts +++ /dev/null @@ -1,67 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. -// SPDX-License-Identifier: BUSL-1.1 -// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. - -import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; - -import AccountRecoveryChoiceScreen from '@/screens/recovery/AccountRecoveryChoiceScreen'; -import AccountRecoveryScreen from '@/screens/recovery/AccountRecoveryScreen'; -import AccountVerifiedSuccessScreen from '@/screens/recovery/AccountVerifiedSuccessScreen'; -import DocumentDataNotFound from '@/screens/recovery/DocumentDataNotFoundScreen'; -import RecoverWithPhraseScreen from '@/screens/recovery/RecoverWithPhraseScreen'; -import SaveRecoveryPhraseScreen from '@/screens/recovery/SaveRecoveryPhraseScreen'; -import { black, slate300 } from '@/utils/colors'; - -const recoveryScreens = { - AccountRecovery: { - screen: AccountRecoveryScreen, - options: { - headerShown: false, - } as NativeStackNavigationOptions, - }, - AccountRecoveryChoice: { - screen: AccountRecoveryChoiceScreen, - options: { - headerShown: false, - } as NativeStackNavigationOptions, - }, - AccountVerifiedSuccess: { - screen: AccountVerifiedSuccessScreen, - options: { - headerShown: false, - animation: 'slide_from_bottom', - } as NativeStackNavigationOptions, - }, - DocumentDataNotFound: { - screen: DocumentDataNotFound, - options: { - headerShown: false, - gestureEnabled: false, - animation: 'slide_from_bottom', - // presentation: 'modal', - } as NativeStackNavigationOptions, - }, - RecoverWithPhrase: { - screen: RecoverWithPhraseScreen, - options: { - headerTintColor: black, - title: 'Enter Recovery Phrase', - headerStyle: { - backgroundColor: black, - }, - headerTitleStyle: { - color: slate300, - }, - headerBackTitle: 'close', - } as NativeStackNavigationOptions, - }, - SaveRecoveryPhrase: { - screen: SaveRecoveryPhraseScreen, - options: { - headerShown: false, - animation: 'slide_from_bottom', - } as NativeStackNavigationOptions, - }, -}; - -export default recoveryScreens; diff --git a/app/src/navigation/settings.ts b/app/src/navigation/settings.ts deleted file mode 100644 index 2c7a60c6b..000000000 --- a/app/src/navigation/settings.ts +++ /dev/null @@ -1,75 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. -// SPDX-License-Identifier: BUSL-1.1 -// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. - -import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; - -import CloudBackupScreen from '@/screens/settings/CloudBackupScreen'; -import DocumentDataInfoScreen from '@/screens/settings/DocumentDataInfoScreen'; -import ManageDocumentsScreen from '@/screens/settings/ManageDocumentsScreen'; -import SettingsScreen from '@/screens/settings/SettingsScreen'; -import ShowRecoveryPhraseScreen from '@/screens/settings/ShowRecoveryPhraseScreen'; -import { black, slate300, white } from '@/utils/colors'; - -const settingsScreens = { - CloudBackupSettings: { - screen: CloudBackupScreen, - options: { - title: 'Cloud backup', - headerStyle: { - backgroundColor: black, - }, - headerTitleStyle: { - color: slate300, - }, - } as NativeStackNavigationOptions, - }, - ManageDocuments: { - screen: ManageDocumentsScreen, - options: { - title: 'Manage Documents', - headerStyle: { - backgroundColor: white, - }, - headerTitleStyle: { - color: black, - }, - } as NativeStackNavigationOptions, - }, - DocumentDataInfo: { - screen: DocumentDataInfoScreen, - options: { - title: 'Document Data Info', - headerStyle: { - backgroundColor: white, - }, - } as NativeStackNavigationOptions, - }, - Settings: { - screen: SettingsScreen, - options: { - animation: 'slide_from_bottom', - title: 'Settings', - headerStyle: { - backgroundColor: white, - }, - headerTitleStyle: { - color: black, - }, - } as NativeStackNavigationOptions, - config: { - screens: {}, - }, - }, - ShowRecoveryPhrase: { - screen: ShowRecoveryPhraseScreen, - options: { - title: 'Recovery Phrase', - headerStyle: { - backgroundColor: white, - }, - } as NativeStackNavigationOptions, - }, -}; - -export default settingsScreens; diff --git a/app/src/navigation/settings.web.ts b/app/src/navigation/settings.web.ts deleted file mode 100644 index 2c192395a..000000000 --- a/app/src/navigation/settings.web.ts +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. -// SPDX-License-Identifier: BUSL-1.1 -// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. - -import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; - -import DocumentDataInfoScreen from '@/screens/settings/DocumentDataInfoScreen'; -import ManageDocumentsScreen from '@/screens/settings/ManageDocumentsScreen'; -import SettingsScreen from '@/screens/settings/SettingsScreen'; -import { black, white } from '@/utils/colors'; - -const settingsScreens = { - ManageDocuments: { - screen: ManageDocumentsScreen, - options: { - title: 'Manage Documents', - headerStyle: { - backgroundColor: white, - }, - headerTitleStyle: { - color: black, - }, - } as NativeStackNavigationOptions, - }, - DocumentDataInfo: { - screen: DocumentDataInfoScreen, - options: { - title: 'Document Data Info', - headerStyle: { - backgroundColor: white, - }, - } as NativeStackNavigationOptions, - }, - Settings: { - screen: SettingsScreen, - options: { - animation: 'slide_from_bottom', - title: 'Settings', - headerStyle: { - backgroundColor: white, - }, - headerTitleStyle: { - color: black, - }, - } as NativeStackNavigationOptions, - config: { - screens: {}, - }, - }, -}; - -export default settingsScreens; diff --git a/app/src/navigation/recovery.web.ts b/app/src/navigation/shared.ts similarity index 52% rename from app/src/navigation/recovery.web.ts rename to app/src/navigation/shared.ts index 211127c0a..e1defb90e 100644 --- a/app/src/navigation/recovery.web.ts +++ b/app/src/navigation/shared.ts @@ -4,18 +4,19 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; -import DocumentDataNotFound from '@/screens/recovery/DocumentDataNotFoundScreen'; +import ComingSoonScreen from '@/screens/shared/ComingSoonScreen'; -const recoveryScreens = { - DocumentDataNotFound: { - screen: DocumentDataNotFound, +const sharedScreens = { + ComingSoon: { + screen: ComingSoonScreen, options: { headerShown: false, - gestureEnabled: false, - animation: 'slide_from_bottom', - // presentation: 'modal', } as NativeStackNavigationOptions, + initialParams: { + countryCode: null, + documentCategory: null, + }, }, }; -export default recoveryScreens; +export default sharedScreens; diff --git a/app/src/navigation/prove.ts b/app/src/navigation/verification.ts similarity index 74% rename from app/src/navigation/prove.ts rename to app/src/navigation/verification.ts index e7e8bb94e..8feaeeb72 100644 --- a/app/src/navigation/prove.ts +++ b/app/src/navigation/verification.ts @@ -4,13 +4,13 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; -import ProofRequestStatusScreen from '@/screens/prove/ProofRequestStatusScreen'; -import ProveScreen from '@/screens/prove/ProveScreen'; -import QRCodeTroubleScreen from '@/screens/prove/QRCodeTroubleScreen'; -import QRCodeViewFinderScreen from '@/screens/prove/QRCodeViewFinderScreen'; +import ProofRequestStatusScreen from '@/screens/verification/ProofRequestStatusScreen'; +import ProveScreen from '@/screens/verification/ProveScreen'; +import QRCodeTroubleScreen from '@/screens/verification/QRCodeTroubleScreen'; +import QRCodeViewFinderScreen from '@/screens/verification/QRCodeViewFinderScreen'; import { black, white } from '@/utils/colors'; -const proveScreens = { +const verificationScreens = { ProofRequestStatus: { screen: ProofRequestStatusScreen, options: { @@ -43,9 +43,8 @@ const proveScreens = { options: { headerShown: false, animation: 'slide_from_bottom', - // presentation: 'modal', } as NativeStackNavigationOptions, }, }; -export default proveScreens; +export default verificationScreens; diff --git a/app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx b/app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx similarity index 100% rename from app/src/screens/recovery/AccountRecoveryChoiceScreen.tsx rename to app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx diff --git a/app/src/screens/recovery/AccountRecoveryScreen.tsx b/app/src/screens/account/recovery/AccountRecoveryScreen.tsx similarity index 100% rename from app/src/screens/recovery/AccountRecoveryScreen.tsx rename to app/src/screens/account/recovery/AccountRecoveryScreen.tsx diff --git a/app/src/screens/recovery/DocumentDataNotFoundScreen.tsx b/app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx similarity index 100% rename from app/src/screens/recovery/DocumentDataNotFoundScreen.tsx rename to app/src/screens/account/recovery/DocumentDataNotFoundScreen.tsx diff --git a/app/src/screens/recovery/RecoverWithPhraseScreen.tsx b/app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx similarity index 100% rename from app/src/screens/recovery/RecoverWithPhraseScreen.tsx rename to app/src/screens/account/recovery/RecoverWithPhraseScreen.tsx diff --git a/app/src/screens/settings/CloudBackupScreen.tsx b/app/src/screens/account/settings/CloudBackupScreen.tsx similarity index 100% rename from app/src/screens/settings/CloudBackupScreen.tsx rename to app/src/screens/account/settings/CloudBackupScreen.tsx diff --git a/app/src/screens/settings/SettingsScreen.tsx b/app/src/screens/account/settings/SettingsScreen.tsx similarity index 100% rename from app/src/screens/settings/SettingsScreen.tsx rename to app/src/screens/account/settings/SettingsScreen.tsx diff --git a/app/src/screens/settings/ShowRecoveryPhraseScreen.tsx b/app/src/screens/account/settings/ShowRecoveryPhraseScreen.tsx similarity index 100% rename from app/src/screens/settings/ShowRecoveryPhraseScreen.tsx rename to app/src/screens/account/settings/ShowRecoveryPhraseScreen.tsx diff --git a/app/src/screens/system/DeferredLinkingInfoScreen.tsx b/app/src/screens/app/DeferredLinkingInfoScreen.tsx similarity index 100% rename from app/src/screens/system/DeferredLinkingInfoScreen.tsx rename to app/src/screens/app/DeferredLinkingInfoScreen.tsx diff --git a/app/src/screens/system/LaunchScreen.tsx b/app/src/screens/app/LaunchScreen.tsx similarity index 100% rename from app/src/screens/system/LaunchScreen.tsx rename to app/src/screens/app/LaunchScreen.tsx diff --git a/app/src/screens/system/Loading.tsx b/app/src/screens/app/LoadingScreen.tsx similarity index 100% rename from app/src/screens/system/Loading.tsx rename to app/src/screens/app/LoadingScreen.tsx diff --git a/app/src/screens/system/ModalScreen.tsx b/app/src/screens/app/ModalScreen.tsx similarity index 100% rename from app/src/screens/system/ModalScreen.tsx rename to app/src/screens/app/ModalScreen.tsx diff --git a/app/src/screens/system/SplashScreen.tsx b/app/src/screens/app/SplashScreen.tsx similarity index 100% rename from app/src/screens/system/SplashScreen.tsx rename to app/src/screens/app/SplashScreen.tsx diff --git a/app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx b/app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx similarity index 100% rename from app/src/screens/document/aadhaar/AadhaarUploadErrorScreen.tsx rename to app/src/screens/documents/aadhaar/AadhaarUploadErrorScreen.tsx diff --git a/app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx b/app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx similarity index 100% rename from app/src/screens/document/aadhaar/AadhaarUploadScreen.tsx rename to app/src/screens/documents/aadhaar/AadhaarUploadScreen.tsx diff --git a/app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx b/app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx similarity index 100% rename from app/src/screens/document/aadhaar/AadhaarUploadedSuccessScreen.tsx rename to app/src/screens/documents/aadhaar/AadhaarUploadedSuccessScreen.tsx diff --git a/app/src/screens/settings/DocumentDataInfoScreen.tsx b/app/src/screens/documents/management/DocumentDataInfoScreen.tsx similarity index 100% rename from app/src/screens/settings/DocumentDataInfoScreen.tsx rename to app/src/screens/documents/management/DocumentDataInfoScreen.tsx diff --git a/app/src/screens/home/IdDetailsScreen.tsx b/app/src/screens/documents/management/IdDetailsScreen.tsx similarity index 100% rename from app/src/screens/home/IdDetailsScreen.tsx rename to app/src/screens/documents/management/IdDetailsScreen.tsx diff --git a/app/src/screens/settings/ManageDocumentsScreen.tsx b/app/src/screens/documents/management/ManageDocumentsScreen.tsx similarity index 100% rename from app/src/screens/settings/ManageDocumentsScreen.tsx rename to app/src/screens/documents/management/ManageDocumentsScreen.tsx diff --git a/app/src/screens/document/DocumentCameraScreen.tsx b/app/src/screens/documents/scanning/DocumentCameraScreen.tsx similarity index 100% rename from app/src/screens/document/DocumentCameraScreen.tsx rename to app/src/screens/documents/scanning/DocumentCameraScreen.tsx diff --git a/app/src/screens/document/DocumentCameraTroubleScreen.tsx b/app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx similarity index 100% rename from app/src/screens/document/DocumentCameraTroubleScreen.tsx rename to app/src/screens/documents/scanning/DocumentCameraTroubleScreen.tsx diff --git a/app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx b/app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx similarity index 100% rename from app/src/screens/document/DocumentNFCMethodSelectionScreen.tsx rename to app/src/screens/documents/scanning/DocumentNFCMethodSelectionScreen.tsx diff --git a/app/src/screens/document/DocumentNFCScanScreen.tsx b/app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx similarity index 100% rename from app/src/screens/document/DocumentNFCScanScreen.tsx rename to app/src/screens/documents/scanning/DocumentNFCScanScreen.tsx diff --git a/app/src/screens/document/DocumentNFCScanScreen.web.tsx b/app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx similarity index 100% rename from app/src/screens/document/DocumentNFCScanScreen.web.tsx rename to app/src/screens/documents/scanning/DocumentNFCScanScreen.web.tsx diff --git a/app/src/screens/document/DocumentNFCTroubleScreen.tsx b/app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx similarity index 100% rename from app/src/screens/document/DocumentNFCTroubleScreen.tsx rename to app/src/screens/documents/scanning/DocumentNFCTroubleScreen.tsx diff --git a/app/src/screens/document/ConfirmBelongingScreen.tsx b/app/src/screens/documents/selection/ConfirmBelongingScreen.tsx similarity index 98% rename from app/src/screens/document/ConfirmBelongingScreen.tsx rename to app/src/screens/documents/selection/ConfirmBelongingScreen.tsx index 74e48f873..3740d3858 100644 --- a/app/src/screens/document/ConfirmBelongingScreen.tsx +++ b/app/src/screens/documents/selection/ConfirmBelongingScreen.tsx @@ -21,7 +21,7 @@ import Description from '@/components/typography/Description'; import { Title } from '@/components/typography/Title'; import useHapticNavigation from '@/hooks/useHapticNavigation'; import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout'; -import { styles } from '@/screens/prove/ProofRequestStatusScreen'; +import { styles } from '@/screens/verification/ProofRequestStatusScreen'; import { useSettingStore } from '@/stores/settingStore'; import { flushAllAnalytics, trackNfcEvent } from '@/utils/analytics'; import { black, white } from '@/utils/colors'; diff --git a/app/src/screens/document/CountryPickerScreen.tsx b/app/src/screens/documents/selection/CountryPickerScreen.tsx similarity index 100% rename from app/src/screens/document/CountryPickerScreen.tsx rename to app/src/screens/documents/selection/CountryPickerScreen.tsx diff --git a/app/src/screens/document/DocumentOnboardingScreen.tsx b/app/src/screens/documents/selection/DocumentOnboardingScreen.tsx similarity index 100% rename from app/src/screens/document/DocumentOnboardingScreen.tsx rename to app/src/screens/documents/selection/DocumentOnboardingScreen.tsx diff --git a/app/src/screens/document/IDPickerScreen.tsx b/app/src/screens/documents/selection/IDPickerScreen.tsx similarity index 100% rename from app/src/screens/document/IDPickerScreen.tsx rename to app/src/screens/documents/selection/IDPickerScreen.tsx diff --git a/app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx b/app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx similarity index 96% rename from app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx rename to app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx index 0d6724476..b132209f5 100644 --- a/app/src/screens/recovery/AccountVerifiedSuccessScreen.tsx +++ b/app/src/screens/onboarding/AccountVerifiedSuccessScreen.tsx @@ -14,7 +14,7 @@ import { PrimaryButton } from '@/components/buttons/PrimaryButton'; import Description from '@/components/typography/Description'; import { Title } from '@/components/typography/Title'; import { ExpandableBottomLayout } from '@/layouts/ExpandableBottomLayout'; -import { styles } from '@/screens/prove/ProofRequestStatusScreen'; +import { styles } from '@/screens/verification/ProofRequestStatusScreen'; import { black, white } from '@/utils/colors'; import { buttonTap } from '@/utils/haptic'; diff --git a/app/src/screens/home/DisclaimerScreen.tsx b/app/src/screens/onboarding/DisclaimerScreen.tsx similarity index 100% rename from app/src/screens/home/DisclaimerScreen.tsx rename to app/src/screens/onboarding/DisclaimerScreen.tsx diff --git a/app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx b/app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx similarity index 100% rename from app/src/screens/recovery/SaveRecoveryPhraseScreen.tsx rename to app/src/screens/onboarding/SaveRecoveryPhraseScreen.tsx diff --git a/app/src/screens/document/ComingSoonScreen.tsx b/app/src/screens/shared/ComingSoonScreen.tsx similarity index 100% rename from app/src/screens/document/ComingSoonScreen.tsx rename to app/src/screens/shared/ComingSoonScreen.tsx diff --git a/app/src/screens/prove/ProofRequestStatusScreen.tsx b/app/src/screens/verification/ProofRequestStatusScreen.tsx similarity index 100% rename from app/src/screens/prove/ProofRequestStatusScreen.tsx rename to app/src/screens/verification/ProofRequestStatusScreen.tsx diff --git a/app/src/screens/prove/ProveScreen.tsx b/app/src/screens/verification/ProveScreen.tsx similarity index 100% rename from app/src/screens/prove/ProveScreen.tsx rename to app/src/screens/verification/ProveScreen.tsx diff --git a/app/src/screens/prove/QRCodeTroubleScreen.tsx b/app/src/screens/verification/QRCodeTroubleScreen.tsx similarity index 100% rename from app/src/screens/prove/QRCodeTroubleScreen.tsx rename to app/src/screens/verification/QRCodeTroubleScreen.tsx diff --git a/app/src/screens/prove/QRCodeViewFinderScreen.tsx b/app/src/screens/verification/QRCodeViewFinderScreen.tsx similarity index 100% rename from app/src/screens/prove/QRCodeViewFinderScreen.tsx rename to app/src/screens/verification/QRCodeViewFinderScreen.tsx diff --git a/app/vite.config.ts b/app/vite.config.ts index 5425c4cd9..719a93ddf 100644 --- a/app/vite.config.ts +++ b/app/vite.config.ts @@ -173,11 +173,11 @@ export default defineConfig({ 'vendor-state-zustand': ['zustand'], // Screen-specific chunks - more granular - 'screens-document-core': ['./src/navigation/document.ts'], + 'screens-document-core': ['./src/navigation/documents.ts'], 'screens-passport-nfc': ['./src/utils/nfcScanner.ts'], // Proving - split into even smaller chunks - 'screens-prove-core': ['./src/navigation/prove.ts'], + 'screens-prove-core': ['./src/navigation/verification.ts'], 'screens-prove-validation-core': [ './src/utils/proving/validateDocument.ts', ], @@ -192,8 +192,8 @@ export default defineConfig({ ], // Other screens - 'screens-settings': ['./src/navigation/settings.ts'], - 'screens-recovery': ['./src/navigation/recovery.ts'], + 'screens-settings': ['./src/navigation/account.ts'], + 'screens-recovery': ['./src/navigation/account.ts'], 'screens-dev': ['./src/navigation/devTools.ts'], }, }, From 3eff4e0deb376c9a7b5927460869be5ea985e271 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Fri, 3 Oct 2025 23:11:36 -0700 Subject: [PATCH 2/9] fix types, linting --- app/src/navigation/documents.ts | 14 +++++++------- .../screens/account/settings/SettingsScreen.tsx | 4 ++-- app/src/utils/cloudBackup/helpers.ts | 2 +- app/src/utils/email.ts | 2 +- app/vite.config.ts | 1 + 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/src/navigation/documents.ts b/app/src/navigation/documents.ts index f0837242a..750eccf42 100644 --- a/app/src/navigation/documents.ts +++ b/app/src/navigation/documents.ts @@ -8,18 +8,18 @@ import { AadhaarNavBar, IdDetailsNavBar } from '@/components/NavBar'; import AadhaarUploadedSuccessScreen from '@/screens/documents/aadhaar/AadhaarUploadedSuccessScreen'; import AadhaarUploadErrorScreen from '@/screens/documents/aadhaar/AadhaarUploadErrorScreen'; import AadhaarUploadScreen from '@/screens/documents/aadhaar/AadhaarUploadScreen'; -import ConfirmBelongingScreen from '@/screens/documents/selection/ConfirmBelongingScreen'; -import CountryPickerScreen from '@/screens/documents/selection/CountryPickerScreen'; -import DocumentOnboardingScreen from '@/screens/documents/selection/DocumentOnboardingScreen'; -import IDPickerScreen from '@/screens/documents/selection/IDPickerScreen'; +import DocumentDataInfoScreen from '@/screens/documents/management/DocumentDataInfoScreen'; +import IdDetailsScreen from '@/screens/documents/management/IdDetailsScreen'; +import ManageDocumentsScreen from '@/screens/documents/management/ManageDocumentsScreen'; import DocumentCameraScreen from '@/screens/documents/scanning/DocumentCameraScreen'; import DocumentCameraTroubleScreen from '@/screens/documents/scanning/DocumentCameraTroubleScreen'; import DocumentNFCMethodSelectionScreen from '@/screens/documents/scanning/DocumentNFCMethodSelectionScreen'; import DocumentNFCScanScreen from '@/screens/documents/scanning/DocumentNFCScanScreen'; import DocumentNFCTroubleScreen from '@/screens/documents/scanning/DocumentNFCTroubleScreen'; -import DocumentDataInfoScreen from '@/screens/documents/management/DocumentDataInfoScreen'; -import IdDetailsScreen from '@/screens/documents/management/IdDetailsScreen'; -import ManageDocumentsScreen from '@/screens/documents/management/ManageDocumentsScreen'; +import ConfirmBelongingScreen from '@/screens/documents/selection/ConfirmBelongingScreen'; +import CountryPickerScreen from '@/screens/documents/selection/CountryPickerScreen'; +import DocumentOnboardingScreen from '@/screens/documents/selection/DocumentOnboardingScreen'; +import IDPickerScreen from '@/screens/documents/selection/IDPickerScreen'; import { black, white } from '@/utils/colors'; const documentsScreens = { diff --git a/app/src/screens/account/settings/SettingsScreen.tsx b/app/src/screens/account/settings/SettingsScreen.tsx index 20b6e1af8..5b93b0054 100644 --- a/app/src/screens/account/settings/SettingsScreen.tsx +++ b/app/src/screens/account/settings/SettingsScreen.tsx @@ -35,13 +35,13 @@ import Web from '@/images/icons/webpage.svg'; import X from '@/images/icons/x.svg'; import type { RootStackParamList } from '@/navigation'; import { useSettingStore } from '@/stores/settingStore'; + +import { version } from '@/package.json'; import { amber500, black, neutral700, slate800, white } from '@/utils/colors'; import { extraYPadding } from '@/utils/constants'; import { impactLight } from '@/utils/haptic'; import { getCountry, getLocales, getTimeZone } from '@/utils/locale'; -import { version } from '../../../package.json'; - interface MenuButtonProps extends PropsWithChildren { Icon: React.FC; onPress: () => void; diff --git a/app/src/utils/cloudBackup/helpers.ts b/app/src/utils/cloudBackup/helpers.ts index 8566251e3..4a201165a 100644 --- a/app/src/utils/cloudBackup/helpers.ts +++ b/app/src/utils/cloudBackup/helpers.ts @@ -8,7 +8,7 @@ import { CloudStorage, CloudStorageScope } from 'react-native-cloud-storage'; import type { Mnemonic } from '@/types/mnemonic'; -import { name } from '../../../package.json'; +import { name } from '@/package.json'; export const FOLDER = `/${name}`; export const ENCRYPTED_FILE_PATH = `/${FOLDER}/encrypted-private-key`; diff --git a/app/src/utils/email.ts b/app/src/utils/email.ts index 0ebe00f67..750347ec4 100644 --- a/app/src/utils/email.ts +++ b/app/src/utils/email.ts @@ -7,7 +7,7 @@ import { getCountry, getLocales, getTimeZone } from 'react-native-localize'; import { sanitizeErrorMessage } from '@/utils/utils'; -import { version } from '../../package.json'; +import { version } from '@/package.json'; interface SendFeedbackEmailOptions { message: string; diff --git a/app/vite.config.ts b/app/vite.config.ts index 719a93ddf..0ebb3a567 100644 --- a/app/vite.config.ts +++ b/app/vite.config.ts @@ -32,6 +32,7 @@ export default defineConfig({ '@env': resolve(__dirname, 'env.ts'), '/src': resolve(__dirname, 'src'), '@': resolve(__dirname, 'src'), + '@/package.json': resolve(__dirname, 'package.json'), 'react-native-svg': 'react-native-svg-web', 'lottie-react-native': 'lottie-react', '@react-native-community/blur': resolve( From 02c61a90f64b1580ec02a9a603787ba27489cec6 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Fri, 3 Oct 2025 23:13:09 -0700 Subject: [PATCH 3/9] udpates --- app/src/screens/account/settings/SettingsScreen.tsx | 3 +-- app/src/utils/cloudBackup/helpers.ts | 2 +- app/src/utils/email.ts | 2 +- app/tsconfig.json | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/screens/account/settings/SettingsScreen.tsx b/app/src/screens/account/settings/SettingsScreen.tsx index 5b93b0054..b2ef9593e 100644 --- a/app/src/screens/account/settings/SettingsScreen.tsx +++ b/app/src/screens/account/settings/SettingsScreen.tsx @@ -34,9 +34,8 @@ import Telegram from '@/images/icons/telegram.svg'; import Web from '@/images/icons/webpage.svg'; import X from '@/images/icons/x.svg'; import type { RootStackParamList } from '@/navigation'; -import { useSettingStore } from '@/stores/settingStore'; - import { version } from '@/package.json'; +import { useSettingStore } from '@/stores/settingStore'; import { amber500, black, neutral700, slate800, white } from '@/utils/colors'; import { extraYPadding } from '@/utils/constants'; import { impactLight } from '@/utils/haptic'; diff --git a/app/src/utils/cloudBackup/helpers.ts b/app/src/utils/cloudBackup/helpers.ts index 4a201165a..8566251e3 100644 --- a/app/src/utils/cloudBackup/helpers.ts +++ b/app/src/utils/cloudBackup/helpers.ts @@ -8,7 +8,7 @@ import { CloudStorage, CloudStorageScope } from 'react-native-cloud-storage'; import type { Mnemonic } from '@/types/mnemonic'; -import { name } from '@/package.json'; +import { name } from '../../../package.json'; export const FOLDER = `/${name}`; export const ENCRYPTED_FILE_PATH = `/${FOLDER}/encrypted-private-key`; diff --git a/app/src/utils/email.ts b/app/src/utils/email.ts index 750347ec4..0ebe00f67 100644 --- a/app/src/utils/email.ts +++ b/app/src/utils/email.ts @@ -7,7 +7,7 @@ import { getCountry, getLocales, getTimeZone } from 'react-native-localize'; import { sanitizeErrorMessage } from '@/utils/utils'; -import { version } from '@/package.json'; +import { version } from '../../package.json'; interface SendFeedbackEmailOptions { message: string; diff --git a/app/tsconfig.json b/app/tsconfig.json index 1da1335af..50d64a664 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -10,6 +10,7 @@ "skipDefaultLibCheck": false, "paths": { "@env": ["./env.ts"], + "@/package.json": ["./package.json"], "@selfxyz/mobile-sdk-alpha": [ "../packages/mobile-sdk-alpha/src", "../packages/mobile-sdk-alpha/dist" From 2d53bc5f104a9a4be9150c8ce3c73b3294d22198 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Fri, 3 Oct 2025 23:40:59 -0700 Subject: [PATCH 4/9] fix lint issues --- app/src/components/NavBar/index.ts | 1 + app/src/components/homeScreen/idCard.tsx | 2 +- app/src/screens/account/settings/SettingsScreen.tsx | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/components/NavBar/index.ts b/app/src/components/NavBar/index.ts index a06a14949..6f9dec8f5 100644 --- a/app/src/components/NavBar/index.ts +++ b/app/src/components/NavBar/index.ts @@ -2,6 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. +export { AadhaarNavBar } from '@/components/NavBar/AadhaarNavBar'; export { DefaultNavBar } from '@/components/NavBar/DefaultNavBar'; export { HomeNavBar } from '@/components/NavBar/HomeNavBar'; export { IdDetailsNavBar } from '@/components/NavBar/IdDetailsNavBar'; diff --git a/app/src/components/homeScreen/idCard.tsx b/app/src/components/homeScreen/idCard.tsx index cea58cb35..3190d4f94 100644 --- a/app/src/components/homeScreen/idCard.tsx +++ b/app/src/components/homeScreen/idCard.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 // NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. -import type { FC } from 'react'; +import React, { type FC } from 'react'; import { Dimensions } from 'react-native'; import { Separator, Text, XStack, YStack } from 'tamagui'; diff --git a/app/src/screens/account/settings/SettingsScreen.tsx b/app/src/screens/account/settings/SettingsScreen.tsx index b2ef9593e..3d1b476d1 100644 --- a/app/src/screens/account/settings/SettingsScreen.tsx +++ b/app/src/screens/account/settings/SettingsScreen.tsx @@ -34,13 +34,14 @@ import Telegram from '@/images/icons/telegram.svg'; import Web from '@/images/icons/webpage.svg'; import X from '@/images/icons/x.svg'; import type { RootStackParamList } from '@/navigation'; -import { version } from '@/package.json'; import { useSettingStore } from '@/stores/settingStore'; import { amber500, black, neutral700, slate800, white } from '@/utils/colors'; import { extraYPadding } from '@/utils/constants'; import { impactLight } from '@/utils/haptic'; import { getCountry, getLocales, getTimeZone } from '@/utils/locale'; +import { version } from '../../../../package.json'; + interface MenuButtonProps extends PropsWithChildren { Icon: React.FC; onPress: () => void; From ac52be779805d806051044a5780d467ff0b2de6b Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Fri, 3 Oct 2025 23:53:49 -0700 Subject: [PATCH 5/9] fix vite --- app/vite.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/app/vite.config.ts b/app/vite.config.ts index 0ebb3a567..c9650356e 100644 --- a/app/vite.config.ts +++ b/app/vite.config.ts @@ -194,7 +194,6 @@ export default defineConfig({ // Other screens 'screens-settings': ['./src/navigation/account.ts'], - 'screens-recovery': ['./src/navigation/account.ts'], 'screens-dev': ['./src/navigation/devTools.ts'], }, }, From 23999e0504c52b7e555495f030509b51d42fe34b Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sat, 4 Oct 2025 11:29:12 -0700 Subject: [PATCH 6/9] pr feedback and fix missing bundle resolution --- app/package.json | 1 + app/src/navigation/account.ts | 11 ++--------- app/src/navigation/account.web.ts | 11 ++--------- app/src/providers/selfClientProvider.tsx | 2 +- app/tests/src/navigation.test.ts | 2 +- yarn.lock | 11 +++++++++++ 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/app/package.json b/app/package.json index dda84f96c..8a2a84a7b 100644 --- a/app/package.json +++ b/app/package.json @@ -129,6 +129,7 @@ "react-dom": "^18.3.1", "react-native": "0.76.9", "react-native-app-auth": "^8.0.3", + "react-native-b4a": "^0.0.4", "react-native-biometrics": "^3.0.1", "react-native-check-version": "^1.3.0", "react-native-cloud-storage": "^2.2.2", diff --git a/app/src/navigation/account.ts b/app/src/navigation/account.ts index f56188c81..49607d55d 100644 --- a/app/src/navigation/account.ts +++ b/app/src/navigation/account.ts @@ -6,7 +6,7 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stac import AccountRecoveryChoiceScreen from '@/screens/account/recovery/AccountRecoveryChoiceScreen'; import AccountRecoveryScreen from '@/screens/account/recovery/AccountRecoveryScreen'; -import DocumentDataNotFoundScreen from '@/screens/account/recovery/DocumentDataNotFoundScreen'; +// Removed DocumentDataNotFound route; use ComingSoon instead where needed import RecoverWithPhraseScreen from '@/screens/account/recovery/RecoverWithPhraseScreen'; import CloudBackupScreen from '@/screens/account/settings/CloudBackupScreen'; import SettingsScreen from '@/screens/account/settings/SettingsScreen'; @@ -26,14 +26,7 @@ const accountScreens = { headerShown: false, } as NativeStackNavigationOptions, }, - DocumentDataNotFound: { - screen: DocumentDataNotFoundScreen, - options: { - headerShown: false, - gestureEnabled: false, - animation: 'slide_from_bottom', - } as NativeStackNavigationOptions, - }, + // DocumentDataNotFound screen entry removed RecoverWithPhrase: { screen: RecoverWithPhraseScreen, options: { diff --git a/app/src/navigation/account.web.ts b/app/src/navigation/account.web.ts index b0a0df4c9..57e4a1e3b 100644 --- a/app/src/navigation/account.web.ts +++ b/app/src/navigation/account.web.ts @@ -4,19 +4,12 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; -import DocumentDataNotFoundScreen from '@/screens/account/recovery/DocumentDataNotFoundScreen'; +// Removed DocumentDataNotFound route; use ComingSoon instead where needed import SettingsScreen from '@/screens/account/settings/SettingsScreen'; import { black, white } from '@/utils/colors'; const accountScreens = { - DocumentDataNotFound: { - screen: DocumentDataNotFoundScreen, - options: { - headerShown: false, - gestureEnabled: false, - animation: 'slide_from_bottom', - } as NativeStackNavigationOptions, - }, + // DocumentDataNotFound screen entry removed Settings: { screen: SettingsScreen, options: { diff --git a/app/src/providers/selfClientProvider.tsx b/app/src/providers/selfClientProvider.tsx index d23b30e10..d096ebd5b 100644 --- a/app/src/providers/selfClientProvider.tsx +++ b/app/src/providers/selfClientProvider.tsx @@ -105,7 +105,7 @@ export const SelfClientProvider = ({ children }: PropsWithChildren) => { addListener(SdkEvents.PROVING_PASSPORT_DATA_NOT_FOUND, () => { if (navigationRef.isReady()) { - navigationRef.navigate('DocumentDataNotFound'); + navigationRef.navigate('ComingSoon'); } }); diff --git a/app/tests/src/navigation.test.ts b/app/tests/src/navigation.test.ts index db7e963da..753975d9f 100644 --- a/app/tests/src/navigation.test.ts +++ b/app/tests/src/navigation.test.ts @@ -28,7 +28,7 @@ describe('navigation', () => { 'DocumentCamera', 'DocumentCameraTrouble', 'DocumentDataInfo', - 'DocumentDataNotFound', + // 'DocumentDataNotFound' removed; use ComingSoon instead 'DocumentNFCMethodSelection', 'DocumentNFCScan', 'DocumentNFCTrouble', diff --git a/yarn.lock b/yarn.lock index 5d724a06c..7eddc2fe1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7403,6 +7403,7 @@ __metadata: react-dom: "npm:^18.3.1" react-native: "npm:0.76.9" react-native-app-auth: "npm:^8.0.3" + react-native-b4a: "npm:^0.0.4" react-native-biometrics: "npm:^3.0.1" react-native-check-version: "npm:^1.3.0" react-native-cloud-storage: "npm:^2.2.2" @@ -26464,6 +26465,16 @@ __metadata: languageName: node linkType: hard +"react-native-b4a@npm:^0.0.4": + version: 0.0.4 + resolution: "react-native-b4a@npm:0.0.4" + peerDependencies: + react: "*" + react-native: "*" + checksum: 10c0/6ab917c5a511be2110f1f3d9a226b8dd621829fd202ea84efa73a0e9f3ff619b01c6bada250b338cf5da49d1c329290af4c836ac274000521c9feab536bd0ecb + languageName: node + linkType: hard + "react-native-base64@npm:0.0.2": version: 0.0.2 resolution: "react-native-base64@npm:0.0.2" From 8b892d2968a11c6102e37ca70c6f61a63a152f42 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sat, 4 Oct 2025 14:05:05 -0700 Subject: [PATCH 7/9] remove b4a; breaks build --- app/package.json | 1 - yarn.lock | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/app/package.json b/app/package.json index 8a2a84a7b..dda84f96c 100644 --- a/app/package.json +++ b/app/package.json @@ -129,7 +129,6 @@ "react-dom": "^18.3.1", "react-native": "0.76.9", "react-native-app-auth": "^8.0.3", - "react-native-b4a": "^0.0.4", "react-native-biometrics": "^3.0.1", "react-native-check-version": "^1.3.0", "react-native-cloud-storage": "^2.2.2", diff --git a/yarn.lock b/yarn.lock index 7eddc2fe1..5d724a06c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7403,7 +7403,6 @@ __metadata: react-dom: "npm:^18.3.1" react-native: "npm:0.76.9" react-native-app-auth: "npm:^8.0.3" - react-native-b4a: "npm:^0.0.4" react-native-biometrics: "npm:^3.0.1" react-native-check-version: "npm:^1.3.0" react-native-cloud-storage: "npm:^2.2.2" @@ -26465,16 +26464,6 @@ __metadata: languageName: node linkType: hard -"react-native-b4a@npm:^0.0.4": - version: 0.0.4 - resolution: "react-native-b4a@npm:0.0.4" - peerDependencies: - react: "*" - react-native: "*" - checksum: 10c0/6ab917c5a511be2110f1f3d9a226b8dd621829fd202ea84efa73a0e9f3ff619b01c6bada250b338cf5da49d1c329290af4c836ac274000521c9feab536bd0ecb - languageName: node - linkType: hard - "react-native-base64@npm:0.0.2": version: 0.0.2 resolution: "react-native-base64@npm:0.0.2" From b2de8e00d6df877d3a420e12031269fbebf384a6 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Wed, 8 Oct 2025 14:13:19 -0700 Subject: [PATCH 8/9] update gemfile.lock --- app/Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Gemfile.lock b/app/Gemfile.lock index 6d8fcf190..70f7d78f6 100644 --- a/app/Gemfile.lock +++ b/app/Gemfile.lock @@ -25,7 +25,7 @@ GEM artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.4.0) - aws-partitions (1.1168.0) + aws-partitions (1.1170.0) aws-sdk-core (3.233.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) @@ -46,7 +46,7 @@ GEM babosa (1.0.4) base64 (0.3.0) benchmark (0.4.1) - bigdecimal (3.2.3) + bigdecimal (3.3.0) claide (1.1.0) cocoapods (1.16.2) addressable (~> 2.8) @@ -225,14 +225,14 @@ GEM i18n (1.14.7) concurrent-ruby (~> 1.0) jmespath (1.6.2) - json (2.15.0) + json (2.15.1) jwt (2.10.2) base64 logger (1.7.0) mini_magick (4.13.2) mini_mime (1.1.5) mini_portile2 (2.8.9) - minitest (5.25.5) + minitest (5.26.0) molinillo (0.8.0) multi_json (1.17.0) multipart-post (2.4.1) From 39f04315e693d82b0f046fddd419332514550bdf Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Wed, 8 Oct 2025 14:47:13 -0700 Subject: [PATCH 9/9] use DocumentNotFound screen --- app/src/navigation/account.ts | 9 +++++++-- app/src/navigation/account.web.ts | 2 -- app/src/providers/selfClientProvider.tsx | 2 +- app/tests/src/navigation.test.ts | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/navigation/account.ts b/app/src/navigation/account.ts index 49607d55d..5ee1467ab 100644 --- a/app/src/navigation/account.ts +++ b/app/src/navigation/account.ts @@ -6,7 +6,7 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stac import AccountRecoveryChoiceScreen from '@/screens/account/recovery/AccountRecoveryChoiceScreen'; import AccountRecoveryScreen from '@/screens/account/recovery/AccountRecoveryScreen'; -// Removed DocumentDataNotFound route; use ComingSoon instead where needed +import DocumentDataNotFoundScreen from '@/screens/account/recovery/DocumentDataNotFoundScreen'; import RecoverWithPhraseScreen from '@/screens/account/recovery/RecoverWithPhraseScreen'; import CloudBackupScreen from '@/screens/account/settings/CloudBackupScreen'; import SettingsScreen from '@/screens/account/settings/SettingsScreen'; @@ -26,7 +26,6 @@ const accountScreens = { headerShown: false, } as NativeStackNavigationOptions, }, - // DocumentDataNotFound screen entry removed RecoverWithPhrase: { screen: RecoverWithPhraseScreen, options: { @@ -41,6 +40,12 @@ const accountScreens = { headerBackTitle: 'close', } as NativeStackNavigationOptions, }, + DocumentDataNotFound: { + screen: DocumentDataNotFoundScreen, + options: { + headerShown: false, + } as NativeStackNavigationOptions, + }, CloudBackupSettings: { screen: CloudBackupScreen, options: { diff --git a/app/src/navigation/account.web.ts b/app/src/navigation/account.web.ts index 57e4a1e3b..b535d29f1 100644 --- a/app/src/navigation/account.web.ts +++ b/app/src/navigation/account.web.ts @@ -4,12 +4,10 @@ import type { NativeStackNavigationOptions } from '@react-navigation/native-stack'; -// Removed DocumentDataNotFound route; use ComingSoon instead where needed import SettingsScreen from '@/screens/account/settings/SettingsScreen'; import { black, white } from '@/utils/colors'; const accountScreens = { - // DocumentDataNotFound screen entry removed Settings: { screen: SettingsScreen, options: { diff --git a/app/src/providers/selfClientProvider.tsx b/app/src/providers/selfClientProvider.tsx index 2ff99c481..e99b80ee9 100644 --- a/app/src/providers/selfClientProvider.tsx +++ b/app/src/providers/selfClientProvider.tsx @@ -105,7 +105,7 @@ export const SelfClientProvider = ({ children }: PropsWithChildren) => { addListener(SdkEvents.PROVING_PASSPORT_DATA_NOT_FOUND, () => { if (navigationRef.isReady()) { - navigationRef.navigate('ComingSoon'); + navigationRef.navigate('DocumentDataNotFound'); } }); diff --git a/app/tests/src/navigation.test.ts b/app/tests/src/navigation.test.ts index 753975d9f..db7e963da 100644 --- a/app/tests/src/navigation.test.ts +++ b/app/tests/src/navigation.test.ts @@ -28,7 +28,7 @@ describe('navigation', () => { 'DocumentCamera', 'DocumentCameraTrouble', 'DocumentDataInfo', - // 'DocumentDataNotFound' removed; use ComingSoon instead + 'DocumentDataNotFound', 'DocumentNFCMethodSelection', 'DocumentNFCScan', 'DocumentNFCTrouble',