feat(extension): cowswap intent submission via bridge-status controller#40483
feat(extension): cowswap intent submission via bridge-status controller#40483oscarwroche merged 87 commits intomainfrom
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/core-extension-ux (3 files, +208 -5)
📜 @MetaMask/policy-reviewers (8 files, +8 -0)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🔄 @MetaMask/swaps-engineers (10 files, +602 -89)
|
|
I have read the CLA Document and I hereby sign the CLA |
Builds ready [9335bcc]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
9335bcc to
1acc2a5
Compare
Builds ready [1acc2a5]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs
|
Builds ready [0aa5c19]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| ), | ||
| ); | ||
| const bridgeTxHistoryItem = | ||
| bridgeTxHistoryItemByHash ?? bridgeTxHistoryItemByOriginalTxMetaId; |
There was a problem hiding this comment.
Duplicate bridge history lookups across component and hook
Low Severity
The transaction-list-item component independently computes bridgeTxHistoryItem using the same two-selector fallback chain (selectBridgeHistoryItemByHash → selectBridgeHistoryForOriginalTxMetaId) that useBridgeTxHistoryData already performs internally. This duplicates the lookup logic across two call sites for the same transaction, increasing maintenance burden and the risk of the two lookups diverging in future changes.
Additional Locations (1)
Triggered by project rule: MetaMask Extension - General Coding Guidelines
There was a problem hiding this comment.
This seems relevant - this component already calls useBridgeTxHistoryData . Would it be possible to return bridgeHistoryItem from it and use that instead of duplicating the selector calls?
There was a problem hiding this comment.
Discussed with @ameliejyc and it can be addressed in another PR - should we create an issue?
Builds ready [0ae60a4]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Prithpal-Sooriya
left a comment
There was a problem hiding this comment.
Policy files LGTM
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.
ui/components/app/transaction-list-item/transaction-list-item.component.js
Show resolved
Hide resolved
Builds ready [a5cdddb]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
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.
ui/components/app/transaction-list-item/transaction-list-item.component.js
Show resolved
Hide resolved
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.
ui/components/app/transaction-list-item/transaction-list-item.component.js
Show resolved
Hide resolved
Builds ready [1d09a5f]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [cf8a6a8]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
# Conflicts: # yarn.lock
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.
ui/components/app/transaction-list-item/transaction-list-item.component.js
Show resolved
Hide resolved
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.
ui/components/app/transaction-list-item/transaction-list-item.component.js
Show resolved
Hide resolved
|
Builds ready [2d179d5]
⚡ Performance Benchmarks
🌐 Dapp Page Load BenchmarksCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|





Description
This PR adds intent-based swap submission to the MetaMask extension for RWA / CowSwap flows.
It wires the extension bridge flow to the new
submitIntentpath inBridgeStatusController, enables typed-data signing through the bridge-status controller messenger, and updates activity / transaction-details handling for intent orders so that pending, failed, approval, and detail states render correctly.Changelog
CHANGELOG entry: Added CowSwap intent submission through the bridge status controller.
Manual testing steps
metamask-extensionand install dependencies withyarn./submitOrderon the bridge API.Pendingrather thanQueuedScreenshots/Recordings
After
Screen.Recording.2026-03-10.at.15.24.11.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Adds a new
submitIntenttransaction submission path and typed-data signing delegation for bridge/swap flows, plus multiple selector/UI fallbacks for intent-history lookups. Moderate risk due to changes in transaction submission/navigation and activity/detail rendering logic for bridge-related transactions.Overview
Enables intent-based swap submission (e.g., CowSwap/RWA) in the extension by wiring a new background method
submitIntentthroughBridgeStatusController(including controller-init messenger permission forKeyringController:signTypedMessage) and exposing it viametamask-controller/submitRequestToBackground.Updates bridge status selectors and UI/hooks to properly support intent orders whose history is keyed by order UID rather than tx hash, adding lookups by
originalTransactionIdandapprovalTxId, and preventing approval rows from inheriting failed bridge status.Adjusts activity/transaction details rendering for intent swaps: show Pending for submitted unified swap intents even when not earliest nonce, hide cancel for intent activity, route details by
hashortxMetaId, and omit the nonce row when missing. Includes new/updated unit tests and bumps@metamask/bridge-controller/@metamask/bridge-status-controllerto^68.0.0with corresponding LavaMoat policy updates.Written by Cursor Bugbot for commit 2d179d5. This will update automatically on new commits. Configure here.