@dodoex/widgets 3.0.2-nero.4 → 3.0.2-pharos.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.
Files changed (41) hide show
  1. package/dist/cjs/locales/en-US.js +1 -1
  2. package/dist/cjs/locales/zh-CN.js +1 -1
  3. package/dist/{helper-Bvz895DF.js → helper-MLVXC4M-.js} +1 -1
  4. package/dist/{helper-BPn7qFBL.cjs → helper-nSNty_y-.cjs} +1 -1
  5. package/dist/{index-BYYNGqJA.js → index-B0Y45kbJ.js} +1 -1
  6. package/dist/index-BuVSAxcD.js +31 -0
  7. package/dist/{index-DeUEzDvn.cjs → index-C_A5Xwsa.cjs} +1 -1
  8. package/dist/{index-VXpdhE1B.cjs → index-DCLmPYOZ.cjs} +1 -1
  9. package/dist/index-DQkYFeA7.cjs +31 -0
  10. package/dist/{index-CBYoiemx.js → index-hoZ8ci8-.js} +1 -1
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/locales/en-US.js +1 -1
  14. package/dist/locales/zh-CN.js +1 -1
  15. package/dist/types/components/SelectChain.d.ts +2 -1
  16. package/dist/types/components/Widget/index.d.ts +1 -0
  17. package/dist/types/index.d.ts +3 -0
  18. package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +2 -1
  19. package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +2 -1
  20. package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +2 -1
  21. package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +2 -1
  22. package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +2 -1
  23. package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +2 -1
  24. package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +2 -1
  25. package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +3 -1
  26. package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +2 -1
  27. package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +2 -1
  28. package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +2 -1
  29. package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +2 -1
  30. package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +4 -5
  31. package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -1
  32. package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +4 -5
  33. package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +5 -9
  34. package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +2 -1
  35. package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -2
  36. package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +4 -2
  37. package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +4 -1
  38. package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +12 -0
  39. package/package.json +5 -5
  40. package/dist/index-BpYWc8fX.cjs +0 -31
  41. package/dist/index-D2F_dbCb.js +0 -31
@@ -1,16 +1,12 @@
1
1
  import React from 'react';
2
2
  import { Page, PageType } from '../../../router/types';
3
- import { PoolOperateProps } from '../PoolOperate';
4
3
  import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
5
- export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter, operatePMMPoolElement, operatePool: operatePoolProps, onOperatePool, getMigrationPairAndMining, }: {
4
+ import { GetMigrationPairAndMining, ShowMigrationPairAndMining } from '../PoolOperate/types';
5
+ export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter, getMigrationPairAndMining, showMigrationPairAndMining, supportAMMIcon, }: {
6
6
  params?: Page<PageType.Pool>['params'];
7
7
  scrollRef?: React.RefObject<any>;
8
8
  tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
9
- operatePMMPoolElement?: React.ReactElement;
10
- operatePool?: Partial<PoolOperateProps> | null;
11
- onOperatePool?: (pool: Partial<PoolOperateProps> | null) => boolean;
12
- getMigrationPairAndMining?: (p: {
13
- address: string;
14
- chainId: number;
15
- }) => void;
9
+ getMigrationPairAndMining?: GetMigrationPairAndMining;
10
+ showMigrationPairAndMining?: ShowMigrationPairAndMining;
11
+ supportAMMIcon?: boolean;
16
12
  }): JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { Page, PageType } from '../../../router/types';
2
- export default function PoolModify({ params, }: {
2
+ export default function PoolModify({ params, cardMode, }: {
3
3
  params: Page<PageType.PoolDetail>['params'];
4
+ cardMode?: boolean;
4
5
  }): JSX.Element;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dodoex/widgets",
3
- "version": "3.0.2-nero.4",
3
+ "version": "3.0.2-pharos.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.3-nero.1",
62
- "@dodoex/components": "3.0.3",
61
+ "@dodoex/api": "3.0.3-pharos.1",
62
+ "@dodoex/components": "3.0.5",
63
63
  "@dodoex/contract-request": "^1.3.0",
64
- "@dodoex/dodo-contract-request": "1.12.0-alpha.3",
64
+ "@dodoex/dodo-contract-request": "1.12.0-alpha.7",
65
65
  "@dodoex/icons": "^2.0.2",
66
66
  "@emotion/react": "^11.10.0",
67
67
  "@emotion/styled": "^11.10.0",
@@ -139,6 +139,7 @@
139
139
  "babel-runtime": "^6.26.0",
140
140
  "dotenv": "^16.0.2",
141
141
  "ethers": "^5.7.1",
142
+ "gettext-parser": "^8.0.0",
142
143
  "hardhat": "^2.22.13",
143
144
  "identity-obj-proxy": "^3.0.0",
144
145
  "jest": "^29.0.3",
@@ -153,4 +154,3 @@
153
154
  "typescript": "^5.6.3"
154
155
  }
155
156
  }
156
-