Skip to content

feat(funding): method picker + web2 (fiat) onramps - #311

Open
joalavedra wants to merge 3 commits into
mainfrom
feat/funding-method-picker
Open

feat(funding): method picker + web2 (fiat) onramps#311
joalavedra wants to merge 3 commits into
mainfrom
feat/funding-method-picker

Conversation

@joalavedra

Copy link
Copy Markdown
Collaborator

Adds the v2 funding method picker and web2 (fiat) onramp support to the deposit flow.

What's here

  • Deposit method picker: Apple Pay, Google Pay, Card, Bank transfer, Transfer from wallet, CEX. Apple/Google Pay rows are gated on device/browser capability.
  • Server-resolved provider: the onramp provider is chosen by the backend from region + destination asset (GET /v1/onramp/methods) and never shown to the user — useResolvedFundingMethods.
  • Live quote on the buy preview (useOnrampQuote), with currency + destination selection.
  • Token/chain logos, real token conversion, chain-only destination.

Status

  • Executes via stripe and coinbase. MoonPay resolves as a method but its execution path beyond the redirect URL is not built yet.
  • API base is still /v1/onramp; it flips to /v2/funding/onramp/* (one place: onrampEndpoints.ts) once the v2 routes are live in prod.

🤖 Generated with Claude Code

joalavedra and others added 3 commits June 30, 2026 00:22
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a real provider quote to the buy preview (You receive / Fee), a fiat
currency selector, and a read-only destination (token + chain). Centralize the
onramp API base path (ONRAMP_API_BASE) ahead of the /v2/funding/onramp
consolidation; remove the dead per-provider quote helpers in favor of one
provider-agnostic fetchOnrampQuote.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…estination

Buy preview: show the token+chain logo in the selector, make the secondary line
the real token conversion from the live quote, add spacing before the presets,
and reduce the destination row to chain logo + name. Transfer-from-wallet:
dollar-denominated presets that convert 1:1 for stablecoin funding targets (with
a token-unit fallback for unpriceable volatiles).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
playground Ready Ready Preview, Comment Jul 2, 2026 8:48am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@openfort/react@311

commit: dae37f8

@joalavedra

Copy link
Copy Markdown
Collaborator Author

Part of the Funding v2 set (web2 onramps + region routing). This is the SDK / widget; sibling PRs:

  • Backend: openfort-xyz/api#1086 — region routing, project config, onramp webhooks; owns the GET /v1/onramp/methods endpoint this branch calls
  • Dashboard: openfort-xyz/dash#212 — project funding config UI

This degrades gracefully when the backend endpoints aren't live (falls back to static rows + the stripe default), so it can merge independently; the region-resolved methods light up once api#1086 is deployed.

@joalavedra

Copy link
Copy Markdown
Collaborator Author

Funding v2 — full PR stack (5 PRs / 4 repos)

Funding v2 = web2 onramps (Apple/Google Pay, Card, Bank) + server-side region+asset routing + the execute path. It spans:

  1. api · openfort-xyz/api#1086 · feat/funding-web2-onramp-routingmain — region routing (OnrampRoutingService/coverage/region), GET /v1/onramp/methods, FundingProjectConfig persistence + GET/PUT /v2/funding/config, onramp-as-a-session-payment-method + POST /v2/funding/sessions/{id}/quotes, Stripe (EU) + MoonPay (ROW) rails, auto-bridge chaining + reconciliation cron, Coinbase native Apple/Google Pay, onramp completion webhooks. Owns the endpoints — merge first.
  2. openfort-js · feat(funding): onramp client — session methods/quote + payment-method union openfort-js#327 · feat/funding-onramp-clientmain — onramp payment method + session methods/quote client (SDK execute path).
  3. openfort-react · feat(funding): method picker + web2 (fiat) onramps #311 · feat/funding-method-pickermain — Deposit-hub method picker + fiat rows, provider hidden.
  4. openfort-react · feat(funding): useFundingMethods + useOnramp; buy flow on the session engine #315 · funding/v2-hooksfeat(funding): method picker + web2 (fiat) onramps #311useFundingMethods/useOnramp hooks + native Coinbase wallet-pay widget. Stacked on feat(funding): method picker + web2 (fiat) onramps #311 → retarget to main after feat(funding): method picker + web2 (fiat) onramps #311 merges.
  5. dash · openfort-xyz/dash#212 · feat/funding-dashboard-uimain — Funding config section (Money movement).

Suggested order: #1086 → activation steps → js#327 → react#311 → react#315 → dash#212. The SDK/dash degrade gracefully until the api endpoints are live.

Activation after api merges: pnpm db:prisma-migrate-deploy + prisma generate · tsoa spec-and-routes · dash pnpm generate:api · set FUNDING_ENC_SECRET.

Still open (next sprint): cross-repo FUNDING_SESSION_UPDATED topic in @openfort-xyz/buffers + Pigeon (outbound webhook delivery won't fire until registered) · SwappedOnrampService (needs API key; MoonPay is interim) · web2-onramp docs.

(auto-posted to cross-link the stack)

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