fix(activity): align EVM activity with account group and network filter cp-7.77.0#29983
Conversation
- Assert useTransactionsQuery prefers group EVM address when global is also set - Cover allConfirmedForEnabledChains and pending filter with network enablement states
- Wire AccountsController so selectLocalTransactions yields pending txs under test - Cover empty enabled EVM set, missing chainId, and group EVM empty-string edge case
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag justifications:
No performance tests are needed as the changes are lightweight memo computations on transaction lists with no significant rendering or data loading impact. Performance Test Selection: |
|



Description
Activity’s unified transaction list used the globally selected account for the Accounts API infinite query (
selectEvmAddress). When a non-EVM account stayed selected (e.g. Bitcoin) but the network filter returned to all popular networks, the query had no EVM address and stayed disabled, so the UI showed only non-EVM rows.This PR resolves the query to the selected account group’s EVM internal account when present, falling back to the global EVM address otherwise. It also filters confirmed and pending EVM rows to the currently enabled EVM chain IDs so the list matches the Activity network filter (including single-chain vs multi-chain). ConfirmedEvm rows use the same group EVM
selectedAddressas pending EVM rows for consistent decode/display with multichain selection.This builds on the earlier Activity fixes in #29794 (TransactionElement / token map); this branch carries the remaining UnifiedTransactionsView and useTransactionsQuery alignment.
Changelog
CHANGELOG entry: Fixed Activity transaction list not showing EVM history after switching back from a non-EVM network filter to all popular networks, and tightened EVM rows to the enabled network filter.
Related issues
Fixes #29952
Refs: #28035
Manual testing steps
Screenshots/Recordings
Before
After
fix_activity_filtering.mp4
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Changes how Activity selects the EVM account/address for history queries and tightens EVM pending/confirmed filtering by enabled chain IDs, which can affect transaction visibility in the main Activity list.
Overview
Fixes unified Activity EVM history loading by resolving the Accounts API query address from the selected account group’s EVM internal account (falling back to the global
selectEvmAddress), so EVM activity still loads when a non-EVM account is selected.Aligns the unified list with the network filter by filtering both confirmed (API) and pending (local) EVM transactions to the currently enabled EVM chain IDs (including guarding against stale paged results), and ensures confirmed EVM rows pass the same group-based
selectedAddressintoTransactionElementas pending rows.Adds targeted tests covering EVM chain-filter behavior for pending/confirmed rows and the new address-selection precedence rules in
useTransactionsQuery.Reviewed by Cursor Bugbot for commit 67fb3e1. Bugbot is set up for automated code reviews on this repo. Configure here.