Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

12.0.0

Choose a tag to compare

@github-actions github-actions released this 06 Dec 00:04
7913f63

Changed

  • BREAKING: Consumers must now allow NetworkController:getNetworkClientById as a messenger action (#347)
  • BREAKING: Consumers must no longer allow NetworkController:findNetworkClientIdByChainId as a messenger action (#347)
  • BREAKING: Consumers must now allow NetworkController:networkDidChange as a messenger event (#347)
  • BREAKING: Update startFetchAndSetQuotes so that a networkClientId must be specified within the fetch metadata (#347)
  • BREAKING: Update fetchTokenWithCache, fetchTopAssetsWithCache, and fetchAggregatorMetadataWithCache so that a networkClientId must be specified as an option (#347)
  • BREAKING: Update signature of fetchGasFeeEstimates option so that the function expects a networkClientId option (#347)
  • BREAKING: Update signature of fetchEstimatedMultiLayerL1Fee option so that the function expects a networkClientId rather than chainId (#347)
  • BREAKING: Update type of fetchParamsMetaData in SwapsControllerState to add required property networkClientId (#347)
  • BREAKING: Update type of fetchGasFeeEstimates in SwapsControllerOptions to match signature of same method in GasFeeController (#347)
  • BREAKING: Update type of fetchEstimatedMultiLayerL1Fee in SwapsControllerOptions by replacing chainId in options with networkClientId (#347)
  • The chain cache in state will now automatically be updated whenever the network has changed (#347)
    • This aims to replace behavior provided by setProvider and setChainId.
  • BREAKING: Bump peer dependency @metamask/gas-fee-controller to ^22.0.0 (#369, #379)
  • BREAKING: Bump peer dependency @metamask/network-controller to ^22.0.0 (#369, #379)

Removed

  • BREAKING: Remove chainId from constructor options (#347)
    • The global chain ID no longer needs to be tracked. Methods that rely on a network now take a networkClientId option.
  • BREAKING: Remove setChainId method (#347)
    • Instead of calling this method when the network changes to capture the current chain ID, pass networkClientId to the appropriate method.
  • BREAKING: Remove setProvider method (#347)
    • Instead of calling this method when the network changes to capture the current provider, pass networkClientId to the appropriate method.
    • Note that setProvider was also allowing the pollCountLimit to be reset. However, upon reviewing clients, it was discovered that the pollCountLimit never changes. Instead of using method to set this option, pass it to the constructor when initializing the controller.
  • BREAKING: Remove chainId from SwapsControllerOptions type (#347)