bug: the current market is missing from the market switcher when it is a legacy market
维护者通常 1 天内回复
@shivam-V8 已经在做这个了。
开始于 2026年10月11日。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 86/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
门控位于 src/components/MarketSwitcher.tsx:第 297 行的 showLegacy useState 初始值为 false,legacy 分组只有在其开启时才会渲染(第 707-712 行)。请阅读 getMarketCategory(约第 162 行)和 isSelected 检查(约第 383 行)。完成标准是:在全新加载页面时,无需切换 legacy 开关,像 Gnosis 这样的 legacy 市场就已列出并被标记为已选中。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
When the currently selected market is a legacy market (Gnosis, Sonic, Scroll, Metis, ZKsync, Soneium, EtherFi), opening the market switcher does not list it. The active market is missing from the dropdown entirely and nothing is marked as selected, so the switcher gives no indication of which market you are actually on.
showLegacy is local component state initialised to false (src/components/MarketSwitcher.tsx:297) and is never persisted, so it resets on every mount, regardless of the market being viewed:
// src/components/MarketSwitcher.tsx:297
const [showLegacy, setShowLegacy] = useState(false);
The legacy group is only rendered when that flag is on (MarketSwitcher.tsx:707-712), and isSelected (MarketSwitcher.tsx:383) can only highlight an item that is rendered. The header trigger still shows the correct market name, so the switcher contradicts itself: the header says "Gnosis", the list says Gnosis does not exist.
This became user-visible for Gnosis and Sonic when #3111 moved them into the legacy category (MarketSwitcher.tsx:158-159); the showLegacy switch itself arrived with the v3 uplift (#3075).
To Reproduce
Steps to reproduce the behavior:
- Go to https://app.aave.com/?marketName=proto_gnosis_v3 (Gnosis V3), or select Gnosis after enabling "Show legacy markets"
- Reload the page
- Open the market switcher in the header
- See that Gnosis — the market currently being viewed — is not listed anywhere and no market appears selected, until "Show legacy markets" is toggled on again
Expected behavior
The market you are currently viewing should always be visible in the switcher and marked as selected. Initialising showLegacy from the current market's category would do it, e.g.
const [showLegacy, setShowLegacy] = useState(() => getMarketCategory(currentMarket) === 'legacy');
reusing the existing getMarketCategory helper (MarketSwitcher.tsx:162).
Screenshots
n/a — reproducible from the source as described above.
Desktop (please complete the following information):
- OS: any
- Browser: any (not browser-specific)
- Version:
main@ 32cc548b9
Smartphone (please complete the following information):
- Device: any
- OS: any
- Browser: any (the same code path renders the mobile sheet)
- Version:
main@ 32cc548b9
Additional context
This affects precisely the users who still hold positions in a legacy market: the market they are using disappears from the switcher on every page load. Combined with the search behaviour, finding the market again is non-obvious. Happy to open a PR covering both.
Related: #3127 (same root cause — the showLegacy gate — seen from the search side).
- 主要语言
- TypeScript
- 星标
- 537
- 派生
- 495
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 15
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aave/interface 的其他 Issue
-
bug: hidden reserves are still offered as collateral swap targets可能已有人在做 @shivam-V8 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
bug: market switcher search reports "No markets found" for legacy markets可能已有人在做 @shivam-V8 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Staking: "Claim all" Umbrella rewards button removed by v3 uplift可能已有人在做 @MrMichou 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
Typo: Principle Tokens -> Principal Tokens可能已有人在做 @Shivamd0608 于 143 天前认领。 未关闭bug new issue
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
app.aave.com/governance - UI - False 'Payload Executed' Text Stamp可能已有人在做 @shivam-V8 于 4 天前认领。 未关闭bug new issue
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
xdjs/MusicNerdWeb#1532 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
sebastian-software/ardo#352 ·
维护者通常 1 天内回复
-
@react95/core good first issue
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 3 天内回复
-
@shikijs/stream: `ShikiStreamTokenizer.clone()` shares its `tokensStable` array with the original可能已有人在做 @xyrolle 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复