From 80560875adbf5f576213890e81413614b612eb18 Mon Sep 17 00:00:00 2001 From: Guillaume Roux Date: Tue, 5 May 2026 16:11:18 +0200 Subject: [PATCH 1/2] expose missing `GasFeeController` methods through the messenger --- .../src/GasFeeController-method-action-types.ts | 14 +++++++++++++- .../gas-fee-controller/src/GasFeeController.ts | 2 ++ packages/gas-fee-controller/src/index.ts | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/gas-fee-controller/src/GasFeeController-method-action-types.ts b/packages/gas-fee-controller/src/GasFeeController-method-action-types.ts index 8420235bfe..000c9b6a77 100644 --- a/packages/gas-fee-controller/src/GasFeeController-method-action-types.ts +++ b/packages/gas-fee-controller/src/GasFeeController-method-action-types.ts @@ -68,6 +68,16 @@ export type GasFeeControllerGetTimeEstimateAction = { handler: GasFeeController['getTimeEstimate']; }; +export type GasFeeControllerEnableNonRPCGasFeeApisAction = { + type: `GasFeeController:enableNonRPCGasFeeApis`; + handler: GasFeeController['enableNonRPCGasFeeApis']; +}; + +export type GasFeeControllerDisableNonRPCGasFeeApisAction = { + type: `GasFeeController:disableNonRPCGasFeeApis`; + handler: GasFeeController['disableNonRPCGasFeeApis']; +}; + /** * Union of all GasFeeController action types. */ @@ -77,4 +87,6 @@ export type GasFeeControllerMethodActions = | GasFeeControllerGetGasFeeEstimatesAndStartPollingAction | GasFeeControllerDisconnectPollerAction | GasFeeControllerStopPollingAction - | GasFeeControllerGetTimeEstimateAction; + | GasFeeControllerGetTimeEstimateAction + | GasFeeControllerEnableNonRPCGasFeeApisAction + | GasFeeControllerDisableNonRPCGasFeeApisAction; diff --git a/packages/gas-fee-controller/src/GasFeeController.ts b/packages/gas-fee-controller/src/GasFeeController.ts index ce0a232baa..bacebdd786 100644 --- a/packages/gas-fee-controller/src/GasFeeController.ts +++ b/packages/gas-fee-controller/src/GasFeeController.ts @@ -252,7 +252,9 @@ export type GasFeeState = GasFeeEstimatesByChainId & const name = 'GasFeeController'; const MESSENGER_EXPOSED_METHODS = [ + 'disableNonRPCGasFeeApis', 'disconnectPoller', + 'enableNonRPCGasFeeApis', 'fetchGasFeeEstimates', 'getGasFeeEstimatesAndStartPolling', 'getTimeEstimate', diff --git a/packages/gas-fee-controller/src/index.ts b/packages/gas-fee-controller/src/index.ts index ced487688f..073a4b4b74 100644 --- a/packages/gas-fee-controller/src/index.ts +++ b/packages/gas-fee-controller/src/index.ts @@ -6,4 +6,6 @@ export type { GasFeeControllerDisconnectPollerAction, GasFeeControllerStopPollingAction, GasFeeControllerGetTimeEstimateAction, + GasFeeControllerEnableNonRPCGasFeeApisAction, + GasFeeControllerDisableNonRPCGasFeeApisAction, } from './GasFeeController-method-action-types'; From 5b41d3326a6eac87972ca6d26093d591ddf0393f Mon Sep 17 00:00:00 2001 From: Guillaume Roux Date: Tue, 5 May 2026 16:23:10 +0200 Subject: [PATCH 2/2] update CHANGELOG --- packages/gas-fee-controller/CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/gas-fee-controller/CHANGELOG.md b/packages/gas-fee-controller/CHANGELOG.md index ed926f534a..e23e98f1fb 100644 --- a/packages/gas-fee-controller/CHANGELOG.md +++ b/packages/gas-fee-controller/CHANGELOG.md @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Expose missing public `GasFeeController` methods through its messenger ([#8699](https://github.com/MetaMask/core/pull/8699)) + - The following actions are now available: + - `GasFeeController:enableNonRPCGasFeeApis` + - `GasFeeController:disableNonRPCGasFeeApis` + - Corresponding action types are available as well. - Bump `@metamask/messenger` from `^1.1.0` to `^1.2.0` ([#8373](https://github.com/MetaMask/core/pull/8373), [#8632](https://github.com/MetaMask/core/pull/8632)) - Add missing `@metamask/messenger` dependency ([#8318](https://github.com/MetaMask/core/pull/8318), [#8364](https://github.com/MetaMask/core/pull/8364)) - Bump `@metamask/controller-utils` from `^11.19.0` to `^11.20.0` ([#8344](https://github.com/MetaMask/core/pull/8344))