Fund with peer#136
Draft
Olaleye-Blessing wants to merge 5 commits into
Draft
Conversation
✅ Deploy Preview for app-stacks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Olaleye-Blessing
force-pushed
the
fund-with-peer
branch
from
July 3, 2026 17:18
b6c4e13 to
d28030b
Compare
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
force-pushed
the
fund-with-peer
branch
from
July 4, 2026 20:36
d28030b to
cfe36ae
Compare
…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
marked this pull request as draft
July 13, 2026 14:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.