@metamask/transaction-controller 59.0.0 → 59.1.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,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [59.1.0]
11
+
12
+ ### Added
13
+
14
+ - Add `assetsFiatValues` property on `addTransaction` options ([#6178](https://github.com/MetaMask/core/pull/6178))
15
+ - `assetsFiatValues.sending` is total fiat value of sent assets
16
+ - `assetsFiatValues.receiving` is total fiat value of recieved assets
17
+ - Add and export `AddTransactionOptions` type ([#6178](https://github.com/MetaMask/core/pull/6178))
18
+
19
+ ### Fixed
20
+
21
+ - Preserve provided `origin` in `transactions` when calling `addTransactionBatch` ([#6178](https://github.com/MetaMask/core/pull/6178))
22
+
10
23
  ## [59.0.0]
11
24
 
12
25
  ### Added
@@ -19,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
32
 
20
33
  ### Fixed
21
34
 
35
+ - Preserve provided `type` in `transactions` when calling `addTransactionBatch` ([#6056](https://github.com/MetaMask/core/pull/6056))
22
36
  - Normalize transaction `data` to ensure case-insensitive detection ([#6102](https://github.com/MetaMask/core/pull/6102))
23
37
 
24
38
  ## [58.1.1]
@@ -1731,7 +1745,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1731
1745
 
1732
1746
  All changes listed after this point were applied to this package following the monorepo conversion.
1733
1747
 
1734
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.0.0...HEAD
1748
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.1.0...HEAD
1749
+ [59.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@59.0.0...@metamask/transaction-controller@59.1.0
1735
1750
  [59.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@58.1.1...@metamask/transaction-controller@59.0.0
1736
1751
  [58.1.1]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@58.1.0...@metamask/transaction-controller@58.1.1
1737
1752
  [58.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@58.0.0...@metamask/transaction-controller@58.1.0
@@ -360,6 +360,7 @@ class TransactionController extends base_controller_1.BaseController {
360
360
  * @param txParams - Standard parameters for an Ethereum transaction.
361
361
  * @param options - Additional options to control how the transaction is added.
362
362
  * @param options.actionId - Unique ID to prevent duplicate requests.
363
+ * @param options.assetsFiatValues - The fiat values of the assets being sent and received.
363
364
  * @param options.batchId - A custom ID for the batch this transaction belongs to.
364
365
  * @param options.deviceConfirmedOn - An enum to indicate what device confirmed the transaction.
365
366
  * @param options.disableGasBuffer - Whether to disable the gas estimation buffer.
@@ -380,7 +381,7 @@ class TransactionController extends base_controller_1.BaseController {
380
381
  */
381
382
  async addTransaction(txParams, options) {
382
383
  (0, logger_1.projectLogger)('Adding transaction', txParams, options);
383
- const { actionId, batchId, deviceConfirmedOn, disableGasBuffer, method, nestedTransactions, networkClientId, origin, publishHook, requireApproval, securityAlertResponse, sendFlowHistory, swaps = {}, traceContext, type, } = options;
384
+ const { actionId, assetsFiatValues, batchId, deviceConfirmedOn, disableGasBuffer, method, nestedTransactions, networkClientId, origin, publishHook, requireApproval, securityAlertResponse, sendFlowHistory, swaps = {}, traceContext, type, } = options;
384
385
  txParams = (0, utils_2.normalizeTransactionParams)(txParams);
385
386
  if (!__classPrivateFieldGet(this, _TransactionController_multichainTrackingHelper, "f").has(networkClientId)) {
386
387
  throw new Error(`Network client not found - ${networkClientId}`);
@@ -424,6 +425,7 @@ class TransactionController extends base_controller_1.BaseController {
424
425
  : {
425
426
  // Add actionId to txMeta to check if same actionId is seen again
426
427
  actionId,
428
+ assetsFiatValues,
427
429
  batchId,
428
430
  chainId,
429
431
  dappSuggestedGasFees,