Skip to content

Remove Bridge card KYC flow and consolidate to single path - #2522

Merged
MusabShakeel576 merged 1 commit into
masterfrom
claude/wizardly-gauss-1yj1u7
Sep 15, 2026
Merged

MusabShakeel576 merged 1 commit into
masterfrom
claude/wizardly-gauss-1yj1u7

Conversation

@MusabShakeel576

Copy link
Copy Markdown
Contributor

Summary

This PR removes the Bridge card issuer KYC flow and consolidates card KYC routing to a single code path that handles both Didit (Rain) and Sumsub (Wirex) providers. The Bridge-specific logic, helper files, and related API calls have been removed as the backend now handles all KYC provider routing.

Key Changes

  • Removed Bridge KYC branch: Eliminated the cardIssuer !== CardProvider.BRIDGE conditional that previously routed Bridge users through a separate flow with Persona inquiries
  • Deleted helper files: Removed endorsementHelpers.ts and kycFlowHelpers.ts which contained Bridge-specific endorsement status checks and KYC flow utilities
  • Simplified routing logic: All card applicants now route through resolveKycProvider() which the backend uses to determine whether to use Sumsub (Wirex) or Didit (Rain)
  • Removed Bridge API calls: Eliminated calls to getCustomerFromBridge() and getKycLinkFromBridge() as Bridge KYC links are no longer supported
  • Consolidated country handling: Unified country resolution logic - users without a detected country are now prompted to select one before proceeding, regardless of KYC provider
  • Removed endorsement checks: Eliminated complex cards endorsement status validation that was specific to Bridge flow

Implementation Details

  • The backend is now authoritative for KYC provider selection based on user jurisdiction
  • Wirex (Sumsub) wins in markets both issuers serve
  • Didit (Rain) remains the safe fallback when provider resolution fails
  • Country selection is required for Sumsub sessions (server-side requirement) and is now also used as a fallback when IP-based detection fails
  • The UNDER_REVIEW status check for Sumsub users prevents restarting already-submitted verifications
  • Removed countryStore dependency from the main hook as country is now resolved inline via resolveKycProvider()

https://claude.ai/code/session_01YZJ9jHw9M8dFvfCtApNAYA

bridge.xyz and Persona are retired as the card identity flow. The backend now
refuses a card KYC link on bridge.xyz and answers instead with the issuer and
identity provider the applicant's country routes to — Wirex/Sumsub or
Rain/Didit, Wirex winning the ~20 markets both issuers serve.

`handleProceedToKyc` still forked on `cardIssuer !== CardProvider.BRIDGE`, with
a bridge.xyz fall-through behind it that checked a Bridge KYC link, read the
cards endorsement off a Bridge customer, and finally opened a Persona inquiry
via `/user-kyc-info`. With the backend refusing that link, reaching it could
only produce "An error occurred while creating the KYC link".

It was already unreachable: `/cards/status` names `bridge` for nobody (no
cardCustomer row carries that provider), and `useCardProvider` maps a Bridge
card to null rather than to the issuer — which is also why `user-kyc-info`
already bounces every card-mode visitor to the Rain screen. So this removes a
dead branch, not a live one, and no real user changes path.

- The routing branch is now the whole action: one path, always
  `resolveKycProvider()`. Its body is unchanged apart from de-indenting.
- Deletes `kycFlowHelpers.ts` and `endorsementHelpers.ts`, whose exports this
  fork was the last consumer of (`kycDisplayHelpers` has its own copy of
  `hasEndorsementPendingReview`).
- Drops the `countryStore` subscription, now read imperatively via `getState()`
  inside the action, along with the imports the fork needed.

No error handling was needed for the backend's new CARD_KYC_REQUIRED and
CARD_COUNTRY_UNSUPPORTED codes: `createCard` already parses the `{code, message}`
envelope into a typed `ApiError`, so the routing message reaches the user.

Verified: eslint clean (`npm run lint` exits 0), 53 card-flow tests passing.
The remaining tsc errors and the skipTheLine failure reproduce on master.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YZJ9jHw9M8dFvfCtApNAYA
@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Sep 15, 2026 12:36pm UTC
solid-app-staging Ignored Ignored Sep 15, 2026 12:36pm UTC

Request Review

@claude

claude Bot commented Sep 15, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

What was reviewed:

  • Removed endorsementHelpers.ts and kycFlowHelpers.ts helper files
  • Modified useCardSteps.ts to consolidate KYC routing to single path
  • Checked for debugging leftovers, commented-out code, hardcoded values
  • Verified deleted files were not imported elsewhere
  • Validated import cleanup and dependency array updates

The PR cleanly removes the Bridge card issuer KYC flow and consolidates to a single routing path through Didit/Sumsub providers as intended.

@MusabShakeel576
MusabShakeel576 merged commit 5fcb474 into master Sep 15, 2026
6 checks passed
@MusabShakeel576
MusabShakeel576 deleted the claude/wizardly-gauss-1yj1u7 branch September 15, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants