@metamask-previews/transaction-controller 54.0.0-preview-ea4d833b → 54.0.0-preview-493eed9

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.
package/CHANGELOG.md CHANGED
@@ -7,8 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Changed
11
+
12
+ - Update error codes for duplicate batch ID and batch size limit errors ([#5635](https://github.com/MetaMask/core/pull/5635))
13
+
10
14
  ### Fixed
11
15
 
16
+ - Throw if `addTransactionBatch` is called with any nested transaction with `to` matching internal account and including `data` ([#5635](https://github.com/MetaMask/core/pull/5635))
12
17
  - Fix incoming transaction support with `queryEntireHistory` set to `false` ([#5582](https://github.com/MetaMask/core/pull/5582))
13
18
 
14
19
  ## [54.0.0]
@@ -408,7 +408,7 @@ class TransactionController extends base_controller_1.BaseController {
408
408
  const isDuplicateBatchId = batchId?.length &&
409
409
  this.state.transactions.some((tx) => tx.batchId?.toLowerCase() === batchId?.toLowerCase());
410
410
  if (isDuplicateBatchId && origin && origin !== controller_utils_1.ORIGIN_METAMASK) {
411
- throw rpc_errors_1.rpcErrors.invalidInput('Batch ID already exists');
411
+ throw new rpc_errors_1.JsonRpcError(validation_1.ErrorCode.DuplicateBundleId, 'Batch ID already exists');
412
412
  }
413
413
  const dappSuggestedGasFees = this.generateDappSuggestedGasFees(txParams, origin);
414
414
  const transactionType = type ?? (await (0, transaction_type_1.determineTransactionType)(txParams, ethQuery)).type;