Skip to content
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: update controllers as of core release v262 #28781

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
27a1948
chore: bump @metamask/user-operation-controller to ^19.0.0
cryptodev-2s Nov 27, 2024
c9178ad
Update LavaMoat policies
metamaskbot Nov 27, 2024
dccd430
Merge branch 'develop' into cryptodev2s/bump-user-operatin-controller…
cryptodev-2s Nov 28, 2024
e7e98a0
chore: update dependencies to align with core release 244
cryptodev-2s Nov 28, 2024
eca9f2c
Update LavaMoat policies
metamaskbot Nov 29, 2024
cb52f52
fix: network controller patch
cryptodev-2s Nov 29, 2024
7746123
fix: lock file
cryptodev-2s Nov 29, 2024
ecf6ac8
fix: package json remove unused network controller resolution
cryptodev-2s Nov 29, 2024
d7024b6
Merge branch 'develop' into cryptodev2s/bump-user-operatin-controller…
cryptodev-2s Nov 29, 2024
9a9a2f8
Merge branch 'develop' into cryptodev2s/bump-user-operatin-controller…
cryptodev-2s Nov 29, 2024
87d926c
Merge remote-tracking branch 'origin/develop' into cryptodev2s/bump-u…
cryptodev-2s Nov 29, 2024
8aa00c3
chore: update packages up to release 262
cryptodev-2s Dec 3, 2024
c1bbe4e
Merge remote-tracking branch 'origin/main' into cryptodev2s/bump-user…
cryptodev-2s Dec 3, 2024
8bf06b5
chore: add missing bump for selected-network-client
cryptodev-2s Dec 3, 2024
bd81360
Update LavaMoat policies
metamaskbot Dec 3, 2024
692fdd9
chore: dedupe deps
cryptodev-2s Dec 3, 2024
0183903
Update LavaMoat policies
metamaskbot Dec 3, 2024
d84c743
chore: rollback queued-request-controller and selected-network-contro…
cryptodev-2s Dec 3, 2024
f00830f
Merge branch 'main' into cryptodev2s/bump-user-operatin-controller-19…
cryptodev-2s Dec 4, 2024
1ab7b98
Merge remote-tracking branch 'origin/main' into cryptodev2s/bump-user…
cryptodev-2s Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

cryptodev-2s marked this conversation as resolved.
Show resolved Hide resolved
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 b85de6f29620feecf6f1e395f3d25c96fb10f204..68c894de3975ab917e8320b5937b19a9b3ddd4ca 100644
--- a/dist/NetworkController.cjs
+++ b/dist/NetworkController.cjs
@@ -408,7 +408,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 966da694324513857dc6766590a4c965dedc2e3d..eb2fe95f9d77fa781d2bce97b7007d4676a3bede 100644
--- a/dist/NetworkController.mjs
+++ b/dist/NetworkController.mjs
@@ -383,7 +383,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
165 changes: 22 additions & 143 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,69 +1710,35 @@
"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,
"@metamask/rpc-errors": true,
"@metamask/utils": true,
"browserify>assert": true,
"browserify>util": 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": {
"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-infura>@metamask/utils": {
"@metamask/network-controller>@metamask/eth-block-tracker>@metamask/utils": {
"globals": {
"TextDecoder": true,
"TextEncoder": true
Expand All @@ -1814,52 +1753,19 @@
"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 @@ -2439,9 +2345,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 @@ -2473,18 +2379,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 @@ -2787,29 +2681,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
Loading