@metamask-previews/transaction-controller 51.0.0-preview-29fe07c → 51.0.0-preview-8c783cb1

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +0 -5
  2. package/dist/TransactionController.cjs +2 -12
  3. package/dist/TransactionController.cjs.map +1 -1
  4. package/dist/TransactionController.d.cts.map +1 -1
  5. package/dist/TransactionController.d.mts.map +1 -1
  6. package/dist/TransactionController.mjs +2 -12
  7. package/dist/TransactionController.mjs.map +1 -1
  8. package/dist/gas-flows/DefaultGasFeeFlow.cjs +1 -0
  9. package/dist/gas-flows/DefaultGasFeeFlow.cjs.map +1 -1
  10. package/dist/gas-flows/DefaultGasFeeFlow.mjs +1 -0
  11. package/dist/gas-flows/DefaultGasFeeFlow.mjs.map +1 -1
  12. package/dist/helpers/GasFeePoller.cjs +4 -10
  13. package/dist/helpers/GasFeePoller.cjs.map +1 -1
  14. package/dist/helpers/GasFeePoller.d.cts +1 -4
  15. package/dist/helpers/GasFeePoller.d.cts.map +1 -1
  16. package/dist/helpers/GasFeePoller.d.mts +1 -4
  17. package/dist/helpers/GasFeePoller.d.mts.map +1 -1
  18. package/dist/helpers/GasFeePoller.mjs +4 -10
  19. package/dist/helpers/GasFeePoller.mjs.map +1 -1
  20. package/dist/types.cjs.map +1 -1
  21. package/dist/types.d.cts +1 -4
  22. package/dist/types.d.cts.map +1 -1
  23. package/dist/types.d.mts +1 -4
  24. package/dist/types.d.mts.map +1 -1
  25. package/dist/types.mjs.map +1 -1
  26. package/dist/utils/feature-flags.cjs +1 -3
  27. package/dist/utils/feature-flags.cjs.map +1 -1
  28. package/dist/utils/feature-flags.d.cts +0 -16
  29. package/dist/utils/feature-flags.d.cts.map +1 -1
  30. package/dist/utils/feature-flags.d.mts +0 -16
  31. package/dist/utils/feature-flags.d.mts.map +1 -1
  32. package/dist/utils/feature-flags.mjs +1 -2
  33. package/dist/utils/feature-flags.mjs.map +1 -1
  34. package/dist/utils/gas-fees.cjs +2 -3
  35. package/dist/utils/gas-fees.cjs.map +1 -1
  36. package/dist/utils/gas-fees.d.cts +0 -2
  37. package/dist/utils/gas-fees.d.cts.map +1 -1
  38. package/dist/utils/gas-fees.d.mts +0 -2
  39. package/dist/utils/gas-fees.d.mts.map +1 -1
  40. package/dist/utils/gas-fees.mjs +2 -3
  41. package/dist/utils/gas-fees.mjs.map +1 -1
  42. package/dist/utils/gas-flow.cjs +2 -3
  43. package/dist/utils/gas-flow.cjs.map +1 -1
  44. package/dist/utils/gas-flow.d.cts +1 -3
  45. package/dist/utils/gas-flow.d.cts.map +1 -1
  46. package/dist/utils/gas-flow.d.mts +1 -3
  47. package/dist/utils/gas-flow.d.mts.map +1 -1
  48. package/dist/utils/gas-flow.mjs +2 -3
  49. package/dist/utils/gas-flow.mjs.map +1 -1
  50. package/package.json +1 -1
  51. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs +0 -162
  52. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs.map +0 -1
  53. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts +0 -11
  54. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts.map +0 -1
  55. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts +0 -11
  56. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts.map +0 -1
  57. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.mjs +0 -158
  58. 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
  ### Changed
16
11
 
