@metamask/transaction-controller 59.2.0 → 60.0.0

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,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [60.0.0]
11
+
12
+ ### Added
13
+
14
+ - Add `isGasFeeSponsored` property to `TransactionMeta` type ([#6244](https://github.com/MetaMask/core/pull/6244))
15
+
16
+ ### Changed
17
+
18
+ - **BREAKING:** Bump peer dependency `@metamask/accounts-controller` from `^32.0.0` to `^33.0.0` ([#6345](https://github.com/MetaMask/core/pull/6345))
19
+ - Bump `@metamask/controller-utils` from `^11.11.0` to `^11.12.0` ([#6303](https://github.com/MetaMask/core/pull/6303))
20
+
10
21
  ## [59.2.0]
11
22
 
12
23
  ### Added
@@ -1756,7 +1767,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1756
1767
 
1757
1768
  All changes listed after this point were applied to this package following the monorepo conversion.
1758
1769
 
1759
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.2.0...HEAD
1770
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@60.0.0...HEAD
1771
+ [60.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.2.0...@metamask/transaction-controller@60.0.0
1760
1772
  [59.2.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.1.0...@metamask/transaction-controller@59.2.0
1761
1773
  [59.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.0.0...@metamask/transaction-controller@59.1.0
1762
1774
  [59.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@58.1.1...@metamask/transaction-controller@59.0.0
@@ -2100,6 +2100,7 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
2100
2100
  tokenBalanceChanges: [],
2101
2101
  };
2102
2102
  let gasFeeTokens = [];
2103
+ let isGasFeeSponsored = false;
2103
2104
  const isBalanceChangesSkipped = __classPrivateFieldGet(this, _TransactionController_skipSimulationTransactionIds, "f").has(transactionId);
2104
2105
  if (__classPrivateFieldGet(this, _TransactionController_isSimulationEnabled, "f").call(this) && !isBalanceChangesSkipped) {
2105
2106
  simulationData = await __classPrivateFieldGet(this, _TransactionController_trace, "f").call(this, { name: 'Simulate', parentContext: traceContext }, () => (0, balance_changes_1.getBalanceChanges)({
@@ -2117,13 +2118,15 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
2117
2118
  isUpdatedAfterSecurityCheck: true,
2118
2119
  };
2119
2120
  }
2120
- gasFeeTokens = await (0, gas_fee_tokens_1.getGasFeeTokens)({
2121
+ const gasFeeTokensResponse = await (0, gas_fee_tokens_1.getGasFeeTokens)({
2121
2122
  chainId,
2122
2123
  isEIP7702GasFeeTokensEnabled: __classPrivateFieldGet(this, _TransactionController_isEIP7702GasFeeTokensEnabled, "f"),
2123
2124
  messenger: this.messagingSystem,
2124
2125
  publicKeyEIP7702: __classPrivateFieldGet(this, _TransactionController_publicKeyEIP7702, "f"),
2125
2126
  transactionMeta,
2126
2127
  });
2128
+ gasFeeTokens = gasFeeTokensResponse?.gasFeeTokens ?? [];
2129
+ isGasFeeSponsored = gasFeeTokensResponse?.isGasFeeSponsored ?? false;
2127
2130
  }
2128
2131
  const latestTransactionMeta = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getTransaction).call(this, transactionId);
2129
2132
  /* istanbul ignore if */
@@ -2137,6 +2140,7 @@ async function _TransactionController_approveTransaction(transactionId, traceCon
2137
2140
  skipResimulateCheck: Boolean(blockTime),
2138
2141
  }, (txMeta) => {
2139
2142
  txMeta.gasFeeTokens = gasFeeTokens;
2143
+ txMeta.isGasFeeSponsored = isGasFeeSponsored;
2140
2144
  if (!isBalanceChangesSkipped) {
2141
2145
  txMeta.simulationData = simulationData;
2142
2146
  }