@dodoex/widgets 3.0.2-bartio.2 → 3.0.2-bartio.20
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/LICENSE +674 -674
- package/README.md +69 -69
- package/dist/{8de9a184d4ef0a11.svg → 219f8611c6c9e6e2.svg} +6 -6
- package/dist/{28442382d977858a.svg → 34acf2e58b457195.svg} +9 -9
- package/dist/{b3f16b2626f03378.svg → 44df077bd19df476.svg} +10 -10
- package/dist/{ed726d76d93d4899.svg → 5c5d298f247819e1.svg} +10 -10
- package/dist/{e4364db573253fd1.svg → 7feb1ff0e03a571d.svg} +9 -9
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-D6LlnQ1M.cjs → helper-DC0Bv4FI.cjs} +1 -1
- package/dist/{helper-BhZWILyg.js → helper-Dogdv9I2.js} +1 -1
- package/dist/index-BnY-vTM4.js +67 -0
- package/dist/{index-DDsCP5_a.cjs → index-C5JqZwwp.cjs} +2 -2
- package/dist/index-F06WKOh1.cjs +67 -0
- package/dist/index-JG6WMPGu.js +78 -0
- package/dist/{index-7x0JpwJJ.cjs → index-Pa9bOnFT.cjs} +6 -6
- package/dist/{index-CAmXGIvF.js → index-iFj85-kA.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 -1
- package/dist/types/components/List/EmptyList.d.ts +2 -1
- package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +2 -1
- package/dist/types/components/Swap/components/SwitchBox.d.ts +2 -1
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +3 -2
- package/dist/types/components/Swap/index.d.ts +4 -1
- package/dist/types/components/TokenLogoPair.d.ts +1 -1
- package/dist/types/components/TokenSelect.d.ts +2 -1
- package/dist/types/components/Widget/index.d.ts +27 -1
- package/dist/types/components/WidgetContainer.d.ts +1 -1
- package/dist/types/components/WithExecutionDialog/index.d.ts +1 -1
- package/dist/types/constants/chains.d.ts +0 -3
- package/dist/types/hooks/Submission/types.d.ts +3 -0
- package/dist/types/hooks/Submission/useExecution.d.ts +2 -0
- package/dist/types/hooks/contract/useFetchBlockNumber.d.ts +1 -1
- package/dist/types/hooks/useGlobalState.d.ts +32 -0
- package/dist/types/hooks/useTokenState.d.ts +18 -0
- package/dist/types/index.d.ts +4 -1
- package/dist/types/utils/address.d.ts +1 -1
- package/dist/types/utils/token.d.ts +1 -1
- 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/AMMV3/sdks/sdk-core/addresses.d.ts +0 -14
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/Algebra/AddLiquidity.d.ts +7 -1
- package/dist/types/widgets/PoolWidget/Algebra/components/ClaimButton.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/Algebra/components/InputStepCounter.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/index.d.ts +11 -9
- package/dist/types/widgets/PoolWidget/Algebra/components/RangeSelector.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/Algebra/components/RateToggle.d.ts +3 -3
- package/dist/types/widgets/PoolWidget/Algebra/components/RemoveButton.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/Algebra/hooks/usePoolActiveLiquidityChartData.d.ts +37 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/computeSurroundingTicks.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/Algebra/utils/getPositionAmountWithSlippage.d.ts +3 -2
- package/dist/types/widgets/PoolWidget/Algebra/utils/getTickToPrice.d.ts +1 -9
- package/dist/types/widgets/PoolWidget/Algebra/utils/tryParseTick.d.ts +2 -5
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +7 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +7 -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 +11 -1
- package/dist/types/widgets/PoolWidget/hooks/contract/getModifyDPPPoolParams.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +35 -0
- package/package.json +156 -157
- package/dist/index-BduZdyfz.cjs +0 -31
- package/dist/index-Dl7FV9-C.js +0 -31
- package/dist/index-h5hit_bx.js +0 -78
- 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/PoolWidget/Algebra/components/LiquidityChartRangeInput/hooks.d.ts +0 -12
- package/dist/types/widgets/PoolWidget/Algebra/hooks/usePoolTickData.d.ts +0 -20
package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/index.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { Currency, Price } from '../../sdks/sdk-core';
|
|
2
|
-
import { FeeAmount } from '../../sdks/v3-sdk';
|
|
3
1
|
import { Bound } from '../../types';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
|
8
9
|
ticksAtLimit: {
|
|
9
10
|
[bound in Bound]?: boolean | undefined;
|
|
10
11
|
};
|
|
11
12
|
price?: number;
|
|
12
|
-
priceLower?: Price
|
|
13
|
-
priceUpper?: Price
|
|
13
|
+
priceLower?: Price;
|
|
14
|
+
priceUpper?: Price;
|
|
14
15
|
onLeftRangeInput: (typedValue: string) => void;
|
|
15
16
|
onRightRangeInput: (typedValue: string) => void;
|
|
16
17
|
interactive: boolean;
|
|
17
|
-
|
|
18
|
+
chartData: ReturnType<typeof usePoolActiveLiquidityChartData>;
|
|
19
|
+
}): JSX.Element | null;
|
|
@@ -16,5 +16,6 @@ export interface RangeSelectorProps {
|
|
|
16
16
|
[bound in Bound]?: boolean | undefined;
|
|
17
17
|
};
|
|
18
18
|
isSorted: boolean;
|
|
19
|
+
border?: boolean;
|
|
19
20
|
}
|
|
20
|
-
export declare const RangeSelector: ({ priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, getDecrementLower, getIncrementLower, getDecrementUpper, getIncrementUpper, tokenA, tokenB, ticksAtLimit, isSorted, }: RangeSelectorProps) => JSX.Element;
|
|
21
|
+
export declare const RangeSelector: ({ priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, getDecrementLower, getIncrementLower, getDecrementUpper, getIncrementUpper, tokenA, tokenB, ticksAtLimit, isSorted, border, }: RangeSelectorProps) => JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
2
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
3
|
export interface RateToggleProps {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
baseToken: TokenInfo | undefined;
|
|
5
|
+
quoteToken: TokenInfo | undefined;
|
|
6
6
|
handleRateToggle: () => void;
|
|
7
7
|
sx?: BoxProps['sx'];
|
|
8
8
|
}
|
|
9
|
-
export declare const RateToggle: ({
|
|
9
|
+
export declare const RateToggle: ({ baseToken, quoteToken, handleRateToggle, sx, }: RateToggleProps) => JSX.Element;
|
|
@@ -6,5 +6,6 @@ export interface ButtonsProps {
|
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
error?: React.ReactNode;
|
|
8
8
|
onConfirm: () => void;
|
|
9
|
+
border?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare const RemoveButton: ({ chainId, disabled, removed, isLoading, error, onConfirm, }: ButtonsProps) => JSX.Element;
|
|
11
|
+
export declare const RemoveButton: ({ chainId, disabled, removed, isLoading, error, onConfirm, border, }: ButtonsProps) => JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import JSBI from 'jsbi';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import { Price } from '../../../../utils/fractions';
|
|
4
|
+
import { ChartEntry } from '../components/LiquidityChartRangeInput/types';
|
|
5
|
+
export interface TickProcessed {
|
|
6
|
+
tick: number;
|
|
7
|
+
liquidityActive: JSBI;
|
|
8
|
+
liquidityNet: JSBI;
|
|
9
|
+
price0: string;
|
|
10
|
+
sdkPrice: Price;
|
|
11
|
+
}
|
|
12
|
+
export interface FetchTicks {
|
|
13
|
+
ticks: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
liquidityNet: string;
|
|
16
|
+
poolAddress?: string;
|
|
17
|
+
price0: string;
|
|
18
|
+
price1: string;
|
|
19
|
+
tickIdx: string;
|
|
20
|
+
}> | undefined | null;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
refetch: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function usePoolActiveLiquidityChartData({ tickCurrent, liquidity, fetchTicks, token0, token1, }: {
|
|
26
|
+
tickCurrent: number | undefined;
|
|
27
|
+
liquidity: number | undefined;
|
|
28
|
+
fetchTicks?: FetchTicks;
|
|
29
|
+
token0: TokenInfo | undefined;
|
|
30
|
+
token1: TokenInfo | undefined;
|
|
31
|
+
}): {
|
|
32
|
+
hidden: boolean;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
error: boolean;
|
|
35
|
+
data: TickProcessed[] | undefined;
|
|
36
|
+
formattedData: ChartEntry[] | undefined;
|
|
37
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Ticks } from '@dodoex/api';
|
|
2
2
|
import { TickProcessed } from '../hooks/usePoolTickData';
|
|
3
|
-
import {
|
|
4
|
-
export default function computeSurroundingTicks(token0:
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function computeSurroundingTicks(token0: TokenInfo, token1: TokenInfo, activeTickProcessed: TickProcessed, sortedTickData: Ticks, pivot: number, ascending: boolean): TickProcessed[];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import JSBI from 'jsbi';
|
|
2
2
|
import { Percent } from '../../../../utils/fractions';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
4
|
/**
|
|
4
5
|
* Returns the minimum amounts that must be sent in order to safely mint the amount of liquidity held by the position
|
|
5
6
|
* with the given slippage tolerance
|
|
6
7
|
* @param slippageTolerance Tolerance of unfavorable slippage from the current price
|
|
7
8
|
* @returns The amounts, with slippage
|
|
8
9
|
*/
|
|
9
|
-
export declare function mintAmountsWithSlippage(tickCurrent: number,
|
|
10
|
+
export declare function mintAmountsWithSlippage(tickCurrent: number, slippageTolerance: Percent, tickLower: number, tickUpper: number, baseToken: TokenInfo, quoteToken: TokenInfo, amount0: string, amount1: string): {
|
|
10
11
|
amount0: JSBI;
|
|
11
12
|
amount1: JSBI;
|
|
12
13
|
};
|
|
@@ -16,7 +17,7 @@ export declare function mintAmountsWithSlippage(tickCurrent: number, sorted: boo
|
|
|
16
17
|
* @param slippageTolerance tolerance of unfavorable slippage from the current price
|
|
17
18
|
* @returns The amounts, with slippage
|
|
18
19
|
*/
|
|
19
|
-
export declare function burnAmountsWithSlippage(tickCurrent: number,
|
|
20
|
+
export declare function burnAmountsWithSlippage(tickCurrent: number, slippageTolerance: Percent, tickLower: number, tickUpper: number, liquidity: number | bigint | JSBI | string, baseToken: TokenInfo, quoteToken: TokenInfo): Readonly<{
|
|
20
21
|
amount0: JSBI;
|
|
21
22
|
amount1: JSBI;
|
|
22
23
|
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import JSBI from 'jsbi';
|
|
2
1
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
2
|
import { Price } from '../../../../utils/fractions';
|
|
4
3
|
/**
|
|
@@ -6,13 +5,6 @@ import { Price } from '../../../../utils/fractions';
|
|
|
6
5
|
* @param price for which to return the closest tick that represents a price less than or equal to the input price,
|
|
7
6
|
* i.e. the price of the returned tick is less than or equal to the input price
|
|
8
7
|
*/
|
|
9
|
-
export declare function priceToClosestTick(
|
|
10
|
-
numerator: JSBI;
|
|
11
|
-
denominator: JSBI;
|
|
12
|
-
}): number;
|
|
8
|
+
export declare function priceToClosestTick(price: Price): number;
|
|
13
9
|
export declare function tickToPrice(baseToken: TokenInfo, quoteToken: TokenInfo, tickCurrent: number | bigint): Price;
|
|
14
10
|
export declare function getTickToPrice(baseToken?: TokenInfo, quoteToken?: TokenInfo, tickCurrent?: number | bigint): string | undefined;
|
|
15
|
-
export declare function getTickToPriceParams(tickCurrent: number | bigint, sorted: boolean): {
|
|
16
|
-
numerator: JSBI;
|
|
17
|
-
denominator: JSBI;
|
|
18
|
-
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import JSBI from 'jsbi';
|
|
2
1
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
numerator: JSBI;
|
|
6
|
-
} | undefined;
|
|
2
|
+
import { Price } from '../../../../utils/fractions';
|
|
3
|
+
export declare function tryParsePrice(baseToken?: TokenInfo, quoteToken?: TokenInfo, value?: string): Price | undefined;
|
|
7
4
|
export declare function tryParseTick(baseToken?: TokenInfo, quoteToken?: TokenInfo, value?: string, tickSpacing?: number): number | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
3
4
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
-
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
|
+
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, tokenAndPoolFilter, getMigrationPairAndMining, }: {
|
|
5
6
|
scrollParentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
6
7
|
account?: string;
|
|
7
8
|
filterChainIds?: ChainId[];
|
|
@@ -9,4 +10,9 @@ export default function AddLiquidityList({ scrollParentRef, filterChainIds, acti
|
|
|
9
10
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
10
11
|
operatePool: Partial<PoolOperateProps> | null;
|
|
11
12
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
13
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
14
|
+
getMigrationPairAndMining?: (p: {
|
|
15
|
+
address: string;
|
|
16
|
+
chainId: number;
|
|
17
|
+
}) => void;
|
|
12
18
|
}): JSX.Element;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
2
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
3
|
-
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
4
|
+
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, getMigrationPairAndMining, tokenAndPoolFilter, }: {
|
|
4
5
|
account?: string;
|
|
5
6
|
filterChainIds?: ChainId[];
|
|
6
7
|
activeChainId: ChainId | undefined;
|
|
7
8
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
8
9
|
operatePool: Partial<PoolOperateProps> | null;
|
|
9
10
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
11
|
+
getMigrationPairAndMining?: (p: {
|
|
12
|
+
address: string;
|
|
13
|
+
chainId: number;
|
|
14
|
+
}) => void;
|
|
15
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
10
16
|
}): JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
|
-
export default function LiquidityTable({ sx, children, hasMore, loadMore, loadMoreLoading, ...props }: BoxProps & {
|
|
2
|
+
export default function LiquidityTable({ sx, children, empty, loading, hasMore, loadMore, loadMoreLoading, ...props }: BoxProps & {
|
|
3
|
+
empty?: boolean;
|
|
4
|
+
loading?: boolean;
|
|
3
5
|
hasMore?: boolean;
|
|
4
6
|
loadMore?: () => void;
|
|
5
7
|
loadMoreLoading?: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
export interface MigrationTagProps {
|
|
3
|
+
sx?: BoxProps['sx'];
|
|
4
|
+
isRightTop?: boolean;
|
|
5
|
+
isReverseColor?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const MigrationTag: ({ sx, isRightTop, isReverseColor, }: MigrationTagProps) => JSX.Element;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
3
|
import { FetchLiquidityListLqList } from '../../utils';
|
|
3
|
-
export
|
|
4
|
+
export interface TokenAndPoolFilterUserOptions {
|
|
5
|
+
tokens: Array<TokenInfo>;
|
|
6
|
+
lqList: FetchLiquidityListLqList;
|
|
7
|
+
onChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
|
|
8
|
+
onChangeFilterAddressLqList: (lqList: FetchLiquidityListLqList) => void;
|
|
9
|
+
element: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function usePoolListFilterTokenAndPool(tokenAndPoolFilter?: TokenAndPoolFilterUserOptions): {
|
|
4
12
|
filterTokens: TokenInfo[];
|
|
5
13
|
filterASymbol: string;
|
|
6
14
|
filterBSymbol: string;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Page, PageType } from '../../../router/types';
|
|
3
|
-
|
|
3
|
+
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
5
|
+
export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter, operatePMMPoolElement, operatePool: operatePoolProps, onOperatePool, getMigrationPairAndMining, }: {
|
|
4
6
|
params?: Page<PageType.Pool>['params'];
|
|
5
7
|
scrollRef?: React.RefObject<any>;
|
|
8
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
9
|
+
operatePMMPoolElement?: React.ReactElement;
|
|
10
|
+
operatePool?: Partial<PoolOperateProps> | null;
|
|
11
|
+
onOperatePool?: (pool: Partial<PoolOperateProps> | null) => boolean;
|
|
12
|
+
getMigrationPairAndMining?: (p: {
|
|
13
|
+
address: string;
|
|
14
|
+
chainId: number;
|
|
15
|
+
}) => void;
|
|
6
16
|
}): JSX.Element;
|
|
@@ -66,7 +66,7 @@ export declare function useDiffer({ srcPool, newPool, }: {
|
|
|
66
66
|
isRemove: boolean;
|
|
67
67
|
};
|
|
68
68
|
} | null;
|
|
69
|
-
export declare const getModifyDPPPoolParams: ({ chainId, account, srcPool, baseToken, quoteToken, baseAmount, quoteAmount, feeRate, initPrice, slippageCoefficient, SLIPPAGE_PROTECTION, }: {
|
|
69
|
+
export declare const getModifyDPPPoolParams: ({ chainId, account, srcPool, baseToken, quoteToken, baseAmount, quoteAmount, feeRate, initPrice, slippageCoefficient, ddl, SLIPPAGE_PROTECTION, }: {
|
|
70
70
|
chainId?: number;
|
|
71
71
|
account?: string;
|
|
72
72
|
srcPool?: ModifyPool;
|
|
@@ -77,6 +77,7 @@ export declare const getModifyDPPPoolParams: ({ chainId, account, srcPool, baseT
|
|
|
77
77
|
feeRate: string;
|
|
78
78
|
initPrice: string;
|
|
79
79
|
slippageCoefficient: string;
|
|
80
|
+
ddl: number | undefined;
|
|
80
81
|
SLIPPAGE_PROTECTION: number;
|
|
81
82
|
}) => Promise<{
|
|
82
83
|
data: string;
|
|
@@ -11,6 +11,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
11
11
|
baseToken: TokenInfo;
|
|
12
12
|
quoteToken: TokenInfo;
|
|
13
13
|
miningAddress: string;
|
|
14
|
+
apy: {
|
|
15
|
+
miningBaseApy?: any | null;
|
|
16
|
+
miningQuoteApy?: any | null;
|
|
17
|
+
transactionBaseApy?: any | null;
|
|
18
|
+
transactionQuoteApy?: any | null;
|
|
19
|
+
metromMiningApy?: any | null;
|
|
20
|
+
} | null | undefined;
|
|
14
21
|
baseApy: string | undefined;
|
|
15
22
|
quoteApy: string | undefined;
|
|
16
23
|
isCpPool: boolean;
|
|
@@ -80,6 +87,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
80
87
|
baseToken: TokenInfo;
|
|
81
88
|
quoteToken: TokenInfo;
|
|
82
89
|
miningAddress: string;
|
|
90
|
+
apy: {
|
|
91
|
+
miningBaseApy?: any | null;
|
|
92
|
+
miningQuoteApy?: any | null;
|
|
93
|
+
transactionBaseApy?: any | null;
|
|
94
|
+
transactionQuoteApy?: any | null;
|
|
95
|
+
metromMiningApy?: any | null;
|
|
96
|
+
} | null | undefined;
|
|
83
97
|
baseApy: string | undefined;
|
|
84
98
|
quoteApy: string | undefined;
|
|
85
99
|
isCpPool: boolean;
|
|
@@ -149,6 +163,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
149
163
|
baseToken: TokenInfo;
|
|
150
164
|
quoteToken: TokenInfo;
|
|
151
165
|
miningAddress: string;
|
|
166
|
+
apy: {
|
|
167
|
+
miningBaseApy?: any | null;
|
|
168
|
+
miningQuoteApy?: any | null;
|
|
169
|
+
transactionBaseApy?: any | null;
|
|
170
|
+
transactionQuoteApy?: any | null;
|
|
171
|
+
metromMiningApy?: any | null;
|
|
172
|
+
} | null | undefined;
|
|
152
173
|
baseApy: string | undefined;
|
|
153
174
|
quoteApy: string | undefined;
|
|
154
175
|
isCpPool: boolean;
|
|
@@ -218,6 +239,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
218
239
|
baseToken: TokenInfo;
|
|
219
240
|
quoteToken: TokenInfo;
|
|
220
241
|
miningAddress: string;
|
|
242
|
+
apy: {
|
|
243
|
+
miningBaseApy?: any | null;
|
|
244
|
+
miningQuoteApy?: any | null;
|
|
245
|
+
transactionBaseApy?: any | null;
|
|
246
|
+
transactionQuoteApy?: any | null;
|
|
247
|
+
metromMiningApy?: any | null;
|
|
248
|
+
} | null | undefined;
|
|
221
249
|
baseApy: string | undefined;
|
|
222
250
|
quoteApy: string | undefined;
|
|
223
251
|
isCpPool: boolean;
|
|
@@ -287,6 +315,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
287
315
|
baseToken: TokenInfo;
|
|
288
316
|
quoteToken: TokenInfo;
|
|
289
317
|
miningAddress: string;
|
|
318
|
+
apy: {
|
|
319
|
+
miningBaseApy?: any | null;
|
|
320
|
+
miningQuoteApy?: any | null;
|
|
321
|
+
transactionBaseApy?: any | null;
|
|
322
|
+
transactionQuoteApy?: any | null;
|
|
323
|
+
metromMiningApy?: any | null;
|
|
324
|
+
} | null | undefined;
|
|
290
325
|
baseApy: string | undefined;
|
|
291
326
|
quoteApy: string | undefined;
|
|
292
327
|
isCpPool: boolean;
|