@pancakeswap/token-lists 0.0.3 → 0.0.4

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.
@@ -8,15 +8,15 @@ $ tsup
8
8
  ESM Build start
9
9
  CJS Build start
10
10
  ESM dist/index.mjs 208.00 B
11
- ESM dist/react.mjs 8.15 KB
11
+ ESM dist/react.mjs 8.17 KB
12
12
  ESM dist/chunk-YBVZDUCZ.mjs 1.92 KB
13
13
  ESM dist/getTokenList-T45DK2AY.mjs 13.04 KB
14
- ESM ⚡️ Build success in 175ms
14
+ ESM ⚡️ Build success in 118ms
15
15
  CJS dist/index.js 3.11 KB
16
- CJS dist/react.js 25.72 KB
17
- CJS ⚡️ Build success in 173ms
16
+ CJS dist/react.js 25.75 KB
17
+ CJS ⚡️ Build success in 116ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 13296ms
19
+ DTS ⚡️ Build success in 9485ms
20
20
  DTS dist/index.d.ts 1.54 KB
21
21
  DTS dist/react.d.ts 2.51 KB
22
22
  DTS dist/types-b620c9be.d.ts 1.03 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @pancakeswap/token-lists
2
2
 
3
+ ## 0.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 5dda2c74f: Fix duplicate active list url issue
8
+
3
9
  ## 0.0.3
4
10
 
5
11
  ### Patch Changes
package/dist/react.js CHANGED
@@ -571,7 +571,7 @@ var createTokenListReducer = (initialState, DEFAULT_LIST_OF_LISTS, DEFAULT_ACTIV
571
571
  error: null
572
572
  };
573
573
  }).addCase(fetchTokenList.fulfilled, (state, { payload: { requestId, tokenList, url } }) => {
574
- var _a, _b, _c;
574
+ var _a, _b;
575
575
  const current = (_a = state.byUrl[url]) == null ? void 0 : _a.current;
576
576
  const loadingRequestId = (_b = state.byUrl[url]) == null ? void 0 : _b.loadingRequestId;
577
577
  if (current) {
@@ -588,8 +588,8 @@ var createTokenListReducer = (initialState, DEFAULT_LIST_OF_LISTS, DEFAULT_ACTIV
588
588
  };
589
589
  }
590
590
  } else {
591
- if (DEFAULT_ACTIVE_LIST_URLS.includes(url)) {
592
- (_c = state.activeListUrls) == null ? void 0 : _c.push(url);
591
+ if (DEFAULT_ACTIVE_LIST_URLS.includes(url) && state.activeListUrls && !state.activeListUrls.includes(url)) {
592
+ state.activeListUrls.push(url);
593
593
  }
594
594
  state.byUrl[url] = {
595
595
  ...state.byUrl[url],
package/dist/react.mjs CHANGED
@@ -40,7 +40,7 @@ var createTokenListReducer = (initialState, DEFAULT_LIST_OF_LISTS, DEFAULT_ACTIV
40
40
  error: null
41
41
  };
42
42
  }).addCase(fetchTokenList.fulfilled, (state, { payload: { requestId, tokenList, url } }) => {
43
- var _a, _b, _c;
43
+ var _a, _b;
44
44
  const current = (_a = state.byUrl[url]) == null ? void 0 : _a.current;
45
45
  const loadingRequestId = (_b = state.byUrl[url]) == null ? void 0 : _b.loadingRequestId;
46
46
  if (current) {
@@ -57,8 +57,8 @@ var createTokenListReducer = (initialState, DEFAULT_LIST_OF_LISTS, DEFAULT_ACTIV
57
57
  };
58
58
  }
59
59
  } else {
60
- if (DEFAULT_ACTIVE_LIST_URLS.includes(url)) {
61
- (_c = state.activeListUrls) == null ? void 0 : _c.push(url);
60
+ if (DEFAULT_ACTIVE_LIST_URLS.includes(url) && state.activeListUrls && !state.activeListUrls.includes(url)) {
61
+ state.activeListUrls.push(url);
62
62
  }
63
63
  state.byUrl[url] = {
64
64
  ...state.byUrl[url],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pancakeswap/token-lists",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "sideEffects": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -17,13 +17,13 @@
17
17
  "@pancakeswap/swap-sdk-core": "*"
18
18
  },
19
19
  "peerDependencies": {
20
- "@reduxjs/toolkit": "^1.8.6",
20
+ "@reduxjs/toolkit": "^1.9.1",
21
21
  "localforage": "^1.10.0",
22
- "jotai": "^1.8.6",
22
+ "jotai": "^1.11.1",
23
23
  "react": "^18.2.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@reduxjs/toolkit": "^1.8.6",
26
+ "@reduxjs/toolkit": "^1.9.1",
27
27
  "react": "^18.2.0"
28
28
  },
29
29
  "exports": {
package/react/reducer.ts CHANGED
@@ -74,8 +74,8 @@ export const createTokenListReducer = (
74
74
  }
75
75
  } else {
76
76
  // activate if on default active
77
- if (DEFAULT_ACTIVE_LIST_URLS.includes(url)) {
78
- state.activeListUrls?.push(url)
77
+ if (DEFAULT_ACTIVE_LIST_URLS.includes(url) && state.activeListUrls && !state.activeListUrls.includes(url)) {
78
+ state.activeListUrls.push(url)
79
79
  }
80
80
 
81
81
  state.byUrl[url] = {