@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
|
@@ -1,16 +1,50 @@
|
|
|
1
|
+
export declare enum PoolTopTab {
|
|
2
|
+
ALM = "ALM",
|
|
3
|
+
NORMAL = "NORMAL",
|
|
4
|
+
MULTI_TOKEN = "MULTI_TOKEN"
|
|
5
|
+
}
|
|
6
|
+
export declare enum ALMPoolTab {
|
|
7
|
+
ALL = "ALL",
|
|
8
|
+
MY = "MY"
|
|
9
|
+
}
|
|
1
10
|
export declare enum PoolTab {
|
|
2
11
|
addLiquidity = "add-liquidity",
|
|
3
12
|
myLiquidity = "my-liquidity",
|
|
4
13
|
myCreated = "my-created"
|
|
5
14
|
}
|
|
6
|
-
export declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
export declare enum MultiTokenPoolTab {
|
|
16
|
+
ALL = "ALL",
|
|
17
|
+
MY = "MY"
|
|
18
|
+
}
|
|
19
|
+
export declare function usePoolListTabs(): {
|
|
20
|
+
poolTopTab: PoolTopTab;
|
|
21
|
+
normalPoolTab: PoolTab;
|
|
22
|
+
almPoolTab: ALMPoolTab;
|
|
23
|
+
multiTokenPoolTab: MultiTokenPoolTab;
|
|
24
|
+
topTabs: {
|
|
25
|
+
key: PoolTopTab;
|
|
26
|
+
value: string;
|
|
27
|
+
}[];
|
|
28
|
+
normalTabs: {
|
|
12
29
|
key: PoolTab;
|
|
13
30
|
value: string;
|
|
14
31
|
}[];
|
|
15
|
-
|
|
32
|
+
almTabs: {
|
|
33
|
+
key: ALMPoolTab;
|
|
34
|
+
value: string;
|
|
35
|
+
}[];
|
|
36
|
+
multiTokenTabs: {
|
|
37
|
+
key: MultiTokenPoolTab;
|
|
38
|
+
value: string;
|
|
39
|
+
}[];
|
|
40
|
+
handleChangePoolTab: ({ topTab, poolTab, }: {
|
|
41
|
+
topTab: PoolTopTab.NORMAL;
|
|
42
|
+
poolTab: PoolTab;
|
|
43
|
+
} | {
|
|
44
|
+
topTab: PoolTopTab.ALM;
|
|
45
|
+
poolTab: ALMPoolTab;
|
|
46
|
+
} | {
|
|
47
|
+
topTab: PoolTopTab.MULTI_TOKEN;
|
|
48
|
+
poolTab: MultiTokenPoolTab;
|
|
49
|
+
}) => void;
|
|
16
50
|
};
|
|
@@ -2,11 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { Page, PageType } from '../../../router/types';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
5
|
-
export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter,
|
|
5
|
+
export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter, operatePool: operatePoolProps, onOperatePool, getMigrationPairAndMining, }: {
|
|
6
6
|
params?: Page<PageType.Pool>['params'];
|
|
7
7
|
scrollRef?: React.RefObject<any>;
|
|
8
8
|
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
9
|
-
operatePMMPoolElement?: React.ReactElement;
|
|
10
9
|
operatePool?: Partial<PoolOperateProps> | null;
|
|
11
10
|
onOperatePool?: (pool: Partial<PoolOperateProps> | null) => boolean;
|
|
12
11
|
getMigrationPairAndMining?: (p: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { OperatePool } from './types';
|
|
3
2
|
import { usePoolBalanceInfo } from '../hooks/usePoolBalanceInfo';
|
|
3
|
+
import { OperatePool } from './types';
|
|
4
4
|
export declare function RemovePoolOperate({ submittedBack: submittedBackProps, onlyShowSide, pool, balanceInfo, }: {
|
|
5
5
|
submittedBack?: () => void;
|
|
6
6
|
onlyShowSide?: 'base' | 'quote';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
1
2
|
import { usePoolBalanceInfo } from '../../hooks/usePoolBalanceInfo';
|
|
2
3
|
import { OperatePool } from '../types';
|
|
3
4
|
export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteAmount, balanceInfo, }: {
|
|
@@ -18,6 +19,27 @@ export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteA
|
|
|
18
19
|
approveTitle: string;
|
|
19
20
|
submitApprove: () => Promise<void>;
|
|
20
21
|
getMaxBalance: () => string;
|
|
22
|
+
tokenQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
23
|
+
symbol: string;
|
|
24
|
+
address: string;
|
|
25
|
+
name: string;
|
|
26
|
+
decimals: number;
|
|
27
|
+
balance: BigNumber;
|
|
28
|
+
allowance: BigNumber;
|
|
29
|
+
account: string;
|
|
30
|
+
spender: string | undefined;
|
|
31
|
+
chainId: number;
|
|
32
|
+
} | {
|
|
33
|
+
address: string;
|
|
34
|
+
decimals: number;
|
|
35
|
+
symbol: string;
|
|
36
|
+
name: string;
|
|
37
|
+
balance: BigNumber;
|
|
38
|
+
spender: string | undefined;
|
|
39
|
+
allowance: BigNumber;
|
|
40
|
+
chainId: number;
|
|
41
|
+
account?: undefined;
|
|
42
|
+
} | null, Error>;
|
|
21
43
|
};
|
|
22
44
|
quoteTokenStatus: {
|
|
23
45
|
token: import("../../../..").TokenInfo | null | undefined;
|
|
@@ -31,5 +53,26 @@ export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteA
|
|
|
31
53
|
approveTitle: string;
|
|
32
54
|
submitApprove: () => Promise<void>;
|
|
33
55
|
getMaxBalance: () => string;
|
|
56
|
+
tokenQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
57
|
+
symbol: string;
|
|
58
|
+
address: string;
|
|
59
|
+
name: string;
|
|
60
|
+
decimals: number;
|
|
61
|
+
balance: BigNumber;
|
|
62
|
+
allowance: BigNumber;
|
|
63
|
+
account: string;
|
|
64
|
+
spender: string | undefined;
|
|
65
|
+
chainId: number;
|
|
66
|
+
} | {
|
|
67
|
+
address: string;
|
|
68
|
+
decimals: number;
|
|
69
|
+
symbol: string;
|
|
70
|
+
name: string;
|
|
71
|
+
balance: BigNumber;
|
|
72
|
+
spender: string | undefined;
|
|
73
|
+
allowance: BigNumber;
|
|
74
|
+
chainId: number;
|
|
75
|
+
account?: undefined;
|
|
76
|
+
} | null, Error>;
|
|
34
77
|
};
|
|
35
78
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
2
|
import { PoolOperateInnerProps } from './PoolOperateInner';
|
|
3
|
-
import React from 'react';
|
|
4
3
|
export interface PoolOperateProps {
|
|
5
4
|
onClose?: () => void;
|
|
6
5
|
account: string | undefined;
|
|
@@ -12,7 +11,7 @@ export interface PoolOperateProps {
|
|
|
12
11
|
hidePoolInfo?: boolean;
|
|
13
12
|
sx?: BoxProps['sx'];
|
|
14
13
|
}
|
|
15
|
-
export declare function PoolOperate({ onClose, pool: poolProps, address, operate, chainId, hasMining, hidePoolInfo, sx, }: PoolOperateProps):
|
|
14
|
+
export declare function PoolOperate({ onClose, pool: poolProps, address, operate, chainId, hasMining, hidePoolInfo, sx, }: PoolOperateProps): import("react").JSX.Element;
|
|
16
15
|
export default function PoolOperateDialog({ modal, ...props }: PoolOperateProps & {
|
|
17
16
|
modal?: boolean;
|
|
18
|
-
}):
|
|
17
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OperateCurvePoolT } from './types';
|
|
2
|
+
export interface AddOrRemoveProps {
|
|
3
|
+
onClose?: () => void;
|
|
4
|
+
poolDetailBtnVisible?: boolean;
|
|
5
|
+
operateCurvePool: OperateCurvePoolT;
|
|
6
|
+
}
|
|
7
|
+
export declare const AddOrRemove: ({ onClose, poolDetailBtnVisible, operateCurvePool, }: AddOrRemoveProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { OperateCurvePoolT } from './types';
|
|
4
|
+
export interface AllPoolsProps {
|
|
5
|
+
account?: string;
|
|
6
|
+
scrollParentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
7
|
+
activeChainId: ChainId | undefined;
|
|
8
|
+
operateCurvePool: OperateCurvePoolT | null;
|
|
9
|
+
setOperateCurvePool: React.Dispatch<React.SetStateAction<OperateCurvePoolT | null>>;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
isMyPool?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const AllPools: ({ account, scrollParentRef, activeChainId, operateCurvePool, setOperateCurvePool, children, isMyPool, }: AllPoolsProps) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OperateCurvePoolT } from './types';
|
|
2
|
+
export interface OperateDialogProps {
|
|
3
|
+
poolDetailBtnVisible?: boolean;
|
|
4
|
+
operateCurvePool: OperateCurvePoolT;
|
|
5
|
+
setOperateCurvePool?: React.Dispatch<React.SetStateAction<OperateCurvePoolT | null>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const OperateDialog: ({ poolDetailBtnVisible, operateCurvePool, setOperateCurvePool, }: OperateDialogProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
export declare function ApyTooltip({ apy, dailyApy, weeklyApy, sx, }: {
|
|
3
|
+
apy: string | null | undefined;
|
|
4
|
+
dailyApy: string | null | undefined;
|
|
5
|
+
weeklyApy: string | null | undefined;
|
|
6
|
+
sx?: BoxProps['sx'];
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CurvePoolT } from '../types';
|
|
2
|
+
export interface CoinReservePieChartProps {
|
|
3
|
+
poolDetail: CurvePoolT | undefined;
|
|
4
|
+
tokenBalances: BigNumber[] | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const CoinReservePieChart: ({ poolDetail, tokenBalances, }: CoinReservePieChartProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { CurvePoolT } from '../types';
|
|
3
|
+
export default function FilterAddressTags({ lqList, onDeleteTag, sx, }: {
|
|
4
|
+
lqList: CurvePoolT[];
|
|
5
|
+
onDeleteTag: () => void;
|
|
6
|
+
sx?: BoxProps['sx'];
|
|
7
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
export declare function useLiquidityProviders({ chainId, address, }: {
|
|
2
|
+
chainId: number | undefined;
|
|
3
|
+
address: string | undefined;
|
|
4
|
+
}): {
|
|
5
|
+
list: {
|
|
6
|
+
id: string;
|
|
7
|
+
time: any;
|
|
8
|
+
user: string;
|
|
9
|
+
action: string;
|
|
10
|
+
assets?: Array<{
|
|
11
|
+
amount: any;
|
|
12
|
+
token: {
|
|
13
|
+
id: string;
|
|
14
|
+
address: string;
|
|
15
|
+
name: string;
|
|
16
|
+
symbol: string;
|
|
17
|
+
decimals: number;
|
|
18
|
+
logoImg?: string | null;
|
|
19
|
+
tokenIndex?: number | null;
|
|
20
|
+
};
|
|
21
|
+
}> | null;
|
|
22
|
+
}[] | null | undefined;
|
|
23
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery;
|
|
24
|
+
error: Error;
|
|
25
|
+
isError: true;
|
|
26
|
+
isPending: false;
|
|
27
|
+
isLoading: false;
|
|
28
|
+
isLoadingError: false;
|
|
29
|
+
isRefetchError: true;
|
|
30
|
+
isSuccess: false;
|
|
31
|
+
isPlaceholderData: false;
|
|
32
|
+
status: "error";
|
|
33
|
+
dataUpdatedAt: number;
|
|
34
|
+
errorUpdatedAt: number;
|
|
35
|
+
failureCount: number;
|
|
36
|
+
failureReason: Error | null;
|
|
37
|
+
errorUpdateCount: number;
|
|
38
|
+
isFetched: boolean;
|
|
39
|
+
isFetchedAfterMount: boolean;
|
|
40
|
+
isFetching: boolean;
|
|
41
|
+
isInitialLoading: boolean;
|
|
42
|
+
isPaused: boolean;
|
|
43
|
+
isRefetching: boolean;
|
|
44
|
+
isStale: boolean;
|
|
45
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
46
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
47
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
48
|
+
} | {
|
|
49
|
+
list: {
|
|
50
|
+
id: string;
|
|
51
|
+
time: any;
|
|
52
|
+
user: string;
|
|
53
|
+
action: string;
|
|
54
|
+
assets?: Array<{
|
|
55
|
+
amount: any;
|
|
56
|
+
token: {
|
|
57
|
+
id: string;
|
|
58
|
+
address: string;
|
|
59
|
+
name: string;
|
|
60
|
+
symbol: string;
|
|
61
|
+
decimals: number;
|
|
62
|
+
logoImg?: string | null;
|
|
63
|
+
tokenIndex?: number | null;
|
|
64
|
+
};
|
|
65
|
+
}> | null;
|
|
66
|
+
}[] | null | undefined;
|
|
67
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery;
|
|
68
|
+
error: null;
|
|
69
|
+
isError: false;
|
|
70
|
+
isPending: false;
|
|
71
|
+
isLoading: false;
|
|
72
|
+
isLoadingError: false;
|
|
73
|
+
isRefetchError: false;
|
|
74
|
+
isSuccess: true;
|
|
75
|
+
isPlaceholderData: false;
|
|
76
|
+
status: "success";
|
|
77
|
+
dataUpdatedAt: number;
|
|
78
|
+
errorUpdatedAt: number;
|
|
79
|
+
failureCount: number;
|
|
80
|
+
failureReason: Error | null;
|
|
81
|
+
errorUpdateCount: number;
|
|
82
|
+
isFetched: boolean;
|
|
83
|
+
isFetchedAfterMount: boolean;
|
|
84
|
+
isFetching: boolean;
|
|
85
|
+
isInitialLoading: boolean;
|
|
86
|
+
isPaused: boolean;
|
|
87
|
+
isRefetching: boolean;
|
|
88
|
+
isStale: boolean;
|
|
89
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
90
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
91
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
92
|
+
} | {
|
|
93
|
+
list: {
|
|
94
|
+
id: string;
|
|
95
|
+
time: any;
|
|
96
|
+
user: string;
|
|
97
|
+
action: string;
|
|
98
|
+
assets?: Array<{
|
|
99
|
+
amount: any;
|
|
100
|
+
token: {
|
|
101
|
+
id: string;
|
|
102
|
+
address: string;
|
|
103
|
+
name: string;
|
|
104
|
+
symbol: string;
|
|
105
|
+
decimals: number;
|
|
106
|
+
logoImg?: string | null;
|
|
107
|
+
tokenIndex?: number | null;
|
|
108
|
+
};
|
|
109
|
+
}> | null;
|
|
110
|
+
}[] | null | undefined;
|
|
111
|
+
data: undefined;
|
|
112
|
+
error: Error;
|
|
113
|
+
isError: true;
|
|
114
|
+
isPending: false;
|
|
115
|
+
isLoading: false;
|
|
116
|
+
isLoadingError: true;
|
|
117
|
+
isRefetchError: false;
|
|
118
|
+
isSuccess: false;
|
|
119
|
+
isPlaceholderData: false;
|
|
120
|
+
status: "error";
|
|
121
|
+
dataUpdatedAt: number;
|
|
122
|
+
errorUpdatedAt: number;
|
|
123
|
+
failureCount: number;
|
|
124
|
+
failureReason: Error | null;
|
|
125
|
+
errorUpdateCount: number;
|
|
126
|
+
isFetched: boolean;
|
|
127
|
+
isFetchedAfterMount: boolean;
|
|
128
|
+
isFetching: boolean;
|
|
129
|
+
isInitialLoading: boolean;
|
|
130
|
+
isPaused: boolean;
|
|
131
|
+
isRefetching: boolean;
|
|
132
|
+
isStale: boolean;
|
|
133
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
134
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
135
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
136
|
+
} | {
|
|
137
|
+
list: {
|
|
138
|
+
id: string;
|
|
139
|
+
time: any;
|
|
140
|
+
user: string;
|
|
141
|
+
action: string;
|
|
142
|
+
assets?: Array<{
|
|
143
|
+
amount: any;
|
|
144
|
+
token: {
|
|
145
|
+
id: string;
|
|
146
|
+
address: string;
|
|
147
|
+
name: string;
|
|
148
|
+
symbol: string;
|
|
149
|
+
decimals: number;
|
|
150
|
+
logoImg?: string | null;
|
|
151
|
+
tokenIndex?: number | null;
|
|
152
|
+
};
|
|
153
|
+
}> | null;
|
|
154
|
+
}[] | null | undefined;
|
|
155
|
+
data: undefined;
|
|
156
|
+
error: null;
|
|
157
|
+
isError: false;
|
|
158
|
+
isPending: true;
|
|
159
|
+
isLoading: true;
|
|
160
|
+
isLoadingError: false;
|
|
161
|
+
isRefetchError: false;
|
|
162
|
+
isSuccess: false;
|
|
163
|
+
isPlaceholderData: false;
|
|
164
|
+
status: "pending";
|
|
165
|
+
dataUpdatedAt: number;
|
|
166
|
+
errorUpdatedAt: number;
|
|
167
|
+
failureCount: number;
|
|
168
|
+
failureReason: Error | null;
|
|
169
|
+
errorUpdateCount: number;
|
|
170
|
+
isFetched: boolean;
|
|
171
|
+
isFetchedAfterMount: boolean;
|
|
172
|
+
isFetching: boolean;
|
|
173
|
+
isInitialLoading: boolean;
|
|
174
|
+
isPaused: boolean;
|
|
175
|
+
isRefetching: boolean;
|
|
176
|
+
isStale: boolean;
|
|
177
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
178
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
179
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
180
|
+
} | {
|
|
181
|
+
list: {
|
|
182
|
+
id: string;
|
|
183
|
+
time: any;
|
|
184
|
+
user: string;
|
|
185
|
+
action: string;
|
|
186
|
+
assets?: Array<{
|
|
187
|
+
amount: any;
|
|
188
|
+
token: {
|
|
189
|
+
id: string;
|
|
190
|
+
address: string;
|
|
191
|
+
name: string;
|
|
192
|
+
symbol: string;
|
|
193
|
+
decimals: number;
|
|
194
|
+
logoImg?: string | null;
|
|
195
|
+
tokenIndex?: number | null;
|
|
196
|
+
};
|
|
197
|
+
}> | null;
|
|
198
|
+
}[] | null | undefined;
|
|
199
|
+
data: undefined;
|
|
200
|
+
error: null;
|
|
201
|
+
isError: false;
|
|
202
|
+
isPending: true;
|
|
203
|
+
isLoadingError: false;
|
|
204
|
+
isRefetchError: false;
|
|
205
|
+
isSuccess: false;
|
|
206
|
+
isPlaceholderData: false;
|
|
207
|
+
status: "pending";
|
|
208
|
+
dataUpdatedAt: number;
|
|
209
|
+
errorUpdatedAt: number;
|
|
210
|
+
failureCount: number;
|
|
211
|
+
failureReason: Error | null;
|
|
212
|
+
errorUpdateCount: number;
|
|
213
|
+
isFetched: boolean;
|
|
214
|
+
isFetchedAfterMount: boolean;
|
|
215
|
+
isFetching: boolean;
|
|
216
|
+
isLoading: boolean;
|
|
217
|
+
isInitialLoading: boolean;
|
|
218
|
+
isPaused: boolean;
|
|
219
|
+
isRefetching: boolean;
|
|
220
|
+
isStale: boolean;
|
|
221
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
222
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
223
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
224
|
+
} | {
|
|
225
|
+
list: {
|
|
226
|
+
id: string;
|
|
227
|
+
time: any;
|
|
228
|
+
user: string;
|
|
229
|
+
action: string;
|
|
230
|
+
assets?: Array<{
|
|
231
|
+
amount: any;
|
|
232
|
+
token: {
|
|
233
|
+
id: string;
|
|
234
|
+
address: string;
|
|
235
|
+
name: string;
|
|
236
|
+
symbol: string;
|
|
237
|
+
decimals: number;
|
|
238
|
+
logoImg?: string | null;
|
|
239
|
+
tokenIndex?: number | null;
|
|
240
|
+
};
|
|
241
|
+
}> | null;
|
|
242
|
+
}[] | null | undefined;
|
|
243
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery;
|
|
244
|
+
isError: false;
|
|
245
|
+
error: null;
|
|
246
|
+
isPending: false;
|
|
247
|
+
isLoading: false;
|
|
248
|
+
isLoadingError: false;
|
|
249
|
+
isRefetchError: false;
|
|
250
|
+
isSuccess: true;
|
|
251
|
+
isPlaceholderData: true;
|
|
252
|
+
status: "success";
|
|
253
|
+
dataUpdatedAt: number;
|
|
254
|
+
errorUpdatedAt: number;
|
|
255
|
+
failureCount: number;
|
|
256
|
+
failureReason: Error | null;
|
|
257
|
+
errorUpdateCount: number;
|
|
258
|
+
isFetched: boolean;
|
|
259
|
+
isFetchedAfterMount: boolean;
|
|
260
|
+
isFetching: boolean;
|
|
261
|
+
isInitialLoading: boolean;
|
|
262
|
+
isPaused: boolean;
|
|
263
|
+
isRefetching: boolean;
|
|
264
|
+
isStale: boolean;
|
|
265
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery, Error>>;
|
|
266
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
267
|
+
promise: Promise<import("@dodoex/api/dist/types/gql/graphql").Curve_Stableswap_Ng_GetPoolLiquidityHistoryQuery>;
|
|
268
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { CurvePoolT } from '../types';
|
|
3
|
+
export declare function useLpTokenBalances({ pool, account, }: {
|
|
4
|
+
pool: CurvePoolT | undefined;
|
|
5
|
+
account: string | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
lpTokenTotalSupply: BigNumber | null;
|
|
8
|
+
tokenBalances: BigNumber[] | null;
|
|
9
|
+
lpTokenBalance: BigNumber | null;
|
|
10
|
+
userTokenBalances: BigNumber[] | null;
|
|
11
|
+
lpTokenBalanceLoading: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { CurvePoolT } from '../types';
|
|
3
|
+
export declare function usePoolDetail({ address, chainId, }: {
|
|
4
|
+
address: string | undefined;
|
|
5
|
+
chainId: ChainId | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
poolDetail: CurvePoolT | undefined;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
import { CurvePoolT } from '../types';
|
|
3
|
+
export declare function usePoolListFilterTokenAndPool(): {
|
|
4
|
+
filterTokens: TokenInfo[];
|
|
5
|
+
filterAddressLqList: CurvePoolT[];
|
|
6
|
+
handleDeleteToken: (token: TokenInfo) => void;
|
|
7
|
+
handleChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
|
|
8
|
+
handleChangeFilterAddress: (lqList: CurvePoolT[]) => void;
|
|
9
|
+
};
|