Commit 12180e5
fix: activity list improvements when selecting nonevm (#38529)
## **Description**
When a Solana account is selected, EVM swap transactions from the same
account group were not showing in the activity list. Additionally, swap
transactions were displaying incomplete information like "Swap to"
instead of "Swap ETH to USDC".
This PR fixes both issues by:
- Fetching EVM transactions for the account group's EVM address when a
non-EVM account is selected
- Using `initialTransaction` instead of `primaryTransaction` for bridge
history lookups (matching the behavior of `useTransactionDisplayData`)
- Using `getAllNetworkTransactions` in the swap details page so
transactions can be found regardless of which account is selected
## **Changelog**
CHANGELOG entry: Fixed swap transactions not appearing in activity list
when Solana account is selected
## **Related issues**
Fixes: #36361
## **Manual testing steps**
1. Create or use an account group that has both an EVM account and a
Solana account
2. Do a swap from the EVM account (e.g. ETH to USDC on Base)
3. Switch to the Solana account in the same group
4. Go to the Activity tab
5. Verify the swap transaction appears with correct info (e.g. "Swap ETH
to USDC")
6. Click on the swap transaction
7. Verify the swap details page shows all information (status,
timestamp, amounts, gas fee, nonce)
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/b514adc4-1054-4541-a481-b865f602d5b5
### **After**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/3e65c6eb-bb5c-4b4d-8134-1ca2dc6fa06e
## **Pre-merge author checklist**
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Shows EVM swap/smart transactions from the account group when a
non‑EVM account is selected and fixes bridge/swap details by using
initialTransaction and querying all-network transactions.
>
> - **Activity list (unified)**:
> - Fetch and display EVM swaps/smart txs for the account group's EVM
address when a non‑EVM account is selected, using
`getAllNetworkTransactions` and `smartTransactions` with nonce grouping
via `groupAndSortTransactionsByNonce` and `PENDING_STATUS_HASH`
filtering.
> - Exclude `incoming` type, dedupe against smart tx nonces, and filter
by enabled networks across namespaces.
> - Maintain unified list with non‑EVM items; render smart transactions
via `SmartTransactionListItem`.
> - **Bridge/Swap display data**:
> - Switch bridge history lookups and token display fields to
`initialTransaction`.
> - **Tx details page**:
> - Use `getAllNetworkTransactions` to locate `src`/approval txs so
details load regardless of selected account.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d31df26. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: SteP-n-s <[email protected]>1 parent ef9f3a3 commit 12180e5
File tree
3 files changed
+132
-33
lines changed- ui
- components/app/transaction-list
- pages/bridge
- hooks
- transaction-details
3 files changed
+132
-33
lines changedLines changed: 112 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| 38 | + | |
34 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
| |||
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
78 | | - | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
429 | 437 | | |
430 | 438 | | |
431 | 439 | | |
432 | | - | |
433 | | - | |
| 440 | + | |
| 441 | + | |
434 | 442 | | |
| 443 | + | |
435 | 444 | | |
436 | | - | |
437 | | - | |
438 | | - | |
| 445 | + | |
439 | 446 | | |
440 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
441 | 451 | | |
442 | 452 | | |
443 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
444 | 549 | | |
445 | 550 | | |
446 | 551 | | |
| |||
537 | 642 | | |
538 | 643 | | |
539 | 644 | | |
540 | | - | |
541 | 645 | | |
542 | 646 | | |
543 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
| 22 | + | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
| 25 | + | |
28 | 26 | | |
| 27 | + | |
29 | 28 | | |
30 | | - | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
| 46 | + | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
| 55 | + | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
| 49 | + | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
| |||
96 | 94 | | |
97 | 95 | | |
98 | 96 | | |
99 | | - | |
100 | | - | |
| 97 | + | |
| 98 | + | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 105 | + | |
110 | 106 | | |
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
114 | | - | |
| 110 | + | |
115 | 111 | | |
116 | 112 | | |
117 | 113 | | |
| |||
0 commit comments