bug: the current market is missing from the market switcher when it is a legacy market
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Il gate si trova in src/components/MarketSwitcher.tsx: lo useState showLegacy alla riga 297 parte da false, e il gruppo legacy viene renderizzato solo quando è attivo (righe 707-712). Leggi getMarketCategory (intorno alla riga 162) e il controllo isSelected (intorno alla riga 383). È completato quando un mercato legacy come Gnosis è elencato e risulta selezionato al primo caricamento della pagina, senza attivare l'interruttore legacy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- TypeScript
- Stelle
- 537
- Fork
- 495
- Merge medio
- 1g 13h
- PR unite (30g)
- 14
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aave/interface
-
bug: market switcher search reports "No markets found" for legacy marketsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Staking: "Claim all" Umbrella rewards button removed by v3 upliftForse già presa @MrMichou l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Typo: Principle Tokens -> Principal TokensForse già presa @Shivamd0608 l’ha presa 139 giorni fa. Apertabug new issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aave/interface#2861 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
app.aave.com/governance - UI - False 'Payload Executed' Text StampForse già presa @shivam-V8 l’ha presa oggi. Apertabug new issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aave/interface#2480 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug: swap token controls are not fully keyboard and screen-reader accessibleForse di nuovo libera @wolf1276 l’ha presa 13 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
aave/interface#3100 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di aave/interface
Issue simili
-
Remove the landing pageApertaby: ai-assisted frontend good-for: new-member spike
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Northeastern-Electric-Racing/Argos#847 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
SignalK/freeboard-sk#990 ·
I maintainer di solito rispondono entro 1 giorno
-
[missing-inheritance] audit review (1 preset)Forse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
osmberlin/tagging-schema-browser#363 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Albert-Weasker/niubigeo#205 ·
I maintainer di solito rispondono entro 1 giorno
-
area/frontend area/v2 kind/bug priority/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
kubeflow/notebooks#1498 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno