Summary
GasFeeController supports two modes: the multichain path (fetchGasFeeEstimates({ networkClientId }) → gasFeeEstimatesByChainId[chainId]) and a legacy global/selected-chain path that predates multichain support. Remove the global path so the per-networkClientId route is the only one.
Surface to remove
- Constructor options:
getProvider, getChainId, getCurrentNetworkEIP1559Compatibility, getCurrentNetworkLegacyGasAPICompatibility, getCurrentAccountEIP1559Compatibility, onNetworkDidChange
- Flat top-level state:
gasFeeEstimates, gasEstimateType, estimatedGasFeeTimeBounds
- No-arg polling
getGasFeeEstimatesAndStartPolling() and the NetworkController:networkDidChange subscription/reset
- Make
networkClientId required in fetchGasFeeEstimates; give getTimeEstimate a chain/networkClientId arg
Impact — BREAKING
- Core: low risk. No consumer reads the flat state or uses no-arg polling; transaction-controller already passes
networkClientId. Mostly mechanical + large GasFeeController.test.ts rewrite (~60-70% is global-path).
Notes
Follow-up to #9569, which made the global path init-order-agnostic — this removal deletes that code path entirely.
Summary
GasFeeControllersupports two modes: the multichain path (fetchGasFeeEstimates({ networkClientId })→gasFeeEstimatesByChainId[chainId]) and a legacy global/selected-chain path that predates multichain support. Remove the global path so the per-networkClientIdroute is the only one.Surface to remove
getProvider,getChainId,getCurrentNetworkEIP1559Compatibility,getCurrentNetworkLegacyGasAPICompatibility,getCurrentAccountEIP1559Compatibility,onNetworkDidChangegasFeeEstimates,gasEstimateType,estimatedGasFeeTimeBoundsgetGasFeeEstimatesAndStartPolling()and theNetworkController:networkDidChangesubscription/resetnetworkClientIdrequired infetchGasFeeEstimates; givegetTimeEstimatea chain/networkClientIdargImpact — BREAKING
networkClientId. Mostly mechanical + largeGasFeeController.test.tsrewrite (~60-70% is global-path).Notes
Follow-up to #9569, which made the global path init-order-agnostic — this removal deletes that code path entirely.