Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#3,128 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@shivam-V8 is already working on this.

Since Oct 11, 2026.

  • #3130 by @shivam-V8 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

The gate is in src/components/MarketSwitcher.tsx: the showLegacy useState at line 297 starts as false, and the legacy group only renders when it is on (lines 707-712). Read getMarketCategory (around line 162) and the isSelected check (around line 383). Done when a legacy market such as Gnosis is listed and marked selected on a fresh page load, without toggling the legacy switch.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
537
Forks
495
Avg merge
1d 13h
Merged PRs (30d)
14

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aave/interface

All issues in aave/interface

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.