@dodoex/widgets 3.0.1-taiko.9 → 3.0.2-bartio.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/e4364db573253fd1.svg +9 -0
- package/dist/{helper-DBzX2wrS.cjs → helper-DKeGoo7f.cjs} +1 -1
- package/dist/{helper-PhN5xbCJ.js → helper-TYi75VBP.js} +1 -1
- package/dist/index-3pLqfeyF.cjs +31 -0
- package/dist/{index-B93IQEna.js → index-Bl0iIGn3.js} +1 -1
- package/dist/index-D93HWmmI.js +31 -0
- package/dist/{index-DrI8NAZ1.cjs → index-DAMt9CI-.cjs} +1 -1
- package/dist/{index-NBA8_a43.cjs → index-DfAUT_X8.cjs} +1 -1
- package/dist/{index-D67eOwf_.js → index-tcJHVTUx.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/Swap/components/ReviewDialog.d.ts +2 -1
- package/dist/types/components/Swap/index.d.ts +2 -1
- package/dist/types/components/Widget/index.d.ts +4 -0
- package/dist/types/constants/chains.d.ts +3 -0
- package/dist/types/constants/pool.d.ts +1 -0
- package/dist/types/utils/address.d.ts +8 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/RateToggle.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/CreatePoolBtn.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +3 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +4 -3
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/utils.d.ts +1 -0
- package/package.json +6 -6
- package/dist/index-Dwk2vSni.cjs +0 -31
- package/dist/index-rSpWU6kg.js +0 -31
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PoolType } from '@dodoex/api';
|
|
2
2
|
import { BigNumber } from 'bignumber.js';
|
|
3
|
-
import { TokenInfo } from '../../../hooks/Token';
|
|
4
3
|
type Balance = BigNumber | null | undefined;
|
|
5
4
|
export declare function getLpToTokenBalance(userLpBalance: Balance, totalLpBalance: Balance, reserve: Balance, target: Balance, address: string | undefined, type: PoolType | undefined, decimals: number | undefined): undefined[] | BigNumber[];
|
|
6
5
|
export declare function usePoolBalanceInfo({ account, pool, }: {
|
|
@@ -8,8 +7,10 @@ export declare function usePoolBalanceInfo({ account, pool, }: {
|
|
|
8
7
|
pool?: {
|
|
9
8
|
address: string;
|
|
10
9
|
chainId: number;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
baseTokenDecimals: number;
|
|
11
|
+
quoteTokenDecimals: number;
|
|
12
|
+
baseLpTokenDecimals: number;
|
|
13
|
+
quoteLpTokenDecimals: number;
|
|
13
14
|
type: PoolType;
|
|
14
15
|
};
|
|
15
16
|
}): {
|
|
@@ -39,11 +39,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
39
39
|
id: string;
|
|
40
40
|
symbol: string;
|
|
41
41
|
name: string;
|
|
42
|
+
decimals: any;
|
|
42
43
|
} | null;
|
|
43
44
|
quoteLpToken?: {
|
|
44
45
|
id: string;
|
|
45
46
|
symbol: string;
|
|
46
47
|
name: string;
|
|
48
|
+
decimals: any;
|
|
47
49
|
} | null;
|
|
48
50
|
} | null;
|
|
49
51
|
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolQuery;
|
|
@@ -106,11 +108,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
106
108
|
id: string;
|
|
107
109
|
symbol: string;
|
|
108
110
|
name: string;
|
|
111
|
+
decimals: any;
|
|
109
112
|
} | null;
|
|
110
113
|
quoteLpToken?: {
|
|
111
114
|
id: string;
|
|
112
115
|
symbol: string;
|
|
113
116
|
name: string;
|
|
117
|
+
decimals: any;
|
|
114
118
|
} | null;
|
|
115
119
|
} | null;
|
|
116
120
|
data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolQuery;
|
|
@@ -173,11 +177,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
173
177
|
id: string;
|
|
174
178
|
symbol: string;
|
|
175
179
|
name: string;
|
|
180
|
+
decimals: any;
|
|
176
181
|
} | null;
|
|
177
182
|
quoteLpToken?: {
|
|
178
183
|
id: string;
|
|
179
184
|
symbol: string;
|
|
180
185
|
name: string;
|
|
186
|
+
decimals: any;
|
|
181
187
|
} | null;
|
|
182
188
|
} | null;
|
|
183
189
|
data: undefined;
|
|
@@ -240,11 +246,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
240
246
|
id: string;
|
|
241
247
|
symbol: string;
|
|
242
248
|
name: string;
|
|
249
|
+
decimals: any;
|
|
243
250
|
} | null;
|
|
244
251
|
quoteLpToken?: {
|
|
245
252
|
id: string;
|
|
246
253
|
symbol: string;
|
|
247
254
|
name: string;
|
|
255
|
+
decimals: any;
|
|
248
256
|
} | null;
|
|
249
257
|
} | null;
|
|
250
258
|
data: undefined;
|
|
@@ -307,11 +315,13 @@ export declare function usePoolDetail({ id, chainId, }: {
|
|
|
307
315
|
id: string;
|
|
308
316
|
symbol: string;
|
|
309
317
|
name: string;
|
|
318
|
+
decimals: any;
|
|
310
319
|
} | null;
|
|
311
320
|
quoteLpToken?: {
|
|
312
321
|
id: string;
|
|
313
322
|
symbol: string;
|
|
314
323
|
name: string;
|
|
324
|
+
decimals: any;
|
|
315
325
|
} | null;
|
|
316
326
|
} | null;
|
|
317
327
|
data: undefined;
|
|
@@ -18,3 +18,4 @@ export declare function convertFetchLiquidityToOperateData(lqData: ExcludeNone<F
|
|
|
18
18
|
export declare function convertFetchMyLiquidityToOperateData(lqData: ExcludeNone<FetchMyLiquidityListLqList>[0]): OperatePool;
|
|
19
19
|
export declare function convertFetchPoolToOperateData(pool: FetchPoolList[0], chainId: number): OperatePool;
|
|
20
20
|
export declare function getPoolAMMOrPMM(type: PoolType): "AMM V2" | "AMM V3" | "PMM";
|
|
21
|
+
export declare function getIsAMMV2DynamicFeeContractByChainId(chainId: number): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2-bartio.1",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@dodoex/api": "3.0.
|
|
62
|
-
"@dodoex/components": "3.0.1
|
|
63
|
-
"@dodoex/contract-request": "^1.
|
|
64
|
-
"@dodoex/dodo-contract-request": "1.
|
|
61
|
+
"@dodoex/api": "3.0.3-bartio.0",
|
|
62
|
+
"@dodoex/components": "3.0.1",
|
|
63
|
+
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
+
"@dodoex/dodo-contract-request": "^1.9.0-alpha.3",
|
|
65
65
|
"@dodoex/icons": "^2.0.2",
|
|
66
66
|
"@emotion/react": "^11.10.0",
|
|
67
67
|
"@emotion/styled": "^11.10.0",
|
|
@@ -154,4 +154,4 @@
|
|
|
154
154
|
"ts-jest": "^29.0.1",
|
|
155
155
|
"typescript": "^5.6.3"
|
|
156
156
|
}
|
|
157
|
-
}
|
|
157
|
+
}
|