@metamask-previews/transaction-controller 52.2.0-preview-d5a460dc → 52.2.0-preview-afcc340

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.
@@ -398,6 +398,10 @@ class TransactionController extends base_controller_1.BaseController {
398
398
  const delegationAddressPromise = (0, eip7702_1.getDelegationAddress)(txParams.from, ethQuery).catch(() => undefined);
399
399
  const isEIP1559Compatible = await this.getEIP1559Compatibility(networkClientId);
400
400
  (0, validation_1.validateTxParams)(txParams, isEIP1559Compatible);
401
+ if (!txParams.type) {
402
+ // Determine transaction type based on transaction parameters and network compatibility
403
+ (0, utils_2.setEnvelopeType)(txParams, isEIP1559Compatible);
404
+ }
401
405
  const isDuplicateBatchId = batchId?.length &&
402
406
  this.state.transactions.some((tx) => tx.batchId?.toLowerCase() === batchId?.toLowerCase());
403
407
  if (isDuplicateBatchId && origin && origin !== controller_utils_1.ORIGIN_METAMASK) {
@@ -2117,12 +2121,10 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
2117
2121
  (0, logger_1.projectLogger)('Updated simulation data', transactionId, simulationData);
2118
2122
  }, _TransactionController_onGasFeePollerTransactionUpdate = function _TransactionController_onGasFeePollerTransactionUpdate({ transactionId, gasFeeEstimates, gasFeeEstimatesLoaded, layer1GasFee, }) {
2119
2123
  __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).call(this, { transactionId, skipHistory: true }, (txMeta) => {
2120
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
2121
2124
  (0, GasFeePoller_1.updateTransactionGasFees)({
2122
2125
  txMeta,
2123
2126
  gasFeeEstimates,
2124
2127
  gasFeeEstimatesLoaded,
2125
- getEIP1559Compatibility: this.getEIP1559Compatibility.bind(this),
2126
2128
  isTxParamsGasFeeUpdatesEnabled: this.isTxParamsGasFeeUpdatesEnabled,
2127
2129
  layer1GasFee,
2128
2130
  });