@dodoex/widgets 3.0.2-zetachain.11 → 3.0.2-zetachain.110
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-Bh6_7gAw.js → helper-CJc1NZsE.js} +1 -1
- package/dist/{helper-DCJJEnV3.cjs → helper-Icjt-nM-.cjs} +1 -1
- package/dist/index-C_rSA4Uo.js +31 -0
- package/dist/index-CnFdLztg.js +12 -0
- package/dist/{index-DVLnDJLQ.cjs → index-CpNePMVd.cjs} +4 -4
- package/dist/index-CycqF7c5.cjs +31 -0
- package/dist/{index-CGy_7PS2.cjs → index-DMnEQWAS.cjs} +2 -2
- package/dist/{index-CzpL7rfy.js → index-lqV8m1n6.js} +3 -3
- 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/Bridge/BridgeRouteShortCard.d.ts +2 -4
- package/dist/types/components/Bridge/BridgeSummaryDialog/index.d.ts +2 -2
- package/dist/types/components/Bridge/CompareRoute.d.ts +4 -0
- package/dist/types/components/Bridge/RouteVision.d.ts +7 -0
- package/dist/types/components/Bridge/RouteVisionModal.d.ts +5 -0
- package/dist/types/components/CardWidgets.d.ts +11 -2
- package/dist/types/components/ErrorMessageDialog.d.ts +2 -1
- package/dist/types/components/Swap/SwapOrderHistory/CrossChainOrderList.d.ts +4 -0
- package/dist/types/components/Swap/SwapOrderHistory/CrossOrderCard.d.ts +7 -0
- package/dist/types/components/Swap/SwapOrderHistory/SameChainOrderList.d.ts +3 -0
- package/dist/types/components/Swap/SwapOrderHistory/index.d.ts +6 -5
- package/dist/types/components/Swap/components/Dialog.d.ts +1 -1
- package/dist/types/components/Swap/components/FiatEntryAndGasRefuel.d.ts +1 -0
- package/dist/types/components/Swap/components/ReceiveAddressInputModal.d.ts +10 -0
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +2 -1
- package/dist/types/components/Swap/components/RouteVisionModal.d.ts +7 -0
- package/dist/types/components/Swap/components/SettingsDialog/index.d.ts +2 -1
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +2 -1
- package/dist/types/components/Swap/components/TokenCard/TokenCardSwap.d.ts +14 -4
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +2 -0
- package/dist/types/components/Swap/components/TokenCard/WalletConnectBtn.d.ts +7 -1
- package/dist/types/components/Swap/components/TokenPairPriceWithToggle.d.ts +3 -2
- package/dist/types/components/Swap/index.d.ts +1 -1
- package/dist/types/components/TokenPicker/TokenItem.d.ts +3 -3
- package/dist/types/components/TokenPicker/index.d.ts +3 -3
- package/dist/types/components/Widget/index.d.ts +12 -10
- package/dist/types/constants/address.d.ts +4 -0
- package/dist/types/constants/api.d.ts +95 -4
- package/dist/types/constants/chainList.d.ts +6 -39
- package/dist/types/constants/chains.d.ts +1 -1
- package/dist/types/constants/sessionStorage.d.ts +1 -0
- package/dist/types/constants/tokenList.d.ts +5 -9
- package/dist/types/hooks/Bridge/createBridgeOrder.d.ts +5 -25
- package/dist/types/hooks/Bridge/useExecuteBridgeRoute.d.ts +1 -2
- package/dist/types/hooks/Bridge/useFeeList.d.ts +9 -0
- package/dist/types/hooks/Bridge/useFetchRoutePriceBridge.d.ts +134 -48
- package/dist/types/hooks/Bridge/useSendRoute.d.ts +1 -2
- package/dist/types/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +4 -1
- package/dist/types/hooks/Bridge/utils.d.ts +6 -0
- package/dist/types/hooks/ConnectWallet/index.d.ts +0 -2
- package/dist/types/hooks/ConnectWallet/useBTCWalletStore.d.ts +1 -0
- package/dist/types/hooks/Submission/types.d.ts +29 -1
- package/dist/types/hooks/Submission/useExecution.d.ts +1 -1
- package/dist/types/hooks/Swap/useBridgeSlippage.d.ts +3 -0
- package/dist/types/hooks/Swap/useCrossSwapOrderList.d.ts +372 -0
- package/dist/types/hooks/Swap/useExecuteSwap.d.ts +2 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +2 -4
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +34 -36
- package/dist/types/hooks/Token/type.d.ts +3 -1
- package/dist/types/hooks/Token/useInitTokenList.d.ts +2 -2
- package/dist/types/hooks/Token/useSelectChainList.d.ts +2 -1
- package/dist/types/hooks/Token/useTokenList.d.ts +4 -7
- package/dist/types/hooks/Token/useTokenListDefaultToken.d.ts +2 -2
- package/dist/types/hooks/Token/useTokenListFetchBalance.d.ts +1 -4
- package/dist/types/hooks/Token/useTokenStatus.d.ts +23 -1
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +2 -1
- package/dist/types/hooks/contract/useFetchMultiTokensForSingleChain.d.ts +20 -0
- package/dist/types/hooks/contract/useFetchTokens.d.ts +9 -4
- package/dist/types/hooks/useAddressValidation.d.ts +2 -0
- package/dist/types/hooks/useGlobalState.d.ts +2 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/hooks/useRouteVisionData.d.ts +17 -1
- package/dist/types/index.d.ts +26 -32
- package/dist/types/router/types.d.ts +5 -0
- package/dist/types/utils/address.d.ts +1 -1
- package/dist/types/utils/btc.d.ts +42 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/solana.d.ts +7 -0
- package/dist/types/utils/wallet.d.ts +2 -0
- package/dist/types/utils/zetachain_btc_test.d.ts +5 -0
- package/dist/types/widgets/MiningWidget/hooks/helper.d.ts +2 -2
- 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/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/RangeSetList.d.ts +4 -0
- 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/PoolCreate/hooks/useDefaultTokens.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/utils.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/ParametersTable.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/GoPoolDetailBtn.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +41 -7
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +43 -0
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +2 -3
- package/dist/types/widgets/PoolWidget/curve/Add.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/AddOrRemove.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/AllPools.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/curve/CurvePoolDetail.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/OperateDialog.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/Remove.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/ApyTooltip.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/CoinReservePieChart.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/CoinsLogoList.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/FilterAddressTags.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/LiquidityProvidersTable.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/OperateButtonContainer.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/curve/components/ParametersTable.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/PoolTitle.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/PoolTotalStats.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/SlippageBonus.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/curve/components/SwapsTable.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/TokenListPoolItem.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/useLiquidityProviders.d.ts +268 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/useLpTokenBalances.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolDetail.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolListFilterTokenAndPool.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolSwapList.d.ts +310 -0
- package/dist/types/widgets/PoolWidget/curve/types.d.ts +44 -0
- package/dist/types/widgets/PoolWidget/curve/utils.d.ts +4 -0
- package/package.json +21 -26
- package/dist/28442382d977858a.svg +0 -9
- package/dist/assets/bundle-DSSoJu9z.css +0 -297
- package/dist/ed726d76d93d4899.svg +0 -10
- package/dist/index-Bg8rd10E.js +0 -12
- package/dist/index-CEN1BcL7.cjs +0 -263
- package/dist/index-DjAOs16s.js +0 -263
- package/dist/types/components/ConnectWallet/ConnectWalletDialog.d.ts +0 -4
- package/dist/types/components/ConnectWallet/OpenConnectWalletInfo.d.ts +0 -2
- package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +0 -5
- package/dist/types/components/SwitchChainDialog/index.d.ts +0 -6
- package/dist/types/hooks/Chain/useChainList.test.d.ts +0 -1
- package/dist/types/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +0 -9
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +0 -14
- package/dist/types/hooks/ConnectWallet/useWeb3Connectors.d.ts +0 -17
- package/dist/types/hooks/ConnectWallet/web3.d.ts +0 -10
- package/dist/types/hooks/Swap/useFetchFiatPrice.test.d.ts +0 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.test.d.ts +0 -1
- package/dist/types/hooks/Swap/useMarginAmount.test.d.ts +0 -1
- package/dist/types/hooks/Token/useFindTokenByAddress.test.d.ts +0 -1
- package/dist/types/hooks/Token/useSelectChainList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenStatus.test.d.ts +0 -1
- /package/dist/types/hooks/{Bridge/useFetchRoutePriceBridge.test.d.ts → useAddressValidation.test.d.ts} +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
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
|
+
tokenIndex?: number | null;
|
|
19
|
+
};
|
|
20
|
+
receivedToken: {
|
|
21
|
+
id: string;
|
|
22
|
+
address: string;
|
|
23
|
+
name: string;
|
|
24
|
+
symbol: string;
|
|
25
|
+
decimals: number;
|
|
26
|
+
logoImg?: string | null;
|
|
27
|
+
tokenIndex?: number | null;
|
|
28
|
+
};
|
|
29
|
+
}[] | null | undefined;
|
|
30
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery;
|
|
31
|
+
error: Error;
|
|
32
|
+
isError: true;
|
|
33
|
+
isPending: false;
|
|
34
|
+
isLoading: false;
|
|
35
|
+
isLoadingError: false;
|
|
36
|
+
isRefetchError: true;
|
|
37
|
+
isSuccess: false;
|
|
38
|
+
isPlaceholderData: false;
|
|
39
|
+
status: "error";
|
|
40
|
+
dataUpdatedAt: number;
|
|
41
|
+
errorUpdatedAt: number;
|
|
42
|
+
failureCount: number;
|
|
43
|
+
failureReason: Error | null;
|
|
44
|
+
errorUpdateCount: number;
|
|
45
|
+
isFetched: boolean;
|
|
46
|
+
isFetchedAfterMount: boolean;
|
|
47
|
+
isFetching: boolean;
|
|
48
|
+
isInitialLoading: boolean;
|
|
49
|
+
isPaused: boolean;
|
|
50
|
+
isRefetching: boolean;
|
|
51
|
+
isStale: boolean;
|
|
52
|
+
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>>;
|
|
53
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
54
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
55
|
+
} | {
|
|
56
|
+
swapList: {
|
|
57
|
+
id: string;
|
|
58
|
+
time: any;
|
|
59
|
+
user: string;
|
|
60
|
+
paidAmount: any;
|
|
61
|
+
receivedAmount: any;
|
|
62
|
+
paidToken: {
|
|
63
|
+
id: string;
|
|
64
|
+
address: string;
|
|
65
|
+
name: string;
|
|
66
|
+
symbol: string;
|
|
67
|
+
decimals: number;
|
|
68
|
+
logoImg?: string | null;
|
|
69
|
+
tokenIndex?: number | null;
|
|
70
|
+
};
|
|
71
|
+
receivedToken: {
|
|
72
|
+
id: string;
|
|
73
|
+
address: string;
|
|
74
|
+
name: string;
|
|
75
|
+
symbol: string;
|
|
76
|
+
decimals: number;
|
|
77
|
+
logoImg?: string | null;
|
|
78
|
+
tokenIndex?: number | null;
|
|
79
|
+
};
|
|
80
|
+
}[] | null | undefined;
|
|
81
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery;
|
|
82
|
+
error: null;
|
|
83
|
+
isError: false;
|
|
84
|
+
isPending: false;
|
|
85
|
+
isLoading: false;
|
|
86
|
+
isLoadingError: false;
|
|
87
|
+
isRefetchError: false;
|
|
88
|
+
isSuccess: true;
|
|
89
|
+
isPlaceholderData: false;
|
|
90
|
+
status: "success";
|
|
91
|
+
dataUpdatedAt: number;
|
|
92
|
+
errorUpdatedAt: number;
|
|
93
|
+
failureCount: number;
|
|
94
|
+
failureReason: Error | null;
|
|
95
|
+
errorUpdateCount: number;
|
|
96
|
+
isFetched: boolean;
|
|
97
|
+
isFetchedAfterMount: boolean;
|
|
98
|
+
isFetching: boolean;
|
|
99
|
+
isInitialLoading: boolean;
|
|
100
|
+
isPaused: boolean;
|
|
101
|
+
isRefetching: boolean;
|
|
102
|
+
isStale: boolean;
|
|
103
|
+
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>>;
|
|
104
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
105
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
106
|
+
} | {
|
|
107
|
+
swapList: {
|
|
108
|
+
id: string;
|
|
109
|
+
time: any;
|
|
110
|
+
user: string;
|
|
111
|
+
paidAmount: any;
|
|
112
|
+
receivedAmount: any;
|
|
113
|
+
paidToken: {
|
|
114
|
+
id: string;
|
|
115
|
+
address: string;
|
|
116
|
+
name: string;
|
|
117
|
+
symbol: string;
|
|
118
|
+
decimals: number;
|
|
119
|
+
logoImg?: string | null;
|
|
120
|
+
tokenIndex?: number | null;
|
|
121
|
+
};
|
|
122
|
+
receivedToken: {
|
|
123
|
+
id: string;
|
|
124
|
+
address: string;
|
|
125
|
+
name: string;
|
|
126
|
+
symbol: string;
|
|
127
|
+
decimals: number;
|
|
128
|
+
logoImg?: string | null;
|
|
129
|
+
tokenIndex?: number | null;
|
|
130
|
+
};
|
|
131
|
+
}[] | null | undefined;
|
|
132
|
+
data: undefined;
|
|
133
|
+
error: Error;
|
|
134
|
+
isError: true;
|
|
135
|
+
isPending: false;
|
|
136
|
+
isLoading: false;
|
|
137
|
+
isLoadingError: true;
|
|
138
|
+
isRefetchError: false;
|
|
139
|
+
isSuccess: false;
|
|
140
|
+
isPlaceholderData: false;
|
|
141
|
+
status: "error";
|
|
142
|
+
dataUpdatedAt: number;
|
|
143
|
+
errorUpdatedAt: number;
|
|
144
|
+
failureCount: number;
|
|
145
|
+
failureReason: Error | null;
|
|
146
|
+
errorUpdateCount: number;
|
|
147
|
+
isFetched: boolean;
|
|
148
|
+
isFetchedAfterMount: boolean;
|
|
149
|
+
isFetching: boolean;
|
|
150
|
+
isInitialLoading: boolean;
|
|
151
|
+
isPaused: boolean;
|
|
152
|
+
isRefetching: boolean;
|
|
153
|
+
isStale: boolean;
|
|
154
|
+
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>>;
|
|
155
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
156
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
157
|
+
} | {
|
|
158
|
+
swapList: {
|
|
159
|
+
id: string;
|
|
160
|
+
time: any;
|
|
161
|
+
user: string;
|
|
162
|
+
paidAmount: any;
|
|
163
|
+
receivedAmount: any;
|
|
164
|
+
paidToken: {
|
|
165
|
+
id: string;
|
|
166
|
+
address: string;
|
|
167
|
+
name: string;
|
|
168
|
+
symbol: string;
|
|
169
|
+
decimals: number;
|
|
170
|
+
logoImg?: string | null;
|
|
171
|
+
tokenIndex?: number | null;
|
|
172
|
+
};
|
|
173
|
+
receivedToken: {
|
|
174
|
+
id: string;
|
|
175
|
+
address: string;
|
|
176
|
+
name: string;
|
|
177
|
+
symbol: string;
|
|
178
|
+
decimals: number;
|
|
179
|
+
logoImg?: string | null;
|
|
180
|
+
tokenIndex?: number | null;
|
|
181
|
+
};
|
|
182
|
+
}[] | null | undefined;
|
|
183
|
+
data: undefined;
|
|
184
|
+
error: null;
|
|
185
|
+
isError: false;
|
|
186
|
+
isPending: true;
|
|
187
|
+
isLoading: true;
|
|
188
|
+
isLoadingError: false;
|
|
189
|
+
isRefetchError: false;
|
|
190
|
+
isSuccess: false;
|
|
191
|
+
isPlaceholderData: false;
|
|
192
|
+
status: "pending";
|
|
193
|
+
dataUpdatedAt: number;
|
|
194
|
+
errorUpdatedAt: number;
|
|
195
|
+
failureCount: number;
|
|
196
|
+
failureReason: Error | null;
|
|
197
|
+
errorUpdateCount: number;
|
|
198
|
+
isFetched: boolean;
|
|
199
|
+
isFetchedAfterMount: boolean;
|
|
200
|
+
isFetching: boolean;
|
|
201
|
+
isInitialLoading: boolean;
|
|
202
|
+
isPaused: boolean;
|
|
203
|
+
isRefetching: boolean;
|
|
204
|
+
isStale: boolean;
|
|
205
|
+
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>>;
|
|
206
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
207
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
208
|
+
} | {
|
|
209
|
+
swapList: {
|
|
210
|
+
id: string;
|
|
211
|
+
time: any;
|
|
212
|
+
user: string;
|
|
213
|
+
paidAmount: any;
|
|
214
|
+
receivedAmount: any;
|
|
215
|
+
paidToken: {
|
|
216
|
+
id: string;
|
|
217
|
+
address: string;
|
|
218
|
+
name: string;
|
|
219
|
+
symbol: string;
|
|
220
|
+
decimals: number;
|
|
221
|
+
logoImg?: string | null;
|
|
222
|
+
tokenIndex?: number | null;
|
|
223
|
+
};
|
|
224
|
+
receivedToken: {
|
|
225
|
+
id: string;
|
|
226
|
+
address: string;
|
|
227
|
+
name: string;
|
|
228
|
+
symbol: string;
|
|
229
|
+
decimals: number;
|
|
230
|
+
logoImg?: string | null;
|
|
231
|
+
tokenIndex?: number | null;
|
|
232
|
+
};
|
|
233
|
+
}[] | null | undefined;
|
|
234
|
+
data: undefined;
|
|
235
|
+
error: null;
|
|
236
|
+
isError: false;
|
|
237
|
+
isPending: true;
|
|
238
|
+
isLoadingError: false;
|
|
239
|
+
isRefetchError: false;
|
|
240
|
+
isSuccess: false;
|
|
241
|
+
isPlaceholderData: false;
|
|
242
|
+
status: "pending";
|
|
243
|
+
dataUpdatedAt: number;
|
|
244
|
+
errorUpdatedAt: number;
|
|
245
|
+
failureCount: number;
|
|
246
|
+
failureReason: Error | null;
|
|
247
|
+
errorUpdateCount: number;
|
|
248
|
+
isFetched: boolean;
|
|
249
|
+
isFetchedAfterMount: boolean;
|
|
250
|
+
isFetching: boolean;
|
|
251
|
+
isLoading: boolean;
|
|
252
|
+
isInitialLoading: boolean;
|
|
253
|
+
isPaused: boolean;
|
|
254
|
+
isRefetching: boolean;
|
|
255
|
+
isStale: boolean;
|
|
256
|
+
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>>;
|
|
257
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
258
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
259
|
+
} | {
|
|
260
|
+
swapList: {
|
|
261
|
+
id: string;
|
|
262
|
+
time: any;
|
|
263
|
+
user: string;
|
|
264
|
+
paidAmount: any;
|
|
265
|
+
receivedAmount: any;
|
|
266
|
+
paidToken: {
|
|
267
|
+
id: string;
|
|
268
|
+
address: string;
|
|
269
|
+
name: string;
|
|
270
|
+
symbol: string;
|
|
271
|
+
decimals: number;
|
|
272
|
+
logoImg?: string | null;
|
|
273
|
+
tokenIndex?: number | null;
|
|
274
|
+
};
|
|
275
|
+
receivedToken: {
|
|
276
|
+
id: string;
|
|
277
|
+
address: string;
|
|
278
|
+
name: string;
|
|
279
|
+
symbol: string;
|
|
280
|
+
decimals: number;
|
|
281
|
+
logoImg?: string | null;
|
|
282
|
+
tokenIndex?: number | null;
|
|
283
|
+
};
|
|
284
|
+
}[] | null | undefined;
|
|
285
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery;
|
|
286
|
+
isError: false;
|
|
287
|
+
error: null;
|
|
288
|
+
isPending: false;
|
|
289
|
+
isLoading: false;
|
|
290
|
+
isLoadingError: false;
|
|
291
|
+
isRefetchError: false;
|
|
292
|
+
isSuccess: true;
|
|
293
|
+
isPlaceholderData: true;
|
|
294
|
+
status: "success";
|
|
295
|
+
dataUpdatedAt: number;
|
|
296
|
+
errorUpdatedAt: number;
|
|
297
|
+
failureCount: number;
|
|
298
|
+
failureReason: Error | null;
|
|
299
|
+
errorUpdateCount: number;
|
|
300
|
+
isFetched: boolean;
|
|
301
|
+
isFetchedAfterMount: boolean;
|
|
302
|
+
isFetching: boolean;
|
|
303
|
+
isInitialLoading: boolean;
|
|
304
|
+
isPaused: boolean;
|
|
305
|
+
isRefetching: boolean;
|
|
306
|
+
isStale: boolean;
|
|
307
|
+
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>>;
|
|
308
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
309
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolSwapInfoQuery>;
|
|
310
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { OperateTab } from '../PoolOperate/hooks/usePoolOperateTabs';
|
|
4
|
+
/**
|
|
5
|
+
* CurveStableSwapNG
|
|
6
|
+
*
|
|
7
|
+
* @see https://zetachain-testnet.blockscout.com/token/0xDddfBCc76166d741c2dfa6b6a90769df398b9969?tab=read_contract
|
|
8
|
+
*/
|
|
9
|
+
export type CurvePoolT = {
|
|
10
|
+
chainId: ChainId;
|
|
11
|
+
name: string;
|
|
12
|
+
address: string;
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
fee: string;
|
|
16
|
+
coins: TokenInfo[];
|
|
17
|
+
apy: string | null;
|
|
18
|
+
dailyApy: string | null;
|
|
19
|
+
weeklyApy: string | null;
|
|
20
|
+
tvl: string | null;
|
|
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;
|
|
40
|
+
};
|
|
41
|
+
export type OperateCurvePoolT = {
|
|
42
|
+
pool: CurvePoolT;
|
|
43
|
+
type: OperateTab;
|
|
44
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChainId, CurveApi, ExcludeNone } from '@dodoex/api';
|
|
2
|
+
import { CurvePoolT } from './types';
|
|
3
|
+
export declare const curveApi: CurveApi;
|
|
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.110",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -58,11 +58,12 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@
|
|
62
|
-
"@dodoex/
|
|
61
|
+
"@bitcoinerlab/secp256k1": "1.2.0",
|
|
62
|
+
"@dodoex/api": "3.0.3-zetachain.23",
|
|
63
|
+
"@dodoex/components": "3.0.3-zetachain.14",
|
|
63
64
|
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "1.
|
|
65
|
-
"@dodoex/icons": "
|
|
65
|
+
"@dodoex/dodo-contract-request": "1.19.0-alpha.4",
|
|
66
|
+
"@dodoex/icons": "2.0.3-zetachain.1",
|
|
66
67
|
"@emotion/react": "^11.10.0",
|
|
67
68
|
"@emotion/styled": "^11.10.0",
|
|
68
69
|
"@ethersproject/bignumber": "^5.8.0",
|
|
@@ -72,23 +73,9 @@
|
|
|
72
73
|
"@lingui/macro": "^4.14.1",
|
|
73
74
|
"@lingui/react": "^4.14.1",
|
|
74
75
|
"@reduxjs/toolkit": "^1.6.1",
|
|
75
|
-
"@reown/appkit": "^1.7.5",
|
|
76
|
-
"@reown/appkit-adapter-bitcoin": "^1.7.5",
|
|
77
|
-
"@reown/appkit-adapter-ethers5": "^1.7.5",
|
|
78
|
-
"@reown/appkit-adapter-solana": "^1.7.5",
|
|
79
|
-
"@reown/appkit-common": "^1.7.5",
|
|
80
|
-
"@reown/appkit-experimental": "^1.7.5",
|
|
81
|
-
"@reown/appkit-utils": "^1.7.5",
|
|
82
|
-
"@semantic-release/changelog": "^6.0.1",
|
|
83
|
-
"@semantic-release/git": "^10.0.1",
|
|
84
76
|
"@tanstack/react-query": "^5.74.3",
|
|
85
77
|
"@uniswap/sdk-core": "^7.7.1",
|
|
86
78
|
"@uniswap/v2-sdk": "^4.15.2",
|
|
87
|
-
"@web3-react/core": "^8.2.3",
|
|
88
|
-
"@web3-react/eip1193": "^8.2.3",
|
|
89
|
-
"@web3-react/metamask": "^8.2.4",
|
|
90
|
-
"@web3-react/types": "^8.2.3",
|
|
91
|
-
"@web3-react/walletconnect-v2": "8.3.6",
|
|
92
79
|
"axios": "^0.27.2",
|
|
93
80
|
"bignumber.js": "^9.3.0",
|
|
94
81
|
"d3": "7.6.1",
|
|
@@ -107,14 +94,22 @@
|
|
|
107
94
|
"react-window": "^1.8.8",
|
|
108
95
|
"recharts": "^2.12.7",
|
|
109
96
|
"rmc-date-picker": "^6.0.10",
|
|
110
|
-
"semantic-release": "^19.0.2",
|
|
111
97
|
"tiny-invariant": "^1.1.0",
|
|
112
|
-
"zustand": "4.4.0"
|
|
113
|
-
"react": "^18.0.0",
|
|
114
|
-
"react-dom": "^18.0.0"
|
|
98
|
+
"zustand": "4.4.0"
|
|
115
99
|
},
|
|
116
100
|
"peerDependencies": {
|
|
117
|
-
"@babel/runtime": ">=7.17.0"
|
|
101
|
+
"@babel/runtime": ">=7.17.0",
|
|
102
|
+
"@reown/appkit": "^1.7.5",
|
|
103
|
+
"@reown/appkit-adapter-solana": "^1.7.5",
|
|
104
|
+
"@reown/appkit-utils": "^1.7.5",
|
|
105
|
+
"@reown/appkit-common": "^1.7.5",
|
|
106
|
+
"@solana/spl-token": "^0.4.13",
|
|
107
|
+
"@solana/web3.js": "1.98.2",
|
|
108
|
+
"bitcoinjs-lib": "6.1.7",
|
|
109
|
+
"@dodoex/btc-connect-react": "^1.5.10",
|
|
110
|
+
"@ethersproject/providers": "^5.8.0",
|
|
111
|
+
"react": "^18.0.0",
|
|
112
|
+
"react-dom": "^18.0.0"
|
|
118
113
|
},
|
|
119
114
|
"devDependencies": {
|
|
120
115
|
"@babel/preset-env": "^7.16.11",
|
|
@@ -138,11 +133,11 @@
|
|
|
138
133
|
"@types/identicon.js": "^2.3.1",
|
|
139
134
|
"@types/jest": "^29.0.3",
|
|
140
135
|
"@types/lodash": "^4.14.184",
|
|
136
|
+
"@types/react": "^18.0.0",
|
|
137
|
+
"@types/react-dom": "^18.0.0",
|
|
141
138
|
"@types/react-infinite-scroller": "^1.2.5",
|
|
142
139
|
"@types/react-transition-group": "^4.4.11",
|
|
143
140
|
"@types/react-window": "^1.8.5",
|
|
144
|
-
"@types/react": "^18.0.0",
|
|
145
|
-
"@types/react-dom": "^18.0.0",
|
|
146
141
|
"babel-plugin-macros": "^3.1.0",
|
|
147
142
|
"babel-runtime": "^6.26.0",
|
|
148
143
|
"dotenv": "^16.0.2",
|