@metamask-previews/transaction-controller 53.0.0-preview-88ffa32 → 53.0.0-preview-714dae1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +3 -10
  2. package/dist/TransactionController.cjs +6 -5
  3. package/dist/TransactionController.cjs.map +1 -1
  4. package/dist/TransactionController.d.cts +9 -6
  5. package/dist/TransactionController.d.cts.map +1 -1
  6. package/dist/TransactionController.d.mts +9 -6
  7. package/dist/TransactionController.d.mts.map +1 -1
  8. package/dist/TransactionController.mjs +6 -5
  9. package/dist/TransactionController.mjs.map +1 -1
  10. package/dist/helpers/GasFeePoller.cjs +2 -1
  11. package/dist/helpers/GasFeePoller.cjs.map +1 -1
  12. package/dist/helpers/GasFeePoller.d.cts +1 -1
  13. package/dist/helpers/GasFeePoller.d.cts.map +1 -1
  14. package/dist/helpers/GasFeePoller.d.mts +1 -1
  15. package/dist/helpers/GasFeePoller.d.mts.map +1 -1
  16. package/dist/helpers/GasFeePoller.mjs +2 -1
  17. package/dist/helpers/GasFeePoller.mjs.map +1 -1
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +1 -1
  20. package/dist/index.d.cts.map +1 -1
  21. package/dist/index.d.mts +1 -1
  22. package/dist/index.d.mts.map +1 -1
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/types.cjs.map +1 -1
  25. package/dist/types.d.cts +0 -23
  26. package/dist/types.d.cts.map +1 -1
  27. package/dist/types.d.mts +0 -23
  28. package/dist/types.d.mts.map +1 -1
  29. package/dist/types.mjs.map +1 -1
  30. package/dist/utils/batch.cjs +7 -14
  31. package/dist/utils/batch.cjs.map +1 -1
  32. package/dist/utils/batch.d.cts +3 -4
  33. package/dist/utils/batch.d.cts.map +1 -1
  34. package/dist/utils/batch.d.mts +3 -4
  35. package/dist/utils/batch.d.mts.map +1 -1
  36. package/dist/utils/batch.mjs +7 -14
  37. package/dist/utils/batch.mjs.map +1 -1
  38. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,19 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ### Added
11
-
12
- - Add types for `isAtomicBatchSupported` method ([#5600](https://github.com/MetaMask/core/pull/5600))
13
- - `IsAtomicBatchSupportedRequest`
14
- - `IsAtomicBatchSupportedResult`
15
- - `IsAtomicBatchSupportedResultEntry`
16
-
17
10
  ### Changed
18
11
 
19
- - **BREAKING:** Update signature of `isAtomicBatchSupported` method ([#5600](https://github.com/MetaMask/core/pull/5600))
20
- - Replace `address` argument with `request` object containing `address` and optional `chainIds`.
21
- - Return array of `IsAtomicBatchSupportedResultEntry` objects.
22
12
  - Skip `origin` validation for `batch` transaction type ([#5586](https://github.com/MetaMask/core/pull/5586))
13
+ - **BREAKING:** `enableTxParamsGasFeeUpdates` now expects a callback function instead of a boolean.
14
+ - This callback is invoked before performing `txParams` gas fee updates. The update will proceed only if the callback returns a truthy value.
15
+ - If not set it will default to return `false`.
23
16
 
24
17
  ## [53.0.0]
25
18
 
@@ -187,7 +187,8 @@ class TransactionController extends base_controller_1.BaseController {
187
187
  __classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").checkForPendingTransactionAndStartPolling();
188
188
  });
189
189
  this.messagingSystem = messenger;
190
- this.isTxParamsGasFeeUpdatesEnabled = enableTxParamsGasFeeUpdates ?? false;
190
+ this.isTxParamsGasFeeUpdatesEnabled =
191
+ enableTxParamsGasFeeUpdates ?? ((_txMeta) => false);
191
192
  this.getNetworkState = getNetworkState;
192
193
  this.isSendFlowHistoryDisabled = disableSendFlowHistory ?? false;
193
194
  this.isHistoryDisabled = disableHistory ?? false;
@@ -334,12 +335,12 @@ class TransactionController extends base_controller_1.BaseController {
334
335
  /**
335
336
  * Determine which chains support atomic batch transactions with the given account address.
336
337
  *
337
- * @param request - Request object containing the account address and other parameters.
338
- * @returns Result object containing the supported chains and related information.
338
+ * @param address - The address of the account to check.
339
+ * @returns The supported chain IDs.
339
340
  */
340
- async isAtomicBatchSupported(request) {
341
+ async isAtomicBatchSupported(address) {
341
342
  return (0, batch_1.isAtomicBatchSupported)({
342
- ...request,
343
+ address,
343
344
  getEthQuery: (chainId) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getEthQuery).call(this, { chainId }),
344
345
  messenger: this.messagingSystem,
345
346
  publicKeyEIP7702: __classPrivateFieldGet(this, _TransactionController_publicKeyEIP7702, "f"),