* fix(app): gate passport OCR camera in TS to stop Android permission loop (SELF-2645)
Denying the camera system prompt on the Android passport OCR scan screen
previously re-fired the prompt repeatedly (the UI "blinked") because the
native CameraFragment re-requested permission from onResume each time the
permission dialog dismissed. On iOS the scanner view silently stayed black
after denial. Both were caused by permission handling living in the native
layer with no TypeScript gate.
Move the gate to TypeScript:
- Pre-navigation check in DocumentOnboardingScreen routes denials to a
KYC fallback via useKycLauncher instead of navigating into the camera.
- DocumentCameraScreen tracks permission in a cameraReady state and skips
the <PassportCamera> render until confirmed granted; AppState foreground
transitions re-check and dismount on revocation. This eliminates the
iOS black scanner view entirely.
The broken native Android permission code (CameraFragment onResume +
inverted hasCameraPermission()) is now unreachable dead code. Cleaning it
up is tracked as a follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(ios): link Camera permission handler in Podfile (SELF-2645)
Without `setup_permissions(["Camera"])` in the Podfile, the iOS app has
the react-native-permissions JS wrapper but no native handler linked, so
`check(PERMISSIONS.IOS.CAMERA)` throws and the passport OCR gate falls
through to the "Camera not available" alert on real iPhones with working
cameras.
Run `cd app/ios && pod install` after pulling this commit. The matching
Podfile.lock update will land in a follow-up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* update lock file
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>
* Add support UUID diagnostics across mobile app
* save wip
* pr feedback
* pr feedback
* refactor
* clean up
* use hook to fetch support uuid
* formatting
* enable toggle
* chore: swap @sumsub/react-native-mobilesdk-module for @didit-protocol/sdk-react-native
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore: rename SUMSUB_TEE_URL to DIDIT_TEE_URL
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: rename PendingKycVerification.userId to sessionId
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add Didit integration module, remove Sumsub integration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add useDiditWebSocket hook, remove useSumsubWebSocket
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add useDiditLauncher hook, remove useSumsubLauncher
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: rename userId to sessionId in pendingKycStore, bump persist version
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: rename sumsub error injection triggers to didit
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: rename KycSuccess route param userId to sessionId
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: update KycSuccessScreen to use useDiditWebSocket and sessionId
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: update all consumer files from Sumsub to Didit
Updates usePendingKycRecovery, selfClientProvider, 5 fallback screens,
LogoConfirmationScreen, HomeScreen, KYCVerifiedScreen, and KycIdCard.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* test: update jest mocks and config for Didit SDK
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* build: swap Sumsub native deps for Didit in Podfile and build.gradle
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: remove hardcoded sumsub namespace from nullifier generation
Read namespace from id_type field instead of hardcoding 'sumsub'.
The didit-tee encodes id_type as [namespace_len][namespace][doc_type],
so the namespace is already in the signed data.
Also fix deserializeApplicantInfo to parse the namespaced encoding
and extract just the document type for display.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: lint and formatting issues from Didit migration
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add register_kyc support to build_r1cs_wasm.sh and build_cpp.sh
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use circuits/node_modules paths in build_r1cs_wasm.sh
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: emit ack_success after receiving KYC data to trigger session deletion
The didit-tee now expects the client to ack receipt of signed data,
which triggers DELETE of the session from Didit's API for data cleanup.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use raw bytes for KYC commitment/nullifier instead of deserialize+reserialize
The deserialize→reserialize path strips the namespace prefix from
id_type, producing different bytes than the TEE signed. Work on the
raw base64-decoded bytes directly to match the circuit inputs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: lint
* Revert "fix: lint"
This reverts commit d3dde1460b.
* fix: lint
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add tmate session to debug e2e workflow
* Don't run ios e2e
* Debug wip
* Debug wip
* Debug wip
* Enhance mobile E2E workflow by adding pre-installation step for emulator dependencies. This ensures the necessary Android SDK components are available for testing, improving the reliability of the build verification process.
* Add KVM group permissions setup to mobile E2E workflow
This update introduces a step to enable KVM group permissions in the mobile E2E workflow. This change ensures that the necessary permissions are configured for KVM, enhancing the environment setup for emulator testing and improving overall build verification reliability.
* Run e2e in self-hosted runners
* Fix JVM install
* Fix JVM install
* KVM check
* Refactor KVM access check in mobile E2E workflow
This update modifies the KVM access check step to provide a warning if /dev/kvm is not found, allowing the emulator to run in software mode instead of failing the workflow. Additionally, it dynamically adjusts the emulator options based on KVM availability, improving performance and flexibility in the testing environment.
* Adding tmate for debugging
* Adding retry logc to sdkmanger install
* Changing android channel to stable
* Add installation of emulator runtime dependencies in mobile E2E workflow
This update introduces a step to install necessary runtime dependencies for the Android emulator, ensuring a smoother testing environment and improving the reliability of the mobile end-to-end testing process.
* Fix APK install command
* Update Android api
* Update android emulator version
* Add E2E test script to mobile workflow
This commit introduces a new script for running end-to-end tests on the Android emulator. The script handles app installation and execution of Maestro tests, improving the organization and readability of the workflow. The previous inline commands have been replaced with a dedicated script, enhancing maintainability and clarity in the testing process.
* fix e2e test
* improve maestro test
* try workflow again
* attempt fix
* fix
* another try
* clean up wording to reflect it's fixed
---------
Co-authored-by: Javier Cortejoso <javier.cortejoso@gmail.com>
* Show badge for inactive documents
* fix
* refactor to use the new flag
* add inactive check to ProveScreen
* lint
* fix for proving button not working
* use new qrHashlogic
* increase bundle size threshold to 46MB
* remove commented out line
* add kyc related changes
---------
Co-authored-by: seshanthS <seshanth@protonmail.com>
* feat: initial logoConfirmation screen
* fix: center text in buttons
* fix: ensure biometric logo is not cropped
* fix: add spacing to logo confirm screen, consistent padding for buttons
* feat: add popup to logo confirmation screen
* fix: handle Sumsub cancellation correctly in Other ID flow
* feat: add pathway from logo confirmation -> sumsub -> success
* feat: add document type pre-selection for Sumsub SDK
* feat: add KycFailureScreen for when user clicks on failure notification
* feat: add KycConnectionErrorScreen for sumsub_initiation error
* refactor: edit RegistrationFallbackScreen for new design
Now only to be used for MRZ/NFC scan errors, instead of kyc connection/registration issues. Also updated to newest design for screen from Figma
* refactor: update AadhaarUploadErrorScreen for new design
* fix: removed unused countryCode variable and useRoute import
* fix: Sorted imports (moved kyc after documents/selection imports)
fix CI
* chore: lint/prettier
* fix: CI error
* refactor: Split RegistrationFallbackScreen into MRZ/NFC error versions
* feat: add link from RegistrationFallbackNFCScreen -> DocumentNFCTrouble
Clicking on the question mark now takes user to this screen that can help them diagnose issue
* fix: on clicking question mark, dismiss screen returns to correct screen
* chore: yarn prettier
* test: fix failing test for CI