@metamask-previews/transaction-controller 62.6.0-preview-565dfca2 → 62.6.0-preview-6bed60a6

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,10 +7,6 @@ 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 intent based transaction support ([#6547](https://github.com/MetaMask/core/pull/6547))
13
-
14
10
  ## [62.6.0]
15
11
 
16
12
  ### Added
@@ -466,26 +466,12 @@ class TransactionController extends base_controller_1.BaseController {
466
466
  addedTransactionMeta.txParamsOriginal = (0, lodash_1.cloneDeep)(addedTransactionMeta.txParams);
467
467
  updateTransaction(addedTransactionMeta);
468
468
  }
469
+ // eslint-disable-next-line no-negated-condition
469
470
  if (!skipInitialGasEstimate) {
470
471
  await __classPrivateFieldGet(this, _TransactionController_trace, "f").call(this, { name: 'Estimate Gas Properties', parentContext: traceContext }, (context) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateGasProperties).call(this, addedTransactionMeta, {
471
472
  traceContext: context,
472
473
  }));
473
474
  }
474
- else if (isEIP1559Compatible &&
475
- addedTransactionMeta.txParams.gasPrice &&
476
- !addedTransactionMeta.txParams.maxFeePerGas) {
477
- // Convert legacy gasPrice to EIP-1559 fees for intent transactions on EIP-1559 networks
478
- addedTransactionMeta.txParams.maxFeePerGas =
479
- addedTransactionMeta.txParams.gasPrice;
480
- addedTransactionMeta.txParams.maxPriorityFeePerGas =
481
- addedTransactionMeta.txParams.gasPrice;
482
- addedTransactionMeta.txParams.type = types_1.TransactionEnvelopeType.feeMarket;
483
- delete addedTransactionMeta.txParams.gasPrice; // Remove legacy gas price
484
- }
485
- else if (!isEIP1559Compatible && addedTransactionMeta.txParams.gasPrice) {
486
- // Ensure legacy type for non-EIP-1559 networks
487
- addedTransactionMeta.txParams.type = types_1.TransactionEnvelopeType.legacy;
488
- }
489
475
  else {
490
476
  const newTransactionMeta = (0, lodash_1.cloneDeep)(addedTransactionMeta);
491
477
  __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateGasProperties).call(this, newTransactionMeta)
@@ -1600,31 +1586,6 @@ _TransactionController_afterAdd = new WeakMap(), _TransactionController_afterSig
1600
1586
  this.updateTransaction(updatedTransaction, 'TransactionController#processApproval - Updated with approval data');
1601
1587
  }
1602
1588
  }
1603
- // For intent-based transactions (e.g., CoW intents) that are not meant to be
1604
- // published on-chain by the TransactionController, skip the approve/publish flow.
1605
- // These are tracked externally and should not be signed or sent.
1606
- const isIntentTransaction = Boolean(
1607
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1608
- __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getTransaction).call(this, transactionId)?.swapMetaData
1609
- ?.isIntentTx === true);
1610
- if (requireApproval === false && isIntentTransaction) {
1611
- const submittedTxMeta = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).call(this, {
1612
- transactionId,
1613
- note: 'TransactionController#processApproval - Intent transaction auto-submitted',
1614
- skipValidation: true,
1615
- }, (draftTxMeta) => {
1616
- draftTxMeta.status = types_1.TransactionStatus.submitted;
1617
- draftTxMeta.submittedTime = new Date().getTime();
1618
- });
1619
- this.messenger.publish(`${controllerName}:transactionSubmitted`, {
1620
- transactionMeta: submittedTxMeta,
1621
- });
1622
- this.messenger.publish(`${controllerName}:transactionFinished`, submittedTxMeta);
1623
- __classPrivateFieldGet(this, _TransactionController_internalEvents, "f").emit(`${transactionId}:finished`, submittedTxMeta);
1624
- // Short-circuit normal flow; result callbacks will be handled by the
1625
- // finished promise below.
1626
- return ApprovalState.Approved;
1627
- }
1628
1589
  const { isCompleted: isTxCompleted } = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_isTransactionCompleted).call(this, transactionId);
1629
1590
  if (!isTxCompleted) {
1630
1591
  const approvalResult = await __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_approveTransaction).call(this, transactionId, traceContext, publishHook);