@dodoex/widgets 2.6.4 → 2.6.6
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/failed-list-e6c1e563-7122998d.cjs +1 -0
- package/dist/cjs/index-183743c8.cjs +45 -0
- package/dist/cjs/index-1904ef51.cjs +50 -0
- package/dist/cjs/index-19cf4c6e.cjs +50 -0
- package/dist/cjs/index-1a21b21a.cjs +45 -0
- package/dist/cjs/index-246a9973.cjs +50 -0
- package/dist/cjs/index-39149ce7.cjs +45 -0
- package/dist/cjs/index-5eca89d2.cjs +50 -0
- package/dist/cjs/index-64af8ffd.cjs +45 -0
- package/dist/cjs/index-f2a80623.cjs +45 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/lottie-01f67a00.cjs +1 -0
- package/dist/cjs/lottie-09dbe581.cjs +1 -0
- package/dist/cjs/lottie-2035df95.cjs +1 -0
- package/dist/cjs/lottie-7e742196.cjs +1 -0
- package/dist/cjs/lottie-924a2436.cjs +1 -0
- package/dist/cjs/lottie-b9cf6aee.cjs +1 -0
- package/dist/cjs/lottie-c4b6404b.cjs +1 -0
- package/dist/cjs/lottie-ed4f1473.cjs +1 -0
- package/dist/cjs/lottie-f516f300.cjs +1 -0
- package/dist/cjs/no-found-89a3b4af-9c7e1488.cjs +1 -0
- package/dist/cjs/no-result-01c60834-3e379801.cjs +1 -0
- package/dist/cjs/src/components/AddressWithLinkAndCopy.d.ts +22 -0
- package/dist/cjs/src/components/AutoButton.d.ts +7 -0
- package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/index.d.ts +1 -0
- package/dist/cjs/src/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
- package/dist/cjs/src/components/ConnectWallet/NeedConnectButton.d.ts +7 -0
- package/dist/cjs/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +2 -0
- package/dist/cjs/src/components/CopyTooltipToast.d.ts +9 -0
- package/dist/cjs/src/components/DataCard/DataCardGroup.d.ts +9 -0
- package/dist/cjs/src/components/Dialog.d.ts +1 -0
- package/dist/cjs/src/components/List/EmptyList.d.ts +7 -0
- package/dist/cjs/src/components/List/FailedList.d.ts +6 -0
- package/dist/cjs/src/components/SelectChain.d.ts +12 -0
- package/dist/cjs/src/components/TokenLogoPair.d.ts +16 -0
- package/dist/cjs/src/components/TokenLogoSimple.d.ts +13 -0
- package/dist/cjs/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +2 -0
- package/dist/cjs/src/constants/pool.d.ts +2 -0
- package/dist/cjs/src/constants/sessionStorage.d.ts +2 -0
- package/dist/cjs/src/hooks/Bridge/createBridgeOrder.d.ts +4 -1
- package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +1 -0
- package/dist/cjs/src/hooks/Chain/useChainList.d.ts +2 -0
- package/dist/cjs/src/hooks/Chain/useChainList.test.d.ts +1 -0
- package/dist/cjs/src/hooks/ConnectWallet/useWalletInfo.d.ts +6 -0
- package/dist/cjs/src/hooks/Submission/useBalanceUpdateLoading.d.ts +15 -0
- package/dist/cjs/src/hooks/Token/useTokenStatus.d.ts +17 -0
- package/dist/cjs/src/hooks/Token/useTokenStatus.test.d.ts +1 -0
- package/dist/cjs/src/hooks/style/useWidgetDevice.d.ts +6 -0
- package/dist/cjs/src/hooks/usePrevious.d.ts +1 -0
- package/dist/cjs/src/providers/GlobalConfigContext.d.ts +7 -0
- package/dist/cjs/src/providers/i18n.d.ts +9 -0
- package/dist/cjs/src/providers/queryClient/index.d.ts +2 -0
- package/dist/cjs/src/providers/queryClient.d.ts +2 -0
- package/dist/cjs/src/router/index.d.ts +7 -0
- package/dist/cjs/src/router/types.d.ts +22 -0
- package/dist/cjs/src/utils/utils.d.ts +1 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +18 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +18 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +44 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +12 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/index.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/types.d.ts +19 -0
- package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +43 -0
- package/dist/cjs/src/widgets/PoolWidget/index.d.ts +2 -0
- package/dist/cjs/src/widgets/PoolWidget/list/AddLiquidity.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +17 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +58 -0
- package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +15 -0
- package/dist/cjs/src/widgets/PoolWidget/utils.d.ts +20 -0
- package/dist/failed-list-e6c1e563-478d73e0.js +1 -0
- package/dist/index-0e954ab8.js +45 -0
- package/dist/index-41db7f0e.js +45 -0
- package/dist/index-b07aac90.js +45 -0
- package/dist/index-c1a581ca.js +50 -0
- package/dist/index-c9dbe645.js +50 -0
- package/dist/index-cdf23d80.js +50 -0
- package/dist/index-e58d24e5.js +50 -0
- package/dist/index-ee546021.js +45 -0
- package/dist/index-f055c418.js +45 -0
- package/dist/index.js +1 -1
- package/dist/lottie-0a7cf033.js +1 -0
- package/dist/lottie-449d7c9a.js +1 -0
- package/dist/lottie-48250155.js +1 -0
- package/dist/lottie-9678ebc9.js +1 -0
- package/dist/lottie-9b618308.js +1 -0
- package/dist/lottie-b4708423.js +1 -0
- package/dist/lottie-baaed8fa.js +1 -0
- package/dist/lottie-d6631244.js +1 -0
- package/dist/lottie-ed5a9dfd.js +1 -0
- package/dist/no-found-89a3b4af-763d58f5.js +1 -0
- package/dist/no-result-01c60834-7921d2fa.js +1 -0
- package/dist/src/components/AddressWithLinkAndCopy.d.ts +22 -0
- package/dist/src/components/AutoButton.d.ts +7 -0
- package/dist/src/components/Bridge/BridgeSummaryDialog/index.d.ts +1 -0
- package/dist/src/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
- package/dist/src/components/ConnectWallet/NeedConnectButton.d.ts +7 -0
- package/dist/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +2 -0
- package/dist/src/components/CopyTooltipToast.d.ts +9 -0
- package/dist/src/components/DataCard/DataCardGroup.d.ts +9 -0
- package/dist/src/components/Dialog.d.ts +1 -0
- package/dist/src/components/List/EmptyList.d.ts +7 -0
- package/dist/src/components/List/FailedList.d.ts +6 -0
- package/dist/src/components/SelectChain.d.ts +12 -0
- package/dist/src/components/TokenLogoPair.d.ts +16 -0
- package/dist/src/components/TokenLogoSimple.d.ts +13 -0
- package/dist/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +2 -0
- package/dist/src/constants/pool.d.ts +2 -0
- package/dist/src/constants/sessionStorage.d.ts +2 -0
- package/dist/src/hooks/Bridge/createBridgeOrder.d.ts +4 -1
- package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +1 -0
- package/dist/src/hooks/Chain/useChainList.d.ts +2 -0
- package/dist/src/hooks/Chain/useChainList.test.d.ts +1 -0
- package/dist/src/hooks/ConnectWallet/useWalletInfo.d.ts +6 -0
- package/dist/src/hooks/Submission/useBalanceUpdateLoading.d.ts +15 -0
- package/dist/src/hooks/Token/useTokenStatus.d.ts +17 -0
- package/dist/src/hooks/Token/useTokenStatus.test.d.ts +1 -0
- package/dist/src/hooks/style/useWidgetDevice.d.ts +6 -0
- package/dist/src/hooks/usePrevious.d.ts +1 -0
- package/dist/src/providers/GlobalConfigContext.d.ts +7 -0
- package/dist/src/providers/i18n.d.ts +9 -0
- package/dist/src/providers/queryClient/index.d.ts +2 -0
- package/dist/src/providers/queryClient.d.ts +2 -0
- package/dist/src/router/index.d.ts +7 -0
- package/dist/src/router/types.d.ts +22 -0
- package/dist/src/utils/utils.d.ts +1 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +18 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +18 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +44 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +12 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/index.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/types.d.ts +19 -0
- package/dist/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +43 -0
- package/dist/src/widgets/PoolWidget/index.d.ts +2 -0
- package/dist/src/widgets/PoolWidget/list/AddLiquidity.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +17 -0
- package/dist/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +58 -0
- package/dist/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +15 -0
- package/dist/src/widgets/PoolWidget/utils.d.ts +20 -0
- package/package.json +1 -1
- package/dist/cjs/src/config/i18n-config.d.ts +0 -1
- package/dist/src/config/i18n-config.d.ts +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum PoolOrMiningTab {
|
|
2
|
+
Liquidity = 1,
|
|
3
|
+
Mining = 2
|
|
4
|
+
}
|
|
5
|
+
export declare function usePoolOrMiningTabs(): {
|
|
6
|
+
poolOrMiningTab: PoolOrMiningTab;
|
|
7
|
+
poolOrMiningTabs: {
|
|
8
|
+
key: PoolOrMiningTab;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
handleChangeTab: (poolTab: PoolOrMiningTab) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PoolOperateInnerProps } from './PoolOperateInner';
|
|
3
|
+
export interface PoolOperateProps {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
account: string | undefined;
|
|
6
|
+
pool: PoolOperateInnerProps['pool'];
|
|
7
|
+
}
|
|
8
|
+
export default function PoolOperate({ onClose, pool }: PoolOperateProps): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PoolType } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
export declare type OperatePool = {
|
|
4
|
+
address: string;
|
|
5
|
+
chainId: number;
|
|
6
|
+
baseToken: TokenInfo;
|
|
7
|
+
quoteToken: TokenInfo;
|
|
8
|
+
baseLpToken?: {
|
|
9
|
+
id: string;
|
|
10
|
+
decimals: number;
|
|
11
|
+
};
|
|
12
|
+
quoteLpToken?: {
|
|
13
|
+
id: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
};
|
|
16
|
+
type: PoolType;
|
|
17
|
+
owner?: string;
|
|
18
|
+
creator: string;
|
|
19
|
+
} | undefined;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PoolType } from '@dodoex/api';
|
|
2
|
+
import { BigNumber } from 'bignumber.js';
|
|
3
|
+
import { ChainId } from '../../../constants/chains';
|
|
4
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
5
|
+
declare type Balance = BigNumber | null | undefined;
|
|
6
|
+
export declare function usePoolBalanceInfo({ chainId, account, pool, }: {
|
|
7
|
+
chainId: ChainId;
|
|
8
|
+
account?: string;
|
|
9
|
+
pool?: {
|
|
10
|
+
address: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
baseToken: TokenInfo;
|
|
13
|
+
quoteToken: TokenInfo;
|
|
14
|
+
type: PoolType;
|
|
15
|
+
};
|
|
16
|
+
}): {
|
|
17
|
+
/** existing base lp balance */
|
|
18
|
+
totalBaseLpBalance: BigNumber | null | undefined;
|
|
19
|
+
/** existing quote lp balance */
|
|
20
|
+
totalQuoteLpBalance: BigNumber | null | undefined;
|
|
21
|
+
/** the total deposited base lp balance */
|
|
22
|
+
baseReserve: BigNumber | undefined;
|
|
23
|
+
/** the total deposited quote lp balance */
|
|
24
|
+
quoteReserve: BigNumber | undefined;
|
|
25
|
+
/** classical base equilibrium target */
|
|
26
|
+
classicalBaseTarget: BigNumber | undefined;
|
|
27
|
+
/** classical quote equilibrium target */
|
|
28
|
+
classicalQuoteTarget: BigNumber | undefined;
|
|
29
|
+
/** the user's existing base lp balance */
|
|
30
|
+
userBaseLpBalance: Balance;
|
|
31
|
+
/** the user's existing quote lp balance */
|
|
32
|
+
userQuoteLpBalance: Balance;
|
|
33
|
+
/** The number of base that can be obtained when a user withdraws from the pool */
|
|
34
|
+
userBaseLpToTokenBalance: BigNumber | null | undefined;
|
|
35
|
+
/** The number of quote that can be obtained when a user withdraws from the pool */
|
|
36
|
+
userQuoteLpToTokenBalance: BigNumber | null | undefined;
|
|
37
|
+
userLpBalanceLoading: boolean;
|
|
38
|
+
userLpToTokenBalanceLoading: boolean;
|
|
39
|
+
userLpBalanceError: boolean;
|
|
40
|
+
userLpToTokenBalanceError: boolean;
|
|
41
|
+
userLpToTokenBalanceRefetch: () => void;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChainId } from '../../../constants/chains';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export default function AddLiquidityList({ scrollParentRef, account, filterChainIds, activeChainId, handleChangeActiveChainId, }: {
|
|
4
|
+
scrollParentRef: React.MutableRefObject<HTMLDivElement | undefined>;
|
|
5
|
+
account?: string;
|
|
6
|
+
filterChainIds?: ChainId[];
|
|
7
|
+
activeChainId: ChainId | undefined;
|
|
8
|
+
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { FetchLiquidityListLqList } from '../../utils';
|
|
4
|
+
export default function FilterAddressTags({ lqList, onDeleteTag, sx, }: {
|
|
5
|
+
lqList: FetchLiquidityListLqList;
|
|
6
|
+
onDeleteTag: () => void;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function FilterTokenTags({ tags, onDeleteTag, sx, }: {
|
|
5
|
+
tags: TokenInfo[];
|
|
6
|
+
onDeleteTag: (tag: TokenInfo) => void;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function PoolApyTooltip({ chainId, baseToken, quoteToken, apy, hasQuote, hasMining, sx, }: {
|
|
5
|
+
chainId: number;
|
|
6
|
+
baseToken: TokenInfo | undefined;
|
|
7
|
+
quoteToken: TokenInfo | undefined;
|
|
8
|
+
apy: {
|
|
9
|
+
transactionBaseApy?: string | null;
|
|
10
|
+
transactionQuoteApy?: string | null;
|
|
11
|
+
miningBaseApy?: string | null;
|
|
12
|
+
miningQuoteApy?: string | null;
|
|
13
|
+
} | undefined | null;
|
|
14
|
+
hasQuote: boolean;
|
|
15
|
+
hasMining: boolean;
|
|
16
|
+
sx?: BoxProps['sx'];
|
|
17
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function TokenAndPoolFilter({ sx, value, onChange, searchAddress, }: {
|
|
5
|
+
sx?: BoxProps['sx'];
|
|
6
|
+
value: Array<TokenInfo>;
|
|
7
|
+
onChange: (v: Array<TokenInfo>) => void;
|
|
8
|
+
searchAddress: (address: string, onClose: () => void) => Promise<JSX.Element | null>;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
import { FetchLiquidityListLqList } from '../../utils';
|
|
3
|
+
export declare function usePoolListFilterTokenAndPool(): {
|
|
4
|
+
filterTokens: TokenInfo[];
|
|
5
|
+
filterASymbol: string;
|
|
6
|
+
filterBSymbol: string;
|
|
7
|
+
filterAddressLqList: ({
|
|
8
|
+
id?: string | null | undefined;
|
|
9
|
+
isPrivatePool?: boolean | null | undefined;
|
|
10
|
+
isMyLiquidity?: boolean | null | undefined;
|
|
11
|
+
pair?: {
|
|
12
|
+
id: string;
|
|
13
|
+
chainId: number;
|
|
14
|
+
type: string;
|
|
15
|
+
baseReserve: any;
|
|
16
|
+
quoteReserve: any;
|
|
17
|
+
lastTradePrice: any;
|
|
18
|
+
lpFeeRate: any;
|
|
19
|
+
i?: any;
|
|
20
|
+
creator: any;
|
|
21
|
+
tvl?: any;
|
|
22
|
+
miningAddress?: (string | null)[] | null | undefined;
|
|
23
|
+
baseLpToken?: {
|
|
24
|
+
id: string;
|
|
25
|
+
decimals: any;
|
|
26
|
+
} | null | undefined;
|
|
27
|
+
quoteLpToken?: {
|
|
28
|
+
id: string;
|
|
29
|
+
decimals: any;
|
|
30
|
+
} | null | undefined;
|
|
31
|
+
baseToken: {
|
|
32
|
+
id: string;
|
|
33
|
+
symbol: string;
|
|
34
|
+
name: string;
|
|
35
|
+
decimals: any;
|
|
36
|
+
usdPrice: any;
|
|
37
|
+
logoImg?: string | null | undefined;
|
|
38
|
+
};
|
|
39
|
+
quoteToken: {
|
|
40
|
+
id: string;
|
|
41
|
+
symbol: string;
|
|
42
|
+
name: string;
|
|
43
|
+
decimals: any;
|
|
44
|
+
usdPrice: any;
|
|
45
|
+
logoImg?: string | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
apy?: {
|
|
48
|
+
miningBaseApy?: any;
|
|
49
|
+
miningQuoteApy?: any;
|
|
50
|
+
transactionBaseApy?: any;
|
|
51
|
+
transactionQuoteApy?: any;
|
|
52
|
+
} | null | undefined;
|
|
53
|
+
} | null | undefined;
|
|
54
|
+
} | null)[] | null | undefined;
|
|
55
|
+
handleDeleteToken: (token: TokenInfo) => void;
|
|
56
|
+
handleChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
|
|
57
|
+
handleChangeFilterAddress: (lqList: FetchLiquidityListLqList) => void;
|
|
58
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum PoolTab {
|
|
2
|
+
addLiquidity = "add-liquidity",
|
|
3
|
+
myLiquidity = "my-liquidity",
|
|
4
|
+
myCreated = "my-created"
|
|
5
|
+
}
|
|
6
|
+
export declare function usePoolListTabs({ account }: {
|
|
7
|
+
account?: string;
|
|
8
|
+
}): {
|
|
9
|
+
poolTab: PoolTab;
|
|
10
|
+
tabs: {
|
|
11
|
+
key: PoolTab;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
14
|
+
handleChangePoolTab: (poolTab: PoolTab) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PoolApi, ExcludeNone, PoolType } from '@dodoex/api';
|
|
2
|
+
import { ChainId } from '../../constants/chains';
|
|
3
|
+
import { TokenInfo } from '../../hooks/Token';
|
|
4
|
+
import { OperatePool } from './PoolOperate/types';
|
|
5
|
+
export declare const poolApi: PoolApi;
|
|
6
|
+
export declare type FetchLiquidityListLqList = ExcludeNone<ReturnType<Exclude<typeof PoolApi.graphql.fetchLiquidityList['__apiType'], undefined>>['liquidity_list']>['lqList'];
|
|
7
|
+
export declare function convertLiquidityTokenToTokenInfo(token: {
|
|
8
|
+
id: string;
|
|
9
|
+
symbol: string;
|
|
10
|
+
name: string;
|
|
11
|
+
decimals: number;
|
|
12
|
+
usdPrice: number;
|
|
13
|
+
logoImg?: string | null;
|
|
14
|
+
} | undefined, chainId: ChainId | number): TokenInfo | undefined;
|
|
15
|
+
export declare function canOperatePool(account: string | undefined, { owner, creator, type, }: {
|
|
16
|
+
owner?: string | null;
|
|
17
|
+
creator?: string | null;
|
|
18
|
+
type?: PoolType;
|
|
19
|
+
}): boolean;
|
|
20
|
+
export declare function convertFetchLiquidityToOperateData(lqData: ExcludeNone<FetchLiquidityListLqList>[0]): OperatePool;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const widgetI18n: import("@lingui/core").I18n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const widgetI18n: import("@lingui/core").I18n;
|