Remove Bridge card KYC flow and consolidate to single path - #2522
Merged
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. What was reviewed:
The PR cleanly removes the Bridge card issuer KYC flow and consolidates to a single routing path through Didit/Sumsub providers as intended. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
cardIssuer !== CardProvider.BRIDGEconditional that previously routed Bridge users through a separate flow with Persona inquiriesendorsementHelpers.tsandkycFlowHelpers.tswhich contained Bridge-specific endorsement status checks and KYC flow utilitiesresolveKycProvider()which the backend uses to determine whether to use Sumsub (Wirex) or Didit (Rain)getCustomerFromBridge()andgetKycLinkFromBridge()as Bridge KYC links are no longer supportedImplementation Details
UNDER_REVIEWstatus check for Sumsub users prevents restarting already-submitted verificationscountryStoredependency from the main hook as country is now resolved inline viaresolveKycProvider()https://claude.ai/code/session_01YZJ9jHw9M8dFvfCtApNAYA