Conversation
- change date picker library
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds KYC provider fallback escape hatches at six points in the document registration flow, allowing users stuck due to hardware limitations, scan failures, or user choice to switch to third-party KYC verification rather than being trapped. Key changes:
Confidence Score: 4/5Safe to merge; all fallback paths are well-structured and the only findings are non-blocking style suggestions. The implementation is thorough — six entry points, a shared hook, new tests, and dev tooling for testing. No logical bugs were found. The modal loading-state pattern relies on AlertModal's
Important Files Changed
|
Summary
This branch adds KYC provider fallback escape hatches at multiple points in the
document registration flow. When a user gets stuck — due to hardware limitations,
scan failures, or simply wanting to bail — they can now fall back to third-party KYC
verification instead of being trapped.
What changed
DocumentNFCScanScreen— Shows a "Try Alternative Verification" button whenNFC hardware is missing or NFC is disabled. Shows a KYC fallback modal when the user
taps "Cancel" (only when NFC is supported and enabled, since the button is already
shown otherwise).
DocumentCameraScreen— Tapping "Cancel" during MRZ scanning now shows a KYCfallback modal instead of navigating home directly.
DocumentOnboardingScreen— Tapping "Cancel" on the scan instructions screennow shows a KYC fallback modal instead of navigating back directly.
DataConfirmationScreen— When reached via the NFC failure screen ("Checkscanned data" button), shows an additional "Try Alternative Verification" button
below "Continue". On the happy path (first visit from MRZ camera), no fallback button
is shown.
RegistrationFallbackNFCScreen— Now passesfromNfcFailure: trueroute paramwhen navigating to DataConfirmation.
useKycLauncherhook — New shared hook that encapsulates KYC session creation,provider SDK launch, error handling, and a reusable fallback modal.
errorInjectionStore— New dev-only store with injectable error types (MRZ,NFC, API, KYC) for testing fallback paths without real hardware failures.
How to QA
1 — Device has no NFC hardware
confirmation → NFC scan
2 — NFC supported but disabled
confirmation → NFC scan
3 — Can't correct MRZ data on DataConfirmation (after NFC failure)
confirmation → NFC scan
Alternative Verification"
Negative check: Disable all error injections and navigate to DataConfirmation the
first time (happy path, from MRZ camera). Verify only "Continue" is shown — no
fallback button.
4 — User cancels MRZ camera scan
opens)
"Cancel Registration"
5 — User cancels NFC scan (soft-exit modal)
confirmation → NFC scan
"Cancel Registration"
6 — User abandons at onboarding/instructions
onboarding screen (shows "Open Camera" instructions)
"Cancel Registration"