feat(kyc): differentiate identity-verified from per-rail status#2055
feat(kyc): differentiate identity-verified from per-rail status#2055Hugo0 wants to merge 1 commit into
Conversation
Pairs with peanut-api-ts PR #834. Now that the backend correctly reports `bridgeKycStatus='approved'` when the user's identity (base endorsement) is verified — even if a bank rail still needs extra documents — the identity-status card needs to communicate both signals separately. Before: a verified user with a Bridge rail in REQUIRES_EXTRA_INFORMATION showed "Identity verification: Action needed" — ambiguous, reads as if their identity is still pending. After: "Identity verification: Verified · bank docs needed" — explicit that the person is verified; only their bank-rail submission needs follow-up. Adds `useUnifiedKycStatus.test.ts` regression test locking in the "bridgeKycStatus=approved → isBridgeApproved=true, isBridgeUnderReview=false" behavior so future refactors can't reintroduce the conflation FE-side.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughKycStatusItem subtitle logic is updated to adjust priority and wording for approved users with provider rejections and add "Verified · bank docs needed" when bridge bank documentation is required. A comprehensive test suite for useUnifiedKycStatus hook validates the status flags it computes from bridge, SUMSUB, and MANTECA verification sources. ChangesKYC Status Display and Verification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Comment |
Code-analysis diffPainscore total: 5704.19 → 5704.5 (+0.31) 🆕 New findings (2)
✅ Resolved (2)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Summary
Pairs with peanut-api-ts PR #834 which fixes the BE conflation between identity verification (`base` endorsement) and per-rail availability (sepa/spei/faster_payments). With the BE fix, verified users with an outstanding rail document requirement no longer get `bridge_kyc_status='under_review'` — they correctly show as `'approved'`.
This PR aligns the FE so the identity-status card reflects both signals without misleading the user.
Changes
Behavior matrix
Only one row changes: the verified-with-rail-docs case. Everything else is preserved.
Risk
Minimal. Pure copy change in one component + new test file. No hook changes, no API contract changes, no new state. The visual difference is one new subtitle string variant that only renders when the user already had both signals true (which today renders the same fallback "Action needed").
Test plan
Cross-repo notes
This PR is decoupled from the BE PR — it's safe to land either order:
Follow-ups (deferred to KYC capability state machine §13)