feat(extension): cowswap intent submission via bridge-status controller#40483
feat(extension): cowswap intent submission via bridge-status controller#40483oscarwroche wants to merge 85 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
|
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.
Builds ready [f6a4450]
⚡ 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
Builds ready [62d6e76]
⚡ 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 [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!]
|





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
Touches transaction submission flow (including new
submitIntentRPC path) and activity/details status logic, which could affect how swaps are sent and displayed. Changes are scoped to bridge/intent handling but include new signing permissions and selector fallbacks that need careful validation.Overview
Adds a new intent submission path for bridge/swap quotes by wiring
submitIntentthrough the background connection and UI (useSubmitBridgeTransactionnow routes intent quotes tosubmitBridgeIntent, while continuing to usesubmitBridgeTxfor non-intent quotes).Updates bridge activity/detail rendering to support intent orders keyed by
originalTransactionId(new selectors/lookup fallbacks, tx-details navigation by hash or tx meta id) and avoids mislabeling approval rows as failed bridge activity; also adjusts UX to show Pending for submitted intent swaps (even when not earliest nonce), hide Cancel, and omit the nonce row when missing.Upgrades
@metamask/bridge-controller/bridge-status-controllerto68.0.0, addsKeyringController:signTypedMessageto the bridge-status controller messenger, and updates LavaMoat policies accordingly.Written by Cursor Bugbot for commit cf8a6a8. This will update automatically on new commits. Configure here.