@dodoex/widgets 3.0.4-ve33.7 → 3.0.4-ve33.9
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-C9HBZsUr.js → helper-CB1YylL8.js} +1 -1
- package/dist/{helper-BlcjCxa6.cjs → helper-Dt_568MU.cjs} +1 -1
- package/dist/{index-CohbgVNJ.cjs → index-BDwJQw6z.cjs} +1 -1
- package/dist/{index-BdYDY5rS.cjs → index-BLjJZj_j.cjs} +1 -1
- package/dist/index-Bo9PV9W9.js +32 -0
- package/dist/{index-BkmU1c6w.js → index-CMt4f2VS.js} +1 -1
- package/dist/{index-7XYsbAB3.js → index-C_iIEQbx.js} +1 -1
- package/dist/index-RjsD5IyH.cjs +32 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/components/AddressWithLinkAndCopy.d.ts +3 -1
- package/dist/types/components/Widget/index.d.ts +1 -0
- package/dist/types/constants/api.d.ts +1 -1
- package/dist/types/hooks/Submission/types.d.ts +3 -1
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/index.d.ts +12 -2
- package/dist/types/widgets/PoolWidget/utils.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolList/TableList.d.ts +2 -1
- package/dist/types/widgets/ve33/Ve33PoolList/index.d.ts +3 -1
- package/dist/types/widgets/ve33/Ve33PoolOperate/AddPoolOperate.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/RemovePoolOperate.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/ComparePrice.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/OperateBtn.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SliderPercentageCard.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SlippageSetting.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/V2ConfirmDialog.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useComparePrice.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useLiquidityOperateAmount.d.ts +82 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePercentageRemove.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2AddLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2BalanceInfo.d.ts +34 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2RemoveLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useWithdrawInfo.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/index.d.ts +23 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/types.d.ts +22 -0
- package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +14 -0
- package/dist/types/widgets/ve33/VotePoolList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/components/GoBack.d.ts +4 -0
- package/dist/types/widgets/ve33/components/PoolHead.d.ts +8 -0
- package/dist/types/widgets/ve33/{Ve33PoolList/components → components}/PoolTypeTag.d.ts +2 -1
- package/dist/types/widgets/ve33/components/widgets.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVotePoolFilters.d.ts +13 -0
- package/dist/types/widgets/ve33/hooks/useVoteTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/types.d.ts +17 -3
- package/dist/types/widgets/ve33/utils.d.ts +4 -1
- package/package.json +4 -4
- package/dist/index-Bv9ocOr4.cjs +0 -32
- package/dist/index-CatAo2TO.js +0 -32
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { Ve33PoolInfoI } from '../../types';
|
|
3
|
+
export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuoteAmount, isRemove, }: {
|
|
4
|
+
pool?: Ve33PoolInfoI;
|
|
5
|
+
maxBaseAmount?: BigNumber | null;
|
|
6
|
+
maxQuoteAmount?: BigNumber | null;
|
|
7
|
+
isRemove?: boolean;
|
|
8
|
+
}): {
|
|
9
|
+
baseAmount: string;
|
|
10
|
+
quoteAmount: string;
|
|
11
|
+
handleChangeBaseAmount: () => void;
|
|
12
|
+
handleChangeQuoteAmount: () => void;
|
|
13
|
+
reset: () => void;
|
|
14
|
+
balanceInfo: {
|
|
15
|
+
userLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
16
|
+
totalLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
17
|
+
reserveQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
18
|
+
_reserve0: bigint;
|
|
19
|
+
_reserve1: bigint;
|
|
20
|
+
_blockTimestampLast: bigint;
|
|
21
|
+
}, Error>;
|
|
22
|
+
userLp: BigNumber | undefined;
|
|
23
|
+
totalLp: BigNumber | undefined;
|
|
24
|
+
token0Reserve: BigNumber | undefined;
|
|
25
|
+
token1Reserve: BigNumber | undefined;
|
|
26
|
+
userLpToToken0: BigNumber | undefined;
|
|
27
|
+
userLpToToken1: BigNumber | undefined;
|
|
28
|
+
isRearTokenA: boolean;
|
|
29
|
+
price: import("@uniswap/sdk-core").Price<import("@uniswap/sdk-core").Token, import("@uniswap/sdk-core").Token> | undefined;
|
|
30
|
+
liquidityMinted: BigNumber | undefined;
|
|
31
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
32
|
+
shareOfPool: string;
|
|
33
|
+
userLpToTokenBalanceLoading: boolean;
|
|
34
|
+
userLpToTokenBalanceErrorRefetch: (() => void) | undefined;
|
|
35
|
+
refetch: () => void;
|
|
36
|
+
};
|
|
37
|
+
addPortion?: undefined;
|
|
38
|
+
amountLoading?: undefined;
|
|
39
|
+
amountError?: undefined;
|
|
40
|
+
amountRefetch?: undefined;
|
|
41
|
+
amountCheckedDisabled?: undefined;
|
|
42
|
+
midPrice?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
baseAmount: string;
|
|
45
|
+
quoteAmount: string;
|
|
46
|
+
handleChangeBaseAmount: (newValue: string) => void;
|
|
47
|
+
handleChangeQuoteAmount: (newValue: string) => void;
|
|
48
|
+
reset: () => void;
|
|
49
|
+
addPortion: BigNumber;
|
|
50
|
+
amountLoading: boolean;
|
|
51
|
+
amountError: boolean;
|
|
52
|
+
amountRefetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
53
|
+
_reserve0: bigint;
|
|
54
|
+
_reserve1: bigint;
|
|
55
|
+
_blockTimestampLast: bigint;
|
|
56
|
+
}, Error>>;
|
|
57
|
+
amountCheckedDisabled: boolean;
|
|
58
|
+
balanceInfo: {
|
|
59
|
+
userLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
60
|
+
totalLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
61
|
+
reserveQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
62
|
+
_reserve0: bigint;
|
|
63
|
+
_reserve1: bigint;
|
|
64
|
+
_blockTimestampLast: bigint;
|
|
65
|
+
}, Error>;
|
|
66
|
+
userLp: BigNumber | undefined;
|
|
67
|
+
totalLp: BigNumber | undefined;
|
|
68
|
+
token0Reserve: BigNumber | undefined;
|
|
69
|
+
token1Reserve: BigNumber | undefined;
|
|
70
|
+
userLpToToken0: BigNumber | undefined;
|
|
71
|
+
userLpToToken1: BigNumber | undefined;
|
|
72
|
+
isRearTokenA: boolean;
|
|
73
|
+
price: import("@uniswap/sdk-core").Price<import("@uniswap/sdk-core").Token, import("@uniswap/sdk-core").Token> | undefined;
|
|
74
|
+
liquidityMinted: BigNumber | undefined;
|
|
75
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
76
|
+
shareOfPool: string;
|
|
77
|
+
userLpToTokenBalanceLoading: boolean;
|
|
78
|
+
userLpToTokenBalanceErrorRefetch: (() => void) | undefined;
|
|
79
|
+
refetch: () => void;
|
|
80
|
+
};
|
|
81
|
+
midPrice: BigNumber | undefined;
|
|
82
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { Ve33PoolInfoI } from '../../types';
|
|
3
|
+
export declare const initSliderPercentage = 50;
|
|
4
|
+
export declare enum RemoveMode {
|
|
5
|
+
quantity = 1,
|
|
6
|
+
percentage = 2
|
|
7
|
+
}
|
|
8
|
+
export declare function usePercentageRemove({ pool, baseOverride, quoteOverride, resetAmount, handleChangeBaseAmount, handleChangeQuoteAmount, }: {
|
|
9
|
+
pool: Ve33PoolInfoI | undefined;
|
|
10
|
+
baseOverride: BigNumber | undefined | null;
|
|
11
|
+
quoteOverride: BigNumber | undefined | null;
|
|
12
|
+
resetAmount: () => void;
|
|
13
|
+
handleChangeBaseAmount: (val: string) => void;
|
|
14
|
+
handleChangeQuoteAmount: (val: string) => void;
|
|
15
|
+
}): {
|
|
16
|
+
mode: RemoveMode;
|
|
17
|
+
modeOptions: {
|
|
18
|
+
key: RemoveMode;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
handleChangeMode: (mode: RemoveMode) => void;
|
|
22
|
+
sliderPercentage: number;
|
|
23
|
+
handleChangeSliderPercentage: (val: number) => void;
|
|
24
|
+
resetPercentage: () => void;
|
|
25
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum OperateTab {
|
|
2
|
+
Add = 1,
|
|
3
|
+
Remove = 2
|
|
4
|
+
}
|
|
5
|
+
export declare function usePoolOperateTabs(defaultValue?: OperateTab): {
|
|
6
|
+
operateTab: OperateTab;
|
|
7
|
+
operateTabs: {
|
|
8
|
+
key: OperateTab;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
handleChangeTab: (poolTab: OperateTab) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
export declare function useVe33AddLiquidity({ baseToken, quoteToken, baseAmount, quoteAmount, slippage, stable, fee, successBack, submittedBack, }: {
|
|
3
|
+
baseToken: TokenInfo | undefined;
|
|
4
|
+
quoteToken: TokenInfo | undefined;
|
|
5
|
+
baseAmount: string;
|
|
6
|
+
quoteAmount: string;
|
|
7
|
+
slippage: number;
|
|
8
|
+
stable: boolean;
|
|
9
|
+
fee: number | undefined;
|
|
10
|
+
successBack?: () => void;
|
|
11
|
+
submittedBack?: () => void;
|
|
12
|
+
}): import("@tanstack/react-query").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult, Error, void, unknown>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { Price, Token } from '@uniswap/sdk-core';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export declare function useVe33V2BalanceInfo({ account, pool, }: {
|
|
5
|
+
account?: string;
|
|
6
|
+
pool?: {
|
|
7
|
+
id: string;
|
|
8
|
+
chainId: number;
|
|
9
|
+
baseToken: TokenInfo;
|
|
10
|
+
quoteToken: TokenInfo;
|
|
11
|
+
};
|
|
12
|
+
}): {
|
|
13
|
+
userLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
14
|
+
totalLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
15
|
+
reserveQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
16
|
+
_reserve0: bigint;
|
|
17
|
+
_reserve1: bigint;
|
|
18
|
+
_blockTimestampLast: bigint;
|
|
19
|
+
}, Error>;
|
|
20
|
+
userLp: BigNumber | undefined;
|
|
21
|
+
totalLp: BigNumber | undefined;
|
|
22
|
+
token0Reserve: BigNumber | undefined;
|
|
23
|
+
token1Reserve: BigNumber | undefined;
|
|
24
|
+
userLpToToken0: BigNumber | undefined;
|
|
25
|
+
userLpToToken1: BigNumber | undefined;
|
|
26
|
+
isRearTokenA: boolean;
|
|
27
|
+
price: Price<Token, Token> | undefined;
|
|
28
|
+
liquidityMinted: BigNumber | undefined;
|
|
29
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
30
|
+
shareOfPool: string;
|
|
31
|
+
userLpToTokenBalanceLoading: boolean;
|
|
32
|
+
userLpToTokenBalanceErrorRefetch: (() => void) | undefined;
|
|
33
|
+
refetch: () => void;
|
|
34
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
export declare function useVe33RemoveLiquidity({ baseToken, quoteToken, baseAmount, quoteAmount, liquidityAmount, slippage, stable, submittedBack, successBack, }: {
|
|
3
|
+
baseToken: TokenInfo | undefined;
|
|
4
|
+
quoteToken: TokenInfo | undefined;
|
|
5
|
+
baseAmount: string;
|
|
6
|
+
quoteAmount: string;
|
|
7
|
+
liquidityAmount: string;
|
|
8
|
+
slippage: number;
|
|
9
|
+
stable: boolean;
|
|
10
|
+
submittedBack?: () => void;
|
|
11
|
+
successBack?: () => void;
|
|
12
|
+
}): import("@tanstack/react-query").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult, Error, void, unknown>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
export declare const useWithdrawInfo: ({ pool, baseAmount, quoteAmount, }: {
|
|
3
|
+
pool?: {
|
|
4
|
+
chainId: number;
|
|
5
|
+
address: string;
|
|
6
|
+
baseToken: {
|
|
7
|
+
symbol: string;
|
|
8
|
+
decimals: number;
|
|
9
|
+
};
|
|
10
|
+
quoteToken: {
|
|
11
|
+
symbol: string;
|
|
12
|
+
decimals: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
baseAmount: string;
|
|
16
|
+
quoteAmount: string;
|
|
17
|
+
}) => {
|
|
18
|
+
receiveBaseAmount: string;
|
|
19
|
+
receiveQuoteAmount: string;
|
|
20
|
+
receiveAmountBg: BigNumber | undefined;
|
|
21
|
+
receiveList: {
|
|
22
|
+
amount: string;
|
|
23
|
+
symbol: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OperateTypeE, Ve33PoolInfoI } from '../types';
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
export interface PoolOperateProps {
|
|
4
|
+
sx?: BoxProps['sx'];
|
|
5
|
+
pool?: Ve33PoolInfoI;
|
|
6
|
+
account?: string;
|
|
7
|
+
operate?: OperateTypeE;
|
|
8
|
+
errorRefetch?: () => void;
|
|
9
|
+
submittedBack?: () => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export default function PoolOperateDialog({ modal, ...props }: PoolOperateProps & {
|
|
13
|
+
modal?: boolean;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
export declare function PoolOperate({ sx, pool, operate, account, errorRefetch, submittedBack, onClose, }: PoolOperateProps): JSX.Element;
|
|
16
|
+
export declare function usePoolOperateTabs(defaultValue?: OperateTypeE): {
|
|
17
|
+
operateTab: OperateTypeE;
|
|
18
|
+
operateTabs: {
|
|
19
|
+
key: OperateTypeE;
|
|
20
|
+
value: string;
|
|
21
|
+
}[];
|
|
22
|
+
handleChangeTab: (poolTab: OperateTypeE) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ExcludeNone, PoolType } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { FetchMyLiquidityListLqList } from '../utils';
|
|
4
|
+
export type OperatePool = {
|
|
5
|
+
address: string;
|
|
6
|
+
chainId: number;
|
|
7
|
+
baseToken: TokenInfo;
|
|
8
|
+
quoteToken: TokenInfo;
|
|
9
|
+
baseLpToken?: {
|
|
10
|
+
id: string;
|
|
11
|
+
decimals: number;
|
|
12
|
+
};
|
|
13
|
+
quoteLpToken?: {
|
|
14
|
+
id: string;
|
|
15
|
+
decimals: number;
|
|
16
|
+
};
|
|
17
|
+
type: PoolType;
|
|
18
|
+
owner?: string;
|
|
19
|
+
creator: string;
|
|
20
|
+
lpFeeRate?: string;
|
|
21
|
+
liquidityPositions?: ExcludeNone<ExcludeNone<FetchMyLiquidityListLqList>[0]>['liquidityPositions'];
|
|
22
|
+
} | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { VotePoolInfoI } from '../types';
|
|
3
|
+
export interface TableListProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
poolList: VotePoolInfoI[];
|
|
6
|
+
hasMore?: boolean;
|
|
7
|
+
loadMore?: () => void;
|
|
8
|
+
loadMoreLoading?: boolean;
|
|
9
|
+
onSelectPool: (id: string, selected: boolean) => void;
|
|
10
|
+
selectedPoolList: {
|
|
11
|
+
[key: string]: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const TableList: ({ chainId, poolList, hasMore, loadMore, loadMoreLoading, onSelectPool, selectedPoolList, }: TableListProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VotePoolList: () => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export interface PoolHeadProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
poolInfo: Ve33PoolInfoI;
|
|
6
|
+
size?: 'small' | 'medium';
|
|
7
|
+
}
|
|
8
|
+
export declare const PoolHead: ({ chainId, poolInfo, size, }: PoolHeadProps) => JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { PoolTypeE } from '
|
|
1
|
+
import { PoolTypeE } from '../types';
|
|
2
2
|
export interface PoolTypeTagProps {
|
|
3
3
|
type: PoolTypeE;
|
|
4
4
|
stable: boolean;
|
|
5
5
|
fee: number;
|
|
6
|
+
hideFee?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare const PoolTypeTag: (props: PoolTypeTagProps) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum VotePoolFilters {
|
|
2
|
+
All = "all",
|
|
3
|
+
V2 = 1,
|
|
4
|
+
V3 = 2
|
|
5
|
+
}
|
|
6
|
+
export declare function useVotePoolFilters(): {
|
|
7
|
+
votePoolFilter: VotePoolFilters;
|
|
8
|
+
filters: {
|
|
9
|
+
key: VotePoolFilters;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
handleChangeVotePoolFilter: (votePoolFilter: VotePoolFilters) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum VoteTab {
|
|
2
|
+
SelectToVote = "select-to-vote",
|
|
3
|
+
MyVoted = "my-voted"
|
|
4
|
+
}
|
|
5
|
+
export declare function useVoteTabs(): {
|
|
6
|
+
voteTab: VoteTab;
|
|
7
|
+
tabs: {
|
|
8
|
+
key: VoteTab;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
handleChangeVoteTab: (voteTab: VoteTab) => void;
|
|
12
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../hooks/Token/type';
|
|
3
|
+
import { FetchVe33PoolList, FetchVotePoolList } from '../PoolWidget/utils';
|
|
2
4
|
export declare enum OperateTypeE {
|
|
3
5
|
Add = 1,
|
|
4
6
|
Remove = 2
|
|
@@ -11,14 +13,26 @@ export declare enum FeeE {
|
|
|
11
13
|
Stable = 5,
|
|
12
14
|
Volatile = 30
|
|
13
15
|
}
|
|
14
|
-
type FetchVe33PoolItem = FetchVe33PoolList[0];
|
|
16
|
+
export type FetchVe33PoolItem = FetchVe33PoolList[0];
|
|
17
|
+
export type FetchVotePoolItem = FetchVotePoolList[0];
|
|
15
18
|
export type Ve33PoolInfoI = FetchVe33PoolItem & {
|
|
16
19
|
stable: boolean;
|
|
17
20
|
fee: FeeE | 0 | number;
|
|
18
21
|
type: PoolTypeE;
|
|
22
|
+
chainId: ChainId;
|
|
23
|
+
baseToken: TokenInfo;
|
|
24
|
+
quoteToken: TokenInfo;
|
|
25
|
+
};
|
|
26
|
+
export type VotePoolInfoI = FetchVotePoolItem & {
|
|
27
|
+
stable: boolean;
|
|
28
|
+
fee: FeeE | 0 | number;
|
|
29
|
+
type: PoolTypeE;
|
|
30
|
+
chainId: ChainId;
|
|
31
|
+
baseToken: TokenInfo;
|
|
32
|
+
quoteToken: TokenInfo;
|
|
19
33
|
};
|
|
20
34
|
export interface Ve33PoolOperateProps {
|
|
21
35
|
poolInfo: Ve33PoolInfoI;
|
|
22
36
|
operateType: OperateTypeE;
|
|
37
|
+
chainId: ChainId;
|
|
23
38
|
}
|
|
24
|
-
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { FetchVe33PoolItem, FetchVotePoolItem, PoolTypeE, Ve33PoolInfoI, VotePoolInfoI } from './types';
|
|
2
3
|
import { FeeE } from './types';
|
|
3
4
|
export declare const formatFee: ({ type, fee }: {
|
|
4
5
|
type: PoolTypeE;
|
|
5
6
|
fee: FeeE;
|
|
6
7
|
}) => string;
|
|
8
|
+
export declare function compositePoolInfo(pool: NonNullable<FetchVe33PoolItem>, chainId: ChainId): Ve33PoolInfoI;
|
|
9
|
+
export declare function compositeVotePoolInfo(pool: NonNullable<FetchVotePoolItem>, chainId: ChainId): VotePoolInfoI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.4-ve33.
|
|
3
|
+
"version": "3.0.4-ve33.9",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@dodoex/api": "3.0.4-ve33.
|
|
61
|
+
"@dodoex/api": "3.0.4-ve33.4",
|
|
62
62
|
"@dodoex/components": "3.0.4-ve33.3",
|
|
63
63
|
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "1.
|
|
64
|
+
"@dodoex/dodo-contract-request": "1.15.0-morph-holesky.2",
|
|
65
65
|
"@dodoex/icons": "^2.0.2",
|
|
66
66
|
"@emotion/react": "^11.10.0",
|
|
67
67
|
"@emotion/styled": "^11.10.0",
|
|
@@ -154,4 +154,4 @@
|
|
|
154
154
|
"ts-jest": "^29.0.1",
|
|
155
155
|
"typescript": "^5.6.3"
|
|
156
156
|
}
|
|
157
|
-
}
|
|
157
|
+
}
|