@dodoex/widgets 3.19.0 → 3.20.0-alpha.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/LICENSE +674 -674
- package/README.md +70 -70
- package/dist/{34acf2e58b457195.svg → 28442382d977858a.svg} +9 -9
- package/dist/{219f8611c6c9e6e2.svg → 8de9a184d4ef0a11.svg} +6 -6
- package/dist/{44df077bd19df476.svg → b3f16b2626f03378.svg} +10 -10
- package/dist/{5c5d298f247819e1.svg → ed726d76d93d4899.svg} +10 -10
- package/dist/{helper-DUWFcWe6.js → helper-C__Hw6Nv.js} +1 -1
- package/dist/{helper-C1OYS4SC.cjs → helper-DHlCN-58.cjs} +1 -1
- package/dist/{index-BdB2BCQe.cjs → index-1E8fSg97.cjs} +1 -1
- package/dist/{index-ZV1FQySp.js → index-C3eOZR2q.js} +2 -2
- package/dist/{index-BGe7caLE.js → index-C4PCWK26.js} +1 -1
- package/dist/{index-XzRE8z_c.js → index-CEFnzcQR.js} +1 -1
- package/dist/{index-Cm0O00ow.cjs → index-CoDKjBJD.cjs} +2 -2
- package/dist/{index-CQl4nYsF.cjs → index-LN0r92OR.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/constants/api.d.ts +4 -4
- package/dist/types/hooks/ConnectWallet/useCurrentChainId.d.ts +1 -1
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +2 -2
- package/dist/types/hooks/Swap/useForecastSlippageList.d.ts +142 -6
- package/dist/types/hooks/Swap/useSwapSlippage.d.ts +143 -7
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +248 -12
- package/dist/types/hooks/Token/useSelectChainList.d.ts +2 -2
- package/dist/types/hooks/Token/useTokenStatus.d.ts +4 -4
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +21 -1
- package/dist/types/hooks/useGraphQLRequests.d.ts +3 -2
- package/dist/types/utils/chains.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/MiningCreate/hooks/usePoolPairList.d.ts +28 -2
- package/dist/types/widgets/MiningWidget/MiningCreate/utils.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/MiningList/hooks/useStatusAndStartBlockNumber.d.ts +2 -1
- package/dist/types/widgets/MiningWidget/helper.d.ts +2 -1
- package/dist/types/widgets/MiningWidget/hooks/useMiningItem.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useMiningList.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useMyCreatedMiningList.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +9 -3
- package/dist/types/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +8 -2
- package/dist/types/widgets/MiningWidget/hooks/utils.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +122 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +336 -8
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +156 -8
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +252 -8
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +3 -2
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +43 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +11 -5
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +8 -8
- package/dist/types/widgets/PoolWidget/hooks/contract/useWithdrawInfo.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +13 -13
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +422 -9
- package/dist/types/widgets/PoolWidget/hooks/useUniV2CreatePairs.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +5 -2
- package/dist/types/widgets/PoolWidget/utils.d.ts +3 -3
- package/package.json +162 -162
|
@@ -4,8 +4,14 @@ export declare function usePoolDayData({ address, chainId, day, }: {
|
|
|
4
4
|
chainId: ChainId | undefined;
|
|
5
5
|
day?: number;
|
|
6
6
|
}): {
|
|
7
|
-
dayDataList:
|
|
8
|
-
|
|
7
|
+
dayDataList: {
|
|
8
|
+
volume: number;
|
|
9
|
+
fee: number;
|
|
10
|
+
traders: number;
|
|
11
|
+
date: number;
|
|
12
|
+
tvl: number;
|
|
13
|
+
}[];
|
|
14
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery;
|
|
9
15
|
error: Error;
|
|
10
16
|
isError: true;
|
|
11
17
|
isPending: false;
|
|
@@ -28,12 +34,18 @@ export declare function usePoolDayData({ address, chainId, day, }: {
|
|
|
28
34
|
isRefetching: boolean;
|
|
29
35
|
isStale: boolean;
|
|
30
36
|
isEnabled: boolean;
|
|
31
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
37
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery, Error>>;
|
|
32
38
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
33
|
-
promise: Promise<
|
|
39
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery>;
|
|
34
40
|
} | {
|
|
35
|
-
dayDataList:
|
|
36
|
-
|
|
41
|
+
dayDataList: {
|
|
42
|
+
volume: number;
|
|
43
|
+
fee: number;
|
|
44
|
+
traders: number;
|
|
45
|
+
date: number;
|
|
46
|
+
tvl: number;
|
|
47
|
+
}[];
|
|
48
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery;
|
|
37
49
|
error: null;
|
|
38
50
|
isError: false;
|
|
39
51
|
isPending: false;
|
|
@@ -56,7 +68,143 @@ export declare function usePoolDayData({ address, chainId, day, }: {
|
|
|
56
68
|
isRefetching: boolean;
|
|
57
69
|
isStale: boolean;
|
|
58
70
|
isEnabled: boolean;
|
|
59
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
71
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery, Error>>;
|
|
60
72
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
61
|
-
promise: Promise<
|
|
73
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery>;
|
|
74
|
+
} | {
|
|
75
|
+
dayDataList: {
|
|
76
|
+
volume: number;
|
|
77
|
+
fee: number;
|
|
78
|
+
traders: number;
|
|
79
|
+
date: number;
|
|
80
|
+
tvl: number;
|
|
81
|
+
}[];
|
|
82
|
+
data: undefined;
|
|
83
|
+
error: Error;
|
|
84
|
+
isError: true;
|
|
85
|
+
isPending: false;
|
|
86
|
+
isLoading: false;
|
|
87
|
+
isLoadingError: true;
|
|
88
|
+
isRefetchError: false;
|
|
89
|
+
isSuccess: false;
|
|
90
|
+
isPlaceholderData: false;
|
|
91
|
+
status: "error";
|
|
92
|
+
dataUpdatedAt: number;
|
|
93
|
+
errorUpdatedAt: number;
|
|
94
|
+
failureCount: number;
|
|
95
|
+
failureReason: Error | null;
|
|
96
|
+
errorUpdateCount: number;
|
|
97
|
+
isFetched: boolean;
|
|
98
|
+
isFetchedAfterMount: boolean;
|
|
99
|
+
isFetching: boolean;
|
|
100
|
+
isInitialLoading: boolean;
|
|
101
|
+
isPaused: boolean;
|
|
102
|
+
isRefetching: boolean;
|
|
103
|
+
isStale: boolean;
|
|
104
|
+
isEnabled: boolean;
|
|
105
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery, Error>>;
|
|
106
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
107
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery>;
|
|
108
|
+
} | {
|
|
109
|
+
dayDataList: {
|
|
110
|
+
volume: number;
|
|
111
|
+
fee: number;
|
|
112
|
+
traders: number;
|
|
113
|
+
date: number;
|
|
114
|
+
tvl: number;
|
|
115
|
+
}[];
|
|
116
|
+
data: undefined;
|
|
117
|
+
error: null;
|
|
118
|
+
isError: false;
|
|
119
|
+
isPending: true;
|
|
120
|
+
isLoading: true;
|
|
121
|
+
isLoadingError: false;
|
|
122
|
+
isRefetchError: false;
|
|
123
|
+
isSuccess: false;
|
|
124
|
+
isPlaceholderData: false;
|
|
125
|
+
status: "pending";
|
|
126
|
+
dataUpdatedAt: number;
|
|
127
|
+
errorUpdatedAt: number;
|
|
128
|
+
failureCount: number;
|
|
129
|
+
failureReason: Error | null;
|
|
130
|
+
errorUpdateCount: number;
|
|
131
|
+
isFetched: boolean;
|
|
132
|
+
isFetchedAfterMount: boolean;
|
|
133
|
+
isFetching: boolean;
|
|
134
|
+
isInitialLoading: boolean;
|
|
135
|
+
isPaused: boolean;
|
|
136
|
+
isRefetching: boolean;
|
|
137
|
+
isStale: boolean;
|
|
138
|
+
isEnabled: boolean;
|
|
139
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery, Error>>;
|
|
140
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
141
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery>;
|
|
142
|
+
} | {
|
|
143
|
+
dayDataList: {
|
|
144
|
+
volume: number;
|
|
145
|
+
fee: number;
|
|
146
|
+
traders: number;
|
|
147
|
+
date: number;
|
|
148
|
+
tvl: number;
|
|
149
|
+
}[];
|
|
150
|
+
data: undefined;
|
|
151
|
+
error: null;
|
|
152
|
+
isError: false;
|
|
153
|
+
isPending: true;
|
|
154
|
+
isLoadingError: false;
|
|
155
|
+
isRefetchError: false;
|
|
156
|
+
isSuccess: false;
|
|
157
|
+
isPlaceholderData: false;
|
|
158
|
+
status: "pending";
|
|
159
|
+
dataUpdatedAt: number;
|
|
160
|
+
errorUpdatedAt: number;
|
|
161
|
+
failureCount: number;
|
|
162
|
+
failureReason: Error | null;
|
|
163
|
+
errorUpdateCount: number;
|
|
164
|
+
isFetched: boolean;
|
|
165
|
+
isFetchedAfterMount: boolean;
|
|
166
|
+
isFetching: boolean;
|
|
167
|
+
isLoading: boolean;
|
|
168
|
+
isInitialLoading: boolean;
|
|
169
|
+
isPaused: boolean;
|
|
170
|
+
isRefetching: boolean;
|
|
171
|
+
isStale: boolean;
|
|
172
|
+
isEnabled: boolean;
|
|
173
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery, Error>>;
|
|
174
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
175
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery>;
|
|
176
|
+
} | {
|
|
177
|
+
dayDataList: {
|
|
178
|
+
volume: number;
|
|
179
|
+
fee: number;
|
|
180
|
+
traders: number;
|
|
181
|
+
date: number;
|
|
182
|
+
tvl: number;
|
|
183
|
+
}[];
|
|
184
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery;
|
|
185
|
+
isError: false;
|
|
186
|
+
error: null;
|
|
187
|
+
isPending: false;
|
|
188
|
+
isLoading: false;
|
|
189
|
+
isLoadingError: false;
|
|
190
|
+
isRefetchError: false;
|
|
191
|
+
isSuccess: true;
|
|
192
|
+
isPlaceholderData: true;
|
|
193
|
+
status: "success";
|
|
194
|
+
dataUpdatedAt: number;
|
|
195
|
+
errorUpdatedAt: number;
|
|
196
|
+
failureCount: number;
|
|
197
|
+
failureReason: Error | null;
|
|
198
|
+
errorUpdateCount: number;
|
|
199
|
+
isFetched: boolean;
|
|
200
|
+
isFetchedAfterMount: boolean;
|
|
201
|
+
isFetching: boolean;
|
|
202
|
+
isInitialLoading: boolean;
|
|
203
|
+
isPaused: boolean;
|
|
204
|
+
isRefetching: boolean;
|
|
205
|
+
isStale: boolean;
|
|
206
|
+
isEnabled: boolean;
|
|
207
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery, Error>>;
|
|
208
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
209
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolDayDataQuery>;
|
|
62
210
|
};
|
|
@@ -3,8 +3,30 @@ export declare function usePoolSwapList({ chainId, address, first, }: {
|
|
|
3
3
|
address: string | undefined;
|
|
4
4
|
first?: number;
|
|
5
5
|
}): {
|
|
6
|
-
swapList:
|
|
7
|
-
|
|
6
|
+
swapList: {
|
|
7
|
+
id: string;
|
|
8
|
+
timestamp: any;
|
|
9
|
+
from: any;
|
|
10
|
+
baseVolume: any;
|
|
11
|
+
quoteVolume: any;
|
|
12
|
+
feeBase: any;
|
|
13
|
+
feeQuote: any;
|
|
14
|
+
amountIn: any;
|
|
15
|
+
amountOut: any;
|
|
16
|
+
fromToken: {
|
|
17
|
+
id: string;
|
|
18
|
+
symbol: string;
|
|
19
|
+
name: string;
|
|
20
|
+
decimals: any;
|
|
21
|
+
};
|
|
22
|
+
toToken: {
|
|
23
|
+
id: string;
|
|
24
|
+
symbol: string;
|
|
25
|
+
name: string;
|
|
26
|
+
decimals: any;
|
|
27
|
+
};
|
|
28
|
+
}[] | undefined;
|
|
29
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery;
|
|
8
30
|
error: Error;
|
|
9
31
|
isError: true;
|
|
10
32
|
isPending: false;
|
|
@@ -27,12 +49,34 @@ export declare function usePoolSwapList({ chainId, address, first, }: {
|
|
|
27
49
|
isRefetching: boolean;
|
|
28
50
|
isStale: boolean;
|
|
29
51
|
isEnabled: boolean;
|
|
30
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
52
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery, Error>>;
|
|
31
53
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
32
|
-
promise: Promise<
|
|
54
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery>;
|
|
33
55
|
} | {
|
|
34
|
-
swapList:
|
|
35
|
-
|
|
56
|
+
swapList: {
|
|
57
|
+
id: string;
|
|
58
|
+
timestamp: any;
|
|
59
|
+
from: any;
|
|
60
|
+
baseVolume: any;
|
|
61
|
+
quoteVolume: any;
|
|
62
|
+
feeBase: any;
|
|
63
|
+
feeQuote: any;
|
|
64
|
+
amountIn: any;
|
|
65
|
+
amountOut: any;
|
|
66
|
+
fromToken: {
|
|
67
|
+
id: string;
|
|
68
|
+
symbol: string;
|
|
69
|
+
name: string;
|
|
70
|
+
decimals: any;
|
|
71
|
+
};
|
|
72
|
+
toToken: {
|
|
73
|
+
id: string;
|
|
74
|
+
symbol: string;
|
|
75
|
+
name: string;
|
|
76
|
+
decimals: any;
|
|
77
|
+
};
|
|
78
|
+
}[] | undefined;
|
|
79
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery;
|
|
36
80
|
error: null;
|
|
37
81
|
isError: false;
|
|
38
82
|
isPending: false;
|
|
@@ -55,7 +99,207 @@ export declare function usePoolSwapList({ chainId, address, first, }: {
|
|
|
55
99
|
isRefetching: boolean;
|
|
56
100
|
isStale: boolean;
|
|
57
101
|
isEnabled: boolean;
|
|
58
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
102
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery, Error>>;
|
|
59
103
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
60
|
-
promise: Promise<
|
|
104
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery>;
|
|
105
|
+
} | {
|
|
106
|
+
swapList: {
|
|
107
|
+
id: string;
|
|
108
|
+
timestamp: any;
|
|
109
|
+
from: any;
|
|
110
|
+
baseVolume: any;
|
|
111
|
+
quoteVolume: any;
|
|
112
|
+
feeBase: any;
|
|
113
|
+
feeQuote: any;
|
|
114
|
+
amountIn: any;
|
|
115
|
+
amountOut: any;
|
|
116
|
+
fromToken: {
|
|
117
|
+
id: string;
|
|
118
|
+
symbol: string;
|
|
119
|
+
name: string;
|
|
120
|
+
decimals: any;
|
|
121
|
+
};
|
|
122
|
+
toToken: {
|
|
123
|
+
id: string;
|
|
124
|
+
symbol: string;
|
|
125
|
+
name: string;
|
|
126
|
+
decimals: any;
|
|
127
|
+
};
|
|
128
|
+
}[] | undefined;
|
|
129
|
+
data: undefined;
|
|
130
|
+
error: Error;
|
|
131
|
+
isError: true;
|
|
132
|
+
isPending: false;
|
|
133
|
+
isLoading: false;
|
|
134
|
+
isLoadingError: true;
|
|
135
|
+
isRefetchError: false;
|
|
136
|
+
isSuccess: false;
|
|
137
|
+
isPlaceholderData: false;
|
|
138
|
+
status: "error";
|
|
139
|
+
dataUpdatedAt: number;
|
|
140
|
+
errorUpdatedAt: number;
|
|
141
|
+
failureCount: number;
|
|
142
|
+
failureReason: Error | null;
|
|
143
|
+
errorUpdateCount: number;
|
|
144
|
+
isFetched: boolean;
|
|
145
|
+
isFetchedAfterMount: boolean;
|
|
146
|
+
isFetching: boolean;
|
|
147
|
+
isInitialLoading: boolean;
|
|
148
|
+
isPaused: boolean;
|
|
149
|
+
isRefetching: boolean;
|
|
150
|
+
isStale: boolean;
|
|
151
|
+
isEnabled: boolean;
|
|
152
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery, Error>>;
|
|
153
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
154
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery>;
|
|
155
|
+
} | {
|
|
156
|
+
swapList: {
|
|
157
|
+
id: string;
|
|
158
|
+
timestamp: any;
|
|
159
|
+
from: any;
|
|
160
|
+
baseVolume: any;
|
|
161
|
+
quoteVolume: any;
|
|
162
|
+
feeBase: any;
|
|
163
|
+
feeQuote: any;
|
|
164
|
+
amountIn: any;
|
|
165
|
+
amountOut: any;
|
|
166
|
+
fromToken: {
|
|
167
|
+
id: string;
|
|
168
|
+
symbol: string;
|
|
169
|
+
name: string;
|
|
170
|
+
decimals: any;
|
|
171
|
+
};
|
|
172
|
+
toToken: {
|
|
173
|
+
id: string;
|
|
174
|
+
symbol: string;
|
|
175
|
+
name: string;
|
|
176
|
+
decimals: any;
|
|
177
|
+
};
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
data: undefined;
|
|
180
|
+
error: null;
|
|
181
|
+
isError: false;
|
|
182
|
+
isPending: true;
|
|
183
|
+
isLoading: true;
|
|
184
|
+
isLoadingError: false;
|
|
185
|
+
isRefetchError: false;
|
|
186
|
+
isSuccess: false;
|
|
187
|
+
isPlaceholderData: false;
|
|
188
|
+
status: "pending";
|
|
189
|
+
dataUpdatedAt: number;
|
|
190
|
+
errorUpdatedAt: number;
|
|
191
|
+
failureCount: number;
|
|
192
|
+
failureReason: Error | null;
|
|
193
|
+
errorUpdateCount: number;
|
|
194
|
+
isFetched: boolean;
|
|
195
|
+
isFetchedAfterMount: boolean;
|
|
196
|
+
isFetching: boolean;
|
|
197
|
+
isInitialLoading: boolean;
|
|
198
|
+
isPaused: boolean;
|
|
199
|
+
isRefetching: boolean;
|
|
200
|
+
isStale: boolean;
|
|
201
|
+
isEnabled: boolean;
|
|
202
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery, Error>>;
|
|
203
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
204
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery>;
|
|
205
|
+
} | {
|
|
206
|
+
swapList: {
|
|
207
|
+
id: string;
|
|
208
|
+
timestamp: any;
|
|
209
|
+
from: any;
|
|
210
|
+
baseVolume: any;
|
|
211
|
+
quoteVolume: any;
|
|
212
|
+
feeBase: any;
|
|
213
|
+
feeQuote: any;
|
|
214
|
+
amountIn: any;
|
|
215
|
+
amountOut: any;
|
|
216
|
+
fromToken: {
|
|
217
|
+
id: string;
|
|
218
|
+
symbol: string;
|
|
219
|
+
name: string;
|
|
220
|
+
decimals: any;
|
|
221
|
+
};
|
|
222
|
+
toToken: {
|
|
223
|
+
id: string;
|
|
224
|
+
symbol: string;
|
|
225
|
+
name: string;
|
|
226
|
+
decimals: any;
|
|
227
|
+
};
|
|
228
|
+
}[] | undefined;
|
|
229
|
+
data: undefined;
|
|
230
|
+
error: null;
|
|
231
|
+
isError: false;
|
|
232
|
+
isPending: true;
|
|
233
|
+
isLoadingError: false;
|
|
234
|
+
isRefetchError: false;
|
|
235
|
+
isSuccess: false;
|
|
236
|
+
isPlaceholderData: false;
|
|
237
|
+
status: "pending";
|
|
238
|
+
dataUpdatedAt: number;
|
|
239
|
+
errorUpdatedAt: number;
|
|
240
|
+
failureCount: number;
|
|
241
|
+
failureReason: Error | null;
|
|
242
|
+
errorUpdateCount: number;
|
|
243
|
+
isFetched: boolean;
|
|
244
|
+
isFetchedAfterMount: boolean;
|
|
245
|
+
isFetching: boolean;
|
|
246
|
+
isLoading: boolean;
|
|
247
|
+
isInitialLoading: boolean;
|
|
248
|
+
isPaused: boolean;
|
|
249
|
+
isRefetching: boolean;
|
|
250
|
+
isStale: boolean;
|
|
251
|
+
isEnabled: boolean;
|
|
252
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery, Error>>;
|
|
253
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
254
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery>;
|
|
255
|
+
} | {
|
|
256
|
+
swapList: {
|
|
257
|
+
id: string;
|
|
258
|
+
timestamp: any;
|
|
259
|
+
from: any;
|
|
260
|
+
baseVolume: any;
|
|
261
|
+
quoteVolume: any;
|
|
262
|
+
feeBase: any;
|
|
263
|
+
feeQuote: any;
|
|
264
|
+
amountIn: any;
|
|
265
|
+
amountOut: any;
|
|
266
|
+
fromToken: {
|
|
267
|
+
id: string;
|
|
268
|
+
symbol: string;
|
|
269
|
+
name: string;
|
|
270
|
+
decimals: any;
|
|
271
|
+
};
|
|
272
|
+
toToken: {
|
|
273
|
+
id: string;
|
|
274
|
+
symbol: string;
|
|
275
|
+
name: string;
|
|
276
|
+
decimals: any;
|
|
277
|
+
};
|
|
278
|
+
}[] | undefined;
|
|
279
|
+
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery;
|
|
280
|
+
isError: false;
|
|
281
|
+
error: null;
|
|
282
|
+
isPending: false;
|
|
283
|
+
isLoading: false;
|
|
284
|
+
isLoadingError: false;
|
|
285
|
+
isRefetchError: false;
|
|
286
|
+
isSuccess: true;
|
|
287
|
+
isPlaceholderData: true;
|
|
288
|
+
status: "success";
|
|
289
|
+
dataUpdatedAt: number;
|
|
290
|
+
errorUpdatedAt: number;
|
|
291
|
+
failureCount: number;
|
|
292
|
+
failureReason: Error | null;
|
|
293
|
+
errorUpdateCount: number;
|
|
294
|
+
isFetched: boolean;
|
|
295
|
+
isFetchedAfterMount: boolean;
|
|
296
|
+
isFetching: boolean;
|
|
297
|
+
isInitialLoading: boolean;
|
|
298
|
+
isPaused: boolean;
|
|
299
|
+
isRefetching: boolean;
|
|
300
|
+
isStale: boolean;
|
|
301
|
+
isEnabled: boolean;
|
|
302
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery, Error>>;
|
|
303
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
304
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchPoolSwapListQuery>;
|
|
61
305
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
export declare function usePoolListFilterChainId(): {
|
|
2
|
-
activeChainId:
|
|
3
|
-
filterChainIds:
|
|
3
|
+
activeChainId: ChainId | undefined;
|
|
4
|
+
filterChainIds: ChainId[] | undefined;
|
|
4
5
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
5
6
|
};
|
|
@@ -12,7 +12,49 @@ export declare function usePoolListFilterTokenAndPool(tokenAndPoolFilter?: Token
|
|
|
12
12
|
filterTokens: TokenInfo[];
|
|
13
13
|
filterASymbol: string;
|
|
14
14
|
filterBSymbol: string;
|
|
15
|
-
filterAddressLqList:
|
|
15
|
+
filterAddressLqList: ({
|
|
16
|
+
id?: string | null;
|
|
17
|
+
pair?: {
|
|
18
|
+
id: string;
|
|
19
|
+
chainId: number;
|
|
20
|
+
type: string;
|
|
21
|
+
lpFeeRate: any;
|
|
22
|
+
mtFeeRate: any;
|
|
23
|
+
creator: any;
|
|
24
|
+
tvl?: any | null;
|
|
25
|
+
miningAddress?: Array<string | null> | null;
|
|
26
|
+
volume24H?: any | null;
|
|
27
|
+
baseLpToken?: {
|
|
28
|
+
id: string;
|
|
29
|
+
decimals: any;
|
|
30
|
+
} | null;
|
|
31
|
+
quoteLpToken?: {
|
|
32
|
+
id: string;
|
|
33
|
+
decimals: any;
|
|
34
|
+
} | null;
|
|
35
|
+
baseToken: {
|
|
36
|
+
id: string;
|
|
37
|
+
symbol: string;
|
|
38
|
+
name: string;
|
|
39
|
+
decimals: any;
|
|
40
|
+
logoImg?: string | null;
|
|
41
|
+
};
|
|
42
|
+
quoteToken: {
|
|
43
|
+
id: string;
|
|
44
|
+
symbol: string;
|
|
45
|
+
name: string;
|
|
46
|
+
decimals: any;
|
|
47
|
+
logoImg?: string | null;
|
|
48
|
+
};
|
|
49
|
+
apy?: {
|
|
50
|
+
miningBaseApy?: any | null;
|
|
51
|
+
miningQuoteApy?: any | null;
|
|
52
|
+
transactionBaseApy?: any | null;
|
|
53
|
+
transactionQuoteApy?: any | null;
|
|
54
|
+
metromMiningApy?: any | null;
|
|
55
|
+
} | null;
|
|
56
|
+
} | null;
|
|
57
|
+
} | null)[] | null | undefined;
|
|
16
58
|
handleDeleteToken: (token: TokenInfo) => void;
|
|
17
59
|
handleChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
|
|
18
60
|
handleChangeFilterAddress: (lqList: FetchLiquidityListLqList) => void;
|
|
@@ -27,18 +27,24 @@ export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuot
|
|
|
27
27
|
handleChangeQuoteAmount: (newValue: string) => void;
|
|
28
28
|
reset: () => void;
|
|
29
29
|
addPortion: BigNumber;
|
|
30
|
-
amountLoading:
|
|
30
|
+
amountLoading: boolean;
|
|
31
31
|
amountError: boolean;
|
|
32
|
-
amountRefetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
32
|
+
amountRefetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
33
|
+
baseReserve: BigNumber;
|
|
34
|
+
quoteReserve: BigNumber;
|
|
35
|
+
} | null, Error>>;
|
|
33
36
|
amountCheckedDisabled: boolean;
|
|
34
|
-
midPrice:
|
|
37
|
+
midPrice: BigNumber | undefined;
|
|
35
38
|
uniV2Pair: {
|
|
36
39
|
isRearTokenA: boolean;
|
|
37
40
|
pair: import("@uniswap/v2-sdk").Pair | null;
|
|
38
41
|
price: BigNumber | undefined;
|
|
39
42
|
invertedPrice: BigNumber | undefined;
|
|
40
|
-
reserveQuery: import("@tanstack/react-query").
|
|
41
|
-
|
|
43
|
+
reserveQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
44
|
+
baseReserve: BigNumber;
|
|
45
|
+
quoteReserve: BigNumber;
|
|
46
|
+
} | null, Error>;
|
|
47
|
+
totalBaseLpQuery: import("@tanstack/react-query").UseQueryResult<BigNumber | null, Error>;
|
|
42
48
|
liquidityMinted: BigNumber | undefined;
|
|
43
49
|
poolTokenPercentage: BigNumber | undefined;
|
|
44
50
|
shareOfPool: string;
|
|
@@ -12,12 +12,12 @@ export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteA
|
|
|
12
12
|
isGetApproveLoading: boolean;
|
|
13
13
|
needApprove: boolean;
|
|
14
14
|
needReset: boolean | undefined;
|
|
15
|
-
needShowTokenStatusButton:
|
|
16
|
-
insufficientBalance:
|
|
17
|
-
loading:
|
|
15
|
+
needShowTokenStatusButton: boolean;
|
|
16
|
+
insufficientBalance: boolean;
|
|
17
|
+
loading: boolean;
|
|
18
18
|
approveTitle: string;
|
|
19
19
|
submitApprove: () => Promise<void>;
|
|
20
|
-
getMaxBalance: () =>
|
|
20
|
+
getMaxBalance: () => string;
|
|
21
21
|
};
|
|
22
22
|
quoteTokenStatus: {
|
|
23
23
|
token: import("../../../..").TokenInfo | null | undefined;
|
|
@@ -25,11 +25,11 @@ export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteA
|
|
|
25
25
|
isGetApproveLoading: boolean;
|
|
26
26
|
needApprove: boolean;
|
|
27
27
|
needReset: boolean | undefined;
|
|
28
|
-
needShowTokenStatusButton:
|
|
29
|
-
insufficientBalance:
|
|
30
|
-
loading:
|
|
28
|
+
needShowTokenStatusButton: boolean;
|
|
29
|
+
insufficientBalance: boolean;
|
|
30
|
+
loading: boolean;
|
|
31
31
|
approveTitle: string;
|
|
32
32
|
submitApprove: () => Promise<void>;
|
|
33
|
-
getMaxBalance: () =>
|
|
33
|
+
getMaxBalance: () => string;
|
|
34
34
|
};
|
|
35
35
|
};
|
|
@@ -14,35 +14,35 @@ export declare function usePoolBalanceInfo({ account, pool, }: {
|
|
|
14
14
|
};
|
|
15
15
|
}): {
|
|
16
16
|
/** existing base lp balance */
|
|
17
|
-
totalBaseLpBalance:
|
|
17
|
+
totalBaseLpBalance: BigNumber | null | undefined;
|
|
18
18
|
/** existing quote lp balance */
|
|
19
|
-
totalQuoteLpBalance:
|
|
19
|
+
totalQuoteLpBalance: BigNumber | null | undefined;
|
|
20
20
|
/** the total deposited base lp balance */
|
|
21
|
-
baseReserve:
|
|
21
|
+
baseReserve: BigNumber | undefined;
|
|
22
22
|
/** the total deposited quote lp balance */
|
|
23
|
-
quoteReserve:
|
|
23
|
+
quoteReserve: BigNumber | undefined;
|
|
24
24
|
/** classical base equilibrium target */
|
|
25
|
-
classicalBaseTarget:
|
|
25
|
+
classicalBaseTarget: BigNumber | undefined;
|
|
26
26
|
/** classical quote equilibrium target */
|
|
27
|
-
classicalQuoteTarget:
|
|
27
|
+
classicalQuoteTarget: BigNumber | undefined;
|
|
28
28
|
/** the user's existing base lp balance */
|
|
29
|
-
userBaseLpBalance:
|
|
29
|
+
userBaseLpBalance: Balance;
|
|
30
30
|
/** the user's existing quote lp balance */
|
|
31
|
-
userQuoteLpBalance:
|
|
31
|
+
userQuoteLpBalance: Balance;
|
|
32
32
|
/** The number of base that can be obtained when a user withdraws from the pool */
|
|
33
|
-
userBaseLpToTokenBalance:
|
|
33
|
+
userBaseLpToTokenBalance: BigNumber | undefined;
|
|
34
34
|
/** The number of quote that can be obtained when a user withdraws from the pool */
|
|
35
35
|
userQuoteLpToTokenBalance: BigNumber | null | undefined;
|
|
36
36
|
baseLpToTokenProportion: BigNumber | undefined;
|
|
37
37
|
quoteLpToTokenProportion: BigNumber | undefined;
|
|
38
|
-
isSinglePool:
|
|
39
|
-
userLpBalanceLoading:
|
|
40
|
-
userLpToTokenBalanceLoading:
|
|
38
|
+
isSinglePool: boolean;
|
|
39
|
+
userLpBalanceLoading: boolean;
|
|
40
|
+
userLpToTokenBalanceLoading: boolean;
|
|
41
41
|
userLpBalanceError: boolean;
|
|
42
42
|
userLpToTokenBalanceError: boolean;
|
|
43
43
|
userLpToTokenBalanceRefetch: () => void;
|
|
44
44
|
error: boolean;
|
|
45
|
-
loading:
|
|
45
|
+
loading: boolean;
|
|
46
46
|
refetch: () => void;
|
|
47
47
|
};
|
|
48
48
|
export {};
|