@metamask-previews/transaction-controller 52.2.0-preview-d5a460dc → 52.2.0-preview-ca923904
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/dist/TransactionController.cjs +7 -3
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +1 -1
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +1 -1
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +8 -4
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/helpers/GasFeePoller.cjs +2 -4
- package/dist/helpers/GasFeePoller.cjs.map +1 -1
- package/dist/helpers/GasFeePoller.d.cts +2 -4
- package/dist/helpers/GasFeePoller.d.cts.map +1 -1
- package/dist/helpers/GasFeePoller.d.mts +2 -4
- package/dist/helpers/GasFeePoller.d.mts.map +1 -1
- package/dist/helpers/GasFeePoller.mjs +2 -4
- package/dist/helpers/GasFeePoller.mjs.map +1 -1
- package/dist/helpers/PendingTransactionTracker.cjs +2 -6
- package/dist/helpers/PendingTransactionTracker.cjs.map +1 -1
- package/dist/helpers/PendingTransactionTracker.d.cts +2 -5
- package/dist/helpers/PendingTransactionTracker.d.cts.map +1 -1
- package/dist/helpers/PendingTransactionTracker.d.mts +2 -5
- package/dist/helpers/PendingTransactionTracker.d.mts.map +1 -1
- package/dist/helpers/PendingTransactionTracker.mjs +2 -6
- package/dist/helpers/PendingTransactionTracker.mjs.map +1 -1
- package/dist/helpers/TransactionPoller.cjs +8 -12
- package/dist/helpers/TransactionPoller.cjs.map +1 -1
- package/dist/helpers/TransactionPoller.d.cts +3 -7
- package/dist/helpers/TransactionPoller.d.cts.map +1 -1
- package/dist/helpers/TransactionPoller.d.mts +3 -7
- package/dist/helpers/TransactionPoller.d.mts.map +1 -1
- package/dist/helpers/TransactionPoller.mjs +7 -11
- package/dist/helpers/TransactionPoller.mjs.map +1 -1
- package/dist/utils/feature-flags.cjs +31 -15
- package/dist/utils/feature-flags.cjs.map +1 -1
- package/dist/utils/feature-flags.d.cts +38 -26
- package/dist/utils/feature-flags.d.cts.map +1 -1
- package/dist/utils/feature-flags.d.mts +38 -26
- package/dist/utils/feature-flags.d.mts.map +1 -1
- package/dist/utils/feature-flags.mjs +28 -13
- package/dist/utils/feature-flags.mjs.map +1 -1
- package/dist/utils/gas.cjs +9 -4
- package/dist/utils/gas.cjs.map +1 -1
- package/dist/utils/gas.d.cts +6 -3
- package/dist/utils/gas.d.cts.map +1 -1
- package/dist/utils/gas.d.mts +6 -3
- package/dist/utils/gas.d.mts.map +1 -1
- package/dist/utils/gas.mjs +8 -3
- package/dist/utils/gas.mjs.map +1 -1
- package/dist/utils/utils.cjs +23 -1
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.d.cts +8 -0
- package/dist/utils/utils.d.cts.map +1 -1
- package/dist/utils/utils.d.mts +8 -0
- package/dist/utils/utils.d.mts.map +1 -1
- package/dist/utils/utils.mjs +22 -1
- package/dist/utils/utils.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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) {
|
|
@@ -563,6 +567,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
563
567
|
ethQuery,
|
|
564
568
|
isSimulationEnabled: __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this),
|
|
565
569
|
txParams: transaction,
|
|
570
|
+
messenger: this.messagingSystem,
|
|
566
571
|
});
|
|
567
572
|
return { gas: estimatedGas, simulationFails };
|
|
568
573
|
}
|
|
@@ -583,6 +588,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
583
588
|
ethQuery,
|
|
584
589
|
isSimulationEnabled: __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this),
|
|
585
590
|
txParams: transaction,
|
|
591
|
+
messenger: this.messagingSystem,
|
|
586
592
|
});
|
|
587
593
|
const gas = (0, gas_1.addGasBuffer)(estimatedGas, blockGasLimit, multiplier);
|
|
588
594
|
return {
|
|
@@ -1949,7 +1955,6 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
|
|
|
1949
1955
|
getGlobalLock: () => __classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").acquireNonceLockForChainIdKey({
|
|
1950
1956
|
chainId,
|
|
1951
1957
|
}),
|
|
1952
|
-
messenger: this.messagingSystem,
|
|
1953
1958
|
publishTransaction: (_ethQuery, transactionMeta) => this.publishTransaction(_ethQuery, transactionMeta, {
|
|
1954
1959
|
skipSubmitHistory: true,
|
|
1955
1960
|
}),
|
|
@@ -2117,12 +2122,10 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
|
|
|
2117
2122
|
(0, logger_1.projectLogger)('Updated simulation data', transactionId, simulationData);
|
|
2118
2123
|
}, _TransactionController_onGasFeePollerTransactionUpdate = function _TransactionController_onGasFeePollerTransactionUpdate({ transactionId, gasFeeEstimates, gasFeeEstimatesLoaded, layer1GasFee, }) {
|
|
2119
2124
|
__classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).call(this, { transactionId, skipHistory: true }, (txMeta) => {
|
|
2120
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
2121
2125
|
(0, GasFeePoller_1.updateTransactionGasFees)({
|
|
2122
2126
|
txMeta,
|
|
2123
2127
|
gasFeeEstimates,
|
|
2124
2128
|
gasFeeEstimatesLoaded,
|
|
2125
|
-
getEIP1559Compatibility: this.getEIP1559Compatibility.bind(this),
|
|
2126
2129
|
isTxParamsGasFeeUpdatesEnabled: this.isTxParamsGasFeeUpdatesEnabled,
|
|
2127
2130
|
layer1GasFee,
|
|
2128
2131
|
});
|
|
@@ -2170,6 +2173,7 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
|
|
|
2170
2173
|
isCustomNetwork,
|
|
2171
2174
|
isSimulationEnabled: __classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this),
|
|
2172
2175
|
txMeta: transactionMeta,
|
|
2176
|
+
messenger: this.messagingSystem,
|
|
2173
2177
|
});
|
|
2174
2178
|
}, _TransactionController_deleteTransaction = function _TransactionController_deleteTransaction(transactionId) {
|
|
2175
2179
|
this.update((state) => {
|