bug: hidden reserves are still offered as collateral swap targets
I maintainer di solito rispondono entro 1 giorno
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
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:
- 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.
- Lingua principale
- TypeScript
- Stelle
- 537
- Fork
- 495
- Merge medio
- 1g 13h
- PR unite (30g)
- 14
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aave/interface
-
bug: the current market is missing from the market switcher when it is a legacy marketForse già presa @shivam-V8 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
bug: market switcher search reports "No markets found" for legacy marketsForse già presa @shivam-V8 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Staking: "Claim all" Umbrella rewards button removed by v3 upliftForse già presa @MrMichou l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Typo: Principle Tokens -> Principal TokensForse già presa @Shivamd0608 l’ha presa 140 giorni fa. Apertabug new issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aave/interface#2861 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
app.aave.com/governance - UI - False 'Payload Executed' Text StampForse già presa @shivam-V8 l’ha presa 1 giorno fa. Apertabug new issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
aave/interface#2480 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di aave/interface
Issue simili
-
Bayern feature:Application ready web
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
digitalfabrik/entitlementcard#3176 ·
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NanmiCoder/cc-haha#1533 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug: Calendar work items cannot be opened on mobileForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100