@dodoex/widgets 3.0.0 → 3.0.1-taiko.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-BKVBNDjK.cjs → helper-DhpXboqR.cjs} +1 -1
- package/dist/{helper-B-HiRq90.js → helper-DrD3QJaR.js} +1 -1
- package/dist/{index-B_LP5IWI.js → index-9Vs2dre-.js} +1 -1
- package/dist/index-BPB5-KZr.js +31 -0
- package/dist/{index-C7igC0ot.js → index-BTocjQlE.js} +2 -2
- package/dist/{index-B15VIhJF.cjs → index-D4nZlpuF.cjs} +2 -2
- package/dist/index-DFwBDr_f.cjs +31 -0
- package/dist/{index-DcodV9tV.cjs → index-DZvyuCpR.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/SpaceBetweenItem.d.ts +5 -0
- package/dist/types/components/Swap/components/SwitchBox.d.ts +3 -2
- package/dist/types/components/TokenLogo.d.ts +1 -1
- package/dist/types/components/TokenPairStatusButton.d.ts +6 -0
- package/dist/types/components/TokenSelect.d.ts +21 -0
- package/dist/types/constants/pool.d.ts +1 -0
- package/dist/types/constants/testId.d.ts +1 -0
- package/dist/types/hooks/Submission/types.d.ts +2 -0
- package/dist/types/hooks/Token/useTokenStatus.d.ts +1 -0
- package/dist/types/router/types.d.ts +3 -1
- package/dist/types/utils/address.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/ConfirmDialog.d.ts +17 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/CreateItem.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/FeeEdit.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/MyLiqidity.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/Ratio.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/Setting.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/AMMV2Create/index.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2Balance.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +19 -0
- package/dist/types/widgets/PoolWidget/utils.d.ts +6 -5
- package/package.json +6 -4
- package/dist/index-BHHF0NMg.js +0 -31
- package/dist/index-lpcUFCfi.cjs +0 -31
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Pair } from '@uniswap/v2-sdk';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
export declare function useUniV2Pairs({ baseToken, quoteToken, baseAmount, quoteAmount, fee, }: {
|
|
5
|
+
baseToken: TokenInfo | undefined;
|
|
6
|
+
quoteToken: TokenInfo | undefined;
|
|
7
|
+
baseAmount: string;
|
|
8
|
+
quoteAmount: string;
|
|
9
|
+
fee: number;
|
|
10
|
+
}): {
|
|
11
|
+
pairAddress: string | undefined;
|
|
12
|
+
pair: Pair | null;
|
|
13
|
+
price: BigNumber | null;
|
|
14
|
+
invertedPrice: BigNumber | null;
|
|
15
|
+
priceLoading: boolean;
|
|
16
|
+
liquidityMinted: BigNumber | undefined;
|
|
17
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
18
|
+
isExists: boolean;
|
|
19
|
+
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { PoolApi, ExcludeNone } from '@dodoex/api';
|
|
1
|
+
import { PoolApi, ExcludeNone, 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';
|
|
5
5
|
export declare const poolApi: PoolApi;
|
|
6
|
-
export
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export type
|
|
6
|
+
export declare const uniPoolV2Api: UniPoolV2Api;
|
|
7
|
+
export type FetchLiquidityListLqList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchLiquidityList)['__apiType'], undefined>>['liquidity_list']>['lqList'];
|
|
8
|
+
export type FetchMyLiquidityListLqList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchMyLiquidityList)['__apiType'], undefined>>['liquidity_list']>['lqList'];
|
|
9
|
+
export type FetchMyCreateListLqList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchDashboardPairList)['__apiType'], undefined>>['dashboard_pairs_list']>['list'];
|
|
10
|
+
export type FetchPoolList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchPoolList)['__apiType'], undefined>>['pairs']>;
|
|
10
11
|
export declare function convertLiquidityTokenToTokenInfo(token: {
|
|
11
12
|
id: string;
|
|
12
13
|
symbol: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-taiko.1",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@dodoex/api": "3.0.
|
|
62
|
-
"@dodoex/components": "3.0.
|
|
61
|
+
"@dodoex/api": "3.0.1-taiko.1",
|
|
62
|
+
"@dodoex/components": "3.0.1-taiko-1",
|
|
63
63
|
"@dodoex/icons": "^2.0.2",
|
|
64
64
|
"@emotion/react": "^11.10.0",
|
|
65
65
|
"@emotion/styled": "^11.10.0",
|
|
@@ -72,6 +72,8 @@
|
|
|
72
72
|
"@semantic-release/changelog": "^6.0.1",
|
|
73
73
|
"@semantic-release/git": "^10.0.1",
|
|
74
74
|
"@tanstack/react-query": "^5.18.1",
|
|
75
|
+
"@uniswap/sdk-core": "^5.9.0",
|
|
76
|
+
"@uniswap/v2-sdk": "^4.6.2",
|
|
75
77
|
"@web3-react/core": "8.2.0",
|
|
76
78
|
"@web3-react/eip1193": "8.2.0",
|
|
77
79
|
"@web3-react/metamask": "8.2.1",
|
|
@@ -147,4 +149,4 @@
|
|
|
147
149
|
"ts-jest": "^29.0.1",
|
|
148
150
|
"typescript": "^5.6.3"
|
|
149
151
|
}
|
|
150
|
-
}
|
|
152
|
+
}
|