@exodus/fiat-balances 13.1.1 → 13.2.1

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
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [13.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@13.2.0...@exodus/fiat-balances@13.2.1) (2025-03-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - fix: pass optimistic fiat balances config on node (#11756)
11
+
12
+ ## [13.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@13.1.1...@exodus/fiat-balances@13.2.0) (2025-03-04)
13
+
14
+ ### Features
15
+
16
+ - feat: add `createConversions` selector (#11655)
17
+
6
18
  ## [13.1.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/fiat-balances@13.1.0...@exodus/fiat-balances@13.1.1) (2025-02-21)
7
19
 
8
20
  ### Bug Fixes
package/index.js CHANGED
@@ -51,9 +51,9 @@ const fiatBalances = (config = Object.create(null)) => {
51
51
  definition: {
52
52
  ...fiatBalancesDefinition,
53
53
  id: 'optimisticFiatBalances',
54
- config: {
55
- balanceFields,
56
- },
54
+ },
55
+ config: {
56
+ balanceFields,
57
57
  },
58
58
  aliases: [
59
59
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/fiat-balances",
3
- "version": "13.1.1",
3
+ "version": "13.2.1",
4
4
  "description": "Track asset and portfolio fiat balances based on changes in crypto balances and the user's preferred fiat currency",
5
5
  "author": "Exodus Movement, Inc.",
6
6
  "license": "MIT",
@@ -47,23 +47,23 @@
47
47
  "@exodus/assets-base": "^8.1.17",
48
48
  "@exodus/assets-feature": "^7.0.2",
49
49
  "@exodus/available-assets": "^8.7.0",
50
- "@exodus/balances": "^13.6.2",
51
- "@exodus/blockchain-metadata": "^15.8.5",
50
+ "@exodus/balances": "^13.7.1",
51
+ "@exodus/blockchain-metadata": "^15.9.1",
52
52
  "@exodus/combined-assets-meta": "^1.3.0",
53
- "@exodus/enabled-assets": "^10.8.3",
53
+ "@exodus/enabled-assets": "^10.9.1",
54
54
  "@exodus/favorite-assets": "^2.5.0",
55
55
  "@exodus/fee-data-monitors": "^5.0.4",
56
- "@exodus/models": "^12.7.0",
57
- "@exodus/rates-monitor": "^4.8.4",
56
+ "@exodus/models": "^12.8.1",
57
+ "@exodus/rates-monitor": "^4.9.1",
58
58
  "@exodus/redux-dependency-injection": "^4.1.1",
59
59
  "@exodus/solana-meta": "^1.0.4",
60
60
  "@exodus/storage-memory": "^2.2.2",
61
- "@exodus/wallet-accounts": "^17.3.1",
61
+ "@exodus/wallet-accounts": "^17.4.0",
62
62
  "events": "^3.3.0",
63
63
  "redux": "^4.2.1"
64
64
  },
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "7f7ccf5ba141c8c392a34e2004247658d2bf9c73"
68
+ "gitHead": "1fb48d23119fd45dd450a2d52b31dae958671d86"
69
69
  }
@@ -0,0 +1,24 @@
1
+ import { getCreateConversion } from '../../shared/get-create-conversion.js'
2
+ import { mapValues, memoize } from '@exodus/basic-utils'
3
+ import currencies from '@exodus/fiat-currencies'
4
+ import { createSelector } from 'reselect'
5
+
6
+ const selectorFactory = (assetsSelector, ratesSelector) =>
7
+ memoize((fiatTicker) =>
8
+ createSelector(assetsSelector, ratesSelector, (assets, rates) => {
9
+ const createConversion = getCreateConversion(currencies[fiatTicker], rates[fiatTicker])
10
+ return mapValues(assets, (asset) => createConversion(asset))
11
+ })
12
+ )
13
+
14
+ const createConversionsSelectorDefinition = {
15
+ id: 'createConversions',
16
+ selectorFactory,
17
+ dependencies: [
18
+ //
19
+ { module: 'assets', selector: 'all' },
20
+ { module: 'rates', selector: 'data' },
21
+ ],
22
+ }
23
+
24
+ export default createConversionsSelectorDefinition
@@ -29,6 +29,7 @@ import sortedEnabledAssetsWithTotalBalanceSelector from './sorted-assets/enabled
29
29
  import sortedEnabledAssetsWithParentCombinedWithBalanceInActiveAccountSelectorDefinition from './sorted-assets/enabled/with-parent-combined-with-balance-in-active-account'
30
30
  import conversionsSelector from './conversions.js'
31
31
  import createConversionSelector from './create-conversion.js'
32
+ import createConversionsSelector from './create-conversions.js'
32
33
  import createAssetConversion from './create-asset-conversion'
33
34
  import createAssetConversionUsd from './create-asset-conversion-usd'
34
35
  import createSortOptimisticAssetsSelectorFactoryDefinition from './sorted-optimistic-assets/create-sort-assets-selector-factory'
@@ -72,6 +73,7 @@ export default function createSelectorDefinitions(config) {
72
73
  getFormatFiatSelector,
73
74
  conversionsSelector,
74
75
  createConversionSelector,
76
+ createConversionsSelector,
75
77
  createAssetConversion,
76
78
  createAssetConversionUsd,
77
79
  createSortOptimisticAssetsSelectorFactoryDefinition(config),