@exodus/available-assets 8.1.0 → 8.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,19 @@
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
+ ## [8.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/available-assets@8.2.0...@exodus/available-assets@8.2.1) (2024-05-16)
7
+
8
+ ### Bug Fixes
9
+
10
+ - rm available-asset-names-by-wallet-account from available-assets feature ([#6957](https://github.com/ExodusMovement/exodus-hydra/issues/6957)) ([50ceb76](https://github.com/ExodusMovement/exodus-hydra/commit/50ceb761a8d2c9cdac6b45a39767353b59447a4e))
11
+
12
+ ## [8.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/available-assets@8.1.0...@exodus/available-assets@8.2.0) (2024-05-03)
13
+
14
+ ### Features
15
+
16
+ - assetNamesByWalletAccount redux state + selector ([#6778](https://github.com/ExodusMovement/exodus-hydra/issues/6778)) ([1f3cc6f](https://github.com/ExodusMovement/exodus-hydra/commit/1f3cc6fa9d32c6e410187dc7e5a17b651799ba22))
17
+ - available-asset-names-by-wallet-account ([#6777](https://github.com/ExodusMovement/exodus-hydra/issues/6777)) ([be6d8a0](https://github.com/ExodusMovement/exodus-hydra/commit/be6d8a0e1a81bbab37d9f6acf50ea644e39e83b9))
18
+
6
19
  ## [8.1.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/available-assets@8.0.1...@exodus/available-assets@8.1.0) (2024-04-23)
7
20
 
8
21
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/available-assets",
3
- "version": "8.1.0",
3
+ "version": "8.2.1",
4
4
  "description": "Tracks supported/available assets, i.e. assets that the user can potentially enable via the UI",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Exodus Movement, Inc.",
@@ -34,19 +34,21 @@
34
34
  "@exodus/basic-utils": "^2.0.0",
35
35
  "@exodus/core-selectors": "^1.5.0",
36
36
  "@exodus/module": "^1.1.0",
37
+ "@exodus/trezor-meta": "^3.3.6",
37
38
  "lodash": "^4.17.21",
38
39
  "make-concurrent": "^5.3.0",
39
40
  "reselect": "^3.0.1"
40
41
  },
41
42
  "devDependencies": {
42
- "@exodus/assets": "^8.0.95",
43
+ "@exodus/assets": "^9.1.1",
43
44
  "@exodus/assets-base": "^8.1.10",
44
- "@exodus/assets-feature": "^5.1.0",
45
+ "@exodus/assets-feature": "^5.3.1",
45
46
  "@exodus/combined-assets-meta": "^1.2.6-alpha-1",
46
47
  "@exodus/enabled-assets": "^6.0.2",
47
- "@exodus/redux-dependency-injection": "^3.0.0",
48
+ "@exodus/models": "^11.12.0",
49
+ "@exodus/redux-dependency-injection": "^3.1.0",
48
50
  "jest-when": "^3.6.0",
49
51
  "redux": "^4.2.1"
50
52
  },
51
- "gitHead": "34f1dab70f6c2fc0062d946f5c74ae84e5379539"
53
+ "gitHead": "710bc2fb49e1573d8cbe3492bdc87ec927912e6c"
52
54
  }
package/plugins/index.js CHANGED
@@ -1,23 +1,24 @@
1
1
  import { createAtomObserver } from '@exodus/atoms'
2
2
 
3
3
  const createAvailableAssetsPlugin = ({ port, availableAssetNamesAtom, availableAssets }) => {
4
- const availableAssetNamesAtomObserver = createAtomObserver({
5
- port,
6
- atom: availableAssetNamesAtom,
7
- event: 'availableAssetNames',
8
- })
9
- availableAssetNamesAtomObserver.register()
4
+ const observers = [
5
+ createAtomObserver({
6
+ port,
7
+ atom: availableAssetNamesAtom,
8
+ event: 'availableAssetNames',
9
+ }),
10
+ ]
10
11
 
11
12
  const onStart = () => {
12
13
  availableAssets.start()
13
14
  }
14
15
 
15
16
  const onLoad = () => {
16
- availableAssetNamesAtomObserver.start()
17
+ observers.forEach((observer) => observer.start())
17
18
  }
18
19
 
19
20
  const onStop = () => {
20
- availableAssetNamesAtomObserver.unregister()
21
+ observers.forEach((observer) => observer.unregister())
21
22
  availableAssets.stop()
22
23
  }
23
24
 
package/redux/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { mapValues } from '@exodus/basic-utils'
2
+
1
3
  import id from './id'
2
4
  import initialState from './initial-state'
3
5
  import selectorDefinitions from './selectors'
@@ -11,6 +13,13 @@ const availableAssetsReduxDefinition = {
11
13
  ...state,
12
14
  data: new Set(availableAssetNames),
13
15
  }),
16
+ availableAssetNamesByWalletAccount: (state, availableAssetNamesByWalletAccount) => ({
17
+ ...state,
18
+ assetNamesByWalletAccount: mapValues(
19
+ availableAssetNamesByWalletAccount,
20
+ (assetNames) => new Set(assetNames)
21
+ ),
22
+ }),
14
23
  },
15
24
  selectorDefinitions,
16
25
  }
@@ -1,5 +1,6 @@
1
1
  const initialState = {
2
2
  data: new Set(),
3
+ assetNamesByWalletAccount: {},
3
4
  }
4
5
 
5
6
  export default initialState