17
12
  - **BREAKING:** Remove `chainIds` argument from incoming transaction methods ([#5436](https://github.com/MetaMask/core/pull/5436))
@@ -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");
@@ -48,7 +47,6 @@ const types_1 = require("./types.cjs");
48
47
  const batch_1 = require("./utils/batch.cjs");
49
48
  const eip7702_1 = require("./utils/eip7702.cjs");
50
49
  const external_transactions_1 = require("./utils/external-transactions.cjs");
51
- const feature_flags_1 = require("./utils/feature-flags.cjs");
52
50
  const gas_1 = require("./utils/gas.cjs");
53
51
  const gas_fees_1 = require("./utils/gas-fees.cjs");
54
52
  const gas_flow_1 = require("./utils/gas-flow.cjs");
@@ -248,7 +246,6 @@ class TransactionController extends base_controller_1.BaseController {
248
246
  getProvider: (networkClientId) => __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getProvider).call(this, { networkClientId }),
249
247
  getTransactions: () => this.state.transactions,
250
248
  layer1GasFeeFlows: this.layer1GasFeeFlows,
251
- messenger: this.messagingSystem,
252
249
  onStateChange: (listener) => {
253
250
  this.messagingSystem.subscribe('TransactionController:stateChange', listener);
254
251
  },
@@ -1024,21 +1021,19 @@ class TransactionController extends base_controller_1.BaseController {
1024
1021
  chainId,
1025
1022
  networkClientId: requestNetworkClientId,
1026
1023
  });
1027
- const featureFlags = (0, feature_flags_1.getFeatureFlags)(this.messagingSystem);
1028
1024
  const transactionMeta = {
1029
1025
  txParams: transactionParams,
1030
1026
  chainId,
1031
1027
  networkClientId,
1032
1028
  };
1033
1029
  // Guaranteed as the default gas fee flow matches all transactions.
1034
- const gasFeeFlow = (0, gas_flow_1.getGasFeeFlow)(transactionMeta, this.gasFeeFlows, featureFlags);
1030
+ const gasFeeFlow = (0, gas_flow_1.getGasFeeFlow)(transactionMeta, this.gasFeeFlows);
1035
1031
  const ethQuery = new eth_query_1.default(provider);
1036
1032
  const gasFeeControllerData = await this.getGasFeeEstimates({
1037
1033
  networkClientId,
1038
1034
  });
1039
1035
  return gasFeeFlow.getGasFees({
1040
1036
  ethQuery,
1041
- featureFlags,
1042
1037
  gasFeeControllerData,
1043
1038
  transactionMeta,
1044
1039
  });
@@ -1182,7 +1177,6 @@ class TransactionController extends base_controller_1.BaseController {
1182
1177
  await __classPrivateFieldGet(this, _TransactionController_trace, "f").call(this, { name: 'Update Gas Fees', parentContext: traceContext }, async () => await (0, gas_fees_1.updateGasFees)({
1183
1178
  eip1559: isEIP1559Compatible,
1184
1179
  ethQuery,
1185
- featureFlags: (0, feature_flags_1.getFeatureFlags)(this.messagingSystem),
1186
1180
  gasFeeFlows: this.gasFeeFlows,
1187
1181
  getGasFeeEstimates: this.getGasFeeEstimates,
1188
1182
  getSavedGasFees: this.getSavedGasFees.bind(this),
@@ -1919,11 +1913,7 @@ _TransactionController_internalEvents = new WeakMap(), _TransactionController_me
1919
1913
  if (__classPrivateFieldGet(this, _TransactionController_testGasFeeFlows, "f")) {
1920
1914
  return [new TestGasFeeFlow_1.TestGasFeeFlow()];
1921
1915
  }
1922
- return [
1923
- new RandomisedEstimationsGasFeeFlow_1.RandomisedEstimationsGasFeeFlow(),
1924
- new LineaGasFeeFlow_1.LineaGasFeeFlow(),
1925
- new DefaultGasFeeFlow_1.DefaultGasFeeFlow(),
1926
- ];
1916
+ return [new LineaGasFeeFlow_1.LineaGasFeeFlow(), new DefaultGasFeeFlow_1.DefaultGasFeeFlow()];
1927
1917
  }, _TransactionController_getLayer1GasFeeFlows = function _TransactionController_getLayer1GasFeeFlows() {
1928
1918
  return [new OptimismLayer1GasFeeFlow_1.OptimismLayer1GasFeeFlow(), new ScrollLayer1GasFeeFlow_1.ScrollLayer1GasFeeFlow()];
1929
1919
  }, _TransactionController_updateTransactionInternal = function _TransactionController_updateTransactionInternal({ transactionId, note, skipHistory, skipValidation, skipResimulateCheck, }, callback) {