@dodoex/widgets 3.0.4-ve33.1 → 3.0.4-ve33.11
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-C3H6B4Oy.cjs → helper-BASM7Iwr.cjs} +1 -1
- package/dist/{helper-0RKQSgE1.js → helper-BASXTlaZ.js} +1 -1
- package/dist/{index-8b78r-JT.js → index-BPaBKoXS.js} +1 -1
- package/dist/index-CjO6DZLb.js +32 -0
- package/dist/index-DH1Xhcg6.cjs +32 -0
- package/dist/{index-DdE6aa-k.cjs → index-mk0U3yyv.cjs} +1 -1
- package/dist/{index-D9uctpVh.js → index-r9aOMH8w.js} +1 -1
- package/dist/{index-CsquFrM1.cjs → index-zX4IFul3.cjs} +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 +3 -1
- package/dist/types/components/CardWidgets.d.ts +2 -1
- package/dist/types/components/SimpleItemInfo.d.ts +4 -0
- package/dist/types/components/Swap/components/Dialog.d.ts +3 -0
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -2
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +1 -4
- package/dist/types/components/Swap/components/TokenCard/NumberInput.d.ts +1 -0
- package/dist/types/components/Swap/components/TokenCard/TokenLpCard.d.ts +32 -0
- package/dist/types/components/Swap/components/TokenCard/index.d.ts +2 -1
- package/dist/types/components/Swap/index.d.ts +1 -4
- package/dist/types/components/Token/TokenItem.d.ts +2 -1
- package/dist/types/components/TokenSelect.d.ts +5 -2
- package/dist/types/components/TokenStatusButton.d.ts +1 -1
- package/dist/types/components/Widget/index.d.ts +1 -0
- 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 +3 -0
- package/dist/types/hooks/Submission/types.d.ts +21 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +1 -3
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +1 -1
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +1 -0
- package/dist/types/hooks/Token/usePoolTokenSort.d.ts +24 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/index.d.ts +40 -23
- package/dist/types/utils/formatter.d.ts +2 -2
- package/dist/types/utils/fractions/fraction.d.ts +24 -0
- package/dist/types/utils/fractions/index.d.ts +3 -0
- package/dist/types/utils/fractions/percent.d.ts +14 -0
- package/dist/types/utils/fractions/price.d.ts +29 -0
- package/dist/types/utils/fractions/types.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/utils.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/AddIncentiveDialog.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/Dashboard.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/PoolInfo.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/CardList.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/TableList.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/CardList.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33LockList/ClaimLockDialog.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/LockManageDialog.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/MergeDialog.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/TableList.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimBribes.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimRebases.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useExtendLock.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useFetchUserLocks.d.ts +282 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useIncreaseLock.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useMergeLock.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useTransferLock.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useCreateLock.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useFetchUserTotalVeNFT.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/index.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/utils.d.ts +21 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/MyAssets.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/MyPosition.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/PoolInfo.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/useVe33V3Positions.d.ts +79 -0
- package/dist/types/widgets/ve33/Ve33PoolList/CardList.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33PoolList/TableList.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33PoolList/index.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33StakeDialog.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/AddPoolOperate.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/RemovePoolOperate.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/ComparePrice.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/OperateBtn.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/SliderPercentageCard.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/SlippageSetting.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/V2ConfirmDialog.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useComparePrice.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useLiquidityOperateAmount.d.ts +86 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/usePercentageRemove.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useVe33V2AddLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useVe33V2BalanceInfo.d.ts +36 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useVe33V2RemoveLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useWithdrawInfo.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/index.d.ts +15 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/types.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/Ve33V3AddLiquidity.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/Badge/RangeBadge.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ClaimButton.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InRangeDot.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InputStepCounter.d.ts +17 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Area.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/AxisBottom.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Brush.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Chart.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Line.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Zoom.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/index.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/svg.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/types.d.ts +50 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/utils.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/MyLiquidity.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionManage.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionPreview.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionSelectedRangePreview.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeRatioSelect.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeSelector.d.ts +21 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RateToggle.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RemoveButton.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ReviewModal.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenAndEtherscan.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenPairSelect.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/shared.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/widgets.d.ts +56 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/constants/misc.d.ts +17 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useAddVe33V3Liquidity.d.ts +15 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePoolActiveLiquidityChartData.d.ts +37 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePriceRangeRatioSelect.d.ts +28 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useRemoveVe33V3Liquidity.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useSetRange.d.ts +36 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Amounts.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Pair.d.ts +58 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/index.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/types.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/calldata.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/computeSurroundingTicks.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/constants.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/encodeSqrtRatioX96.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/formatTickPrice.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/fullMath.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmount.d.ts +39 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmountWithSlippage.d.ts +23 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getTickToPrice.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/maxLiquidityForAmounts.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/mostSignificantBit.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/nearestUsableTick.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/slippage.d.ts +3 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrt.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrtPriceMath.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tickMath.d.ts +34 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tryParseTick.d.ts +4 -0
- package/dist/types/widgets/ve33/VotePoolList/CardList.d.ts +12 -0
- package/dist/types/widgets/ve33/VotePoolList/SetVotePowerDialog.d.ts +12 -0
- package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +12 -0
- package/dist/types/widgets/ve33/VotePoolList/hooks/useVoteVe33.d.ts +7 -0
- package/dist/types/widgets/ve33/VotePoolList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/VotePoolList/widgets.d.ts +35 -0
- package/dist/types/widgets/ve33/components/GoBack.d.ts +4 -0
- package/dist/types/widgets/ve33/components/LockSlider.d.ts +5 -0
- package/dist/types/widgets/ve33/components/PoolHead.d.ts +8 -0
- package/dist/types/widgets/ve33/components/PoolTokenInfo.d.ts +11 -0
- package/dist/types/widgets/ve33/components/PoolTypeTag.d.ts +8 -0
- package/dist/types/widgets/ve33/components/widgets.d.ts +5 -0
- package/dist/types/widgets/ve33/config.d.ts +62 -0
- package/dist/types/widgets/ve33/constants.d.ts +21 -0
- package/dist/types/widgets/ve33/hooks/usePoolColors.d.ts +11 -0
- package/dist/types/widgets/ve33/hooks/useVe33PositionAmounts.d.ts +17 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2ClaimEmissions.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2ClaimTradingFees.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2Stake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2UnStake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3ClaimEmissions.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3ClaimTradingFees.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3Stake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3StakeApproveStatus.d.ts +17 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3UnStake.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 +38 -0
- package/dist/types/widgets/ve33/utils.d.ts +9 -0
- package/package.json +10 -10
- package/dist/index-CHBBNnLK.cjs +0 -31
- package/dist/index-a6XIfxp-.js +0 -31
- package/dist/types/hooks/Swap/useFetchRoutePrice.test.d.ts +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
baseLpToTokenProportion: BigNumber | undefined;
|
|
23
|
+
quoteLpToTokenProportion: BigNumber | undefined;
|
|
24
|
+
userLp: BigNumber | undefined;
|
|
25
|
+
totalLp: BigNumber | undefined;
|
|
26
|
+
token0Reserve: BigNumber | undefined;
|
|
27
|
+
token1Reserve: BigNumber | undefined;
|
|
28
|
+
userLpToToken0: BigNumber | undefined;
|
|
29
|
+
userLpToToken1: BigNumber | undefined;
|
|
30
|
+
isRearTokenA: boolean;
|
|
31
|
+
price: import("@uniswap/sdk-core").Price<import("@uniswap/sdk-core").Token, import("@uniswap/sdk-core").Token> | undefined;
|
|
32
|
+
liquidityMinted: BigNumber | undefined;
|
|
33
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
34
|
+
shareOfPool: string;
|
|
35
|
+
userLpToTokenBalanceLoading: boolean;
|
|
36
|
+
userLpToTokenBalanceErrorRefetch: (() => void) | undefined;
|
|
37
|
+
refetch: () => void;
|
|
38
|
+
};
|
|
39
|
+
addPortion?: undefined;
|
|
40
|
+
amountLoading?: undefined;
|
|
41
|
+
amountError?: undefined;
|
|
42
|
+
amountRefetch?: undefined;
|
|
43
|
+
amountCheckedDisabled?: undefined;
|
|
44
|
+
midPrice?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
baseAmount: string;
|
|
47
|
+
quoteAmount: string;
|
|
48
|
+
handleChangeBaseAmount: (newValue: string) => void;
|
|
49
|
+
handleChangeQuoteAmount: (newValue: string) => void;
|
|
50
|
+
reset: () => void;
|
|
51
|
+
addPortion: BigNumber;
|
|
52
|
+
amountLoading: boolean;
|
|
53
|
+
amountError: boolean;
|
|
54
|
+
amountRefetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
|
|
55
|
+
_reserve0: bigint;
|
|
56
|
+
_reserve1: bigint;
|
|
57
|
+
_blockTimestampLast: bigint;
|
|
58
|
+
}, Error>>;
|
|
59
|
+
amountCheckedDisabled: boolean;
|
|
60
|
+
balanceInfo: {
|
|
61
|
+
userLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
62
|
+
totalLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
63
|
+
reserveQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
64
|
+
_reserve0: bigint;
|
|
65
|
+
_reserve1: bigint;
|
|
66
|
+
_blockTimestampLast: bigint;
|
|
67
|
+
}, Error>;
|
|
68
|
+
baseLpToTokenProportion: BigNumber | undefined;
|
|
69
|
+
quoteLpToTokenProportion: BigNumber | undefined;
|
|
70
|
+
userLp: BigNumber | undefined;
|
|
71
|
+
totalLp: BigNumber | undefined;
|
|
72
|
+
token0Reserve: BigNumber | undefined;
|
|
73
|
+
token1Reserve: BigNumber | undefined;
|
|
74
|
+
userLpToToken0: BigNumber | undefined;
|
|
75
|
+
userLpToToken1: BigNumber | undefined;
|
|
76
|
+
isRearTokenA: boolean;
|
|
77
|
+
price: import("@uniswap/sdk-core").Price<import("@uniswap/sdk-core").Token, import("@uniswap/sdk-core").Token> | undefined;
|
|
78
|
+
liquidityMinted: BigNumber | undefined;
|
|
79
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
80
|
+
shareOfPool: string;
|
|
81
|
+
userLpToTokenBalanceLoading: boolean;
|
|
82
|
+
userLpToTokenBalanceErrorRefetch: (() => void) | undefined;
|
|
83
|
+
refetch: () => void;
|
|
84
|
+
};
|
|
85
|
+
midPrice: BigNumber | undefined;
|
|
86
|
+
};
|
|
@@ -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,36 @@
|
|
|
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
|
+
baseLpToTokenProportion: BigNumber | undefined;
|
|
21
|
+
quoteLpToTokenProportion: BigNumber | undefined;
|
|
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: Price<Token, Token> | undefined;
|
|
30
|
+
liquidityMinted: BigNumber | undefined;
|
|
31
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
32
|
+
shareOfPool: string;
|
|
33
|
+
userLpToTokenBalanceLoading: boolean;
|
|
34
|
+
userLpToTokenBalanceErrorRefetch: (() => void) | undefined;
|
|
35
|
+
refetch: () => void;
|
|
36
|
+
};
|
|
@@ -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,15 @@
|
|
|
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 Ve33V2PoolOperateDialog({ modal, ...props }: PoolOperateProps & {
|
|
13
|
+
modal?: boolean;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
export declare function Ve33V2PoolOperate({ sx, pool, operate, account, errorRefetch, submittedBack, onClose, }: PoolOperateProps): JSX.Element;
|
|
@@ -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,9 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export interface ClaimButtonProps {
|
|
3
|
+
chainId: ChainId;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
border?: boolean;
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ClaimButton: ({ chainId, disabled, isLoading, border, onConfirm, }: ClaimButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface StepCounterProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onUserInput: (value: string) => void;
|
|
5
|
+
decrement: () => string;
|
|
6
|
+
increment: () => string;
|
|
7
|
+
decrementDisabled?: boolean;
|
|
8
|
+
incrementDisabled?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
locked?: boolean;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
tokenA?: string;
|
|
13
|
+
tokenB?: string;
|
|
14
|
+
border?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const StepCounter: ({ value, decrement, increment, decrementDisabled, incrementDisabled, locked, onUserInput, title, tokenA, tokenB, border, }: StepCounterProps) => JSX.Element;
|
|
17
|
+
export default StepCounter;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Area.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScaleLinear } from 'd3';
|
|
2
|
+
import { ChartEntry } from './types';
|
|
3
|
+
export declare const Area: ({ series, xScale, yScale, xValue, yValue, fill, }: {
|
|
4
|
+
series: ChartEntry[];
|
|
5
|
+
xScale: ScaleLinear<number, number>;
|
|
6
|
+
yScale: ScaleLinear<number, number>;
|
|
7
|
+
xValue: (d: ChartEntry) => number;
|
|
8
|
+
yValue: (d: ChartEntry) => number;
|
|
9
|
+
fill?: string;
|
|
10
|
+
}) => JSX.Element;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Brush.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ScaleLinear } from 'd3';
|
|
2
|
+
export declare const Brush: ({ id, xScale, interactive, brushLabelValue, brushExtent, setBrushExtent, innerWidth, innerHeight, westHandleColor, eastHandleColor, }: {
|
|
3
|
+
id: string;
|
|
4
|
+
xScale: ScaleLinear<number, number>;
|
|
5
|
+
interactive: boolean;
|
|
6
|
+
brushLabelValue: (d: "w" | "e", x: number) => string;
|
|
7
|
+
brushExtent: [number, number];
|
|
8
|
+
setBrushExtent: (extent: [number, number], mode: string | undefined) => void;
|
|
9
|
+
innerWidth: number;
|
|
10
|
+
innerHeight: number;
|
|
11
|
+
westHandleColor: string;
|
|
12
|
+
eastHandleColor: string;
|
|
13
|
+
}) => JSX.Element;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Chart.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { LiquidityChartRangeInputProps } from './types';
|
|
2
|
+
export declare function Chart({ id, data: { series, current }, ticksAtLimit, styles, dimensions: { width, height }, margins, interactive, brushDomain, brushLabels, onBrushDomainChange, zoomLevels, }: LiquidityChartRangeInputProps): JSX.Element;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Zoom.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ScaleLinear, ZoomTransform } from 'd3';
|
|
2
|
+
import { ZoomLevels } from './types';
|
|
3
|
+
export default function Zoom({ svg, xScale, setZoom, width, height, resetBrush, showResetButton, zoomLevels, }: {
|
|
4
|
+
svg: SVGElement | null;
|
|
5
|
+
xScale: ScaleLinear<number, number>;
|
|
6
|
+
setZoom: (transform: ZoomTransform) => void;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
resetBrush: () => void;
|
|
10
|
+
showResetButton: boolean;
|
|
11
|
+
zoomLevels: ZoomLevels;
|
|
12
|
+
}): JSX.Element;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Bound } from '../../types';
|
|
2
|
+
import { TokenInfo } from '../../../../../hooks/Token';
|
|
3
|
+
import { Price } from '../../../../../utils/fractions';
|
|
4
|
+
import { usePoolActiveLiquidityChartData } from '../../hooks/usePoolActiveLiquidityChartData';
|
|
5
|
+
export default function LiquidityChartRangeInput({ currencyA, currencyB, isSorted, ticksAtLimit, price, priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, interactive, chartData, }: {
|
|
6
|
+
currencyA?: TokenInfo;
|
|
7
|
+
currencyB?: TokenInfo;
|
|
8
|
+
isSorted: boolean;
|
|
9
|
+
ticksAtLimit: {
|
|
10
|
+
[bound in Bound]?: boolean | undefined;
|
|
11
|
+
};
|
|
12
|
+
price?: number;
|
|
13
|
+
priceLower?: Price;
|
|
14
|
+
priceUpper?: Price;
|
|
15
|
+
onLeftRangeInput: (typedValue: string) => void;
|
|
16
|
+
onRightRangeInput: (typedValue: string) => void;
|
|
17
|
+
interactive: boolean;
|
|
18
|
+
chartData: ReturnType<typeof usePoolActiveLiquidityChartData>;
|
|
19
|
+
}): JSX.Element | null;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/svg.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates an SVG path for the east brush handle.
|
|
3
|
+
* Apply `scale(-1, 1)` to generate west brush handle.
|
|
4
|
+
*
|
|
5
|
+
* |```````\
|
|
6
|
+
* | | | |
|
|
7
|
+
* |______/
|
|
8
|
+
* |
|
|
9
|
+
* |
|
|
10
|
+
* |
|
|
11
|
+
* |
|
|
12
|
+
* |
|
|
13
|
+
*
|
|
14
|
+
* https://medium.com/@dennismphil/one-side-rounded-rectangle-using-svg-fb31cf318d90
|
|
15
|
+
*/
|
|
16
|
+
export declare const brushHandlePath: (height: number) => string;
|
|
17
|
+
export declare const brushHandleAccentPath: () => string;
|
|
18
|
+
export declare const OffScreenHandle: ({ color, size, margin, }: {
|
|
19
|
+
color: string;
|
|
20
|
+
size?: number;
|
|
21
|
+
margin?: number;
|
|
22
|
+
}) => JSX.Element;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/types.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Bound } from '../../types';
|
|
2
|
+
export interface ChartEntry {
|
|
3
|
+
activeLiquidity: number;
|
|
4
|
+
price0: number;
|
|
5
|
+
}
|
|
6
|
+
interface Dimensions {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
interface Margins {
|
|
11
|
+
top: number;
|
|
12
|
+
right: number;
|
|
13
|
+
bottom: number;
|
|
14
|
+
left: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ZoomLevels {
|
|
17
|
+
initialMin: number;
|
|
18
|
+
initialMax: number;
|
|
19
|
+
min: number;
|
|
20
|
+
max: number;
|
|
21
|
+
}
|
|
22
|
+
export interface LiquidityChartRangeInputProps {
|
|
23
|
+
id?: string;
|
|
24
|
+
data: {
|
|
25
|
+
series: ChartEntry[];
|
|
26
|
+
current: number;
|
|
27
|
+
};
|
|
28
|
+
ticksAtLimit: {
|
|
29
|
+
[bound in Bound]?: boolean | undefined;
|
|
30
|
+
};
|
|
31
|
+
styles: {
|
|
32
|
+
area: {
|
|
33
|
+
selection: string;
|
|
34
|
+
};
|
|
35
|
+
brush: {
|
|
36
|
+
handle: {
|
|
37
|
+
west: string;
|
|
38
|
+
east: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
dimensions: Dimensions;
|
|
43
|
+
margins: Margins;
|
|
44
|
+
interactive?: boolean;
|
|
45
|
+
brushLabels: (d: 'w' | 'e', x: number) => string;
|
|
46
|
+
brushDomain?: [number, number];
|
|
47
|
+
onBrushDomainChange: (domain: [number, number], mode: string | undefined) => void;
|
|
48
|
+
zoomLevels: ZoomLevels;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function usePrevious<T>(value: T): T | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export default function MyLiquidity({ border, token0, token1, amount0, amount1, sx, }: {
|
|
4
|
+
border?: boolean;
|
|
5
|
+
token0: TokenInfo | undefined;
|
|
6
|
+
token1: TokenInfo | undefined;
|
|
7
|
+
amount0: string | undefined;
|
|
8
|
+
amount1: string | undefined;
|
|
9
|
+
sx?: BoxProps['sx'];
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Ve33PoolInfoI } from '../../types';
|
|
2
|
+
export interface AMMV3PositionManageProps {
|
|
3
|
+
poolInfo?: Ve33PoolInfoI;
|
|
4
|
+
tokenId: string | number | undefined;
|
|
5
|
+
onClose: (() => void) | undefined;
|
|
6
|
+
dialog?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export default function PositionManage({ dialog, ...props }: AMMV3PositionManageProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export declare const PositionPreview: ({ token0, token1, liquidity, amount0, amount1, price, tickLower, tickUpper, title, inRange, }: {
|
|
4
|
+
token0: TokenInfo | undefined;
|
|
5
|
+
token1: TokenInfo | undefined;
|
|
6
|
+
liquidity: number | string | undefined;
|
|
7
|
+
amount0: string | undefined;
|
|
8
|
+
amount1: string | undefined;
|
|
9
|
+
title?: ReactNode;
|
|
10
|
+
price: string | undefined;
|
|
11
|
+
tickLower: number | undefined;
|
|
12
|
+
tickUpper: number | undefined;
|
|
13
|
+
inRange: boolean;
|
|
14
|
+
}) => JSX.Element;
|
package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionSelectedRangePreview.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export declare const PositionSelectedRangePreview: ({ token0, token1, token0Price, tickLower, tickUpper, title, border, }: {
|
|
4
|
+
token0: TokenInfo;
|
|
5
|
+
token1: TokenInfo;
|
|
6
|
+
token0Price: string | undefined;
|
|
7
|
+
tickLower: number | undefined;
|
|
8
|
+
tickUpper: number | undefined;
|
|
9
|
+
title?: ReactNode;
|
|
10
|
+
border?: boolean;
|
|
11
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { PriceRangeRatioSelectProps } from '../hooks/usePriceRangeRatioSelect';
|
|
2
|
+
export default function RangeRatioSelect({ totalApr, currentPrice, tickSpacing, priceLower, priceUpper, token0, token1, tickSpaceLimits, onLeftRangeInput, onRightRangeInput, handleSetFullRange, }: PriceRangeRatioSelectProps): JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Bound } from '../types';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import { Price } from '../../../../utils/fractions';
|
|
4
|
+
export interface RangeSelectorProps {
|
|
5
|
+
priceLower?: Price;
|
|
6
|
+
priceUpper?: Price;
|
|
7
|
+
getDecrementLower: () => string;
|
|
8
|
+
getIncrementLower: () => string;
|
|
9
|
+
getDecrementUpper: () => string;
|
|
10
|
+
getIncrementUpper: () => string;
|
|
11
|
+
onLeftRangeInput: (typedValue: string) => void;
|
|
12
|
+
onRightRangeInput: (typedValue: string) => void;
|
|
13
|
+
tokenA?: TokenInfo | null;
|
|
14
|
+
tokenB?: TokenInfo | null;
|
|
15
|
+
ticksAtLimit: {
|
|
16
|
+
[bound in Bound]?: boolean | undefined;
|
|
17
|
+
};
|
|
18
|
+
isSorted: boolean;
|
|
19
|
+
border?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const RangeSelector: ({ priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, getDecrementLower, getIncrementLower, getDecrementUpper, getIncrementUpper, tokenA, tokenB, ticksAtLimit, isSorted, border, }: RangeSelectorProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export interface RateToggleProps {
|
|
4
|
+
baseToken: TokenInfo | undefined;
|
|
5
|
+
quoteToken: TokenInfo | undefined;
|
|
6
|
+
handleRateToggle: () => void;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
}
|
|
9
|
+
export declare const RateToggle: ({ baseToken, quoteToken, handleRateToggle, sx, }: RateToggleProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export interface ButtonsProps {
|
|
3
|
+
chainId: ChainId;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
removed: boolean | undefined;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
error?: React.ReactNode;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
border?: boolean;
|
|
10
|
+
removeText?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const RemoveButton: ({ chainId, disabled, removed, isLoading, error, onConfirm, border, removeText, }: ButtonsProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
export interface ReviewModalProps {
|
|
3
|
+
on: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onConfirm: () => void;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
token0: TokenInfo | undefined;
|
|
8
|
+
token1: TokenInfo | undefined;
|
|
9
|
+
liquidity: number | string | undefined;
|
|
10
|
+
amount0: string | undefined;
|
|
11
|
+
amount1: string | undefined;
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
price: string | undefined;
|
|
14
|
+
tickLower: number | undefined;
|
|
15
|
+
tickUpper: number | undefined;
|
|
16
|
+
inRange: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const ReviewModal: ({ on, onClose, onConfirm, loading, token0, token1, liquidity, amount0, amount1, price, tickLower, tickUpper, title, inRange, }: ReviewModalProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Actions, StateProps } from '../reducer';
|
|
2
|
+
export interface TokenPairSelectProps {
|
|
3
|
+
baseToken: StateProps['baseToken'];
|
|
4
|
+
quoteToken: StateProps['quoteToken'];
|
|
5
|
+
dispatch: React.Dispatch<Actions>;
|
|
6
|
+
}
|
|
7
|
+
export declare const TokenPairSelect: ({ baseToken, quoteToken, dispatch, }: TokenPairSelectProps) => JSX.Element;
|