Skip to content

feat(cashout): allocation-funded offramp + retry-from-cancelled + proxy history merge (offramp v2) - #11

Merged
gitchadd merged 1 commit into
mainfrom
feat/offramp-v2-cashout
Jun 5, 2026
Merged

gitchadd merged 1 commit into
mainfrom
feat/offramp-v2-cashout

Conversation

@Software-Artist-Aash

Copy link
Copy Markdown
Collaborator

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/sdk change.

Changes

  • src/core/offramp-machine.ts — retry-from-cancelled: retains feeUsdc in state, adds retryPlace() + canRetryPlace, and PLACING now resets order fields so a re-place is clean. (retryDeliver/canRetry for the ACCEPTED case are unchanged.)
  • src/widgets/Cashout.tsx — optional fetchAvailableOfframp sources the "Max"/insufficient-balance amount from an integrator allocation instead of balanceOf (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 — optional resolveExtraAddresses? merges the user's per-user proxy orders (where offramp order.user lives 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).
  • README — "TradeStars offramp v2 (allocation-funded)" recipe alongside the LotPot reference.

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

…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>
@gitchadd
gitchadd merged commit f0665a8 into main Jun 5, 2026
2 checks passed
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>
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.

2 participants