fix(tips): force Pimlico erc20 for tips (Circle USDC tips failed at runtime)#24
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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>
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.
Bug (Codex-surfaced):
TipFormnever wired Circle (nouseGasQuoteCircle/circlePermitAmount), butuseSmartAccountroutes a Circle-eligible USDC tipper (pimlico-simple-7702+ Base/Arbitrum/Optimism + flag on) to the Circle client →useBatchPaymentcircle branch throws "permitAmount 未算定" → Circle USDC tips fail at send time.Fix:
useSmartAccountgains adisableCircleparam (default false);TipFormpassestrue→ USDC tips use the working, cheaper Pimlico erc20 path (display viauseGasQuotematches). 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