@exodus/ui-config 3.6.0 → 3.6.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,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
+ ## [3.6.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/ui-config@3.6.0...@exodus/ui-config@3.6.1) (2024-04-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - uiConfig loaded mechanism uses Set ([#6579](https://github.com/ExodusMovement/exodus-hydra/issues/6579)) ([1241a2f](https://github.com/ExodusMovement/exodus-hydra/commit/1241a2fd5ee9199ad201514be3d81f9abea22230))
11
+
6
12
  ## [3.6.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/ui-config@3.5.0...@exodus/ui-config@3.6.0) (2024-04-18)
7
13
 
8
14
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ui-config",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "Helper for storing various UI-specific settings/config.",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "license": "UNLICENSED",
@@ -39,5 +39,5 @@
39
39
  "@exodus/redux-dependency-injection": "^3.0.0",
40
40
  "redux": "^4.2.1"
41
41
  },
42
- "gitHead": "6ee757518ab5eaf635372a8a137f56518578a227"
42
+ "gitHead": "0854ba86c26c63d2a84b766c716cf37874427713"
43
43
  }
package/redux/index.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import id from './id'
2
2
 
3
- let count = 0
4
-
5
3
  const createUiConfigReduxDefinition = (config) => {
4
+ const loadedIds = new Set()
6
5
  const configValues = Object.values(config)
7
6
 
8
7
  const initialState = {
@@ -14,11 +13,11 @@ const createUiConfigReduxDefinition = (config) => {
14
13
  configValues.map(({ id }) => [
15
14
  id,
16
15
  (state, payload) => {
17
- count++
16
+ loadedIds.add(id)
18
17
  return {
19
18
  ...state,
20
19
  [id]: payload,
21
- loaded: count === configValues.length,
20
+ loaded: loadedIds.size >= configValues.length,
22
21
  }
23
22
  },
24
23
  ])