fix(activity): correct EVM rows when non-EVM account selected#29794
Conversation
Pass account group EVM address into TransactionElement for decode and token lookups; re-decode when selectedAddress changes; add selectTokensByChainIdAndWalletAddress. Refs: #28035 Refs: https://consensyssoftware.atlassian.net/browse/TMCU-602
|
There's a potential on this fixing #29713 as well |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag selection rationale:
Not selected:
Performance Test Selection: |
|



Description
Activity’s unified transaction list passes
selectedAddressintoTransactionElementand Redux token selectors keyed by account. Those paths previously used the globally selected internal account. After switching the Activity network filter from a non-EVM network (e.g. Bitcoin) back to all popular networks, the selected account could still be non-EVM while EVM transactions remained in the list. EVM sends were compared against a non-EVM address (wrong direction / “Received”), and token metadata was looked up under the wrong account key on each chain (“Not available”).This change passes the account group’s EVM address for EVM rows (
UnifiedTransactionsView), re-decodes whenselectedAddresschanges (TransactionElement), and addsselectTokensByChainIdAndWalletAddressso token maps match the same wallet address used for decoding.Changelog
CHANGELOG entry: Fixed Activity showing incorrect Sent/Received labels and "Not available" amounts after switching from a non-EVM network filter back to all popular networks.
Related issues
Fixes: #28035
Refs: https://consensyssoftware.atlassian.net/browse/TMCU-602
Manual testing steps
Screenshots/Recordings
Before
see video on this comment from #28035
After
fix_activity.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 derives the address used to classify EVM transactions and fetch per-chain token metadata, which can alter Sent/Received labeling and displayed amounts across the unified list. Risk is limited to UI/state selection logic and is covered by added selector tests.
Overview
Fixes unified Activity rendering when a non-EVM account remains selected by ensuring EVM list rows use the account group’s EVM address for direction/decoding and token metadata.
UnifiedTransactionsViewnow passes the account group EVM address intoTransactionElement,TransactionElementre-decodes whenselectedAddresschanges, and token lookup is switched to a new selectorselectTokensByChainIdAndWalletAddress(with tests) so token maps are keyed by the same explicit wallet address rather than the globally selected account.Reviewed by Cursor Bugbot for commit 7910a16. Bugbot is set up for automated code reviews on this repo. Configure here.