@dodoex/widgets 3.0.2-beta.3 → 3.0.2-beta.30
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-C9b4CiOA.js → helper-DuLmnGrG.js} +1 -1
- package/dist/{helper-ClkgmrVA.cjs → helper-Hod9fA5B.cjs} +1 -1
- package/dist/index-5mHWpeMZ.js +78 -0
- package/dist/{index-C6mnPRNV.js → index-B6bmWr92.js} +1 -1
- package/dist/index-BLxnS56-.cjs +31 -0
- package/dist/index-CjSVFetK.js +31 -0
- package/dist/{index-C01B1t6u.cjs → index-CvW_KLJn.cjs} +6 -6
- package/dist/{index-CjE1imgX.cjs → index-D3H_0Gw0.cjs} +2 -2
- 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/SelectChain.d.ts +2 -1
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +3 -2
- package/dist/types/components/TokenLogoPair.d.ts +1 -1
- package/dist/types/components/Widget/index.d.ts +28 -1
- package/dist/types/components/WidgetContainer.d.ts +1 -1
- package/dist/types/components/WithExecutionDialog/index.d.ts +1 -1
- 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 +3 -0
- 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 -6
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/v3-sdk/constants.d.ts +11 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +6 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +6 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/PoolApyTooltip.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/migationWidget.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +10 -1
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +7 -1
- package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +4 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +12 -0
- 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 +7 -8
- package/dist/index-BBEfo-v5.cjs +0 -31
- package/dist/index-BajGZTI4.js +0 -31
- package/dist/index-DFFjPniM.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
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { OperateTab } from './hooks/usePoolOperateTabs';
|
|
2
|
-
import { OperatePool } from './types';
|
|
2
|
+
import { GetMigrationPairAndMining, OperatePool, ShowMigrationPairAndMining } from './types';
|
|
3
3
|
export interface PoolOperateInnerProps {
|
|
4
4
|
pool: OperatePool;
|
|
5
5
|
operate?: OperateTab;
|
|
6
6
|
hidePoolInfo?: boolean;
|
|
7
7
|
errorRefetch?: () => void;
|
|
8
8
|
submittedBack?: () => void;
|
|
9
|
+
getMigrationPairAndMining?: GetMigrationPairAndMining;
|
|
10
|
+
showMigrationPairAndMining?: ShowMigrationPairAndMining;
|
|
9
11
|
}
|
|
10
|
-
export default function PoolOperateInner({ pool, operate, hidePoolInfo, errorRefetch, submittedBack, }: PoolOperateInnerProps): JSX.Element;
|
|
12
|
+
export default function PoolOperateInner({ pool, operate, hidePoolInfo, errorRefetch, submittedBack, getMigrationPairAndMining, showMigrationPairAndMining, }: PoolOperateInnerProps): JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { OperatePool } from './types';
|
|
1
|
+
import { GetMigrationPairAndMining, OperatePool, ShowMigrationPairAndMining } from './types';
|
|
2
2
|
import { usePoolBalanceInfo } from '../hooks/usePoolBalanceInfo';
|
|
3
|
-
export declare function RemovePoolOperate({ submittedBack: submittedBackProps, onlyShowSide, pool, balanceInfo, }: {
|
|
3
|
+
export declare function RemovePoolOperate({ submittedBack: submittedBackProps, onlyShowSide, pool, balanceInfo, getMigrationPairAndMining, showMigrationPairAndMining, }: {
|
|
4
4
|
submittedBack?: () => void;
|
|
5
5
|
onlyShowSide?: 'base' | 'quote';
|
|
6
6
|
pool?: OperatePool;
|
|
7
7
|
balanceInfo: ReturnType<typeof usePoolBalanceInfo>;
|
|
8
|
+
getMigrationPairAndMining?: GetMigrationPairAndMining;
|
|
9
|
+
showMigrationPairAndMining?: ShowMigrationPairAndMining;
|
|
8
10
|
}): JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
2
|
import { PoolOperateInnerProps } from './PoolOperateInner';
|
|
3
|
+
import { GetMigrationPairAndMining, ShowMigrationPairAndMining } from './types';
|
|
3
4
|
export interface PoolOperateProps {
|
|
4
5
|
onClose?: () => void;
|
|
5
6
|
account: string | undefined;
|
|
@@ -10,8 +11,10 @@ export interface PoolOperateProps {
|
|
|
10
11
|
hasMining?: boolean;
|
|
11
12
|
hidePoolInfo?: boolean;
|
|
12
13
|
sx?: BoxProps['sx'];
|
|
14
|
+
getMigrationPairAndMining?: GetMigrationPairAndMining;
|
|
15
|
+
showMigrationPairAndMining?: ShowMigrationPairAndMining;
|
|
13
16
|
}
|
|
14
|
-
export declare function PoolOperate({ onClose, pool: poolProps, address, operate, chainId, hasMining, hidePoolInfo, sx, }: PoolOperateProps): JSX.Element;
|
|
17
|
+
export declare function PoolOperate({ onClose, pool: poolProps, address, operate, chainId, hasMining, hidePoolInfo, sx, getMigrationPairAndMining, showMigrationPairAndMining, }: PoolOperateProps): JSX.Element;
|
|
15
18
|
export default function PoolOperateDialog({ modal, ...props }: PoolOperateProps & {
|
|
16
19
|
modal?: boolean;
|
|
17
20
|
}): JSX.Element;
|
|
@@ -20,3 +20,15 @@ export type OperatePool = {
|
|
|
20
20
|
lpFeeRate?: string;
|
|
21
21
|
liquidityPositions?: ExcludeNone<ExcludeNone<FetchMyLiquidityListLqList>[0]>['liquidityPositions'];
|
|
22
22
|
} | undefined;
|
|
23
|
+
export interface LiquidityMigrationInfo {
|
|
24
|
+
chainId: number;
|
|
25
|
+
miningContractAddress: string;
|
|
26
|
+
stakeTokenAddress: string;
|
|
27
|
+
newMiningContractAddress: string;
|
|
28
|
+
newStakeTokenAddress: string;
|
|
29
|
+
}
|
|
30
|
+
export type GetMigrationPairAndMining = (p: {
|
|
31
|
+
address: string;
|
|
32
|
+
chainId: number;
|
|
33
|
+
}) => LiquidityMigrationInfo | undefined;
|
|
34
|
+
export type ShowMigrationPairAndMining = (p: LiquidityMigrationInfo) => void;
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.2-beta.
|
|
3
|
+
"version": "3.0.2-beta.30",
|
|
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.3-
|
|
62
|
-
"@dodoex/components": "3.0.
|
|
61
|
+
"@dodoex/api": "3.0.3-beta.5",
|
|
62
|
+
"@dodoex/components": "3.0.5",
|
|
63
63
|
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "
|
|
64
|
+
"@dodoex/dodo-contract-request": "1.12.0-alpha.6",
|
|
65
65
|
"@dodoex/icons": "^2.0.2",
|
|
66
66
|
"@emotion/react": "^11.10.0",
|
|
67
67
|
"@emotion/styled": "^11.10.0",
|
|
@@ -106,9 +106,7 @@
|
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@babel/runtime": ">=7.17.0",
|
|
108
108
|
"react": ">=17.0.1",
|
|
109
|
-
"react-dom": ">=17.0.1"
|
|
110
|
-
"react-redux": ">=7.2.2",
|
|
111
|
-
"redux": ">=4.1.2"
|
|
109
|
+
"react-dom": ">=17.0.1"
|
|
112
110
|
},
|
|
113
111
|
"devDependencies": {
|
|
114
112
|
"@babel/preset-env": "^7.16.11",
|
|
@@ -141,6 +139,7 @@
|
|
|
141
139
|
"babel-runtime": "^6.26.0",
|
|
142
140
|
"dotenv": "^16.0.2",
|
|
143
141
|
"ethers": "^5.7.1",
|
|
142
|
+
"gettext-parser": "^8.0.0",
|
|
144
143
|
"hardhat": "^2.22.13",
|
|
145
144
|
"identity-obj-proxy": "^3.0.0",
|
|
146
145
|
"jest": "^29.0.3",
|
|
@@ -154,4 +153,4 @@
|
|
|
154
153
|
"ts-jest": "^29.0.1",
|
|
155
154
|
"typescript": "^5.6.3"
|
|
156
155
|
}
|
|
157
|
-
}
|
|
156
|
+
}
|