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.
- BREAKING: Use new
Messengerfrom@metamask/messenger(#421)- Previously,
SwapsControlleraccepted aRestrictedMessengerinstance from@metamask/base-controller.
- Previously,
- BREAKING: Metadata property
anonymousrenamed toincludeInDebugSnapshot(#421) - BREAKING: Bump peer dependency
@metamask/gas-fee-controllerfrom^24.0.0to^25.0.0(#421) - BREAKING: Bump peer dependency
@metamask/network-controllerfrom^24.0.0to^25.0.0(#421) - Bump
@metamask/base-controllerfrom^8.0.3to^9.0.0((#421)
- Add two new controller state metadata properties:
includeInStateLogsandusedInUi(#1234)
- BREAKING: Bump peer dependency
@metamask/gas-fee-controllerfrom^22.0.0to^24.0.0(#412) - BREAKING: Bump peer dependency
@metamask/network-controllerfrom^22.0.0to^24.0.0(#412) - Bump
@metamask/base-controllerfrom^7.0.1to^8.0.3(#1234)
- Migrate
fetchTopAssetsto use the Bridge API instead of the Swaps API (#408)
- Add
SEInetwork support (#406)
- Allow using a
chainIdornetworkClientIdto callfetchTopAssets(#403)
- Allow immediate fetching of
topAssetswithout changing the network by relying onstate.chainCache[chainId].topAssetsLastFetchedinstead ofstate.topAssetsLastFetched(#401) - BREAKING: Remove
state.topAssetsLastFetched(#401)
- Add the "enableGasIncludedQuotes" param for fetching quotes (#390)
- Add back
rimraffor thebuild:cleanscript (#376) - Export CHAIN_ID_TO_NAME_MAP (#383)
- Export
FeatureFlagstype (#380)
- BREAKING: Consumers must now allow
NetworkController:getNetworkClientByIdas a messenger action (#347) - BREAKING: Consumers must no longer allow
NetworkController:findNetworkClientIdByChainIdas a messenger action (#347) - BREAKING: Consumers must now allow
NetworkController:networkDidChangeas a messenger event (#347) - BREAKING: Update
startFetchAndSetQuotesso that anetworkClientIdmust be specified within the fetch metadata (#347) - BREAKING: Update
fetchTokenWithCache,fetchTopAssetsWithCache, andfetchAggregatorMetadataWithCacheso that anetworkClientIdmust be specified as an option (#347) - BREAKING: Update signature of
fetchGasFeeEstimatesoption so that the function expects anetworkClientIdoption (#347) - BREAKING: Update signature of
fetchEstimatedMultiLayerL1Feeoption so that the function expects anetworkClientIdrather thanchainId(#347) - BREAKING: Update type of
fetchParamsMetaDatainSwapsControllerStateto add required propertynetworkClientId(#347) - BREAKING: Update type of
fetchGasFeeEstimatesinSwapsControllerOptionsto match signature of same method inGasFeeController(#347) - BREAKING: Update type of
fetchEstimatedMultiLayerL1FeeinSwapsControllerOptionsby replacingchainIdinoptionswithnetworkClientId(#347) - The chain cache in state will now automatically be updated whenever the network has changed (#347)
- This aims to replace behavior provided by
setProviderandsetChainId.
- This aims to replace behavior provided by
- BREAKING: Bump peer dependency
@metamask/gas-fee-controllerto^22.0.0(#369, #379) - BREAKING: Bump peer dependency
@metamask/network-controllerto^22.0.0(#369, #379)
- BREAKING: Remove
chainIdfrom constructor options (#347)- The global chain ID no longer needs to be tracked. Methods that rely on a network now take a
networkClientIdoption.
- The global chain ID no longer needs to be tracked. Methods that rely on a network now take a
- BREAKING: Remove
setChainIdmethod (#347)- Instead of calling this method when the network changes to capture the current chain ID, pass
networkClientIdto the appropriate method.
- Instead of calling this method when the network changes to capture the current chain ID, pass
- BREAKING: Remove
setProvidermethod (#347)- Instead of calling this method when the network changes to capture the current provider, pass
networkClientIdto the appropriate method. - Note that
setProviderwas also allowing thepollCountLimitto be reset. However, upon reviewing clients, it was discovered that thepollCountLimitnever changes. Instead of using method to set this option, pass it to the constructor when initializing the controller.
- Instead of calling this method when the network changes to capture the current provider, pass
- BREAKING: Remove
chainIdfromSwapsControllerOptionstype (#347)
- BREAKING: Bump
@metamask/network-controllerpeer dependency from^18.1.0to^21.1.0(#332) - BREAKING:
@metamask/gas-fee-controlleris now listed as peer dependency (#331)- The package version has been bumped from
^15.1.2to^21.0.0
- The package version has been bumped from
- Bump
@metamask/transaction-controllerfrom^19.0.1to^37.3.0(#333) - Bump
@metamask/approval-controllerfrom^5.1.1to^7.1.0(#333) - Bump
@metamask/utilsfrom^8.5.0to^10.0.0(#330) - Bump
@metamask/controller-utilsfrom^10.0.0to^11.3.0(#322) - Bump
@metamask/base-controllerfrom^5.0.2to^7.0.1(#319) - Bump
@metamask/safe-event-emitterfrom^3.1.1to^3.1.2(#329) - Bump
secp256k1in the npm_and_yarn group (#327) - Bump
@metamask/rpc-errorsfrom^6.3.1to^6.4.0(#325) - Update
LICENSE(#338)
- BREAKING: Upgrade controller to BaseController V2 (#277)
- Fix incorrect version after revert (#318)
- Update name of Polygon network token from MATIC to POL (#312)
- Remove Web3 and use Ethers to read allowance from contracts, speeding up performance on Android (#309)
- Re-release due to publishing failure
- Updates the publish step (#291)
- Remove setup node steps on publish (#289)
- Fix for publish-npm-dry-run workflow (#287)
- Fix for broken node-version on github workflow (#285)
- Fix for publish-release workflow (#282)
- Upgrade to Yarn v4 and fix publishing (#278)
- Fix issue in Mobile Swaps where users would be blocked from pressing the swap button after the first poll finishes (#275)
- Update old codefi.network urls (#260)
- Fix Web3 import behaving differently between unit test and React Native envs (#255)
- Fix
bigintcast toNumberresults innullon Android only (#259)
- BREAKING: peerDependency
@metamask/composable-controllerrequires upgrade from v1 to v4 (#219) - BREAKING: Update
@metamask/gas-fee-controllerfrom v3 to v12 (#219) - Update
@metamask/base-controllerfrom v1 to v4 (#219)
- Remove dependency on deprecated
web3-provider-engine(#219) - Upgrade legacy
eth-sig-utilto@metamask/eth-sig-util(#219) - Replace legacy
ethjswith@metamask/ethjs(#219) - Replace legacy
ethjs-querywith@metamask/ethjs-query(#219)
- Add
fetchSwapsFeatureFlagsto fetch global and chain feature flags at once (#229)
- Fix bug in contract instance creation for
getERC20Allowance(#241)
- BREAKING: Replace
@metamask/controllerswith individual controller packages (#193) (#214) (#215) - Bump
async-mutexfrom^0.3.1to^0.4.1(#194) - Bump
@metamask/auto-changelogfrom^2.5.0to^3.4.4(#194) - Replace
@metamask/ethjs-querywith@metamask/eth-query(#191) - Move dependencies from/to devDependencies (#215) (#217)
- Fix web3 import (#212)
- Exclude tests from
distand change target ontsconfig.json(#212)
- Remove dependency
ethereumjs-util(#192)
- Add Base constants (#206)
- BREAKING: Bump
@metamask/controllersfrom 26.0.0 to 33.0.0 (#139)- This is breaking because it changes the type of the state property
usedGasEstimate. Specifically, it is now possible for thehistoricalBaseFeeRange,baseFeeTrend,latestPriorityFeeRange,historicalPriorityFeeRange,priorityFeeTrend, andnetworkCongestionproperties in this object to benull.
- This is breaking because it changes the type of the state property
- BREAKING: Change
chainIdandsupportedChainIdsconfig options so that they must be0x-prefixed hex strings (#184) - BREAKING: Change
fetchEstimatedMultiLayerL1Feeconstructor option so that thechainIdoption must be an0x-prefixed hex string (#184) - BREAKING: Change
getNewChainCachemethod so thatchainIdmust be an0x-prefixed hex string (#184) - BREAKING: Change
chainIdsetter so that the value must be an0x-prefixed hex string (#184) - BREAKING: Change
chainCachestate property so that it is keyed by a0x-prefixed chain ID (#184) - BREAKING: Change various utility functions so that their
chainIdargument must be an0x-prefixed hex string (#184)getNativeSwapsTokengetSwapsContractAddressisValidContractAddressshouldEnableDirectWrappinggetBaseApiURLgetTokenMetadataURLfetchTradesInfofetchTokensfetchAggregatorMetadatafetchTopAssetsfetchSwapsFeatureLivenessfetchGasPrices
- BREAKING: Bump minimum Node version to 18 (#186)
- Update Gas API base URL from
https://gas.metaswap.codefi.networktohttps://gas.api.cx.metamask.io(#185)
- Add Linea constants (#170)
- Bump word-wrap from 1.2.3 to 1.2.5 (#166)
- Enable zkSync (#160)
- Rename ZKSYNC to ZKSYNC_ERA (#162)
- Bump cookiejar from 2.1.2 to 2.1.4 (#154)
- Bump json5 from 1.0.1 to 1.0.2 (#152)
- Fetch an L1 fee for each quote on Optimism (#150)
- Handle empty values for sourceToken and destinationToken (#146)
- Change contract addresses for Arbitrum and Optimism to lowercase (#144)
- Add support for new networks - Optimism and Arbitrum (#141)
- Bump minimist from 1.2.5 to 1.2.6 (#118)
- Update default supported chains and add check for supported chainId on fetch methods (#113)
- Bump @metamask/controllers from 25.1.0 to 26.0.0 (#114)
- Add Avalanche constants (#111)
- Bump @metamask/controllers from 22.0.0 to 25.1.0 (#109)
- Use named api urls for swap and gas (#99)
- Fix feature liveness types (#95)
- License file (#83)
- Set
clientIdon HTTP request headers (#84)
- Add Token metadata API endpoint and function (#80)