@pancakeswap/token-lists 0.0.16 → 0.1.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/.turbo/turbo-build.log +12 -12
- package/CHANGELOG.md +19 -0
- package/dist/{chunk-DC45HQOL.mjs → chunk-UUVLERWJ.mjs} +1 -60
- package/dist/{chunk-YOAEDKQH.js → chunk-Y2NTTLTJ.js} +0 -62
- package/dist/index.d.ts +2 -2
- package/dist/index.js +63 -15
- package/dist/index.mjs +62 -1
- package/dist/react.d.ts +32 -9
- package/dist/react.js +223 -88
- package/dist/react.mjs +212 -81
- package/dist/{types-d6730d17.d.ts → types-92a8b029.d.ts} +1 -0
- package/package.json +4 -3
- package/react/actions.ts +11 -0
- package/react/getTokenList.ts +2 -1
- package/react/index.test.ts +3 -0
- package/react/lists.ts +145 -27
- package/react/reducer.ts +34 -53
- package/react/reducerHelpers.ts +111 -0
- package/schema/pancakeswap.json +9 -9
- package/src/types.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pancakeswap/token-lists@0.0
|
|
2
|
+
> @pancakeswap/token-lists@0.1.0 build /home/runner/work/pancake-frontend/pancake-frontend/packages/token-lists
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
CLI Building entry: {"index":"./src/index.ts","react":"./react/index.ts"}
|
|
@@ -9,16 +9,16 @@ CLI Using tsup config: /home/runner/work/pancake-frontend/pancake-frontend/packa
|
|
|
9
9
|
CLI Target: es6
|
|
10
10
|
ESM Build start
|
|
11
11
|
CJS Build start
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
CJS dist/chunk-Y2NTTLTJ.js 2.30 KB
|
|
13
|
+
CJS dist/index.js 2.32 KB
|
|
14
|
+
CJS dist/react.js 29.55 KB
|
|
15
|
+
CJS ⚡️ Build success in 1506ms
|
|
16
|
+
ESM dist/chunk-UUVLERWJ.mjs 2.18 KB
|
|
17
|
+
ESM dist/react.mjs 28.31 KB
|
|
18
|
+
ESM dist/index.mjs 1.95 KB
|
|
19
|
+
ESM ⚡️ Build success in 1506ms
|
|
20
20
|
DTS Build start
|
|
21
|
-
DTS ⚡️ Build success in
|
|
21
|
+
DTS ⚡️ Build success in 14735ms
|
|
22
22
|
DTS dist/index.d.ts 1.68 KB
|
|
23
|
-
DTS dist/react.d.ts
|
|
24
|
-
DTS dist/types-
|
|
23
|
+
DTS dist/react.d.ts 4.21 KB
|
|
24
|
+
DTS dist/types-92a8b029.d.ts 1.06 KB
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @pancakeswap/token-lists
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- ed68c36: merge solana liquidity to evm
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- cecbc32: Add cn symbol/name support
|
|
12
|
+
- Updated dependencies [ed68c36]
|
|
13
|
+
- @pancakeswap/swap-sdk-core@1.6.0
|
|
14
|
+
|
|
15
|
+
## 0.0.17
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [edc65d4]
|
|
20
|
+
- @pancakeswap/swap-sdk-core@1.5.1
|
|
21
|
+
|
|
3
22
|
## 0.0.16
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Token } from '@pancakeswap/swap-sdk-core';
|
|
2
|
-
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
2
|
var __defProps = Object.defineProperties;
|
|
5
3
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -39,43 +37,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
39
37
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
40
38
|
});
|
|
41
39
|
};
|
|
42
|
-
var WrappedTokenInfo = class extends Token {
|
|
43
|
-
constructor(tokenInfo) {
|
|
44
|
-
super(tokenInfo.chainId, tokenInfo.address, tokenInfo.decimals, tokenInfo.symbol, tokenInfo.name);
|
|
45
|
-
this.logoURI = tokenInfo.logoURI;
|
|
46
|
-
}
|
|
47
|
-
get serialize() {
|
|
48
|
-
return {
|
|
49
|
-
address: this.address,
|
|
50
|
-
chainId: this.chainId,
|
|
51
|
-
decimals: this.decimals,
|
|
52
|
-
symbol: this.symbol,
|
|
53
|
-
name: this.name,
|
|
54
|
-
projectLink: this.projectLink,
|
|
55
|
-
logoURI: this.logoURI
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
function deserializeToken(serializedToken) {
|
|
60
|
-
if (serializedToken.logoURI) {
|
|
61
|
-
return new WrappedTokenInfo({
|
|
62
|
-
chainId: serializedToken.chainId,
|
|
63
|
-
address: serializedToken.address,
|
|
64
|
-
decimals: serializedToken.decimals,
|
|
65
|
-
symbol: serializedToken.symbol || "Unknown",
|
|
66
|
-
name: serializedToken.name || "Unknown",
|
|
67
|
-
logoURI: serializedToken.logoURI
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return new Token(
|
|
71
|
-
serializedToken.chainId,
|
|
72
|
-
serializedToken.address,
|
|
73
|
-
serializedToken.decimals,
|
|
74
|
-
serializedToken.symbol,
|
|
75
|
-
serializedToken.name,
|
|
76
|
-
serializedToken.projectLink
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
40
|
|
|
80
41
|
// src/getVersionUpgrade.ts
|
|
81
42
|
var VersionUpgrade = /* @__PURE__ */ ((VersionUpgrade2) => {
|
|
@@ -101,24 +62,4 @@ function getVersionUpgrade(base, update) {
|
|
|
101
62
|
return update.patch > base.patch ? 1 /* PATCH */ : 0 /* NONE */;
|
|
102
63
|
}
|
|
103
64
|
|
|
104
|
-
|
|
105
|
-
function createFilterToken(search, isAddress) {
|
|
106
|
-
if (isAddress(search)) {
|
|
107
|
-
const address = search.toLowerCase();
|
|
108
|
-
return (t) => "address" in t && address === t.address.toLowerCase();
|
|
109
|
-
}
|
|
110
|
-
const lowerSearchParts = search.toLowerCase().split(/\s+/).filter((s) => s.length > 0);
|
|
111
|
-
if (lowerSearchParts.length === 0) {
|
|
112
|
-
return () => true;
|
|
113
|
-
}
|
|
114
|
-
const matchesSearch = (s) => {
|
|
115
|
-
const sParts = s.toLowerCase().split(/\s+/).filter((s_) => s_.length > 0);
|
|
116
|
-
return lowerSearchParts.every((p) => p.length === 0 || sParts.some((sp) => sp.startsWith(p) || sp.endsWith(p)));
|
|
117
|
-
};
|
|
118
|
-
return (token) => {
|
|
119
|
-
const { symbol, name } = token;
|
|
120
|
-
return Boolean(symbol && matchesSearch(symbol) || name && matchesSearch(name));
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export { VersionUpgrade, WrappedTokenInfo, __async, __spreadProps, __spreadValues, createFilterToken, deserializeToken, getVersionUpgrade };
|
|
65
|
+
export { VersionUpgrade, __async, __spreadProps, __spreadValues, getVersionUpgrade };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var swapSdkCore = require('@pancakeswap/swap-sdk-core');
|
|
4
|
-
|
|
5
3
|
var __defProp = Object.defineProperty;
|
|
6
4
|
var __defProps = Object.defineProperties;
|
|
7
5
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -41,43 +39,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
41
39
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
42
40
|
});
|
|
43
41
|
};
|
|
44
|
-
var WrappedTokenInfo = class extends swapSdkCore.Token {
|
|
45
|
-
constructor(tokenInfo) {
|
|
46
|
-
super(tokenInfo.chainId, tokenInfo.address, tokenInfo.decimals, tokenInfo.symbol, tokenInfo.name);
|
|
47
|
-
this.logoURI = tokenInfo.logoURI;
|
|
48
|
-
}
|
|
49
|
-
get serialize() {
|
|
50
|
-
return {
|
|
51
|
-
address: this.address,
|
|
52
|
-
chainId: this.chainId,
|
|
53
|
-
decimals: this.decimals,
|
|
54
|
-
symbol: this.symbol,
|
|
55
|
-
name: this.name,
|
|
56
|
-
projectLink: this.projectLink,
|
|
57
|
-
logoURI: this.logoURI
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
function deserializeToken(serializedToken) {
|
|
62
|
-
if (serializedToken.logoURI) {
|
|
63
|
-
return new WrappedTokenInfo({
|
|
64
|
-
chainId: serializedToken.chainId,
|
|
65
|
-
address: serializedToken.address,
|
|
66
|
-
decimals: serializedToken.decimals,
|
|
67
|
-
symbol: serializedToken.symbol || "Unknown",
|
|
68
|
-
name: serializedToken.name || "Unknown",
|
|
69
|
-
logoURI: serializedToken.logoURI
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
return new swapSdkCore.Token(
|
|
73
|
-
serializedToken.chainId,
|
|
74
|
-
serializedToken.address,
|
|
75
|
-
serializedToken.decimals,
|
|
76
|
-
serializedToken.symbol,
|
|
77
|
-
serializedToken.name,
|
|
78
|
-
serializedToken.projectLink
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
42
|
|
|
82
43
|
// src/getVersionUpgrade.ts
|
|
83
44
|
var VersionUpgrade = /* @__PURE__ */ ((VersionUpgrade2) => {
|
|
@@ -103,31 +64,8 @@ function getVersionUpgrade(base, update) {
|
|
|
103
64
|
return update.patch > base.patch ? 1 /* PATCH */ : 0 /* NONE */;
|
|
104
65
|
}
|
|
105
66
|
|
|
106
|
-
// src/filtering.ts
|
|
107
|
-
function createFilterToken(search, isAddress) {
|
|
108
|
-
if (isAddress(search)) {
|
|
109
|
-
const address = search.toLowerCase();
|
|
110
|
-
return (t) => "address" in t && address === t.address.toLowerCase();
|
|
111
|
-
}
|
|
112
|
-
const lowerSearchParts = search.toLowerCase().split(/\s+/).filter((s) => s.length > 0);
|
|
113
|
-
if (lowerSearchParts.length === 0) {
|
|
114
|
-
return () => true;
|
|
115
|
-
}
|
|
116
|
-
const matchesSearch = (s) => {
|
|
117
|
-
const sParts = s.toLowerCase().split(/\s+/).filter((s_) => s_.length > 0);
|
|
118
|
-
return lowerSearchParts.every((p) => p.length === 0 || sParts.some((sp) => sp.startsWith(p) || sp.endsWith(p)));
|
|
119
|
-
};
|
|
120
|
-
return (token) => {
|
|
121
|
-
const { symbol, name } = token;
|
|
122
|
-
return Boolean(symbol && matchesSearch(symbol) || name && matchesSearch(name));
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
|
|
126
67
|
exports.VersionUpgrade = VersionUpgrade;
|
|
127
|
-
exports.WrappedTokenInfo = WrappedTokenInfo;
|
|
128
68
|
exports.__async = __async;
|
|
129
69
|
exports.__spreadProps = __spreadProps;
|
|
130
70
|
exports.__spreadValues = __spreadValues;
|
|
131
|
-
exports.createFilterToken = createFilterToken;
|
|
132
|
-
exports.deserializeToken = deserializeToken;
|
|
133
71
|
exports.getVersionUpgrade = getVersionUpgrade;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SerializedToken, Token } from '@pancakeswap/swap-sdk-core';
|
|
2
|
-
import { T as TokenInfo, a as TokenList, V as Version } from './types-
|
|
3
|
-
export { b as Tags } from './types-
|
|
2
|
+
import { T as TokenInfo, a as TokenList, V as Version } from './types-92a8b029.js';
|
|
3
|
+
export { b as Tags } from './types-92a8b029.js';
|
|
4
4
|
|
|
5
5
|
interface SerializedWrappedToken extends SerializedToken {
|
|
6
6
|
chainId: number;
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,74 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkY2NTTLTJ_js = require('./chunk-Y2NTTLTJ.js');
|
|
4
|
+
var swapSdkCore = require('@pancakeswap/swap-sdk-core');
|
|
4
5
|
|
|
6
|
+
var WrappedTokenInfo = class extends swapSdkCore.Token {
|
|
7
|
+
constructor(tokenInfo) {
|
|
8
|
+
super(tokenInfo.chainId, tokenInfo.address, tokenInfo.decimals, tokenInfo.symbol, tokenInfo.name);
|
|
9
|
+
this.logoURI = tokenInfo.logoURI;
|
|
10
|
+
}
|
|
11
|
+
get serialize() {
|
|
12
|
+
return {
|
|
13
|
+
address: this.address,
|
|
14
|
+
chainId: this.chainId,
|
|
15
|
+
decimals: this.decimals,
|
|
16
|
+
symbol: this.symbol,
|
|
17
|
+
name: this.name,
|
|
18
|
+
projectLink: this.projectLink,
|
|
19
|
+
logoURI: this.logoURI
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function deserializeToken(serializedToken) {
|
|
24
|
+
if (serializedToken.logoURI) {
|
|
25
|
+
return new WrappedTokenInfo({
|
|
26
|
+
chainId: serializedToken.chainId,
|
|
27
|
+
address: serializedToken.address,
|
|
28
|
+
decimals: serializedToken.decimals,
|
|
29
|
+
symbol: serializedToken.symbol || "Unknown",
|
|
30
|
+
name: serializedToken.name || "Unknown",
|
|
31
|
+
logoURI: serializedToken.logoURI
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return new swapSdkCore.Token(
|
|
35
|
+
serializedToken.chainId,
|
|
36
|
+
serializedToken.address,
|
|
37
|
+
serializedToken.decimals,
|
|
38
|
+
serializedToken.symbol,
|
|
39
|
+
serializedToken.name,
|
|
40
|
+
serializedToken.projectLink
|
|
41
|
+
);
|
|
42
|
+
}
|
|
5
43
|
|
|
44
|
+
// src/filtering.ts
|
|
45
|
+
function createFilterToken(search, isAddress) {
|
|
46
|
+
if (isAddress(search)) {
|
|
47
|
+
const address = search.toLowerCase();
|
|
48
|
+
return (t) => "address" in t && address === t.address.toLowerCase();
|
|
49
|
+
}
|
|
50
|
+
const lowerSearchParts = search.toLowerCase().split(/\s+/).filter((s) => s.length > 0);
|
|
51
|
+
if (lowerSearchParts.length === 0) {
|
|
52
|
+
return () => true;
|
|
53
|
+
}
|
|
54
|
+
const matchesSearch = (s) => {
|
|
55
|
+
const sParts = s.toLowerCase().split(/\s+/).filter((s_) => s_.length > 0);
|
|
56
|
+
return lowerSearchParts.every((p) => p.length === 0 || sParts.some((sp) => sp.startsWith(p) || sp.endsWith(p)));
|
|
57
|
+
};
|
|
58
|
+
return (token) => {
|
|
59
|
+
const { symbol, name } = token;
|
|
60
|
+
return Boolean(symbol && matchesSearch(symbol) || name && matchesSearch(name));
|
|
61
|
+
};
|
|
62
|
+
}
|
|
6
63
|
|
|
7
64
|
Object.defineProperty(exports, 'VersionUpgrade', {
|
|
8
65
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(exports, 'WrappedTokenInfo', {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return chunkYOAEDKQH_js.WrappedTokenInfo; }
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(exports, 'createFilterToken', {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () { return chunkYOAEDKQH_js.createFilterToken; }
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, 'deserializeToken', {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () { return chunkYOAEDKQH_js.deserializeToken; }
|
|
66
|
+
get: function () { return chunkY2NTTLTJ_js.VersionUpgrade; }
|
|
22
67
|
});
|
|
23
68
|
Object.defineProperty(exports, 'getVersionUpgrade', {
|
|
24
69
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkY2NTTLTJ_js.getVersionUpgrade; }
|
|
26
71
|
});
|
|
72
|
+
exports.WrappedTokenInfo = WrappedTokenInfo;
|
|
73
|
+
exports.createFilterToken = createFilterToken;
|
|
74
|
+
exports.deserializeToken = deserializeToken;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,62 @@
|
|
|
1
|
-
export { VersionUpgrade,
|
|
1
|
+
export { VersionUpgrade, getVersionUpgrade } from './chunk-UUVLERWJ.mjs';
|
|
2
|
+
import { Token } from '@pancakeswap/swap-sdk-core';
|
|
3
|
+
|
|
4
|
+
var WrappedTokenInfo = class extends Token {
|
|
5
|
+
constructor(tokenInfo) {
|
|
6
|
+
super(tokenInfo.chainId, tokenInfo.address, tokenInfo.decimals, tokenInfo.symbol, tokenInfo.name);
|
|
7
|
+
this.logoURI = tokenInfo.logoURI;
|
|
8
|
+
}
|
|
9
|
+
get serialize() {
|
|
10
|
+
return {
|
|
11
|
+
address: this.address,
|
|
12
|
+
chainId: this.chainId,
|
|
13
|
+
decimals: this.decimals,
|
|
14
|
+
symbol: this.symbol,
|
|
15
|
+
name: this.name,
|
|
16
|
+
projectLink: this.projectLink,
|
|
17
|
+
logoURI: this.logoURI
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function deserializeToken(serializedToken) {
|
|
22
|
+
if (serializedToken.logoURI) {
|
|
23
|
+
return new WrappedTokenInfo({
|
|
24
|
+
chainId: serializedToken.chainId,
|
|
25
|
+
address: serializedToken.address,
|
|
26
|
+
decimals: serializedToken.decimals,
|
|
27
|
+
symbol: serializedToken.symbol || "Unknown",
|
|
28
|
+
name: serializedToken.name || "Unknown",
|
|
29
|
+
logoURI: serializedToken.logoURI
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return new Token(
|
|
33
|
+
serializedToken.chainId,
|
|
34
|
+
serializedToken.address,
|
|
35
|
+
serializedToken.decimals,
|
|
36
|
+
serializedToken.symbol,
|
|
37
|
+
serializedToken.name,
|
|
38
|
+
serializedToken.projectLink
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// src/filtering.ts
|
|
43
|
+
function createFilterToken(search, isAddress) {
|
|
44
|
+
if (isAddress(search)) {
|
|
45
|
+
const address = search.toLowerCase();
|
|
46
|
+
return (t) => "address" in t && address === t.address.toLowerCase();
|
|
47
|
+
}
|
|
48
|
+
const lowerSearchParts = search.toLowerCase().split(/\s+/).filter((s) => s.length > 0);
|
|
49
|
+
if (lowerSearchParts.length === 0) {
|
|
50
|
+
return () => true;
|
|
51
|
+
}
|
|
52
|
+
const matchesSearch = (s) => {
|
|
53
|
+
const sParts = s.toLowerCase().split(/\s+/).filter((s_) => s_.length > 0);
|
|
54
|
+
return lowerSearchParts.every((p) => p.length === 0 || sParts.some((sp) => sp.startsWith(p) || sp.endsWith(p)));
|
|
55
|
+
};
|
|
56
|
+
return (token) => {
|
|
57
|
+
const { symbol, name } = token;
|
|
58
|
+
return Boolean(symbol && matchesSearch(symbol) || name && matchesSearch(name));
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { WrappedTokenInfo, createFilterToken, deserializeToken };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
2
|
import { ActionCreatorWithPayload } from '@reduxjs/toolkit';
|
|
3
|
-
import { a as TokenList, V as Version } from './types-
|
|
3
|
+
import { a as TokenList, V as Version, T as TokenInfo } from './types-92a8b029.js';
|
|
4
4
|
import * as jotai_vanilla_utils_atomFamily from 'jotai/vanilla/utils/atomFamily';
|
|
5
5
|
import * as jotai from 'jotai';
|
|
6
|
-
import * as src from 'src';
|
|
7
6
|
import * as _reduxjs_toolkit_dist_createReducer from '@reduxjs/toolkit/dist/createReducer';
|
|
8
7
|
|
|
9
8
|
declare const fetchTokenList: Readonly<{
|
|
@@ -29,6 +28,24 @@ declare const disableList: ActionCreatorWithPayload<string, string>;
|
|
|
29
28
|
declare const acceptListUpdate: ActionCreatorWithPayload<string, string>;
|
|
30
29
|
declare const rejectVersionUpdate: ActionCreatorWithPayload<Version, string>;
|
|
31
30
|
declare const updateListVersion: _reduxjs_toolkit.ActionCreatorWithoutPayload<"lists/updateListVersion">;
|
|
31
|
+
declare const batchFetchTokenListPending: ActionCreatorWithPayload<{
|
|
32
|
+
urls: string[];
|
|
33
|
+
requestId: string;
|
|
34
|
+
}, string>;
|
|
35
|
+
declare const batchFetchTokenListFulfilled: ActionCreatorWithPayload<{
|
|
36
|
+
results: Array<{
|
|
37
|
+
url: string;
|
|
38
|
+
tokenList: TokenList;
|
|
39
|
+
requestId: string;
|
|
40
|
+
}>;
|
|
41
|
+
}, string>;
|
|
42
|
+
declare const batchFetchTokenListRejected: ActionCreatorWithPayload<{
|
|
43
|
+
errors: Array<{
|
|
44
|
+
url: string;
|
|
45
|
+
errorMessage: string;
|
|
46
|
+
requestId: string;
|
|
47
|
+
}>;
|
|
48
|
+
}, string>;
|
|
32
49
|
|
|
33
50
|
/**
|
|
34
51
|
* Contains the logic for resolving a list URL to a validated token list
|
|
@@ -52,25 +69,31 @@ type ListByUrlState = ListsState['byUrl'][string];
|
|
|
52
69
|
declare const NEW_LIST_STATE: ListByUrlState;
|
|
53
70
|
declare const createTokenListReducer: (initialState: ListsState, DEFAULT_LIST_OF_LISTS: string[], DEFAULT_ACTIVE_LIST_URLS: string[]) => _reduxjs_toolkit_dist_createReducer.ReducerWithInitialState<ListsState>;
|
|
54
71
|
|
|
55
|
-
declare function findTokenByAddress(state: ListsState, chainId: number, address: string):
|
|
56
|
-
declare function findTokenBySymbol(state: ListsState, chainId: number, symbol: string):
|
|
72
|
+
declare function findTokenByAddress(state: ListsState, chainId: number, address: string): TokenInfo | undefined;
|
|
73
|
+
declare function findTokenBySymbol(state: ListsState, chainId: number, symbol: string): TokenInfo | undefined;
|
|
57
74
|
declare const createListsAtom: (storeName: string, reducer: any, initialState: any) => {
|
|
58
|
-
listsAtom: jotai.
|
|
75
|
+
listsAtom: jotai.Atom<ListsState>;
|
|
76
|
+
updateListStateAtom: jotai.WritableAtom<null, any, void> & {
|
|
77
|
+
init: null;
|
|
78
|
+
};
|
|
59
79
|
tokenAtom: jotai_vanilla_utils_atomFamily.AtomFamily<{
|
|
60
80
|
chainId: number;
|
|
61
81
|
address: string;
|
|
62
|
-
}, jotai.Atom<
|
|
82
|
+
}, jotai.Atom<TokenInfo | undefined>>;
|
|
63
83
|
tokenBySymbolAtom: jotai_vanilla_utils_atomFamily.AtomFamily<{
|
|
64
84
|
chainId: number;
|
|
65
85
|
symbol: string;
|
|
66
|
-
}, jotai.Atom<
|
|
86
|
+
}, jotai.Atom<TokenInfo | undefined>>;
|
|
67
87
|
fetchListAtom: jotai.WritableAtom<null, [string], Promise<void>> & {
|
|
68
88
|
init: null;
|
|
69
89
|
};
|
|
90
|
+
fetchListBatchAtom: jotai.WritableAtom<null, [string[]], Promise<void>> & {
|
|
91
|
+
init: null;
|
|
92
|
+
};
|
|
70
93
|
useListStateReady: () => boolean;
|
|
71
|
-
useListState: () => [ListsState,
|
|
94
|
+
useListState: () => [ListsState, never];
|
|
72
95
|
};
|
|
73
96
|
|
|
74
97
|
declare function useFetchListCallback(dispatch: (action?: unknown) => void): (listUrl: string, sendDispatch?: boolean) => Promise<TokenList>;
|
|
75
98
|
|
|
76
|
-
export { ListByUrlState, ListsState, NEW_LIST_STATE, acceptListUpdate, addList, createListsAtom, createTokenListReducer, disableList, enableList, fetchTokenList, findTokenByAddress, findTokenBySymbol, getTokenList, rejectVersionUpdate, removeList, updateListVersion, useFetchListCallback };
|
|
99
|
+
export { ListByUrlState, ListsState, NEW_LIST_STATE, acceptListUpdate, addList, batchFetchTokenListFulfilled, batchFetchTokenListPending, batchFetchTokenListRejected, createListsAtom, createTokenListReducer, disableList, enableList, fetchTokenList, findTokenByAddress, findTokenBySymbol, getTokenList, rejectVersionUpdate, removeList, updateListVersion, useFetchListCallback };
|