@exodus/assets-feature 1.2.0 → 1.3.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
@@ -3,6 +3,12 @@
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
+ ## [1.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@1.2.0...@exodus/assets-feature@1.3.0) (2023-08-23)
7
+
8
+ ### Features
9
+
10
+ - use assets redux module for assets selectors ([#3558](https://github.com/ExodusMovement/exodus-hydra/issues/3558)) ([4723c81](https://github.com/ExodusMovement/exodus-hydra/commit/4723c81f16d5915748e61ab51570b42bc89764f7))
11
+
6
12
  ## [1.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@1.1.0...@exodus/assets-feature@1.2.0) (2023-08-21)
7
13
 
8
14
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/assets-feature",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Assets module, clients and apis",
6
6
  "main": "index.js",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@exodus/assets": "^8.0.94",
38
- "@exodus/available-assets": "^4.0.0",
38
+ "@exodus/available-assets": "^4.1.0",
39
39
  "@exodus/bitcoin-meta": "^1.0.1",
40
40
  "@exodus/ethereum-meta": "^1.0.30",
41
41
  "@exodus/models": "^9.1.1",
@@ -48,5 +48,5 @@
48
48
  "jest": "^29.1.2",
49
49
  "redux": "^4.0.0"
50
50
  },
51
- "gitHead": "ae415ad730407a51764a46179dd88cc1b1c4c734"
51
+ "gitHead": "8e15dd15e20fe0e90927c2ddc3d045847453e217"
52
52
  }
@@ -37,12 +37,26 @@ const createFeeAssetSelectorDefinition = {
37
37
  dependencies: [{ selector: 'data' }],
38
38
  }
39
39
 
40
+ const getAssetSelectorDefinition = {
41
+ id: 'getAsset',
42
+ resultFunction: (assets) => memoize((assetName) => assets[assetName]),
43
+ dependencies: [{ selector: 'all' }],
44
+ }
45
+
46
+ const getAssetFromTickerSelectorDefinition = {
47
+ id: 'getAssetFromTicker',
48
+ resultFunction: (assets) => memoize((ticker) => assets[ticker]),
49
+ dependencies: [{ selector: 'allByTicker' }],
50
+ }
51
+
40
52
  const assetSelectors = [
41
53
  allAssetsSelectorDefinition,
42
54
  allByTickerSelectorDefinition,
43
55
  createAssetSelectorDefinition,
44
56
  createBaseAssetSelectorDefinition,
45
57
  createFeeAssetSelectorDefinition,
58
+ getAssetSelectorDefinition,
59
+ getAssetFromTickerSelectorDefinition,
46
60
  ]
47
61
 
48
62
  export default assetSelectors