@dodoex/widgets 3.0.4-ve33.9 → 3.1.1-nero.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/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-Dt_568MU.cjs → helper-Ci3t54ii.cjs} +1 -1
- package/dist/{helper-CB1YylL8.js → helper-D8gnJn9d.js} +1 -1
- package/dist/{index-BDwJQw6z.cjs → index-CLM_lnjz.cjs} +2 -2
- package/dist/index-CWLUMU3Y.cjs +31 -0
- package/dist/{index-BLjJZj_j.cjs → index-CZbB9Ezo.cjs} +6 -6
- package/dist/index-CkQyrutw.js +78 -0
- package/dist/index-DKXv2xXI.js +31 -0
- package/dist/{index-CMt4f2VS.js → index-yAcooRWq.js} +1 -1
- 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 +2 -3
- package/dist/types/components/List/EmptyList.d.ts +2 -1
- package/dist/types/components/SelectChain.d.ts +2 -1
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +2 -1
- package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +7 -0
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageSetting.d.ts +2 -1
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +5 -1
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +3 -2
- package/dist/types/components/Swap/index.d.ts +6 -1
- package/dist/types/components/TokenLogoPair.d.ts +1 -1
- package/dist/types/components/Widget/index.d.ts +26 -2
- package/dist/types/components/WidgetContainer.d.ts +1 -1
- package/dist/types/constants/api.d.ts +1 -1
- package/dist/types/constants/swap.d.ts +0 -3
- package/dist/types/hooks/Submission/types.d.ts +1 -3
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +3 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.test.d.ts +1 -0
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +1 -1
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +0 -1
- package/dist/types/hooks/contract/useFetchBlockNumber.d.ts +1 -1
- package/dist/types/hooks/useGlobalState.d.ts +32 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +1 -0
- package/dist/types/hooks/useTokenState.d.ts +18 -0
- package/dist/types/index.d.ts +26 -35
- package/dist/types/utils/formatter.d.ts +2 -2
- 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/PoolWidget/AMMV3/hooks/usePools.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +6 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +6 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/migationWidget.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +9 -1
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +7 -1
- package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +4 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +35 -0
- package/dist/types/widgets/PoolWidget/utils.d.ts +0 -2
- package/package.json +12 -13
- package/dist/index-Bo9PV9W9.js +0 -32
- package/dist/index-C_iIEQbx.js +0 -78
- package/dist/index-RjsD5IyH.cjs +0 -32
- package/dist/types/store/actions/globals.d.ts +0 -9
- package/dist/types/store/actions/index.d.ts +0 -4
- package/dist/types/store/actions/settings.d.ts +0 -3
- package/dist/types/store/actions/token.d.ts +0 -7
- package/dist/types/store/actions/wallet.d.ts +0 -6
- package/dist/types/store/index.d.ts +0 -12
- package/dist/types/store/reducers/globals.d.ts +0 -21
- package/dist/types/store/reducers/index.d.ts +0 -17
- package/dist/types/store/reducers/settings.d.ts +0 -8
- package/dist/types/store/reducers/token.d.ts +0 -22
- package/dist/types/store/reducers/wallet.d.ts +0 -13
- package/dist/types/store/selectors/globals.d.ts +0 -7
- package/dist/types/store/selectors/settings.d.ts +0 -2
- package/dist/types/store/selectors/token.d.ts +0 -6
- package/dist/types/store/selectors/wallet.d.ts +0 -6
- package/dist/types/widgets/ve33/Ve33PoolDetail/index.d.ts +0 -7
- package/dist/types/widgets/ve33/Ve33PoolList/TableList.d.ts +0 -14
- package/dist/types/widgets/ve33/Ve33PoolList/index.d.ts +0 -5
- package/dist/types/widgets/ve33/Ve33PoolOperate/AddPoolOperate.d.ts +0 -6
- package/dist/types/widgets/ve33/Ve33PoolOperate/RemovePoolOperate.d.ts +0 -5
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/ComparePrice.d.ts +0 -8
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/OperateBtn.d.ts +0 -6
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SliderPercentageCard.d.ts +0 -7
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SlippageSetting.d.ts +0 -18
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/V2ConfirmDialog.d.ts +0 -19
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useComparePrice.d.ts +0 -19
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useLiquidityOperateAmount.d.ts +0 -82
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePercentageRemove.d.ts +0 -25
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePoolOperateTabs.d.ts +0 -12
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2AddLiquidity.d.ts +0 -12
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2BalanceInfo.d.ts +0 -34
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2RemoveLiquidity.d.ts +0 -12
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useWithdrawInfo.d.ts +0 -25
- package/dist/types/widgets/ve33/Ve33PoolOperate/index.d.ts +0 -23
- package/dist/types/widgets/ve33/Ve33PoolOperate/types.d.ts +0 -22
- package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +0 -14
- package/dist/types/widgets/ve33/VotePoolList/index.d.ts +0 -1
- package/dist/types/widgets/ve33/components/GoBack.d.ts +0 -4
- package/dist/types/widgets/ve33/components/PoolHead.d.ts +0 -8
- package/dist/types/widgets/ve33/components/PoolTypeTag.d.ts +0 -8
- package/dist/types/widgets/ve33/components/widgets.d.ts +0 -5
- package/dist/types/widgets/ve33/config.d.ts +0 -62
- package/dist/types/widgets/ve33/constants.d.ts +0 -21
- package/dist/types/widgets/ve33/hooks/usePoolColors.d.ts +0 -11
- package/dist/types/widgets/ve33/hooks/useVotePoolFilters.d.ts +0 -13
- package/dist/types/widgets/ve33/hooks/useVoteTabs.d.ts +0 -12
- package/dist/types/widgets/ve33/types.d.ts +0 -38
- package/dist/types/widgets/ve33/utils.d.ts +0 -9
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AppThunkAction } from '.';
|
|
2
|
-
import { ContractStatus } from '../reducers/globals';
|
|
3
|
-
export declare const setContractStatus: (contractStatus: ContractStatus) => AppThunkAction;
|
|
4
|
-
export declare const setAutoConnectLoading: (loading: boolean) => AppThunkAction;
|
|
5
|
-
export declare const setAutoSlippage: (autoSlippage: {
|
|
6
|
-
loading: boolean;
|
|
7
|
-
value: number | null;
|
|
8
|
-
}) => AppThunkAction;
|
|
9
|
-
export declare const setAutoSlippageLoading: (loading: boolean) => AppThunkAction;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Action, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit';
|
|
2
|
-
import { RootState } from '../reducers';
|
|
3
|
-
export type AppThunkAction<Ret = void> = ThunkAction<Ret, RootState, unknown, Action<string>>;
|
|
4
|
-
export type AppThunkDispatch = ThunkDispatch<RootState, unknown, Action<string>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { AppThunkAction } from '.';
|
|
2
|
-
import { TokenInfo, TokenList } from '../../hooks/Token';
|
|
3
|
-
import { SlippageWithToken } from '../reducers/token';
|
|
4
|
-
export declare const setTokenList: (tokenList: TokenList) => AppThunkAction;
|
|
5
|
-
export declare const setPopularTokenList: (popularTokenList: TokenList) => AppThunkAction;
|
|
6
|
-
export declare const setSlippageWithTokens: (slippageWithTokens: SlippageWithToken[]) => AppThunkAction;
|
|
7
|
-
export declare const setDefaultToToken: (token: TokenInfo) => AppThunkAction;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AppThunkAction } from '.';
|
|
2
|
-
import { ChainId } from '@dodoex/api';
|
|
3
|
-
import { State } from '../reducers/wallet';
|
|
4
|
-
export declare const setFromTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
|
|
5
|
-
export declare const setBlockNumber: (blockNumber: number) => AppThunkAction;
|
|
6
|
-
export declare const setOpenConnectWalletInfo: (openConnectWalletInfo: State["openConnectWalletInfo"]) => AppThunkAction;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** @ts-ignore */
|
|
2
|
-
export declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").CombinedState<{
|
|
3
|
-
settings: import("./reducers/settings").State;
|
|
4
|
-
wallet: import("./reducers/wallet").State;
|
|
5
|
-
token: import("./reducers/token").State;
|
|
6
|
-
globals: import("./reducers/globals").State;
|
|
7
|
-
}>, import("redux").AnyAction, [import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
8
|
-
settings: import("./reducers/settings").State;
|
|
9
|
-
wallet: import("./reducers/wallet").State;
|
|
10
|
-
token: import("./reducers/token").State;
|
|
11
|
-
globals: import("./reducers/globals").State;
|
|
12
|
-
}>, import("redux").AnyAction>]>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AnyAction } from 'redux';
|
|
2
|
-
export declare enum ContractStatus {
|
|
3
|
-
Initial = "Initial",
|
|
4
|
-
Pending = "Pending",
|
|
5
|
-
ApproveSuccess = "ApproveSuccess",
|
|
6
|
-
TxSuccess = "TxSuccess",
|
|
7
|
-
Failed = "Failed"
|
|
8
|
-
}
|
|
9
|
-
export interface State {
|
|
10
|
-
contractStatus?: ContractStatus;
|
|
11
|
-
autoConnectLoading?: boolean;
|
|
12
|
-
showCoingecko?: boolean;
|
|
13
|
-
/** source: props.getAutoSlippage */
|
|
14
|
-
autoSlippage?: {
|
|
15
|
-
loading: boolean;
|
|
16
|
-
value: number | null;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare const initialState: State;
|
|
20
|
-
declare const _default: (state: State | undefined, action: AnyAction) => State;
|
|
21
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { State as settingsState } from './settings';
|
|
2
|
-
import { State as walletState } from './wallet';
|
|
3
|
-
import { State as tokenState } from './token';
|
|
4
|
-
import { State as globalState } from './globals';
|
|
5
|
-
export interface RootState {
|
|
6
|
-
settings: settingsState;
|
|
7
|
-
wallet: walletState;
|
|
8
|
-
token: tokenState;
|
|
9
|
-
globals: globalState;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: () => import("redux").Reducer<import("redux").CombinedState<{
|
|
12
|
-
settings: settingsState;
|
|
13
|
-
wallet: walletState;
|
|
14
|
-
token: tokenState;
|
|
15
|
-
globals: globalState;
|
|
16
|
-
}>, import("redux").AnyAction>;
|
|
17
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AnyAction } from 'redux';
|
|
2
|
-
export type Slippage = string | null;
|
|
3
|
-
export type State = {
|
|
4
|
-
slippage: Slippage;
|
|
5
|
-
};
|
|
6
|
-
export declare const initialState: State;
|
|
7
|
-
declare const _default: (state: State | undefined, action: AnyAction) => State;
|
|
8
|
-
export default _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { AnyAction } from 'redux';
|
|
3
|
-
import type { TokenList } from '../../hooks/Token';
|
|
4
|
-
export type AccountBalance = {
|
|
5
|
-
tokenBalances?: BigNumber;
|
|
6
|
-
tokenAllowances?: BigNumber;
|
|
7
|
-
};
|
|
8
|
-
export type AccountBalances = {
|
|
9
|
-
[key in string]: AccountBalance;
|
|
10
|
-
};
|
|
11
|
-
export type SlippageWithToken = {
|
|
12
|
-
slippage: string;
|
|
13
|
-
tokens: string[];
|
|
14
|
-
};
|
|
15
|
-
export type State = {
|
|
16
|
-
tokenList: TokenList;
|
|
17
|
-
popularTokenList: TokenList;
|
|
18
|
-
slippageWithTokens: SlippageWithToken[];
|
|
19
|
-
};
|
|
20
|
-
export declare const initialState: State;
|
|
21
|
-
declare const _default: (state: State | undefined, action: AnyAction) => State;
|
|
22
|
-
export default _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AnyAction } from 'redux';
|
|
2
|
-
import { ChainId } from '@dodoex/api';
|
|
3
|
-
export type State = {
|
|
4
|
-
fromTokenChainId?: ChainId;
|
|
5
|
-
latestBlockNumber: number;
|
|
6
|
-
openConnectWalletInfo: boolean | {
|
|
7
|
-
/** Wallet is connected, chainID needs to be switched */
|
|
8
|
-
chainId?: ChainId;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export declare const initialState: State;
|
|
12
|
-
declare const _default: (state: State | undefined, action: AnyAction) => State;
|
|
13
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RootState } from '../reducers';
|
|
2
|
-
export declare const getContractStatus: (state?: RootState) => import("../reducers/globals").ContractStatus | undefined;
|
|
3
|
-
export declare const getAutoConnectLoading: (state?: RootState) => boolean | undefined;
|
|
4
|
-
export declare const getAutoSlippage: (state?: RootState) => {
|
|
5
|
-
loading: boolean;
|
|
6
|
-
value: number | null;
|
|
7
|
-
} | undefined;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ChainId } from '@dodoex/api';
|
|
2
|
-
import { RootState } from '../reducers';
|
|
3
|
-
export declare const getTokenList: (state?: RootState) => import("../../hooks/Token").TokenList;
|
|
4
|
-
export declare const getAllTokenList: (state?: RootState) => import("../..").TokenInfo[];
|
|
5
|
-
export declare const getPopularTokenList: (chainId: ChainId, state?: RootState) => import("../..").TokenInfo[];
|
|
6
|
-
export declare const getSlippageWithTokens: (state?: RootState) => import("../reducers/token").SlippageWithToken[];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { RootState } from '../reducers';
|
|
2
|
-
export declare const getFromTokenChainId: (state?: RootState) => import("@dodoex/api").ChainId | undefined;
|
|
3
|
-
export declare const getLatestBlockNumber: (state?: RootState) => number;
|
|
4
|
-
export declare const getOpenConnectWalletInfo: (state?: RootState) => boolean | {
|
|
5
|
-
chainId?: import("@dodoex/api").ChainId;
|
|
6
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ChainId } from '@dodoex/api';
|
|
2
|
-
import { Ve33PoolInfoI, Ve33PoolOperateProps } from '../types';
|
|
3
|
-
export interface TableListProps {
|
|
4
|
-
chainId: ChainId;
|
|
5
|
-
poolList: Ve33PoolInfoI[];
|
|
6
|
-
usdValueChecked: boolean;
|
|
7
|
-
operatePool: Ve33PoolOperateProps | null;
|
|
8
|
-
setOperatePool: (operate: Ve33PoolOperateProps | null) => void;
|
|
9
|
-
hasMore?: boolean;
|
|
10
|
-
loadMore?: () => void;
|
|
11
|
-
loadMoreLoading?: boolean;
|
|
12
|
-
onClickPoolListRow: (id: string, chainId: ChainId) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const TableList: ({ chainId, poolList, usdValueChecked, operatePool, setOperatePool, hasMore, loadMore, loadMoreLoading, onClickPoolListRow, }: TableListProps) => JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
-
export default function ComparePrice({ lqAndDodoCompareText, baseToken, quoteToken, midPrice, }: {
|
|
4
|
-
lqAndDodoCompareText: string;
|
|
5
|
-
baseToken?: TokenInfo;
|
|
6
|
-
quoteToken?: TokenInfo;
|
|
7
|
-
midPrice?: BigNumber;
|
|
8
|
-
}): JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { useTokenStatus } from '../../../../hooks/Token/useTokenStatus';
|
|
2
|
-
export default function OperateBtn({ chainId, baseTokenStatus, quoteTokenStatus, children, }: React.PropsWithChildren<{
|
|
3
|
-
chainId: number;
|
|
4
|
-
baseTokenStatus?: ReturnType<typeof useTokenStatus>;
|
|
5
|
-
quoteTokenStatus?: ReturnType<typeof useTokenStatus>;
|
|
6
|
-
}>): JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BoxProps } from '@dodoex/components';
|
|
2
|
-
import { AUTO_SWAP_SLIPPAGE_PROTECTION } from '../../../../constants/pool';
|
|
3
|
-
import { PoolTypeE } from '../../types';
|
|
4
|
-
export declare const useSlipper: ({ type }: {
|
|
5
|
-
type?: PoolTypeE;
|
|
6
|
-
}) => {
|
|
7
|
-
slipper: number | "auto";
|
|
8
|
-
setSlipper: import("react").Dispatch<import("react").SetStateAction<number | "auto">>;
|
|
9
|
-
slipperValue: number;
|
|
10
|
-
resetSlipper: () => void;
|
|
11
|
-
};
|
|
12
|
-
export default function SlippageSetting({ type, disabled, value, onChange, sx, }: {
|
|
13
|
-
type?: PoolTypeE;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
value: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION;
|
|
16
|
-
onChange: (val: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION) => void;
|
|
17
|
-
sx?: BoxProps['sx'];
|
|
18
|
-
}): JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
-
import { useVe33AddLiquidity } from '../hooks/useVe33V2AddLiquidity';
|
|
4
|
-
export default function V2ConfirmDialog({ open, onClose, slippage, baseToken, quoteToken, baseAmount, quoteAmount, lpAmount, fee, price, shareOfPool, pairAddress, stable, createMutation, }: {
|
|
5
|
-
open: boolean;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
slippage: number;
|
|
8
|
-
baseToken?: TokenInfo;
|
|
9
|
-
quoteToken?: TokenInfo;
|
|
10
|
-
baseAmount: string;
|
|
11
|
-
quoteAmount: string;
|
|
12
|
-
lpAmount: BigNumber | undefined;
|
|
13
|
-
fee: number | undefined;
|
|
14
|
-
price?: BigNumber | null;
|
|
15
|
-
shareOfPool?: string;
|
|
16
|
-
pairAddress?: string;
|
|
17
|
-
stable?: boolean;
|
|
18
|
-
createMutation: ReturnType<typeof useVe33AddLiquidity>;
|
|
19
|
-
}): JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
-
export declare function useDODOPrice({ baseToken, quoteToken, }: {
|
|
4
|
-
baseToken?: TokenInfo;
|
|
5
|
-
quoteToken?: TokenInfo;
|
|
6
|
-
}): {
|
|
7
|
-
comparePrice: BigNumber | null;
|
|
8
|
-
comparePriceText: string;
|
|
9
|
-
loading: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const lqAndDodoCompareSmallNum = 0.01;
|
|
12
|
-
export declare const lqAndDodoCompareWarningNum = 0.03;
|
|
13
|
-
export declare const useComparePrice: (baseToken?: TokenInfo, quoteToken?: TokenInfo, midPrice?: BigNumber) => {
|
|
14
|
-
lqAndDodoCompare: number;
|
|
15
|
-
lqAndDodoCompareText: string;
|
|
16
|
-
midPrice: BigNumber | undefined;
|
|
17
|
-
isShowCompare: boolean;
|
|
18
|
-
isWarnCompare: boolean;
|
|
19
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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>;
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
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>;
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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;
|
|
@@ -1,14 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const VotePoolList: () => JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
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;
|