@dodoex/widgets 3.0.2-beta.16 → 3.0.2-beta.18
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-DYVJUtvQ.js → helper-BY-qP0mP.js} +1 -1
- package/dist/{helper-BNu3rgBV.cjs → helper-CsdI18hz.cjs} +1 -1
- package/dist/{index-p0xf7yO5.cjs → index-CQtAqUIV.cjs} +6 -6
- package/dist/index-CUkwAXZ8.js +31 -0
- package/dist/{index-BM1JzXl2.cjs → index-DHG_S5KR.cjs} +2 -2
- package/dist/index-EAeULQnu.js +78 -0
- package/dist/index-P1YNB1lp.cjs +31 -0
- package/dist/{index-C2g_bloT.js → index-hhGR_o1G.js} +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/components/AddressWithLinkAndCopy.d.ts +2 -1
- package/dist/types/components/List/EmptyList.d.ts +2 -1
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +3 -2
- package/dist/types/components/TokenLogoPair.d.ts +1 -1
- package/dist/types/components/Widget/index.d.ts +25 -1
- package/dist/types/components/WidgetContainer.d.ts +1 -1
- package/dist/types/constants/api.d.ts +3 -3
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +99 -22
- package/dist/types/hooks/Token/useTokenStatus.d.ts +3 -3
- package/dist/types/hooks/contract/useFetchBlockNumber.d.ts +1 -1
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +21 -1
- package/dist/types/hooks/useGlobalState.d.ts +32 -0
- package/dist/types/hooks/useTokenState.d.ts +18 -0
- package/dist/types/utils/address.d.ts +1 -1
- package/dist/types/utils/chains.d.ts +1 -1
- package/dist/types/utils/token.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/helper.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useMiningItem.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useMiningList.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useMyCreatedMiningList.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useReviewRewardToken.d.ts +2 -2
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +1 -1
- 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/hooks/usePools.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/addresses.d.ts +0 -14
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +8 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +7 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +7 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/migationWidget.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +12 -1
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +11 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +10 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +6 -6
- package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +10 -10
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +45 -0
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +5 -2
- package/package.json +4 -6
- package/dist/index-BxkgcgOR.js +0 -31
- package/dist/index-CcQennNY.js +0 -78
- package/dist/index-DcqykOJv.cjs +0 -31
- package/dist/types/store/actions/globals.d.ts +0 -9
- package/dist/types/store/actions/index.d.ts +0 -4
- package/dist/types/store/actions/settings.d.ts +0 -3
- package/dist/types/store/actions/token.d.ts +0 -7
- package/dist/types/store/actions/wallet.d.ts +0 -6
- package/dist/types/store/index.d.ts +0 -12
- package/dist/types/store/reducers/globals.d.ts +0 -21
- package/dist/types/store/reducers/index.d.ts +0 -17
- package/dist/types/store/reducers/settings.d.ts +0 -8
- package/dist/types/store/reducers/token.d.ts +0 -22
- package/dist/types/store/reducers/wallet.d.ts +0 -13
- package/dist/types/store/selectors/globals.d.ts +0 -7
- package/dist/types/store/selectors/settings.d.ts +0 -2
- package/dist/types/store/selectors/token.d.ts +0 -6
- package/dist/types/store/selectors/wallet.d.ts +0 -6
|
@@ -1,10 +1,27 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from '../Token';
|
|
1
3
|
export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
2
4
|
account: string | undefined;
|
|
3
5
|
chainId?: number;
|
|
4
6
|
limit?: number;
|
|
5
7
|
}): {
|
|
6
|
-
orderList:
|
|
7
|
-
|
|
8
|
+
orderList: {
|
|
9
|
+
hash: string;
|
|
10
|
+
fromToken: TokenInfo;
|
|
11
|
+
toToken: TokenInfo;
|
|
12
|
+
fromAmount: BigNumber | null;
|
|
13
|
+
toAmount: string;
|
|
14
|
+
minAmount: string;
|
|
15
|
+
fromTokenPrice: string;
|
|
16
|
+
toTokenPrice: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
routeData: any;
|
|
19
|
+
safeTxHash: string | undefined;
|
|
20
|
+
safeTxUrl: string;
|
|
21
|
+
status: string;
|
|
22
|
+
transactionHash: string;
|
|
23
|
+
}[];
|
|
24
|
+
data: import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>;
|
|
8
25
|
error: Error;
|
|
9
26
|
isError: true;
|
|
10
27
|
isPending: false;
|
|
@@ -13,8 +30,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
13
30
|
isRefetchError: true;
|
|
14
31
|
isSuccess: false;
|
|
15
32
|
status: "error";
|
|
16
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
17
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
33
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
34
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
18
35
|
hasNextPage: boolean;
|
|
19
36
|
hasPreviousPage: boolean;
|
|
20
37
|
isFetchingNextPage: boolean;
|
|
@@ -32,11 +49,26 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
32
49
|
isPlaceholderData: boolean;
|
|
33
50
|
isRefetching: boolean;
|
|
34
51
|
isStale: boolean;
|
|
35
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
52
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
36
53
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
37
54
|
} | {
|
|
38
|
-
orderList:
|
|
39
|
-
|
|
55
|
+
orderList: {
|
|
56
|
+
hash: string;
|
|
57
|
+
fromToken: TokenInfo;
|
|
58
|
+
toToken: TokenInfo;
|
|
59
|
+
fromAmount: BigNumber | null;
|
|
60
|
+
toAmount: string;
|
|
61
|
+
minAmount: string;
|
|
62
|
+
fromTokenPrice: string;
|
|
63
|
+
toTokenPrice: string;
|
|
64
|
+
createdAt: string;
|
|
65
|
+
routeData: any;
|
|
66
|
+
safeTxHash: string | undefined;
|
|
67
|
+
safeTxUrl: string;
|
|
68
|
+
status: string;
|
|
69
|
+
transactionHash: string;
|
|
70
|
+
}[];
|
|
71
|
+
data: import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>;
|
|
40
72
|
error: null;
|
|
41
73
|
isError: false;
|
|
42
74
|
isPending: false;
|
|
@@ -45,8 +77,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
45
77
|
isRefetchError: false;
|
|
46
78
|
isSuccess: true;
|
|
47
79
|
status: "success";
|
|
48
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
49
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
80
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
81
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
50
82
|
hasNextPage: boolean;
|
|
51
83
|
hasPreviousPage: boolean;
|
|
52
84
|
isFetchingNextPage: boolean;
|
|
@@ -64,10 +96,25 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
64
96
|
isPlaceholderData: boolean;
|
|
65
97
|
isRefetching: boolean;
|
|
66
98
|
isStale: boolean;
|
|
67
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
99
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
68
100
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
69
101
|
} | {
|
|
70
|
-
orderList:
|
|
102
|
+
orderList: {
|
|
103
|
+
hash: string;
|
|
104
|
+
fromToken: TokenInfo;
|
|
105
|
+
toToken: TokenInfo;
|
|
106
|
+
fromAmount: BigNumber | null;
|
|
107
|
+
toAmount: string;
|
|
108
|
+
minAmount: string;
|
|
109
|
+
fromTokenPrice: string;
|
|
110
|
+
toTokenPrice: string;
|
|
111
|
+
createdAt: string;
|
|
112
|
+
routeData: any;
|
|
113
|
+
safeTxHash: string | undefined;
|
|
114
|
+
safeTxUrl: string;
|
|
115
|
+
status: string;
|
|
116
|
+
transactionHash: string;
|
|
117
|
+
}[];
|
|
71
118
|
data: undefined;
|
|
72
119
|
error: Error;
|
|
73
120
|
isError: true;
|
|
@@ -77,8 +124,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
77
124
|
isRefetchError: false;
|
|
78
125
|
isSuccess: false;
|
|
79
126
|
status: "error";
|
|
80
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
81
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
127
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
128
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
82
129
|
hasNextPage: boolean;
|
|
83
130
|
hasPreviousPage: boolean;
|
|
84
131
|
isFetchingNextPage: boolean;
|
|
@@ -96,10 +143,25 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
96
143
|
isPlaceholderData: boolean;
|
|
97
144
|
isRefetching: boolean;
|
|
98
145
|
isStale: boolean;
|
|
99
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
146
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
100
147
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
101
148
|
} | {
|
|
102
|
-
orderList:
|
|
149
|
+
orderList: {
|
|
150
|
+
hash: string;
|
|
151
|
+
fromToken: TokenInfo;
|
|
152
|
+
toToken: TokenInfo;
|
|
153
|
+
fromAmount: BigNumber | null;
|
|
154
|
+
toAmount: string;
|
|
155
|
+
minAmount: string;
|
|
156
|
+
fromTokenPrice: string;
|
|
157
|
+
toTokenPrice: string;
|
|
158
|
+
createdAt: string;
|
|
159
|
+
routeData: any;
|
|
160
|
+
safeTxHash: string | undefined;
|
|
161
|
+
safeTxUrl: string;
|
|
162
|
+
status: string;
|
|
163
|
+
transactionHash: string;
|
|
164
|
+
}[];
|
|
103
165
|
data: undefined;
|
|
104
166
|
error: null;
|
|
105
167
|
isError: false;
|
|
@@ -109,8 +171,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
109
171
|
isRefetchError: false;
|
|
110
172
|
isSuccess: false;
|
|
111
173
|
status: "pending";
|
|
112
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
113
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
174
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
175
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
114
176
|
hasNextPage: boolean;
|
|
115
177
|
hasPreviousPage: boolean;
|
|
116
178
|
isFetchingNextPage: boolean;
|
|
@@ -128,10 +190,25 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
128
190
|
isPlaceholderData: boolean;
|
|
129
191
|
isRefetching: boolean;
|
|
130
192
|
isStale: boolean;
|
|
131
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
193
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
132
194
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
133
195
|
} | {
|
|
134
|
-
orderList:
|
|
196
|
+
orderList: {
|
|
197
|
+
hash: string;
|
|
198
|
+
fromToken: TokenInfo;
|
|
199
|
+
toToken: TokenInfo;
|
|
200
|
+
fromAmount: BigNumber | null;
|
|
201
|
+
toAmount: string;
|
|
202
|
+
minAmount: string;
|
|
203
|
+
fromTokenPrice: string;
|
|
204
|
+
toTokenPrice: string;
|
|
205
|
+
createdAt: string;
|
|
206
|
+
routeData: any;
|
|
207
|
+
safeTxHash: string | undefined;
|
|
208
|
+
safeTxUrl: string;
|
|
209
|
+
status: string;
|
|
210
|
+
transactionHash: string;
|
|
211
|
+
}[];
|
|
135
212
|
data: undefined;
|
|
136
213
|
error: null;
|
|
137
214
|
isError: false;
|
|
@@ -140,8 +217,8 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
140
217
|
isRefetchError: false;
|
|
141
218
|
isSuccess: false;
|
|
142
219
|
status: "pending";
|
|
143
|
-
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
144
|
-
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
220
|
+
fetchNextPage: (options?: import("@tanstack/react-query").FetchNextPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
221
|
+
fetchPreviousPage: (options?: import("@tanstack/react-query").FetchPreviousPageOptions) => Promise<import("@tanstack/react-query").InfiniteQueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
145
222
|
hasNextPage: boolean;
|
|
146
223
|
hasPreviousPage: boolean;
|
|
147
224
|
isFetchingNextPage: boolean;
|
|
@@ -160,6 +237,6 @@ export declare function useTradeSwapOrderList({ account, chainId, limit, }: {
|
|
|
160
237
|
isPlaceholderData: boolean;
|
|
161
238
|
isRefetching: boolean;
|
|
162
239
|
isStale: boolean;
|
|
163
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<
|
|
240
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@tanstack/react-query").InfiniteData<import("@dodoex/api/dist/types/gql/graphql").FetchUserSwapOrderHistoriesQuery, unknown>, Error>>;
|
|
164
241
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
165
242
|
};
|
|
@@ -12,10 +12,10 @@ export declare function useTokenStatus(token: TokenInfo | undefined | null, { am
|
|
|
12
12
|
isGetApproveLoading: boolean;
|
|
13
13
|
needApprove: boolean;
|
|
14
14
|
needReset: boolean | undefined;
|
|
15
|
-
needShowTokenStatusButton:
|
|
16
|
-
insufficientBalance:
|
|
15
|
+
needShowTokenStatusButton: boolean;
|
|
16
|
+
insufficientBalance: boolean;
|
|
17
17
|
loading: boolean;
|
|
18
18
|
approveTitle: string;
|
|
19
19
|
submitApprove: () => Promise<void>;
|
|
20
|
-
getMaxBalance: () =>
|
|
20
|
+
getMaxBalance: () => string;
|
|
21
21
|
};
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
export default function useFetchETHBalance(chainId?: number): import("@tanstack/react-query").UseQueryResult<
|
|
1
|
+
export default function useFetchETHBalance(chainId?: number): import("@tanstack/react-query").UseQueryResult<{
|
|
2
|
+
symbol: string;
|
|
3
|
+
address: string;
|
|
4
|
+
name: string;
|
|
5
|
+
decimals: number;
|
|
6
|
+
balance: import("bignumber.js").BigNumber;
|
|
7
|
+
allowance: import("bignumber.js").BigNumber;
|
|
8
|
+
account: string;
|
|
9
|
+
spender: string | undefined;
|
|
10
|
+
chainId: number;
|
|
11
|
+
} | {
|
|
12
|
+
address: string;
|
|
13
|
+
decimals: number;
|
|
14
|
+
symbol: string;
|
|
15
|
+
name: string;
|
|
16
|
+
balance: import("bignumber.js").BigNumber;
|
|
17
|
+
spender: string | undefined;
|
|
18
|
+
allowance: import("bignumber.js").BigNumber;
|
|
19
|
+
chainId: number;
|
|
20
|
+
account?: undefined;
|
|
21
|
+
} | null, Error>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export declare enum ContractStatus {
|
|
3
|
+
Initial = "Initial",
|
|
4
|
+
Pending = "Pending",
|
|
5
|
+
ApproveSuccess = "ApproveSuccess",
|
|
6
|
+
TxSuccess = "TxSuccess",
|
|
7
|
+
Failed = "Failed"
|
|
8
|
+
}
|
|
9
|
+
interface GlobalState {
|
|
10
|
+
fromTokenChainId?: ChainId;
|
|
11
|
+
latestBlockNumber: number;
|
|
12
|
+
openConnectWalletInfo: boolean | {
|
|
13
|
+
/** Wallet is connected, chainID needs to be switched */
|
|
14
|
+
chainId?: ChainId;
|
|
15
|
+
};
|
|
16
|
+
contractStatus?: ContractStatus;
|
|
17
|
+
autoConnectLoading?: boolean;
|
|
18
|
+
showCoingecko?: boolean;
|
|
19
|
+
/** source: props.getAutoSlippage */
|
|
20
|
+
autoSlippage?: {
|
|
21
|
+
loading: boolean;
|
|
22
|
+
value: number | null;
|
|
23
|
+
};
|
|
24
|
+
slippage: string | null;
|
|
25
|
+
}
|
|
26
|
+
export declare const useGlobalState: import("zustand").UseBoundStore<import("zustand").StoreApi<GlobalState>>;
|
|
27
|
+
export declare function setContractStatus(value: GlobalState['contractStatus']): void;
|
|
28
|
+
export declare function setAutoConnectLoading(value: GlobalState['autoConnectLoading']): void;
|
|
29
|
+
export declare function setAutoSlippage(value: GlobalState['autoSlippage']): void;
|
|
30
|
+
export declare function setAutoSlippageLoading(loading: boolean): void;
|
|
31
|
+
export declare function setSlippage(value: GlobalState['slippage']): void;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenList } from './Token';
|
|
3
|
+
export type AccountBalance = {
|
|
4
|
+
tokenBalances?: BigNumber;
|
|
5
|
+
tokenAllowances?: BigNumber;
|
|
6
|
+
};
|
|
7
|
+
export type AccountBalances = {
|
|
8
|
+
[key in string]: AccountBalance;
|
|
9
|
+
};
|
|
10
|
+
interface TokenState {
|
|
11
|
+
tokenList: TokenList;
|
|
12
|
+
popularTokenList: TokenList;
|
|
13
|
+
}
|
|
14
|
+
export declare const useTokenState: import("zustand").UseBoundStore<import("zustand").StoreApi<TokenState>>;
|
|
15
|
+
export declare function getAllTokenList(state?: TokenState): import("./Token").TokenInfo[];
|
|
16
|
+
export declare function setTokenList(value: TokenState['tokenList']): void;
|
|
17
|
+
export declare function setPopularTokenList(value: TokenState['popularTokenList']): void;
|
|
18
|
+
export {};
|
|
@@ -23,7 +23,7 @@ export declare function openEtherscanPage(path: string | undefined, chainId: Cha
|
|
|
23
23
|
* @returns
|
|
24
24
|
* @see https://test-explorer.plumenetwork.xyz/address/0x3A7Bc5F9E41356728f037f17D88c642EE46d1Aaa?tab=contract
|
|
25
25
|
*/
|
|
26
|
-
export declare const getUniInitCodeHash: (chainId: number) => "
|
|
26
|
+
export declare const getUniInitCodeHash: (chainId: number) => "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" | "0x007722521498f3d29a63d1eb6ab35e202874706c77ce73d45c1ad9da88174a3f" | "0x67a372377cf6d7f78cfdcc9df0bc21e1139bd49e5a47c33ee0de5389a4396410" | "0x2ebf1082215ab683deab4ee8ff50d42205db2059829b641717ab3f61f18d481a";
|
|
27
27
|
export declare function sortsBefore(tokenA: TokenInfo, tokenB: TokenInfo): boolean;
|
|
28
28
|
export declare const computePairAddress: ({ factoryAddress, tokenA, tokenB, fee, }: {
|
|
29
29
|
factoryAddress: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
-
export declare const getPlatformId: (chainId: ChainId) =>
|
|
2
|
+
export declare const getPlatformId: (chainId: ChainId) => string;
|
|
@@ -19,7 +19,7 @@ export declare function getTokenPairCompareText({ fromToken, toToken, fromFiatPr
|
|
|
19
19
|
comparePriceText: string;
|
|
20
20
|
loading: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare function getShowDecimals(decimals: string | number):
|
|
22
|
+
export declare function getShowDecimals(decimals: string | number): 6 | 4;
|
|
23
23
|
export declare function convertFetchTokenToTokenInfo(token: {
|
|
24
24
|
id?: string | null;
|
|
25
25
|
address?: string | null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TabMiningI } from '../../types';
|
|
2
|
+
import { MiningStatusE } from '@dodoex/api';
|
|
2
3
|
export declare function useStatusAndStartBlockNumber({ miningItem, }: {
|
|
3
4
|
miningItem: TabMiningI;
|
|
4
5
|
}): {
|
|
5
|
-
status:
|
|
6
|
+
status: MiningStatusE;
|
|
6
7
|
miningStatusList: {
|
|
7
8
|
status: MiningStatusE;
|
|
8
9
|
firstStartTime: import("bignumber.js").BigNumber | undefined;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { MiningApi } from '@dodoex/api';
|
|
2
|
+
export declare const miningApi: MiningApi;
|
|
@@ -60,10 +60,10 @@ export declare function getV3MiningSingleRewardAmount(t: ReviewedMiningRewardTok
|
|
|
60
60
|
workThroughReward: BigNumber | undefined;
|
|
61
61
|
lastFlagBlock: BigNumber | undefined;
|
|
62
62
|
rewardVault: string | undefined;
|
|
63
|
-
startTime: BigNumber | undefined;
|
|
64
|
-
endTime: BigNumber | undefined;
|
|
65
63
|
rewardPerBlock: BigNumber | undefined;
|
|
66
64
|
startBlock: BigNumber | undefined;
|
|
67
65
|
endBlock: BigNumber | undefined;
|
|
66
|
+
startTime: BigNumber | undefined;
|
|
67
|
+
endTime: BigNumber | undefined;
|
|
68
68
|
};
|
|
69
69
|
export {};
|
|
@@ -7,5 +7,5 @@ export declare function useMiningItem({ miningContractAddress, poolAddress, acco
|
|
|
7
7
|
miningItem: import("../types").TabMiningI | undefined;
|
|
8
8
|
error: Error | null;
|
|
9
9
|
loading: boolean;
|
|
10
|
-
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<
|
|
10
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").MiningListQuery, Error>>;
|
|
11
11
|
};
|
|
@@ -6,7 +6,7 @@ export declare function useMiningList({ isEnded, searchText, account, chainIds,
|
|
|
6
6
|
chainIds: Array<number> | null;
|
|
7
7
|
}): {
|
|
8
8
|
error: Error | null;
|
|
9
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
9
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").MiningListQuery, Error>>;
|
|
10
10
|
loading: boolean;
|
|
11
11
|
miningList: TabMiningI[];
|
|
12
12
|
};
|
|
@@ -5,7 +5,7 @@ export declare function useMyCreatedMiningList({ searchText, account, chainIds,
|
|
|
5
5
|
chainIds: Array<number> | null;
|
|
6
6
|
}): {
|
|
7
7
|
error: Error | null;
|
|
8
|
-
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
8
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").MyCreatedMiningListQuery, Error>>;
|
|
9
9
|
loading: boolean;
|
|
10
10
|
miningList: MyCreatedMiningI[];
|
|
11
11
|
};
|
|
@@ -19,10 +19,10 @@ export declare function useReviewRewardToken({ chainId, index, miningContractAdd
|
|
|
19
19
|
workThroughReward: BigNumber | undefined;
|
|
20
20
|
lastFlagBlock: BigNumber | undefined;
|
|
21
21
|
rewardVault: string | undefined;
|
|
22
|
-
startTime: BigNumber | undefined;
|
|
23
|
-
endTime: BigNumber | undefined;
|
|
24
22
|
rewardPerBlock: BigNumber | undefined;
|
|
25
23
|
startBlock: BigNumber | undefined;
|
|
26
24
|
endBlock: BigNumber | undefined;
|
|
25
|
+
startTime: BigNumber | undefined;
|
|
26
|
+
endTime: BigNumber | undefined;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { MiningStatusE } from '@dodoex/api';
|
|
1
2
|
import { FetchMiningListItem } from '../types';
|
|
2
3
|
export declare function useStatusAndStartBlockNumber({ miningItem, }: {
|
|
3
4
|
miningItem: FetchMiningListItem;
|
|
4
5
|
}): {
|
|
5
|
-
status:
|
|
6
|
-
miningStatusList:
|
|
6
|
+
status: MiningStatusE;
|
|
7
|
+
miningStatusList: {
|
|
8
|
+
status: import("@dodoex/api/dist/types/services/mining/utils").MiningStatusE;
|
|
9
|
+
firstStartTime: import("bignumber.js").BigNumber | undefined;
|
|
10
|
+
lastEndTime: import("bignumber.js").BigNumber | undefined;
|
|
11
|
+
currentTime: import("bignumber.js").BigNumber;
|
|
12
|
+
}[];
|
|
7
13
|
};
|
|
@@ -14,7 +14,7 @@ export declare enum PoolState {
|
|
|
14
14
|
EXISTS = 2,
|
|
15
15
|
INVALID = 3
|
|
16
16
|
}
|
|
17
|
-
export declare function usePools(poolKeys: [
|
|
17
|
+
export declare function usePools(chainId: number | undefined, poolKeys: [
|
|
18
18
|
Currency | undefined,
|
|
19
19
|
Currency | undefined,
|
|
20
20
|
FeeAmount | undefined
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import { SupportedChainsType } from './chains';
|
|
2
1
|
type AddressMap = {
|
|
3
2
|
[chainId: number]: string;
|
|
4
3
|
};
|
|
5
|
-
type ChainAddresses = {
|
|
6
|
-
/**
|
|
7
|
-
* UniswapV3Factory
|
|
8
|
-
* @see https://taikoscan.io/address/0x78172691DD3B8ADa7aEbd9bFfB487FB11D735DB2?tab=contract#code
|
|
9
|
-
*/
|
|
10
|
-
v3CoreFactoryAddress: string;
|
|
11
|
-
/**
|
|
12
|
-
* NonfungiblePositionManager
|
|
13
|
-
* @see https://taikoscan.io/address/0x2623281DdcC34A73a9e8898f2c57A32A860903f1?tab=contract#code
|
|
14
|
-
*/
|
|
15
|
-
nonfungiblePositionManagerAddress?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>;
|
|
18
4
|
export declare const V3_CORE_FACTORY_ADDRESSES: AddressMap;
|
|
19
5
|
export declare const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap;
|
|
20
6
|
export {};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
export { ChainId } from '@dodoex/api';
|
|
2
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated
|
|
5
|
+
*/
|
|
6
|
+
export declare const SUPPORTED_CHAINS: readonly [ChainId.MAINNET, ChainId.ARBITRUM_ONE, ChainId.SEPOLIA, ChainId.TAIKO];
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
3
10
|
export type SupportedChainsType = (typeof SUPPORTED_CHAINS)[number];
|
|
@@ -21,6 +21,6 @@ export declare const useCreatePmm: ({ selectedVersion, baseAmount, quoteAmount,
|
|
|
21
21
|
q0: number;
|
|
22
22
|
R: number;
|
|
23
23
|
} | undefined;
|
|
24
|
-
pmmModel:
|
|
25
|
-
midPrice:
|
|
24
|
+
pmmModel: import("@dodoex/api").PMMModel | undefined;
|
|
25
|
+
midPrice: import("bignumber.js").BigNumber | undefined;
|
|
26
26
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
3
4
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
-
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
|
+
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, tokenAndPoolFilter, getMigrationPairAndMining, }: {
|
|
5
6
|
scrollParentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
6
7
|
account?: string;
|
|
7
8
|
filterChainIds?: ChainId[];
|
|
@@ -9,4 +10,9 @@ export default function AddLiquidityList({ scrollParentRef, filterChainIds, acti
|
|
|
9
10
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
10
11
|
operatePool: Partial<PoolOperateProps> | null;
|
|
11
12
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
13
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
14
|
+
getMigrationPairAndMining?: (p: {
|
|
15
|
+
address: string;
|
|
16
|
+
chainId: number;
|
|
17
|
+
}) => void;
|
|
12
18
|
}): JSX.Element;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
2
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
3
|
-
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
4
|
+
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, getMigrationPairAndMining, tokenAndPoolFilter, }: {
|
|
4
5
|
account?: string;
|
|
5
6
|
filterChainIds?: ChainId[];
|
|
6
7
|
activeChainId: ChainId | undefined;
|
|
7
8
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
8
9
|
operatePool: Partial<PoolOperateProps> | null;
|
|
9
10
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
11
|
+
getMigrationPairAndMining?: (p: {
|
|
12
|
+
address: string;
|
|
13
|
+
chainId: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
10
16
|
}): JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
|
-
export default function LiquidityTable({ sx, children, hasMore, loadMore, loadMoreLoading, ...props }: BoxProps & {
|
|
2
|
+
export default function LiquidityTable({ sx, children, empty, loading, hasMore, loadMore, loadMoreLoading, ...props }: BoxProps & {
|
|
3
|
+
empty?: boolean;
|
|
4
|
+
loading?: boolean;
|
|
3
5
|
hasMore?: boolean;
|
|
4
6
|
loadMore?: () => void;
|
|
5
7
|
loadMoreLoading?: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
export interface MigrationTagProps {
|
|
3
|
+
sx?: BoxProps['sx'];
|
|
4
|
+
isRightTop?: boolean;
|
|
5
|
+
isReverseColor?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const MigrationTag: ({ sx, isRightTop, isReverseColor, }: MigrationTagProps) => JSX.Element;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
3
|
import { FetchLiquidityListLqList } from '../../utils';
|
|
3
|
-
export
|
|
4
|
+
export interface TokenAndPoolFilterUserOptions {
|
|
5
|
+
tokens: Array<TokenInfo>;
|
|
6
|
+
lqList: FetchLiquidityListLqList;
|
|
7
|
+
onChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
|
|
8
|
+
onChangeFilterAddressLqList: (lqList: FetchLiquidityListLqList) => void;
|
|
9
|
+
element: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function usePoolListFilterTokenAndPool(tokenAndPoolFilter?: TokenAndPoolFilterUserOptions): {
|
|
4
12
|
filterTokens: TokenInfo[];
|
|
5
13
|
filterASymbol: string;
|
|
6
14
|
filterBSymbol: string;
|
|
@@ -18,9 +26,11 @@ export declare function usePoolListFilterTokenAndPool(): {
|
|
|
18
26
|
volume24H?: any | null;
|
|
19
27
|
baseLpToken?: {
|
|
20
28
|
id: string;
|
|
29
|
+
decimals: any;
|
|
21
30
|
} | null;
|
|
22
31
|
quoteLpToken?: {
|
|
23
32
|
id: string;
|
|
33
|
+
decimals: any;
|
|
24
34
|
} | null;
|
|
25
35
|
baseToken: {
|
|
26
36
|
id: string;
|
|
@@ -41,6 +51,7 @@ export declare function usePoolListFilterTokenAndPool(): {
|
|
|
41
51
|
miningQuoteApy?: any | null;
|
|
42
52
|
transactionBaseApy?: any | null;
|
|
43
53
|
transactionQuoteApy?: any | null;
|
|
54
|
+
metromMiningApy?: any | null;
|
|
44
55
|
} | null;
|
|
45
56
|
} | null;
|
|
46
57
|
} | null)[] | null | undefined;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Page, PageType } from '../../../router/types';
|
|
3
|
-
|
|
3
|
+
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
5
|
+
export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter, operatePMMPoolElement, operatePool: operatePoolProps, onOperatePool, getMigrationPairAndMining, }: {
|
|
4
6
|
params?: Page<PageType.Pool>['params'];
|
|
5
7
|
scrollRef?: React.RefObject<any>;
|
|
8
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
9
|
+
operatePMMPoolElement?: React.ReactElement;
|
|
10
|
+
operatePool?: Partial<PoolOperateProps> | null;
|
|
11
|
+
onOperatePool?: (pool: Partial<PoolOperateProps> | null) => boolean;
|
|
12
|
+
getMigrationPairAndMining?: (p: {
|
|
13
|
+
address: string;
|
|
14
|
+
chainId: number;
|
|
15
|
+
}) => void;
|
|
6
16
|
}): JSX.Element;
|