@dodoex/widgets 3.0.2-pool.1 → 3.0.2-pool.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/{helper-CcLPxjla.cjs → helper-Cz42lhNy.cjs} +1 -1
- package/dist/{helper-DXdwWXyJ.js → helper-MhbhAhny.js} +1 -1
- package/dist/{index-BargU8OU.cjs → index-BGXyRbS7.cjs} +6 -6
- package/dist/{index-CjkFLWU7.js → index-BqP6s2NB.js} +1 -1
- package/dist/index-D2-vszjK.js +78 -0
- package/dist/{index-u0QgQtTK.cjs → index-DxZWYA-7.cjs} +2 -2
- package/dist/index-UL8XMxQQ.cjs +31 -0
- package/dist/index-yGUQImxh.js +31 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/components/WidgetContainer.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/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/sdks/sdk-core/addresses.d.ts +0 -14
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +3 -3
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +3 -3
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +7 -1
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +4 -7
- package/package.json +3 -5
- package/dist/index-Bk7wsUIy.cjs +0 -31
- package/dist/index-BkkpNlKq.js +0 -78
- package/dist/index-C9hy4O-G.js +0 -31
- 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
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-UL8XMxQQ.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.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.useTradeSwapOrderList=e.useTradeSwapOrderList;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AMMV2Create,E as AMMV3PositionManage,D as AMMV3PositionsView,C as AddLiquidityV3,H as EmptyList,G 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,T as TokenCard,F as TokenLogo,U as UnstyleWidget,W as WIDGET_CLASS_NAME,h as WIDGET_MODULE_CLASS_NAME,e as Widget,d as chainListMap,a as formatPercentageNumber,K as formatReadableNumber,f as formatShortNumber,L as formatTokenAmountNumber,J as getEtherscanPage,r as rpcServerMap,s as scanUrlDomainMap,i as useMessageState,x as usePoolBalanceInfo,u as useRouterStore,m as useTradeSwapOrderList}from"./index-
|
|
1
|
+
export{A as AMMV2Create,E as AMMV3PositionManage,D as AMMV3PositionsView,C as AddLiquidityV3,H as EmptyList,G 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,T as TokenCard,F as TokenLogo,U as UnstyleWidget,W as WIDGET_CLASS_NAME,h as WIDGET_MODULE_CLASS_NAME,e as Widget,d as chainListMap,a as formatPercentageNumber,K as formatReadableNumber,f as formatShortNumber,L as formatTokenAmountNumber,J as getEtherscanPage,r as rpcServerMap,s as scanUrlDomainMap,i as useMessageState,x as usePoolBalanceInfo,u as useRouterStore,m as useTradeSwapOrderList}from"./index-yGUQImxh.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const WIDGET_MODULE_CLASS_NAME = "widget-module-container";
|
|
4
|
-
declare const WidgetContainer: React.ForwardRefExoticComponent<Pick<BoxProps, "key" | "nonce" | "id" | "
|
|
4
|
+
declare const WidgetContainer: React.ForwardRefExoticComponent<Pick<BoxProps, "key" | "nonce" | "id" | "onChange" | "children" | "p" | "slot" | "style" | "title" | "height" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "translate" | "component" | "sx" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default WidgetContainer;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export declare enum ContractStatus {
|
|
3
|
+
Initial = "Initial",
|
|
4
|
+
Pending = "Pending",
|
|
5
|
+
ApproveSuccess = "ApproveSuccess",
|
|
6
|
+
TxSuccess = "TxSuccess",
|
|
7
|
+
Failed = "Failed"
|
|
8
|
+
}
|
|
9
|
+
interface GlobalState {
|
|
10
|
+
fromTokenChainId?: ChainId;
|
|
11
|
+
latestBlockNumber: number;
|
|
12
|
+
openConnectWalletInfo: boolean | {
|
|
13
|
+
/** Wallet is connected, chainID needs to be switched */
|
|
14
|
+
chainId?: ChainId;
|
|
15
|
+
};
|
|
16
|
+
contractStatus?: ContractStatus;
|
|
17
|
+
autoConnectLoading?: boolean;
|
|
18
|
+
showCoingecko?: boolean;
|
|
19
|
+
/** source: props.getAutoSlippage */
|
|
20
|
+
autoSlippage?: {
|
|
21
|
+
loading: boolean;
|
|
22
|
+
value: number | null;
|
|
23
|
+
};
|
|
24
|
+
slippage: string | null;
|
|
25
|
+
}
|
|
26
|
+
export declare const useGlobalState: import("zustand").UseBoundStore<import("zustand").StoreApi<GlobalState>>;
|
|
27
|
+
export declare function setContractStatus(value: GlobalState['contractStatus']): void;
|
|
28
|
+
export declare function setAutoConnectLoading(value: GlobalState['autoConnectLoading']): void;
|
|
29
|
+
export declare function setAutoSlippage(value: GlobalState['autoSlippage']): void;
|
|
30
|
+
export declare function setAutoSlippageLoading(loading: boolean): void;
|
|
31
|
+
export declare function setSlippage(value: GlobalState['slippage']): void;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenList } from './Token';
|
|
3
|
+
export type AccountBalance = {
|
|
4
|
+
tokenBalances?: BigNumber;
|
|
5
|
+
tokenAllowances?: BigNumber;
|
|
6
|
+
};
|
|
7
|
+
export type AccountBalances = {
|
|
8
|
+
[key in string]: AccountBalance;
|
|
9
|
+
};
|
|
10
|
+
interface TokenState {
|
|
11
|
+
tokenList: TokenList;
|
|
12
|
+
popularTokenList: TokenList;
|
|
13
|
+
}
|
|
14
|
+
export declare const useTokenState: import("zustand").UseBoundStore<import("zustand").StoreApi<TokenState>>;
|
|
15
|
+
export declare function getAllTokenList(state?: TokenState): import("./Token").TokenInfo[];
|
|
16
|
+
export declare function setTokenList(value: TokenState['tokenList']): void;
|
|
17
|
+
export declare function setPopularTokenList(value: TokenState['popularTokenList']): void;
|
|
18
|
+
export {};
|
|
@@ -23,7 +23,7 @@ export declare function openEtherscanPage(path: string | undefined, chainId: Cha
|
|
|
23
23
|
* @returns
|
|
24
24
|
* @see https://test-explorer.plumenetwork.xyz/address/0x3A7Bc5F9E41356728f037f17D88c642EE46d1Aaa?tab=contract
|
|
25
25
|
*/
|
|
26
|
-
export declare const getUniInitCodeHash: (chainId: number) => "
|
|
26
|
+
export declare const getUniInitCodeHash: (chainId: number) => "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" | "0x007722521498f3d29a63d1eb6ab35e202874706c77ce73d45c1ad9da88174a3f" | "0x67a372377cf6d7f78cfdcc9df0bc21e1139bd49e5a47c33ee0de5389a4396410" | "0x2ebf1082215ab683deab4ee8ff50d42205db2059829b641717ab3f61f18d481a";
|
|
27
27
|
export declare function sortsBefore(tokenA: TokenInfo, tokenB: TokenInfo): boolean;
|
|
28
28
|
export declare const computePairAddress: ({ factoryAddress, tokenA, tokenB, fee, }: {
|
|
29
29
|
factoryAddress: string;
|
|
@@ -19,7 +19,7 @@ export declare function getTokenPairCompareText({ fromToken, toToken, fromFiatPr
|
|
|
19
19
|
comparePriceText: string;
|
|
20
20
|
loading: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare function getShowDecimals(decimals: string | number):
|
|
22
|
+
export declare function getShowDecimals(decimals: string | number): 6 | 4;
|
|
23
23
|
export declare function convertFetchTokenToTokenInfo(token: {
|
|
24
24
|
id?: string | null;
|
|
25
25
|
address?: string | null;
|
|
@@ -60,10 +60,10 @@ export declare function getV3MiningSingleRewardAmount(t: ReviewedMiningRewardTok
|
|
|
60
60
|
workThroughReward: BigNumber | undefined;
|
|
61
61
|
lastFlagBlock: BigNumber | undefined;
|
|
62
62
|
rewardVault: string | undefined;
|
|
63
|
-
startTime: BigNumber | undefined;
|
|
64
|
-
endTime: BigNumber | undefined;
|
|
65
63
|
rewardPerBlock: BigNumber | undefined;
|
|
66
64
|
startBlock: BigNumber | undefined;
|
|
67
65
|
endBlock: BigNumber | undefined;
|
|
66
|
+
startTime: BigNumber | undefined;
|
|
67
|
+
endTime: BigNumber | undefined;
|
|
68
68
|
};
|
|
69
69
|
export {};
|
|
@@ -19,10 +19,10 @@ export declare function useReviewRewardToken({ chainId, index, miningContractAdd
|
|
|
19
19
|
workThroughReward: BigNumber | undefined;
|
|
20
20
|
lastFlagBlock: BigNumber | undefined;
|
|
21
21
|
rewardVault: string | undefined;
|
|
22
|
-
startTime: BigNumber | undefined;
|
|
23
|
-
endTime: BigNumber | undefined;
|
|
24
22
|
rewardPerBlock: BigNumber | undefined;
|
|
25
23
|
startBlock: BigNumber | undefined;
|
|
26
24
|
endBlock: BigNumber | undefined;
|
|
25
|
+
startTime: BigNumber | undefined;
|
|
26
|
+
endTime: BigNumber | undefined;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
import { SupportedChainsType } from './chains';
|
|
2
1
|
type AddressMap = {
|
|
3
2
|
[chainId: number]: string;
|
|
4
3
|
};
|
|
5
|
-
type ChainAddresses = {
|
|
6
|
-
/**
|
|
7
|
-
* UniswapV3Factory
|
|
8
|
-
* @see https://taikoscan.io/address/0x78172691DD3B8ADa7aEbd9bFfB487FB11D735DB2?tab=contract#code
|
|
9
|
-
*/
|
|
10
|
-
v3CoreFactoryAddress: string;
|
|
11
|
-
/**
|
|
12
|
-
* NonfungiblePositionManager
|
|
13
|
-
* @see https://taikoscan.io/address/0x2623281DdcC34A73a9e8898f2c57A32A860903f1?tab=contract#code
|
|
14
|
-
*/
|
|
15
|
-
nonfungiblePositionManagerAddress?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>;
|
|
18
4
|
export declare const V3_CORE_FACTORY_ADDRESSES: AddressMap;
|
|
19
5
|
export declare const NONFUNGIBLE_POSITION_MANAGER_ADDRESSES: AddressMap;
|
|
20
6
|
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
2
|
export { ChainId } from '@dodoex/api';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated
|
|
5
|
+
*/
|
|
3
6
|
export declare const SUPPORTED_CHAINS: readonly [ChainId.MAINNET, ChainId.ARBITRUM_ONE, ChainId.SEPOLIA, ChainId.TAIKO];
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
4
10
|
export type SupportedChainsType = (typeof SUPPORTED_CHAINS)[number];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
4
4
|
import { PoolOperateProps } from '../PoolOperate';
|
|
5
|
-
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool,
|
|
5
|
+
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, tokenAndPoolFilter, getMigrationPairAndMining, }: {
|
|
6
6
|
scrollParentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
7
7
|
account?: string;
|
|
8
8
|
filterChainIds?: ChainId[];
|
|
@@ -10,7 +10,7 @@ export default function AddLiquidityList({ scrollParentRef, filterChainIds, acti
|
|
|
10
10
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
11
11
|
operatePool: Partial<PoolOperateProps> | null;
|
|
12
12
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
13
|
-
|
|
13
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
14
14
|
getMigrationPairAndMining?: (p: {
|
|
15
15
|
address: string;
|
|
16
16
|
chainId: number;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
-
import
|
|
2
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
-
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool,
|
|
4
|
+
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, getMigrationPairAndMining, tokenAndPoolFilter, }: {
|
|
5
5
|
account?: string;
|
|
6
6
|
filterChainIds?: ChainId[];
|
|
7
7
|
activeChainId: ChainId | undefined;
|
|
8
8
|
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
9
9
|
operatePool: Partial<PoolOperateProps> | null;
|
|
10
10
|
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
11
|
-
TokenAndPoolFilter?: typeof TokenAndPoolFilterOrigin;
|
|
12
11
|
getMigrationPairAndMining?: (p: {
|
|
13
12
|
address: string;
|
|
14
13
|
chainId: number;
|
|
15
14
|
}) => void;
|
|
15
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
16
16
|
}): JSX.Element;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
3
|
import { FetchLiquidityListLqList } from '../../utils';
|
|
3
|
-
export
|
|
4
|
+
export interface TokenAndPoolFilterUserOptions {
|
|
5
|
+
tokens: Array<TokenInfo>;
|
|
6
|
+
lqList: FetchLiquidityListLqList;
|
|
7
|
+
element: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function usePoolListFilterTokenAndPool(tokenAndPoolFilter?: TokenAndPoolFilterUserOptions): {
|
|
4
10
|
filterTokens: TokenInfo[];
|
|
5
11
|
filterASymbol: string;
|
|
6
12
|
filterBSymbol: string;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Page, PageType } from '../../../router/types';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
-
import {
|
|
5
|
-
export default function PoolList({ params, scrollRef: scrollParentRefProps,
|
|
4
|
+
import { TokenAndPoolFilterUserOptions } from './hooks/usePoolListFilterTokenAndPool';
|
|
5
|
+
export default function PoolList({ params, scrollRef: scrollParentRefProps, tokenAndPoolFilter, operatePMMPoolElement, onOperatePool, getMigrationPairAndMining, }: {
|
|
6
6
|
params?: Page<PageType.Pool>['params'];
|
|
7
7
|
scrollRef?: React.RefObject<any>;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
onChange: (v: Array<TokenInfo>) => void;
|
|
11
|
-
searchAddress: (address: string, onClose: () => void) => Promise<JSX.Element | null>;
|
|
12
|
-
}) => JSX.Element;
|
|
8
|
+
tokenAndPoolFilter?: TokenAndPoolFilterUserOptions;
|
|
9
|
+
operatePMMPoolElement?: React.ReactElement;
|
|
13
10
|
onOperatePool?: (pool: Partial<PoolOperateProps> | null) => void;
|
|
14
11
|
getMigrationPairAndMining?: (p: {
|
|
15
12
|
address: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.2-pool.
|
|
3
|
+
"version": "3.0.2-pool.10",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@dodoex/api": "3.0.3-morph.7",
|
|
62
62
|
"@dodoex/components": "3.0.3",
|
|
63
63
|
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "
|
|
64
|
+
"@dodoex/dodo-contract-request": "1.10.0-alpha.2",
|
|
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",
|