@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.
Files changed (108) hide show
  1. package/CHANGELOG.md +0 -5
  2. package/dist/TransactionController.cjs +2 -13
  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 -13
  7. package/dist/TransactionController.mjs.map +1 -1
  8. package/dist/gas-flows/DefaultGasFeeFlow.cjs +3 -1
  9. package/dist/gas-flows/DefaultGasFeeFlow.cjs.map +1 -1
  10. package/dist/gas-flows/DefaultGasFeeFlow.d.cts +2 -2
  11. package/dist/gas-flows/DefaultGasFeeFlow.d.cts.map +1 -1
  12. package/dist/gas-flows/DefaultGasFeeFlow.d.mts +2 -2
  13. package/dist/gas-flows/DefaultGasFeeFlow.d.mts.map +1 -1
  14. package/dist/gas-flows/DefaultGasFeeFlow.mjs +3 -1
  15. package/dist/gas-flows/DefaultGasFeeFlow.mjs.map +1 -1
  16. package/dist/gas-flows/LineaGasFeeFlow.cjs +1 -1
  17. package/dist/gas-flows/LineaGasFeeFlow.cjs.map +1 -1
  18. package/dist/gas-flows/LineaGasFeeFlow.d.cts +1 -5
  19. package/dist/gas-flows/LineaGasFeeFlow.d.cts.map +1 -1
  20. package/dist/gas-flows/LineaGasFeeFlow.d.mts +1 -5
  21. package/dist/gas-flows/LineaGasFeeFlow.d.mts.map +1 -1
  22. package/dist/gas-flows/LineaGasFeeFlow.mjs +1 -1
  23. package/dist/gas-flows/LineaGasFeeFlow.mjs.map +1 -1
  24. package/dist/gas-flows/OptimismLayer1GasFeeFlow.cjs +1 -1
  25. package/dist/gas-flows/OptimismLayer1GasFeeFlow.cjs.map +1 -1
  26. package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.cts +1 -5
  27. package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.cts.map +1 -1
  28. package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.mts +1 -5
  29. package/dist/gas-flows/OptimismLayer1GasFeeFlow.d.mts.map +1 -1
  30. package/dist/gas-flows/OptimismLayer1GasFeeFlow.mjs +1 -1
  31. package/dist/gas-flows/OptimismLayer1GasFeeFlow.mjs.map +1 -1
  32. package/dist/gas-flows/OracleLayer1GasFeeFlow.cjs.map +1 -1
  33. package/dist/gas-flows/OracleLayer1GasFeeFlow.d.cts +1 -5
  34. package/dist/gas-flows/OracleLayer1GasFeeFlow.d.cts.map +1 -1
  35. package/dist/gas-flows/OracleLayer1GasFeeFlow.d.mts +1 -5
  36. package/dist/gas-flows/OracleLayer1GasFeeFlow.d.mts.map +1 -1
  37. package/dist/gas-flows/OracleLayer1GasFeeFlow.mjs.map +1 -1
  38. package/dist/gas-flows/ScrollLayer1GasFeeFlow.cjs +1 -1
  39. package/dist/gas-flows/ScrollLayer1GasFeeFlow.cjs.map +1 -1
  40. package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.cts +1 -5
  41. package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.cts.map +1 -1
  42. package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.mts +1 -5
  43. package/dist/gas-flows/ScrollLayer1GasFeeFlow.d.mts.map +1 -1
  44. package/dist/gas-flows/ScrollLayer1GasFeeFlow.mjs +1 -1
  45. package/dist/gas-flows/ScrollLayer1GasFeeFlow.mjs.map +1 -1
  46. package/dist/gas-flows/TestGasFeeFlow.cjs +1 -1
  47. package/dist/gas-flows/TestGasFeeFlow.cjs.map +1 -1
  48. package/dist/gas-flows/TestGasFeeFlow.d.cts +2 -2
  49. package/dist/gas-flows/TestGasFeeFlow.d.cts.map +1 -1
  50. package/dist/gas-flows/TestGasFeeFlow.d.mts +2 -2
  51. package/dist/gas-flows/TestGasFeeFlow.d.mts.map +1 -1
  52. package/dist/gas-flows/TestGasFeeFlow.mjs +1 -1
  53. package/dist/gas-flows/TestGasFeeFlow.mjs.map +1 -1
  54. package/dist/helpers/GasFeePoller.cjs +4 -9
  55. package/dist/helpers/GasFeePoller.cjs.map +1 -1
  56. package/dist/helpers/GasFeePoller.d.cts +1 -4
  57. package/dist/helpers/GasFeePoller.d.cts.map +1 -1
  58. package/dist/helpers/GasFeePoller.d.mts +1 -4
  59. package/dist/helpers/GasFeePoller.d.mts.map +1 -1
  60. package/dist/helpers/GasFeePoller.mjs +4 -9
  61. package/dist/helpers/GasFeePoller.mjs.map +1 -1
  62. package/dist/types.cjs.map +1 -1
  63. package/dist/types.d.cts +3 -15
  64. package/dist/types.d.cts.map +1 -1
  65. package/dist/types.d.mts +3 -15
  66. package/dist/types.d.mts.map +1 -1
  67. package/dist/types.mjs.map +1 -1
  68. package/dist/utils/feature-flags.cjs +1 -14
  69. package/dist/utils/feature-flags.cjs.map +1 -1
  70. package/dist/utils/feature-flags.d.cts +0 -10
  71. package/dist/utils/feature-flags.d.cts.map +1 -1
  72. package/dist/utils/feature-flags.d.mts +0 -10
  73. package/dist/utils/feature-flags.d.mts.map +1 -1
  74. package/dist/utils/feature-flags.mjs +0 -12
  75. package/dist/utils/feature-flags.mjs.map +1 -1
  76. package/dist/utils/gas-fees.cjs +3 -21
  77. package/dist/utils/gas-fees.cjs.map +1 -1
  78. package/dist/utils/gas-fees.d.cts +0 -14
  79. package/dist/utils/gas-fees.d.cts.map +1 -1
  80. package/dist/utils/gas-fees.d.mts +0 -14
  81. package/dist/utils/gas-fees.d.mts.map +1 -1
  82. package/dist/utils/gas-fees.mjs +2 -19
  83. package/dist/utils/gas-fees.mjs.map +1 -1
  84. package/dist/utils/gas-flow.cjs +2 -3
  85. package/dist/utils/gas-flow.cjs.map +1 -1
  86. package/dist/utils/gas-flow.d.cts +1 -3
  87. package/dist/utils/gas-flow.d.cts.map +1 -1
  88. package/dist/utils/gas-flow.d.mts +1 -3
  89. package/dist/utils/gas-flow.d.mts.map +1 -1
  90. package/dist/utils/gas-flow.mjs +2 -3
  91. package/dist/utils/gas-flow.mjs.map +1 -1
  92. package/dist/utils/layer1-gas-fee-flow.cjs +4 -9
  93. package/dist/utils/layer1-gas-fee-flow.cjs.map +1 -1
  94. package/dist/utils/layer1-gas-fee-flow.d.cts +1 -4
  95. package/dist/utils/layer1-gas-fee-flow.d.cts.map +1 -1
  96. package/dist/utils/layer1-gas-fee-flow.d.mts +1 -4
  97. package/dist/utils/layer1-gas-fee-flow.d.mts.map +1 -1
  98. package/dist/utils/layer1-gas-fee-flow.mjs +4 -9
  99. package/dist/utils/layer1-gas-fee-flow.mjs.map +1 -1
  100. package/package.json +2 -2
  101. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs +0 -145
  102. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.cjs.map +0 -1
  103. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts +0 -27
  104. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.cts.map +0 -1
  105. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts +0 -27
  106. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.d.mts.map +0 -1
  107. package/dist/gas-flows/RandomisedEstimationsGasFeeFlow.mjs +0 -140
  108. 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, this.messagingSystem);
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) {