@dodoex/widgets 3.0.2-beta.21 → 3.0.2-beta.22
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/{helper-Ca1NNN7H.cjs → helper-8eA-SxBF.cjs} +1 -1
- package/dist/{helper-0mEEWmLI.js → helper-DAaF4Exd.js} +1 -1
- package/dist/{index-CXnrrEzC.cjs → index-BKn-UQda.cjs} +1 -1
- package/dist/{index-RtpT-Lw5.js → index-BMZgHkwb.js} +1 -1
- package/dist/{index-C9SrgBQF.cjs → index-BsWlIX4W.cjs} +1 -1
- package/dist/index-CXeeHr1-.js +31 -0
- package/dist/index-DLFCT06P.cjs +31 -0
- package/dist/{index-Dd6MuO0J.js → index-d8OyZj7_.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +2 -4
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +2 -4
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +4 -9
- 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/package.json +3 -3
- package/dist/index-B88bmvE3.js +0 -31
- package/dist/index-DzpFHEP1.cjs +0 -31
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import t from"@emotion/styled";import{merge as e}from"lodash";import{useMemo as i,useRef as n}from"react";import{l as r,g as o,m as l}from"./helper-
|
|
1
|
+
import t from"@emotion/styled";import{merge as e}from"lodash";import{useMemo as i,useRef as n}from"react";import{l as r,g as o,m as l}from"./helper-DAaF4Exd.js";import{Line as a,Text as s,Stage as d,Layer as g,Rect as m,Circle as u,Label as p,Tag as c}from"react-konva";import{j as h,f}from"./index-CXeeHr1-.js";import x from"bignumber.js";import{solveQuadraticFunctionForTarget as L,PMMState as w,PMMHelper as b}from"@dodoex/api";import"@lingui/core";import"@lingui/react";import"@dodoex/components";import"@dodoex/dodo-contract-request";import"identicon.js";import"zustand";import"@web3-react/core";import"@web3-react/eip1193";import"@web3-react/walletconnect-v2";import"@web3-react/metamask";import"@web3-react/types";import"@tanstack/react-query";import"react-dom";import"react-window";import"@ethersproject/bignumber";import"dayjs";import"react-transition-group";import"@dodoex/contract-request";import"axios";import"recharts";import"jsbi";import"tiny-invariant";import"@uniswap/sdk-core";import"@uniswap/v2-sdk";import"react-infinite-scroller";import"d3";import"rmc-date-picker";const A=t.div`
|
|
2
2
|
height: 100%;
|
|
3
3
|
position: relative;
|
|
4
4
|
`,y=t.div`
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-DLFCT06P.cjs");require("@lingui/react"),require("@lingui/core"),require("bignumber.js"),require("lodash"),require("@dodoex/components"),require("@dodoex/api"),require("@dodoex/dodo-contract-request"),require("react"),require("identicon.js"),require("zustand"),require("@web3-react/core"),require("@web3-react/eip1193"),require("@web3-react/walletconnect-v2"),require("@web3-react/metamask"),require("@web3-react/types"),require("@tanstack/react-query"),require("react-dom"),require("react-window"),require("@ethersproject/bignumber"),require("dayjs"),require("react-transition-group"),require("@dodoex/contract-request"),require("axios"),require("recharts"),require("jsbi"),require("tiny-invariant"),require("@uniswap/sdk-core"),require("@uniswap/v2-sdk"),require("react-infinite-scroller"),require("d3"),require("rmc-date-picker"),exports.AMMV2Create=e.AMMV2Create,exports.AMMV3PositionManage=e.AMMV3PositionManage,exports.AMMV3PositionsView=e.AMMV3PositionsView,exports.AddLiquidityV3=e.AddLiquidityV3,exports.EmptyList=e.EmptyList,exports.FailedList=e.FailedList,exports.InitSwapWidget=e.InitSwapWidget,exports.Message=e.Message,Object.defineProperty(exports,"MetadataFlag",{enumerable:!0,get:function(){return e.MetadataFlag}}),exports.MiningCreate=e.MiningCreate,exports.MiningDetail=e.MiningDetail,exports.MiningList=e.MiningList,Object.defineProperty(exports,"PageType",{enumerable:!0,get:function(){return e.PageType}}),exports.Pool=e.Pool,exports.PoolCreate=e.PoolCreate,exports.PoolDetail=e.PoolDetail,exports.PoolList=e.PoolList,exports.PoolModify=e.PoolModify,exports.PoolOperate=e.PoolOperate,exports.PoolOperateDialog=e.PoolOperateDialog,exports.PoolWidget=e.PoolWidget,exports.Swap=e.Swap,exports.SwapOrderHistory=e.SwapOrderHistory,exports.SwapWidget=e.SwapWidget,exports.TokenCard=e.TokenCard,exports.TokenLogo=e.TokenLogo,exports.TokenPairStatusButton=e.TokenPairStatusButton,exports.TokenStatusButton=e.TokenStatusButton,exports.UnstyleWidget=e.UnstyleWidget,exports.WIDGET_CLASS_NAME=e.WIDGET_CLASS_NAME,exports.WIDGET_MODULE_CLASS_NAME=e.WIDGET_MODULE_CLASS_NAME,exports.Widget=e.Widget,exports.chainListMap=e.chainListMap,exports.formatPercentageNumber=e.formatPercentageNumber,exports.formatReadableNumber=e.formatReadableNumber,exports.formatShortNumber=e.formatShortNumber,exports.formatTokenAmountNumber=e.formatTokenAmountNumber,exports.getEtherscanPage=e.getEtherscanPage,exports.rpcServerMap=e.rpcServerMap,exports.scanUrlDomainMap=e.scanUrlDomainMap,exports.useMessageState=e.useMessageState,exports.usePoolBalanceInfo=e.usePoolBalanceInfo,exports.useRouterStore=e.useRouterStore,exports.useTokenStatus=e.useTokenStatus,exports.useTradeSwapOrderList=e.useTradeSwapOrderList;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AMMV2Create,E as AMMV3PositionManage,D as AMMV3PositionsView,C as AddLiquidityV3,
|
|
1
|
+
export{A as AMMV2Create,E as AMMV3PositionManage,D as AMMV3PositionsView,C as AddLiquidityV3,L as EmptyList,K as FailedList,I as InitSwapWidget,g as Message,M as MetadataFlag,B as MiningCreate,z as MiningDetail,y as MiningList,c as PageType,n as Pool,p as PoolCreate,t as PoolDetail,o as PoolList,q as PoolModify,w as PoolOperate,v as PoolOperateDialog,P as PoolWidget,k as Swap,l as SwapOrderHistory,S as SwapWidget,H as TokenCard,J as TokenLogo,G as TokenPairStatusButton,T as TokenStatusButton,U as UnstyleWidget,W as WIDGET_CLASS_NAME,h as WIDGET_MODULE_CLASS_NAME,e as Widget,d as chainListMap,a as formatPercentageNumber,O as formatReadableNumber,f as formatShortNumber,Q as formatTokenAmountNumber,N as getEtherscanPage,r as rpcServerMap,s as scanUrlDomainMap,i as useMessageState,x as usePoolBalanceInfo,u as useRouterStore,F as useTokenStatus,m as useTradeSwapOrderList}from"./index-CXeeHr1-.js";import"@lingui/react";import"@lingui/core";import"bignumber.js";import"lodash";import"@dodoex/components";import"@dodoex/api";import"@dodoex/dodo-contract-request";import"react";import"identicon.js";import"zustand";import"@web3-react/core";import"@web3-react/eip1193";import"@web3-react/walletconnect-v2";import"@web3-react/metamask";import"@web3-react/types";import"@tanstack/react-query";import"react-dom";import"react-window";import"@ethersproject/bignumber";import"dayjs";import"react-transition-group";import"@dodoex/contract-request";import"axios";import"recharts";import"jsbi";import"tiny-invariant";import"@uniswap/sdk-core";import"@uniswap/v2-sdk";import"react-infinite-scroller";import"d3";import"rmc-date-picker";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export { MiningCreate } from './widgets/MiningWidget/MiningCreate';
|
|
|
30
30
|
export { default as AddLiquidityV3 } from './widgets/PoolWidget/AMMV3/AddLiquidityV3';
|
|
31
31
|
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
32
32
|
export { AMMV3PositionManage } from './widgets/PoolWidget/AMMV3/AMMV3PositionManage';
|
|
33
|
+
export { useTokenStatus } from './hooks/Token/useTokenStatus';
|
|
34
|
+
export { default as TokenStatusButton } from './components/TokenStatusButton';
|
|
35
|
+
export { default as TokenPairStatusButton } from './components/TokenPairStatusButton';
|
|
33
36
|
export { TokenCard } from './components/Swap/components/TokenCard';
|
|
34
37
|
export { default as TokenLogo } from './components/TokenLogo';
|
|
35
38
|
export { FailedList } from './components/List/FailedList';
|
|
@@ -2,6 +2,7 @@ import { ChainId } from '@dodoex/api';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
4
4
|
import { PoolOperateProps } from '../PoolOperate';
|
|
5
|
+
import { GetMigrationPairAndMining } from '../PoolOperate/types';
|
|
5
6
|
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, tokenAndPoolFilter, getMigrationPairAndMining, }: {
|
|
6
7
|
scrollParentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
7
8
|
account?: string;
|
|
@@ -11,8 +12,5 @@ export default function AddLiquidityList({ scrollParentRef, filterChainIds, acti
|
|
|
11
12
|
operatePool: Partial<PoolOperateProps> | null;
|
|
12
13
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
13
14
|
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
14
|
-
getMigrationPairAndMining?:
|
|
15
|
-
address: string;
|
|
16
|
-
chainId: number;
|
|
17
|
-
}) => void;
|
|
15
|
+
getMigrationPairAndMining?: GetMigrationPairAndMining;
|
|
18
16
|
}): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
+
import { GetMigrationPairAndMining } from '../PoolOperate/types';
|
|
4
5
|
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, getMigrationPairAndMining, tokenAndPoolFilter, }: {
|
|
5
6
|
account?: string;
|
|
6
7
|
filterChainIds?: ChainId[];
|
|
@@ -8,9 +9,6 @@ export default function MyLiquidity({ account, filterChainIds, activeChainId, ha
|
|
|
8
9
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
9
10
|
operatePool: Partial<PoolOperateProps> | null;
|
|
10
11
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
11
|
-
getMigrationPairAndMining?:
|
|
12
|
-
address: string;
|
|
13
|
-
chainId: number;
|
|
14
|
-
}) => void;
|
|
12
|
+
getMigrationPairAndMining?: GetMigrationPairAndMining;
|
|
15
13
|
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
16
14
|
}): JSX.Element;
|
|
@@ -1,16 +1,11 @@
|
|
|
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
|
-
|
|
4
|
+
import { GetMigrationPairAndMining, ShowMigrationPairAndMining } from '../PoolOperate/types';
|
|
5
|
+
export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter, getMigrationPairAndMining, showMigrationPairAndMining, }: {
|
|
6
6
|
params?: Page<PageType.Pool>['params'];
|
|
7
7
|
scrollRef?: React.RefObject<any>;
|
|
8
8
|
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
onOperatePool?: (pool: Partial<PoolOperateProps> | null) => boolean;
|
|
12
|
-
getMigrationPairAndMining?: (p: {
|
|
13
|
-
address: string;
|
|
14
|
-
chainId: number;
|
|
15
|
-
}) => void;
|
|
9
|
+
getMigrationPairAndMining?: GetMigrationPairAndMining;
|
|
10
|
+
showMigrationPairAndMining?: ShowMigrationPairAndMining;
|
|
16
11
|
}): 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-beta.
|
|
3
|
+
"version": "3.0.2-beta.22",
|
|
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-beta.
|
|
61
|
+
"@dodoex/api": "3.0.3-beta.5",
|
|
62
62
|
"@dodoex/components": "3.0.4-beta.1",
|
|
63
63
|
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "1.12.0-alpha.
|
|
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",
|