@metamask-previews/transaction-controller 62.7.0-preview-749d0638 → 62.7.0-preview-e69ede40
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 +5 -3
- package/dist/TransactionController.cjs +1 -39
- 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 -39
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/helpers/PendingTransactionTracker.cjs +38 -28
- 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 +39 -29
- package/dist/helpers/PendingTransactionTracker.mjs.map +1 -1
- package/dist/utils/feature-flags.cjs +4 -1
- package/dist/utils/feature-flags.cjs.map +1 -1
- package/dist/utils/feature-flags.d.cts +5 -0
- package/dist/utils/feature-flags.d.cts.map +1 -1
- package/dist/utils/feature-flags.d.mts +5 -0
- package/dist/utils/feature-flags.d.mts.map +1 -1
- package/dist/utils/feature-flags.mjs +4 -1
- package/dist/utils/feature-flags.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,15 +7,17 @@ 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
10
|
### Changed
|
|
14
11
|
|
|
12
|
+
- Bump `@metamask/remote-feature-flag-controller` from `^3.1.0` to `^4.0.0` ([#7546](https://github.com/MetaMask/core/pull/7546))
|
|
13
|
+
- Upgrade `@metamask/utils` from `^11.8.1` to `^11.9.0` ([#7511](https://github.com/MetaMask/core/pull/7511))
|
|
14
|
+
- Update transaction timeout to check time since submission or when transaction was last seen on network ([#7464](https://github.com/MetaMask/core/pull/7464))
|
|
15
|
+
- Uses `blockTime` from `acceleratedPolling` feature flag.
|
|
15
16
|
- Deprecate `history` and `sendFlowHistory` properties from `TransactionMeta` and `TransactionController` options ([#7326](https://github.com/MetaMask/core/pull/7326))
|
|
16
17
|
- Bump `@metamask/remote-feature-flag-controller` from `^3.0.0` to `^3.1.0` ([#7519](https://github.com/MetaMask/core/pull/7519))
|
|
17
18
|
- Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` ([#7534](https://github.com/MetaMask/core/pull/7534))
|
|
18
19
|
- Bump `@metamask/controller-utils` from `^11.16.0` to `^11.17.0` ([#7534](https://github.com/MetaMask/core/pull/7534))
|
|
20
|
+
- Update error message for failed on-chain transactions in `PendingTransactionTracker` ([#7552](https://github.com/MetaMask/core/pull/7552))
|
|
19
21
|
|
|
20
22
|
### Fixed
|
|
21
23
|
|
|
@@ -462,26 +462,12 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
462
462
|
addedTransactionMeta.txParamsOriginal = (0, lodash_1.cloneDeep)(addedTransactionMeta.txParams);
|
|
463
463
|
updateTransaction(addedTransactionMeta);
|
|
464
464
|
}
|
|
465
|
+
// eslint-disable-next-line no-negated-condition
|
|
465
466
|
if (!skipInitialGasEstimate) {
|
|
466
467
|
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, {
|
|
467
468
|
traceContext: context,
|
|
468
469
|
}));
|
|
469
470
|
}
|
|
470
|
-
else if (isEIP1559Compatible &&
|
|
471
|
-
addedTransactionMeta.txParams.gasPrice &&
|
|
472
|
-
!addedTransactionMeta.txParams.maxFeePerGas) {
|
|
473
|
-
// Convert legacy gasPrice to EIP-1559 fees for intent transactions on EIP-1559 networks
|
|
474
|
-
addedTransactionMeta.txParams.maxFeePerGas =
|
|
475
|
-
addedTransactionMeta.txParams.gasPrice;
|
|
476
|
-
addedTransactionMeta.txParams.maxPriorityFeePerGas =
|
|
477
|
-
addedTransactionMeta.txParams.gasPrice;
|
|
478
|
-
addedTransactionMeta.txParams.type = types_1.TransactionEnvelopeType.feeMarket;
|
|
479
|
-
delete addedTransactionMeta.txParams.gasPrice; // Remove legacy gas price
|
|
480
|
-
}
|
|
481
|
-
else if (!isEIP1559Compatible && addedTransactionMeta.txParams.gasPrice) {
|
|
482
|
-
// Ensure legacy type for non-EIP-1559 networks
|
|
483
|
-
addedTransactionMeta.txParams.type = types_1.TransactionEnvelopeType.legacy;
|
|
484
|
-
}
|
|
485
471
|
else {
|
|
486
472
|
const newTransactionMeta = (0, lodash_1.cloneDeep)(addedTransactionMeta);
|
|
487
473
|
__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateGasProperties).call(this, newTransactionMeta)
|
|
@@ -1565,30 +1551,6 @@ _TransactionController_afterAdd = new WeakMap(), _TransactionController_afterSig
|
|
|
1565
1551
|
this.updateTransaction(updatedTransaction, 'TransactionController#processApproval - Updated with approval data');
|
|
1566
1552
|
}
|
|
1567
1553
|
}
|
|
1568
|
-
// For intent-based transactions (e.g., CoW intents) that are not meant to be
|
|
1569
|
-
// published on-chain by the TransactionController, skip the approve/publish flow.
|
|
1570
|
-
// These are tracked externally and should not be signed or sent.
|
|
1571
|
-
const isIntentTransaction = Boolean(
|
|
1572
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1573
|
-
__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getTransaction).call(this, transactionId)?.swapMetaData
|
|
1574
|
-
?.isIntentTx === true);
|
|
1575
|
-
if (requireApproval === false && isIntentTransaction) {
|
|
1576
|
-
const submittedTxMeta = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).call(this, {
|
|
1577
|
-
transactionId,
|
|
1578
|
-
skipValidation: true,
|
|
1579
|
-
}, (draftTxMeta) => {
|
|
1580
|
-
draftTxMeta.status = types_1.TransactionStatus.submitted;
|
|
1581
|
-
draftTxMeta.submittedTime = new Date().getTime();
|
|
1582
|
-
});
|
|
1583
|
-
this.messenger.publish(`${controllerName}:transactionSubmitted`, {
|
|
1584
|
-
transactionMeta: submittedTxMeta,
|
|
1585
|
-
});
|
|
1586
|
-
this.messenger.publish(`${controllerName}:transactionFinished`, submittedTxMeta);
|
|
1587
|
-
__classPrivateFieldGet(this, _TransactionController_internalEvents, "f").emit(`${transactionId}:finished`, submittedTxMeta);
|
|
1588
|
-
// Short-circuit normal flow; result callbacks will be handled by the
|
|
1589
|
-
// finished promise below.
|
|
1590
|
-
return ApprovalState.Approved;
|
|
1591
|
-
}
|
|
1592
1554
|
const { isCompleted: isTxCompleted } = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_isTransactionCompleted).call(this, transactionId);
|
|
1593
1555
|
if (!isTxCompleted) {
|
|
1594
1556
|
const approvalResult = await __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_approveTransaction).call(this, transactionId, traceContext, publishHook);
|