Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

bug: market switcher search reports "No markets found" for legacy markets

Aperta Adatta ai principianti
#3,127 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@shivam-V8 ci sta già lavorando.

Dal 11/10/2026.

  • #3126 di @shivam-V8 — aperta
  • #3129 di @shivam-V8 — aperta
  • #3130 di @shivam-V8 — aperta
  • #3132 di @shivam-V8 — aperta
  • #3136 di @shivam-V8 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Il problema si trova in src/components/MarketSwitcher.tsx: il calcolo di noResults intorno alle righe 614-620 esclude legacy, e il gruppo legacy viene visualizzato solo quando showLegacy è attivo (intorno alle righe 707-712). Inizia riproducendo una ricerca di un mercato legacy come Gnosis con l'interruttore disattivato, poi decidi se le corrispondenze legacy debbano comparire durante una query attiva o contare soltanto nel controllo dello stato vuoto. È completato quando una query che corrisponde solo a un mercato legacy non mostra più "No markets found" e l'utente vede la corrispondenza oppure viene invitato ad attivare "Show legacy markets".

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

Searching for a legacy market in the market switcher renders "No markets found", even though the market exists and matches the query. Affects every market in the legacy category — Gnosis, Sonic, Scroll, Metis, ZKsync, Soneium, EtherFi — on any market/network.

The search filter itself works: the match is computed and lands in the legacy group. Two things then hide it:

  1. The legacy group is only rendered when the "Show legacy markets" switch is on (src/components/MarketSwitcher.tsx:707-712).
  2. noResults (src/components/MarketSwitcher.tsx:614-620) counts pinned, ethereum, l2, other, v4Ethereum and v4Other — but not legacy.

So when a query matches only legacy markets, every counted group is empty, noResults is true, and the empty state renders on top of a match that was found but not displayed.

// src/components/MarketSwitcher.tsx:614
const noResults =
  pinned.length === 0 &&
  ethereum.length === 0 &&
  l2.length === 0 &&
  other.length === 0 &&
  v4Ethereum.length === 0 &&
  v4Other.length === 0;   // legacy.length is never considered

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 (any market)
  2. Open the market switcher in the header
  3. Leave "Show legacy markets" off (its default on every page load)
  4. Type Gnosis into the search box
  5. See "No markets found", although Gnosis exists and is selectable

Expected behavior

An explicit search should surface a matching market. Either show legacy matches whenever a search query is active, or at minimum stop reporting "No markets found" when legacy has matches — for example by including legacy.length in noResults and telling the user the matches are under "Show legacy markets".

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

Users holding positions in a legacy market are the ones most likely to search for it by name, so the empty-state message lands exactly on the people who need the market most. Happy to open a PR for this.

Lingua principale
TypeScript
Stelle
537
Fork
495
Merge medio
1g 18h
PR unite (30g)
15

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aave/interface

Tutte le issue di aave/interface

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.