Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#3,127 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@shivam-V8 がすでに取り組んでいます。

2026年10月11日 から。

  • #3129 @shivam-V8 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

問題は src/components/MarketSwitcher.tsx にあります。614〜620行付近の noResults の計算では legacy が除外されており、legacy グループは showLegacy がオンのときだけ描画されます(707〜712行付近)。まず、スイッチをオフにした状態で Gnosis のような legacy マーケットを検索して再現させてください。そのうえで、アクティブな検索中に legacy の一致を表示すべきか、それとも空状態の判定にだけ含めるべきかを決めます。legacy マーケットだけに一致する検索で "No markets found" が表示されず、ユーザーが一致結果を見られるか、"Show legacy markets" をオンにするよう案内されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
537
フォーク
495
平均マージ
1日 13時間
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aave/interface のほかの issue

aave/interface の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。