@dodoex/widgets 3.0.4-ve33.1 → 3.0.4-ve33.11
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-BASM7Iwr.cjs} +1 -1
- package/dist/{helper-0RKQSgE1.js → helper-BASXTlaZ.js} +1 -1
- package/dist/{index-8b78r-JT.js → index-BPaBKoXS.js} +1 -1
- package/dist/index-CjO6DZLb.js +32 -0
- package/dist/index-DH1Xhcg6.cjs +32 -0
- package/dist/{index-DdE6aa-k.cjs → index-mk0U3yyv.cjs} +1 -1
- package/dist/{index-D9uctpVh.js → index-r9aOMH8w.js} +1 -1
- package/dist/{index-CsquFrM1.cjs → index-zX4IFul3.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/CardWidgets.d.ts +2 -1
- package/dist/types/components/SimpleItemInfo.d.ts +4 -0
- package/dist/types/components/Swap/components/Dialog.d.ts +3 -0
- 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/components/TokenCard/NumberInput.d.ts +1 -0
- package/dist/types/components/Swap/components/TokenCard/TokenLpCard.d.ts +32 -0
- package/dist/types/components/Swap/components/TokenCard/index.d.ts +2 -1
- package/dist/types/components/Swap/index.d.ts +1 -4
- package/dist/types/components/Token/TokenItem.d.ts +2 -1
- package/dist/types/components/TokenSelect.d.ts +5 -2
- package/dist/types/components/TokenStatusButton.d.ts +1 -1
- 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 +21 -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/Token/usePoolTokenSort.d.ts +24 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/index.d.ts +40 -23
- package/dist/types/utils/formatter.d.ts +2 -2
- package/dist/types/utils/fractions/fraction.d.ts +24 -0
- package/dist/types/utils/fractions/index.d.ts +3 -0
- package/dist/types/utils/fractions/percent.d.ts +14 -0
- package/dist/types/utils/fractions/price.d.ts +29 -0
- package/dist/types/utils/fractions/types.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/utils.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/AddIncentiveDialog.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/Dashboard.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/PoolInfo.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/CardList.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/TableList.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/CardList.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33LockList/ClaimLockDialog.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/LockManageDialog.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/MergeDialog.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/TableList.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimBribes.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimRebases.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useExtendLock.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useFetchUserLocks.d.ts +282 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useIncreaseLock.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useMergeLock.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useTransferLock.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useCreateLock.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useFetchUserTotalVeNFT.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/index.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/utils.d.ts +21 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/MyAssets.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/MyPosition.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/PoolInfo.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/useVe33V3Positions.d.ts +79 -0
- package/dist/types/widgets/ve33/Ve33PoolList/CardList.d.ts +13 -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.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33StakeDialog.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/AddPoolOperate.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/RemovePoolOperate.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/ComparePrice.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/OperateBtn.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/SliderPercentageCard.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/SlippageSetting.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/components/V2ConfirmDialog.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useComparePrice.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useLiquidityOperateAmount.d.ts +86 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/usePercentageRemove.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useVe33V2AddLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useVe33V2BalanceInfo.d.ts +36 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useVe33V2RemoveLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/hooks/useWithdrawInfo.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/index.d.ts +15 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/types.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/Ve33V3AddLiquidity.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/Badge/RangeBadge.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ClaimButton.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InRangeDot.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InputStepCounter.d.ts +17 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Area.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/AxisBottom.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Brush.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Chart.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Line.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Zoom.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/index.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/svg.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/types.d.ts +50 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/utils.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/MyLiquidity.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionManage.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionPreview.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionSelectedRangePreview.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeRatioSelect.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeSelector.d.ts +21 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RateToggle.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RemoveButton.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ReviewModal.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenAndEtherscan.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenPairSelect.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/shared.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/widgets.d.ts +56 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/constants/misc.d.ts +17 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useAddVe33V3Liquidity.d.ts +15 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePoolActiveLiquidityChartData.d.ts +37 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePriceRangeRatioSelect.d.ts +28 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useRemoveVe33V3Liquidity.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useSetRange.d.ts +36 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Amounts.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Pair.d.ts +58 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/index.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/types.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/calldata.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/computeSurroundingTicks.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/constants.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/encodeSqrtRatioX96.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/formatTickPrice.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/fullMath.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmount.d.ts +39 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmountWithSlippage.d.ts +23 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getTickToPrice.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/maxLiquidityForAmounts.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/mostSignificantBit.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/nearestUsableTick.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/slippage.d.ts +3 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrt.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrtPriceMath.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tickMath.d.ts +34 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tryParseTick.d.ts +4 -0
- package/dist/types/widgets/ve33/VotePoolList/CardList.d.ts +12 -0
- package/dist/types/widgets/ve33/VotePoolList/SetVotePowerDialog.d.ts +12 -0
- package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +12 -0
- package/dist/types/widgets/ve33/VotePoolList/hooks/useVoteVe33.d.ts +7 -0
- package/dist/types/widgets/ve33/VotePoolList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/VotePoolList/widgets.d.ts +35 -0
- package/dist/types/widgets/ve33/components/GoBack.d.ts +4 -0
- package/dist/types/widgets/ve33/components/LockSlider.d.ts +5 -0
- package/dist/types/widgets/ve33/components/PoolHead.d.ts +8 -0
- package/dist/types/widgets/ve33/components/PoolTokenInfo.d.ts +11 -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/useVe33PositionAmounts.d.ts +17 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2ClaimEmissions.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2ClaimTradingFees.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2Stake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2UnStake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3ClaimEmissions.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3ClaimTradingFees.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3Stake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3StakeApproveStatus.d.ts +17 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3UnStake.d.ts +5 -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
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { TokenInfo } from '../../hooks/Token/type';
|
|
2
|
-
import { GetAutoSlippage } from '../../hooks/setting/useSetAutoSlippage';
|
|
3
2
|
export interface SwapProps {
|
|
4
|
-
/** Higher priority setting slippage */
|
|
5
|
-
getAutoSlippage?: GetAutoSlippage;
|
|
6
3
|
onPayTokenChange?: (token: TokenInfo) => void;
|
|
7
4
|
onReceiveTokenChange?: (token: TokenInfo) => void;
|
|
8
5
|
}
|
|
9
|
-
export declare function Swap({
|
|
6
|
+
export declare function Swap({ onPayTokenChange, onReceiveTokenChange, }?: SwapProps): JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export default function TokenItem({ chainId, address, showName, size, offset, rightContent, }: {
|
|
2
|
+
export default function TokenItem({ chainId, address, showName, size, offset, rightContent, hideLogo, }: {
|
|
3
3
|
chainId: number;
|
|
4
4
|
address: string;
|
|
5
5
|
showName: string;
|
|
6
6
|
size: number;
|
|
7
7
|
offset?: number;
|
|
8
8
|
rightContent?: React.ReactNode;
|
|
9
|
+
hideLogo?: boolean;
|
|
9
10
|
}): JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
1
2
|
import { TokenInfo } from '../hooks/Token/type';
|
|
2
3
|
import { ChainId } from '@dodoex/api';
|
|
3
|
-
export
|
|
4
|
+
export interface TokenSelectProps {
|
|
4
5
|
token?: TokenInfo | null;
|
|
5
6
|
chainId?: ChainId;
|
|
6
7
|
showChainLogo?: boolean;
|
|
@@ -16,6 +17,8 @@ export default function TokenSelect({ token, chainId: chainIdProps, showChainLog
|
|
|
16
17
|
px?: number;
|
|
17
18
|
py?: number;
|
|
18
19
|
highlightDefault?: boolean;
|
|
20
|
+
sx?: BoxProps['sx'];
|
|
19
21
|
onTokenClick?: () => void;
|
|
20
22
|
onTokenChange?: (token: TokenInfo, isOccupied: boolean) => void;
|
|
21
|
-
}
|
|
23
|
+
}
|
|
24
|
+
export default function TokenSelect({ token, chainId: chainIdProps, showChainLogo, readonly, showChainName: showChainNameProps, logoSize, chainLogoSize, side, occupiedToken, defaultLoadBalance, notTokenPickerModal, border, px, py, highlightDefault, sx, onTokenClick, onTokenChange, }: TokenSelectProps): JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonProps } from '@dodoex/components';
|
|
2
2
|
import { useTokenStatus } from '../hooks/Token/useTokenStatus';
|
|
3
|
-
export default function TokenStatusButton({ status, children, buttonProps, }: React.PropsWithChildren<{
|
|
3
|
+
export default function TokenStatusButton({ status, children, buttonProps: buttonPropsOrigin, }: React.PropsWithChildren<{
|
|
4
4
|
status: ReturnType<typeof useTokenStatus>;
|
|
5
5
|
buttonProps?: ButtonProps;
|
|
6
6
|
}>): JSX.Element;
|
|
@@ -13,6 +13,7 @@ import { Page } from '../../router';
|
|
|
13
13
|
export declare const WIDGET_CLASS_NAME = "dodo-widget-container";
|
|
14
14
|
export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, ExecutionProps {
|
|
15
15
|
apikey?: string;
|
|
16
|
+
apiDomain: string;
|
|
16
17
|
theme?: PartialDeep<ThemeOptions>;
|
|
17
18
|
colorMode?: PaletteMode;
|
|
18
19
|
defaultChainId?: ChainId;
|
|
@@ -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" | "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" | "
|
|
4
|
+
declare const WidgetContainer: React.ForwardRefExoticComponent<Pick<BoxProps, "key" | "nonce" | "id" | "children" | "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" | "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
5
|
export default WidgetContainer;
|
|
@@ -13,7 +13,7 @@ export declare const AppUrl = "https://app.dodoex.io";
|
|
|
13
13
|
export declare const getCGTokenListAPI: (chainId: ChainId) => any;
|
|
14
14
|
export declare const RoutePriceAPI = "https://api.dodoex.io/route-service/v2/widget/getdodoroute";
|
|
15
15
|
export declare const FiatPriceAPI = "https://api.dodoex.io/frontend-price-api/current/batch";
|
|
16
|
-
export declare function getAPIService(key: APIServiceKey, serviceProps
|
|
16
|
+
export declare function getAPIService(key: APIServiceKey, serviceProps: Partial<APIServices> | undefined, apiDomain: string): string;
|
|
17
17
|
export declare const contractRequests: ContractRequests;
|
|
18
18
|
export declare const tokenContractRequests: ContractRequests;
|
|
19
19
|
export declare const tokenApi: TokenApi;
|
|
@@ -27,7 +27,27 @@ export declare enum MetadataFlag {
|
|
|
27
27
|
claimMining = "claimMining",
|
|
28
28
|
submissionCreateMetaKey = "submissionCreateMetaKey",
|
|
29
29
|
approve = "approve",
|
|
30
|
-
reset = "reset"
|
|
30
|
+
reset = "reset",
|
|
31
|
+
addLiquidityVe33V2Position = "addLiquidityVe33V2Position",
|
|
32
|
+
removeLiquidityVe33V2Position = "removeLiquidityVe33V2Position",
|
|
33
|
+
addLiquidityVe33V3Position = "addLiquidityVe33V3Position",
|
|
34
|
+
removeLiquidityVe33V3Position = "removeLiquidityVe33V3Position",
|
|
35
|
+
stakeVe33V2Position = "stakeVe33V2Position",
|
|
36
|
+
stakeVe33V3Position = "stakeVe33V3Position",
|
|
37
|
+
unStakeVe33V2Position = "unStakeVe33V2Position",
|
|
38
|
+
unStakeVe33V3Position = "unStakeVe33V3Position",
|
|
39
|
+
claimEmissionsVe33V2Position = "claimEmissionsVe33V2Position",
|
|
40
|
+
claimEmissionsVe33V3Position = "claimEmissionsVe33V3Position",
|
|
41
|
+
claimTradingFeesVe33V2Position = "claimTradingFeesVe33V2Position",
|
|
42
|
+
claimTradingFeesVe33V3Position = "claimTradingFeesVe33V3Position",
|
|
43
|
+
createVe33Lock = "createVe33Lock",
|
|
44
|
+
mergeVe33Lock = "mergeVe33Lock",
|
|
45
|
+
increaseVe33Lock = "increaseVe33Lock",
|
|
46
|
+
extendVe33Lock = "extendVe33Lock",
|
|
47
|
+
transferVe33Lock = "transferVe33Lock",
|
|
48
|
+
claimRebases = "claimRebases",
|
|
49
|
+
claimBribes = "claimBribes",
|
|
50
|
+
voteVe33 = "voteVe33"
|
|
31
51
|
}
|
|
32
52
|
export type Metadata = Record<string, any>;
|
|
33
53
|
export type Request = {
|
|
@@ -14,8 +14,6 @@ export interface FetchRoutePrice {
|
|
|
14
14
|
toAmount: string;
|
|
15
15
|
estimateGas?: boolean;
|
|
16
16
|
isReverseRouting?: boolean;
|
|
17
|
-
slippage?: number;
|
|
18
|
-
slippageLoading?: boolean;
|
|
19
17
|
}
|
|
20
18
|
interface IRouteResponse {
|
|
21
19
|
resAmount: number;
|
|
@@ -30,7 +28,7 @@ interface IRouteResponse {
|
|
|
30
28
|
useSource: string;
|
|
31
29
|
duration: number;
|
|
32
30
|
}
|
|
33
|
-
export declare function useFetchRoutePrice({ toToken, fromToken, fromAmount, toAmount, marginAmount, estimateGas, isReverseRouting,
|
|
31
|
+
export declare function useFetchRoutePrice({ toToken, fromToken, fromAmount, toAmount, marginAmount, estimateGas, isReverseRouting, }: FetchRoutePrice): {
|
|
34
32
|
status: RoutePriceStatus;
|
|
35
33
|
rawBrief: IRouteResponse | null;
|
|
36
34
|
refetch: () => Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const maxSlippageWarning = 5;
|
|
2
|
-
export declare const useSlippageLimit: (
|
|
2
|
+
export declare const useSlippageLimit: () => boolean;
|
|
@@ -22,6 +22,7 @@ interface SwapSettingState {
|
|
|
22
22
|
ddl: string;
|
|
23
23
|
expertMode: boolean;
|
|
24
24
|
disableIndirectRouting: boolean;
|
|
25
|
+
slippage: string;
|
|
25
26
|
}
|
|
26
27
|
export declare const useSwapSettingStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SwapSettingState>, "persist"> & {
|
|
27
28
|
persist: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from './type';
|
|
3
|
+
export declare function usePoolTokenSort({ baseToken, quoteToken, }: {
|
|
4
|
+
baseToken: TokenInfo | undefined;
|
|
5
|
+
quoteToken: TokenInfo | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
chainId: undefined;
|
|
8
|
+
isRearTokenA: boolean;
|
|
9
|
+
token0: undefined;
|
|
10
|
+
token1: undefined;
|
|
11
|
+
token0Wrapped: undefined;
|
|
12
|
+
token1Wrapped: undefined;
|
|
13
|
+
isBaseTokenNative: boolean;
|
|
14
|
+
isQuoteTokenNative: boolean;
|
|
15
|
+
} | {
|
|
16
|
+
chainId: ChainId;
|
|
17
|
+
isRearTokenA: boolean;
|
|
18
|
+
token0: TokenInfo;
|
|
19
|
+
token1: TokenInfo;
|
|
20
|
+
token0Wrapped: TokenInfo;
|
|
21
|
+
token1Wrapped: TokenInfo;
|
|
22
|
+
isBaseTokenNative: boolean;
|
|
23
|
+
isQuoteTokenNative: boolean;
|
|
24
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,41 +1,58 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { SwapProps } from './components/Swap';
|
|
2
3
|
import { WidgetProps } from './components/Widget';
|
|
3
|
-
export {
|
|
4
|
+
export { PageType, useRouterStore } from './router';
|
|
4
5
|
export type { Page } from './router';
|
|
5
6
|
export { WIDGET_CLASS_NAME } from './components/Widget';
|
|
6
7
|
export { MetadataFlag } from './hooks/Submission/types';
|
|
7
|
-
export { rpcServerMap, scanUrlDomainMap } from './constants/chains';
|
|
8
|
-
export { chainListMap } from './constants/chainList';
|
|
9
|
-
export { Widget, UnstyleWidget, Message } from './components/Widget';
|
|
10
|
-
export { WIDGET_MODULE_CLASS_NAME } from './components/WidgetContainer';
|
|
11
|
-
export type { WidgetProps } from './components/Widget';
|
|
12
|
-
export type SwapWidgetProps = WidgetProps & SwapProps;
|
|
13
|
-
export type { TokenInfo } from './hooks/Token/type';
|
|
14
|
-
export { useMessageState } from './hooks/useMessageState';
|
|
15
8
|
export { Swap } from './components/Swap';
|
|
16
9
|
export { default as SwapOrderHistory } from './components/Swap/SwapOrderHistory';
|
|
10
|
+
export { Message, UnstyleWidget, Widget } from './components/Widget';
|
|
11
|
+
export type { WidgetProps } from './components/Widget';
|
|
12
|
+
export { WIDGET_MODULE_CLASS_NAME } from './components/WidgetContainer';
|
|
13
|
+
export { chainListMap } from './constants/chainList';
|
|
14
|
+
export { rpcServerMap, scanUrlDomainMap } from './constants/chains';
|
|
17
15
|
export { useTradeSwapOrderList } from './hooks/Swap/useTradeSwapOrderList';
|
|
16
|
+
export type { TokenInfo } from './hooks/Token/type';
|
|
17
|
+
export { useMessageState } from './hooks/useMessageState';
|
|
18
|
+
export { MiningCreate } from './widgets/MiningWidget/MiningCreate';
|
|
19
|
+
export { MiningDetail } from './widgets/MiningWidget/MiningDetail';
|
|
20
|
+
export { MiningList } from './widgets/MiningWidget/MiningList';
|
|
18
21
|
export { Pool } from './widgets/PoolWidget';
|
|
19
|
-
export { default as PoolList } from './widgets/PoolWidget/PoolList';
|
|
20
|
-
export { default as PoolCreate } from './widgets/PoolWidget/PoolCreate';
|
|
21
22
|
export { default as AMMV2Create } from './widgets/PoolWidget/AMMV2Create';
|
|
22
|
-
export { default as PoolModify } from './widgets/PoolWidget/PoolModify';
|
|
23
|
-
export { default as PoolDetail } from './widgets/PoolWidget/PoolDetail';
|
|
24
|
-
export { default as PoolOperateDialog, PoolOperate, } from './widgets/PoolWidget/PoolOperate';
|
|
25
|
-
export type { PoolOperateProps } from './widgets/PoolWidget/PoolOperate';
|
|
26
|
-
export { usePoolBalanceInfo } from './widgets/PoolWidget/hooks/usePoolBalanceInfo';
|
|
27
|
-
export { MiningList } from './widgets/MiningWidget/MiningList';
|
|
28
|
-
export { MiningDetail } from './widgets/MiningWidget/MiningDetail';
|
|
29
|
-
export { MiningCreate } from './widgets/MiningWidget/MiningCreate';
|
|
30
23
|
export { default as AddLiquidityV3 } from './widgets/PoolWidget/AMMV3/AddLiquidityV3';
|
|
31
|
-
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
32
24
|
export { AMMV3PositionManage } from './widgets/PoolWidget/AMMV3/AMMV3PositionManage';
|
|
25
|
+
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
26
|
+
export { usePoolBalanceInfo } from './widgets/PoolWidget/hooks/usePoolBalanceInfo';
|
|
27
|
+
export { default as PoolCreate } from './widgets/PoolWidget/PoolCreate';
|
|
28
|
+
export { default as PoolDetail } from './widgets/PoolWidget/PoolDetail';
|
|
29
|
+
export { default as PoolList } from './widgets/PoolWidget/PoolList';
|
|
30
|
+
export { default as PoolModify } from './widgets/PoolWidget/PoolModify';
|
|
31
|
+
export { PoolOperate, default as PoolOperateDialog, } from './widgets/PoolWidget/PoolOperate';
|
|
32
|
+
export type { PoolOperateProps } from './widgets/PoolWidget/PoolOperate';
|
|
33
|
+
export { Ve33PoolDetail } from './widgets/ve33/Ve33PoolDetail';
|
|
34
|
+
export { Ve33PoolList } from './widgets/ve33/Ve33PoolList';
|
|
35
|
+
export { VotePoolList } from './widgets/ve33/VotePoolList';
|
|
36
|
+
export { default as Ve33LockOperate } from './widgets/ve33/Ve33LockOperate';
|
|
37
|
+
export { default as Ve33LockList } from './widgets/ve33/Ve33LockList';
|
|
38
|
+
export { default as Ve33IncentiveList } from './widgets/ve33/Ve33IncentiveList';
|
|
39
|
+
export { default as Ve33IncentiveDetail } from './widgets/ve33/Ve33IncentiveDetail';
|
|
40
|
+
export type SwapWidgetProps = WidgetProps & SwapProps;
|
|
41
|
+
export { EmptyList } from './components/List/EmptyList';
|
|
42
|
+
export { FailedList } from './components/List/FailedList';
|
|
33
43
|
export { TokenCard } from './components/Swap/components/TokenCard';
|
|
34
44
|
export { default as TokenLogo } from './components/TokenLogo';
|
|
35
|
-
export { FailedList } from './components/List/FailedList';
|
|
36
|
-
export { EmptyList } from './components/List/EmptyList';
|
|
37
45
|
export { getEtherscanPage } from './utils/address';
|
|
38
|
-
export {
|
|
46
|
+
export { formatPercentageNumber, formatReadableNumber, formatShortNumber, formatTokenAmountNumber, } from './utils/formatter';
|
|
39
47
|
export declare function SwapWidget(props: SwapWidgetProps): JSX.Element;
|
|
40
48
|
export declare function PoolWidget(props: SwapWidgetProps): JSX.Element;
|
|
49
|
+
export declare function Ve33PoolListWidget(props: WidgetProps & {
|
|
50
|
+
onClickPoolListRow: (id: string, chainId: ChainId) => void;
|
|
51
|
+
}): JSX.Element;
|
|
52
|
+
export declare function VotePoolListWidget(props: WidgetProps): JSX.Element;
|
|
53
|
+
export declare function Ve33PoolDetailWidget(props: WidgetProps & {
|
|
54
|
+
id: string;
|
|
55
|
+
chainId: ChainId;
|
|
56
|
+
onClickGoBack: () => void;
|
|
57
|
+
}): JSX.Element;
|
|
41
58
|
export declare function InitSwapWidget(props: SwapWidgetProps): void;
|
|
@@ -30,7 +30,7 @@ export declare function getIntegerNumber(v: number): number;
|
|
|
30
30
|
* format to short number, like: -0.12 -> 0, 0.0000123->0.000012, 123.234 -> 123.23, 1234.12 -> 1.23K, 1000000.123->1.00M
|
|
31
31
|
* @param n
|
|
32
32
|
*/
|
|
33
|
-
export declare function formatShortNumber(n?: BigNumber, showDecimals?: number): string;
|
|
33
|
+
export declare function formatShortNumber(n?: number | string | BigNumber | null, showDecimals?: number): string;
|
|
34
34
|
export declare function formatExponentialNotation(n?: BigNumber): string;
|
|
35
35
|
/**
|
|
36
36
|
* format to percentage number
|
|
@@ -43,7 +43,7 @@ roundingMode, }: {
|
|
|
43
43
|
showDecimals?: number;
|
|
44
44
|
roundingMode?: BigNumber.RoundingMode;
|
|
45
45
|
}): string;
|
|
46
|
-
export declare const formatApy: (amount: BigNumber, showDecimals?: number) => string;
|
|
46
|
+
export declare const formatApy: (amount: BigNumber | string | number | null, showDecimals?: number) => string;
|
|
47
47
|
export declare function formatUnknownTokenSymbol(token?: {
|
|
48
48
|
symbol: string;
|
|
49
49
|
name: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import JSBI from 'jsbi';
|
|
2
|
+
import { BigintIsh, Rounding } from './types';
|
|
3
|
+
export declare class Fraction {
|
|
4
|
+
readonly numerator: JSBI;
|
|
5
|
+
readonly denominator: JSBI;
|
|
6
|
+
constructor(numerator: BigintIsh, denominator?: BigintIsh);
|
|
7
|
+
private static tryParseFraction;
|
|
8
|
+
get quotient(): JSBI;
|
|
9
|
+
get remainder(): Fraction;
|
|
10
|
+
invert(): Fraction;
|
|
11
|
+
add(other: Fraction | BigintIsh): Fraction;
|
|
12
|
+
subtract(other: Fraction | BigintIsh): Fraction;
|
|
13
|
+
lessThan(other: Fraction | BigintIsh): boolean;
|
|
14
|
+
equalTo(other: Fraction | BigintIsh): boolean;
|
|
15
|
+
greaterThan(other: Fraction | BigintIsh): boolean;
|
|
16
|
+
multiply(other: Fraction | BigintIsh): Fraction;
|
|
17
|
+
divide(other: Fraction | BigintIsh): Fraction;
|
|
18
|
+
toSignificant(significantDigits: number, format?: object, rounding?: Rounding): string;
|
|
19
|
+
toFixed(decimalPlaces: number, format?: object, rounding?: Rounding): string;
|
|
20
|
+
/**
|
|
21
|
+
* Helper method for converting any super class back to a fraction
|
|
22
|
+
*/
|
|
23
|
+
get asFraction(): Fraction;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BigintIsh, Rounding } from './types';
|
|
2
|
+
import { Fraction } from './fraction';
|
|
3
|
+
export declare class Percent extends Fraction {
|
|
4
|
+
/**
|
|
5
|
+
* This boolean prevents a fraction from being interpreted as a Percent
|
|
6
|
+
*/
|
|
7
|
+
readonly isPercent: true;
|
|
8
|
+
add(other: Fraction | BigintIsh): Percent;
|
|
9
|
+
subtract(other: Fraction | BigintIsh): Percent;
|
|
10
|
+
multiply(other: Fraction | BigintIsh): Percent;
|
|
11
|
+
divide(other: Fraction | BigintIsh): Percent;
|
|
12
|
+
toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
|
|
13
|
+
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BigintIsh, Rounding } from './types';
|
|
2
|
+
import { Fraction } from './fraction';
|
|
3
|
+
import { TokenInfo } from '../../hooks/Token';
|
|
4
|
+
export declare class Price extends Fraction {
|
|
5
|
+
readonly baseCurrency: TokenInfo;
|
|
6
|
+
readonly quoteCurrency: TokenInfo;
|
|
7
|
+
readonly scalar: Fraction;
|
|
8
|
+
/**
|
|
9
|
+
* Construct a price, either with the base and quote currency amount, or the
|
|
10
|
+
* @param args
|
|
11
|
+
*/
|
|
12
|
+
constructor(...args: [TokenInfo, TokenInfo, BigintIsh, BigintIsh]);
|
|
13
|
+
/**
|
|
14
|
+
* Flip the price, switching the base and quote currency
|
|
15
|
+
*/
|
|
16
|
+
invert(): Price;
|
|
17
|
+
/**
|
|
18
|
+
* Multiply the price by another price, returning a new price. The other price must have the same base currency as this price's quote currency
|
|
19
|
+
* @param other the other price
|
|
20
|
+
*/
|
|
21
|
+
multiply(other: Price): Price;
|
|
22
|
+
/**
|
|
23
|
+
* Get the value scaled by decimals for formatting
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private get adjustedForDecimals();
|
|
27
|
+
toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
|
|
28
|
+
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
|
|
29
|
+
}
|
|
@@ -7,6 +7,8 @@ export type FetchLiquidityListLqList = ExcludeNone<ReturnType<Exclude<(typeof Po
|
|
|
7
7
|
export type FetchMyLiquidityListLqList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchMyLiquidityList)['__apiType'], undefined>>['liquidity_list']>['lqList'];
|
|
8
8
|
export type FetchMyCreateListLqList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchDashboardPairList)['__apiType'], undefined>>['dashboard_pairs_list']>['list'];
|
|
9
9
|
export type FetchPoolList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchPoolList)['__apiType'], undefined>>['pairs']>;
|
|
10
|
+
export type FetchVe33PoolList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchVe33PoolList)['__apiType'], undefined>>['ve33_getPoolList']>;
|
|
11
|
+
export type FetchVotePoolList = ExcludeNone<ReturnType<Exclude<(typeof PoolApi.graphql.fetchVotePoolList)['__apiType'], undefined>>['ve33_getVotePoolList']>;
|
|
10
12
|
export declare function convertLiquidityTokenToTokenInfo(token: {
|
|
11
13
|
id: string;
|
|
12
14
|
symbol: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
|
+
interface AddIncentiveProps {
|
|
5
|
+
data?: {
|
|
6
|
+
chainId: ChainId;
|
|
7
|
+
token: TokenInfo;
|
|
8
|
+
};
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
sx?: BoxProps['sx'];
|
|
11
|
+
}
|
|
12
|
+
export default function AddIncentiveDialog(props: AddIncentiveProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Dashboard(): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export interface Ve33IncentiveDetailProps {
|
|
3
|
+
id: string;
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
onClickGoBack: () => void;
|
|
6
|
+
}
|
|
7
|
+
export default function Ve33IncentiveDetail({ id, chainId, onClickGoBack, }: Ve33IncentiveDetailProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ve33PoolInfoI } from '../types';
|
|
2
|
+
export interface CardListProps {
|
|
3
|
+
poolList: Ve33PoolInfoI[];
|
|
4
|
+
onAdd: (pool: Ve33PoolInfoI) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const CardList: ({ poolList, ...props }: CardListProps) => JSX.Element;
|
|
7
|
+
export declare function CardItem({ item, onAdd, }: {
|
|
8
|
+
item?: Ve33PoolInfoI;
|
|
9
|
+
onAdd?: (pool: Ve33PoolInfoI) => void;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export interface TableListProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
poolList: Ve33PoolInfoI[];
|
|
6
|
+
hasMore?: boolean;
|
|
7
|
+
loadMore?: () => void;
|
|
8
|
+
loadMoreLoading?: boolean;
|
|
9
|
+
onAdd: (pool: Ve33PoolInfoI) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TableList: ({ chainId, poolList, hasMore, loadMore, loadMoreLoading, onAdd, }: TableListProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export default function Ve33IncentiveList({ aToken: aTokenProps, bToken: bTokenProps, onGoIncentiveDetail, }: {
|
|
4
|
+
aToken?: TokenInfo | null;
|
|
5
|
+
bToken?: TokenInfo | null;
|
|
6
|
+
onGoIncentiveDetail: (pool: Ve33PoolInfoI) => void;
|
|
7
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Lock, useFetchUserLocks } from './hooks/useFetchUserLocks';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface CardListProps {
|
|
4
|
+
inSelected: boolean;
|
|
5
|
+
selectedId: number[];
|
|
6
|
+
setSelectedId: React.Dispatch<React.SetStateAction<number[]>>;
|
|
7
|
+
fetchUserLocks: ReturnType<typeof useFetchUserLocks>;
|
|
8
|
+
onManage: (lock: Lock) => void;
|
|
9
|
+
onClaim: (lock: Lock) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const CardList: ({ inSelected, selectedId, setSelectedId, fetchUserLocks, onManage, onClaim, }: CardListProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Lock, useFetchUserLocks } from './hooks/useFetchUserLocks';
|
|
2
|
+
export interface TableListProps {
|
|
3
|
+
inSelected: boolean;
|
|
4
|
+
selectedId: number[];
|
|
5
|
+
setSelectedId: React.Dispatch<React.SetStateAction<number[]>>;
|
|
6
|
+
fetchUserLocks: ReturnType<typeof useFetchUserLocks>;
|
|
7
|
+
onManage: (lock: Lock) => void;
|
|
8
|
+
onClaim: (lock: Lock) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const TableList: ({ inSelected, selectedId, setSelectedId, fetchUserLocks, onManage, onClaim, }: TableListProps) => JSX.Element;
|