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

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

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

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

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

2026年10月11日 から。

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

評価

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

調査の方向性

ゲートは src/components/MarketSwitcher.tsx にあります。297行目の showLegacy の useState は false で始まり、legacy グループは、これがオンのときだけ描画されます(707〜712行目)。getMarketCategory(162行目付近)と isSelected のチェック(383行目付近)を読んでください。新規にページを読み込んだときに、legacy スイッチを操作しなくても Gnosis のような legacy マーケットが一覧に表示され、選択済みとしてマークされていれば完了です。

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

説明

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).

主要言語
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 を短くまとめたダイジェスト。