feat(#416 ③): tier-setup self-pay (ETH) gas fallback — no aPNTs deadlock#418
Merged
Conversation
…adlock tier-setup ran its wiring + tier-limit UserOps ONLY through PaymasterV4 (aPNTs), so a brand-new account with no aPNTs hit AA33 and couldn't pre-deploy / raise tiers — an onboarding deadlock (docs/CREATE_FLOW_BETA_BUG.md #3). Add a Gas toggle: Sponsored (aPNTs, default — unchanged) or Self-pay (ETH), which drops usePaymaster so the account pays gas from its own ETH. Unblocks users who hold ETH but no aPNTs. tsc + lint green.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
clestons
approved these changes
Jul 2, 2026
clestons
left a comment
There was a problem hiding this comment.
Review: #418 — feat(#416 ③): tier-setup ETH self-pay fallback
#416 fix plan #3 的最小化实现,解除 aPNTs 死锁。
核心逻辑
usePaymaster: gasMode === "apnts",
...(gasMode === "apnts" ? { paymasterAddress: canonical?.paymasterV4 } : {}),eth 模式:usePaymaster: false,paymasterAddress 字段整体省略(非 undefined)✓
apnts 模式:与改前完全等价,向后兼容 ✓
gasMode 在 apply() 调用时捕获,for 循环内多次 UserOp 全部使用同一模式 ✓
默认 "apnts",现有用户行为不变 ✓
type="button" 防止误触 form submit ✓
[L — 非阻塞] ARIA 缺失
toggle 无 role="group" / aria-pressed,屏幕阅读器无法感知当前选中态。可后续补。
总结
最小化、精确的死锁解除。配合 #417(deploy-at-birth)+ sdk#267(resolveTierProfile)组成完整的 onboarding 修复链。
APPROVE
| 轮次 | 执行者 | 裁决 |
|---|---|---|
| R1 | Sonnet 4.6 | APPROVE(L 非阻塞:ARIA toggle) |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
docs/CREATE_FLOW_BETA_BUG.md #3.
tier-setupran its wiring + tier-limit UserOps only through PaymasterV4 (aPNTs), so a brand-new account with no aPNTs hitAA33and couldn't pre-deploy / raise tiers — an onboarding deadlock.Adds a Gas toggle: Sponsored (aPNTs) (default, unchanged) or Self-pay (ETH) — the latter drops
usePaymasterso the account pays gas from its own ETH. Unblocks users who hold ETH but no aPNTs.tsc + lint + build green. Frontend-only (no SDK dependency). Complements ① (#417, deploy-at-birth); ② (bake tier profile at birth) is tracked upstream in aastar-sdk#266.