@dodoex/widgets 3.16.0 → 3.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/219f8611c6c9e6e2.svg +6 -0
- package/dist/34acf2e58b457195.svg +9 -0
- package/dist/44df077bd19df476.svg +10 -0
- package/dist/5c5d298f247819e1.svg +10 -0
- package/dist/assets/bundle-BBymdwHN.css +65 -0
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/helper-C1OYS4SC.cjs +1 -0
- package/dist/helper-DUWFcWe6.js +1 -0
- package/dist/index-BGe7caLE.js +12 -0
- package/dist/index-BdB2BCQe.cjs +78 -0
- package/dist/index-CQl4nYsF.cjs +12 -0
- package/dist/index-Cm0O00ow.cjs +14 -0
- package/dist/index-XzRE8z_c.js +78 -0
- package/dist/index-ZV1FQySp.js +14 -0
- 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 +4 -2
- package/dist/types/components/Bridge/BridgeSummaryDialog/index.d.ts +2 -2
- package/dist/types/components/CardWidgets.d.ts +2 -11
- package/dist/types/components/ConnectWallet/ConnectWalletDialog.d.ts +4 -0
- package/dist/types/components/ConnectWallet/NeedConnectButton.d.ts +1 -1
- package/dist/types/components/ConnectWallet/OpenConnectWalletInfo.d.ts +2 -0
- package/dist/types/components/ErrorMessageDialog.d.ts +1 -2
- package/dist/types/components/HowItWorks.d.ts +5 -5
- package/dist/types/components/Message/index.d.ts +1 -1
- package/dist/types/components/SelectChain.d.ts +2 -1
- package/dist/types/components/SubmittedDialog.d.ts +7 -0
- package/dist/types/components/Swap/SwapOrderHistory/index.d.ts +5 -6
- package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +5 -0
- package/dist/types/components/Swap/components/Dialog.d.ts +1 -1
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -2
- package/dist/types/components/Swap/components/SettingsDialog/index.d.ts +1 -2
- package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +7 -0
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageSetting.d.ts +2 -1
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageWarning.d.ts +3 -1
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +2 -3
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +0 -2
- package/dist/types/components/Swap/components/TokenPairPriceWithToggle.d.ts +2 -3
- package/dist/types/components/Swap/index.d.ts +4 -2
- package/dist/types/components/SwitchChainDialog/index.d.ts +6 -0
- package/dist/types/components/TokenPicker/ImportToken.d.ts +6 -0
- package/dist/types/components/TokenPicker/TokenDetailInfo.d.ts +6 -0
- package/dist/types/components/TokenPicker/TokenItem.d.ts +4 -3
- package/dist/types/components/TokenPicker/index.d.ts +3 -3
- package/dist/types/components/Widget/index.d.ts +15 -13
- package/dist/types/components/WithExecutionDialog/index.d.ts +2 -1
- package/dist/types/constants/address.d.ts +0 -6
- package/dist/types/constants/api.d.ts +4 -96
- package/dist/types/constants/chainList.d.ts +0 -10
- package/dist/types/constants/chains.d.ts +1 -17
- package/dist/types/constants/sessionStorage.d.ts +0 -1
- package/dist/types/constants/swap.d.ts +0 -1
- package/dist/types/constants/tokenList.d.ts +9 -8
- package/dist/types/hooks/Bridge/createBridgeOrder.d.ts +24 -4
- package/dist/types/hooks/Bridge/useExecuteBridgeRoute.d.ts +2 -1
- package/dist/types/hooks/Bridge/useFetchRoutePriceBridge.d.ts +48 -138
- package/dist/types/hooks/Bridge/useSendRoute.d.ts +2 -1
- package/dist/types/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +1 -4
- package/dist/types/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +9 -0
- package/dist/types/hooks/ConnectWallet/index.d.ts +2 -0
- package/dist/types/hooks/ConnectWallet/useSwitchChain.d.ts +12 -1
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +8 -0
- package/dist/types/hooks/ConnectWallet/useWeb3Connectors.d.ts +17 -0
- package/dist/types/hooks/ConnectWallet/web3.d.ts +10 -0
- package/dist/types/hooks/Submission/types.d.ts +1 -29
- package/dist/types/hooks/Submission/useExecution.d.ts +1 -1
- package/dist/types/hooks/Swap/useExecuteSwap.d.ts +1 -2
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +4 -2
- package/dist/types/hooks/Swap/useForecastSlippageList.d.ts +6 -0
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +2 -2
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +5 -3
- package/dist/types/hooks/Swap/useSwapSlippage.d.ts +6 -0
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +133 -34
- package/dist/types/hooks/Token/type.d.ts +2 -3
- package/dist/types/hooks/Token/useFindTokenByAddress.test.d.ts +1 -0
- package/dist/types/hooks/Token/useInitTokenList.d.ts +2 -2
- package/dist/types/hooks/Token/useSelectChainList.d.ts +5 -5
- package/dist/types/hooks/Token/useSelectChainList.test.d.ts +1 -0
- package/dist/types/hooks/Token/useTokenList.d.ts +8 -4
- package/dist/types/hooks/Token/useTokenList.test.d.ts +1 -0
- package/dist/types/hooks/Token/useTokenListDefaultToken.d.ts +2 -2
- package/dist/types/hooks/Token/useTokenListFetchBalance.d.ts +4 -1
- package/dist/types/hooks/Token/useTokenStatus.d.ts +2 -28
- package/dist/types/hooks/Token/useTokenStatus.test.d.ts +1 -0
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +1 -2
- package/dist/types/hooks/contract/useFetchTokens.d.ts +4 -9
- package/dist/types/hooks/useGlobalState.d.ts +0 -2
- package/dist/types/hooks/useGraphQLRequests.d.ts +1 -0
- package/dist/types/hooks/useMessageState.d.ts +1 -2
- package/dist/types/hooks/useRouteVisionData.d.ts +1 -17
- package/dist/types/hooks/useTokenState.d.ts +18 -3
- package/dist/types/index.d.ts +35 -27
- package/dist/types/locales/en-US.d.ts +1 -0
- package/dist/types/providers/i18n.d.ts +1 -1
- package/dist/types/router/types.d.ts +0 -5
- package/dist/types/utils/address.d.ts +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/token.d.ts +1 -1
- package/dist/types/utils/wallet.d.ts +0 -2
- package/dist/types/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/usePrevious.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV2Create/Ratio.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/AMMV3/AddLiquidityV3.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/hooks.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/index.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/TokenPairSelect.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePoolTickData.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3DerivedMintInfo.d.ts +1 -4
- package/dist/types/widgets/PoolWidget/AMMV3/reducer.d.ts +1 -4
- package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/usePriceInit.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +4 -4
- package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/PriceModeSetting.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +2 -1
- 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/PoolDetail/components/MoreDetail/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +5 -7
- package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +7 -2
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +5 -7
- package/dist/types/widgets/PoolWidget/PoolList/components/GoPoolDetailBtn.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolList/components/OnlyV3Toggle.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +6 -14
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +7 -8
- package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +6 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +4 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/components/OperateBtn.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +5 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +2 -49
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +6 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/hooks/usePoolListMyLiquidity.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/utils.d.ts +0 -4
- package/package.json +1 -1
- package/dist/helper-Dry2KYfh.js +0 -1
- package/dist/helper-iRd-4sp4.cjs +0 -1
- package/dist/index-BRTABuMK.cjs +0 -12
- package/dist/index-Ca_h9Yxg.js +0 -34
- package/dist/index-DDwPtr_I.js +0 -12
- package/dist/index-DHfQEIuw.cjs +0 -78
- package/dist/index-DsQIchnJ.js +0 -78
- package/dist/index-vyWzevj_.cjs +0 -34
- package/dist/types/components/Bridge/CompareRoute.d.ts +0 -4
- package/dist/types/components/Bridge/RouteVision.d.ts +0 -7
- package/dist/types/components/Bridge/RouteVisionModal.d.ts +0 -5
- package/dist/types/components/SquaredGoBack.d.ts +0 -5
- package/dist/types/components/Swap/SwapOrderHistory/CrossChainOrderList.d.ts +0 -4
- package/dist/types/components/Swap/SwapOrderHistory/CrossOrderCard.d.ts +0 -8
- package/dist/types/components/Swap/SwapOrderHistory/RefundModal.d.ts +0 -9
- package/dist/types/components/Swap/SwapOrderHistory/SameChainOrderList.d.ts +0 -3
- package/dist/types/components/Swap/components/FiatEntryAndGasRefuel.d.ts +0 -1
- package/dist/types/components/Swap/components/ReceiveAddressInputModal.d.ts +0 -10
- package/dist/types/components/Swap/components/RouteVisionModal.d.ts +0 -7
- package/dist/types/components/Swap/components/SwapSettingsDialog/SupplierSelect.d.ts +0 -5
- package/dist/types/components/Swap/components/TokenCard/TokenCardSwap.d.ts +0 -48
- package/dist/types/components/Swap/components/TokenCard/WalletConnectBtn.d.ts +0 -11
- package/dist/types/hooks/Bridge/useFeeList.d.ts +0 -9
- package/dist/types/hooks/Bridge/utils.d.ts +0 -6
- package/dist/types/hooks/ConnectWallet/useBTCWalletStore.d.ts +0 -1
- package/dist/types/hooks/Swap/useBridgeSlippage.d.ts +0 -3
- package/dist/types/hooks/Swap/useCrossSwapOrderList.d.ts +0 -215
- package/dist/types/hooks/Swap/usePrivacySwapStatus.d.ts +0 -10
- package/dist/types/hooks/Swap/useSwitchToSupplierChain.d.ts +0 -13
- package/dist/types/hooks/contract/useFetchMultiTokensForSingleChain.d.ts +0 -20
- package/dist/types/hooks/useAddressValidation.d.ts +0 -2
- package/dist/types/utils/CaipNetworksUtil.d.ts +0 -5
- package/dist/types/utils/btc.d.ts +0 -42
- package/dist/types/utils/constants.d.ts +0 -2
- package/dist/types/utils/reown-types.d.ts +0 -28
- package/dist/types/utils/solana.d.ts +0 -7
- package/dist/types/utils/ton.d.ts +0 -3
- package/dist/types/utils/zetachain_btc_test.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/AMMV2Create/Setting.d.ts +0 -16
- package/dist/types/widgets/PoolWidget/AMMV3/components/RangeSetList.d.ts +0 -4
- package/dist/types/widgets/PoolWidget/PoolList/components/FilterGroup.d.ts +0 -11
- package/dist/types/widgets/PoolWidget/PoolList/components/SortButtonGroup.d.ts +0 -11
- package/dist/types/widgets/PoolWidget/PoolList/components/TableSortButton.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolList/components/tags.d.ts +0 -11
- package/dist/types/widgets/PoolWidget/curve/Add.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/curve/AddOrRemove.d.ts +0 -7
- package/dist/types/widgets/PoolWidget/curve/AllPools.d.ts +0 -13
- package/dist/types/widgets/PoolWidget/curve/CurvePoolDetail.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/curve/OperateDialog.d.ts +0 -7
- package/dist/types/widgets/PoolWidget/curve/Remove.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/curve/components/ApyTooltip.d.ts +0 -7
- package/dist/types/widgets/PoolWidget/curve/components/CoinReservePieChart.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/curve/components/CoinsLogoList.d.ts +0 -7
- package/dist/types/widgets/PoolWidget/curve/components/FilterAddressTags.d.ts +0 -7
- package/dist/types/widgets/PoolWidget/curve/components/LiquidityProvidersTable.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/curve/components/OperateButtonContainer.d.ts +0 -3
- package/dist/types/widgets/PoolWidget/curve/components/ParametersTable.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/curve/components/PoolTitle.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/curve/components/PoolTotalStats.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/curve/components/SlippageBonus.d.ts +0 -3
- package/dist/types/widgets/PoolWidget/curve/components/SwapsTable.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/curve/components/TokenListPoolItem.d.ts +0 -5
- package/dist/types/widgets/PoolWidget/curve/hooks/useLiquidityProviders.d.ts +0 -166
- package/dist/types/widgets/PoolWidget/curve/hooks/useLpTokenBalances.d.ts +0 -11
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolDetail.d.ts +0 -10
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolListFilterTokenAndPool.d.ts +0 -9
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolSwapList.d.ts +0 -166
- package/dist/types/widgets/PoolWidget/curve/types.d.ts +0 -44
- package/dist/types/widgets/PoolWidget/curve/utils.d.ts +0 -4
- /package/dist/types/hooks/{useAddressValidation.test.d.ts → Bridge/useFetchRoutePriceBridge.test.d.ts} +0 -0
- /package/dist/types/{tests/1-get-account-state.d.ts → hooks/Chain/useChainList.test.d.ts} +0 -0
- /package/dist/types/{tests/1-send-ton.d.ts → hooks/Swap/useFetchFiatPrice.test.d.ts} +0 -0
- /package/dist/types/{utils/sui_test.d.ts → hooks/Swap/useFetchRoutePrice.test.d.ts} +0 -0
- /package/dist/types/{utils/ton_test.d.ts → hooks/Swap/useMarginAmount.test.d.ts} +0 -0
- /package/dist/types/{hooks → widgets/MiningWidget/hooks}/useRefetch.d.ts +0 -0
|
@@ -1,84 +1,53 @@
|
|
|
1
|
-
import { Cross_Chain_Swap_Zetachain_RoutesQuery } from '@dodoex/api';
|
|
2
|
-
import BigNumber from 'bignumber.js';
|
|
3
|
-
import { useWalletInfo } from '../ConnectWallet/useWalletInfo';
|
|
4
1
|
import { TokenInfo } from '../Token';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// https://www.notion.so/dodotopia/V2-8-solana-USDC-A-Z-swap-246080d974e780439da0cbcca8284a2d?source=copy_link
|
|
14
|
-
svmRentFee
|
|
15
|
-
*/
|
|
16
|
-
type: 'platformFee' | 'btcDepositFee' | 'destinationFee' | 'protocolFees' | 'svmRentFee';
|
|
17
|
-
chainId: number;
|
|
18
|
-
token: string;
|
|
19
|
-
amount: string | number;
|
|
20
|
-
amountWithOutDecimals: string;
|
|
21
|
-
amountUSD: string;
|
|
22
|
-
};
|
|
23
|
-
export type CrossChainSwapZetachainRoute = {
|
|
24
|
-
routeId: string;
|
|
25
|
-
source: string;
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
export interface BridgeRouteI {
|
|
4
|
+
/** update */
|
|
5
|
+
key: string;
|
|
6
|
+
/** only one */
|
|
7
|
+
id: string;
|
|
8
|
+
fromToken: TokenInfo;
|
|
9
|
+
toToken: TokenInfo;
|
|
26
10
|
fromChainId: number;
|
|
27
|
-
fromTokenAddress: string;
|
|
28
|
-
fromAmount: string;
|
|
29
|
-
fromAmountWithOutDecimals: string;
|
|
30
|
-
fromAmountUSD: string;
|
|
31
11
|
toChainId: number;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
12
|
+
/** from parameter */
|
|
13
|
+
fromAmount: string;
|
|
14
|
+
toTokenAmount: BigNumber;
|
|
15
|
+
/** from parameter */
|
|
36
16
|
fromAddress: string;
|
|
37
17
|
toAddress: string;
|
|
18
|
+
/** from parameter */
|
|
19
|
+
product: string | null;
|
|
38
20
|
slippage: number;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
inputToken: string;
|
|
68
|
-
inAmount: string;
|
|
69
|
-
outputToken: string;
|
|
70
|
-
outAmount: string;
|
|
71
|
-
feeToken: string;
|
|
72
|
-
feeAmount: string;
|
|
73
|
-
assembleArgs: any;
|
|
74
|
-
}>;
|
|
75
|
-
}>;
|
|
76
|
-
encodeParams: {
|
|
77
|
-
interfaceParams: string;
|
|
21
|
+
/** in seconds */
|
|
22
|
+
roundedRouteCostTime: number;
|
|
23
|
+
/** approve contract address */
|
|
24
|
+
spenderContractAddress: string;
|
|
25
|
+
/** USD */
|
|
26
|
+
feeUSD: string | null;
|
|
27
|
+
/** in seconds */
|
|
28
|
+
executionDuration: number | null;
|
|
29
|
+
/** one-click */
|
|
30
|
+
step: BridgeStep;
|
|
31
|
+
encodeParams: any;
|
|
32
|
+
productParams: any;
|
|
33
|
+
sourceRoute: {
|
|
34
|
+
toAmount: string;
|
|
35
|
+
feeUSD: string | null;
|
|
36
|
+
executionDuration: number | null;
|
|
37
|
+
step: {
|
|
38
|
+
tool: string;
|
|
39
|
+
toolDetails: {
|
|
40
|
+
logoURI: string | null;
|
|
41
|
+
name: string | null;
|
|
42
|
+
key: string | null;
|
|
43
|
+
};
|
|
44
|
+
type: string | null;
|
|
45
|
+
approvalAddress: string;
|
|
46
|
+
includedSteps: any;
|
|
47
|
+
};
|
|
48
|
+
fee: any;
|
|
78
49
|
};
|
|
79
|
-
|
|
80
|
-
priceImpact: string | null;
|
|
81
|
-
};
|
|
50
|
+
}
|
|
82
51
|
export interface BridgeTokenI {
|
|
83
52
|
id: number;
|
|
84
53
|
symbol: string;
|
|
@@ -95,27 +64,11 @@ export interface BridgeStepTool {
|
|
|
95
64
|
logoURI: string;
|
|
96
65
|
}
|
|
97
66
|
export interface BridgeStepEstimate {
|
|
98
|
-
fromToken:
|
|
99
|
-
toToken:
|
|
67
|
+
fromToken: Pick<BridgeTokenI, 'address' | 'symbol' | 'chainId' | 'decimals'>;
|
|
68
|
+
toToken: Pick<BridgeTokenI, 'address' | 'symbol' | 'chainId' | 'decimals'>;
|
|
100
69
|
fromTokenAmount: BigNumber;
|
|
101
70
|
toTokenAmount: BigNumber;
|
|
102
71
|
}
|
|
103
|
-
export interface BridgeStepSwapStep {
|
|
104
|
-
ammKey: string;
|
|
105
|
-
label: string;
|
|
106
|
-
percent: number;
|
|
107
|
-
inputToken: TokenInfo;
|
|
108
|
-
inAmount: string;
|
|
109
|
-
outputToken: TokenInfo;
|
|
110
|
-
outAmount: string;
|
|
111
|
-
assembleArgs?: {
|
|
112
|
-
baseToken: string;
|
|
113
|
-
quoteToken: string;
|
|
114
|
-
pairAddress: string;
|
|
115
|
-
pairName: string;
|
|
116
|
-
id: string;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
72
|
export interface BridgeStep {
|
|
120
73
|
tool: string;
|
|
121
74
|
toolDetails: BridgeStepTool;
|
|
@@ -129,45 +82,8 @@ export interface BridgeStep {
|
|
|
129
82
|
toolDetails: BridgeStepTool;
|
|
130
83
|
type: string;
|
|
131
84
|
estimate: BridgeStepEstimate;
|
|
132
|
-
swapSteps?: Array<BridgeStepSwapStep>;
|
|
133
|
-
hash?: string;
|
|
134
|
-
hashChainId?: number;
|
|
135
85
|
}>;
|
|
136
86
|
}
|
|
137
|
-
export interface BridgeRouteI {
|
|
138
|
-
/** update */
|
|
139
|
-
key: string;
|
|
140
|
-
/** only one */
|
|
141
|
-
id: string;
|
|
142
|
-
fromToken: TokenInfo;
|
|
143
|
-
toToken: TokenInfo;
|
|
144
|
-
fromChainId: number;
|
|
145
|
-
toChainId: number;
|
|
146
|
-
/** from parameter */
|
|
147
|
-
fromAmount: string;
|
|
148
|
-
toTokenAmount: BigNumber;
|
|
149
|
-
/** from parameter */
|
|
150
|
-
fromAddress: string;
|
|
151
|
-
toAddress: string;
|
|
152
|
-
/** from parameter */
|
|
153
|
-
product: string | null;
|
|
154
|
-
slippage: number;
|
|
155
|
-
/** in seconds */
|
|
156
|
-
roundedRouteCostTime: number;
|
|
157
|
-
/** approve contract address */
|
|
158
|
-
spenderContractAddress: string | null;
|
|
159
|
-
/** USD */
|
|
160
|
-
feeUSD: string | null;
|
|
161
|
-
fees: Array<Fee>;
|
|
162
|
-
/** in seconds */
|
|
163
|
-
executionDuration: number | null;
|
|
164
|
-
/** one-click */
|
|
165
|
-
step: BridgeStep;
|
|
166
|
-
encodeParams: CrossChainSwapZetachainRoute['encodeParams'];
|
|
167
|
-
productParams: any;
|
|
168
|
-
sourceRoute: Cross_Chain_Swap_Zetachain_RoutesQuery['cross_chain_swap_zetachain_routes'];
|
|
169
|
-
priceImpact: string | null;
|
|
170
|
-
}
|
|
171
87
|
export declare enum RoutePriceStatus {
|
|
172
88
|
Initial = "Initial",
|
|
173
89
|
Loading = "Loading",
|
|
@@ -175,18 +91,12 @@ export declare enum RoutePriceStatus {
|
|
|
175
91
|
Success = "Success"
|
|
176
92
|
}
|
|
177
93
|
export interface FetchRoutePrice {
|
|
178
|
-
fromAccount: ReturnType<ReturnType<typeof useWalletInfo>['getAppKitAccountByChainId']>;
|
|
179
|
-
toAccount: ReturnType<ReturnType<typeof useWalletInfo>['getAppKitAccountByChainId']>;
|
|
180
94
|
fromToken: TokenInfo | null;
|
|
181
95
|
toToken: TokenInfo | null;
|
|
182
96
|
fromAmount: string;
|
|
183
|
-
enabled: boolean;
|
|
184
|
-
slippage: string | number;
|
|
185
97
|
}
|
|
186
|
-
export declare function useFetchRoutePriceBridge({
|
|
98
|
+
export declare function useFetchRoutePriceBridge({ toToken, fromToken, fromAmount, }: FetchRoutePrice): {
|
|
187
99
|
status: RoutePriceStatus;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
bridgeRouteList: never[] | BridgeRouteI[];
|
|
100
|
+
refetch: () => Promise<void>;
|
|
101
|
+
bridgeRouteList: BridgeRouteI[];
|
|
191
102
|
};
|
|
192
|
-
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { BridgeTXRequest } from '../../components/Bridge/BridgeSummaryDialog';
|
|
3
2
|
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
3
|
+
import { BridgeTXRequest } from '../../components/Bridge/BridgeSummaryDialog';
|
|
4
4
|
export declare function useSendRoute(): {
|
|
5
|
+
apikey: string | undefined;
|
|
5
6
|
sendRouteLoading: boolean;
|
|
6
7
|
sendRouteError: string;
|
|
7
8
|
setSendRouteError: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export declare function useSwitchBridgeOrSwapSlippage(isBridge: boolean | undefined):
|
|
2
|
-
showSwitchSlippage: boolean;
|
|
3
|
-
setShowSwitchSlippage: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
4
|
-
};
|
|
1
|
+
export declare function useSwitchBridgeOrSwapSlippage(isBridge: boolean | undefined): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
2
|
+
import { Actions, Connector } from '@web3-react/types';
|
|
3
|
+
export default class JsonRpcConnector extends Connector {
|
|
4
|
+
customProvider: JsonRpcProvider;
|
|
5
|
+
constructor(actions: Actions, customProvider: JsonRpcProvider, onError?: (error: Error) => void);
|
|
6
|
+
private activateAccounts;
|
|
7
|
+
connectEagerly(): Promise<void>;
|
|
8
|
+
activate(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getPharosTestnetSwitched(): boolean;
|
|
3
|
+
export declare function setPharosTestnetSwitched(isSwitched: boolean): void;
|
|
4
|
+
export declare function updatePharosTestnetRpc(chainId: ChainId, provider?: any): Promise<boolean | undefined>;
|
|
5
|
+
/**
|
|
6
|
+
* switch wallet chain
|
|
7
|
+
* @see https://docs.metamask.io/guide/rpc-api.html#usage-with-wallet-switchethereumchain
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerNetworkWithMetamask({ chainId, provider, }: {
|
|
10
|
+
chainId: ChainId;
|
|
11
|
+
provider?: any;
|
|
12
|
+
}): Promise<boolean>;
|
|
13
|
+
export declare function useSwitchChain(chainId?: ChainId): (() => Promise<boolean>) | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Provider as Eip1193Provider } from '@web3-react/types';
|
|
2
|
+
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
|
+
import { Web3Connection } from './web3';
|
|
5
|
+
import { WalletType } from '../../constants/wallet';
|
|
6
|
+
export interface Web3ConnectorsProps {
|
|
7
|
+
provider?: Eip1193Provider | JsonRpcProvider;
|
|
8
|
+
jsonRpcUrlMap?: {
|
|
9
|
+
[chainId: number]: string[];
|
|
10
|
+
};
|
|
11
|
+
defaultChainId?: ChainId;
|
|
12
|
+
}
|
|
13
|
+
export declare function useWeb3Connectors({ provider, jsonRpcUrlMap: jsonRpcUrlMapProps, defaultChainId, }: Web3ConnectorsProps): {
|
|
14
|
+
connectors: Web3Connection[];
|
|
15
|
+
key: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function connectToWallet(type: WalletType, chainId: number | undefined, onError: (error: Error) => void): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Web3ReactHooks } from '@web3-react/core';
|
|
2
|
+
import { Connector, Provider as Eip1193Provider } from '@web3-react/types';
|
|
3
|
+
import { JsonRpcProvider } from '@ethersproject/providers';
|
|
4
|
+
import { ChainId } from '@dodoex/api';
|
|
5
|
+
export type Web3Connection = [Connector, Web3ReactHooks];
|
|
6
|
+
export declare function getConnectionFromProvider(onError: (error: Error) => void, provider?: JsonRpcProvider | Eip1193Provider): Web3Connection | undefined;
|
|
7
|
+
export declare function getConnectionFromWalletConnect(useDefault: boolean, jsonRpcUrlMap: {
|
|
8
|
+
[chainId: number]: string[];
|
|
9
|
+
}, defaultChainId: ChainId | undefined, onError: (error: Error) => void): Web3Connection;
|
|
10
|
+
export declare function getConnectionFromMetaMask(onError: (error: Error) => void): Web3Connection;
|
|
@@ -27,11 +27,7 @@ export declare enum MetadataFlag {
|
|
|
27
27
|
claimMining = "claimMining",
|
|
28
28
|
submissionCreateMetaKey = "submissionCreateMetaKey",
|
|
29
29
|
approve = "approve",
|
|
30
|
-
reset = "reset"
|
|
31
|
-
curveAddLiquidity = "curveAddLiquidity",
|
|
32
|
-
curveRemoveLiquidityOneCoin = "curveRemoveLiquidityOneCoin",
|
|
33
|
-
curveRemoveLiquidity = "curveRemoveLiquidity",
|
|
34
|
-
curveRemoveLiquidityImBalance = "curveRemoveLiquidityImBalance"
|
|
30
|
+
reset = "reset"
|
|
35
31
|
}
|
|
36
32
|
export type Metadata = Record<string, any>;
|
|
37
33
|
export type Request = {
|
|
@@ -62,31 +58,7 @@ export interface Showing {
|
|
|
62
58
|
spec: StepSpec;
|
|
63
59
|
submitState?: SubmitState;
|
|
64
60
|
}
|
|
65
|
-
export interface ExecuteCustomHandlerParameters {
|
|
66
|
-
onSubmit: (tx: string, params?: {
|
|
67
|
-
reportInfo?: Record<string, any>;
|
|
68
|
-
showing?: Partial<Showing> | null;
|
|
69
|
-
}) => void;
|
|
70
|
-
onSuccess: (tx: string, params?: {
|
|
71
|
-
reportInfo?: Record<string, any>;
|
|
72
|
-
notShowingDone?: boolean;
|
|
73
|
-
showing?: Partial<Showing>;
|
|
74
|
-
}) => Promise<void>;
|
|
75
|
-
onError: (e: any) => void;
|
|
76
|
-
setShowing: React.Dispatch<React.SetStateAction<Showing | null>>;
|
|
77
|
-
}
|
|
78
61
|
export type ExecutionCtx = {
|
|
79
|
-
executeCustom: (params: {
|
|
80
|
-
brief: string;
|
|
81
|
-
subtitle?: string | React.ReactNode | null;
|
|
82
|
-
early?: boolean;
|
|
83
|
-
mixpanelProps?: Record<string, any>;
|
|
84
|
-
submittedBack?: () => void;
|
|
85
|
-
submittedConfirmBack?: () => void;
|
|
86
|
-
metadata?: Record<string, any>;
|
|
87
|
-
successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void;
|
|
88
|
-
handler: (params: ExecuteCustomHandlerParameters) => Promise<any>;
|
|
89
|
-
}) => Promise<ExecutionResult>;
|
|
90
62
|
/**
|
|
91
63
|
* Execute an on-chain operation
|
|
92
64
|
* @param breif: TX title. e.g.: "Swap"
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BigNumber as EthersBigNumber } from '@ethersproject/bignumber';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export default function useExecuteSwap(): ({
|
|
3
|
+
export default function useExecuteSwap(): ({ to, data, useSource, duration, ddl, gasLimit, subtitle, value, mixpanelProps, }: {
|
|
4
4
|
value: string;
|
|
5
|
-
from: string;
|
|
6
5
|
to: string;
|
|
7
6
|
data: string;
|
|
8
7
|
useSource?: string;
|
|
@@ -17,14 +17,13 @@ export interface FetchRoutePrice {
|
|
|
17
17
|
slippage?: number;
|
|
18
18
|
slippageLoading?: boolean;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
interface IRouteResponse {
|
|
21
21
|
resAmount: number;
|
|
22
22
|
priceImpact: number;
|
|
23
23
|
baseFeeAmount: number;
|
|
24
24
|
additionalFeeAmount: number;
|
|
25
25
|
resPricePerToToken: number;
|
|
26
26
|
resPricePerFromToken: number;
|
|
27
|
-
routeInfo: string;
|
|
28
27
|
to: string;
|
|
29
28
|
data: string;
|
|
30
29
|
value: string;
|
|
@@ -34,5 +33,8 @@ export interface IRouteResponse {
|
|
|
34
33
|
export declare function useFetchRoutePrice({ toToken, fromToken, fromAmount, toAmount, marginAmount, estimateGas, isReverseRouting, slippage, slippageLoading, }: FetchRoutePrice): {
|
|
35
34
|
status: RoutePriceStatus;
|
|
36
35
|
rawBrief: IRouteResponse | null;
|
|
36
|
+
refetch: () => Promise<void>;
|
|
37
37
|
executeSwap: (subtitle: React.ReactNode) => void;
|
|
38
|
+
reset: () => void;
|
|
38
39
|
};
|
|
40
|
+
export {};
|
|
@@ -32,6 +32,7 @@ export declare function useForecastSlippageList({ fromToken, toToken, }: {
|
|
|
32
32
|
isPaused: boolean;
|
|
33
33
|
isRefetching: boolean;
|
|
34
34
|
isStale: boolean;
|
|
35
|
+
isEnabled: boolean;
|
|
35
36
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
36
37
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
37
38
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -65,6 +66,7 @@ export declare function useForecastSlippageList({ fromToken, toToken, }: {
|
|
|
65
66
|
isPaused: boolean;
|
|
66
67
|
isRefetching: boolean;
|
|
67
68
|
isStale: boolean;
|
|
69
|
+
isEnabled: boolean;
|
|
68
70
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
69
71
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
70
72
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -98,6 +100,7 @@ export declare function useForecastSlippageList({ fromToken, toToken, }: {
|
|
|
98
100
|
isPaused: boolean;
|
|
99
101
|
isRefetching: boolean;
|
|
100
102
|
isStale: boolean;
|
|
103
|
+
isEnabled: boolean;
|
|
101
104
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
102
105
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
103
106
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -131,6 +134,7 @@ export declare function useForecastSlippageList({ fromToken, toToken, }: {
|
|
|
131
134
|
isPaused: boolean;
|
|
132
135
|
isRefetching: boolean;
|
|
133
136
|
isStale: boolean;
|
|
137
|
+
isEnabled: boolean;
|
|
134
138
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
135
139
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
136
140
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -164,6 +168,7 @@ export declare function useForecastSlippageList({ fromToken, toToken, }: {
|
|
|
164
168
|
isPaused: boolean;
|
|
165
169
|
isRefetching: boolean;
|
|
166
170
|
isStale: boolean;
|
|
171
|
+
isEnabled: boolean;
|
|
167
172
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
168
173
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
169
174
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -197,6 +202,7 @@ export declare function useForecastSlippageList({ fromToken, toToken, }: {
|
|
|
197
202
|
isPaused: boolean;
|
|
198
203
|
isRefetching: boolean;
|
|
199
204
|
isStale: boolean;
|
|
205
|
+
isEnabled: boolean;
|
|
200
206
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
201
207
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
202
208
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const useSlippageLimit: (slippageSwap
|
|
1
|
+
export declare const getMaxSlippageWarning: (chainId: number | undefined) => 5 | 32;
|
|
2
|
+
export declare const useSlippageLimit: (slippageSwap: number | undefined, chainId: number | undefined) => boolean;
|
|
@@ -23,15 +23,17 @@ interface SwapSettingState {
|
|
|
23
23
|
expertMode: boolean;
|
|
24
24
|
disableIndirectRouting: boolean;
|
|
25
25
|
}
|
|
26
|
-
export declare const useSwapSettingStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SwapSettingState>, "persist"> & {
|
|
26
|
+
export declare const useSwapSettingStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SwapSettingState>, "setState" | "persist"> & {
|
|
27
|
+
setState(partial: SwapSettingState | Partial<SwapSettingState> | ((state: SwapSettingState) => SwapSettingState | Partial<SwapSettingState>), replace?: false | undefined): unknown;
|
|
28
|
+
setState(state: SwapSettingState | ((state: SwapSettingState) => SwapSettingState), replace: true): unknown;
|
|
27
29
|
persist: {
|
|
28
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState>>) => void;
|
|
30
|
+
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState, unknown>>) => void;
|
|
29
31
|
clearStorage: () => void;
|
|
30
32
|
rehydrate: () => Promise<void> | void;
|
|
31
33
|
hasHydrated: () => boolean;
|
|
32
34
|
onHydrate: (fn: (state: SwapSettingState) => void) => () => void;
|
|
33
35
|
onFinishHydration: (fn: (state: SwapSettingState) => void) => () => void;
|
|
34
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState>>;
|
|
36
|
+
getOptions: () => Partial<import("zustand/middleware").PersistOptions<SwapSettingState, SwapSettingState, unknown>>;
|
|
35
37
|
};
|
|
36
38
|
}>;
|
|
37
39
|
export {};
|
|
@@ -30,6 +30,7 @@ export declare function useSwapSlippage({ fromToken, toToken, }: {
|
|
|
30
30
|
isPaused: boolean;
|
|
31
31
|
isRefetching: boolean;
|
|
32
32
|
isStale: boolean;
|
|
33
|
+
isEnabled: boolean;
|
|
33
34
|
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
34
35
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
35
36
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -63,6 +64,7 @@ export declare function useSwapSlippage({ fromToken, toToken, }: {
|
|
|
63
64
|
isPaused: boolean;
|
|
64
65
|
isRefetching: boolean;
|
|
65
66
|
isStale: boolean;
|
|
67
|
+
isEnabled: boolean;
|
|
66
68
|
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
67
69
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
68
70
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -96,6 +98,7 @@ export declare function useSwapSlippage({ fromToken, toToken, }: {
|
|
|
96
98
|
isPaused: boolean;
|
|
97
99
|
isRefetching: boolean;
|
|
98
100
|
isStale: boolean;
|
|
101
|
+
isEnabled: boolean;
|
|
99
102
|
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
100
103
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
101
104
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -129,6 +132,7 @@ export declare function useSwapSlippage({ fromToken, toToken, }: {
|
|
|
129
132
|
isPaused: boolean;
|
|
130
133
|
isRefetching: boolean;
|
|
131
134
|
isStale: boolean;
|
|
135
|
+
isEnabled: boolean;
|
|
132
136
|
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
133
137
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
134
138
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -162,6 +166,7 @@ export declare function useSwapSlippage({ fromToken, toToken, }: {
|
|
|
162
166
|
isPaused: boolean;
|
|
163
167
|
isRefetching: boolean;
|
|
164
168
|
isStale: boolean;
|
|
169
|
+
isEnabled: boolean;
|
|
165
170
|
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
166
171
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
167
172
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|
|
@@ -195,6 +200,7 @@ export declare function useSwapSlippage({ fromToken, toToken, }: {
|
|
|
195
200
|
isPaused: boolean;
|
|
196
201
|
isRefetching: boolean;
|
|
197
202
|
isStale: boolean;
|
|
203
|
+
isEnabled: boolean;
|
|
198
204
|
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery, Error>>;
|
|
199
205
|
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
200
206
|
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").FetchErc20ForecastSlippageQuery>;
|