@metamask-previews/transaction-controller 58.0.0-preview-08a4995 → 58.0.0-preview-c6e5eb7

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
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Added
11
11
 
12
+ - Support `containerTypes` property in `updateEditableParams` method ([#6014](https://github.com/MetaMask/core/pull/6014))
12
13
  - Add specific transaction types to outgoing transactions retrieved from accounts API ([#5987](https://github.com/MetaMask/core/pull/5987))
13
14
  - Add optional `amount` property to `transferInformation` object in `TransactionMeta` type.
14
15
 
@@ -864,6 +864,7 @@ class TransactionController extends base_controller_1.BaseController {
864
864
  *
865
865
  * @param txId - The ID of the transaction to update.
866
866
  * @param params - The editable parameters to update.
867
+ * @param params.containerTypes - Container types applied to the parameters.
867
868
  * @param params.data - Data to pass with the transaction.
868
869
  * @param params.from - Address to send the transaction from.
869
870
  * @param params.gas - Maximum number of units of gas to use for the transaction.
@@ -874,7 +875,7 @@ class TransactionController extends base_controller_1.BaseController {
874
875
  * @param params.value - Value associated with the transaction.
875
876
  * @returns The updated transaction metadata.
876
877
  */
877
- async updateEditableParams(txId, { data, from, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, value, }) {
878
+ async updateEditableParams(txId, { containerTypes, data, from, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, to, value, }) {
878
879
  const transactionMeta = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getTransaction).call(this, txId);
879
880
  if (!transactionMeta) {
880
881
  throw new Error(`Cannot update editable params as no transaction metadata found`);
@@ -899,6 +900,9 @@ class TransactionController extends base_controller_1.BaseController {
899
900
  const ethQuery = new eth_query_1.default(provider);
900
901
  const { type } = await (0, transaction_type_1.determineTransactionType)(updatedTransaction.txParams, ethQuery);
901
902
  updatedTransaction.type = type;
903
+ if (containerTypes) {
904
+ updatedTransaction.containerTypes = containerTypes;
905
+ }
902
906
  await (0, layer1_gas_fee_flow_1.updateTransactionLayer1GasFee)({
903
907
  layer1GasFeeFlows: __classPrivateFieldGet(this, _TransactionController_layer1GasFeeFlows, "f"),
904
908
  messenger: this.messagingSystem,