Skip to content

Commit

Permalink
chore: update controllers as of core release v244 (#28905)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR bumps the following packages:
- `@metamask/ens-controller` to `^15.0.0`
- `@metamask/network-controller` to `^22.1.0`
- `@metamask/gas-fee-controller` to `^22.0.1`
- `@metamask/user-operation-controller` to `^20.0.1`
- `@metamask/polling-controller` to `^12.0.1`
- `@metamask/selected-network-controller` to `^19.0.0`

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28781?quickstart=1)

## **Related issues**

Fixes: #28495,
MetaMask/MetaMask-planning#3698

## **Manual testing steps**

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: MetaMask Bot <[email protected]>
Co-authored-by: Elliot Winkler <[email protected]>
  • Loading branch information
3 people authored Dec 4, 2024
1 parent fc06d34 commit f7fc1c9
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 784 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diff --git a/PATCH.txt b/PATCH.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ce3b18534f055ee00aa5821793f855fd300fb72c
--- /dev/null
+++ b/PATCH.txt
@@ -0,0 +1,4 @@
+We remove lookupNetwork from initializeProvider in the network controller to prevent network requests before user onboarding is completed.
+The network lookup is done after onboarding is completed, and when the extension reloads if onboarding has been completed.
+This patch is part of a temporary fix that will be reverted soon to make way for a more permanent solution. https://github.com/MetaMask/metamask-extension/pull/23005
+You can see the changes before compilation on this branch: https://github.com/MetaMask/core/compare/pnf/ext-23622-review?expand=1
\ No newline at end of file
diff --git a/dist/NetworkController.cjs b/dist/NetworkController.cjs
index cc9793f576eb39a51ab141b7d03de57cf99e5570..c573b5134d40f522217a6ab6df129040d02e9660 100644
--- a/dist/NetworkController.cjs
+++ b/dist/NetworkController.cjs
@@ -422,7 +422,6 @@ class NetworkController extends base_controller_1.BaseController {
*/
async initializeProvider() {
__classPrivateFieldGet(this, _NetworkController_instances, "m", _NetworkController_applyNetworkSelection).call(this, this.state.selectedNetworkClientId);
- await this.lookupNetwork();
}
/**
* Refreshes the network meta with EIP-1559 support and the network status
diff --git a/dist/NetworkController.mjs b/dist/NetworkController.mjs
index 806f32edeffaad9f7eb1cafa4184368ec95f63e7..9268947cbed4bf717729ca6ac8ea83a8b91b6e8a 100644
--- a/dist/NetworkController.mjs
+++ b/dist/NetworkController.mjs
@@ -397,7 +397,6 @@ export class NetworkController extends BaseController {
*/
async initializeProvider() {
__classPrivateFieldGet(this, _NetworkController_instances, "m", _NetworkController_applyNetworkSelection).call(this, this.state.selectedNetworkClientId);
- await this.lookupNetwork();
}
/**
* Refreshes the network meta with EIP-1559 support and the network status
168 changes: 23 additions & 145 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -675,13 +675,13 @@
"@ethersproject/contracts": true,
"@ethersproject/providers": true,
"@metamask/abi-utils": true,
"@metamask/assets-controllers>@metamask/polling-controller": true,
"@metamask/base-controller": true,
"@metamask/contract-metadata": true,
"@metamask/controller-utils": true,
"@metamask/eth-query": true,
"@metamask/metamask-eth-abis": true,
"@metamask/name-controller>async-mutex": true,
"@metamask/polling-controller": true,
"@metamask/rpc-errors": true,
"@metamask/utils": true,
"bn.js": true,
Expand All @@ -692,18 +692,6 @@
"uuid": true
}
},
"@metamask/assets-controllers>@metamask/polling-controller": {
"globals": {
"clearTimeout": true,
"console.error": true,
"setTimeout": true
},
"packages": {
"@metamask/base-controller": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true,
"uuid": true
}
},
"@metamask/base-controller": {
"globals": {
"setTimeout": true
Expand Down Expand Up @@ -796,25 +784,10 @@
"@ethersproject/providers": true,
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/ens-controller>@metamask/utils": true,
"@metamask/utils": true,
"punycode": true
}
},
"@metamask/ens-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/utils>@metamask/superstruct": true,
"@metamask/utils>@scure/base": true,
"@metamask/utils>pony-cause": true,
"@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true
}
},
"@metamask/eth-json-rpc-filters": {
"globals": {
"console.error": true
Expand Down Expand Up @@ -1737,54 +1710,34 @@
"packages": {
"@metamask/base-controller": true,
"@metamask/controller-utils": true,
"@metamask/eth-json-rpc-middleware": true,
"@metamask/eth-json-rpc-provider": true,
"@metamask/eth-query": true,
"@metamask/eth-token-tracker>@metamask/eth-block-tracker": true,
"@metamask/json-rpc-engine": true,
"@metamask/network-controller>@metamask/eth-block-tracker": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura": true,
"@metamask/network-controller>@metamask/eth-json-rpc-middleware": true,
"@metamask/network-controller>@metamask/json-rpc-engine": true,
"@metamask/network-controller>@metamask/rpc-errors": true,
"@metamask/network-controller>@metamask/swappable-obj-proxy": true,
"@metamask/network-controller>@metamask/utils": true,
"@metamask/network-controller>reselect": true,
"browserify>assert": true,
"browserify>util": true,
"@metamask/rpc-errors": true,
"@metamask/utils": true,
"eslint>fast-deep-equal": true,
"uri-js": true,
"uuid": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura": {
"@metamask/network-controller>@metamask/eth-block-tracker": {
"globals": {
"clearTimeout": true,
"console.error": true,
"setTimeout": true
},
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"node-fetch": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/eth-json-rpc-provider": {
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine": true,
"@metamask/safe-event-emitter": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/json-rpc-engine": {
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/eth-query>json-rpc-random-id": true,
"@metamask/network-controller>@metamask/eth-block-tracker>@metamask/utils": true,
"@metamask/safe-event-emitter": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors": {
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils": true,
"@metamask/rpc-errors>fast-safe-stringify": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/rpc-errors>@metamask/utils": {
"@metamask/network-controller>@metamask/eth-block-tracker>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
Expand All @@ -1799,67 +1752,19 @@
"semver": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/utils>@metamask/superstruct": true,
"@metamask/utils>@scure/base": true,
"@metamask/utils>pony-cause": true,
"@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-middleware": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-json-rpc-middleware>klona": true,
"@metamask/eth-json-rpc-middleware>safe-stable-stringify": true,
"@metamask/eth-sig-util": true,
"@metamask/network-controller>@metamask/eth-json-rpc-middleware>@metamask/utils": true,
"@metamask/network-controller>@metamask/json-rpc-engine": true,
"@metamask/network-controller>@metamask/rpc-errors": true,
"bn.js": true,
"pify": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-middleware>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/utils>@metamask/superstruct": true,
"@metamask/utils>@scure/base": true,
"@metamask/utils>pony-cause": true,
"@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true
}
},
"@metamask/network-controller>@metamask/json-rpc-engine": {
"packages": {
"@metamask/network-controller>@metamask/rpc-errors": true,
"@metamask/network-controller>@metamask/utils": true,
"@metamask/safe-event-emitter": true
}
},
"@metamask/network-controller>@metamask/rpc-errors": {
"packages": {
"@metamask/network-controller>@metamask/utils": true,
"@metamask/rpc-errors>fast-safe-stringify": true
"@metamask/eth-json-rpc-provider": true,
"@metamask/json-rpc-engine": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/rpc-errors": true
}
},
"@metamask/network-controller>@metamask/utils": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
Expand Down Expand Up @@ -2445,9 +2350,9 @@
"@ethersproject/bytes": true,
"@metamask/controller-utils": true,
"@metamask/eth-query": true,
"@metamask/polling-controller": true,
"@metamask/smart-transactions-controller>@ethereumjs/tx": true,
"@metamask/smart-transactions-controller>@ethereumjs/util": true,
"@metamask/smart-transactions-controller>@metamask/polling-controller": true,
"@metamask/smart-transactions-controller>bignumber.js": true,
"@metamask/transaction-controller": true,
"browserify>buffer": true,
Expand Down Expand Up @@ -2479,18 +2384,6 @@
"crypto.getRandomValues": true
}
},
"@metamask/smart-transactions-controller>@metamask/polling-controller": {
"globals": {
"clearTimeout": true,
"console.error": true,
"setTimeout": true
},
"packages": {
"@metamask/base-controller": true,
"@metamask/snaps-utils>fast-json-stable-stringify": true,
"uuid": true
}
},
"@metamask/smart-transactions-controller>bignumber.js": {
"globals": {
"crypto": true,
Expand Down Expand Up @@ -2793,29 +2686,14 @@
"@metamask/polling-controller": true,
"@metamask/rpc-errors": true,
"@metamask/transaction-controller": true,
"@metamask/user-operation-controller>@metamask/utils": true,
"@metamask/utils": true,
"@metamask/utils>@metamask/superstruct": true,
"bn.js": true,
"lodash": true,
"uuid": true,
"webpack>events": true
}
},
"@metamask/user-operation-controller>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
},
"packages": {
"@metamask/utils>@metamask/superstruct": true,
"@metamask/utils>@scure/base": true,
"@metamask/utils>pony-cause": true,
"@noble/hashes": true,
"browserify>buffer": true,
"nock>debug": true,
"semver": true
}
},
"@metamask/utils": {
"globals": {
"TextDecoder": true,
Expand Down
Loading

0 comments on commit f7fc1c9

Please sign in to comment.