* 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>
* enable logs
* improve NFC observability logging and add session-scoped log grouping
* Enhance logging by adding session ID to lokiTransport for improved traceability
* fix: patch Podfile for WalletConnect Pay removal and Haptic feedback framework addition
Removed the YttriumWrapper dependency from the react-native-compat podspec as it is not used in the Self app, preventing build failures. Additionally, patched the react-native-haptic-feedback podspec to include the AudioToolbox framework, ensuring proper functionality of haptic feedback features.
* Update app/ios/Podfile
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* Update app/ios/Podfile
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
---------
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
* 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>
* clean up permissions
* updates for permissions
* update permissions and packages
* fix: mark device ID collection as linked in privacy manifest
Address CodeRabbit feedback:
- Set NSPrivacyCollectedDataTypeLinked to true (device signals are tied to applicant identity)
- Clarify Android Data Safety checklist requirements with explicit data-linking declaration
Co-authored-by: Cursor <cursoragent@cursor.com>
* remove for now
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* Update dependency versions
* Fix gesture handler Android dependency (#1611)
* Patch screens codegen type (#1609)
* Downgrade Sentry React Native (#1612)
* fix patches and packages
* downgrade versions for gesture handler and screens
* agent feedback
* fix ios building
* allow ios tets to pass
* formatting
* make cache more resilient
* Address CodeRabbitAI review comments
This commit addresses all 7 unresolved CodeRabbitAI comments on PR #1606:
Patch-package error handling (comments #1, #2, #3):
- stderr capture already implemented in both root and workspace patch runs
- Add CI warning when patches fail silently instead of exiting with 0
- Log completion status in CI mode for visibility
Critical Mixpanel dependency fix (comment #5):
- Add explicit Mixpanel-swift pod declaration to fix E2E build failures
- Ensures Mixpanel is available even when NFCPassportReader is skipped during E2E testing
React-native-web validation (comment #4):
- Verified no usage of deprecated findNodeHandle, pointerEvents: 'box-none', or createPortal
- Safe to upgrade from 0.19 to 0.21.2
CI workflow improvements (comments #6, #7):
- Create cache-sdk-build composite action for consistent SDK build artifact caching
- Replace all direct actions/cache@v4 usage with cache-yarn composite action
- Replace all direct actions/cache/restore@v4 and save@v4 with cache-sdk-build
- Add nested require() validation step before tests to fail fast on problematic patterns
All changes follow repository coding guidelines for CI caching and test memory optimization.
* Extend cache composite actions to all SDK workflows
This commit extends the caching standardization from PR #1606 to include
mobile-sdk-ci.yml and core-sdk-ci.yml workflows.
New composite actions created:
- cache-mobile-sdk-build: For mobile SDK build artifacts
- cache-core-sdk-build: For core SDK build artifacts
Workflow updates:
- mobile-sdk-ci.yml: Replaced 5 instances of direct actions/cache with cache-mobile-sdk-build
- core-sdk-ci.yml: Replaced 4 instances of direct actions/cache with cache-core-sdk-build
All SDK CI workflows now use consistent caching patterns via composite actions,
following the AGENTS.md guideline: "Use shared composite actions from .github/actions
for CI caching instead of calling actions/cache directly."
Benefits:
- Consistent caching across all SDK workflows (qrcode, mobile, core)
- Centralized cache configuration - easier to maintain
- Follows established patterns from qrcode-sdk-ci.yml
* downgrade react-native-svg
* update pod lock file
* sort
* chore: bump mobile app version to 2.9.6
Update build numbers and deployment timestamps after successful deployment.
* bump version too
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Justin Hernandez <justin.hernandez@self.xyz>