bug: the current market is missing from the market switcher when it is a legacy market
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
The gate is in src/components/MarketSwitcher.tsx: the showLegacy useState at line 297 starts as false, and the legacy group only renders when it is on (lines 707-712). Read getMarketCategory (around line 162) and the isSelected check (around line 383). Done when a legacy market such as Gnosis is listed and marked selected on a fresh page load, without toggling the legacy switch.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- TypeScript
- Stars
- 537
- Forks
- 495
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aave/interface
-
bug: market switcher search reports "No markets found" for legacy marketsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Staking: "Claim all" Umbrella rewards button removed by v3 upliftPossibly taken @MrMichou claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Typo: Principle Tokens -> Principal TokensPossibly taken @Shivamd0608 claimed this 139 days ago. Openbug new issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aave/interface#2861 · 1 comment ·
Maintainers usually reply within 1 day
-
app.aave.com/governance - UI - False 'Payload Executed' Text StampPossibly taken @shivam-V8 claimed this today. Openbug new issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aave/interface#2480 · 1 comment ·
Maintainers usually reply within 1 day
-
bug: swap token controls are not fully keyboard and screen-reader accessibleMay be free again @wolf1276 claimed this 13 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
aave/interface#3100 · 2 comments ·
Maintainers usually reply within 1 day
Similar issues
-
by: ai-assisted frontend good-for: new-member spike
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Northeastern-Electric-Racing/Argos#847 ·
Maintainers usually reply within 4 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
SignalK/freeboard-sk#990 ·
Maintainers usually reply within 1 day
-
[missing-inheritance] audit review (1 preset)Possibly taken @github-actions claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
osmberlin/tagging-schema-browser#363 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Albert-Weasker/niubigeo#205 ·
Maintainers usually reply within 1 day
-
area/frontend area/v2 kind/bug priority/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kubeflow/notebooks#1498 · 1 comment ·
Maintainers usually reply within 1 day