Skip to content

feat: refactor token details page behind a feature flag#25199

Merged
bergarces merged 33 commits intomainfrom
token-details-v2
Jan 29, 2026
Merged

feat: refactor token details page behind a feature flag#25199
bergarces merged 33 commits intomainfrom
token-details-v2

Conversation

@bergarces
Copy link
Copy Markdown
Contributor

@bergarces bergarces commented Jan 26, 2026

Description

Boilerplate for the Token Details V2 component that we are working on.

Hidden behind a feature flag disabled by default, so no observable changes to the client.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-2487

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

Low Risk
Default behavior remains the legacy Asset screen via a new tokenDetailsV2 flag (off by default), so user-visible impact is minimal. Some low risk remains from rerouting navigation to the new wrapper and introducing new hooks/transaction filtering code paths when the flag is enabled.

Overview
Adds a new TokenDetails V2 implementation (inline header + modular hooks for price, balances, actions, and transactions) and a presentation component (AssetOverviewContent) to compose the token overview UI.

Registers a new remote flag tokenDetailsV2 (default false) with selector selectTokenDetailsV2Enabled, and updates MainNavigator to route the Asset screen through the TokenDetails feature-flag wrapper (falling back to the legacy Asset view when disabled).

Written by Cursor Bugbot for commit 12598db. 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.

@github-actions github-actions bot added size-XL and removed size-M labels Jan 27, 2026
@bergarces bergarces changed the title Token-details-v2 feat: refactor token details page behind a feature flag Jan 27, 2026
@bergarces bergarces marked this pull request as ready for review January 27, 2026 12:57
@bergarces bergarces requested a review from a team as a code owner January 27, 2026 12:57
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@bergarces
Copy link
Copy Markdown
Contributor Author

@Prithpal-Sooriya Regarding test comments. I have trimmed down down significantly. Hooks are now tested in a more comprehensive way. Bigger components still need tests.

Copy link
Copy Markdown
Contributor

@Prithpal-Sooriya Prithpal-Sooriya left a comment

Choose a reason for hiding this comment

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

Some tests are better than no tests. LGTM!

@bergarces bergarces added the skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. label Jan 29, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmationsRedesigned, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeCard, SmokeRewards, SmokePerps, SmokeRamps, SmokePredictions, FlaskBuildTests
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

E2E Test Selection:
Fallback: AI analysis did not complete successfully. Running all tests.

Performance Test Selection:
Fallback: AI analysis did not complete successfully. Running all performance tests.

View GitHub Actions results

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.


const wasHandledAsNonEvm = await sendNonEvmAsset(
InitSendLocation.AssetOverview,
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

sendNonEvmAsset undefined in non-keyring-snaps builds

High Severity

The sendNonEvmAsset variable is defined inside an ONLY_INCLUDE_IF(keyring-snaps) conditional block (lines 143-145), but it's used unconditionally at lines 207-209 and in the useCallback dependency array at line 245. In builds where keyring-snaps is not included, sendNonEvmAsset will be undefined, causing a ReferenceError when the onSend callback is created or invoked.

The existing AssetOverview.tsx uses the correct pattern: the hook is called unconditionally, and only the usage of sendNonEvmAsset is wrapped in the conditional block.

Additional Locations (2)

Fix in Cursor Fix in Web

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
26.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@bergarces bergarces added this pull request to the merge queue Jan 29, 2026
Merged via the queue into main with commit a23fb2e Jan 29, 2026
95 of 97 checks passed
@bergarces bergarces deleted the token-details-v2 branch January 29, 2026 20:51
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2026
@metamaskbot metamaskbot added the release-7.65.0 Issue or pull request that will be included in release 7.65.0 label Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.65.0 Issue or pull request that will be included in release 7.65.0 size-XL skip-sonar-cloud Only used for bypassing sonar cloud when failures are not relevant to the changes. team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants