Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

bug: hidden reserves are still offered as collateral swap targets

Abierto Apto para principiantes
#3,131 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@shivam-V8 ya está trabajando en esto.

Desde el 12/10/2026.

  • #3132 de @shivam-V8 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
frontend, web-dev

Línea de trabajo

Lee getTokensTo en src/components/transactions/Swap/modals/request/CollateralSwapModalContent.tsx y compara su filtro con src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx y src/modules/dashboard/lists/Swap/modals/request/DebtSwapModalContent.tsx. Comprueba cómo recibe isAssetHidden el mercado actual y, después, verifica que las reservas ocultas queden excluidas de los destinos del intercambio de colateral, mientras siguen aplicándose las reglas existentes para los activos congelados y pausados, así como para GHO.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
537
Forks
495
Merge medio
1 d 13 h
PR fusionados (30 d)
14

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de aave/interface

Todos los issues de aave/interface

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.