Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions packages/gas-fee-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand All @@ -77,4 +87,6 @@ export type GasFeeControllerMethodActions =
| GasFeeControllerGetGasFeeEstimatesAndStartPollingAction
| GasFeeControllerDisconnectPollerAction
| GasFeeControllerStopPollingAction
| GasFeeControllerGetTimeEstimateAction;
| GasFeeControllerGetTimeEstimateAction
| GasFeeControllerEnableNonRPCGasFeeApisAction
| GasFeeControllerDisableNonRPCGasFeeApisAction;
2 changes: 2 additions & 0 deletions packages/gas-fee-controller/src/GasFeeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ export type GasFeeState = GasFeeEstimatesByChainId &
const name = 'GasFeeController';

const MESSENGER_EXPOSED_METHODS = [
'disableNonRPCGasFeeApis',
'disconnectPoller',
'enableNonRPCGasFeeApis',
'fetchGasFeeEstimates',
'getGasFeeEstimatesAndStartPolling',
'getTimeEstimate',
Expand Down
2 changes: 2 additions & 0 deletions packages/gas-fee-controller/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ export type {
GasFeeControllerDisconnectPollerAction,
GasFeeControllerStopPollingAction,
GasFeeControllerGetTimeEstimateAction,
GasFeeControllerEnableNonRPCGasFeeApisAction,
GasFeeControllerDisableNonRPCGasFeeApisAction,
} from './GasFeeController-method-action-types';
Loading