-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: Bump @metamask/swaps-controller
to 12.0.0
#12378
base: main
Are you sure you want to change the base?
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. |
fa4f400
to
f0c6e60
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/[email protected] |
58fe119
to
eb6f6e9
Compare
swaps-controller
to test removal of global providerswaps-controller
to test removal of global provider
|
swaps-controller
to test removal of global providerswaps-controller
to test removal of global provider
swaps-controller
to test removal of global provider@metamask/swaps-controller
to 12.0.0
6d28eb6
to
5f16ffe
Compare
Bitrise🔄🔄🔄 Commit hash: 5f16ffe Note
|
This version updates SwapsController so that it is less reliant on the global network. Specifically: - The `setChainId` and `setProvider` methods have been removed from SwapsController. - The `fetchGasFeeEstimates` and `fetchEstimatedMultiLayerL1Fee` SwapsController constructor options are now expected to take a `networkClientId`. - The SwapsController constructor no longer takes a `chainId` option. - `startFetchAndSetQuotes`, `fetchTokenWithCache`, `fetchTopAssetsWithCache`, and `fetchAggregatorMetadataWithCache` now take a `networkClientId`. - The `fetchParamsMetaData` SwapsController state property now includes a `networkClientId`. - The chain cache in SwapsController state will now automatically be updated whenever the network has changed. At the moment, the global network client ID is still passed into SwapsController whenever it is used, but now that can be changed to use a dapp-level network client ID without needing to update SwapsController.
5f16ffe
to
5f144ec
Compare
Bitrise✅✅✅ Commit hash: 657e5a9 Note
|
Bitrise✅✅✅ Commit hash: f3c4cc2 Note
|
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.
LGTM!, I tested locally swaps flow seems to work correctly
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.
LGTM - reviewed: package.json, yarn.lock & Engine.ts
Bitrise❌❌❌ Commit hash: d235bd1 Note
Tip
|
Quality Gate passedIssues Measures |
Description
This version upgrades
@metamask/swaps-controller
so that it is less reliant on the global network. Specifically:setChainId
andsetProvider
methods have been removed from SwapsController.fetchGasFeeEstimates
andfetchEstimatedMultiLayerL1Fee
SwapsController constructor options are now expected to take anetworkClientId
.chainId
option.startFetchAndSetQuotes
,fetchTokenWithCache
,fetchTopAssetsWithCache
, andfetchAggregatorMetadataWithCache
now take anetworkClientId
.fetchParamsMetaData
SwapsController state property now includes anetworkClientId
.See full changelog here: https://github.com/MetaMask/swaps-controller/blob/main/CHANGELOG.md#1200
At the moment, the global network client ID is still passed into SwapsController whenever it is used, but now that can be changed to use a dapp-level network client ID without needing to update SwapsController.
Related issues
Fixes #12470.
Also see:
Manual testing steps
Screenshots/Recordings
The Swaps flow should work exactly like it does now.
Here is a video demonstrating fetching Swaps quotes:
Screen.Recording.2024-11-22.at.12.25.33.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist