feat: refactor token details page behind a feature flag#25199
feat: refactor token details page behind a feature flag#25199
Conversation
|
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. |
|
@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. |
Prithpal-Sooriya
left a comment
There was a problem hiding this comment.
Some tests are better than no tests. LGTM!
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Performance Test Selection: |
|
|
||
| const wasHandledAsNonEvm = await sendNonEvmAsset( | ||
| InitSendLocation.AssetOverview, | ||
| ); |
There was a problem hiding this comment.
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)
|


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
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Default behavior remains the legacy
Assetscreen via a newtokenDetailsV2flag (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
TokenDetailsV2 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(defaultfalse) with selectorselectTokenDetailsV2Enabled, and updatesMainNavigatorto route theAssetscreen through theTokenDetailsfeature-flag wrapper (falling back to the legacyAssetview when disabled).Written by Cursor Bugbot for commit 12598db. This will update automatically on new commits. Configure here.