@metamask-previews/transaction-controller 62.7.0-preview-8cfea65a → 62.7.0-preview-d24ded2
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 +2 -2
- package/dist/TransactionController.cjs +1 -40
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +1 -40
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/helpers/PendingTransactionTracker.cjs +1 -3
- package/dist/helpers/PendingTransactionTracker.cjs.map +1 -1
- package/dist/helpers/PendingTransactionTracker.d.cts.map +1 -1
- package/dist/helpers/PendingTransactionTracker.d.mts.map +1 -1
- package/dist/helpers/PendingTransactionTracker.mjs +1 -3
- package/dist/helpers/PendingTransactionTracker.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,9 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### Changed
|
|
11
11
|
|
|
12
|
-
-
|
|
12
|
+
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^3.1.0` ([#7519](https://github.com/MetaMask/core/pull/7519))
|
|
13
13
|
|
|
14
14
|
### Fixed
|
|
15
15
|
|
|
@@ -467,26 +467,12 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
467
467
|
addedTransactionMeta.txParamsOriginal = (0, lodash_1.cloneDeep)(addedTransactionMeta.txParams);
|
|
468
468
|
updateTransaction(addedTransactionMeta);
|
|
469
469
|
}
|
|
470
|
+
// eslint-disable-next-line no-negated-condition
|
|
470
471
|
if (!skipInitialGasEstimate) {
|
|
471
472
|
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, {
|
|
472
473
|
traceContext: context,
|
|
473
474
|
}));
|
|
474
475
|
}
|
|
475
|
-
else if (isEIP1559Compatible &&
|
|
476
|
-
addedTransactionMeta.txParams.gasPrice &&
|
|
477
|
-
!addedTransactionMeta.txParams.maxFeePerGas) {
|
|
478
|
-
// Convert legacy gasPrice to EIP-1559 fees for intent transactions on EIP-1559 networks
|
|
479
|
-
addedTransactionMeta.txParams.maxFeePerGas =
|
|
480
|
-
addedTransactionMeta.txParams.gasPrice;
|
|
481
|
-
addedTransactionMeta.txParams.maxPriorityFeePerGas =
|
|
482
|
-
addedTransactionMeta.txParams.gasPrice;
|
|
483
|
-
addedTransactionMeta.txParams.type = types_1.TransactionEnvelopeType.feeMarket;
|
|
484
|
-
delete addedTransactionMeta.txParams.gasPrice; // Remove legacy gas price
|
|
485
|
-
}
|
|
486
|
-
else if (!isEIP1559Compatible && addedTransactionMeta.txParams.gasPrice) {
|
|
487
|
-
// Ensure legacy type for non-EIP-1559 networks
|
|
488
|
-
addedTransactionMeta.txParams.type = types_1.TransactionEnvelopeType.legacy;
|
|
489
|
-
}
|
|
490
476
|
else {
|
|
491
477
|
const newTransactionMeta = (0, lodash_1.cloneDeep)(addedTransactionMeta);
|
|
492
478
|
__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateGasProperties).call(this, newTransactionMeta)
|
|
@@ -1601,31 +1587,6 @@ _TransactionController_afterAdd = new WeakMap(), _TransactionController_afterSig
|
|
|
1601
1587
|
this.updateTransaction(updatedTransaction, 'TransactionController#processApproval - Updated with approval data');
|
|
1602
1588
|
}
|
|
1603
1589
|
}
|
|
1604
|
-
// For intent-based transactions (e.g., CoW intents) that are not meant to be
|
|
1605
|
-
// published on-chain by the TransactionController, skip the approve/publish flow.
|
|
1606
|
-
// These are tracked externally and should not be signed or sent.
|
|
1607
|
-
const isIntentTransaction = Boolean(
|
|
1608
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1609
|
-
__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getTransaction).call(this, transactionId)?.swapMetaData
|
|
1610
|
-
?.isIntentTx === true);
|
|
1611
|
-
if (requireApproval === false && isIntentTransaction) {
|
|
1612
|
-
const submittedTxMeta = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).call(this, {
|
|
1613
|
-
transactionId,
|
|
1614
|
-
note: 'TransactionController#processApproval - Intent transaction auto-submitted',
|
|
1615
|
-
skipValidation: true,
|
|
1616
|
-
}, (draftTxMeta) => {
|
|
1617
|
-
draftTxMeta.status = types_1.TransactionStatus.submitted;
|
|
1618
|
-
draftTxMeta.submittedTime = new Date().getTime();
|
|
1619
|
-
});
|
|
1620
|
-
this.messenger.publish(`${controllerName}:transactionSubmitted`, {
|
|
1621
|
-
transactionMeta: submittedTxMeta,
|
|
1622
|
-
});
|
|
1623
|
-
this.messenger.publish(`${controllerName}:transactionFinished`, submittedTxMeta);
|
|
1624
|
-
__classPrivateFieldGet(this, _TransactionController_internalEvents, "f").emit(`${transactionId}:finished`, submittedTxMeta);
|
|
1625
|
-
// Short-circuit normal flow; result callbacks will be handled by the
|
|
1626
|
-
// finished promise below.
|
|
1627
|
-
return ApprovalState.Approved;
|
|
1628
|
-
}
|
|
1629
1590
|
const { isCompleted: isTxCompleted } = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_isTransactionCompleted).call(this, transactionId);
|
|
1630
1591
|
if (!isTxCompleted) {
|
|
1631
1592
|
const approvalResult = await __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_approveTransaction).call(this, transactionId, traceContext, publishHook);
|