@dodoex/widgets 3.0.2-zetachain.66 → 3.0.2-zetachain.68
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/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-DEwixHKL.js → helper-3t8-4Syo.js} +1 -1
- package/dist/{helper-gAcilzSP.cjs → helper-iLZJGH72.cjs} +1 -1
- package/dist/index-BKqxRHXN.cjs +31 -0
- package/dist/{index-CWdtJLrZ.cjs → index-C05qWPdC.cjs} +1 -1
- package/dist/index-C3KCtLGo.js +31 -0
- package/dist/{index-BrGDxVVy.js → index-CXcyUdz-.js} +1 -1
- package/dist/{index-Ctl1ZVSq.js → index-DTcgxAi1.js} +1 -1
- package/dist/{index-6I0PA0zd.cjs → index-Dszox7R7.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/hooks.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/index.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/TokenPairSelect.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePoolTickData.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3DerivedMintInfo.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/curve/AllPools.d.ts +3 -4
- package/dist/types/widgets/PoolWidget/curve/components/FilterAddressTags.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/LiquidityProvidersTable.d.ts +4 -3
- package/dist/types/widgets/PoolWidget/curve/components/SwapsTable.d.ts +6 -5
- package/dist/types/widgets/PoolWidget/curve/components/TokenListPoolItem.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/useLiquidityProviders.d.ts +262 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolDetail.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolListFilterTokenAndPool.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolSwapList.d.ts +298 -0
- package/dist/types/widgets/PoolWidget/curve/types.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/curve/utils.d.ts +2 -2
- package/package.json +2 -2
- package/dist/index-Dj5Qez4C.cjs +0 -31
- package/dist/index-Dqy2oEgI.js +0 -31
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
export declare function useLiquidityProviders({ chainId, address, }: {
|
|
2
|
+
chainId: number | undefined;
|
|
3
|
+
address: string | undefined;
|
|
4
|
+
}): {
|
|
5
|
+
list: {
|
|
6
|
+
id: string;
|
|
7
|
+
time: any;
|
|
8
|
+
user: string;
|
|
9
|
+
action: string;
|
|
10
|
+
assets?: Array<{
|
|
11
|
+
amount: any;
|
|
12
|
+
token: {
|
|
13
|
+
id: string;
|
|
14
|
+
address: string;
|
|
15
|
+
name: string;
|
|
16
|
+
symbol: string;
|
|
17
|
+
decimals: number;
|
|
18
|
+
logoImg?: string | null;
|
|
19
|
+
};
|
|
20
|
+
}> | null;
|
|
21
|
+
}[] | null | undefined;
|
|
22
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery;
|
|
23
|
+
error: Error;
|
|
24
|
+
isError: true;
|
|
25
|
+
isPending: false;
|
|
26
|
+
isLoading: false;
|
|
27
|
+
isLoadingError: false;
|
|
28
|
+
isRefetchError: true;
|
|
29
|
+
isSuccess: false;
|
|
30
|
+
isPlaceholderData: false;
|
|
31
|
+
status: "error";
|
|
32
|
+
dataUpdatedAt: number;
|
|
33
|
+
errorUpdatedAt: number;
|
|
34
|
+
failureCount: number;
|
|
35
|
+
failureReason: Error | null;
|
|
36
|
+
errorUpdateCount: number;
|
|
37
|
+
isFetched: boolean;
|
|
38
|
+
isFetchedAfterMount: boolean;
|
|
39
|
+
isFetching: boolean;
|
|
40
|
+
isInitialLoading: boolean;
|
|
41
|
+
isPaused: boolean;
|
|
42
|
+
isRefetching: boolean;
|
|
43
|
+
isStale: boolean;
|
|
44
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
45
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
46
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
47
|
+
} | {
|
|
48
|
+
list: {
|
|
49
|
+
id: string;
|
|
50
|
+
time: any;
|
|
51
|
+
user: string;
|
|
52
|
+
action: string;
|
|
53
|
+
assets?: Array<{
|
|
54
|
+
amount: any;
|
|
55
|
+
token: {
|
|
56
|
+
id: string;
|
|
57
|
+
address: string;
|
|
58
|
+
name: string;
|
|
59
|
+
symbol: string;
|
|
60
|
+
decimals: number;
|
|
61
|
+
logoImg?: string | null;
|
|
62
|
+
};
|
|
63
|
+
}> | null;
|
|
64
|
+
}[] | null | undefined;
|
|
65
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery;
|
|
66
|
+
error: null;
|
|
67
|
+
isError: false;
|
|
68
|
+
isPending: false;
|
|
69
|
+
isLoading: false;
|
|
70
|
+
isLoadingError: false;
|
|
71
|
+
isRefetchError: false;
|
|
72
|
+
isSuccess: true;
|
|
73
|
+
isPlaceholderData: false;
|
|
74
|
+
status: "success";
|
|
75
|
+
dataUpdatedAt: number;
|
|
76
|
+
errorUpdatedAt: number;
|
|
77
|
+
failureCount: number;
|
|
78
|
+
failureReason: Error | null;
|
|
79
|
+
errorUpdateCount: number;
|
|
80
|
+
isFetched: boolean;
|
|
81
|
+
isFetchedAfterMount: boolean;
|
|
82
|
+
isFetching: boolean;
|
|
83
|
+
isInitialLoading: boolean;
|
|
84
|
+
isPaused: boolean;
|
|
85
|
+
isRefetching: boolean;
|
|
86
|
+
isStale: boolean;
|
|
87
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
88
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
89
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
90
|
+
} | {
|
|
91
|
+
list: {
|
|
92
|
+
id: string;
|
|
93
|
+
time: any;
|
|
94
|
+
user: string;
|
|
95
|
+
action: string;
|
|
96
|
+
assets?: Array<{
|
|
97
|
+
amount: any;
|
|
98
|
+
token: {
|
|
99
|
+
id: string;
|
|
100
|
+
address: string;
|
|
101
|
+
name: string;
|
|
102
|
+
symbol: string;
|
|
103
|
+
decimals: number;
|
|
104
|
+
logoImg?: string | null;
|
|
105
|
+
};
|
|
106
|
+
}> | null;
|
|
107
|
+
}[] | null | undefined;
|
|
108
|
+
data: undefined;
|
|
109
|
+
error: Error;
|
|
110
|
+
isError: true;
|
|
111
|
+
isPending: false;
|
|
112
|
+
isLoading: false;
|
|
113
|
+
isLoadingError: true;
|
|
114
|
+
isRefetchError: false;
|
|
115
|
+
isSuccess: false;
|
|
116
|
+
isPlaceholderData: false;
|
|
117
|
+
status: "error";
|
|
118
|
+
dataUpdatedAt: number;
|
|
119
|
+
errorUpdatedAt: number;
|
|
120
|
+
failureCount: number;
|
|
121
|
+
failureReason: Error | null;
|
|
122
|
+
errorUpdateCount: number;
|
|
123
|
+
isFetched: boolean;
|
|
124
|
+
isFetchedAfterMount: boolean;
|
|
125
|
+
isFetching: boolean;
|
|
126
|
+
isInitialLoading: boolean;
|
|
127
|
+
isPaused: boolean;
|
|
128
|
+
isRefetching: boolean;
|
|
129
|
+
isStale: boolean;
|
|
130
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
131
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
132
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
133
|
+
} | {
|
|
134
|
+
list: {
|
|
135
|
+
id: string;
|
|
136
|
+
time: any;
|
|
137
|
+
user: string;
|
|
138
|
+
action: string;
|
|
139
|
+
assets?: Array<{
|
|
140
|
+
amount: any;
|
|
141
|
+
token: {
|
|
142
|
+
id: string;
|
|
143
|
+
address: string;
|
|
144
|
+
name: string;
|
|
145
|
+
symbol: string;
|
|
146
|
+
decimals: number;
|
|
147
|
+
logoImg?: string | null;
|
|
148
|
+
};
|
|
149
|
+
}> | null;
|
|
150
|
+
}[] | null | undefined;
|
|
151
|
+
data: undefined;
|
|
152
|
+
error: null;
|
|
153
|
+
isError: false;
|
|
154
|
+
isPending: true;
|
|
155
|
+
isLoading: true;
|
|
156
|
+
isLoadingError: false;
|
|
157
|
+
isRefetchError: false;
|
|
158
|
+
isSuccess: false;
|
|
159
|
+
isPlaceholderData: false;
|
|
160
|
+
status: "pending";
|
|
161
|
+
dataUpdatedAt: number;
|
|
162
|
+
errorUpdatedAt: number;
|
|
163
|
+
failureCount: number;
|
|
164
|
+
failureReason: Error | null;
|
|
165
|
+
errorUpdateCount: number;
|
|
166
|
+
isFetched: boolean;
|
|
167
|
+
isFetchedAfterMount: boolean;
|
|
168
|
+
isFetching: boolean;
|
|
169
|
+
isInitialLoading: boolean;
|
|
170
|
+
isPaused: boolean;
|
|
171
|
+
isRefetching: boolean;
|
|
172
|
+
isStale: boolean;
|
|
173
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
174
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
175
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
176
|
+
} | {
|
|
177
|
+
list: {
|
|
178
|
+
id: string;
|
|
179
|
+
time: any;
|
|
180
|
+
user: string;
|
|
181
|
+
action: string;
|
|
182
|
+
assets?: Array<{
|
|
183
|
+
amount: any;
|
|
184
|
+
token: {
|
|
185
|
+
id: string;
|
|
186
|
+
address: string;
|
|
187
|
+
name: string;
|
|
188
|
+
symbol: string;
|
|
189
|
+
decimals: number;
|
|
190
|
+
logoImg?: string | null;
|
|
191
|
+
};
|
|
192
|
+
}> | null;
|
|
193
|
+
}[] | null | undefined;
|
|
194
|
+
data: undefined;
|
|
195
|
+
error: null;
|
|
196
|
+
isError: false;
|
|
197
|
+
isPending: true;
|
|
198
|
+
isLoadingError: false;
|
|
199
|
+
isRefetchError: false;
|
|
200
|
+
isSuccess: false;
|
|
201
|
+
isPlaceholderData: false;
|
|
202
|
+
status: "pending";
|
|
203
|
+
dataUpdatedAt: number;
|
|
204
|
+
errorUpdatedAt: number;
|
|
205
|
+
failureCount: number;
|
|
206
|
+
failureReason: Error | null;
|
|
207
|
+
errorUpdateCount: number;
|
|
208
|
+
isFetched: boolean;
|
|
209
|
+
isFetchedAfterMount: boolean;
|
|
210
|
+
isFetching: boolean;
|
|
211
|
+
isLoading: boolean;
|
|
212
|
+
isInitialLoading: boolean;
|
|
213
|
+
isPaused: boolean;
|
|
214
|
+
isRefetching: boolean;
|
|
215
|
+
isStale: boolean;
|
|
216
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
217
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
218
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
219
|
+
} | {
|
|
220
|
+
list: {
|
|
221
|
+
id: string;
|
|
222
|
+
time: any;
|
|
223
|
+
user: string;
|
|
224
|
+
action: string;
|
|
225
|
+
assets?: Array<{
|
|
226
|
+
amount: any;
|
|
227
|
+
token: {
|
|
228
|
+
id: string;
|
|
229
|
+
address: string;
|
|
230
|
+
name: string;
|
|
231
|
+
symbol: string;
|
|
232
|
+
decimals: number;
|
|
233
|
+
logoImg?: string | null;
|
|
234
|
+
};
|
|
235
|
+
}> | null;
|
|
236
|
+
}[] | null | undefined;
|
|
237
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery;
|
|
238
|
+
isError: false;
|
|
239
|
+
error: null;
|
|
240
|
+
isPending: false;
|
|
241
|
+
isLoading: false;
|
|
242
|
+
isLoadingError: false;
|
|
243
|
+
isRefetchError: false;
|
|
244
|
+
isSuccess: true;
|
|
245
|
+
isPlaceholderData: true;
|
|
246
|
+
status: "success";
|
|
247
|
+
dataUpdatedAt: number;
|
|
248
|
+
errorUpdatedAt: number;
|
|
249
|
+
failureCount: number;
|
|
250
|
+
failureReason: Error | null;
|
|
251
|
+
errorUpdateCount: number;
|
|
252
|
+
isFetched: boolean;
|
|
253
|
+
isFetchedAfterMount: boolean;
|
|
254
|
+
isFetching: boolean;
|
|
255
|
+
isInitialLoading: boolean;
|
|
256
|
+
isPaused: boolean;
|
|
257
|
+
isRefetching: boolean;
|
|
258
|
+
isStale: boolean;
|
|
259
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
260
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
261
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
262
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
import { CurvePoolT } from '../types';
|
|
3
|
+
export declare function usePoolListFilterTokenAndPool(): {
|
|
4
|
+
filterTokens: TokenInfo[];
|
|
5
|
+
filterAddressLqList: CurvePoolT[];
|
|
6
|
+
handleDeleteToken: (token: TokenInfo) => void;
|
|
7
|
+
handleChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
|
|
8
|
+
handleChangeFilterAddress: (lqList: CurvePoolT[]) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
export declare function usePoolSwapList({ chainId, address, }: {
|
|
2
|
+
chainId: number | undefined;
|
|
3
|
+
address: string | undefined;
|
|
4
|
+
}): {
|
|
5
|
+
swapList: {
|
|
6
|
+
id: string;
|
|
7
|
+
time: any;
|
|
8
|
+
user: string;
|
|
9
|
+
paidAmount: any;
|
|
10
|
+
receivedAmount: any;
|
|
11
|
+
paidToken: {
|
|
12
|
+
id: string;
|
|
13
|
+
address: string;
|
|
14
|
+
name: string;
|
|
15
|
+
symbol: string;
|
|
16
|
+
decimals: number;
|
|
17
|
+
logoImg?: string | null;
|
|
18
|
+
};
|
|
19
|
+
receivedToken: {
|
|
20
|
+
id: string;
|
|
21
|
+
address: string;
|
|
22
|
+
name: string;
|
|
23
|
+
symbol: string;
|
|
24
|
+
decimals: number;
|
|
25
|
+
logoImg?: string | null;
|
|
26
|
+
};
|
|
27
|
+
}[] | null | undefined;
|
|
28
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery;
|
|
29
|
+
error: Error;
|
|
30
|
+
isError: true;
|
|
31
|
+
isPending: false;
|
|
32
|
+
isLoading: false;
|
|
33
|
+
isLoadingError: false;
|
|
34
|
+
isRefetchError: true;
|
|
35
|
+
isSuccess: false;
|
|
36
|
+
isPlaceholderData: false;
|
|
37
|
+
status: "error";
|
|
38
|
+
dataUpdatedAt: number;
|
|
39
|
+
errorUpdatedAt: number;
|
|
40
|
+
failureCount: number;
|
|
41
|
+
failureReason: Error | null;
|
|
42
|
+
errorUpdateCount: number;
|
|
43
|
+
isFetched: boolean;
|
|
44
|
+
isFetchedAfterMount: boolean;
|
|
45
|
+
isFetching: boolean;
|
|
46
|
+
isInitialLoading: boolean;
|
|
47
|
+
isPaused: boolean;
|
|
48
|
+
isRefetching: boolean;
|
|
49
|
+
isStale: boolean;
|
|
50
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery, Error>>;
|
|
51
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
52
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
53
|
+
} | {
|
|
54
|
+
swapList: {
|
|
55
|
+
id: string;
|
|
56
|
+
time: any;
|
|
57
|
+
user: string;
|
|
58
|
+
paidAmount: any;
|
|
59
|
+
receivedAmount: any;
|
|
60
|
+
paidToken: {
|
|
61
|
+
id: string;
|
|
62
|
+
address: string;
|
|
63
|
+
name: string;
|
|
64
|
+
symbol: string;
|
|
65
|
+
decimals: number;
|
|
66
|
+
logoImg?: string | null;
|
|
67
|
+
};
|
|
68
|
+
receivedToken: {
|
|
69
|
+
id: string;
|
|
70
|
+
address: string;
|
|
71
|
+
name: string;
|
|
72
|
+
symbol: string;
|
|
73
|
+
decimals: number;
|
|
74
|
+
logoImg?: string | null;
|
|
75
|
+
};
|
|
76
|
+
}[] | null | undefined;
|
|
77
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery;
|
|
78
|
+
error: null;
|
|
79
|
+
isError: false;
|
|
80
|
+
isPending: false;
|
|
81
|
+
isLoading: false;
|
|
82
|
+
isLoadingError: false;
|
|
83
|
+
isRefetchError: false;
|
|
84
|
+
isSuccess: true;
|
|
85
|
+
isPlaceholderData: false;
|
|
86
|
+
status: "success";
|
|
87
|
+
dataUpdatedAt: number;
|
|
88
|
+
errorUpdatedAt: number;
|
|
89
|
+
failureCount: number;
|
|
90
|
+
failureReason: Error | null;
|
|
91
|
+
errorUpdateCount: number;
|
|
92
|
+
isFetched: boolean;
|
|
93
|
+
isFetchedAfterMount: boolean;
|
|
94
|
+
isFetching: boolean;
|
|
95
|
+
isInitialLoading: boolean;
|
|
96
|
+
isPaused: boolean;
|
|
97
|
+
isRefetching: boolean;
|
|
98
|
+
isStale: boolean;
|
|
99
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery, Error>>;
|
|
100
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
101
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
102
|
+
} | {
|
|
103
|
+
swapList: {
|
|
104
|
+
id: string;
|
|
105
|
+
time: any;
|
|
106
|
+
user: string;
|
|
107
|
+
paidAmount: any;
|
|
108
|
+
receivedAmount: any;
|
|
109
|
+
paidToken: {
|
|
110
|
+
id: string;
|
|
111
|
+
address: string;
|
|
112
|
+
name: string;
|
|
113
|
+
symbol: string;
|
|
114
|
+
decimals: number;
|
|
115
|
+
logoImg?: string | null;
|
|
116
|
+
};
|
|
117
|
+
receivedToken: {
|
|
118
|
+
id: string;
|
|
119
|
+
address: string;
|
|
120
|
+
name: string;
|
|
121
|
+
symbol: string;
|
|
122
|
+
decimals: number;
|
|
123
|
+
logoImg?: string | null;
|
|
124
|
+
};
|
|
125
|
+
}[] | null | undefined;
|
|
126
|
+
data: undefined;
|
|
127
|
+
error: Error;
|
|
128
|
+
isError: true;
|
|
129
|
+
isPending: false;
|
|
130
|
+
isLoading: false;
|
|
131
|
+
isLoadingError: true;
|
|
132
|
+
isRefetchError: false;
|
|
133
|
+
isSuccess: false;
|
|
134
|
+
isPlaceholderData: false;
|
|
135
|
+
status: "error";
|
|
136
|
+
dataUpdatedAt: number;
|
|
137
|
+
errorUpdatedAt: number;
|
|
138
|
+
failureCount: number;
|
|
139
|
+
failureReason: Error | null;
|
|
140
|
+
errorUpdateCount: number;
|
|
141
|
+
isFetched: boolean;
|
|
142
|
+
isFetchedAfterMount: boolean;
|
|
143
|
+
isFetching: boolean;
|
|
144
|
+
isInitialLoading: boolean;
|
|
145
|
+
isPaused: boolean;
|
|
146
|
+
isRefetching: boolean;
|
|
147
|
+
isStale: boolean;
|
|
148
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery, Error>>;
|
|
149
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
150
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
151
|
+
} | {
|
|
152
|
+
swapList: {
|
|
153
|
+
id: string;
|
|
154
|
+
time: any;
|
|
155
|
+
user: string;
|
|
156
|
+
paidAmount: any;
|
|
157
|
+
receivedAmount: any;
|
|
158
|
+
paidToken: {
|
|
159
|
+
id: string;
|
|
160
|
+
address: string;
|
|
161
|
+
name: string;
|
|
162
|
+
symbol: string;
|
|
163
|
+
decimals: number;
|
|
164
|
+
logoImg?: string | null;
|
|
165
|
+
};
|
|
166
|
+
receivedToken: {
|
|
167
|
+
id: string;
|
|
168
|
+
address: string;
|
|
169
|
+
name: string;
|
|
170
|
+
symbol: string;
|
|
171
|
+
decimals: number;
|
|
172
|
+
logoImg?: string | null;
|
|
173
|
+
};
|
|
174
|
+
}[] | null | undefined;
|
|
175
|
+
data: undefined;
|
|
176
|
+
error: null;
|
|
177
|
+
isError: false;
|
|
178
|
+
isPending: true;
|
|
179
|
+
isLoading: true;
|
|
180
|
+
isLoadingError: false;
|
|
181
|
+
isRefetchError: false;
|
|
182
|
+
isSuccess: false;
|
|
183
|
+
isPlaceholderData: false;
|
|
184
|
+
status: "pending";
|
|
185
|
+
dataUpdatedAt: number;
|
|
186
|
+
errorUpdatedAt: number;
|
|
187
|
+
failureCount: number;
|
|
188
|
+
failureReason: Error | null;
|
|
189
|
+
errorUpdateCount: number;
|
|
190
|
+
isFetched: boolean;
|
|
191
|
+
isFetchedAfterMount: boolean;
|
|
192
|
+
isFetching: boolean;
|
|
193
|
+
isInitialLoading: boolean;
|
|
194
|
+
isPaused: boolean;
|
|
195
|
+
isRefetching: boolean;
|
|
196
|
+
isStale: boolean;
|
|
197
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery, Error>>;
|
|
198
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
199
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
200
|
+
} | {
|
|
201
|
+
swapList: {
|
|
202
|
+
id: string;
|
|
203
|
+
time: any;
|
|
204
|
+
user: string;
|
|
205
|
+
paidAmount: any;
|
|
206
|
+
receivedAmount: any;
|
|
207
|
+
paidToken: {
|
|
208
|
+
id: string;
|
|
209
|
+
address: string;
|
|
210
|
+
name: string;
|
|
211
|
+
symbol: string;
|
|
212
|
+
decimals: number;
|
|
213
|
+
logoImg?: string | null;
|
|
214
|
+
};
|
|
215
|
+
receivedToken: {
|
|
216
|
+
id: string;
|
|
217
|
+
address: string;
|
|
218
|
+
name: string;
|
|
219
|
+
symbol: string;
|
|
220
|
+
decimals: number;
|
|
221
|
+
logoImg?: string | null;
|
|
222
|
+
};
|
|
223
|
+
}[] | null | undefined;
|
|
224
|
+
data: undefined;
|
|
225
|
+
error: null;
|
|
226
|
+
isError: false;
|
|
227
|
+
isPending: true;
|
|
228
|
+
isLoadingError: false;
|
|
229
|
+
isRefetchError: false;
|
|
230
|
+
isSuccess: false;
|
|
231
|
+
isPlaceholderData: false;
|
|
232
|
+
status: "pending";
|
|
233
|
+
dataUpdatedAt: number;
|
|
234
|
+
errorUpdatedAt: number;
|
|
235
|
+
failureCount: number;
|
|
236
|
+
failureReason: Error | null;
|
|
237
|
+
errorUpdateCount: number;
|
|
238
|
+
isFetched: boolean;
|
|
239
|
+
isFetchedAfterMount: boolean;
|
|
240
|
+
isFetching: boolean;
|
|
241
|
+
isLoading: boolean;
|
|
242
|
+
isInitialLoading: boolean;
|
|
243
|
+
isPaused: boolean;
|
|
244
|
+
isRefetching: boolean;
|
|
245
|
+
isStale: boolean;
|
|
246
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery, Error>>;
|
|
247
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
248
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
249
|
+
} | {
|
|
250
|
+
swapList: {
|
|
251
|
+
id: string;
|
|
252
|
+
time: any;
|
|
253
|
+
user: string;
|
|
254
|
+
paidAmount: any;
|
|
255
|
+
receivedAmount: any;
|
|
256
|
+
paidToken: {
|
|
257
|
+
id: string;
|
|
258
|
+
address: string;
|
|
259
|
+
name: string;
|
|
260
|
+
symbol: string;
|
|
261
|
+
decimals: number;
|
|
262
|
+
logoImg?: string | null;
|
|
263
|
+
};
|
|
264
|
+
receivedToken: {
|
|
265
|
+
id: string;
|
|
266
|
+
address: string;
|
|
267
|
+
name: string;
|
|
268
|
+
symbol: string;
|
|
269
|
+
decimals: number;
|
|
270
|
+
logoImg?: string | null;
|
|
271
|
+
};
|
|
272
|
+
}[] | null | undefined;
|
|
273
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery;
|
|
274
|
+
isError: false;
|
|
275
|
+
error: null;
|
|
276
|
+
isPending: false;
|
|
277
|
+
isLoading: false;
|
|
278
|
+
isLoadingError: false;
|
|
279
|
+
isRefetchError: false;
|
|
280
|
+
isSuccess: true;
|
|
281
|
+
isPlaceholderData: true;
|
|
282
|
+
status: "success";
|
|
283
|
+
dataUpdatedAt: number;
|
|
284
|
+
errorUpdatedAt: number;
|
|
285
|
+
failureCount: number;
|
|
286
|
+
failureReason: Error | null;
|
|
287
|
+
errorUpdateCount: number;
|
|
288
|
+
isFetched: boolean;
|
|
289
|
+
isFetchedAfterMount: boolean;
|
|
290
|
+
isFetching: boolean;
|
|
291
|
+
isInitialLoading: boolean;
|
|
292
|
+
isPaused: boolean;
|
|
293
|
+
isRefetching: boolean;
|
|
294
|
+
isStale: boolean;
|
|
295
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery, Error>>;
|
|
296
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
297
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
298
|
+
};
|
|
@@ -19,6 +19,24 @@ export type CurvePoolT = {
|
|
|
19
19
|
weeklyApy: string | null;
|
|
20
20
|
tvl: string | null;
|
|
21
21
|
volume: string | null;
|
|
22
|
+
dailyVolumeUsd: string | null;
|
|
23
|
+
traderCount: string | null;
|
|
24
|
+
liquidityUtilization: string | null;
|
|
25
|
+
daoFee: string | null;
|
|
26
|
+
virtualPrice: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* export const POOL_TYPE_PLAIN = "plain";
|
|
29
|
+
export const POOL_TYPE_META = "meta";
|
|
30
|
+
现在有两种池子类型
|
|
31
|
+
11:44
|
|
32
|
+
PlainPoolDeployed
|
|
33
|
+
MetaPoolDeployed
|
|
34
|
+
创建池的时候事件不同
|
|
35
|
+
*/
|
|
36
|
+
poolType: 'plain' | 'meta';
|
|
37
|
+
a: string | null;
|
|
38
|
+
offpegFeeMultiplier: string | null;
|
|
39
|
+
lpTokenBalance: string | null;
|
|
22
40
|
};
|
|
23
41
|
export type OperateCurvePoolT = {
|
|
24
42
|
pool: CurvePoolT;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CurveApi } from '@dodoex/api';
|
|
1
|
+
import { ChainId, CurveApi, ExcludeNone } from '@dodoex/api';
|
|
2
2
|
import { CurvePoolT } from './types';
|
|
3
3
|
export declare const curveApi: CurveApi;
|
|
4
|
-
export declare
|
|
4
|
+
export declare function convertRawPoolListToCurvePoolListT(rawPoolList: ExcludeNone<ReturnType<Exclude<(typeof CurveApi.graphql.curve_stableswap_ng_getAllPools)['__apiType'], undefined>>['curve_stableswap_ng_getAllPools']>['lqList'], chainId: ChainId | undefined): CurvePoolT[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.2-zetachain.
|
|
3
|
+
"version": "3.0.2-zetachain.68",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
61
|
"@bitcoinerlab/secp256k1": "1.2.0",
|
|
62
|
-
"@dodoex/api": "3.0.3-zetachain.
|
|
62
|
+
"@dodoex/api": "3.0.3-zetachain.17",
|
|
63
63
|
"@dodoex/components": "3.0.3-zetachain.14",
|
|
64
64
|
"@dodoex/contract-request": "^1.3.0",
|
|
65
65
|
"@dodoex/dodo-contract-request": "1.19.0-alpha.2",
|