fix: cp-7.77.0 cp-7.78.0 missing metamask pay transactions in activity#30145
Conversation
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 c656d63. Configure here.
|
@n3ps This is a release blocker and cherry-pick so I'm intentionally limiting the scope here, but two points for potential future refactor:
|
6741849 to
ed4f310
Compare
8f21a5a
…Transactions" This reverts commit 8f21a5a.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The changes in this PR affect transaction history display and filtering logic in several important ways:
Tags selected:
Tags NOT selected:
Performance Test Selection: |
|




Description
The Activity tab had several bugs causing MetaMask Pay transactions to be missing, duplicated, or unreachable from the source chain. This PR addresses four root causes in production code plus a test alignment for the bridge smoke E2E:
Source-chain visibility. Submitted EVM transactions were filtered strictly by
tx.chainId, so a MetaMask Pay parent was only visible on its destination chain. The source chain is recorded onmetamaskPay.chainId(for gasless flows) or on linked child transactions viarequiredTransactionIds(for non-gasless flows). A newselectRelatedChainIdsByTransactionIdselector returns the full set of chain IDs a transaction relates to, and the Activity list now matches against that set.Dedupe fallback collapsed internal MetaMask Pay transactions. When a transaction had no nonce,
selectLocalTransactionsfell back totxParams.actionIdas the dedupe key.actionIdis a top-level field onTransactionMeta, not ontxParams, so for MetaMask Pay internal transactions (which have no nonce) every entry collapsed onto the sameundefinedkey and all but one were dropped. The fallback now uses the top-levelid, which is always present.Local transactions were scoped to the wrong account.
selectLocalTransactionsgated onselectEvmAddress— the EVM address of the currently selected internal account. When the user picked a non-EVM account (e.g. Solana), this wasundefinedand the selector returned an empty list. Switching to "All popular networks" did not restore the address because that toggle changes enabled networks, not the selected account. It now usesselectSelectedAccountGroupEvmInternalAccount, the same source already used by the Activity tab's API query.Incoming-transaction duplicates. The
TransactionControllerincoming-transactions feature stores incoming transfers as separateTransactionMetaentries marked withisTransfer !== undefined. The accounts API also returns these transactions in its confirmed history, producing duplicate rows in the Activity tab. The dedupe step now skips entries withisTransfer !== undefined, leaving the accounts-API row as the canonical source.Bridge smoke E2E row alignment. The Activity list merges pending smart transactions in alongside the real
TransactionMetarow, producing a stale shell entry that lands at row 0.bridge-action-smokewas asserting on row 0 and timing out. The test now asserts on row 1, with a TODO to remove the STX-state merge from the Activity selectors and restore row 0.Changelog
CHANGELOG entry: Fixed MetaMask Pay transactions appearing duplicated or missing from the Activity tab, including on the source chain and when the selected account is non-EVM.
Related issues
Fixes: #30066
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
Pre-merge reviewer checklist
Note
Cursor Bugbot is generating a summary for commit f45d17e. Configure here.