@dodoex/widgets 3.0.1-taiko.3 → 3.0.1-taiko.5
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-DmjwW_gd.cjs → helper-DTXcoDXs.cjs} +1 -1
- package/dist/{helper-BMMzIGFj.js → helper-KeBGXRew.js} +1 -1
- package/dist/index-BCoTzVYp.js +31 -0
- package/dist/{index-BnVBU0Xm.cjs → index-BVyYAG1R.cjs} +2 -2
- package/dist/{index-5HwYLdhB.js → index-C1G7IqbB.js} +2 -2
- package/dist/{index-CBFzdqif.js → index-CRdhNZQN.js} +1 -1
- package/dist/index-DDh_2pyp.cjs +31 -0
- package/dist/{index-B--4K0hM.cjs → index-Dj1QosYL.cjs} +5 -5
- 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/Widget/index.d.ts +1 -0
- package/dist/types/hooks/Submission/types.d.ts +1 -0
- package/dist/types/providers/useInitContractRequest.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/ConfirmDialog.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/GoPoolDetailBtn.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +6 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +19 -13
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/hooks/useUniV2CreatePairs.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +19 -12
- package/dist/types/widgets/PoolWidget/utils.d.ts +2 -1
- package/package.json +5 -3
- package/dist/index-CnDtN3r_.js +0 -31
- package/dist/index-D1INyInw.cjs +0 -31
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
export declare function useAMMV2RemoveLiquidity({ baseToken, quoteToken, baseAmount, quoteAmount, liquidityAmount, slippage, fee, successBack, }: {
|
|
3
|
+
baseToken: TokenInfo | undefined;
|
|
4
|
+
quoteToken: TokenInfo | undefined;
|
|
5
|
+
baseAmount: string;
|
|
6
|
+
quoteAmount: string;
|
|
7
|
+
liquidityAmount: string;
|
|
8
|
+
slippage: number;
|
|
9
|
+
fee: number | undefined;
|
|
10
|
+
successBack?: () => void;
|
|
11
|
+
}): import("@tanstack/react-query").UseMutationResult<import("../../../hooks/Submission/types").ExecutionResult, Error, void, unknown>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
export declare function useUniV2CreatePairs({ baseToken, quoteToken, baseAmount, quoteAmount, fee, }: {
|
|
3
|
+
baseToken: TokenInfo | undefined;
|
|
4
|
+
quoteToken: TokenInfo | undefined;
|
|
5
|
+
baseAmount: string;
|
|
6
|
+
quoteAmount: string;
|
|
7
|
+
fee: number;
|
|
8
|
+
}): {
|
|
9
|
+
pairAddress: string | undefined;
|
|
10
|
+
pair: import("@uniswap/v2-sdk").Pair | null;
|
|
11
|
+
isInvalidPair: boolean;
|
|
12
|
+
price: import("bignumber.js").BigNumber | undefined;
|
|
13
|
+
invertedPrice: import("bignumber.js").BigNumber | undefined;
|
|
14
|
+
priceLoading: boolean;
|
|
15
|
+
liquidityMinted: import("bignumber.js").BigNumber | undefined;
|
|
16
|
+
shareOfPool: string;
|
|
17
|
+
isExists: boolean;
|
|
18
|
+
};
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import { Pair } from '@uniswap/v2-sdk';
|
|
2
1
|
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
import { Pair } from '@uniswap/v2-sdk';
|
|
3
3
|
import BigNumber from 'bignumber.js';
|
|
4
|
-
export declare function useUniV2Pairs({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export declare function useUniV2Pairs({ pool, baseAmount, quoteAmount, }: {
|
|
5
|
+
pool?: {
|
|
6
|
+
type: string;
|
|
7
|
+
address: string;
|
|
8
|
+
baseToken: TokenInfo;
|
|
9
|
+
quoteToken: TokenInfo;
|
|
10
|
+
};
|
|
11
|
+
baseAmount?: string;
|
|
12
|
+
quoteAmount?: string;
|
|
10
13
|
}): {
|
|
11
|
-
|
|
14
|
+
isRearTokenA: boolean;
|
|
12
15
|
pair: Pair | null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
price: BigNumber | undefined;
|
|
17
|
+
invertedPrice: BigNumber | undefined;
|
|
18
|
+
reserveQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
19
|
+
baseReserve: BigNumber;
|
|
20
|
+
quoteReserve: BigNumber;
|
|
21
|
+
} | null, Error>;
|
|
22
|
+
totalBaseLpQuery: import("@tanstack/react-query").UseQueryResult<BigNumber | null, Error>;
|
|
17
23
|
liquidityMinted: BigNumber | undefined;
|
|
18
24
|
poolTokenPercentage: BigNumber | undefined;
|
|
25
|
+
shareOfPool: string;
|
|
19
26
|
isExists: boolean;
|
|
20
27
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PoolApi, ExcludeNone, UniPoolV2Api } from '@dodoex/api';
|
|
1
|
+
import { PoolApi, ExcludeNone, PoolType, UniPoolV2Api } from '@dodoex/api';
|
|
2
2
|
import { ChainId } from '@dodoex/api';
|
|
3
3
|
import { TokenInfo } from '../../hooks/Token';
|
|
4
4
|
import { OperatePool } from './PoolOperate/types';
|
|
@@ -17,3 +17,4 @@ export declare function convertLiquidityTokenToTokenInfo(token: {
|
|
|
17
17
|
} | undefined, chainId: ChainId | number): TokenInfo | undefined;
|
|
18
18
|
export declare function convertFetchLiquidityToOperateData(lqData: ExcludeNone<FetchLiquidityListLqList>[0]): OperatePool;
|
|
19
19
|
export declare function convertFetchPoolToOperateData(pool: FetchPoolList[0], chainId: number): OperatePool;
|
|
20
|
+
export declare function getPoolAMMOrPMM(type: PoolType): "AMM V2" | "AMM V3" | "PMM";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.1-taiko.
|
|
3
|
+
"version": "3.0.1-taiko.5",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -58,8 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@dodoex/api": "3.0.1-taiko.
|
|
62
|
-
"@dodoex/components": "3.0.1-taiko.
|
|
61
|
+
"@dodoex/api": "3.0.1-taiko.2",
|
|
62
|
+
"@dodoex/components": "3.0.1-taiko.3",
|
|
63
|
+
"@dodoex/contract-request": "^1.0.1",
|
|
64
|
+
"@dodoex/dodo-contract-request": "1.3.1",
|
|
63
65
|
"@dodoex/icons": "^2.0.2",
|
|
64
66
|
"@emotion/react": "^11.10.0",
|
|
65
67
|
"@emotion/styled": "^11.10.0",
|