-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: enable tx submission before swap quotes are loaded #22905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Metamask Bridge Controller Dependency Mismatch
The @metamask/assets-controllers dependency is pinned to ^88.0.0, but the preview versions of @metamask/bridge-controller and @metamask/bridge-status-controller have a peer dependency requirement of ^89.0.0. This creates a version mismatch that will likely cause runtime errors or unexpected behavior. Update @metamask/assets-controllers to ^89.0.0 to satisfy the peer dependency constraints of the new bridge controller versions.
package.json#L169-L170
Lines 169 to 170 in 84e4f6b
| "@metamask/keyring-controller/@ethereumjs/tx": "npm:@ethereumjs/tx@5.4.0", | |
| "metro/image-size": "^1.2.1", |
…itted (#7182) ## Explanation Publishes the `QuotesReceived` event when submitting a trade before all quotes load Extension PR: MetaMask/metamask-extension#37963 Mobilie PR: MetaMask/metamask-mobile#22905 <!-- Thanks for your contribution! Take a moment to answer these questions so that reviewers have the information they need to properly understand your changes: * What is the current state of things and why does it need to change? * What is the solution your changes offer and how does it work? * Are there any changes whose purpose might not obvious to those unfamiliar with the domain? * If your primary goal was to update one package but you found you had to update another one along the way, why did you do so? * If you had to upgrade a dependency, why did you do so? --> ## References <!-- Are there any issues that this pull request is tied to? Are there other links that reviewers should consult to understand these changes better? Are there client or consumer pull requests to adopt any breaking changes? For example: * Fixes #12345 * Related to #67890 --> Fixes https://consensyssoftware.atlassian.net/browse/SWAPS-3427 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Publishes a QuotesReceived event on early trade submission and adds a helper and types to standardize its payload and warnings. > > - **Bridge Status Controller**: > - Change `submitTx` to accept optional `isLoading` and `warnings`; when `isLoading=true`, publish `Unified SwapBridge Quotes Received` using `getQuotesReceivedProperties` before stopping quote polling. > - Allow tracking of `QuotesReceived` in internal tracking helper. > - **Bridge Controller**: > - Add and export `getQuotesReceivedProperties` to build QuotesReceived metrics payload; re-export from `index.ts`. > - Introduce `QuoteWarning` type and use it for `warnings` across events/tests; update snapshots to standardized values (e.g., `low_return`, `insufficient_balance`). > - Selector/tests: refine `gasIncluded` vs `gasIncluded_7702` handling and add scenario where fees come from dest token under 7702. > - Tests: add BTC fee error handling (return `undefined` fees on failure) and validate BTC/SOL fee behaviors. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 89bb4b5. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
84e4f6b to
254cad9
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsFallback: AI analysis did not complete successfully. Running all tests. |



Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Pins
@metamask/bridge-controllerand@metamask/bridge-status-controllerto preview61.0.0viaresolutionsand updatesyarn.lock(including peer ranges).@metamask/bridge-controller@^60.1.0and@metamask/bridge-status-controller@^60.1.0to@metamask-previews/*@61.0.0-preview-f4ab1511inpackage.json.yarn.lockentries to the preview packages and adjust peer ranges (e.g.,@metamask/assets-controllersto^89.0.0,@metamask/bridge-controllerto^61.0.0).Written by Cursor Bugbot for commit 84e4f6b. This will update automatically on new commits. Configure here.