fix(activity): restore Perps after popular networks without forcing Ethereum#29676
Conversation
After Solana (or any non-EVM) selection, MultichainNetworkController kept isEvmSelected false. Choosing "All popular networks" only updated NetworkEnablementController, so Activity Perps tab stayed hidden (TMCU-602). selectAllPopularNetworks now calls selectPopularNetwork for Ethereum mainnet after enableAllPopularNetworks to restore setActiveNetwork on EVM.
Reverts selectPopularNetwork(eip155:1) after enableAllPopularNetworks (that set the global EVM chain to mainnet and made the picker show Ethereum). Perps tab now uses useNetworksByCustomNamespace(Eip155) so it stays visible when all popular EVM networks are enabled, even if the active chain is Solana.
Keep only ActivityView changes for TMCU-602; hook files match main.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 19386fb. Configure here.
…Each Move the reset of mockAreAllEvmPopularNetworksEnabled to the root beforeEach block to ensure proper test isolation. Previously it was only reset in the Perps tab describe block, which could cause stale values to leak between unrelated test blocks. Co-authored-by: Pedro Pablo Aste Kompen <wachunei@users.noreply.github.com>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: SmokePerps is selected because:
SmokeWalletPlatform is selected because:
SmokeConfirmations is NOT selected because the change is only about tab visibility logic, not about the actual transaction/confirmation flows within Perps. The change is medium risk - it modifies a conditional rendering logic that could affect user experience when switching between EVM and non-EVM networks, but the scope is limited to the Perps tab visibility in ActivityView. Performance Test Selection: |
|




Description
Reason: On Activity, the Perps tab is gated by
selectIsEvmNetworkSelected. After choosing Solana and then All popular networks,isEvmSelectedstayed false, so Perps did not return (TMCU-672). An earlier approach calledselectPopularNetwork('eip155:1')afterenableAllPopularNetworks(), which fixed Perps but incorrectly forced the global EVM chain to Ethereum mainnet, so the network picker showed Ethereum instead of aggregate popular networks.Solution: Keep
selectAllPopularNetworkslimited toNetworkEnablementController.enableAllPopularNetworks()(no implicit chain switch). Drive Activity Perps visibility withuseNetworksByCustomNamespace(eip155, popular): show Perps when the Perps feature flag is on and either the user is on EVM (isEvmSelected) or all popular EVM networks are enabled—without changing the active multichain selection.Changelog
CHANGELOG entry: Fixed the Activity Perps tab not reappearing after switching the transaction network filter back to popular networks from Solana, without forcing Ethereum as the selected chain.
Related issues
Fixes #29053
Refs: https://consensyssoftware.atlassian.net/browse/TMCU-672
Manual testing steps
Screenshots/Recordings
Before
See #28035
After
after_perps_tab.mp4
Pre-merge author checklist
Performance checks (if applicable)
Not applicable for this change (network filter / tab visibility only). Left unchecked until you validate on device if required by your release process.
trace()for usage andaddTokenfor an examplePre-merge reviewer checklist
Note
Low Risk
Low risk UI gating change that only affects whether the Perps tab is shown; main risk is incorrect tab visibility for certain multichain network-filter states.
Overview
Restores Perps visibility on the Activity screen when the user switches to All popular networks after selecting a non‑EVM network, without forcing an EVM chain selection.
ActivityViewnow enables the Perps tab when the feature flag is on and either an EVM network is selected or all populareip155networks are enabled (viauseNetworksByCustomNamespace). Tests update mocks accordingly and add coverage for the non‑EVM + all popular EVM networks case.Reviewed by Cursor Bugbot for commit f0566bd. Bugbot is set up for automated code reviews on this repo. Configure here.