Skip to content

feat: add Cash App as Buy Bitcoin provider#154

Merged
erdemyerebasmaz merged 15 commits intomainfrom
feature/cashapp-buy-bitcoin
Mar 31, 2026
Merged

feat: add Cash App as Buy Bitcoin provider#154
erdemyerebasmaz merged 15 commits intomainfrom
feature/cashapp-buy-bitcoin

Conversation

@erdemyerebasmaz
Copy link
Copy Markdown
Contributor

@erdemyerebasmaz erdemyerebasmaz commented Mar 26, 2026

This PR adds support for buying Bitcoin via Cash App using Lightning.

Depends on

Brand icons for the buy-bitcoin provider UI: MoonPay logo, CashApp
dollar sign, Bitcoin symbol, EyeOff for visibility toggles.
Store an ordered list of enabled providers in localStorage.  The
list drives which providers appear in the buy dialog and in what
order.  Both MoonPay and CashApp are enabled by default.
Bottom sheet that lists enabled providers with brand icons.
Selecting a provider calls the SDK and redirects the user to
the provider's purchase page.
The Buy button now routes based on enabled providers: zero opens the
providers page, one launches that provider directly (with a loading
spinner), and two or more opens the selection dialog.
Dedicated settings page where users can enable, disable, and
reorder buy-bitcoin providers.  Changes save immediately to
localStorage.
Add buyProviders screen to App, reachable from both the wallet
(slides up) and settings (slides right).  Replace inline provider
toggles in SettingsPage with a navigation button under Display.
Add invisible placeholder controls to unselected currency rows so
they match the height of selected rows with reorder buttons.
Pre-open a blank tab synchronously during the user gesture before
the async SDK call.  On mobile/PWA where the tab is blocked, fall
back to same-tab navigation via location.href.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
breez-glow-web Ready Ready Preview, Comment Mar 31, 2026 3:25pm
breez-sdk-spark-example Ready Ready Preview, Comment Mar 31, 2026 3:25pm
savage-glow-web Ready Ready Preview, Comment Mar 31, 2026 3:25pm

BuyBitcoinRequest changed from a flat struct to a tagged union
(type: 'moonpay' | 'cashApp'). BuyBitcoinProvider is no longer
exported by the SDK, so define it locally in settings.ts.
@erdemyerebasmaz erdemyerebasmaz force-pushed the feature/cashapp-buy-bitcoin branch from a9bdab7 to 7c563d9 Compare March 31, 2026 15:10
The MoonPay flow lets users choose their amount in the provider
UI — no locked amount is passed from the app side.
The provider list was captured once at mount time and became stale
if the user changed settings in BuyProvidersPage. Use useMemo keyed
on the dialog open state so settings are re-read each time.
CashApp is mainnet-only in the SDK. Filter it from the provider
list in both the dialog and header fast-path so users never see
it on regtest. Settings and ordering are unaffected on mainnet.
On non-mainnet networks, CashApp is hidden from the buy dialog
but still appears in the provider settings page. Add a subtle
note so users understand why it won't appear when buying.
Move filterProvidersByNetwork from BuyBitcoinDialog.tsx to
settings.ts to fix fast-refresh warning (non-component export).
Drop useMemo with unnecessary deps in WalletPage — the call is
a cheap localStorage read, no memoization needed.
- Extract BottomSheetCardContext to its own file so BottomSheet.tsx
  and ui/index.tsx only export components (fast-refresh)
- Add formatPaymentAmountRef to useCallback dependency array
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