Skip to content

fix: create per network custom liquidity and volume trending params#24730

Merged
sahar-fehri merged 3 commits intomainfrom
fix/per-network-min-trending-params
Jan 16, 2026
Merged

fix: create per network custom liquidity and volume trending params#24730
sahar-fehri merged 3 commits intomainfrom
fix/per-network-min-trending-params

Conversation

@sahar-fehri
Copy link
Copy Markdown
Contributor

@sahar-fehri sahar-fehri commented Jan 16, 2026

Description

Implements per-network minimum liquidity and volume thresholds for trending tokens to filter out low-quality tokens and "shitcoins" while preserving legitimate trending assets. Previously used global constants that were too restrictive (hiding valid tokens) for some chains.

Changelog

CHANGELOG entry: adds per network min value params for trending token

Related issues

Fixes: #24392
Fixes: #24727

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Implements per-network trending thresholds and integrates them into the trending hook.

  • Adds TRENDING_NETWORK_THRESHOLDS and MULTI_CHAIN_BASELINE_THRESHOLDS with chain-specific min liquidity/volume values
  • Introduces helpers getMinLiquidityForChains and getMinVolume24hForChains and uses them in useTrendingRequest
  • Updates useTrendingRequest to derive thresholds from selected chainIds (supports overrides) and keeps existing polling/stale-request handling
  • Expands tests to cover per-network/multi-chain thresholds and integration with getTrendingTokens

Written by Cursor Bugbot for commit 331d484. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.83%. Comparing base (44a8bc0) to head (d50135d).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #24730   +/-   ##
=======================================
  Coverage   79.82%   79.83%           
=======================================
  Files        4200     4200           
  Lines      107434   107454   +20     
  Branches    22402    22406    +4     
=======================================
+ Hits        85761    85782   +21     
+ Misses      15652    15650    -2     
- Partials     6021     6022    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

The changes are limited to the useTrendingRequest hook in the Trending feature, which handles filtering thresholds for trending tokens based on network-specific configurations.

Key observations:

  1. Scope: Changes are isolated to the Trending tokens feature - adding per-network threshold configuration for liquidity and volume filtering
  2. No E2E tests exist: Searched the e2e/ directory and found no existing E2E tests for the Trending feature
  3. Unit tests added: The PR includes comprehensive unit tests for the new threshold functions
  4. No critical paths affected: The changes don't touch any Controllers, Engine, core wallet functionality, or security-critical code
  5. Feature is UI/filtering logic: This affects how trending tokens are displayed/filtered, not core wallet operations like transactions, account management, or network switching

The Trending feature is a discovery/exploration feature that doesn't have corresponding E2E test coverage. The changes are well-tested at the unit level and don't impact any of the available E2E test tag areas (accounts, confirmations, identity, network, trade, wallet platform, card, rewards, perps, ramps, predictions, or Flask/Snaps).

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@sahar-fehri sahar-fehri added this pull request to the merge queue Jan 16, 2026
Merged via the queue into main with commit 5448e24 Jan 16, 2026
65 of 66 checks passed
@sahar-fehri sahar-fehri deleted the fix/per-network-min-trending-params branch January 16, 2026 14:00
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2026
@metamaskbot metamaskbot added the release-7.63.0 Issue or pull request that will be included in release 7.63.0 label Jan 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.63.0 Issue or pull request that will be included in release 7.63.0 size-M team-assets

Projects

None yet

5 participants