@dodoex/widgets 3.0.4-ve33.1 → 3.0.4-ve33.10
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-C3H6B4Oy.cjs → helper-BPuHWVRM.cjs} +1 -1
- package/dist/{helper-0RKQSgE1.js → helper-t_Ye_aBf.js} +1 -1
- package/dist/{index-8b78r-JT.js → index-BA5HePEm.js} +1 -1
- package/dist/index-C8qblH3I.js +32 -0
- package/dist/index-CQTOLjzQ.cjs +32 -0
- package/dist/{index-D9uctpVh.js → index-CTWa5eCR.js} +1 -1
- package/dist/{index-CsquFrM1.cjs → index-Cg3PeApO.cjs} +1 -1
- package/dist/{index-DdE6aa-k.cjs → index-al7nXNyl.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/AddressWithLinkAndCopy.d.ts +3 -1
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -2
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +1 -4
- package/dist/types/components/Swap/index.d.ts +1 -4
- package/dist/types/components/Widget/index.d.ts +1 -0
- package/dist/types/components/WidgetContainer.d.ts +1 -1
- package/dist/types/constants/api.d.ts +1 -1
- package/dist/types/constants/swap.d.ts +3 -0
- package/dist/types/hooks/Submission/types.d.ts +3 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +1 -3
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +1 -1
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +1 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/index.d.ts +36 -23
- package/dist/types/utils/formatter.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/utils.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolList/TableList.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33PoolList/index.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/AddPoolOperate.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/RemovePoolOperate.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/ComparePrice.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/OperateBtn.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SliderPercentageCard.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SlippageSetting.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/V2ConfirmDialog.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useComparePrice.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useLiquidityOperateAmount.d.ts +82 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePercentageRemove.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2AddLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2BalanceInfo.d.ts +34 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2RemoveLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useWithdrawInfo.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/index.d.ts +23 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/types.d.ts +22 -0
- package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +14 -0
- package/dist/types/widgets/ve33/VotePoolList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/components/GoBack.d.ts +4 -0
- package/dist/types/widgets/ve33/components/PoolHead.d.ts +8 -0
- package/dist/types/widgets/ve33/components/PoolTypeTag.d.ts +8 -0
- package/dist/types/widgets/ve33/components/widgets.d.ts +5 -0
- package/dist/types/widgets/ve33/config.d.ts +62 -0
- package/dist/types/widgets/ve33/constants.d.ts +21 -0
- package/dist/types/widgets/ve33/hooks/usePoolColors.d.ts +11 -0
- package/dist/types/widgets/ve33/hooks/useVotePoolFilters.d.ts +13 -0
- package/dist/types/widgets/ve33/hooks/useVoteTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/types.d.ts +38 -0
- package/dist/types/widgets/ve33/utils.d.ts +9 -0
- package/package.json +10 -10
- package/dist/index-CHBBNnLK.cjs +0 -31
- package/dist/index-a6XIfxp-.js +0 -31
- package/dist/types/hooks/Swap/useFetchRoutePrice.test.d.ts +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default factory enabled fee amounts, denominated in hundredths of bips.
|
|
3
|
+
* @see https://explorer-holesky.morphl2.io/address/0x0d1B0d0d709292d35AB7455fF6DBA0Eed40Cc49b?tab=read_contract
|
|
4
|
+
*/
|
|
5
|
+
export declare enum FeeAmount {
|
|
6
|
+
LOWEST = 100,
|
|
7
|
+
LOW = 500,
|
|
8
|
+
MEDIUM = 500,
|
|
9
|
+
HIGH = 3000,
|
|
10
|
+
HIGHEST = 10000
|
|
11
|
+
}
|
|
12
|
+
export declare enum TickSpacings {
|
|
13
|
+
LOWEST = 1,
|
|
14
|
+
LOW = 50,
|
|
15
|
+
MEDIUM = 100,
|
|
16
|
+
HIGH = 200,
|
|
17
|
+
HIGHEST = 2000
|
|
18
|
+
}
|
|
19
|
+
export declare const tickSpacingToFee: {
|
|
20
|
+
[amount in TickSpacings]: FeeAmount;
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PoolTypeE } from '../types';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export declare function usePoolColors({ type, stable, fee, }: {
|
|
4
|
+
type: PoolTypeE;
|
|
5
|
+
stable: boolean;
|
|
6
|
+
fee: Ve33PoolInfoI['fee'];
|
|
7
|
+
}): {
|
|
8
|
+
color: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum VotePoolFilters {
|
|
2
|
+
All = "all",
|
|
3
|
+
V2 = 1,
|
|
4
|
+
V3 = 2
|
|
5
|
+
}
|
|
6
|
+
export declare function useVotePoolFilters(): {
|
|
7
|
+
votePoolFilter: VotePoolFilters;
|
|
8
|
+
filters: {
|
|
9
|
+
key: VotePoolFilters;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
handleChangeVotePoolFilter: (votePoolFilter: VotePoolFilters) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum VoteTab {
|
|
2
|
+
SelectToVote = "select-to-vote",
|
|
3
|
+
MyVoted = "my-voted"
|
|
4
|
+
}
|
|
5
|
+
export declare function useVoteTabs(): {
|
|
6
|
+
voteTab: VoteTab;
|
|
7
|
+
tabs: {
|
|
8
|
+
key: VoteTab;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
handleChangeVoteTab: (voteTab: VoteTab) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../hooks/Token/type';
|
|
3
|
+
import { FetchVe33PoolList, FetchVotePoolList } from '../PoolWidget/utils';
|
|
4
|
+
export declare enum OperateTypeE {
|
|
5
|
+
Add = 1,
|
|
6
|
+
Remove = 2
|
|
7
|
+
}
|
|
8
|
+
export declare enum PoolTypeE {
|
|
9
|
+
Pool = 1,
|
|
10
|
+
CLPool = 2
|
|
11
|
+
}
|
|
12
|
+
export declare enum FeeE {
|
|
13
|
+
Stable = 5,
|
|
14
|
+
Volatile = 30
|
|
15
|
+
}
|
|
16
|
+
export type FetchVe33PoolItem = FetchVe33PoolList[0];
|
|
17
|
+
export type FetchVotePoolItem = FetchVotePoolList[0];
|
|
18
|
+
export type Ve33PoolInfoI = FetchVe33PoolItem & {
|
|
19
|
+
stable: boolean;
|
|
20
|
+
fee: FeeE | 0 | number;
|
|
21
|
+
type: PoolTypeE;
|
|
22
|
+
chainId: ChainId;
|
|
23
|
+
baseToken: TokenInfo;
|
|
24
|
+
quoteToken: TokenInfo;
|
|
25
|
+
};
|
|
26
|
+
export type VotePoolInfoI = FetchVotePoolItem & {
|
|
27
|
+
stable: boolean;
|
|
28
|
+
fee: FeeE | 0 | number;
|
|
29
|
+
type: PoolTypeE;
|
|
30
|
+
chainId: ChainId;
|
|
31
|
+
baseToken: TokenInfo;
|
|
32
|
+
quoteToken: TokenInfo;
|
|
33
|
+
};
|
|
34
|
+
export interface Ve33PoolOperateProps {
|
|
35
|
+
poolInfo: Ve33PoolInfoI;
|
|
36
|
+
operateType: OperateTypeE;
|
|
37
|
+
chainId: ChainId;
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { FetchVe33PoolItem, FetchVotePoolItem, PoolTypeE, Ve33PoolInfoI, VotePoolInfoI } from './types';
|
|
3
|
+
import { FeeE } from './types';
|
|
4
|
+
export declare const formatFee: ({ type, fee }: {
|
|
5
|
+
type: PoolTypeE;
|
|
6
|
+
fee: FeeE;
|
|
7
|
+
}) => string;
|
|
8
|
+
export declare function compositePoolInfo(pool: NonNullable<FetchVe33PoolItem>, chainId: ChainId): Ve33PoolInfoI;
|
|
9
|
+
export declare function compositeVotePoolInfo(pool: NonNullable<FetchVotePoolItem>, chainId: ChainId): VotePoolInfoI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.4-ve33.
|
|
3
|
+
"version": "3.0.4-ve33.10",
|
|
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.4-ve33.
|
|
62
|
-
"@dodoex/components": "3.0.3",
|
|
61
|
+
"@dodoex/api": "3.0.4-ve33.4",
|
|
62
|
+
"@dodoex/components": "3.0.4-ve33.3",
|
|
63
63
|
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "1.
|
|
64
|
+
"@dodoex/dodo-contract-request": "1.15.0-morph-holesky.2",
|
|
65
65
|
"@dodoex/icons": "^2.0.2",
|
|
66
66
|
"@emotion/react": "^11.10.0",
|
|
67
67
|
"@emotion/styled": "^11.10.0",
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"@tanstack/react-query": "^5.18.1",
|
|
77
77
|
"@uniswap/sdk-core": "^5.9.0",
|
|
78
78
|
"@uniswap/v2-sdk": "^4.6.2",
|
|
79
|
-
"@web3-react/core": "8.2.
|
|
80
|
-
"@web3-react/eip1193": "8.2.
|
|
81
|
-
"@web3-react/metamask": "8.2.
|
|
82
|
-
"@web3-react/types": "8.2.
|
|
79
|
+
"@web3-react/core": "^8.2.3",
|
|
80
|
+
"@web3-react/eip1193": "^8.2.3",
|
|
81
|
+
"@web3-react/metamask": "^8.2.4",
|
|
82
|
+
"@web3-react/types": "^8.2.3",
|
|
83
83
|
"@web3-react/walletconnect-v2": "8.3.6",
|
|
84
84
|
"axios": "^0.27.2",
|
|
85
85
|
"bignumber.js": "^9.0.2",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"rmc-date-picker": "^6.0.10",
|
|
102
102
|
"semantic-release": "^19.0.2",
|
|
103
103
|
"tiny-invariant": "^1.1.0",
|
|
104
|
-
"zustand": "
|
|
104
|
+
"zustand": "4.4.0"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@babel/runtime": ">=7.17.0",
|
|
@@ -154,4 +154,4 @@
|
|
|
154
154
|
"ts-jest": "^29.0.1",
|
|
155
155
|
"typescript": "^5.6.3"
|
|
156
156
|
}
|
|
157
|
-
}
|
|
157
|
+
}
|