feat: upgrade network controller to v20#26150
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. |
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/ens-controller@12.0.0), npm/@metamask/ppom-validator@0.32.0), npm/@metamask/smart-transactions-controller@11.0.0), npm/builtin-modules@3.3.0), npm/crypto-js@4.2.0), npm/eslint-compat-utils@0.1.2), npm/eslint-plugin-es-x@7.5.0), npm/eslint-plugin-n@16.6.2), npm/eslint-visitor-keys@3.4.3), npm/globals@13.24.0), npm/is-builtin-module@3.2.1) |
… brian/network-controller-v20
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Builds ready [3c0373d]
Page Load Metrics (131 ± 137 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
… brian/network-controller-v20
|
#26147 from develop breaks when merged in since it usses more provider config. Fixing which will reset votes |
7767a4a
Builds ready [304ebfd]
Page Load Metrics (84 ± 9 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks @legobeat, I've used those steps to regenerate yarn.lock #26150 (comment) |
|
@metamaskbot update-policies |
|
Policies updated |
|
Builds ready [d1e86fa]
Page Load Metrics (80 ± 26 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| __classPrivateFieldGet(this, _SmartTransactionsController_instances, "m", _SmartTransactionsController_ensureUniqueSmartTransactions).call(this); | ||
| - onNetworkStateChange(({ providerConfig: newProvider }) => { | ||
| - const { chainId } = newProvider; | ||
| + onNetworkStateChange((state) => { |
There was a problem hiding this comment.
It looks like this change is now part of released @metamask/smart-transactions-controller@12.0.0, while also bumping the transitive dep on @metamask/network-controller 19->20.
Is there a reason to not update to (seemingly equivalent, considering this resolutions entry) @metamask/smart-transactions-controller v12.0.0, or even v12.0.1?
There was a problem hiding this comment.
yes that can be bumped now. I'll do that as quick follow up so i can get the bulk of this merged
jpuri
left a comment
There was a problem hiding this comment.
Changes in files owned by confirmations team look good 👍



Description
Upgrades the network controller to v20, where
providerConfigis removed from state.To handle this, the
getProviderConfigselector is shimmed to return the same data as before. Places that were accessing state directly are now sent through this selector.A migration is added to remove
providerConfigfrom state.A helper function
mockNetworkStateis added to abstract the network schema from unit + e2e tests. This will simplify test writing and the next network controller upgrade, where this state will change again.Related issues
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist