Releases: MetaMask/smart-transactions-controller
Releases · MetaMask/smart-transactions-controller
10.1.3
10.1.2
10.1.1
10.1.0
10.0.1
10.0.0
9.0.0
Added
- Add Sepolia support (#316)
- Add function
wipeSmartTransactionsto clear all state for a given address (needs to be supplied in all-lowercase) (#316)
Changed
- Update
@metamask/base-controllerfrom^4.1.1to^5.0.1(#296) - Update
@metamask/controller-utilsfrom^8.0.3to^9.1.0(#318) - Update
@metamask/network-controllerfrom^17.2.0to^18.1.0(#310) - Update
@metamask/polling-controllerfrom^5.0.1to^6.0.1(#294) - Update
@metamask/transaction-controllerfrom^25.1.0to^28.1.0(#319)
Removed
- BREAKING: Remove Goerli support (#316)
8.1.0
Changed
- Update a URL for transaction-api from
https://transaction.metaswap.codefi.networktohttps://transaction.api.cx.metamask.io, since we shouldn't be usingcodefi.networkanymore (#314) - Add a new function called
getSmartTransactionByMinedTxHash, which can be used to get a smart transaction by itsminedHashprop (#314) - Add new props on the
SmartTransactionsStatustype, so they can be used e.g. as event props (#314)
8.0.0
Changed
- BREAKING: The constructor now requires a
getTransactionsoption, which can be used to get a list of existing transactions (#301) - Ensure that a transaction does not get re-confirmed if it is already confirmed or submitted. MetaMask Swaps are confirmed from this controller, other transaction types are most of the time confirmed from the TransactionController. (#301)
7.0.0
Added
- BREAKING: Track fees and liveness for multiple chains by adding
feesByChainIdandlivenessByChainIdproperties to SmartTransactionsControllerState (#237)- In particular, clients should prefer accessing
feesByChainIdandlivenessByChainIdinstead offeesandliveness, which will be removed in a future major version.
- In particular, clients should prefer accessing
SmartTransactionsControllernow inherits fromStaticIntervalPollingControllerV1(#237, #265)- This change introduces a set of public methods to the controller which is designed to manage polling on a particular network instead of the globally selected network. Internally,
updateSmartTransactionswill still be called as the legacy polling does. The methods added are:setIntervalLengthgetIntervalLengthstartPollingByNetworkClientIdstopAllPollingstopPollingByPollingTokenonPollingCompleteByNetworkClientId
- This change introduces a set of public methods to the controller which is designed to manage polling on a particular network instead of the globally selected network. Internally,
- Validation can be now be circumvented by passing the
skipConfirmoption (#271) - Several methods now take a
networkClientIdoption within an options object which can be used to operate on smart transactions that live on a particular chain instead of the globally selected one (#237)updateSmartTransactionfetchSmartTransactionsStatusgetFeessubmitSignedTransactionscancelSmartTransactionfetchLiveness
- Expose
eventEmitteras a public property (#298) submitSignedTransactionsnow takes atransactionMetaoption which is used to set thetypeof the submitted smart transaction (#298)submitSignedTransactionsnow setsuuidandtxHashon the submitted smart transaction (#298)submitSignedTransactionsnow returns metadata about the submitted transaction (#298)- Add
getTxHashutility function which can be used to get the transaction hash from a signed transaction (#298) <transaction-uuid>:smartTransactionis now emitted whenever a smart transaction is updated (#298)- This occurs after transactions are submitted, after they are confirmed, after statuses are updated, and also explicitly via
updateSmartTransaction.
- This occurs after transactions are submitted, after they are confirmed, after statuses are updated, and also explicitly via
Changed
- BREAKING: Bump
@metamask/network-controllerfrom^15.0.0to^17.0.0(#238 #241)- This is breaking because the type of the
messengerhas backward-incompatible changes. See the changelog for@metamask/[email protected]for more.
- This is breaking because the type of the
- BREAKING: The set of supported chains (configurable via
supportedChainIds) now defaults to including Goerli instead of Rinkeby (#237) - BREAKING: Minimum Node.js version is now 18.18 (#270)
- BREAKING: Constrain the type of the constructor
provideroption toProviderfrom@metamask/network-controller(#237) - BREAKING: The constructor now takes a required argument
getNetworkClientById, which should be bound from NetworkController'sgetNetworkClientByIdmethod (#237) - BREAKING:
fetchSmartTransactionsStatusnow emits<transaction-uuid>:smartTransactioninstead of<transaction-uuid>:transaction-hash(#279)- This event contains more information than just the transaction hash.
- This event is also always emitted even if there is no transaction hash.
- BREAKING: Use a category of "Transactions" for MetaMetrics events rather than "swaps" (#282)
- Bump
@metamask/base-controllerfrom^3.2.1to^4.0.0(#237) - Bump
@metamask/controller-utilsfrom^5.0.0to^8.0.3(#242 #244)(#242) (#244) (#267) (#272) - Bump
@metamask/network-controllerfrom^15.2.0to^17.2.0(#238) (#241) (#255) (#264) (#265) - Bump
@metamask/polling-controllerfrom^2.0.0to^5.0.0(#265) - Remove
@ethersprovider/bignumberand@ethersproject/providersfrom dependencies; replace with@metamask/eth-query@^4.0.0(#237) - Add
events@^3.3.0as a dependency (#271) - Deprecate
timeproperty onSmartTransactiontype in favor ofcreationTime(#298)
Removed
- BREAKING: Remove property
ethersProviderfromSmartTransactionsController(#237)
Fixed
- Fix
getFeesso that it does not blow away an existingnonceon the trade transaction (#271) - Fix
submitSignedTransactionsso that it sets anonceon the resulting transaction if it doesn't have one (#271) - Fix updating a smart transaction to no longer throw when no smart transactions have been previously saved under the current chain (#271)
- Properly override controller name to
SmartTransactionController(#273) - Properly mark
getFeesas having an optional second argument, since it was being handled that way anyway (#271) - The controller now waits until the first NetworkController update before making use of the
providerconstructor argument to hit the currently selected network (#274)- This change was made because in the future, the
providermay no longer be defined initially. - This change may cause errors to be thrown immediately following a network switch until a future NetworkController state update or polling iteration.
- This change was made because in the future, the