Repository navigation
Conversation
Reserves hidden by HIDDEN_ASSETS or NEXT_PUBLIC_HIDDEN_RESERVES were still offered as collateral swap destinations. Every sibling list already applies isAssetHidden, including the debt swap modal, so apply it here too. The currentMarket parameter is narrowed to CustomMarket to match the value the caller already passes. Closes aave#3131
|
@Krshivam25 is attempting to deploy a commit to the Aave Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reserves hidden by HIDDEN_ASSETS or NEXT_PUBLIC_HIDDEN_RESERVES were still offered as collateral swap destinations. Every sibling list already applies isAssetHidden, including the debt swap modal, so apply it here too. The currentMarket parameter is narrowed to CustomMarket to match the value the caller already passes.
Closes #3131
General Changes
HIDDEN_ASSETSorNEXT_PUBLIC_HIDDEN_RESERVESwere still offered as destination assets in the collateral swap modal.getTokensTonow appliesisAssetHidden, matching every other asset list in the app.Developer Notes
getTokensTo(CollateralSwapModalContent.tsx) filtered only on frozen/paused and the GHO rule. The supply list (SupplyAssetsList.tsx:85-91), both dashboard position lists, the markets list and the sibling debt-swap modal (DebtSwapModalContent.tsx:173) all applyisAssetHiddenas well — the collateral-swap target list was the only one that did not, so a reserve hidden everywhere else was still selectable as a swap destination.The
currentMarketparameter was typedstringwhileisAssetHiddentakes aCustomMarket. The caller already passesstore.currentMarket, which is aCustomMarket, so the parameter type is narrowed rather than cast — the same shapeDebtSwapModalContentalready uses.Tests — none added. This is one predicate reusing an existing helper, and the repo has no component tests for these modals. Verified with
tsc --noEmit(meaningful here because of the type narrowing),next lint, and the jest suite, which is unchanged.Pre-existing failures — the 4 jest suites in
src/utils/that fail onmain(awagmi/chainsimport issue) are unaffected.One caveat: I verified this by code reading and typecheck, not in the browser — reproducing it needs a reserve configured in NEXT_PUBLIC_HIDDEN_RESERVES locally. Worth doing before you push if you want the PR to claim a visual check.