Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

bug: the current market is missing from the market switcher when it is a legacy market

Abierto Apto para principiantes
#3,128 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@shivam-V8 ya está trabajando en esto.

Desde el 11/10/2026.

  • #3130 de @shivam-V8 — abierto

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:

  1. Go to https://app.aave.com/?marketName=proto_gnosis_v3 (Gnosis V3), or select Gnosis after enabling "Show legacy markets"
  2. Reload the page
  3. Open the market switcher in the header
  4. 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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aave/interface

Todos los issues de aave/interface

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.