Skip to content

Commit fc33961

Browse files
authored
fix: block Stripe auto-fallback for non-US users (#2529)
## Summary - The token fallback hook (`useTokenFallback`) auto-selects Stripe when no crypto token has sufficient balance — this was bypassing the US-only fiat gate from #2528 - Pass a no-op callback instead of `onStripeSelect` for non-US users so fiat checkout is never auto-selected outside the US ## Test plan - [ ] Non-US user with insufficient crypto balance should NOT auto-switch to credit card - [ ] US user with insufficient crypto balance should still auto-fallback to Stripe 🪟 Made with [Lattice](https://github.com/Larkooo/lattice)
1 parent c11a047 commit fc33961

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/keychain/src/components/purchasenew/checkout/onchain

packages/keychain/src/components/purchasenew/checkout/onchain/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ export function OnchainCheckout() {
169169
quantity,
170170
});
171171

172+
const isUS = countryCode === "US";
173+
172174
const { isCheckingFallback } = useTokenFallback({
173175
controller,
174176
starterpackDetails: starterpackDetails as
@@ -184,7 +186,7 @@ export function OnchainCheckout() {
184186
isApplePaySelected,
185187
selectedPlatform,
186188
setSelectedToken,
187-
onStripeSelect,
189+
onStripeSelect: isUS ? onStripeSelect : () => {},
188190
});
189191

190192
const globalDisabled = useMemo(() => {

0 commit comments

Comments
 (0)