@metamask-previews/transaction-controller 55.0.2-preview-780c8df → 55.0.2-preview-515e9b9c

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 CHANGED
@@ -7,10 +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
- - Add automatic update `txParams` gas values when controller `updateTransactionGasFees` method is called with `userFeeLevel` ([#5800](https://github.com/MetaMask/core/pull/5800))
13
-
14
10
  ## [55.0.2]
15
11
 
16
12
  ### Fixed
@@ -741,33 +741,13 @@ class TransactionController extends base_controller_1.BaseController {
741
741
  throw new Error(`Cannot update transaction as no transaction metadata found`);
742
742
  }
743
743
  (0, utils_2.validateIfTransactionUnapproved)(transactionMeta, 'updateTransactionGasFees');
744
- // Initialize gas fee values that will be used in the transaction update
745
- let finalGasPrice = gasPrice;
746
- let finalMaxFeePerGas = maxFeePerGas;
747
- let finalMaxPriorityFeePerGas = maxPriorityFeePerGas;
748
- const isTransactionGasFeeEstimatesExists = transactionMeta.gasFeeEstimates;
749
- const isAutomaticGasFeeUpdateEnabled = __classPrivateFieldGet(this, _TransactionController_isAutomaticGasFeeUpdateEnabled, "f").call(this, transactionMeta);
750
- const shouldUpdateTxParamsGasFees = isTransactionGasFeeEstimatesExists &&
751
- isAutomaticGasFeeUpdateEnabled &&
752
- userFeeLevel;
753
- if (shouldUpdateTxParamsGasFees) {
754
- (0, GasFeePoller_1.applyTransactionGasEstimatesToTransaction)({
755
- txMeta: transactionMeta,
756
- userFeeLevel: userFeeLevel,
757
- });
758
- // Ignore the provided gas fee values when userFeeLevel is specified because
759
- // the gas fee values are updated directly in transactionMeta in the applyTransactionGasEstimatesToTransaction
760
- finalGasPrice = undefined;
761
- finalMaxFeePerGas = undefined;
762
- finalMaxPriorityFeePerGas = undefined;
763
- }
764
744
  let transactionGasFees = {
765
745
  txParams: {
766
746
  gas,
767
747
  gasLimit,
768
- gasPrice: finalGasPrice,
769
- maxPriorityFeePerGas: finalMaxPriorityFeePerGas,
770
- maxFeePerGas: finalMaxFeePerGas,
748
+ gasPrice,
749
+ maxPriorityFeePerGas,
750
+ maxFeePerGas,
771
751
  },
772
752
  defaultGasEstimates,
773
753
  estimateUsed,
@@ -2061,7 +2041,7 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
2061
2041
  (0, logger_1.projectLogger)('Updated simulation data', transactionId, simulationData);
2062
2042
  }, _TransactionController_onGasFeePollerTransactionUpdate = function _TransactionController_onGasFeePollerTransactionUpdate({ transactionId, gasFeeEstimates, gasFeeEstimatesLoaded, layer1GasFee, }) {
2063
2043
  __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_updateTransactionInternal).call(this, { transactionId, skipHistory: true }, (txMeta) => {
2064
- (0, GasFeePoller_1.applyGasFeeEstimatesToTransaction)({
2044
+ (0, GasFeePoller_1.updateTransactionGasFees)({
2065
2045
  txMeta,
2066
2046
  gasFeeEstimates,
2067
2047
  gasFeeEstimatesLoaded,