@dodoex/widgets 3.0.0-taiko.42 → 3.0.0-taiko.44
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-pSVJlk3i.js → helper-B-HiRq90.js} +1 -1
- package/dist/{helper-BTwb6EE2.cjs → helper-BKVBNDjK.cjs} +1 -1
- package/dist/{index-DKvJ3DxA.cjs → index-B15VIhJF.cjs} +1 -1
- package/dist/{index-B5UnU0o1.js → index-BHHF0NMg.js} +1 -1
- package/dist/{index-BgupeFEX.js → index-B_LP5IWI.js} +1 -1
- package/dist/{index-DFu6g_L-.js → index-C7igC0ot.js} +1 -1
- package/dist/{index-DqvLyFEU.cjs → index-DcodV9tV.cjs} +1 -1
- package/dist/{index-WFSVIgLR.cjs → index-lpcUFCfi.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/components/Widget/index.d.ts +4 -0
- package/dist/types/components/WidgetContainer.d.ts +3 -1
- package/dist/types/widgets/MiningWidget/MiningCreate/components/PoolPicker.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/MiningCreate/hooks/useDexList.d.ts +16 -0
- package/dist/types/widgets/MiningWidget/MiningCreate/operate-widgets/TokenPairSelect.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/MiningCreate/utils.d.ts +0 -19
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-lpcUFCfi.cjs");require("@lingui/react"),require("@lingui/core"),require("bignumber.js"),require("lodash"),require("@dodoex/components"),require("@dodoex/api"),require("react"),require("react-redux"),require("identicon.js"),require("@web3-react/core"),require("@web3-react/eip1193"),require("@web3-react/walletconnect-v2"),require("@web3-react/metamask"),require("@web3-react/types"),require("@reduxjs/toolkit"),require("redux"),require("@tanstack/react-query"),require("react-dom"),require("react-window"),require("@ethersproject/bignumber"),require("dayjs"),require("react-transition-group"),require("zustand"),require("axios"),require("recharts"),require("react-infinite-scroller"),require("rmc-date-picker"),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{E as EmptyList,F as FailedList,I as InitSwapWidget,g as Message,M as MetadataFlag,A 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,B 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,D as formatReadableNumber,f as formatShortNumber,G as formatTokenAmountNumber,C as getEtherscanPage,r as rpcServerMap,s as scanUrlDomainMap,i as useMessageState,x as usePoolBalanceInfo,u as useRouterStore,m as useTradeSwapOrderList}from"./index-
|
|
1
|
+
export{E as EmptyList,F as FailedList,I as InitSwapWidget,g as Message,M as MetadataFlag,A 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,B 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,D as formatReadableNumber,f as formatShortNumber,G as formatTokenAmountNumber,C as getEtherscanPage,r as rpcServerMap,s as scanUrlDomainMap,i as useMessageState,x as usePoolBalanceInfo,u as useRouterStore,m as useTradeSwapOrderList}from"./index-BHHF0NMg.js";import"@lingui/react";import"@lingui/core";import"bignumber.js";import"lodash";import"@dodoex/components";import"@dodoex/api";import"react";import"react-redux";import"identicon.js";import"@web3-react/core";import"@web3-react/eip1193";import"@web3-react/walletconnect-v2";import"@web3-react/metamask";import"@web3-react/types";import"@reduxjs/toolkit";import"redux";import"@tanstack/react-query";import"react-dom";import"react-window";import"@ethersproject/bignumber";import"dayjs";import"react-transition-group";import"zustand";import"axios";import"recharts";import"react-infinite-scroller";import"rmc-date-picker";
|
|
@@ -34,6 +34,10 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
34
34
|
noLangProvider?: boolean;
|
|
35
35
|
noAutoConnect?: boolean;
|
|
36
36
|
routerPage?: Page;
|
|
37
|
+
dappMetadata?: {
|
|
38
|
+
name: string;
|
|
39
|
+
logoUrl?: string;
|
|
40
|
+
};
|
|
37
41
|
/** When the winding status changes, no pop-up window will be displayed. */
|
|
38
42
|
noSubmissionDialog?: boolean;
|
|
39
43
|
onProviderChanged?: (provider?: any) => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export declare const WIDGET_MODULE_CLASS_NAME = "widget-module-container";
|
|
3
|
-
|
|
4
|
+
declare const WidgetContainer: React.ForwardRefExoticComponent<Pick<BoxProps, "key" | "nonce" | "id" | "sx" | "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" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "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" | "slot" | "style" | "title" | "children" | "component" | "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" | "onChange" | "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
|
+
export default WidgetContainer;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DexConfigI } from '../../types';
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
|
+
export type DexKey = 'dodo' | 'pancakeV2';
|
|
4
|
+
export declare function useDexList(): {
|
|
5
|
+
dexListObj: Record<DexKey, DexConfigI>;
|
|
6
|
+
GetGeneralUniInfo: (chainId: number) => {
|
|
7
|
+
name: string;
|
|
8
|
+
factoryAddress: string;
|
|
9
|
+
initHash: string;
|
|
10
|
+
fee?: number;
|
|
11
|
+
}[];
|
|
12
|
+
getChainDexList: (chainId: ChainId, filterCreateMiningEnable?: boolean) => {
|
|
13
|
+
key: DexKey;
|
|
14
|
+
value: JSX.Element;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DexConfigI } from '../../types';
|
|
2
2
|
import { Actions, StateProps } from '../hooks/reducers';
|
|
3
|
-
import { DexKey } from '../
|
|
3
|
+
import { DexKey } from '../hooks/useDexList';
|
|
4
4
|
export declare function TokenPairSelect({ state, dispatch, platform, setPlatform, activePlatform, handleGotoCreatePool, }: {
|
|
5
5
|
state: StateProps;
|
|
6
6
|
dispatch: React.Dispatch<Actions>;
|
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
-
import { DexConfigI } from '../types';
|
|
3
2
|
import { RewardI } from './hooks/reducers';
|
|
4
3
|
import { ChainId } from '@dodoex/api';
|
|
5
|
-
export declare const dexListObj: Record<string, DexConfigI>;
|
|
6
|
-
export type DexKey = keyof typeof dexListObj;
|
|
7
|
-
export declare const BSC_SWAPINFO: {
|
|
8
|
-
name: string;
|
|
9
|
-
factoryAddress: string;
|
|
10
|
-
initHash: string;
|
|
11
|
-
fee: number;
|
|
12
|
-
}[];
|
|
13
|
-
export declare function GetGeneralUniInfo(chainId: number): {
|
|
14
|
-
name: string;
|
|
15
|
-
factoryAddress: string;
|
|
16
|
-
initHash: string;
|
|
17
|
-
fee?: number;
|
|
18
|
-
}[];
|
|
19
4
|
export declare function getOtherDexPool(chainId: number, dexName: string, token0Address: string, token1Address: string, GetGeneralUniInfo: (chainId: number) => Array<{
|
|
20
5
|
name: string;
|
|
21
6
|
factoryAddress: string;
|
|
22
7
|
initHash: string;
|
|
23
8
|
fee?: number;
|
|
24
9
|
}>): string;
|
|
25
|
-
export declare const getChainDexList: (chainId: ChainId, filterCreateMiningEnable?: boolean) => {
|
|
26
|
-
key: DexKey;
|
|
27
|
-
value: JSX.Element;
|
|
28
|
-
}[];
|
|
29
10
|
export declare function formatDate(time: number | null): string;
|
|
30
11
|
export declare function computeDailyAmount({ startTime, endTime, total, }: {
|
|
31
12
|
startTime: BigNumber | number | null | undefined;
|
|
@@ -2,7 +2,7 @@ import { ChainId } from '@dodoex/api';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PoolOperateProps } from '../PoolOperate';
|
|
4
4
|
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
|
-
scrollParentRef: React.MutableRefObject<HTMLDivElement |
|
|
5
|
+
scrollParentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
6
6
|
account?: string;
|
|
7
7
|
filterChainIds?: ChainId[];
|
|
8
8
|
activeChainId: ChainId | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.0-taiko.
|
|
3
|
+
"version": "3.0.0-taiko.44",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@dodoex/api": ">=3.0.0-taiko.
|
|
61
|
+
"@dodoex/api": ">=3.0.0-taiko.16",
|
|
62
62
|
"@dodoex/components": ">=3.0.0-taiko.6",
|
|
63
63
|
"@dodoex/icons": "^2.0.1",
|
|
64
64
|
"@emotion/react": "^11.10.0",
|