feat(buy-crypto): send a KYC-limit refusal to TransFi's verification page - #2600
Merged
Merged
Conversation
…page On STANDARD_KYC_REQUIRED / ENHANCED_KYC_REQUIRED the error screen offered "Verify identity", which opened our own identity flow. The user is already verified there, so it bounced them back to the amount screen and into the same refusal - a loop with no way out. The screen now reads "Upgrade your verification" and asks the backend for TransFi's page for the level the refusal names (POST /transfi/kyc/upgrade), then opens it. When TransFi already has a submission it shows "Verification in review" instead, and it offers "Buy a smaller amount", since the limit only caps this purchase. Every other complete_kyc error behaves as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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. |
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
When an order goes over the limits of the user's current TransFi KYC level, the backend returns
STANDARD_KYC_REQUIREDorENHANCED_KYC_REQUIREDwithaction: complete_kyc. The error screen answered that with Verify identity, which opened our own identity check (Sumsub or Didit). The user is already verified there, so:readyand went straight to the amount screen.This PR sends these users to TransFi's own verification page instead.
Changes
For the two limit codes only:
POST /transfi/kyc/upgradefor the level the refusal names (standard or advanced), then opens TransFi's page. It opens the same way as the hosted retry:openBrowserAsyncon native, andwindow.openon web with a fallback button when a popup blocker stops it.Every other
complete_kycerror, such as a user with no verification, behaves exactly as before.Testing
components/BuyCrypto/Transfi/__tests__/transfiErrorUpgrade.test.tsx(8 tests) and new cases inlib/__tests__/transfiErrors.test.ts.npx jestpasses, 134 suites and 1,558 tests.npx tsc --noEmitshows no errors in changed files. It reports 9 errors elsewhere (app/,BankTransfer,CardBanner, the bridge hooks and others), all in files this PR doesn't touch.Depends on
Backend PR: https://github.com/Solid-Money/solid-backend/pull/1880. It adds
POST /transfi/kyc/upgradeand the new copy, and should deploy first.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.