Skip to content

feat: hidden assets when Isolation mode group delist #5608

Open
cuzz-venus wants to merge 7 commits into
mainfrom
feat/delist-isolation
Open

feat: hidden assets when Isolation mode group delist #5608
cuzz-venus wants to merge 7 commits into
mainfrom
feat/delist-isolation

Conversation

@cuzz-venus
Copy link
Copy Markdown
Contributor

@cuzz-venus cuzz-venus commented May 31, 2026

Jira ticket(s)

VPD-1291

Changes

  • hidden assets when Isolation mode group delist

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 31, 2026

🦋 Changeset detected

Latest commit: 2ba15d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@venusprotocol/evm Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dapp-preview Ready Ready Preview Jun 2, 2026 8:10am
dapp-testnet Ready Ready Preview Jun 2, 2026 8:10am
venus.io Ready Ready Preview Jun 2, 2026 8:10am

Request Review

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 31, 2026

Greptile Summary

This PR adds logic to filterEModeGroups to hide an entire isolation-mode e-mode group whenever its "main asset" (identified by the first word of the group's label) is paused and the "show paused assets" toggle is off, preventing users from seeing a dead pool entry.

  • The implementation guard correctly includes an isIsolated check so the whole-group hide rule only applies to isolation groups; regular e-mode groups continue to use the existing per-asset paused filter.
  • Three new unit tests are added; however, the third test ("does not hide the group when the label prefix matches no asset") uses a non-isolated mock group, so it passes trivially without actually verifying the fallback behavior for an isolated group whose name doesn't resolve to a known asset symbol.

Confidence Score: 5/5

Safe to merge; the filtering logic is correct and the isIsolated guard is properly in place

The implementation change is small and self-contained. The guard condition correctly gates on isIsolated, uses optional chaining so a missing main asset is a no-op, and is consistent with the isPaused flag already computed in formatEModeGroups.

The spec file's third new test case should be updated to use an isolated group to actually exercise the intended code path

Important Files Changed

Filename Overview
apps/evm/src/pages/Markets/Tabs/EMode/filterEModeGroups/index.ts Adds early-return guard to hide isolated e-mode groups when their name-derived main asset is paused; isIsolated check is correctly included; relies on label string-parsing for main-asset resolution (pre-existing design constraint, not new in this PR)
apps/evm/src/pages/Markets/Tabs/EMode/filterEModeGroups/tests/index.spec.ts Adds three new test cases; the third test ("label prefix matches no asset") uses a non-isolated group and therefore doesn't actually exercise the target branch of the guard
.changeset/cyan-needles-trade.md Patch changeset entry for the new filtering behavior

Reviews (2): Last reviewed commit: "chore: trim comment" | Re-trigger Greptile

Comment thread apps/evm/src/pages/Markets/Tabs/EMode/filterEModeGroups/index.ts Outdated
Comment thread apps/evm/src/pages/Markets/Tabs/EMode/filterEModeGroups/index.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 31, 2026

Coverage Report for ./apps/evm

Status Category Percentage Covered / Total
🔵 Lines 81.31% 45806 / 56331
🔵 Statements 81.31% 45806 / 56331
🔵 Functions 62.21% 647 / 1040
🔵 Branches 72.28% 5160 / 7138
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/evm/src/pages/Markets/Tabs/EMode/filterEModeGroups/index.ts 97.91% 95.65% 100% 97.91% 2
Generated in workflow #13542 for commit 2ba15d0 by the Vitest Coverage Report Action

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cuzz-venus
Copy link
Copy Markdown
Contributor Author

@greptile review again

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment on lines +28 to +32
const mainAssetSettings = assetSettings.find(
settings =>
settings.vToken.underlyingToken.symbol.toLowerCase() ===
extendedEModeGroup.name.toLowerCase(),
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is risky, as the product team might decide to stop following this convention in the future.

By definition, isolated groups only contain an isolated token and a stablecoin. What I propose is to detect whether any of the tokens within that group are paused and to hide the group by default if that's the case.

Also, we should only hide these from the results if showPausedAssets is false.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants