Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#3,127 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@shivam-V8 đang làm issue này rồi.

Từ ngày 11/10/2026.

  • #3129 của @shivam-V8 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Vấn đề nằm ở src/components/MarketSwitcher.tsx: phép tính noResults quanh các dòng 614-620 bỏ sót legacy, còn nhóm legacy chỉ được render khi showLegacy được bật (quanh các dòng 707-712). Hãy bắt đầu bằng cách tái hiện việc tìm kiếm một thị trường legacy như Gnosis khi công tắc đang tắt, sau đó quyết định xem kết quả legacy nên hiển thị trong lúc có truy vấn đang hoạt động hay chỉ được tính vào kiểm tra trạng thái trống. Hoàn thành khi một truy vấn chỉ khớp với một thị trường legacy không còn hiển thị "No markets found", và người dùng hoặc thấy kết quả khớp hoặc được thông báo bật "Show legacy markets".

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
537
Fork
495
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aave/interface

Tất cả issue của aave/interface

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.