Conversation
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (1 files, +1 -3)
👨🔧 @MetaMask/extension-platform (1 files, +1 -3)
📜 @MetaMask/policy-reviewers (8 files, +256 -24)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
@metamaskbot update-policies |
|
LavaMoat validation was skipped in CI. Policies were not checked for this commit. |
16ab47a to
ca525f6
Compare
Builds ready [ca525f6] [reused from 16ab47a]
⚡ Performance Benchmarks (Total: 🟢 0 pass · 🟡 0 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
@metamaskbot update-policies |
ca525f6 to
60bd82e
Compare
|
LavaMoat validation was skipped in CI. Policies were not checked for this commit. |
Builds ready [60bd82e]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 0 warn · 🔴 0 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Construct the extension's GasFeeController through @metamask/wallet instead of the local messenger-client-init wiring, integrating MetaMask/core#9527. The wallet now owns GasFeeController as an instanceOptions.gasFeeController slot: it builds getProvider and getCurrentNetworkEIP1559Compatibility from NetworkController itself and lets the controller default onNetworkDidChange and getChainId via its messenger subscription. The extension supplies only the client-specific overrides (interval, clientId, gas API endpoints, and the BSC legacy gas API compatibility check). - Add wallet-init/instance-options/gas-fee-controller.ts and a minimal wallet-init/messengers/gas-fee-controller-messenger.ts (delegates only NetworkController:getState + getNetworkClientById for the chain-id read). - Wire gasFeeController into wallet-init/initialization.ts. - Resolve this.gasFeeController via this.wallet.getInstance('GasFeeController') and drop the GasFeeControllerInit import + init-map entry. - Delete the local confirmations/gas-fee-controller-init and messengers/gas-fee-controller-messenger (+tests) and their entries in messenger-client-init/messengers/index.ts. GasFeeController stays in controller-list.ts. Preview-pin @metamask/wallet and @metamask/gas-fee-controller to the core#9527 preview builds (7ed2770ae) until a wallet release ships it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
60bd82e to
f1627c1
Compare
|
Builds ready [f1627c1]
⚡ Performance Benchmarks (Total: 🟢 9 pass · 🟡 12 warn · 🔴 3 fail)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Closing in favor of #44527 which will bump the wallet and contain this work as well |



Description
Constructs the extension's
GasFeeControllerthrough@metamask/walletinstead of the localmessenger-client-initwiring, continuing the incremental adoption of the shared controller-integration layer. This integrates MetaMask/core#9527, which wiresGasFeeControllerinto@metamask/wallet.The wallet now owns
GasFeeControlleras aninstanceOptions.gasFeeControllerslot. It buildsgetProviderandgetCurrentNetworkEIP1559CompatibilityfromNetworkControlleritself, and lets the controller defaultonNetworkDidChangeandgetChainIdvia its messengerNetworkController:networkDidChangesubscription. The extension supplies only the client-specific overrides: the poll interval (10s), the client id (extension), the gas API endpoints, and the BSC legacy gas API compatibility check.What changed:
app/scripts/wallet-init/instance-options/gas-fee-controller.ts(+test) building thegasFeeControllerinstance options.app/scripts/wallet-init/messengers/gas-fee-controller-messenger.ts(+test) that delegates onlyNetworkController:getStateandNetworkController:getNetworkClientById, used to read the global chain id for the BSC check.gasFeeControllerintoapp/scripts/wallet-init/initialization.ts.this.gasFeeControllerviathis.wallet.getInstance('GasFeeController')and removed theGasFeeControllerInitimport and init-map entry inmetamask-controller.js. Consumers such asUserOperationControllerkeep resolving it throughgetMessengerClient, which falls back towallet.getInstance(name).messenger-client-init/confirmations/gas-fee-controller-init.tsandmessengers/gas-fee-controller-messenger.ts(+tests) and removed their import, re-exports, andMESSENGER_FACTORIESentry frommessengers/index.ts.GasFeeControllerstays incontroller-list.ts.This PR is a draft and preview-pinned.
@metamask/walletand@metamask/gas-fee-controllerare pinned to the core#9527 preview builds (7ed2770ae). It stays draft until a real@metamask/walletrelease ships core#9527; then the pins are bumped to the release and LavaMoat policies are regenerated via@metamaskbot update-policies.Changelog
CHANGELOG entry: null
Related issues
Integrates: MetaMask/core#9527
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
🤖 Generated with Claude Code