@dodoex/widgets 3.0.2-zetachain.11 → 3.0.2-zetachain.110.ton.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- 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-BTJpgu2t.js} +1 -1
- package/dist/{helper-DCJJEnV3.cjs → helper-DIkbm_U5.cjs} +1 -1
- package/dist/{index-DVLnDJLQ.cjs → index-6EYQJsAq.cjs} +4 -4
- package/dist/{index-CzpL7rfy.js → index-8hgb8akZ.js} +4 -4
- package/dist/index-BENIDbsM.js +34 -0
- package/dist/index-CpuninTL.cjs +34 -0
- package/dist/{index-CGy_7PS2.cjs → index-DR4KO5Dk.cjs} +2 -2
- package/dist/{index-Bg8rd10E.js → index-DwtxxFKB.js} +2 -2
- 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 +6 -0
- package/dist/types/constants/api.d.ts +95 -4
- package/dist/types/constants/chainList.d.ts +8 -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 +27 -32
- package/dist/types/router/types.d.ts +5 -0
- package/dist/types/utils/CaipNetworksUtil.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/index.d.ts +2 -2
- package/dist/types/utils/reown-types.d.ts +28 -0
- package/dist/types/utils/solana.d.ts +7 -0
- package/dist/types/utils/ton.d.ts +3 -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 +30 -27
- package/dist/28442382d977858a.svg +0 -9
- package/dist/assets/bundle-DSSoJu9z.css +0 -297
- package/dist/ed726d76d93d4899.svg +0 -10
- 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/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/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
- /package/dist/types/{hooks/Chain/useChainList.test.d.ts → tests/1-get-account-state.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useFetchFiatPrice.test.d.ts → tests/1-send-ton.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useFetchRoutePrice.test.d.ts → utils/sui_test.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useMarginAmount.test.d.ts → utils/ton_test.d.ts} +0 -0
|
@@ -9,25 +9,34 @@ export declare function CardStatus({ loading, empty, hasSearch, children, refetc
|
|
|
9
9
|
hasSearch?: boolean;
|
|
10
10
|
refetch?: () => void;
|
|
11
11
|
}>): import("react").JSX.Element;
|
|
12
|
-
export default function FoldBtn({ show, onClick, }: {
|
|
12
|
+
export default function FoldBtn({ show, onClick, sx, }: {
|
|
13
13
|
show: boolean;
|
|
14
14
|
onClick: () => void;
|
|
15
|
+
sx?: BoxProps['sx'];
|
|
15
16
|
}): import("react").JSX.Element;
|
|
16
17
|
export declare function TypeText({ color, type }: {
|
|
17
18
|
color: string;
|
|
18
19
|
type: string;
|
|
19
20
|
}): import("react").JSX.Element;
|
|
20
|
-
export declare function StatusAndTime({ isMobile, statusText, statusColor: statusColorProps, time, alphaColor, sx, }: {
|
|
21
|
+
export declare function StatusAndTime({ isMobile, statusText, statusColor: statusColorProps, time, alphaColor, sx, children, }: {
|
|
21
22
|
isMobile: boolean;
|
|
22
23
|
statusText: string;
|
|
23
24
|
statusColor: string;
|
|
24
25
|
time?: string;
|
|
25
26
|
alphaColor?: number;
|
|
26
27
|
sx?: BoxProps['sx'];
|
|
28
|
+
children?: React.ReactNode;
|
|
27
29
|
}): import("react").JSX.Element;
|
|
28
30
|
export declare function ChainName({ chainId }: {
|
|
29
31
|
chainId: ChainId;
|
|
30
32
|
}): import("react").JSX.Element | null;
|
|
33
|
+
export declare function MobileTokenAndAmount({ token, amount, canAddMetamask, title, linkVisible, }: {
|
|
34
|
+
token: TokenInfo | undefined;
|
|
35
|
+
amount: string | BigNumber | null;
|
|
36
|
+
canAddMetamask?: boolean;
|
|
37
|
+
title: string;
|
|
38
|
+
linkVisible?: boolean;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
31
40
|
export declare function TokenAndAmount({ token, amount, showChain, hideLogo, canAddMetamask, sx, }: {
|
|
32
41
|
token: TokenInfo;
|
|
33
42
|
amount: string | BigNumber;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useCrossSwapOrderList } from '../../../hooks/Swap/useCrossSwapOrderList';
|
|
3
|
+
export default function CrossOrderCard({ data, isMobile, isErrorRefund, }: {
|
|
4
|
+
data: NonNullable<ReturnType<typeof useCrossSwapOrderList>['orderList'][0]>;
|
|
5
|
+
isMobile: boolean;
|
|
6
|
+
isErrorRefund: boolean;
|
|
7
|
+
}): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
export declare enum SwapOrderHistoryTab {
|
|
2
|
+
sameChain = "same-chain",
|
|
3
|
+
crossChain = "cross-chain",
|
|
4
|
+
errorRefunds = "error-refunds"
|
|
5
|
+
}
|
|
6
|
+
export default function SwapOrderHistory(): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const transitionTime = 300;
|
|
2
2
|
export interface DialogProps {
|
|
3
3
|
open: boolean;
|
|
4
|
-
id?: 'connect-wallet' | 'submission' | 'error-message' | 'select-chain' | 'select-token' | 'swap-summary' | 'swap-settings' | 'cross-chain-summary' | 'select-cross-chain' | 'pool-operate';
|
|
4
|
+
id?: 'connect-wallet' | 'submission' | 'error-message' | 'select-chain' | 'select-token' | 'swap-summary' | 'swap-settings' | 'cross-chain-summary' | 'select-cross-chain' | 'pool-operate' | 'curve-pool-operate';
|
|
5
5
|
onClose?: () => void;
|
|
6
6
|
afterClose?: () => void;
|
|
7
7
|
scope?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FiatEntryAndGasRefuel(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
export interface ReceiveAddressInputModalProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
inputToAddress: string | null;
|
|
8
|
+
setInputToAddress: Dispatch<SetStateAction<string | null>>;
|
|
9
|
+
}
|
|
10
|
+
export declare const ReceiveAddressInputModal: ({ chainId, open, onClose, inputToAddress, setInputToAddress, }: ReceiveAddressInputModalProps) => import("react").JSX.Element;
|
|
@@ -18,5 +18,6 @@ export interface ReviewDialogProps {
|
|
|
18
18
|
pricePerFromToken: number | null;
|
|
19
19
|
loading: boolean;
|
|
20
20
|
slippage: string | number | null;
|
|
21
|
+
isDialogModal: boolean;
|
|
21
22
|
}
|
|
22
|
-
export declare function ReviewDialog({ open, execute, onClose, toToken, fromToken, fromAmount, toAmount, priceImpact, clearFromAmt, clearToAmt, baseFeeAmount, curToFiatPrice, curFromFiatPrice, pricePerFromToken, additionalFeeAmount, loading, slippage, }: ReviewDialogProps): import("react").JSX.Element;
|
|
23
|
+
export declare function ReviewDialog({ open, execute, onClose, toToken, fromToken, fromAmount, toAmount, priceImpact, clearFromAmt, clearToAmt, baseFeeAmount, curToFiatPrice, curFromFiatPrice, pricePerFromToken, additionalFeeAmount, loading, slippage, isDialogModal, }: ReviewDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
export interface RouteVisionModalProps {
|
|
3
|
+
routeInfo: string | null;
|
|
4
|
+
toToken: TokenInfo;
|
|
5
|
+
fromToken: TokenInfo;
|
|
6
|
+
}
|
|
7
|
+
export declare const RouteVisionModal: ({ routeInfo, toToken, fromToken, }: RouteVisionModalProps) => import("react").JSX.Element;
|
|
@@ -2,5 +2,6 @@ export interface SettingsDialogProps {
|
|
|
2
2
|
open: boolean;
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
isBridge: boolean | undefined;
|
|
5
|
+
isDialogModal: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare function SettingsDialog({ open, onClose, isBridge, }: SettingsDialogProps): import("react").JSX.Element;
|
|
7
|
+
export declare function SettingsDialog({ open, onClose, isBridge, isDialogModal, }: SettingsDialogProps): import("react").JSX.Element;
|
|
@@ -6,5 +6,6 @@ export interface SwapSettingsDialogProps {
|
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
fromToken?: TokenInfo | null;
|
|
8
8
|
toToken?: TokenInfo | null;
|
|
9
|
+
isDialogModal: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare function SwapSettingsDialog({ open, onClose, fromToken, toToken, privacySwapEnableAble, privacySwapEnable, privacySwapSupplierEndpoints, endpointStatusMap, refetchEndpointStatus, }: SwapSettingsDialogProps & Pick<ReturnType<typeof usePrivacySwapStatus>, 'endpointStatusMap' | 'privacySwapSupplierEndpoints' | 'privacySwapEnable' | 'privacySwapEnableAble' | 'refetchEndpointStatus'>): React.JSX.Element;
|
|
11
|
+
export declare function SwapSettingsDialog({ open, onClose, fromToken, toToken, privacySwapEnableAble, privacySwapEnable, privacySwapSupplierEndpoints, endpointStatusMap, refetchEndpointStatus, isDialogModal, }: SwapSettingsDialogProps & Pick<ReturnType<typeof usePrivacySwapStatus>, 'endpointStatusMap' | 'privacySwapSupplierEndpoints' | 'privacySwapEnable' | 'privacySwapEnableAble' | 'refetchEndpointStatus'>): React.JSX.Element;
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { ChainId } from '@dodoex/api';
|
|
2
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
3
3
|
import BigNumber from 'bignumber.js';
|
|
4
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
5
|
+
import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo';
|
|
4
6
|
import { BalanceData } from '../../../../hooks/Submission/useBalanceUpdateLoading';
|
|
5
7
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
6
8
|
import { TokenPickerProps } from '../../../TokenPicker';
|
|
7
9
|
export interface TokenCardProps {
|
|
8
10
|
amt: string;
|
|
9
11
|
fiatPriceTxt?: string | React.ReactNode;
|
|
12
|
+
failedReason?: React.ReactNode;
|
|
10
13
|
sx?: BoxProps['sx'];
|
|
11
|
-
inputSx?: BoxProps['sx'];
|
|
12
14
|
readOnly?: boolean;
|
|
13
15
|
showMaxBtn?: boolean;
|
|
14
16
|
canClickBalance?: boolean;
|
|
15
17
|
occupiedAddrs?: string[];
|
|
18
|
+
showAddrs?: string[];
|
|
16
19
|
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
17
20
|
onMaxClick?: (max: string) => void;
|
|
18
21
|
token?: TokenInfo | null;
|
|
@@ -30,9 +33,16 @@ export interface TokenCardProps {
|
|
|
30
33
|
showPercentage?: boolean;
|
|
31
34
|
inputReadonlyTooltip?: React.ReactNode;
|
|
32
35
|
inputTypography?: string;
|
|
33
|
-
chainId?: ChainId;
|
|
34
36
|
hideToken?: boolean;
|
|
35
37
|
checkLogBalance?: BalanceData;
|
|
36
38
|
notTokenPickerModal?: boolean;
|
|
39
|
+
enterAddressEnabled?: boolean;
|
|
40
|
+
inputToAddress: string | null;
|
|
41
|
+
setInputToAddress: Dispatch<SetStateAction<string | null>>;
|
|
42
|
+
account: ReturnType<ReturnType<typeof useWalletInfo>['getAppKitAccountByChainId']>;
|
|
43
|
+
tokenQuery: UseQueryResult<{
|
|
44
|
+
balance: BigNumber;
|
|
45
|
+
} | null, Error>;
|
|
46
|
+
filterBySupportTargetChain?: boolean;
|
|
37
47
|
}
|
|
38
|
-
export declare function TokenCardSwap({ sx,
|
|
48
|
+
export declare function TokenCardSwap({ sx, amt, token, readOnly, showMaxBtn, canClickBalance, onMaxClick, fiatPriceTxt, failedReason, occupiedAddrs, occupiedChainId, showAddrs, onInputFocus, onTokenClick, onInputChange, onTokenChange, side, showChainLogo, showChainName, defaultLoadBalance, overrideBalance, overrideBalanceLoading, balanceText, showPercentage, inputReadonlyTooltip, inputTypography, hideToken, checkLogBalance, notTokenPickerModal, enterAddressEnabled, inputToAddress, setInputToAddress, account, tokenQuery, filterBySupportTargetChain, }: TokenCardProps): import("react").JSX.Element;
|
|
@@ -5,6 +5,7 @@ export interface TokenPickerDialogProps {
|
|
|
5
5
|
title?: React.ReactNode | string;
|
|
6
6
|
occupiedAddrs?: string[];
|
|
7
7
|
hiddenAddrs?: string[];
|
|
8
|
+
showAddrs?: string[];
|
|
8
9
|
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
9
10
|
onClose: DialogProps['onClose'];
|
|
10
11
|
value?: TokenPickerProps['value'];
|
|
@@ -16,5 +17,6 @@ export interface TokenPickerDialogProps {
|
|
|
16
17
|
searchOtherAddress?: TokenPickerProps['searchOtherAddress'];
|
|
17
18
|
chainId?: TokenPickerProps['chainId'];
|
|
18
19
|
modal?: boolean;
|
|
20
|
+
filterBySupportTargetChain?: boolean;
|
|
19
21
|
}
|
|
20
22
|
export declare function TokenPickerDialog(props: TokenPickerDialogProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo';
|
|
1
3
|
import { TokenInfo } from '../../../../hooks/Token/type';
|
|
2
4
|
export interface Props {
|
|
3
5
|
token: TokenInfo;
|
|
6
|
+
enterAddressEnabled?: boolean;
|
|
7
|
+
inputToAddress: string | null;
|
|
8
|
+
setInputToAddress: Dispatch<SetStateAction<string | null>>;
|
|
9
|
+
account: ReturnType<ReturnType<typeof useWalletInfo>['getAppKitAccountByChainId']>;
|
|
4
10
|
}
|
|
5
|
-
export declare const WalletConnectBtn: ({ token }: Props) => import("react").JSX.Element;
|
|
11
|
+
export declare const WalletConnectBtn: ({ token, enterAddressEnabled, inputToAddress, setInputToAddress, account, }: Props) => import("react").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { TokenInfo } from '../../../hooks/Token';
|
|
2
1
|
import { RoutePriceStatus } from '../../../hooks/Swap';
|
|
3
|
-
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
export declare function TokenPairPriceWithToggle({ toToken, fromToken, priceStatus, pricePerToToken, pricePerFromToken, routeInfo, }: {
|
|
4
4
|
toToken: TokenInfo | null;
|
|
5
5
|
fromToken: TokenInfo | null;
|
|
6
6
|
priceStatus: RoutePriceStatus;
|
|
7
7
|
pricePerToToken: number | null;
|
|
8
8
|
pricePerFromToken: number | null;
|
|
9
|
+
routeInfo: string | null;
|
|
9
10
|
}): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TokenInfo } from '../../hooks/Token/type';
|
|
2
1
|
import { GetAutoSlippage } from '../../hooks/setting/useSetAutoSlippage';
|
|
2
|
+
import { TokenInfo } from '../../hooks/Token/type';
|
|
3
3
|
export interface SwapProps {
|
|
4
4
|
/** Higher priority setting slippage */
|
|
5
5
|
getAutoSlippage?: GetAutoSlippage;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
1
2
|
import { CSSProperties } from 'react';
|
|
2
3
|
import { TokenInfo } from './../../hooks/Token';
|
|
3
|
-
|
|
4
|
-
export default function TokenItem({ token, disabled, style, balance: balanceBigNumber, onClick, }: {
|
|
4
|
+
export default function TokenItem({ token, disabled, style, balance: balanceBigNumber, onSelect, }: {
|
|
5
5
|
token: TokenInfo;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
balance?: BigNumber;
|
|
9
|
-
|
|
9
|
+
onSelect: (token: TokenInfo) => void;
|
|
10
10
|
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { BoxProps } from '@dodoex/components';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
import type { TokenInfo } from '../../hooks/Token';
|
|
4
|
-
import { ChainId } from '@dodoex/api';
|
|
5
4
|
export interface TokenPickerProps {
|
|
6
5
|
chainId?: ChainId;
|
|
7
6
|
value?: TokenInfo | null | Array<TokenInfo>;
|
|
@@ -22,5 +21,6 @@ export interface TokenPickerProps {
|
|
|
22
21
|
/** like search pool address */
|
|
23
22
|
searchOtherAddress?: (address: string) => Promise<JSX.Element | null>;
|
|
24
23
|
sx?: BoxProps['sx'];
|
|
24
|
+
filterBySupportTargetChain?: boolean;
|
|
25
25
|
}
|
|
26
|
-
export default function TokenPicker({ chainId, value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, visible, side, defaultLoadBalance, multiple, searchPlaceholder, searchOtherAddress, sx, }: TokenPickerProps):
|
|
26
|
+
export default function TokenPicker({ chainId, value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, visible, side, defaultLoadBalance, multiple, searchPlaceholder, searchOtherAddress, sx, filterBySupportTargetChain, }: TokenPickerProps): import("react").JSX.Element;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import { ChainId,
|
|
1
|
+
import { ChainId, GraphQLRequests } from '@dodoex/api';
|
|
2
|
+
import type { WalletStore } from '@dodoex/btc-connect-react';
|
|
2
3
|
import { EmptyDataIcon, PaletteMode, ThemeOptions } from '@dodoex/components';
|
|
4
|
+
import { Connection } from '@solana/web3.js';
|
|
3
5
|
import { PropsWithChildren } from 'react';
|
|
4
6
|
import { APIServices } from '../../constants/api';
|
|
5
7
|
import { SupportedLang } from '../../constants/locales';
|
|
6
|
-
import { Web3ConnectorsProps } from '../../hooks/ConnectWallet';
|
|
7
8
|
import { ExecutionProps } from '../../hooks/Submission';
|
|
9
|
+
import { ExecutionCtx } from '../../hooks/Submission/types';
|
|
8
10
|
import { DefaultTokenInfo, TokenInfo } from '../../hooks/Token/type';
|
|
9
11
|
import { InitTokenListProps } from '../../hooks/Token/useInitTokenList';
|
|
12
|
+
import { Page } from '../../router';
|
|
10
13
|
import { ConfirmProps } from '../Confirm';
|
|
11
14
|
import { DialogProps } from '../Swap/components/Dialog';
|
|
12
|
-
import { Page } from '../../router';
|
|
13
|
-
import { ExecutionCtx } from '../../hooks/Submission/types';
|
|
14
15
|
import { TokenPickerDialogProps } from '../Swap/components/TokenCard/TokenPickerDialog';
|
|
15
16
|
export declare const WIDGET_CLASS_NAME = "dodo-widget-container";
|
|
16
|
-
export interface WidgetProps extends
|
|
17
|
+
export interface WidgetProps extends InitTokenListProps, ExecutionProps {
|
|
17
18
|
apikey?: string;
|
|
19
|
+
GRAPHQL_URL: string;
|
|
20
|
+
IS_TEST_ENV: boolean;
|
|
18
21
|
theme?: PartialDeep<ThemeOptions>;
|
|
19
22
|
colorMode?: PaletteMode;
|
|
20
23
|
defaultChainId: ChainId;
|
|
@@ -43,14 +46,11 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
43
46
|
notSupportPMM?: boolean;
|
|
44
47
|
supportAMMV2?: boolean;
|
|
45
48
|
supportAMMV3?: boolean;
|
|
49
|
+
supportCurve?: boolean;
|
|
46
50
|
/** When the winding status changes, no pop-up window will be displayed. */
|
|
47
51
|
noSubmissionDialog?: boolean;
|
|
48
|
-
|
|
49
|
-
getStaticJsonRpcProviderByChainId?: Exclude<ConstructorParameters<typeof ContractRequests>[0], undefined>['getProvider'];
|
|
52
|
+
submissionDialogModal?: boolean;
|
|
50
53
|
widgetRef?: React.RefObject<HTMLDivElement>;
|
|
51
|
-
/** If true is returned, the default wallet connection logic will not be executed */
|
|
52
|
-
onConnectWalletClick?: () => boolean | Promise<boolean>;
|
|
53
|
-
onSwitchChain?: (chainId?: ChainId) => Promise<boolean>;
|
|
54
54
|
/** When the token balance is insufficient, users can purchase or swap callbacks */
|
|
55
55
|
gotoBuyToken?: (params: {
|
|
56
56
|
token: TokenInfo;
|
|
@@ -90,6 +90,8 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
90
90
|
/** Default deadLine when it cannot be set. Unit: seconds */
|
|
91
91
|
deadLine?: number;
|
|
92
92
|
submission?: ExecutionCtx;
|
|
93
|
+
solanaConnection?: Connection;
|
|
94
|
+
btcWalletStore?: WalletStore;
|
|
93
95
|
}
|
|
94
96
|
export { LangProvider } from '../../providers/i18n';
|
|
95
97
|
export { default as Message } from '../Message';
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
export declare const EmptyAddress = "0x0000000000000000000000000000000000000000";
|
|
3
|
+
export declare const solanaFallbackAddress = "CVVQYs9Pi3t4it4KFpm3hxk97uDA6AVzNVJvGQTPH17n";
|
|
4
|
+
export declare const btcFallbackAddress = "tb1qcrd8yvatjzpxl0ew29jsps2z595jpwtm5mj38v";
|
|
5
|
+
export declare const suiFallbackAddress = "0xf5361d9079c5769b7b0c83841357f8f5b96d48b0477e1721e81c875ac7277e73";
|
|
6
|
+
export declare const tonFallbackAddress = "0QArAJPiEbfybbhm4XYU2ve5fIMozDvZvqU7wpVoKd-xJcRd";
|
|
7
|
+
export declare const getFallbackAddress: (chainId: ChainId | undefined) => string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ContractRequests, TokenApi
|
|
1
|
+
import { ChainId, ContractRequests, TokenApi } from '@dodoex/api';
|
|
2
2
|
export declare enum APIServiceKey {
|
|
3
3
|
routePrice = "routePrice",
|
|
4
|
+
solanaRoutePrice = "solanaRoutePrice",
|
|
4
5
|
fiatPrice = "fiatPrice",
|
|
5
6
|
bridgeRoutePrice = "bridgeRoutePrice",
|
|
6
7
|
bridgeEncode = "bridgeEncode",
|
|
@@ -11,9 +12,99 @@ export type APIServices = {
|
|
|
11
12
|
};
|
|
12
13
|
export declare const AppUrl = "https://app.dodoex.io";
|
|
13
14
|
export declare const getCGTokenListAPI: (chainId: ChainId) => any;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
https://api.dodoex.io/route-service/zetachain/swap?apikey=d5f476a6fd58e5e989&slippage=5&chainId=7001&source=dodoMix&fromTokenAddress=0x4bC32034caCcc9B7e02536945eDbC286bACbA073&toTokenAddress=0xcC683A782f4B30c138787CB5576a86AF66fdc31d&fromAmount=100000&userAddr=0x996AF9757c4995A91E3A9b2fAd59e72eE4436382
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
{
|
|
20
|
+
"status": 200,
|
|
21
|
+
"data": {
|
|
22
|
+
"resAmount": 0.100184,
|
|
23
|
+
"resPricePerToToken": 0.9981633793819373,
|
|
24
|
+
"resPricePerFromToken": 1.0018399999999998,
|
|
25
|
+
"priceImpact": 0,
|
|
26
|
+
"useSource": "DODORoute",
|
|
27
|
+
"targetDecimals": 6,
|
|
28
|
+
"targetApproveAddr": "0x143bE32C854E4Ddce45aD48dAe3343821556D0c3",
|
|
29
|
+
"to": "0x026eea5c10f526153e7578E5257801f8610D1142",
|
|
30
|
+
"data": "0xff84aafa0000000000000000000000004bc32034caccc9b7e02536945edbc286bacba073000000000000000000000000cc683a782f4b30c138787cb5576a86af66fdc31d00000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000001875800000000000000000000000000000000000000000000000000000000000173c6000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000682d987600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000f9053e174c123098c17e60a2b1fab3b303f9e2900000000000000000000000000000000000000000000000000000000000000010000000000000000000000004f59b88556c1b133939b2655729ad53226ed5fad00000000000000000000000000000000000000000000000000000000000000020000000000000000000000004f59b88556c1b133939b2655729ad53226ed5fad000000000000000000000000026eea5c10f526153e7578e5257801f8610d11420000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
31
|
+
"minReturnAmount": "95174",
|
|
32
|
+
"gasLimit": "0",
|
|
33
|
+
"routeInfo": {
|
|
34
|
+
"subRouteTotalPart": 100,
|
|
35
|
+
"subRoute": [
|
|
36
|
+
{
|
|
37
|
+
"midPathPart": 100,
|
|
38
|
+
"midPath": [
|
|
39
|
+
{
|
|
40
|
+
"fromToken": "0x4bc32034caccc9b7e02536945edbc286bacba073",
|
|
41
|
+
"toToken": "0xcc683a782f4b30c138787cb5576a86af66fdc31d",
|
|
42
|
+
"oneSplitTotalPart": 20,
|
|
43
|
+
"poolDetails": [
|
|
44
|
+
{
|
|
45
|
+
"poolName": "DODOV2",
|
|
46
|
+
"pool": "0x4f59b88556c1b133939b2655729ad53226ed5fad",
|
|
47
|
+
"poolPart": 20,
|
|
48
|
+
"poolInAmount": "100000",
|
|
49
|
+
"poolOutAmount": "100184"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"fromAmount": "100000",
|
|
53
|
+
"toAmount": "100184"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"value": "0",
|
|
60
|
+
"id": "4767a82128f23ea114ae4f05c4faef21"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
*/
|
|
65
|
+
export declare const RoutePriceAPI = "https://api.dodoex.io/route-service/zetachain/swap";
|
|
66
|
+
/**
|
|
67
|
+
https://api.dodoex.io/route-service/zetachain/svm/swap?apikey=d5f476a6fd58e5e989&inputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&outputMint=Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB&amount=1000000&user=CjeWeg7Pfyq5VcakxaUwBHCZoEePKYuZTYgfkXaaiCw3&chainId=solana-mainnet&slippageBps=32&source=jupiter
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
{
|
|
71
|
+
"status": 200,
|
|
72
|
+
"data": {
|
|
73
|
+
"resAmount": 0.999554,
|
|
74
|
+
"priceImpact": 0.00010563595848026669,
|
|
75
|
+
"useSource": "Jupiter",
|
|
76
|
+
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
77
|
+
"inAmount": "1000000",
|
|
78
|
+
"inputMintDecimal": 6,
|
|
79
|
+
"outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
|
|
80
|
+
"outAmount": "999554",
|
|
81
|
+
"outputMintDecimal": 6,
|
|
82
|
+
"minOutAmount": "996356",
|
|
83
|
+
"inAmountWithOutDecimals": 1,
|
|
84
|
+
"outAmountWithOutDecimals": 0.999554,
|
|
85
|
+
"slippageBps": 32,
|
|
86
|
+
"routePlan": [
|
|
87
|
+
{
|
|
88
|
+
"swapInfo": {
|
|
89
|
+
"ammKey": "5K7CHUbBYAh6wrantyJvDDqwT4VoKuZTi73CN1DTUUer",
|
|
90
|
+
"label": "Stabble Stable Swap",
|
|
91
|
+
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
92
|
+
"outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
|
|
93
|
+
"inAmount": "1000000",
|
|
94
|
+
"outAmount": "999554",
|
|
95
|
+
"feeAmount": "10",
|
|
96
|
+
"feeMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
|
|
97
|
+
},
|
|
98
|
+
"percent": 100
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"data": "AIABAAgLrl1dPXkIuWhzYVhFtYxb+JQ3GoZqa2pq14bW0E52rOJp7jJXlYhamzIeZUst3brLJbcQ9ZMduX/Gud3GUE0+/6/x/V52dT9Bjl8YSwqdPxo1PUQ8QzrmBC38ogNXtRwqxvp6877brTo9ZfNqq8l0MbG75MLS9uDkfKYCA0UvXWHOAQ5gr+2yJxe9YxkvVBRaP5ZaM7uC0scCnrLOHiCCZIyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEedVb8jHAbu50xW7OaBUH/bGy3qP0jlECsc2iVrwTj7Q/+if11/ZKdMCbHylYed5LCas238ndUUsyGqezjOXoAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAABynzuLbKQ30Ca3pj/0Wq5lWzvmdbFt2OddEbICsJmWXzN8dj2NJQ6itko+eogXWBEuAwQlfGA3cbUcKdhqHrdTAgkABQKcQBAACh4AAwQCAQ8FBg8AAgEHBAcIBxAAAgELDA0OERITFA9H4a81SdQvNO1AQg8AAAAAAIJADwAAAAAABDQPAAAAAAAjAAAA5RfLl3rjrSoBAAAAOGQAAUBCDwAAAAAAgkAPAAAAAAAgAAABWX05K6qoNBpFvohhQGiBxG4ZEV+GAgS6FrxyNTh9k9oETqYKoQYEERQMDQc=",
|
|
102
|
+
"lastValidBlockHeight": 319671584
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
*/
|
|
106
|
+
export declare const SolanaRoutePriceAPI = "https://api.dodoex.io/route-service/zetachain/svm/swap";
|
|
107
|
+
export declare const FiatPriceAPI = "https://api.dodoex.io/frontend-price-api-v2/current/batch";
|
|
16
108
|
export declare function getAPIService(key: APIServiceKey, serviceProps?: Partial<APIServices>): string;
|
|
17
109
|
export declare const contractRequests: ContractRequests;
|
|
18
|
-
export declare const tokenContractRequests: ContractRequests;
|
|
19
110
|
export declare const tokenApi: TokenApi;
|
|
@@ -1,51 +1,20 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import { AppKitNetwork } from '@reown/appkit/networks';
|
|
3
3
|
import { ReactComponent as ETHereumLogo } from '../assets/logo/networks/eth.svg';
|
|
4
|
-
export declare const zetachainTestnet: {
|
|
5
|
-
blockExplorers: {
|
|
6
|
-
readonly default: {
|
|
7
|
-
readonly name: "ZetaScan";
|
|
8
|
-
readonly url: "https://zetachain-testnet.blockscout.com";
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
contracts: {
|
|
12
|
-
readonly multicall3: {
|
|
13
|
-
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
14
|
-
readonly blockCreated: 2715217;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
ensTlds?: readonly string[] | undefined;
|
|
18
|
-
name: "ZetaChain testnet";
|
|
19
|
-
nativeCurrency: {
|
|
20
|
-
readonly decimals: 18;
|
|
21
|
-
readonly name: "tZETA";
|
|
22
|
-
readonly symbol: "tZETA";
|
|
23
|
-
};
|
|
24
|
-
rpcUrls: {
|
|
25
|
-
readonly default: {
|
|
26
|
-
readonly http: readonly ["https://zetachain-athens-evm.blockpi.network/v1/rpc/public"];
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
sourceId?: number | undefined;
|
|
30
|
-
testnet: true;
|
|
31
|
-
custom?: Record<string, unknown> | undefined;
|
|
32
|
-
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
33
|
-
formatters?: undefined;
|
|
34
|
-
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
35
|
-
id: 7001;
|
|
36
|
-
chainNamespace: "eip155";
|
|
37
|
-
caipNetworkId: "eip155:7001";
|
|
38
|
-
assets?: {
|
|
39
|
-
imageId: string | undefined;
|
|
40
|
-
imageUrl: string | undefined;
|
|
41
|
-
} | undefined;
|
|
42
|
-
};
|
|
43
4
|
export interface ChainListItem {
|
|
44
5
|
chainId: ChainId;
|
|
45
6
|
logo: typeof ETHereumLogo;
|
|
46
7
|
name: string;
|
|
47
8
|
mainnet?: ChainId;
|
|
48
9
|
caipNetwork: AppKitNetwork;
|
|
10
|
+
isEVMChain: boolean;
|
|
11
|
+
isSolanaChain: boolean;
|
|
12
|
+
isBTCChain: boolean;
|
|
13
|
+
isSUIChain: boolean;
|
|
14
|
+
isTONChain: boolean;
|
|
15
|
+
isTestNet: boolean;
|
|
16
|
+
/** 未链接钱包时,使用该地址 */
|
|
17
|
+
fallbackAddress: string;
|
|
49
18
|
}
|
|
50
19
|
export declare const chainListMap: Map<ChainId, ChainListItem>;
|
|
51
20
|
export declare const isTestNet: (chainId: ChainId) => boolean;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { TokenInfo } from '../hooks/Token';
|
|
2
|
+
declare const tokenList: (TokenInfo & {
|
|
2
3
|
id: number;
|
|
3
|
-
name: string;
|
|
4
|
-
address: string;
|
|
5
|
-
symbol: string;
|
|
6
|
-
decimals: number;
|
|
7
4
|
logo: string;
|
|
8
|
-
chainId: number;
|
|
9
5
|
position: number;
|
|
10
|
-
slippage: null;
|
|
11
|
-
}[];
|
|
12
|
-
export default
|
|
6
|
+
slippage: number | null;
|
|
7
|
+
})[];
|
|
8
|
+
export default tokenList;
|
|
@@ -1,28 +1,8 @@
|
|
|
1
|
+
import { GraphQLRequests } from '@dodoex/api';
|
|
1
2
|
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
fromAmount: string;
|
|
5
|
-
fromTokenAddress: string;
|
|
6
|
-
toChainId: number;
|
|
7
|
-
toAmount: string;
|
|
8
|
-
toTokenAddress: string;
|
|
9
|
-
fromAddress: string;
|
|
10
|
-
toAddress: string;
|
|
11
|
-
slippage: number;
|
|
12
|
-
hash: string;
|
|
13
|
-
product: string | null;
|
|
14
|
-
extend: {
|
|
15
|
-
lifiBridge: BridgeRouteI['sourceRoute']['step']['tool'];
|
|
16
|
-
route: BridgeRouteI['sourceRoute'];
|
|
17
|
-
productParams: BridgeRouteI['productParams'];
|
|
18
|
-
encodeId: string;
|
|
19
|
-
source: string;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export declare function createBridgeOrder({ apikey, tx, route, bridgeCreateRouteAPI, encodeId, }: {
|
|
23
|
-
apikey?: string;
|
|
3
|
+
export declare function createBridgeOrder({ graphQLRequests, tx, route, calldata, }: {
|
|
4
|
+
graphQLRequests: GraphQLRequests;
|
|
24
5
|
tx: string;
|
|
25
6
|
route: BridgeRouteI;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}): Promise<any>;
|
|
7
|
+
calldata: string;
|
|
8
|
+
}): Promise<boolean | null | undefined>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BridgeTXRequest } from '../../components/Bridge/BridgeSummaryDialog';
|
|
2
2
|
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
3
|
-
import { Metadata } from '../Submission/types';
|
|
4
3
|
export default function useExecuteBridgeRoute({ route, bridgeOrderTxRequest, }: {
|
|
5
4
|
route?: BridgeRouteI;
|
|
6
5
|
bridgeOrderTxRequest?: BridgeTXRequest;
|
|
7
|
-
}): (
|
|
6
|
+
}): () => Promise<import("../Submission/types").ExecutionResult> | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
2
|
+
export declare function useFeeList({ fees }: {
|
|
3
|
+
fees: BridgeRouteI['fees'];
|
|
4
|
+
}): {
|
|
5
|
+
key: "btcDepositFee" | "platformFee" | "destinationFee" | "protocolFees" | "svmRentFee";
|
|
6
|
+
title: string;
|
|
7
|
+
value: string | null;
|
|
8
|
+
isFree: boolean;
|
|
9
|
+
}[];
|