@metamask-previews/transaction-controller 52.2.0-preview-b881bfc9 → 52.2.0-preview-bf2d2c4c
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 +0 -6
- package/dist/TransactionController.cjs +2 -13
- 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 +2 -13
- package/dist/TransactionController.mjs.map +1 -1
- package/dist/gas-flows/DefaultGasFeeFlow.cjs +3 -1
- package/dist/gas-flows/DefaultGasFeeFlow.cjs.map +1 -1
- package/dist/gas-flows/DefaultGasFeeFlow.d.cts +2 -2
- package/dist/gas-flows/DefaultGasFeeFlow.d.cts.map +1 -1
- package/dist/gas-flows/DefaultGasFeeFlow.d.mts +2 -2
- package/dist/gas-flows/DefaultGasFeeFlow.d.mts.map +1 -1
- package/dist/gas-flows/DefaultGasFeeFlow.mjs +3 -1
- package/dist/gas-flows/DefaultGasFeeFlow.mjs.map +1 -1
- package/dist/gas-flows/LineaGasFeeFlow.cjs +1 -1
- package/dist/gas-flows/LineaGasFeeFlow.cjs.map +1 -1
- package/dist/gas-flows/LineaGasFeeFlow.d.cts +1 -5
- package/dist/gas-flows/LineaGasFeeFlow.d.cts.map +1 -1
- package/dist/gas-flows/LineaGasFeeFlow.d.mts +1 -5
- package/dist/gas-flows/LineaGasFeeFlow.d.mts.map +1 -1
- package/dist/gas-flows/LineaGasFeeFlow.mjs +1 -1
- package/dist/gas-flows/LineaGasFeeFlow.mjs.map +1 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.cjs +1 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.cjs.map +1 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.cts +1 -5
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.cts.map +1 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.mts +1 -5
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.mts.map +1 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.mjs +1 -1
- package/dist/gas-flows/OptimismLayer1GasFeeFlow.mjs.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.cjs.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.cts +1 -5
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.cts.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.mts +1 -5
- package/dist/gas-flows/OracleLayer1GasFeeFlow.d.mts.map +1 -1
- package/dist/gas-flows/OracleLayer1GasFeeFlow.mjs.map +1 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.cjs +1 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.cjs.map +1 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.cts +1 -5
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.cts.map +1 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.mts +1 -5
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.mts.map +1 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.mjs +1 -1
- package/dist/gas-flows/ScrollLayer1GasFeeFlow.mjs.map +1 -1
- package/dist/gas-flows/TestGasFeeFlow.cjs +1 -1
- package/dist/gas-flows/TestGasFeeFlow.cjs.map +1 -1
- package/dist/gas-flows/TestGasFeeFlow.d.cts +2 -2
- package/dist/gas-flows/TestGasFeeFlow.d.cts.map +1 -1
- package/dist/gas-flows/TestGasFeeFlow.d.mts +2 -2
- package/dist/gas-flows/TestGasFeeFlow.d.mts.map +1 -1
- package/dist/gas-flows/TestGasFeeFlow.mjs +1 -1
- package/dist/gas-flows/TestGasFeeFlow.mjs.map +1 -1
- package/dist/helpers/GasFeePoller.cjs +4 -9
- package/dist/helpers/GasFeePoller.cjs.map +1 -1
- package/dist/helpers/GasFeePoller.d.cts +1 -4
- package/dist/helpers/GasFeePoller.d.cts.map +1 -1
- package/dist/helpers/GasFeePoller.d.mts +1 -4
- package/dist/helpers/GasFeePoller.d.mts.map +1 -1
- package/dist/helpers/GasFeePoller.mjs +4 -9
- package/dist/helpers/GasFeePoller.mjs.map +1 -1
- package/dist/helpers/IncomingTransactionHelper.cjs +1 -2
- package/dist/helpers/IncomingTransactionHelper.cjs.map +1 -1
- package/dist/helpers/IncomingTransactionHelper.d.cts.map +1 -1
- package/dist/helpers/IncomingTransactionHelper.d.mts.map +1 -1
- package/dist/helpers/IncomingTransactionHelper.mjs +1 -2
- package/dist/helpers/IncomingTransactionHelper.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +5 -18
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +5 -18
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/feature-flags.cjs +2 -18
- package/dist/utils/feature-flags.cjs.map +1 -1
- package/dist/utils/feature-flags.d.cts +0 -16
- package/dist/utils/feature-flags.d.cts.map +1 -1
- package/dist/utils/feature-flags.d.mts +0 -16
- package/dist/utils/feature-flags.d.mts.map +1 -1
- package/dist/utils/feature-flags.mjs +1 -16
- package/dist/utils/feature-flags.mjs.map +1 -1
- package/dist/utils/gas-fees.cjs +3 -21
- package/dist/utils/gas-fees.cjs.map +1 -1
- package/dist/utils/gas-fees.d.cts +0 -14
- package/dist/utils/gas-fees.d.cts.map +1 -1
- package/dist/utils/gas-fees.d.mts +0 -14
- package/dist/utils/gas-fees.d.mts.map +1 -1
- package/dist/utils/gas-fees.mjs +2 -19
- package/dist/utils/gas-fees.mjs.map +1 -1
- package/dist/utils/gas-flow.cjs +2 -3
- package/dist/utils/gas-flow.cjs.map +1 -1
- package/dist/utils/gas-flow.d.cts +1 -3
- package/dist/utils/gas-flow.d.cts.map +1 -1
- package/dist/utils/gas-flow.d.mts +1 -3
- package/dist/utils/gas-flow.d.mts.map +1 -1
- package/dist/utils/gas-flow.mjs +2 -3
- package/dist/utils/gas-flow.mjs.map +1 -1
- package/dist/utils/layer1-gas-fee-flow.cjs +4 -9
- package/dist/utils/layer1-gas-fee-flow.cjs.map +1 -1
- package/dist/utils/layer1-gas-fee-flow.d.cts +1 -4
- package/dist/utils/layer1-gas-fee-flow.d.cts.map +1 -1
- package/dist/utils/layer1-gas-fee-flow.d.mts +1 -4
- package/dist/utils/layer1-gas-fee-flow.d.mts.map +1 -1
- package/dist/utils/layer1-gas-fee-flow.mjs +4 -9
- package/dist/utils/layer1-gas-fee-flow.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs +0 -123
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts +0 -28
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts +0 -28
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.mjs +0 -118
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,14 +7,8 @@ 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
|
-
- Adds `RandomisedEstimationsGasFeeFlow` to gas fee flows in `TransactionController` ([#5511](https://github.com/MetaMask/core/pull/5511))
|
|
13
|
-
- Added flow only will be activated if chainId is defined in feature flags.
|
|
14
|
-
|
|
15
10
|
### Fixed
|
|
16
11
|
|
|
17
|
-
- Fix EIP-7702 contract signature validation on chains with odd-length hexadecimal ID ([#5563](https://github.com/MetaMask/core/pull/5563))
|
|
18
12
|
- Fix simulation of type-4 transactions ([#5552](https://github.com/MetaMask/core/pull/5552))
|
|
19
13
|
|
|
20
14
|
## [52.2.0]
|
|
@@ -32,7 +32,6 @@ const accounts_api_1 = require("./api/accounts-api.cjs");
|
|
|
32
32
|
const DefaultGasFeeFlow_1 = require("./gas-flows/DefaultGasFeeFlow.cjs");
|
|
33
33
|
const LineaGasFeeFlow_1 = require("./gas-flows/LineaGasFeeFlow.cjs");
|
|
34
34
|
const OptimismLayer1GasFeeFlow_1 = require("./gas-flows/OptimismLayer1GasFeeFlow.cjs");
|
|
35
|
-
const RandomisedEstimationsGasFeeFlow_1 = require("./gas-flows/RandomisedEstimationsGasFeeFlow.cjs");
|
|
36
35
|
const ScrollLayer1GasFeeFlow_1 = require("./gas-flows/ScrollLayer1GasFeeFlow.cjs");
|
|
37
36
|
const TestGasFeeFlow_1 = require("./gas-flows/TestGasFeeFlow.cjs");
|
|
38
37
|
const AccountsApiRemoteTransactionSource_1 = require("./helpers/AccountsApiRemoteTransactionSource.cjs");
|
|
@@ -249,7 +248,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
249
248
|
getProvider: (networkClientId) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getProvider).call(this, { networkClientId }),
|
|
250
249
|
getTransactions: () => this.state.transactions,
|
|
251
250
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
252
|
-
messenger: this.messagingSystem,
|
|
253
251
|
onStateChange: (listener) => {
|
|
254
252
|
this.messagingSystem.subscribe('TransactionController:stateChange', listener);
|
|
255
253
|
},
|
|
@@ -844,7 +842,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
844
842
|
updatedTransaction.type = type;
|
|
845
843
|
await (0, layer1_gas_fee_flow_1.updateTransactionLayer1GasFee)({
|
|
846
844
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
847
|
-
messenger: this.messagingSystem,
|
|
848
845
|
provider,
|
|
849
846
|
transactionMeta: updatedTransaction,
|
|
850
847
|
});
|
|
@@ -1057,7 +1054,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1057
1054
|
networkClientId,
|
|
1058
1055
|
};
|
|
1059
1056
|
// Guaranteed as the default gas fee flow matches all transactions.
|
|
1060
|
-
const gasFeeFlow = (0, gas_flow_1.getGasFeeFlow)(transactionMeta, this.gasFeeFlows
|
|
1057
|
+
const gasFeeFlow = (0, gas_flow_1.getGasFeeFlow)(transactionMeta, this.gasFeeFlows);
|
|
1061
1058
|
const ethQuery = new eth_query_1.default(provider);
|
|
1062
1059
|
const gasFeeControllerData = await this.getGasFeeEstimates({
|
|
1063
1060
|
networkClientId,
|
|
@@ -1065,7 +1062,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1065
1062
|
return gasFeeFlow.getGasFees({
|
|
1066
1063
|
ethQuery,
|
|
1067
1064
|
gasFeeControllerData,
|
|
1068
|
-
messenger: this.messagingSystem,
|
|
1069
1065
|
transactionMeta,
|
|
1070
1066
|
});
|
|
1071
1067
|
}
|
|
@@ -1085,7 +1081,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1085
1081
|
});
|
|
1086
1082
|
return await (0, layer1_gas_fee_flow_1.getTransactionLayer1GasFee)({
|
|
1087
1083
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
1088
|
-
messenger: this.messagingSystem,
|
|
1089
1084
|
provider,
|
|
1090
1085
|
transactionMeta: {
|
|
1091
1086
|
txParams: transactionParams,
|
|
@@ -1244,12 +1239,10 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1244
1239
|
gasFeeFlows: this.gasFeeFlows,
|
|
1245
1240
|
getGasFeeEstimates: this.getGasFeeEstimates,
|
|
1246
1241
|
getSavedGasFees: this.getSavedGasFees.bind(this),
|
|
1247
|
-
messenger: this.messagingSystem,
|
|
1248
1242
|
txMeta: transactionMeta,
|
|
1249
1243
|
}));
|
|
1250
1244
|
await __classPrivateFieldGet(this, _TransactionController_trace, "f").call(this, { name: 'Update Layer 1 Gas Fees', parentContext: traceContext }, async () => await (0, layer1_gas_fee_flow_1.updateTransactionLayer1GasFee)({
|
|
1251
1245
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
1252
|
-
messenger: this.messagingSystem,
|
|
1253
1246
|
provider,
|
|
1254
1247
|
transactionMeta,
|
|
1255
1248
|
}));
|
|
@@ -1997,11 +1990,7 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
|
|
|
1997
1990
|
if (__classPrivateFieldGet(this, _TransactionController_testGasFeeFlows, "f")) {
|
|
1998
1991
|
return [new TestGasFeeFlow_1.TestGasFeeFlow()];
|
|
1999
1992
|
}
|
|
2000
|
-
return [
|
|
2001
|
-
new RandomisedEstimationsGasFeeFlow_1.RandomisedEstimationsGasFeeFlow(),
|
|
2002
|
-
new LineaGasFeeFlow_1.LineaGasFeeFlow(),
|
|
2003
|
-
new DefaultGasFeeFlow_1.DefaultGasFeeFlow(),
|
|
2004
|
-
];
|
|
1993
|
+
return [new LineaGasFeeFlow_1.LineaGasFeeFlow(), new DefaultGasFeeFlow_1.DefaultGasFeeFlow()];
|
|
2005
1994
|
}, _TransactionController_getLayer1GasFeeFlows = function _TransactionController_getLayer1GasFeeFlows() {
|
|
2006
1995
|
return [new OptimismLayer1GasFeeFlow_1.OptimismLayer1GasFeeFlow(), new ScrollLayer1GasFeeFlow_1.ScrollLayer1GasFeeFlow()];
|
|
2007
1996
|
}, _TransactionController_updateTransactionInternal = function _TransactionController_updateTransactionInternal({ transactionId, note, skipHistory, skipValidation, skipResimulateCheck, }, callback) {
|