feat(transfer): network indicator + switcher (explicit chain, no silent testnet)#412
Merged
Merged
Conversation
…nt testnet) The transfer page never showed which chain it was on, silently assuming Sepolia. Add a NetworkSwitcher (top-right, always visible): shows the active network with a Testnet badge, and a dropdown listing networks. Transfers run only on Sepolia today (the whole AA stack — KMS/DVT/paymaster/contracts — is Sepolia-only), so OP Mainnet is shown as 'Coming soon' (phase-2 target) rather than offering a switch that would fail; selecting it toasts. Wire real switching here when mainnet lands. 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: #412 — feat(transfer): NetworkSwitcher
让 transfer 页的活跃网络不再隐式,正确处理了"只有 Sepolia 可用"的当前状态。
NetworkSwitcher.tsx
click-outside 用 pointerdown(触摸友好),effect 仅在 open 时注册,removeEventListener cleanup 正确 ✓
NETWORKS.find(...) ?? NETWORKS[0] — 未知 chainId 降级为 Sepolia ✓
OP Mainnet 标 disabled={!n.available},按钮灰化 + "Coming soon" 标签传达意图清晰 ✓
disabled 阻止 onClick,所以 select() 里的 toast 对 OP Mainnet 不可达 — 但视觉反馈已足够,toast 是未来移除 disabled 时的兜底,无害 ✓
z-50 保证下拉不被遮挡 ✓
transfer/page.tsx
addressBookAPI import 保留(#400 WIP 未合并,master 上该 export 仍存在)✓
<NetworkSwitcher /> 放在 flex justify-end mb-3,布局无破坏 ✓
APPROVE
| 轮次 | 执行者 | 裁决 |
|---|---|---|
| R1 | Sonnet 4.6 | APPROVE(无阻塞问题) |
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.
The transfer page never showed which chain it's on — it silently assumed Sepolia. Adds a NetworkSwitcher (top-right, always visible): active network + Testnet badge, dropdown of networks. Transfers run only on Sepolia today (the whole AA stack is Sepolia-only), so OP Mainnet is shown 'Coming soon' (phase-2 target) instead of offering a switch that would fail (selecting it toasts). Real switching wires in here when mainnet lands. tsc+lint green;
next buildverified on master (/transfer static).