Skip to content

feat(deposit): hide TransFi cash deposits in prohibited countries - #2605

Merged
mul53 merged 1 commit into
qafrom
claude/admiring-villani-01fb4a
Sep 29, 2026
Merged

mul53 merged 1 commit into
qafrom
claude/admiring-villani-01fb4a

Conversation

@mul53

@mul53 mul53 commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • New env var EXPO_PUBLIC_TRANSFI_PROHIBITED_COUNTRIES: a comma-separated list of ISO alpha-2 codes, read in lib/config.ts.
  • TRANSFI_PROHIBITED_COUNTRIES + isTransfiProhibitedCountry() in constants/compliance.ts. Parsing trims and upper-cases each code. If the var is unset, it falls back to UA,RU,BY; if it is set empty, no country is blocked.
  • New useTransfiCountryAvailability hook. It reuses useCashAppDepositAvailability's country resolution (stored country, else a session-memoised geo lookup).
  • TransFi local-currency rows (EUR/BRL/BDT/PHP/MXN) are hidden:
    • in Deposit → Cash (DepositCashOptions), together with the Show more toggle;
    • in card funding (CardFundOptions), which covers the Wirex, Rain desktop and Rain mobile modals.
  • USD (virtual account) is not TransFi and stays visible.

Why

TransFi prohibits users from UA, RU and BY, among others: https://docs.transfi.com/docs/prohibited-countries. Showing them these rows only leads to a failed onboarding.

Reviewer notes

  • Hidden while resolving: the rows stay hidden until the country lookup settles, so a prohibited user can't tap one early. A lookup that settles with no country shows the rows.
  • UA: TransFi's current page bans only Crimea, Donetsk and Luhansk, not all of Ukraine. Geo-IP only resolves to the country, so UA is blocked as a whole.
  • Deployment: EXPO_PUBLIC_* values are inlined at build time, so the env var needs setting per EAS environment.
  • Not in this PR:
    • The "Cash" row on the first deposit step still shows the local-ramp flag, count and copy for these users.
    • There is no backend enforcement yet, so a VPN bypasses this; only TransFi's own refusal stops it.

Testing

  • tsc and eslint are clean on the touched files.
  • Existing DepositOption, CardFund and useCashAppDepositAvailability suites pass.
  • New constants/__tests__/transfiProhibitedCountries.test.ts covers the env parsing.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 29, 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 Preview Sep 29, 2026 10:02pm UTC
solid-app-staging Ignored Ignored Preview Sep 29, 2026 10:02pm UTC

Request Review

@claude

claude Bot commented Sep 29, 2026

Copy link
Copy Markdown

Code review

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


🤖 Generated with Claude Code

@mul53
mul53 changed the base branch from master to qa September 29, 2026 20:35
TransFi refuses to onboard users from UA, RU and BY (among others), so the
local-currency cash deposit rows led them into a flow that could only fail.

The list comes from EXPO_PUBLIC_TRANSFI_PROHIBITED_COUNTRIES (comma-separated
alpha-2 codes), falling back to UA,RU,BY when unset so a build missing the
var does not silently re-open them. The rows are hidden in the deposit cash
screen and the card funding options; USD (virtual account) is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mul53
mul53 force-pushed the claude/admiring-villani-01fb4a branch from 3b910dc to 1d06fd9 Compare September 29, 2026 22:02
@mul53
mul53 merged commit bd9ce06 into qa Sep 29, 2026
6 checks passed
@mul53
mul53 deleted the claude/admiring-villani-01fb4a branch September 29, 2026 22:18
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.

1 participant