Skip to content

Latest commit

 

History

History
440 lines (291 loc) · 25 KB

CHANGELOG.md

File metadata and controls

440 lines (291 loc) · 25 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Changed

  • Bump @metamask/base-controller from ^7.0.0 to ^7.1.0 (#5079)

Changed

  • Bump @metamask/controller-utils from ^11.4.3 to ^11.4.4 (#5012)
  • Bump @metamask/polling-controller from ^12.0.1 to ^12.0.2 (#5012)

Fixed

  • Make implicit peer dependencies explicit (#4974)
    • Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
      • @babel/runtime@^7.0.0 (required by @metamask/ethjs-unit)
    • These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
    • Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.
  • Correct ESM-compatible build so that imports of the following packages that re-export other modules via export * are no longer corrupted: (#5011)
    • @metamask/eth-query
    • bn.js

Changed

  • Bump @metamask/polling-controller from ^12.0.0 to ^12.0.1 (#4870)
  • Bump @metamask/base-controller from ^7.0.1 to ^7.0.2 (#4862)
  • Bump @metamask/controller-utils from ^11.4.0 to ^11.4.3 (#4862, #4870, #4195)

Changed

  • BREAKING: Bump @metamask/network-controller peer dependency to ^22.0.0 (#4841)
  • Bump @metamask/controller-utils to ^11.4.0 (#4834)
  • Bump @metamask/utils to ^10.0.0 (#4831)

Changed

  • BREAKING: GasFeeController now uses a new polling interface that accepts the generic parameter PollingInput (#4752)
  • BREAKING: The inherited AbstractPollingController method startPollingByNetworkClientId has been renamed to startPolling (#4752)
  • BREAKING: The inherited AbstractPollingController method onPollingComplete now returns the entire input object of type PollingInput, instead of a network client id (#4752)

Fixed

  • Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#4648)
    • Previously, this package shipped with only one variant of type declaration files, and these files were only CommonJS-compatible, and the exports field in package.json linked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
  • Remove chunk files (#4648).
    • Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.

Changed

  • BREAKING: Bump devDependency and peerDependency @metamask/network-controller from ^20.0.0 to ^21.0.0 (#4618, #4651)
  • Bump @metamask/base-controller from ^6.0.2 to ^7.0.0 (#4625, #4643)
  • Bump @metamask/controller-utils from ^11.0.2 to ^11.2.0 (#4639, #4651)
  • Bump @metamask/polling-controller from ^9.0.1 to ^10.0.0 (#4651)
  • Bump typescript from ~5.0.4 to ~5.2.2 (#4576, #4584)

Changed

  • Remove @metamask/network-controller dependency #4556
    • This was listed under peerDependencies already, so it was redundant as a dependency.
  • Upgrade TypeScript version to ~5.0.4 and set moduleResolution option to Node16 (#3645)
  • Bump @metamask/base-controller from ^6.0.0 to ^6.0.2 (#4517, #4544)
  • Bump @metamask/controller-utils from ^11.0.0 to ^11.0.2 (#4517, #4544)
  • Bump @metamask/polling-controller from ^9.0.0 to ^9.0.1 (#4548)
  • Bump @metamask/utils from ^8.3.0 to ^9.1.0 (#4516, #4529)

Changed

  • BREAKING: Bump peerDependency @metamask/network-controller to ^20.0.0 (#4508)
  • Bump @metamask/polling-controller to ^9.0.0 (#4508)

Added

  • BREAKING: Add constructor options to GasFeeController: EIP1559APIEndpoint (required), and legacyAPIEndpoint (optional) which defaults to LEGACY_GAS_PRICES_API_URL. (#4446)
    • These URLs are no longer hardcoded within the controller.

Removed

  • BREAKING: Remove infuraAPIKey as a constructor option for GasFeeController. This class field was previously used to construct and send the Authorization header for Infura gas API requests. (#4446)

Changed

  • BREAKING: Bump minimum Node version to 18.18 (#3611)
  • BREAKING: Bump dependency and peer dependency @metamask/network-controller to ^19.0.0 (#4352)
  • Bump @metamask/base-controller to ^6.0.0 (#4352)
  • Bump @metamask/controller-utils to ^11.0.0 (#4352)
  • Bump @metamask/polling-controller to ^8.0.0 (#4352)

Changed

  • BREAKING: Bump dependency and peer dependency @metamask/network-controller to ^18.1.3 (#4342)
  • Bump @metamask/controller-utils to ^10.0.0 (#4342)
  • Bump @metamask/polling-controller to ^7.0.0 (#4342)

Fixed

  • Add a metadata property for nonRPCGasFeeApisDisabled (#4245)

Changed

  • Bump @metamask/polling-controller to ^6.0.2 (#4234)

Removed

  • Remove fee history fallback in favour of eth_gasPrice call (#4210)

Added

  • Add nonRPCGasFeeApisDisabled property to the gas fee controller, allowing the user to specify that they want to prevent network request to gas estimate services, and only want gas estimates to be based on rpc requests (eth_feeHistory and eth_gasPrice) to the provider. (#4094)

Fixed

  • Fix GasFeeController incorrectly setting globally selected state, so that state is only updated if the gasFeeEstimate fetched is for the currently selected network (#4214)

Changed

  • BREAKING: The controller's constructor now requires infuraAPIKey. This is used to construct and send the Authorization header for Infura gas API requests. (#4068)
  • Bump dependency @metamask/network-controller to ^18.1.0 (#4121)

Removed

  • BREAKING: Remove the constructor options legacyAPIEndpoint and EIP1559APIEndpoint. These URLs are now hardcoded within the controller. (#4068)

Fixed

  • Fix types field in package.json (#4047)

Added

  • BREAKING: Add ESM build (#3998)
    • It's no longer possible to import files from ./dist directly.

Changed

  • BREAKING: Bump @metamask/base-controller to ^5.0.0 (#4039)
    • This version has a number of breaking changes. See the changelog for more.
  • BREAKING: Bump dependency and peer dependency on @metamask/network-controller to ^18.0.0 (#4039)
  • Bump @metamask/controller-utils to ^9.0.0 (#4039)
  • Bump @metamask/polling-controller to ^6.0.0 (#4039)

Changed

  • Replace ethereumjs-util with bn.js (#3943)
  • Bump @metamask/controller-utils to ^8.0.4 (#4007)
  • Bump @metamask/ethjs-unit to ^0.3.0 (#3897)
  • Bump @metamask/network-controller to ^17.2.1 (#4007)
  • Bump @metamask/polling-controller to ^5.0.1 (#4007)

Changed

  • Bump @metamask/controller-utils to ^8.0.3 (#3915)

Changed

  • BREAKING: Bump @metamask/network-controller peer dependency to ^17.2.0 (#3821)
  • Bump @metamask/utils to ^8.3.0 (#3769)
  • Bump @metamask/base-controller to ^4.1.1 (#3760, #3821)
  • Bump @metamask/controller-utils to ^8.0.2 (#3821)
  • Bump @metamask/polling-controller to ^5.0.0 (#3821)

Changed

  • BREAKING: Bump @metamask/network-controller dependency and peer dependency from ^17.0.0 to ^17.1.0 (#3695)
  • BREAKING: The GasFeeController now detects network changes using the NetworkController:networkDidChange event instead of NetworkController:stateChange (#3610)
    • Additionally, the optional constructor parameter onNetworkStateChange has been replaced by onNetworkDidChange
  • Bump @metamask/base-controller to ^4.0.1 (#3695)
  • Bump @metamask/controller-utils to ^8.0.1 (#3695, #3678, #3667, #3580)
  • Bump @metamask/polling-controller to ^4.0.0 (#3695, #3667, #3636)
    • This update adds two new methods to each polling controller: _startPollingByNetworkClientId and _stopPollingByPollingTokenSetId. These methods are intended for internal use, and should not be called directly.

Changed

  • BREAKING: Bump @metamask/base-controller to ^4.0.0 (#2063)
    • This is breaking because the type of the messenger has backward-incompatible changes. See the changelog for this package for more.
  • Replace ethjs-unit ^0.1.6 with @metamask/ethjs-unit ^0.2.1 (#2064)
  • Bump @metamask/controller-utils to ^6.0.0 (#2063)
  • Bump @metamask/network-controller to ^17.0.0 (#2063)
  • Bump @metamask/polling-controller to ^2.0.0 (#2063)

Changed

  • BREAKING: Bump dependency and peer dependency on @metamask/network-controller to ^16.0.0
  • Bump dependency @metamask/eth-query from ^3.0.1 to ^4.0.0 (#2028)
  • Bump dependency on @metamask/polling-controller to ^1.0.2
  • Bump @metamask/utils from 8.1.0 to 8.2.0 (#1957)

Added

  • Add optional networkClientId argument to options object param of fetchGasFeeEstimates method which, if passed, fetches the required chainId and networkClient provider to fetch and store gasFee data appropriately. (#1891)

Changed

  • BREAKING: Bump dependency on @metamask/polling-controller to ^1.0.0
  • Bump dependency and peer dependency on @metamask/network-controller to ^15.1.0

Added

  • Add way to start and stop different polling sessions for the same network client ID by providing extra scoping data (#1776)
    • Add optional second argument to stopPollingByPollingToken (formerly stopPollingByNetworkClientId)
    • Add optional second argument to onPollingCompleteByNetworkClientId

Changed

  • BREAKING: Make executePoll private (#1810)
  • BREAKING: Rename stopPollingByNetworkClientId to stopPollingByPollingToken (#1810)
  • BREAKING: Bump dependency and peer dependency on @metamask/network-controller to ^15.0.0
  • BREAKING: Bump dependency on @metamask/polling-controller to ^0.2.0

Added

  • Add optional gasFeeEstimatesByChainId property to GasFeeController state (#1673
  • Add dependency on @metamask/polling-controller ([#1748])(#1748))

Changed

  • BREAKING: Messenger must allow controller actions NetworkController:getNetworkClientById and NetworkController:getEIP1559Compatibility (#1673
  • Bump dependency on @metamask/utils to ^8.1.0 (#1639)
  • Bump dependency on @metamask/base-controller to ^3.2.3
  • Bump dependency on @metamask/controller-utils to ^5.0.2
  • Bump dependency and peer dependency on @metamask/network-controller to ^14.0.0

Changed

  • Update TypeScript to v4.8.x (#1718)

Changed

  • BREAKING: Bump peer dependency on @metamask/network-controller to ^13.0.0 (#1633)
  • Bump dependency on @metamask/controller-utils to ^5.0.0 (#1633)

Changed

  • Bump dependency on @metamask/base-controller to ^3.2.1
  • Bump dependency on @metamask/controller-utils to ^4.3.2
  • Bump dependency and peer dependency on @metamask/network-controller to ^12.1.2

Changed

  • Replace eth-query ^2.1.2 with @metamask/eth-query ^3.0.1 (#1546)

Changed

  • Update @metamask/utils to ^6.2.0 (#1514)
  • Remove unnecessary babel-runtime dependencies (#1504)

Changed

  • Bump dependency on controller-utils (#1447)
    • The new version of controller-utils adds eth-query to the list of dependencies. This dependency was added to improve internal types for gas-fee-controller. This has no impact on users of the package.

Changed

  • BREAKING: Bump to Node 16 (#1262)
  • BREAKING: The getChainId constructor parameter now expects a Hex return type rather than a decimal string (#1367)
  • Add @metamask/utils dependency
  • BREAKING: The gas fee controller messenger now requires the NetworkController:stateChange event instead of the NetworkController:providerConfigChange event (#1329)
    • This does not apply if onNetworkStateChange and getChainId are provided to the constructor
  • BREAKING: The constructor parameter onNetworkStateChange now expects event handlers to be passed the full network state (#1329)
    • The type of the onNetworkStateChange parameter already expected the state to be provided, but it wasn't used before now
  • BREAKING: Update @metamask/network-controller dependency and peer dependency

Changed

Changed

  • Adjust types to align with new version of NetworkController (#1091)

Changed

  • BREAKING: Make the EIP-1559 endpoint a required argument (#1083)

Removed

  • BREAKING: Remove isomorphic-fetch (#1106)
    • Consumers must now import isomorphic-fetch or another polyfill themselves if they are running in an environment without fetch

Changed

  • BREAKING: Update @metamask/network-controller peer dependency to v3 (#1041)
  • Rename this repository to core (#1031)
  • Update @metamask/controller-utils package (#1041)

Fixed

  • This package will now warn if a required package is not present (#1003)

Changed

  • BREAKING: Bump @metamask/network-controller to 2.0.0 (#995)
    • GasFeeController now expects NetworkController to respond to the NetworkController:providerChangeConfig event (previously named NetworkController:providerChange). If you are depending directly on @metamask/network-controller, you should update your version to at least 2.0.0 as well.
  • Relax dependencies on @metamask/base-controller, @metamask/controller-utils, and @metamask/network-controller (use ^ instead of ~) (#998)

Added

  • Initial release

    • As a result of converting our shared controllers repo into a monorepo (#831), we've created this package from select parts of @metamask/controllers v33.0.0, namely:

      • Everything in src/gas

      All changes listed after this point were applied to this package following the monorepo conversion.