Skip to content

Fund with peer#136

Draft
Olaleye-Blessing wants to merge 5 commits into
developmentfrom
fund-with-peer
Draft

Fund with peer#136
Olaleye-Blessing wants to merge 5 commits into
developmentfrom
fund-with-peer

Conversation

@Olaleye-Blessing

Copy link
Copy Markdown
Collaborator

No description provided.

@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for app-stacks ready!

Name Link
🔨 Latest commit bd168a1
🔍 Latest deploy log https://app.netlify.com/projects/app-stacks/deploys/6a4a97c1da6154000808ca75
😎 Deploy Preview https://deploy-preview-136--app-stacks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Olaleye-Blessing and others added 2 commits July 4, 2026 21:23
Peer removed the extension-owned onramp API (onramp(),
onIntentFulfilled()) in extension 0.6.0, breaking the old integration.
Rebuild it on the headless Buyer TEE flow where the app owns the order
lifecycle:

- use-peer-onramp: quote (destination Gnosis xDAI) -> signalIntent via
  prepare() + Privy-sponsored tx on Base -> user pays fiat -> extension
  metadata capture + payment row matching -> fulfillIntent (sponsored)
  -> poll for bridged xDAI arrival -> sponsored BREAD mint. Supports
  Wise, Revolut and Venmo with per-platform buyer TEE configs.
- peer-onramp-modal: multi-step UI (platform/currency/amount, payment
  instructions, capture/verify/bridge/mint states), wired via new
  PEER_ONRAMP modal state. Completion is self-contained and does not
  depend on useWatchFundedXdai.
- fund-with-peer becomes a thin launcher; install-extension flow kept.
- Upgrade @zkp2p/sdk 0.3.2 -> 0.5.2 (newest release passing the 10-day
  minimumReleaseAge policy; headless capture needs >=0.5.0).
- pnpm overrides: force provenance-signed undici-types and
  @noble/hashes (scoped to @walletconnect/relay-auth) to satisfy
  trustPolicy no-downgrade.

Requires Peer extension >=0.6.3 and Privy gas sponsorship enabled on
Base; bump SDK to 0.7.x once it clears the release-age window.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wrap FundWithPeer in FeatureGate so deployments control its visibility
via NEXT_PUBLIC_FEATURES, e.g. enabled everywhere but restricted to an
allowlisted wallet while the new onramp flow is verified live:

  {"fundWithPeer":{"enabled":true,"addresses":["0xcCBaD3a42F8b406E2838981f947f449E2471aac7"]}}

Local still renders the button for everyone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Olaleye-Blessing and others added 3 commits July 5, 2026 06:30
…I.FI

Peer's quote API only accepts Base (8453) as a destination chain -
quoting straight to Gnosis fails with unsupported_destination_chain.
Onramp to USDC on Base instead, then bridge silently with LI.FI (no
widget): wait for the USDC delta from the fulfill tx, quote via the new
lib/lifi helper, sponsored approve when allowance is short, sponsored
bridge tx, then the existing xDAI arrival wait and BREAD mint.

Verified live: LI.FI routes Base USDC -> native xDAI via Relay (~6s).

Known limitation: a failure after fulfillment leaves USDC on Base and
retrying will not bridge it (bridge amount is delta-based); needs a
recovery path before rollout beyond the allowlisted wallet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Track the latest SDK line (the one the Peer docs document). No code
changes needed: the headless integration surface (Zkp2pClient, getQuote,
signalIntent/fulfillIntent prepare, extension onMetadataMessage/
authenticate) is unchanged since 0.5.x and nothing we call is
deprecated.

Adds @zkp2p/sdk to minimumReleaseAgeExclude since Peer ships breaking
API changes rapidly; this opts the package out of the 10-day
release-age gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two fixes found while debugging no_quotes_found in production:

- The quote API takes exactFiatAmount in 6-decimal precise units
  ("200000000" = 200.00 USD); we were sending the human-readable
  amount, which read as fractions of a cent and matched no deposits.
  Keep the human amount locally for payment-row matching.
- Quote responses only inline payeeData for authenticated callers, but
  the payee lookup endpoint is public - fetch the maker's handle via
  apiGetPayeeDetails so the payment instructions screen works without
  a curator API key. (Verified the gating-signature endpoint is also
  public, so no API key is needed anywhere in the flow.)

Also drop doubled symbols in the modal: fiatAmountFormatted and
tokenAmountFormatted already embed "USD"/"USDC".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Olaleye-Blessing
Olaleye-Blessing marked this pull request as draft July 13, 2026 14:25
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