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

bug: hidden reserves are still offered as collateral swap targets

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

I maintainer di solito rispondono entro 1 giorno

@shivam-V8 ci sta già lavorando.

Dal 12/10/2026.

  • #3132 di @shivam-V8 — aperta

Valutazione

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

Direzione di ricerca

Leggi getTokensTo in src/components/transactions/Swap/modals/request/CollateralSwapModalContent.tsx e confronta il suo filtro con quelli in src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx e src/modules/dashboard/lists/Swap/modals/request/DebtSwapModalContent.tsx. Controlla come isAssetHidden riceve il mercato corrente, quindi verifica che le riserve nascoste siano escluse dalle destinazioni dello swap del collaterale, mentre continuano ad applicarsi le regole esistenti per gli asset congelati e in pausa e per GHO.

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

Descrizione

Describe the bug

Reserves hidden via HIDDEN_ASSETS or the NEXT_PUBLIC_HIDDEN_RESERVES environment variable are still offered as destination assets in the collateral swap modal. Every other asset list in the app filters them out, including the neighbouring debt-swap modal, so this one list is the outlier.

getTokensTo in src/components/transactions/Swap/modals/request/CollateralSwapModalContent.tsx:217-221 filters only on frozen/paused and the GHO rule:

const tokensToSupply = reserves.filter(
  (reserve: ComputedReserveData) =>
    !(reserve.isFrozen || reserve.isPaused) &&
    !displayGhoForMintableMarket({ symbol: reserve.symbol, currentMarket: currentMarket })
);

The supply list applies the same predicate plus the hidden check (src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx:85-91):

const tokensToSupply = reserves
  .filter(
    (reserve: ComputedReserveData) =>
      !(reserve.isFrozen || reserve.isPaused) &&
      !displayGhoForMintableMarket({ symbol: reserve.symbol, currentMarket }) &&
      !isAssetHidden(currentMarketData.market, reserve.underlyingAsset)
  )

isAssetHidden is defined at src/modules/dashboard/lists/constants.ts:39 and is applied consistently elsewhere — BorrowAssetsList.tsx:104, BorrowedPositionsList.tsx:111, SuppliedPositionsList.tsx:101, MarketAssetsListContainer.tsx:90, and Swap/modals/request/DebtSwapModalContent.tsx:173. Only the collateral-swap target list omits it.

To Reproduce

Steps to reproduce the behavior:

  1. Deploy (or run locally) with a reserve address listed in NEXT_PUBLIC_HIDDEN_RESERVES, or use a market with an entry in HIDDEN_ASSETS (e.g. aCRED on Horizon)
  2. Confirm the reserve is correctly absent from "Assets to supply" on the Dashboard
  3. Open a supplied position's Swap (collateral swap) modal
  4. Open the destination token selector
  5. The hidden reserve is listed and can be selected as the swap target

Expected behavior

A reserve hidden by HIDDEN_ASSETS or NEXT_PUBLIC_HIDDEN_RESERVES should not be offered as a collateral-swap destination, matching the supply list and the debt-swap modal.

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 (same code path)
  • Version: main @ 32cc548b9

Additional context

The fix is to add !isAssetHidden(currentMarket, reserve.underlyingAsset) to that filter, mirroring DebtSwapModalContent. One detail: getTokensTo's currentMarket parameter is currently typed string while isAssetHidden takes a CustomMarket; the value passed in is store.currentMarket, which is already a CustomMarket, so the parameter type can simply be narrowed — again matching the debt-swap modal, which types it CustomMarket. Happy to open a PR.

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

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.