@metamask/transaction-controller 45.0.0 → 45.1.0
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 +18 -1
- package/dist/TransactionController.cjs +41 -64
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts +3 -15
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts +3 -15
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +40 -63
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.cjs +4 -13
- package/dist/gas-flows/OracleLayer1GasFeeFlow.cjs.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.cts.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.mts.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.mjs +4 -13
- package/dist/gas-flows/OracleLayer1GasFeeFlow.mjs.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs +6 -37
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +47 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +47 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +6 -37
- package/dist/types.mjs.map +1 -1
- package/dist/utils/eip7702.cjs +87 -0
- package/dist/utils/eip7702.cjs.map +1 -0
- package/dist/utils/eip7702.d.cts +26 -0
- package/dist/utils/eip7702.d.cts.map +1 -0
- package/dist/utils/eip7702.d.mts +26 -0
- package/dist/utils/eip7702.d.mts.map +1 -0
- package/dist/utils/eip7702.mjs +83 -0
- package/dist/utils/eip7702.mjs.map +1 -0
- package/dist/utils/prepare.cjs +49 -0
- package/dist/utils/prepare.cjs.map +1 -0
- package/dist/utils/prepare.d.cts +21 -0
- package/dist/utils/prepare.d.cts.map +1 -0
- package/dist/utils/prepare.d.mts +21 -0
- package/dist/utils/prepare.d.mts.map +1 -0
- package/dist/utils/prepare.mjs +44 -0
- package/dist/utils/prepare.mjs.map +1 -0
- package/dist/utils/utils.cjs +3 -8
- package/dist/utils/utils.cjs.map +1 -1
- package/dist/utils/utils.d.cts.map +1 -1
- package/dist/utils/utils.d.mts.map +1 -1
- package/dist/utils/utils.mjs +3 -8
- package/dist/utils/utils.mjs.map +1 -1
- package/dist/utils/validation.cjs +91 -31
- package/dist/utils/validation.cjs.map +1 -1
- package/dist/utils/validation.d.cts +13 -5
- package/dist/utils/validation.d.cts.map +1 -1
- package/dist/utils/validation.d.mts +13 -5
- package/dist/utils/validation.d.mts.map +1 -1
- package/dist/utils/validation.mjs +92 -32
- package/dist/utils/validation.mjs.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [45.1.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add support for EIP-7702 / type 4 transactions ([#5285](https://github.com/MetaMask/core/pull/5285))
|
|
15
|
+
- Add `setCode` to `TransactionEnvelopeType`.
|
|
16
|
+
- Add `authorizationList` to `TransactionParams`.
|
|
17
|
+
- Export `Authorization` and `AuthorizationList` types.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- The TransactionController messenger must now allow the `KeyringController:signAuthorization` action ([#5285](https://github.com/MetaMask/core/pull/5285))
|
|
22
|
+
- Bump `@metamask/base-controller` from `^7.1.1` to `^8.0.0` ([#5305](https://github.com/MetaMask/core/pull/5305))
|
|
23
|
+
- Bump `ethereumjs/tx` from `^4.2.0` to `^5.4.0` ([#5285](https://github.com/MetaMask/core/pull/5285))
|
|
24
|
+
- Bump `ethereumjs/common` from `^3.2.0` to `^4.5.0` ([#5285](https://github.com/MetaMask/core/pull/5285))
|
|
25
|
+
|
|
10
26
|
## [45.0.0]
|
|
11
27
|
|
|
12
28
|
### Changed
|
|
@@ -1261,7 +1277,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1261
1277
|
|
|
1262
1278
|
All changes listed after this point were applied to this package following the monorepo conversion.
|
|
1263
1279
|
|
|
1264
|
-
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@45.
|
|
1280
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@45.1.0...HEAD
|
|
1281
|
+
[45.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@45.0.0...@metamask/transaction-controller@45.1.0
|
|
1265
1282
|
[45.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@44.1.0...@metamask/transaction-controller@45.0.0
|
|
1266
1283
|
[44.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@44.0.0...@metamask/transaction-controller@44.1.0
|
|
1267
1284
|
[44.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@43.0.0...@metamask/transaction-controller@44.0.0
|
|
@@ -13,12 +13,9 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
13
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
|
-
var _TransactionController_instances, _TransactionController_internalEvents, _TransactionController_methodDataHelper, _TransactionController_incomingTransactionChainIds, _TransactionController_incomingTransactionHelper, _TransactionController_incomingTransactionOptions, _TransactionController_pendingTransactionOptions, _TransactionController_trace, _TransactionController_transactionHistoryLimit, _TransactionController_isFirstTimeInteractionEnabled, _TransactionController_isSimulationEnabled, _TransactionController_testGasFeeFlows, _TransactionController_multichainTrackingHelper, _TransactionController_retryTransaction, _TransactionController_getChainId, _TransactionController_getNetworkClientId, _TransactionController_getEthQuery, _TransactionController_getProvider, _TransactionController_createNonceTracker, _TransactionController_createPendingTransactionTracker, _TransactionController_checkForPendingTransactionAndStartPolling, _TransactionController_stopAllTracking,
|
|
16
|
+
var _TransactionController_instances, _TransactionController_internalEvents, _TransactionController_methodDataHelper, _TransactionController_incomingTransactionChainIds, _TransactionController_incomingTransactionHelper, _TransactionController_incomingTransactionOptions, _TransactionController_pendingTransactionOptions, _TransactionController_trace, _TransactionController_transactionHistoryLimit, _TransactionController_isFirstTimeInteractionEnabled, _TransactionController_isSimulationEnabled, _TransactionController_testGasFeeFlows, _TransactionController_multichainTrackingHelper, _TransactionController_retryTransaction, _TransactionController_getChainId, _TransactionController_getNetworkClientId, _TransactionController_getEthQuery, _TransactionController_getProvider, _TransactionController_createNonceTracker, _TransactionController_createPendingTransactionTracker, _TransactionController_checkForPendingTransactionAndStartPolling, _TransactionController_stopAllTracking, _TransactionController_addIncomingTransactionHelperListeners, _TransactionController_removePendingTransactionTrackerListeners, _TransactionController_addPendingTransactionTrackerListeners, _TransactionController_getNonceTrackerPendingTransactions, _TransactionController_getGasFeeFlows, _TransactionController_getLayer1GasFeeFlows, _TransactionController_updateTransactionInternal, _TransactionController_updateFirstTimeInteraction, _TransactionController_updateSimulationData, _TransactionController_onGasFeePollerTransactionUpdate, _TransactionController_getSelectedAccount, _TransactionController_updateSubmitHistory;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.TransactionController = exports.ApprovalState = exports.SPEED_UP_RATE = exports.CANCEL_RATE =
|
|
19
|
-
const common_1 = require("@ethereumjs/common");
|
|
20
|
-
const tx_1 = require("@ethereumjs/tx");
|
|
21
|
-
const util_1 = require("@ethereumjs/util");
|
|
18
|
+
exports.TransactionController = exports.ApprovalState = exports.SPEED_UP_RATE = exports.CANCEL_RATE = void 0;
|
|
22
19
|
const base_controller_1 = require("@metamask/base-controller");
|
|
23
20
|
const controller_utils_1 = require("@metamask/controller-utils");
|
|
24
21
|
const eth_query_1 = __importDefault(require("@metamask/eth-query"));
|
|
@@ -46,6 +43,7 @@ const MultichainTrackingHelper_1 = require("./helpers/MultichainTrackingHelper.c
|
|
|
46
43
|
const PendingTransactionTracker_1 = require("./helpers/PendingTransactionTracker.cjs");
|
|
47
44
|
const logger_1 = require("./logger.cjs");
|
|
48
45
|
const types_1 = require("./types.cjs");
|
|
46
|
+
const eip7702_1 = require("./utils/eip7702.cjs");
|
|
49
47
|
const external_transactions_1 = require("./utils/external-transactions.cjs");
|
|
50
48
|
const gas_1 = require("./utils/gas.cjs");
|
|
51
49
|
const gas_fees_1 = require("./utils/gas-fees.cjs");
|
|
@@ -53,6 +51,7 @@ const gas_flow_1 = require("./utils/gas-flow.cjs");
|
|
|
53
51
|
const history_1 = require("./utils/history.cjs");
|
|
54
52
|
const layer1_gas_fee_flow_1 = require("./utils/layer1-gas-fee-flow.cjs");
|
|
55
53
|
const nonce_1 = require("./utils/nonce.cjs");
|
|
54
|
+
const prepare_1 = require("./utils/prepare.cjs");
|
|
56
55
|
const resimulate_1 = require("./utils/resimulate.cjs");
|
|
57
56
|
const retry_1 = require("./utils/retry.cjs");
|
|
58
57
|
const simulation_1 = require("./utils/simulation.cjs");
|
|
@@ -82,7 +81,6 @@ const metadata = {
|
|
|
82
81
|
anonymous: false,
|
|
83
82
|
},
|
|
84
83
|
};
|
|
85
|
-
exports.HARDFORK = common_1.Hardfork.London;
|
|
86
84
|
const SUBMIT_HISTORY_LIMIT = 100;
|
|
87
85
|
/**
|
|
88
86
|
* Multiplier used to determine a transaction's increased gas fee during cancellation
|
|
@@ -352,11 +350,19 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
352
350
|
if (!__classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").has(networkClientId)) {
|
|
353
351
|
throw new Error(`Network client not found - ${networkClientId}`);
|
|
354
352
|
}
|
|
353
|
+
const permittedAddresses = origin === undefined
|
|
354
|
+
? undefined
|
|
355
|
+
: await this.getPermittedAccounts?.(origin);
|
|
356
|
+
const selectedAddress = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getSelectedAccount).call(this).address;
|
|
357
|
+
await (0, validation_1.validateTransactionOrigin)({
|
|
358
|
+
from: txParams.from,
|
|
359
|
+
origin,
|
|
360
|
+
permittedAddresses,
|
|
361
|
+
selectedAddress,
|
|
362
|
+
txParams,
|
|
363
|
+
});
|
|
355
364
|
const isEIP1559Compatible = await this.getEIP1559Compatibility(networkClientId);
|
|
356
365
|
(0, validation_1.validateTxParams)(txParams, isEIP1559Compatible);
|
|
357
|
-
if (origin && this.getPermittedAccounts) {
|
|
358
|
-
await (0, validation_1.validateTransactionOrigin)(await this.getPermittedAccounts(origin), __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getSelectedAccount).call(this).address, txParams.from, origin);
|
|
359
|
-
}
|
|
360
366
|
const dappSuggestedGasFees = this.generateDappSuggestedGasFees(txParams, origin);
|
|
361
367
|
const chainId = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getChainId).call(this, networkClientId);
|
|
362
368
|
const ethQuery = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getEthQuery).call(this, {
|
|
@@ -806,12 +812,9 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
806
812
|
}
|
|
807
813
|
const initialTx = listOfTxParams[0];
|
|
808
814
|
const { chainId } = initialTx;
|
|
809
|
-
const common = this.getCommonConfiguration(chainId);
|
|
810
815
|
const networkClientId = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getNetworkClientId).call(this, { chainId });
|
|
811
|
-
const initialTxAsEthTx =
|
|
812
|
-
|
|
813
|
-
});
|
|
814
|
-
const initialTxAsSerializedHex = (0, util_1.bufferToHex)(initialTxAsEthTx.serialize());
|
|
816
|
+
const initialTxAsEthTx = (0, prepare_1.prepareTransaction)(chainId, initialTx);
|
|
817
|
+
const initialTxAsSerializedHex = (0, prepare_1.serializeTransaction)(initialTxAsEthTx);
|
|
815
818
|
if (this.approvingTransactionIds.has(initialTxAsSerializedHex)) {
|
|
816
819
|
return '';
|
|
817
820
|
}
|
|
@@ -1025,10 +1028,9 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1025
1028
|
chainId,
|
|
1026
1029
|
};
|
|
1027
1030
|
const { from } = updatedTransactionParams;
|
|
1028
|
-
const
|
|
1029
|
-
const unsignedTransaction = tx_1.TransactionFactory.fromTxData(updatedTransactionParams, { common });
|
|
1031
|
+
const unsignedTransaction = (0, prepare_1.prepareTransaction)(chainId, updatedTransactionParams);
|
|
1030
1032
|
const signedTransaction = await this.sign(unsignedTransaction, from);
|
|
1031
|
-
const rawTransaction = (0,
|
|
1033
|
+
const rawTransaction = (0, prepare_1.serializeTransaction)(signedTransaction);
|
|
1032
1034
|
return rawTransaction;
|
|
1033
1035
|
}
|
|
1034
1036
|
/**
|
|
@@ -1043,6 +1045,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1043
1045
|
/**
|
|
1044
1046
|
* Stop the signing process for a specific transaction.
|
|
1045
1047
|
* Throws an error causing the transaction status to be set to failed.
|
|
1048
|
+
*
|
|
1046
1049
|
* @param transactionId - The ID of the transaction to stop signing.
|
|
1047
1050
|
*/
|
|
1048
1051
|
abortTransactionSigning(transactionId) {
|
|
@@ -1209,17 +1212,15 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1209
1212
|
transactionId,
|
|
1210
1213
|
note: 'TransactionController#approveTransaction - Transaction approved',
|
|
1211
1214
|
}, (draftTxMeta) => {
|
|
1212
|
-
const {
|
|
1215
|
+
const { chainId, txParams } = draftTxMeta;
|
|
1216
|
+
const { gas, type } = txParams;
|
|
1213
1217
|
draftTxMeta.status = types_1.TransactionStatus.approved;
|
|
1214
|
-
draftTxMeta.txParams =
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
type: types_1.TransactionEnvelopeType.feeMarket,
|
|
1221
|
-
}),
|
|
1222
|
-
};
|
|
1218
|
+
draftTxMeta.txParams.chainId = chainId;
|
|
1219
|
+
draftTxMeta.txParams.gasLimit = gas;
|
|
1220
|
+
draftTxMeta.txParams.nonce = nonce;
|
|
1221
|
+
if (!type && (0, utils_2.isEIP1559Transaction)(txParams)) {
|
|
1222
|
+
draftTxMeta.txParams.type = types_1.TransactionEnvelopeType.feeMarket;
|
|
1223
|
+
}
|
|
1223
1224
|
});
|
|
1224
1225
|
this.onTransactionStatusChange(transactionMeta);
|
|
1225
1226
|
const rawTx = await __classPrivateFieldGet(this, _TransactionController_trace, "f").call(this, { name: 'Sign', parentContext: traceContext }, () => this.signTransaction(transactionMeta, transactionMeta.txParams));
|
|
@@ -1313,10 +1314,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1313
1314
|
status: types_1.TransactionStatus.rejected,
|
|
1314
1315
|
};
|
|
1315
1316
|
this.messagingSystem.publish(`${controllerName}:transactionFinished`, updatedTransactionMeta);
|
|
1316
|
-
__classPrivateFieldGet(this, _TransactionController_internalEvents, "f").emit(
|
|
1317
|
-
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
|
|
1318
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
1319
|
-
`${transactionMeta.id}:finished`, updatedTransactionMeta);
|
|
1317
|
+
__classPrivateFieldGet(this, _TransactionController_internalEvents, "f").emit(`${transactionMeta.id}:finished`, updatedTransactionMeta);
|
|
1320
1318
|
this.messagingSystem.publish(`${controllerName}:transactionRejected`, {
|
|
1321
1319
|
transactionMeta: updatedTransactionMeta,
|
|
1322
1320
|
actionId,
|
|
@@ -1344,8 +1342,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1344
1342
|
.filter((tx) => {
|
|
1345
1343
|
const { chainId, status, txParams, time } = tx;
|
|
1346
1344
|
if (txParams) {
|
|
1347
|
-
// TODO: Either fix this lint violation or explain why it's necessary to ignore.
|
|
1348
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
1349
1345
|
const key = `${String(txParams.nonce)}-${(0, controller_utils_1.convertHexToDecimal)(chainId)}-${new Date(time).toDateString()}`;
|
|
1350
1346
|
if (nonceNetworkSet.has(key)) {
|
|
1351
1347
|
return true;
|
|
@@ -1426,29 +1422,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1426
1422
|
const isCompleted = this.isLocalFinalState(transaction.status);
|
|
1427
1423
|
return { meta: transaction, isCompleted };
|
|
1428
1424
|
}
|
|
1429
|
-
prepareUnsignedEthTx(chainId, txParams) {
|
|
1430
|
-
return tx_1.TransactionFactory.fromTxData(txParams, {
|
|
1431
|
-
freeze: false,
|
|
1432
|
-
common: this.getCommonConfiguration(chainId),
|
|
1433
|
-
});
|
|
1434
|
-
}
|
|
1435
|
-
/**
|
|
1436
|
-
* `@ethereumjs/tx` uses `@ethereumjs/common` as a configuration tool for
|
|
1437
|
-
* specifying which chain, network, hardfork and EIPs to support for
|
|
1438
|
-
* a transaction. By referencing this configuration, and analyzing the fields
|
|
1439
|
-
* specified in txParams, @ethereumjs/tx is able to determine which EIP-2718
|
|
1440
|
-
* transaction type to use.
|
|
1441
|
-
*
|
|
1442
|
-
* @param chainId - The chainId to use for the configuration.
|
|
1443
|
-
* @returns common configuration object
|
|
1444
|
-
*/
|
|
1445
|
-
getCommonConfiguration(chainId) {
|
|
1446
|
-
const customChainParams = {
|
|
1447
|
-
chainId: parseInt(chainId, 16),
|
|
1448
|
-
defaultHardfork: exports.HARDFORK,
|
|
1449
|
-
};
|
|
1450
|
-
return common_1.Common.custom(customChainParams);
|
|
1451
|
-
}
|
|
1452
1425
|
onIncomingTransactions(transactions) {
|
|
1453
1426
|
if (!transactions.length) {
|
|
1454
1427
|
return;
|
|
@@ -1619,10 +1592,17 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1619
1592
|
}
|
|
1620
1593
|
async signTransaction(transactionMeta, txParams) {
|
|
1621
1594
|
(0, logger_1.projectLogger)('Signing transaction', txParams);
|
|
1622
|
-
const
|
|
1595
|
+
const { authorizationList, from } = txParams;
|
|
1596
|
+
const finalTxParams = { ...txParams };
|
|
1597
|
+
finalTxParams.authorizationList = await (0, eip7702_1.signAuthorizationList)({
|
|
1598
|
+
authorizationList,
|
|
1599
|
+
messenger: this.messagingSystem,
|
|
1600
|
+
transactionMeta,
|
|
1601
|
+
});
|
|
1602
|
+
const unsignedEthTx = (0, prepare_1.prepareTransaction)(transactionMeta.chainId, finalTxParams);
|
|
1623
1603
|
this.approvingTransactionIds.add(transactionMeta.id);
|
|
1624
1604
|
const signedTx = await new Promise((resolve, reject) => {
|
|
1625
|
-
this.sign?.(unsignedEthTx,
|
|
1605
|
+
this.sign?.(unsignedEthTx, from, ...this.getAdditionalSignArguments(transactionMeta)).then(resolve, reject);
|
|
1626
1606
|
this.signAbortCallbacks.set(transactionMeta.id, () => reject(new Error('Signing aborted by user')));
|
|
1627
1607
|
});
|
|
1628
1608
|
this.signAbortCallbacks.delete(transactionMeta.id);
|
|
@@ -1642,7 +1622,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1642
1622
|
};
|
|
1643
1623
|
this.updateTransaction(transactionMetaWithRsv, 'TransactionController#approveTransaction - Transaction signed');
|
|
1644
1624
|
this.onTransactionStatusChange(transactionMetaWithRsv);
|
|
1645
|
-
const rawTx = (0,
|
|
1625
|
+
const rawTx = (0, prepare_1.serializeTransaction)(signedTx);
|
|
1646
1626
|
const transactionMetaWithRawTx = (0, lodash_1.merge)({}, transactionMetaWithRsv, {
|
|
1647
1627
|
rawTx,
|
|
1648
1628
|
});
|
|
@@ -1738,10 +1718,10 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
|
|
|
1738
1718
|
}
|
|
1739
1719
|
const newTxParams = (0, retry_1.getTransactionParamsWithIncreasedGasFee)(transactionMeta.txParams, rate, gasValues);
|
|
1740
1720
|
prepareTransactionParams?.(newTxParams);
|
|
1741
|
-
const unsignedEthTx =
|
|
1721
|
+
const unsignedEthTx = (0, prepare_1.prepareTransaction)(transactionMeta.chainId, newTxParams);
|
|
1742
1722
|
const signedTx = await this.sign(unsignedEthTx, transactionMeta.txParams.from);
|
|
1743
1723
|
const transactionMetaWithRsv = this.updateTransactionMetaRSV(transactionMeta, signedTx);
|
|
1744
|
-
const rawTx = (0,
|
|
1724
|
+
const rawTx = (0, prepare_1.serializeTransaction)(signedTx);
|
|
1745
1725
|
const newFee = newTxParams.maxFeePerGas ?? newTxParams.gasPrice;
|
|
1746
1726
|
const oldFee = newTxParams.maxFeePerGas
|
|
1747
1727
|
? transactionMetaWithRsv.txParams.maxFeePerGas
|
|
@@ -1832,9 +1812,6 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
|
|
|
1832
1812
|
return pendingTransactionTracker;
|
|
1833
1813
|
}, _TransactionController_stopAllTracking = function _TransactionController_stopAllTracking() {
|
|
1834
1814
|
__classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").stopAllTracking();
|
|
1835
|
-
}, _TransactionController_removeIncomingTransactionHelperListeners = function _TransactionController_removeIncomingTransactionHelperListeners(incomingTransactionHelper) {
|
|
1836
|
-
incomingTransactionHelper.hub.removeAllListeners('transactions');
|
|
1837
|
-
incomingTransactionHelper.hub.removeAllListeners('updated-last-fetched-timestamp');
|
|
1838
1815
|
}, _TransactionController_addIncomingTransactionHelperListeners = function _TransactionController_addIncomingTransactionHelperListeners(incomingTransactionHelper) {
|
|
1839
1816
|
incomingTransactionHelper.hub.on('transactions', this.onIncomingTransactions.bind(this));
|
|
1840
1817
|
}, _TransactionController_removePendingTransactionTrackerListeners = function _TransactionController_removePendingTransactionTrackerListeners(pendingTransactionTracker) {
|