@metamask-previews/transaction-controller 52.0.0-preview-5a3453d → 52.0.0-preview-e7013a54
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 -5
- 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/types.cjs.map +1 -1
- package/dist/types.d.cts +3 -15
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +3 -15
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/feature-flags.cjs +1 -14
- package/dist/utils/feature-flags.cjs.map +1 -1
- package/dist/utils/feature-flags.d.cts +0 -10
- package/dist/utils/feature-flags.d.cts.map +1 -1
- package/dist/utils/feature-flags.d.mts +0 -10
- package/dist/utils/feature-flags.d.mts.map +1 -1
- package/dist/utils/feature-flags.mjs +0 -12
- 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 +2 -2
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs +0 -145
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts +0 -27
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts +0 -27
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts.map +0 -1
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.mjs +0 -140
- package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,6 @@ 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
|
## [52.0.0]
|
|
16
11
|
|
|
17
12
|
### Changed
|
|
@@ -33,7 +33,6 @@ const accounts_api_1 = require("./api/accounts-api.cjs");
|
|
|
33
33
|
const DefaultGasFeeFlow_1 = require("./gas-flows/DefaultGasFeeFlow.cjs");
|
|
34
34
|
const LineaGasFeeFlow_1 = require("./gas-flows/LineaGasFeeFlow.cjs");
|
|
35
35
|
const OptimismLayer1GasFeeFlow_1 = require("./gas-flows/OptimismLayer1GasFeeFlow.cjs");
|
|
36
|
-
const RandomisedEstimationsGasFeeFlow_1 = require("./gas-flows/RandomisedEstimationsGasFeeFlow.cjs");
|
|
37
36
|
const ScrollLayer1GasFeeFlow_1 = require("./gas-flows/ScrollLayer1GasFeeFlow.cjs");
|
|
38
37
|
const TestGasFeeFlow_1 = require("./gas-flows/TestGasFeeFlow.cjs");
|
|
39
38
|
const AccountsApiRemoteTransactionSource_1 = require("./helpers/AccountsApiRemoteTransactionSource.cjs");
|
|
@@ -247,7 +246,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
247
246
|
getProvider: (networkClientId) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getProvider).call(this, { networkClientId }),
|
|
248
247
|
getTransactions: () => this.state.transactions,
|
|
249
248
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
250
|
-
messenger: this.messagingSystem,
|
|
251
249
|
onStateChange: (listener) => {
|
|
252
250
|
this.messagingSystem.subscribe('TransactionController:stateChange', listener);
|
|
253
251
|
},
|
|
@@ -817,7 +815,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
817
815
|
updatedTransaction.type = type;
|
|
818
816
|
await (0, layer1_gas_fee_flow_1.updateTransactionLayer1GasFee)({
|
|
819
817
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
820
|
-
messenger: this.messagingSystem,
|
|
821
818
|
provider,
|
|
822
819
|
transactionMeta: updatedTransaction,
|
|
823
820
|
});
|
|
@@ -1030,7 +1027,7 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1030
1027
|
networkClientId,
|
|
1031
1028
|
};
|
|
1032
1029
|
// Guaranteed as the default gas fee flow matches all transactions.
|
|
1033
|
-
const gasFeeFlow = (0, gas_flow_1.getGasFeeFlow)(transactionMeta, this.gasFeeFlows
|
|
1030
|
+
const gasFeeFlow = (0, gas_flow_1.getGasFeeFlow)(transactionMeta, this.gasFeeFlows);
|
|
1034
1031
|
const ethQuery = new eth_query_1.default(provider);
|
|
1035
1032
|
const gasFeeControllerData = await this.getGasFeeEstimates({
|
|
1036
1033
|
networkClientId,
|
|
@@ -1038,7 +1035,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1038
1035
|
return gasFeeFlow.getGasFees({
|
|
1039
1036
|
ethQuery,
|
|
1040
1037
|
gasFeeControllerData,
|
|
1041
|
-
messenger: this.messagingSystem,
|
|
1042
1038
|
transactionMeta,
|
|
1043
1039
|
});
|
|
1044
1040
|
}
|
|
@@ -1058,7 +1054,6 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1058
1054
|
});
|
|
1059
1055
|
return await (0, layer1_gas_fee_flow_1.getTransactionLayer1GasFee)({
|
|
1060
1056
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
1061
|
-
messenger: this.messagingSystem,
|
|
1062
1057
|
provider,
|
|
1063
1058
|
transactionMeta: {
|
|
1064
1059
|
txParams: transactionParams,
|
|
@@ -1185,12 +1180,10 @@ class TransactionController extends base_controller_1.BaseController {
|
|
|
1185
1180
|
gasFeeFlows: this.gasFeeFlows,
|
|
1186
1181
|
getGasFeeEstimates: this.getGasFeeEstimates,
|
|
1187
1182
|
getSavedGasFees: this.getSavedGasFees.bind(this),
|
|
1188
|
-
messenger: this.messagingSystem,
|
|
1189
1183
|
txMeta: transactionMeta,
|
|
1190
1184
|
}));
|
|
1191
1185
|
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)({
|
|
1192
1186
|
layer1GasFeeFlows: this.layer1GasFeeFlows,
|
|
1193
|
-
messenger: this.messagingSystem,
|
|
1194
1187
|
provider,
|
|
1195
1188
|
transactionMeta,
|
|
1196
1189
|
}));
|
|
@@ -1920,11 +1913,7 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
|
|
|
1920
1913
|
if (__classPrivateFieldGet(this, _TransactionController_testGasFeeFlows, "f")) {
|
|
1921
1914
|
return [new TestGasFeeFlow_1.TestGasFeeFlow()];
|
|
1922
1915
|
}
|
|
1923
|
-
return [
|
|
1924
|
-
new RandomisedEstimationsGasFeeFlow_1.RandomisedEstimationsGasFeeFlow(),
|
|
1925
|
-
new LineaGasFeeFlow_1.LineaGasFeeFlow(),
|
|
1926
|
-
new DefaultGasFeeFlow_1.DefaultGasFeeFlow(),
|
|
1927
|
-
];
|
|
1916
|
+
return [new LineaGasFeeFlow_1.LineaGasFeeFlow(), new DefaultGasFeeFlow_1.DefaultGasFeeFlow()];
|
|
1928
1917
|
}, _TransactionController_getLayer1GasFeeFlows = function _TransactionController_getLayer1GasFeeFlows() {
|
|
1929
1918
|
return [new OptimismLayer1GasFeeFlow_1.OptimismLayer1GasFeeFlow(), new ScrollLayer1GasFeeFlow_1.ScrollLayer1GasFeeFlow()];
|
|
1930
1919
|
}, _TransactionController_updateTransactionInternal = function _TransactionController_updateTransactionInternal({ transactionId, note, skipHistory, skipValidation, skipResimulateCheck, }, callback) {
|