Skip to content

Releases: MetaMask/swaps-controller

14.0.0

17 Sep 14:11
e29c7de

Choose a tag to compare

Added

  • Add two new controller state metadata properties: includeInStateLogs and usedInUi (#1234)

Changed

  • BREAKING: Bump peer dependency @metamask/gas-fee-controller from ^22.0.0 to ^24.0.0 (#412)
  • BREAKING: Bump peer dependency @metamask/network-controller from ^22.0.0 to ^24.0.0 (#412)
  • Bump @metamask/base-controller from ^7.0.1 to ^8.0.3 (#1234)

13.3.0

11 Aug 19:29
4157d61

Choose a tag to compare

Changed

  • Migrate fetchTopAssets to use the Bridge API instead of the Swaps API (#408)

13.2.0

27 May 09:23
8643ee2

Choose a tag to compare

Changed

  • Add SEI network support (#406)

13.1.0

01 Apr 13:47
5cbf69d

Choose a tag to compare

Changed

  • Allow using a chainId or networkClientId to call fetchTopAssets (#403)

13.0.0

31 Mar 20:30
41df7ae

Choose a tag to compare

Changed

  • Allow immediate fetching of topAssets without changing the network by relying on state.chainCache[chainId].topAssetsLastFetched instead of state.topAssetsLastFetched (#401)
  • BREAKING: Remove state.topAssetsLastFetched (#401)

12.1.0

23 Jan 14:42
021cf1f

Choose a tag to compare

Changed

  • Add the "enableGasIncludedQuotes" param for fetching quotes (#390)
  • Add back rimraf for the build:clean script (#376)
  • Export CHAIN_ID_TO_NAME_MAP (#383)
  • Export FeatureFlags type (#380)

12.0.0

06 Dec 00:04
7913f63

Choose a tag to compare

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)

11.0.0

07 Nov 14:54
9e3fa6e

Choose a tag to compare

Changed

  • BREAKING: Bump @metamask/network-controller peer dependency from ^18.1.0 to ^21.1.0 (#332)
  • BREAKING: @metamask/gas-fee-controller is now listed as peer dependency (#331)
    • The package version has been bumped from ^15.1.2 to ^21.0.0
  • Bump @metamask/transaction-controller from ^19.0.1 to ^37.3.0 (#333)
  • Bump @metamask/approval-controller from ^5.1.1 to ^7.1.0 (#333)
  • Bump @metamask/utils from ^8.5.0 to ^10.0.0 (#330)
  • Bump @metamask/controller-utils from ^10.0.0 to ^11.3.0 (#322)
  • Bump @metamask/base-controller from ^5.0.2 to ^7.0.1 (#319)
  • Bump @metamask/safe-event-emitter from ^3.1.1 to ^3.1.2 (#329)
  • Bump secp256k1 in the npm_and_yarn group (#327)
  • Bump @metamask/rpc-errors from ^6.3.1 to ^6.4.0 (#325)
  • Update LICENSE (#338)

10.0.0

26 Sep 08:09
d31dd41

Choose a tag to compare

Changed

  • BREAKING: Upgrade controller to BaseController V2 (#277)

Fixed

  • Fix incorrect version after revert (#318)
  • Update name of Polygon network token from MATIC to POL (#312)

9.0.12

03 Sep 15:44
66e98ea

Choose a tag to compare

Changed

  • Remove Web3 and use Ethers to read allowance from contracts, speeding up performance on Android (#309)