@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.
- package/dist/TransactionController.cjs +4 -2
- 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 +5 -3
- 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/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) {
|
|
@@ -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
|
});
|