Skip to content

fix(tips): force Pimlico erc20 for tips (Circle USDC tips failed at runtime)#24

Merged
cipherwebllc merged 1 commit into
mainfrom
fix/tipform-circle-disable
May 31, 2026
Merged

fix(tips): force Pimlico erc20 for tips (Circle USDC tips failed at runtime)#24
cipherwebllc merged 1 commit into
mainfrom
fix/tipform-circle-disable

Conversation

@cipherwebllc
Copy link
Copy Markdown
Owner

Bug (Codex-surfaced): TipForm never wired Circle (no useGasQuoteCircle/circlePermitAmount), but useSmartAccount routes a Circle-eligible USDC tipper (pimlico-simple-7702 + Base/Arbitrum/Optimism + flag on) to the Circle client → useBatchPayment circle branch throws "permitAmount 未算定" → Circle USDC tips fail at send time.

Fix: useSmartAccount gains a disableCircle param (default false); TipForm passes true → USDC tips use the working, cheaper Pimlico erc20 path (display via useGasQuote matches). JPYC tips are Pimlico sponsorship (unaffected). Matches the original "TipForm = Pimlico, Circle out-of-scope" intent; Circle's cost premium (2.5–5.8× Pimlico) isn't desirable for small tips anyway.

Verified: tsc 0 · eslint clean · full suite 2550 passed/0 failed. Codex code-review skipped (contained, verified, one-line provider override; TipForm.test is in the OOM allowlist).

🤖 Generated with Claude Code

…untime)

TipForm never wired Circle (no useGasQuoteCircle / circlePermitAmount), but useSmartAccount
routed a Circle-eligible USDC tipper (pimlico-simple-7702 + Base/Arb/Optimism + flag on) to
the Circle client. useBatchPayment's circle branch then threw "permitAmount 未算定" → Circle
USDC tips failed at send time (surfaced by Codex review).

- useSmartAccount: add disableCircle param (default false) — when true, usdcProvider is forced
  to 'pimlico' (skip Circle routing).
- TipForm: pass disableCircle=true → USDC tips use the working, cheaper Pimlico erc20 path with
  a matching gas-quote display; JPYC tips are sponsorship (unaffected). Matches the original
  "TipForm = Pimlico, Circle out-of-scope" intent.

Verified: tsc 0, eslint clean, full suite 2550 passed/0 failed. (TipForm.test is in the OOM
allowlist; fix is type-checked + behavior is a one-line provider override.)

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

vercel Bot commented May 31, 2026

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

Project Deployment Actions Updated (UTC)
openpay Ready Ready Preview, Comment May 31, 2026 3:41pm

@cipherwebllc cipherwebllc merged commit 597a67c into main May 31, 2026
6 checks passed
@cipherwebllc cipherwebllc deleted the fix/tipform-circle-disable branch May 31, 2026 16:01
cipherwebllc added a commit that referenced this pull request May 31, 2026
…ated logging (Codex review 2)

Codex re-review found PR #24's TipForm Circle fix was incomplete: useBatchPayment
calls its own internal useSmartAccount(deployment, enabled) for the execution client
WITHOUT disableCircle, so a Circle-eligible USDC tip still routed to Circle and threw
on the missing circlePermitAmount (the disableCircle on TipForm's display hook had no
effect on the execution path).

- useBatchPayment: add disableCircle param, pass to internal useSmartAccount.
- TipForm: useBatchPayment(deployment, true, true) so the execution client is also
  pinned to Pimlico erc20. This makes the networkFeeEquivalent = gasAmount assumption
  (always non-circle) hold end-to-end for tips.
- tests: add useBatchPayment coverage for (a) separated saleAmount/networkFeeEquivalent/
  feeBreakdownVersion logging, (b) disableCircle propagation; update the enabled-propagation
  assertion for the new 3rd arg.

Verified: tsc 0 · eslint 0 · full suite 2560 passed/0 failed.

Co-Authored-By: Claude Opus 4.8 <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.

1 participant