bug: hidden reserves are still offered as collateral swap targets
Los mantenedores suelen responder en 1 día
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
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:
- Deploy (or run locally) with a reserve address listed in
NEXT_PUBLIC_HIDDEN_RESERVES, or use a market with an entry inHIDDEN_ASSETS(e.g. aCRED on Horizon) - Confirm the reserve is correctly absent from "Assets to supply" on the Dashboard
- Open a supplied position's Swap (collateral swap) modal
- Open the destination token selector
- 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aave/interface
-
bug: the current market is missing from the market switcher when it is a legacy marketPosiblemente ocupada @shivam-V8 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
bug: market switcher search reports "No markets found" for legacy marketsPosiblemente ocupada @shivam-V8 la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Staking: "Claim all" Umbrella rewards button removed by v3 upliftPosiblemente ocupada @MrMichou la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Typo: Principle Tokens -> Principal TokensPosiblemente ocupada @Shivamd0608 la tomó hace 141 días. Abiertobug new issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aave/interface#2861 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
app.aave.com/governance - UI - False 'Payload Executed' Text StampPosiblemente ocupada @shivam-V8 la tomó hace 2 días. Abiertobug new issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
aave/interface#2480 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de aave/interface
Issues similares
-
ai-driven-qa bug claude Minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
linagora/twake-contacts-frontend#241 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result countAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
priority:high
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
ahmedkhaleel2004/gitdiagram#228 ·