feat(cashout): allocation-funded offramp + retry-from-cancelled + proxy history merge (offramp v2) - #11
Merged
Conversation
…xy history merge (offramp v2) Opt-in, backward-compatible support for the TradeStars offramp v2 (per-user-proxy allocation). offramp-machine: retry-from-cancelled (retain feeUsdc, add retryPlace/canRetryPlace, PLACING resets order fields). Cashout: optional fetchAvailableOfframp sources the Max/insufficient amount from an integrator allocation instead of balanceOf; Try-again button on the cancelled screen. types: CashoutProps.fetchAvailableOfframp?. PaymentHistory: optional resolveExtraAddresses merges the user's per-user-proxy orders (offramp order.user) with the EOA's, de-duped + re-sorted, bypassing the b2b intersection. README recipe added. No SDK change. npm run verify green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Software-Artist-Aash
added a commit
that referenced
this pull request
Jun 7, 2026
…kout gate) #15 bumped package.json to 1.2.1 but didn't update CHANGELOG. Backfill the 1.2.0 entry (offramp v2 #11 + multi-signer sign-in #13, already published) and document 1.2.1 as: support-widget fix (#15) + screening rejection copy + Checkout one-in-flight-order gate. Version stays 1.2.1 (unpublished). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vvictor-dev
pushed a commit
to vvictor-dev/widgets
that referenced
this pull request
Aug 22, 2026
…proxy history merge (p2pdotme#11) Opt-in, backward-compatible support for the TradeStars offramp v2 (per-user-proxy allocation). offramp-machine: retry-from-cancelled (retain feeUsdc, add retryPlace/canRetryPlace, PLACING resets order fields). Cashout: optional fetchAvailableOfframp sources the Max/insufficient amount from an integrator allocation instead of balanceOf; Try-again button on the cancelled screen. types: CashoutProps.fetchAvailableOfframp?. PaymentHistory: optional resolveExtraAddresses merges the user's per-user-proxy orders (offramp order.user) with the EOA's, de-duped + re-sorted, bypassing the b2b intersection. README recipe added. No SDK change. npm run verify green. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
vvictor-dev
pushed a commit
to vvictor-dev/widgets
that referenced
this pull request
Aug 22, 2026
…kout gate) p2pdotme#15 bumped package.json to 1.2.1 but didn't update CHANGELOG. Backfill the 1.2.0 entry (offramp v2 p2pdotme#11 + multi-signer sign-in p2pdotme#13, already published) and document 1.2.1 as: support-widget fix (p2pdotme#15) + screening rejection copy + Checkout one-in-flight-order gate. Version stays 1.2.1 (unpublished). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Offramp v2 — allocation-funded cashout + retry-from-cancelled + proxy history merge
Pairs with the payment-integrators
TradeStarsCheckoutIntegratorV2(deployed + E2E-verified on Base Sepolia). Every change is opt-in and backward-compatible — the existing LotPot / wallet-USDC offramp and the plain history all behave identically when the new props are absent. No@p2pdotme/sdkchange.Changes
src/core/offramp-machine.ts— retry-from-cancelled: retainsfeeUsdcin state, addsretryPlace()+canRetryPlace, andPLACINGnow resets order fields so a re-place is clean. (retryDeliver/canRetryfor the ACCEPTED case are unchanged.)src/widgets/Cashout.tsx— optionalfetchAvailableOfframpsources the "Max"/insufficient-balance amount from an integrator allocation instead ofbalanceOf(TradeStars funds come from a per-user-proxy allocation, not the wallet). Adds a "Try again" button on the cancelled screen that re-places from the proxy balance.src/types.ts—CashoutProps.fetchAvailableOfframp?.src/widgets/PaymentHistory.tsx— optionalresolveExtraAddresses?merges the user's per-user proxy orders (where offramporder.userlives in v2) with the EOA's — de-duped by orderId, re-sorted newest-first; extra-address orders bypass the b2b intersection (they're keyed on the proxy).Why
Fixes "history shows only onramp" (offramps now surface under the user via the derived proxy) and gives the user self-serve retry after a cancel — no relayer/owner. See
payment-integrators/docs/OFFRAMP-V2.md.Verification
npm run verify✓ — typecheck + typecheck:examples + test + build.🤖 Generated with Claude Code