bug: the current market is missing from the market switcher when it is a legacy market
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 86/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
La compuerta está en src/components/MarketSwitcher.tsx: el useState showLegacy de la línea 297 empieza en false, y el grupo legacy solo se renderiza cuando está activado (líneas 707-712). Lee getMarketCategory (alrededor de la línea 162) y la comprobación isSelected (alrededor de la línea 383). Está terminado cuando un mercado legacy como Gnosis aparece listado y marcado como seleccionado al cargar la página desde cero, sin alternar el interruptor legacy.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- TypeScript
- Estrellas
- 537
- Forks
- 495
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aave/interface
-
bug: hidden reserves are still offered as collateral swap targetsPosiblemente ocupada @shivam-V8 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug: market switcher search reports "No markets found" for legacy marketsPosiblemente ocupada @shivam-V8 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Staking: "Claim all" Umbrella rewards button removed by v3 upliftPosiblemente ocupada @MrMichou la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Typo: Principle Tokens -> Principal TokensPosiblemente ocupada @Shivamd0608 la tomó hace 139 días. Abiertobug new issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aave/interface#2861 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
app.aave.com/governance - UI - False 'Payload Executed' Text StampPosiblemente ocupada @shivam-V8 la tomó hace 1 día. Abiertobug new issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aave/interface#2480 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de aave/interface
Issues similares
-
nextjs-tracking
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
cloudflare/vinext#3887 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
apache/rocketmq-dashboard#6331 ·
Los mantenedores suelen responder en 5 días
-
bug cache clinical-safety P1-critical
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
juspay/blend-design-system#1788 ·
Los mantenedores suelen responder en 1 día
-
[Analytics] Add Focus Time-Block Efficiency Ratio Calculator in src/lib/focus/efficiency-ratio.tsAbiertoanalytics beginner friendly community contributions-welcome enhancement good first issue hacktoberfest help wanted up-for-grabs
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día