feat(kyc): honest UK-resident block on Bridge bank flows (TASK-20729)#2457
feat(kyc): honest UK-resident block on Bridge bank flows (TASK-20729)#2457kushagrasarathe wants to merge 2 commits into
Conversation
Backend now marks every Bridge rail blocked for UK residents with reason code 'uk_resident_blocked'. Surface it honestly instead of the generic 'we couldn't unlock this / contact support' (ID-failure) framing: - InitiateKycModal gains a 'region-unavailable' variant — 'Not available in the UK', regulatory copy, single 'Got it' dismiss (no verify, no contact-support) - add-money + withdraw bank pages pick that variant when the gate's reason is uk_resident_blocked Card block rides on the existing eligibility machinery (BE denylist).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 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)
Comment |
Code-analysis diffPainscore total: 6233.95 → 6236.16 (+2.21) 🆕 New findings (22)
…and 2 more. ✅ Resolved (20)
📈 Painscore deltas (top movers)
|
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
- title 'Not available for UK residents' (conveys residence, not the destination country — a UK resident is blocked even withdrawing to SEPA) - drop the card mention from the bank-flow copy - CTA 'Withdraw funds' -> /withdraw so users can exit via crypto - wire the region-unavailable variant into AddWithdrawCountriesList (the country-selection modal), not just the add-money/withdraw bank pages
Summary
Surface the UK-resident block honestly on the Bridge bank deposit/withdraw flows. The backend (peanut-api-ts PR, TASK-20729) now marks every Bridge rail
blockedfor UK residents withreason.code = 'uk_resident_blocked'. Without this, the FE would show the generic "We couldn't unlock this / contact support" (ID-failure) framing — wrong and misleading for a regulatory block.InitiateKycModalgains aregion-unavailablevariant — title "Not available in the UK", regulatory copy, a single "Got it" dismiss (no verify, no contact-support).add-money/[country]/bank+withdraw/[country]/bankpick that variant whengate.reason?.code === 'uk_resident_blocked'.info.tsreturns not-eligible for GB, same path as other prohibited countries).Risks / breaking changes
uk_resident_blocked. Until BE ships, this variant simply never triggers (no regression). BE-first deploy is safe.QA
add-money-states+withdraw-statessuites pass with the change.@capacitor/*native-module resolution noise in the worktree).bridge_geo=GB), add-money → bank and withdraw → bank show "Not available in the UK" instead of a KYC/contact-support modal; non-UK users unaffected.