@dodoex/widgets 2.6.6 → 3.0.0-beta.0
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/b3f16b2626f03378.svg +10 -0
- package/dist/cjs/b3f16b2626f03378.svg +10 -0
- package/dist/cjs/helper-889c5e9a.cjs +1 -0
- package/dist/cjs/index-256d5f78.cjs +12 -0
- package/dist/cjs/index-4190bae6.cjs +58 -0
- package/dist/cjs/index-457c65f3.cjs +78 -0
- package/dist/cjs/index.cjs +1 -45
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/cjs/lottie-edc8e0b8.cjs +1 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +1 -2
- package/dist/cjs/src/components/Confirm.d.ts +15 -0
- package/dist/cjs/src/components/ConnectWallet/NeedConnectButton.d.ts +2 -1
- package/dist/cjs/src/components/GoBack.d.ts +6 -0
- package/dist/cjs/src/components/HowItWorks.d.ts +11 -0
- package/dist/cjs/src/components/RiskDialog.d.ts +7 -0
- package/dist/cjs/src/components/Swap/components/ConnectWallet/index.d.ts +1 -3
- package/dist/cjs/src/components/Swap/components/Dialog.d.ts +2 -1
- package/dist/cjs/src/components/Swap/components/TokenCard/BalanceText.d.ts +4 -2
- package/dist/cjs/src/components/Swap/components/TokenCard/NumberInput.d.ts +12 -9
- package/dist/cjs/src/components/Swap/components/TokenCard/PercentageSelectButtonGroup.d.ts +7 -0
- package/dist/cjs/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +4 -3
- package/dist/cjs/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +6 -1
- package/dist/cjs/src/components/Swap/components/TokenCard/index.d.ts +16 -3
- package/dist/cjs/src/components/Swap/index.d.ts +1 -3
- package/dist/cjs/src/components/Token/TokenItem.d.ts +9 -0
- package/dist/cjs/src/components/TokenLogo.d.ts +3 -1
- package/dist/cjs/src/components/TokenLogoPair.d.ts +3 -2
- package/dist/cjs/src/components/TokenPicker/TokenItem.d.ts +3 -1
- package/dist/cjs/src/components/TokenPicker/index.d.ts +8 -3
- package/dist/cjs/src/components/TokenStatusButton.d.ts +7 -0
- package/dist/cjs/src/components/Widget/index.d.ts +3 -1
- package/dist/cjs/src/components/WidgetConfirm.d.ts +15 -0
- package/dist/cjs/src/components/WidgetContainer.d.ts +3 -0
- package/dist/cjs/src/components/WidgetDialog.d.ts +15 -0
- package/dist/cjs/src/components/chart/components/BaseButton.d.ts +5 -0
- package/dist/cjs/src/components/chart/components/Display.d.ts +9 -0
- package/dist/cjs/src/components/chart/components/Input.d.ts +7 -0
- package/dist/cjs/src/components/chart/components/NumberInput.d.ts +6 -0
- package/dist/cjs/src/components/chart/components/TogglePriceIcon.d.ts +8 -0
- package/dist/cjs/src/components/chart/components/TokenLogo.d.ts +5 -0
- package/dist/cjs/src/components/chart/depth-chart/DepthChartKonva.d.ts +30 -0
- package/dist/cjs/src/components/chart/depth-chart/__tests__/utils.test.d.ts +1 -0
- package/dist/cjs/src/components/chart/depth-chart/helper.d.ts +125 -0
- package/dist/cjs/src/components/chart/depth-chart/index.d.ts +18 -0
- package/dist/cjs/src/components/chart/depth-chart/index.styled.d.ts +29 -0
- package/dist/cjs/src/components/chart/depth-chart/useDepthLinePoints.d.ts +21 -0
- package/dist/cjs/src/components/chart/depth-chart/useGridLinePoints.d.ts +9 -0
- package/dist/cjs/src/components/chart/depth-chart/useHorizontalLabelPoints.d.ts +15 -0
- package/dist/cjs/src/components/chart/depth-chart/utils.d.ts +19 -0
- package/dist/cjs/src/components/chart/depth-chart-v2/index.d.ts +10 -0
- package/dist/cjs/src/components/chart/depth-chart-v2/index.styled.d.ts +15 -0
- package/dist/cjs/src/components/chart/hooks/usePreventWheel.d.ts +9 -0
- package/dist/cjs/src/components/chart/i18n.d.ts +1 -0
- package/dist/cjs/src/components/chart/liquidity-chart/LiquidityChartKonva.d.ts +28 -0
- package/dist/cjs/src/components/chart/liquidity-chart/__tests__/helper.test.d.ts +1 -0
- package/dist/cjs/src/components/chart/liquidity-chart/helper.d.ts +47 -0
- package/dist/cjs/src/components/chart/liquidity-chart/index.d.ts +17 -0
- package/dist/cjs/src/components/chart/liquidity-chart/index.styled.d.ts +9 -0
- package/dist/cjs/src/components/chart/liquidity-chart/useGridLine.d.ts +8 -0
- package/dist/cjs/src/components/chart/liquidity-chart/useHorizontalLabel.d.ts +10 -0
- package/dist/cjs/src/components/chart/liquidity-chart/useLiquidityLine.d.ts +18 -0
- package/dist/cjs/src/components/chart/liquidity-chart/useMiddleLine.d.ts +6 -0
- package/dist/cjs/src/components/chart/liquidity-chart/usePoints.d.ts +39 -0
- package/dist/cjs/src/components/chart/utils.d.ts +3 -0
- package/dist/cjs/src/constants/api.d.ts +5 -0
- package/dist/cjs/src/constants/chainList.d.ts +1 -0
- package/dist/cjs/src/constants/chains.d.ts +24 -31
- package/dist/cjs/src/constants/localstorage.d.ts +2 -0
- package/dist/cjs/src/constants/pool.d.ts +5 -0
- package/dist/cjs/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +2 -1
- package/dist/cjs/src/hooks/Submission/types.d.ts +31 -2
- package/dist/cjs/src/hooks/Submission/useExecution.d.ts +3 -2
- package/dist/cjs/src/hooks/Swap/useFetchFiatPrice.d.ts +3 -3
- package/dist/cjs/src/hooks/Token/useTokenList.d.ts +9 -3
- package/dist/cjs/src/hooks/Token/useTokenListDefaultToken.d.ts +30 -0
- package/dist/cjs/src/hooks/Token/useTokenListFetchBalance.d.ts +5 -2
- package/dist/cjs/src/hooks/Token/useTokenStatus.d.ts +4 -1
- package/dist/cjs/src/hooks/contract/index.d.ts +0 -2
- package/dist/cjs/src/hooks/contract/useFetchETHBalance.d.ts +21 -1
- package/dist/cjs/src/hooks/contract/useFetchTokens.d.ts +4 -10
- package/dist/cjs/src/hooks/contract/wallet.d.ts +1 -1
- package/dist/cjs/src/index.d.ts +6 -0
- package/dist/cjs/src/providers/GlobalConfigContext.d.ts +14 -0
- package/dist/cjs/src/router/index.d.ts +2 -0
- package/dist/cjs/src/router/types.d.ts +17 -4
- package/dist/cjs/src/store/actions/token.d.ts +1 -8
- package/dist/cjs/src/store/actions/wallet.d.ts +2 -0
- package/dist/cjs/src/store/index.d.ts +7 -1
- package/dist/cjs/src/store/reducers/token.d.ts +0 -7
- package/dist/cjs/src/store/reducers/wallet.d.ts +4 -0
- package/dist/cjs/src/store/selectors/token.d.ts +0 -10
- package/dist/cjs/src/store/selectors/wallet.d.ts +5 -2
- package/dist/cjs/src/utils/address.d.ts +2 -2
- package/dist/cjs/src/utils/bytes.d.ts +3 -0
- package/dist/cjs/src/utils/formatter.d.ts +24 -1
- package/dist/cjs/src/utils/token.d.ts +21 -0
- package/dist/cjs/src/widgets/MiningWidget/LpTokenMiningOperate/index.d.ts +7 -0
- package/dist/cjs/src/widgets/MiningWidget/OperateArea/AssociateMine.d.ts +20 -0
- package/dist/cjs/src/widgets/MiningWidget/OperateArea/ClaimButton.d.ts +5 -0
- package/dist/cjs/src/widgets/MiningWidget/OperateArea/GetLpLink.d.ts +5 -0
- package/dist/cjs/src/widgets/MiningWidget/OperateArea/RewardListCard.d.ts +8 -0
- package/dist/cjs/src/widgets/MiningWidget/OperateArea/StakeButton.d.ts +9 -0
- package/dist/cjs/src/widgets/MiningWidget/OperateArea/UnstakeButton.d.ts +8 -0
- package/dist/cjs/src/widgets/MiningWidget/OperateArea/index.d.ts +13 -0
- package/dist/cjs/src/widgets/MiningWidget/helper.d.ts +2 -0
- package/dist/cjs/src/widgets/MiningWidget/hooks/useClaimMiningSubmit.d.ts +4 -0
- package/dist/cjs/src/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +17 -0
- package/dist/cjs/src/widgets/MiningWidget/hooks/useStakeMiningSubmit.d.ts +5 -0
- package/dist/cjs/src/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +13 -0
- package/dist/cjs/src/widgets/MiningWidget/hooks/useUnstakeMiningSubmit.d.ts +5 -0
- package/dist/cjs/src/widgets/MiningWidget/types.d.ts +58 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.d.ts +10 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/DepthAndLiquidityChart.d.ts +11 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/DepthChartWrapper.d.ts +11 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/EmptyChart.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/FixedInitPriceConfirm.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +13 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/RadioButton.d.ts +12 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/RadioButtonIcon.d.ts +4 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/RadioButtonTag.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/SectionTitle.d.ts +7 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/SelectAndInput.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/StepTitle.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/contract/useCreatePoolSubmit.d.ts +14 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +26 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useFeeRateList.d.ts +13 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useSlippageCoefficientList.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useValidation.d.ts +4 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/index.d.ts +2 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/FeeRateSetting.d.ts +7 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +12 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/SlippageCoefficientSetting.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/reducer.d.ts +78 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/types.d.ts +35 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolCreate/utils.d.ts +18 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/BaseQuotePie.d.ts +24 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/ChartInfo.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/LiquidityProvidersTable.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/ParametersTable.d.ts +15 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/SwapsTable.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/StatBarChart.d.ts +10 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/TitleInfo.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +159 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +290 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +166 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +245 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolDetail/index.d.ts +2 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +12 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/MyCreated.d.ts +11 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +11 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/AddingOrRemovingBtn.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/FilterAddressTags.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/LoadingCard.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/PoolApyTooltip.d.ts +18 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/TokenAndPoolFilter.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/components/TokenListPoolItem.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +48 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +15 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolList/index.d.ts +2 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolModify/SectionTitle.d.ts +4 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolModify/index.d.ts +2 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolModify/operate-widgets/BottomButtonGroup.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolModify/operate-widgets/FeeRateSetting.d.ts +7 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +3 -2
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -1
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/ComparePrice.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/LiquidityInfo.d.ts +10 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/OperateBtn.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/SliderPercentageCard.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +18 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/TokenList.d.ts +12 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useCheckToken.d.ts +13 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useComparePrice.d.ts +19 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +4 -2
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePercentageRemove.d.ts +26 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +1 -1
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +3 -1
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +33 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/index.d.ts +9 -3
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/types.d.ts +0 -2
- package/dist/cjs/src/widgets/PoolWidget/hooks/contract/getModifyDPPPoolParams.d.ts +86 -0
- package/dist/cjs/src/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +22 -0
- package/dist/cjs/src/widgets/PoolWidget/hooks/contract/useOperateLiquidity.d.ts +36 -0
- package/dist/cjs/src/widgets/PoolWidget/hooks/contract/useWithdrawInfo.d.ts +33 -0
- package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +8 -3
- package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolDetail.d.ts +341 -0
- package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolTypeTag.d.ts +16 -0
- package/dist/cjs/src/widgets/PoolWidget/utils.d.ts +4 -7
- package/dist/helper-7cc29594.js +1 -0
- package/dist/index-ae19eed4.js +12 -0
- package/dist/index-d9d9a2cd.js +78 -0
- package/dist/index-db2c9b8f.js +58 -0
- package/dist/index.js +1 -45
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/lottie-f76894b7.js +1 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +1 -2
- package/dist/src/components/Confirm.d.ts +15 -0
- package/dist/src/components/ConnectWallet/NeedConnectButton.d.ts +2 -1
- package/dist/src/components/GoBack.d.ts +6 -0
- package/dist/src/components/HowItWorks.d.ts +11 -0
- package/dist/src/components/RiskDialog.d.ts +7 -0
- package/dist/src/components/Swap/components/ConnectWallet/index.d.ts +1 -3
- package/dist/src/components/Swap/components/Dialog.d.ts +2 -1
- package/dist/src/components/Swap/components/TokenCard/BalanceText.d.ts +4 -2
- package/dist/src/components/Swap/components/TokenCard/NumberInput.d.ts +12 -9
- package/dist/src/components/Swap/components/TokenCard/PercentageSelectButtonGroup.d.ts +7 -0
- package/dist/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +4 -3
- package/dist/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +6 -1
- package/dist/src/components/Swap/components/TokenCard/index.d.ts +16 -3
- package/dist/src/components/Swap/index.d.ts +1 -3
- package/dist/src/components/Token/TokenItem.d.ts +9 -0
- package/dist/src/components/TokenLogo.d.ts +3 -1
- package/dist/src/components/TokenLogoPair.d.ts +3 -2
- package/dist/src/components/TokenPicker/TokenItem.d.ts +3 -1
- package/dist/src/components/TokenPicker/index.d.ts +8 -3
- package/dist/src/components/TokenStatusButton.d.ts +7 -0
- package/dist/src/components/Widget/index.d.ts +3 -1
- package/dist/src/components/WidgetConfirm.d.ts +15 -0
- package/dist/src/components/WidgetContainer.d.ts +3 -0
- package/dist/src/components/WidgetDialog.d.ts +15 -0
- package/dist/src/components/chart/components/BaseButton.d.ts +5 -0
- package/dist/src/components/chart/components/Display.d.ts +9 -0
- package/dist/src/components/chart/components/Input.d.ts +7 -0
- package/dist/src/components/chart/components/NumberInput.d.ts +6 -0
- package/dist/src/components/chart/components/TogglePriceIcon.d.ts +8 -0
- package/dist/src/components/chart/components/TokenLogo.d.ts +5 -0
- package/dist/src/components/chart/depth-chart/DepthChartKonva.d.ts +30 -0
- package/dist/src/components/chart/depth-chart/__tests__/utils.test.d.ts +1 -0
- package/dist/src/components/chart/depth-chart/helper.d.ts +125 -0
- package/dist/src/components/chart/depth-chart/index.d.ts +18 -0
- package/dist/src/components/chart/depth-chart/index.styled.d.ts +29 -0
- package/dist/src/components/chart/depth-chart/useDepthLinePoints.d.ts +21 -0
- package/dist/src/components/chart/depth-chart/useGridLinePoints.d.ts +9 -0
- package/dist/src/components/chart/depth-chart/useHorizontalLabelPoints.d.ts +15 -0
- package/dist/src/components/chart/depth-chart/utils.d.ts +19 -0
- package/dist/src/components/chart/depth-chart-v2/index.d.ts +10 -0
- package/dist/src/components/chart/depth-chart-v2/index.styled.d.ts +15 -0
- package/dist/src/components/chart/hooks/usePreventWheel.d.ts +9 -0
- package/dist/src/components/chart/i18n.d.ts +1 -0
- package/dist/src/components/chart/liquidity-chart/LiquidityChartKonva.d.ts +28 -0
- package/dist/src/components/chart/liquidity-chart/__tests__/helper.test.d.ts +1 -0
- package/dist/src/components/chart/liquidity-chart/helper.d.ts +47 -0
- package/dist/src/components/chart/liquidity-chart/index.d.ts +17 -0
- package/dist/src/components/chart/liquidity-chart/index.styled.d.ts +9 -0
- package/dist/src/components/chart/liquidity-chart/useGridLine.d.ts +8 -0
- package/dist/src/components/chart/liquidity-chart/useHorizontalLabel.d.ts +10 -0
- package/dist/src/components/chart/liquidity-chart/useLiquidityLine.d.ts +18 -0
- package/dist/src/components/chart/liquidity-chart/useMiddleLine.d.ts +6 -0
- package/dist/src/components/chart/liquidity-chart/usePoints.d.ts +39 -0
- package/dist/src/components/chart/utils.d.ts +3 -0
- package/dist/src/constants/api.d.ts +5 -0
- package/dist/src/constants/chainList.d.ts +1 -0
- package/dist/src/constants/chains.d.ts +24 -31
- package/dist/src/constants/localstorage.d.ts +2 -0
- package/dist/src/constants/pool.d.ts +5 -0
- package/dist/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +2 -1
- package/dist/src/hooks/Submission/types.d.ts +31 -2
- package/dist/src/hooks/Submission/useExecution.d.ts +3 -2
- package/dist/src/hooks/Swap/useFetchFiatPrice.d.ts +3 -3
- package/dist/src/hooks/Token/useTokenList.d.ts +9 -3
- package/dist/src/hooks/Token/useTokenListDefaultToken.d.ts +30 -0
- package/dist/src/hooks/Token/useTokenListFetchBalance.d.ts +5 -2
- package/dist/src/hooks/Token/useTokenStatus.d.ts +4 -1
- package/dist/src/hooks/contract/index.d.ts +0 -2
- package/dist/src/hooks/contract/useFetchETHBalance.d.ts +21 -1
- package/dist/src/hooks/contract/useFetchTokens.d.ts +4 -10
- package/dist/src/hooks/contract/wallet.d.ts +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/providers/GlobalConfigContext.d.ts +14 -0
- package/dist/src/router/index.d.ts +2 -0
- package/dist/src/router/types.d.ts +17 -4
- package/dist/src/store/actions/token.d.ts +1 -8
- package/dist/src/store/actions/wallet.d.ts +2 -0
- package/dist/src/store/index.d.ts +7 -1
- package/dist/src/store/reducers/token.d.ts +0 -7
- package/dist/src/store/reducers/wallet.d.ts +4 -0
- package/dist/src/store/selectors/token.d.ts +0 -10
- package/dist/src/store/selectors/wallet.d.ts +5 -2
- package/dist/src/utils/address.d.ts +2 -2
- package/dist/src/utils/bytes.d.ts +3 -0
- package/dist/src/utils/formatter.d.ts +24 -1
- package/dist/src/utils/token.d.ts +21 -0
- package/dist/src/widgets/MiningWidget/LpTokenMiningOperate/index.d.ts +7 -0
- package/dist/src/widgets/MiningWidget/OperateArea/AssociateMine.d.ts +20 -0
- package/dist/src/widgets/MiningWidget/OperateArea/ClaimButton.d.ts +5 -0
- package/dist/src/widgets/MiningWidget/OperateArea/GetLpLink.d.ts +5 -0
- package/dist/src/widgets/MiningWidget/OperateArea/RewardListCard.d.ts +8 -0
- package/dist/src/widgets/MiningWidget/OperateArea/StakeButton.d.ts +9 -0
- package/dist/src/widgets/MiningWidget/OperateArea/UnstakeButton.d.ts +8 -0
- package/dist/src/widgets/MiningWidget/OperateArea/index.d.ts +13 -0
- package/dist/src/widgets/MiningWidget/helper.d.ts +2 -0
- package/dist/src/widgets/MiningWidget/hooks/useClaimMiningSubmit.d.ts +4 -0
- package/dist/src/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +17 -0
- package/dist/src/widgets/MiningWidget/hooks/useStakeMiningSubmit.d.ts +5 -0
- package/dist/src/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +13 -0
- package/dist/src/widgets/MiningWidget/hooks/useUnstakeMiningSubmit.d.ts +5 -0
- package/dist/src/widgets/MiningWidget/types.d.ts +58 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.d.ts +10 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/DepthAndLiquidityChart.d.ts +11 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/DepthChartWrapper.d.ts +11 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/EmptyChart.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/FixedInitPriceConfirm.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +13 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/RadioButton.d.ts +12 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/RadioButtonIcon.d.ts +4 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/RadioButtonTag.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/SectionTitle.d.ts +7 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/SelectAndInput.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/StepTitle.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/hooks/contract/useCreatePoolSubmit.d.ts +14 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +26 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useFeeRateList.d.ts +13 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useSlippageCoefficientList.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useValidation.d.ts +4 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/index.d.ts +2 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/FeeRateSetting.d.ts +7 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +12 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/SlippageCoefficientSetting.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/reducer.d.ts +78 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/types.d.ts +35 -0
- package/dist/src/widgets/PoolWidget/PoolCreate/utils.d.ts +18 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/BaseQuotePie.d.ts +24 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/ChartInfo.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/LiquidityProvidersTable.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/ParametersTable.d.ts +15 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/SwapsTable.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/StatBarChart.d.ts +10 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/TitleInfo.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +159 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +290 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +166 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +245 -0
- package/dist/src/widgets/PoolWidget/PoolDetail/index.d.ts +2 -0
- package/dist/src/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +12 -0
- package/dist/src/widgets/PoolWidget/PoolList/MyCreated.d.ts +11 -0
- package/dist/src/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +11 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/AddingOrRemovingBtn.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/FilterAddressTags.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/LoadingCard.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/PoolApyTooltip.d.ts +18 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/TokenAndPoolFilter.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/PoolList/components/TokenListPoolItem.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +48 -0
- package/dist/src/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +15 -0
- package/dist/src/widgets/PoolWidget/PoolList/index.d.ts +2 -0
- package/dist/src/widgets/PoolWidget/PoolModify/SectionTitle.d.ts +4 -0
- package/dist/src/widgets/PoolWidget/PoolModify/index.d.ts +2 -0
- package/dist/src/widgets/PoolWidget/PoolModify/operate-widgets/BottomButtonGroup.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolModify/operate-widgets/FeeRateSetting.d.ts +7 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +3 -2
- package/dist/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -1
- package/dist/src/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/components/ComparePrice.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/components/LiquidityInfo.d.ts +10 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/components/OperateBtn.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/components/SliderPercentageCard.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +18 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/components/TokenList.d.ts +12 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useCheckToken.d.ts +13 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useComparePrice.d.ts +19 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +4 -2
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePercentageRemove.d.ts +26 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +1 -1
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +3 -1
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +33 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/index.d.ts +9 -3
- package/dist/src/widgets/PoolWidget/PoolOperate/types.d.ts +0 -2
- package/dist/src/widgets/PoolWidget/hooks/contract/getModifyDPPPoolParams.d.ts +86 -0
- package/dist/src/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +22 -0
- package/dist/src/widgets/PoolWidget/hooks/contract/useOperateLiquidity.d.ts +36 -0
- package/dist/src/widgets/PoolWidget/hooks/contract/useWithdrawInfo.d.ts +33 -0
- package/dist/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +8 -3
- package/dist/src/widgets/PoolWidget/hooks/usePoolDetail.d.ts +341 -0
- package/dist/src/widgets/PoolWidget/hooks/usePoolTypeTag.d.ts +16 -0
- package/dist/src/widgets/PoolWidget/utils.d.ts +4 -7
- package/package.json +12 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChainId } from '../../../constants/chains';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
+
export default function AddLiquidityList({ scrollParentRef, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
|
+
scrollParentRef: React.MutableRefObject<HTMLDivElement | undefined>;
|
|
6
|
+
account?: string;
|
|
7
|
+
filterChainIds?: ChainId[];
|
|
8
|
+
activeChainId: ChainId | undefined;
|
|
9
|
+
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
10
|
+
operatePool: Partial<PoolOperateProps> | null;
|
|
11
|
+
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
12
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChainId } from '../../../constants/chains';
|
|
3
|
+
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
+
export default function MyCreated({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
|
+
account?: string;
|
|
6
|
+
filterChainIds?: ChainId[];
|
|
7
|
+
activeChainId: ChainId | undefined;
|
|
8
|
+
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
9
|
+
operatePool: Partial<PoolOperateProps> | null;
|
|
10
|
+
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChainId } from '../../../constants/chains';
|
|
3
|
+
import { PoolOperateProps } from '../PoolOperate';
|
|
4
|
+
export default function MyLiquidity({ account, filterChainIds, activeChainId, handleChangeActiveChainId, operatePool, setOperatePool, }: {
|
|
5
|
+
account?: string;
|
|
6
|
+
filterChainIds?: ChainId[];
|
|
7
|
+
activeChainId: ChainId | undefined;
|
|
8
|
+
handleChangeActiveChainId: (chainId: number | undefined) => void;
|
|
9
|
+
operatePool: Partial<PoolOperateProps> | null;
|
|
10
|
+
setOperatePool: (operate: Partial<PoolOperateProps> | null) => void;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { FetchLiquidityListLqList } from '../../utils';
|
|
4
|
+
export default function FilterAddressTags({ lqList, onDeleteTag, sx, }: {
|
|
5
|
+
lqList: FetchLiquidityListLqList;
|
|
6
|
+
onDeleteTag: () => void;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function FilterTokenTags({ tags, onDeleteTag, sx, }: {
|
|
5
|
+
tags: TokenInfo[];
|
|
6
|
+
onDeleteTag: (tag: TokenInfo) => void;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function PoolApyTooltip({ chainId, baseToken, quoteToken, apy, hasQuote, hasMining, sx, children, }: {
|
|
5
|
+
chainId: number;
|
|
6
|
+
baseToken: TokenInfo | undefined;
|
|
7
|
+
quoteToken: TokenInfo | undefined;
|
|
8
|
+
apy: {
|
|
9
|
+
transactionBaseApy?: string | null;
|
|
10
|
+
transactionQuoteApy?: string | null;
|
|
11
|
+
miningBaseApy?: string | null;
|
|
12
|
+
miningQuoteApy?: string | null;
|
|
13
|
+
} | undefined | null;
|
|
14
|
+
hasQuote: boolean;
|
|
15
|
+
hasMining: boolean;
|
|
16
|
+
sx?: BoxProps['sx'];
|
|
17
|
+
children?: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
18
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function TokenAndPoolFilter({ sx, value, onChange, searchAddress, }: {
|
|
5
|
+
sx?: BoxProps['sx'];
|
|
6
|
+
value: Array<TokenInfo>;
|
|
7
|
+
onChange: (v: Array<TokenInfo>) => void;
|
|
8
|
+
searchAddress: (address: string, onClose: () => void) => Promise<JSX.Element | null>;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
import { FetchLiquidityListLqList } from '../../utils';
|
|
3
|
+
export declare function usePoolListFilterTokenAndPool(): {
|
|
4
|
+
filterTokens: TokenInfo[];
|
|
5
|
+
filterASymbol: string;
|
|
6
|
+
filterBSymbol: string;
|
|
7
|
+
filterAddressLqList: ({
|
|
8
|
+
id?: string | null | undefined;
|
|
9
|
+
pair?: {
|
|
10
|
+
id: string;
|
|
11
|
+
chainId: number;
|
|
12
|
+
type: string;
|
|
13
|
+
lpFeeRate: any;
|
|
14
|
+
creator: any;
|
|
15
|
+
tvl?: any;
|
|
16
|
+
miningAddress?: (string | null)[] | null | undefined;
|
|
17
|
+
baseLpToken?: {
|
|
18
|
+
id: string;
|
|
19
|
+
} | null | undefined;
|
|
20
|
+
quoteLpToken?: {
|
|
21
|
+
id: string;
|
|
22
|
+
} | null | undefined;
|
|
23
|
+
baseToken: {
|
|
24
|
+
id: string;
|
|
25
|
+
symbol: string;
|
|
26
|
+
name: string;
|
|
27
|
+
decimals: any;
|
|
28
|
+
logoImg?: string | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
quoteToken: {
|
|
31
|
+
id: string;
|
|
32
|
+
symbol: string;
|
|
33
|
+
name: string;
|
|
34
|
+
decimals: any;
|
|
35
|
+
logoImg?: string | null | undefined;
|
|
36
|
+
};
|
|
37
|
+
apy?: {
|
|
38
|
+
miningBaseApy?: any;
|
|
39
|
+
miningQuoteApy?: any;
|
|
40
|
+
transactionBaseApy?: any;
|
|
41
|
+
transactionQuoteApy?: any;
|
|
42
|
+
} | null | undefined;
|
|
43
|
+
} | null | undefined;
|
|
44
|
+
} | null)[] | null | undefined;
|
|
45
|
+
handleDeleteToken: (token: TokenInfo) => void;
|
|
46
|
+
handleChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
|
|
47
|
+
handleChangeFilterAddress: (lqList: FetchLiquidityListLqList) => void;
|
|
48
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum PoolTab {
|
|
2
|
+
addLiquidity = "add-liquidity",
|
|
3
|
+
myLiquidity = "my-liquidity",
|
|
4
|
+
myCreated = "my-created"
|
|
5
|
+
}
|
|
6
|
+
export declare function usePoolListTabs({ account }: {
|
|
7
|
+
account?: string;
|
|
8
|
+
}): {
|
|
9
|
+
poolTab: PoolTab;
|
|
10
|
+
tabs: {
|
|
11
|
+
key: PoolTab;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
14
|
+
handleChangePoolTab: (poolTab: PoolTab) => void;
|
|
15
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { usePoolDetail } from '../../hooks/usePoolDetail';
|
|
3
|
+
import { StateProps } from '../../PoolCreate/reducer';
|
|
4
|
+
export declare function BottomButtonGroup({ state, pool, loading, }: {
|
|
5
|
+
state: StateProps;
|
|
6
|
+
pool?: ReturnType<typeof usePoolDetail>['poolDetail'];
|
|
7
|
+
loading: boolean;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Actions, StateProps } from '../../PoolCreate/reducer';
|
|
3
|
+
export declare function FeeRateSetting({ dispatch, feeRate, isCustomized, }: {
|
|
4
|
+
dispatch: React.Dispatch<Actions>;
|
|
5
|
+
feeRate: StateProps['feeRate'];
|
|
6
|
+
isCustomized: StateProps['isFeeRateCustomized'];
|
|
7
|
+
}): JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { OperatePool } from './types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { usePoolBalanceInfo } from '../hooks/usePoolBalanceInfo';
|
|
4
|
+
export declare function AddPoolOperate({ submittedBack: submittedBackProps, onlyShowSide, pool, balanceInfo, }: {
|
|
5
5
|
submittedBack?: () => void;
|
|
6
6
|
onlyShowSide?: 'base' | 'quote';
|
|
7
7
|
pool?: OperatePool;
|
|
8
|
+
balanceInfo: ReturnType<typeof usePoolBalanceInfo>;
|
|
8
9
|
}): JSX.Element;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { OperateTab } from './hooks/usePoolOperateTabs';
|
|
2
3
|
import { OperatePool } from './types';
|
|
3
4
|
export interface PoolOperateInnerProps {
|
|
4
5
|
pool: OperatePool;
|
|
6
|
+
operate?: OperateTab;
|
|
7
|
+
errorRefetch?: () => void;
|
|
5
8
|
}
|
|
6
|
-
export default function PoolOperateInner({ pool }: PoolOperateInnerProps): JSX.Element;
|
|
9
|
+
export default function PoolOperateInner({ pool, operate, errorRefetch, }: PoolOperateInnerProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { OperatePool } from './types';
|
|
3
|
+
import { usePoolBalanceInfo } from '../hooks/usePoolBalanceInfo';
|
|
4
|
+
export declare function RemovePoolOperate({ submittedBack: submittedBackProps, onlyShowSide, pool, balanceInfo, }: {
|
|
5
|
+
submittedBack?: () => void;
|
|
6
|
+
onlyShowSide?: 'base' | 'quote';
|
|
7
|
+
pool?: OperatePool;
|
|
8
|
+
balanceInfo: ReturnType<typeof usePoolBalanceInfo>;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export default function ComparePrice({ lqAndDodoCompareText, baseToken, quoteToken, midPrice, }: {
|
|
5
|
+
lqAndDodoCompareText: string;
|
|
6
|
+
baseToken?: TokenInfo;
|
|
7
|
+
quoteToken?: TokenInfo;
|
|
8
|
+
midPrice?: BigNumber;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { usePoolBalanceInfo } from '../../hooks/usePoolBalanceInfo';
|
|
3
|
+
import { OperatePool } from '../types';
|
|
4
|
+
export interface LiquidityInfoProps {
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
hidePoolInfo?: boolean;
|
|
7
|
+
pool: OperatePool;
|
|
8
|
+
balanceInfo: ReturnType<typeof usePoolBalanceInfo>;
|
|
9
|
+
}
|
|
10
|
+
export default function LiquidityInfo({ loading: loadingProps, hidePoolInfo, pool, balanceInfo, }: LiquidityInfoProps): JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { useTokenStatus } from '../../../../hooks/Token/useTokenStatus';
|
|
3
|
+
export default function OperateBtn({ baseTokenStatus, quoteTokenStatus, children, }: React.PropsWithChildren<{
|
|
4
|
+
baseTokenStatus: ReturnType<typeof useTokenStatus>;
|
|
5
|
+
quoteTokenStatus: ReturnType<typeof useTokenStatus>;
|
|
6
|
+
}>): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { OperatePool } from '../types';
|
|
4
|
+
export default function Ratio({ pool, addPortion, midPrice, }: {
|
|
5
|
+
pool?: OperatePool;
|
|
6
|
+
addPortion?: BigNumber;
|
|
7
|
+
midPrice?: BigNumber;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
export declare function SliderPercentageCard({ disabled, value, onChange, sx, }: {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
value: number;
|
|
6
|
+
onChange: (val: number) => void;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AUTO_SWAP_SLIPPAGE_PROTECTION } from '../../../../constants/pool';
|
|
3
|
+
interface Props {
|
|
4
|
+
value: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION;
|
|
5
|
+
onChange: (val: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useSlipper: ({ address }: {
|
|
8
|
+
address?: string | undefined;
|
|
9
|
+
}) => {
|
|
10
|
+
slipper: number | "auto";
|
|
11
|
+
setSlipper: import("react").Dispatch<import("react").SetStateAction<number | "auto">>;
|
|
12
|
+
slipperValue: number;
|
|
13
|
+
resetSlipper: () => void;
|
|
14
|
+
};
|
|
15
|
+
export default function SlippageSetting({ disabled, ...attrs }: Props & {
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}): JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { usePoolBalanceInfo } from '../../hooks/usePoolBalanceInfo';
|
|
3
|
+
import { CheckTokenType } from '../hooks/useCheckToken';
|
|
4
|
+
import { OperatePool } from '../types';
|
|
5
|
+
export default function TokenList({ pool, checkTokenType, setCheckToken, balanceInfo, baseTokenBalanceUpdateLoading, quoteBalanceUpdateLoading, }: {
|
|
6
|
+
pool?: OperatePool;
|
|
7
|
+
checkTokenType: CheckTokenType;
|
|
8
|
+
setCheckToken: (checkTokenType: CheckTokenType) => void;
|
|
9
|
+
balanceInfo?: ReturnType<typeof usePoolBalanceInfo>;
|
|
10
|
+
baseTokenBalanceUpdateLoading: boolean;
|
|
11
|
+
quoteBalanceUpdateLoading: boolean;
|
|
12
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import { OperatePool } from '../types';
|
|
4
|
+
export declare enum CheckTokenType {
|
|
5
|
+
base = 1,
|
|
6
|
+
quote = 2
|
|
7
|
+
}
|
|
8
|
+
export declare const useCheckToken: (pool?: OperatePool) => {
|
|
9
|
+
isBase: boolean | undefined;
|
|
10
|
+
checkToken: TokenInfo | undefined;
|
|
11
|
+
checkTokenType: CheckTokenType;
|
|
12
|
+
setCheckToken: React.Dispatch<React.SetStateAction<CheckTokenType>>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export declare function useDODOPrice({ baseToken, quoteToken, }: {
|
|
4
|
+
baseToken?: TokenInfo;
|
|
5
|
+
quoteToken?: TokenInfo;
|
|
6
|
+
}): {
|
|
7
|
+
comparePrice: BigNumber | null;
|
|
8
|
+
comparePriceText: string;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const lqAndDodoCompareSmallNum = 0.01;
|
|
12
|
+
export declare const lqAndDodoCompareWarningNum = 0.03;
|
|
13
|
+
export declare const useComparePrice: (baseToken?: TokenInfo, quoteToken?: TokenInfo, midPrice?: BigNumber) => {
|
|
14
|
+
lqAndDodoCompare: number;
|
|
15
|
+
lqAndDodoCompareText: string;
|
|
16
|
+
midPrice: BigNumber | undefined;
|
|
17
|
+
isShowCompare: boolean;
|
|
18
|
+
isWarnCompare: boolean;
|
|
19
|
+
};
|
|
@@ -2,8 +2,8 @@ import BigNumber from 'bignumber.js';
|
|
|
2
2
|
import { OperatePool } from '../types';
|
|
3
3
|
export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuoteAmount, }: {
|
|
4
4
|
pool: OperatePool;
|
|
5
|
-
maxBaseAmount?: BigNumber;
|
|
6
|
-
maxQuoteAmount?: BigNumber;
|
|
5
|
+
maxBaseAmount?: BigNumber | null;
|
|
6
|
+
maxQuoteAmount?: BigNumber | null;
|
|
7
7
|
}): {
|
|
8
8
|
baseAmount: string;
|
|
9
9
|
quoteAmount: string;
|
|
@@ -14,6 +14,7 @@ export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuot
|
|
|
14
14
|
amountLoading?: undefined;
|
|
15
15
|
amountError?: undefined;
|
|
16
16
|
amountRefetch?: undefined;
|
|
17
|
+
amountCheckedDisabled?: undefined;
|
|
17
18
|
midPrice?: undefined;
|
|
18
19
|
} | {
|
|
19
20
|
baseAmount: string;
|
|
@@ -40,5 +41,6 @@ export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuot
|
|
|
40
41
|
baseReserve: BigNumber;
|
|
41
42
|
quoteReserve: BigNumber;
|
|
42
43
|
} | null, Error>>;
|
|
44
|
+
amountCheckedDisabled: boolean;
|
|
43
45
|
midPrice: BigNumber | undefined;
|
|
44
46
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { OperatePool } from '../types';
|
|
3
|
+
export declare const initSliderPercentage = 50;
|
|
4
|
+
export declare enum RemoveMode {
|
|
5
|
+
quantity = 1,
|
|
6
|
+
percentage = 2
|
|
7
|
+
}
|
|
8
|
+
export declare function usePercentageRemove({ isBase, pool, baseOverride, quoteOverride, resetAmount, handleChangeBaseAmount, handleChangeQuoteAmount, }: {
|
|
9
|
+
isBase: boolean | undefined;
|
|
10
|
+
pool: OperatePool | undefined;
|
|
11
|
+
baseOverride: BigNumber | undefined | null;
|
|
12
|
+
quoteOverride: BigNumber | undefined | null;
|
|
13
|
+
resetAmount: () => void;
|
|
14
|
+
handleChangeBaseAmount: (val: string) => void;
|
|
15
|
+
handleChangeQuoteAmount: (val: string) => void;
|
|
16
|
+
}): {
|
|
17
|
+
mode: RemoveMode;
|
|
18
|
+
modeOptions: {
|
|
19
|
+
key: RemoveMode;
|
|
20
|
+
value: string;
|
|
21
|
+
}[];
|
|
22
|
+
handleChangeMode: (mode: RemoveMode) => void;
|
|
23
|
+
sliderPercentage: number;
|
|
24
|
+
handleChangeSliderPercentage: (val: number) => void;
|
|
25
|
+
resetPercentage: () => void;
|
|
26
|
+
};
|
|
@@ -2,7 +2,9 @@ export declare enum PoolOrMiningTab {
|
|
|
2
2
|
Liquidity = 1,
|
|
3
3
|
Mining = 2
|
|
4
4
|
}
|
|
5
|
-
export declare function usePoolOrMiningTabs(
|
|
5
|
+
export declare function usePoolOrMiningTabs({ hasMining }: {
|
|
6
|
+
hasMining?: boolean;
|
|
7
|
+
}): {
|
|
6
8
|
poolOrMiningTab: PoolOrMiningTab;
|
|
7
9
|
poolOrMiningTabs: {
|
|
8
10
|
key: PoolOrMiningTab;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { usePoolBalanceInfo } from '../../hooks/usePoolBalanceInfo';
|
|
2
|
+
import { OperatePool } from '../types';
|
|
3
|
+
export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteAmount, balanceInfo, }: {
|
|
4
|
+
pool: OperatePool | undefined;
|
|
5
|
+
baseAmount: string;
|
|
6
|
+
quoteAmount: string;
|
|
7
|
+
balanceInfo: ReturnType<typeof usePoolBalanceInfo>;
|
|
8
|
+
}): {
|
|
9
|
+
baseTokenStatus: {
|
|
10
|
+
isApproving: boolean;
|
|
11
|
+
isGetApproveLoading: boolean;
|
|
12
|
+
needApprove: boolean;
|
|
13
|
+
needReset: boolean | undefined;
|
|
14
|
+
needShowTokenStatusButton: boolean;
|
|
15
|
+
insufficientBalance: boolean;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
approveTitle: string;
|
|
18
|
+
submitApprove: () => Promise<void>;
|
|
19
|
+
getMaxBalance: () => string;
|
|
20
|
+
};
|
|
21
|
+
quoteTokenStatus: {
|
|
22
|
+
isApproving: boolean;
|
|
23
|
+
isGetApproveLoading: boolean;
|
|
24
|
+
needApprove: boolean;
|
|
25
|
+
needReset: boolean | undefined;
|
|
26
|
+
needShowTokenStatusButton: boolean;
|
|
27
|
+
insufficientBalance: boolean;
|
|
28
|
+
loading: boolean;
|
|
29
|
+
approveTitle: string;
|
|
30
|
+
submitApprove: () => Promise<void>;
|
|
31
|
+
getMaxBalance: () => string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
3
|
import { PoolOperateInnerProps } from './PoolOperateInner';
|
|
3
4
|
export interface PoolOperateProps {
|
|
4
|
-
onClose
|
|
5
|
+
onClose?: () => void;
|
|
5
6
|
account: string | undefined;
|
|
6
|
-
pool
|
|
7
|
+
pool?: PoolOperateInnerProps['pool'];
|
|
8
|
+
address?: string;
|
|
9
|
+
operate?: PoolOperateInnerProps['operate'];
|
|
10
|
+
chainId?: number;
|
|
11
|
+
hasMining?: boolean;
|
|
12
|
+
sx?: BoxProps['sx'];
|
|
7
13
|
}
|
|
8
|
-
export default function PoolOperate({
|
|
14
|
+
export default function PoolOperate({ sx, ...props }: PoolOperateProps): JSX.Element;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
interface ModifyPool {
|
|
4
|
+
address: string;
|
|
5
|
+
baseReserve: string | BigNumber;
|
|
6
|
+
quoteReserve: string | BigNumber;
|
|
7
|
+
feeRate: string;
|
|
8
|
+
i: number;
|
|
9
|
+
k: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function useDiffer({ srcPool, newPool, }: {
|
|
12
|
+
srcPool?: ModifyPool;
|
|
13
|
+
newPool: {
|
|
14
|
+
baseToken: TokenInfo;
|
|
15
|
+
quoteToken: TokenInfo;
|
|
16
|
+
baseAmount: string;
|
|
17
|
+
quoteAmount: string;
|
|
18
|
+
feeRate: string;
|
|
19
|
+
initPrice: string;
|
|
20
|
+
slippageCoefficient: string;
|
|
21
|
+
};
|
|
22
|
+
}): {
|
|
23
|
+
baseAmount: {
|
|
24
|
+
now: BigNumber;
|
|
25
|
+
target: BigNumber;
|
|
26
|
+
isChange: boolean;
|
|
27
|
+
change: BigNumber;
|
|
28
|
+
changeText: string;
|
|
29
|
+
isAdd: boolean;
|
|
30
|
+
isRemove: boolean;
|
|
31
|
+
};
|
|
32
|
+
quoteAmount: {
|
|
33
|
+
now: BigNumber;
|
|
34
|
+
target: BigNumber;
|
|
35
|
+
isChange: boolean;
|
|
36
|
+
change: BigNumber;
|
|
37
|
+
changeText: string;
|
|
38
|
+
isAdd: boolean;
|
|
39
|
+
isRemove: boolean;
|
|
40
|
+
};
|
|
41
|
+
feeRate: {
|
|
42
|
+
now: BigNumber;
|
|
43
|
+
target: BigNumber;
|
|
44
|
+
isChange: boolean;
|
|
45
|
+
change: BigNumber;
|
|
46
|
+
changeText: string;
|
|
47
|
+
isAdd: boolean;
|
|
48
|
+
isRemove: boolean;
|
|
49
|
+
};
|
|
50
|
+
initPrice: {
|
|
51
|
+
now: BigNumber;
|
|
52
|
+
target: BigNumber;
|
|
53
|
+
isChange: boolean;
|
|
54
|
+
change: BigNumber;
|
|
55
|
+
changeText: string;
|
|
56
|
+
isAdd: boolean;
|
|
57
|
+
isRemove: boolean;
|
|
58
|
+
};
|
|
59
|
+
slippageCoefficient: {
|
|
60
|
+
now: BigNumber;
|
|
61
|
+
target: BigNumber;
|
|
62
|
+
isChange: boolean;
|
|
63
|
+
change: BigNumber;
|
|
64
|
+
changeText: string;
|
|
65
|
+
isAdd: boolean;
|
|
66
|
+
isRemove: boolean;
|
|
67
|
+
};
|
|
68
|
+
} | null;
|
|
69
|
+
export declare const getModifyDPPPoolParams: ({ chainId, account, srcPool, baseToken, quoteToken, baseAmount, quoteAmount, feeRate, initPrice, slippageCoefficient, SLIPPAGE_PROTECTION, }: {
|
|
70
|
+
chainId?: number | undefined;
|
|
71
|
+
account?: string | undefined;
|
|
72
|
+
srcPool?: ModifyPool | undefined;
|
|
73
|
+
baseToken: TokenInfo;
|
|
74
|
+
quoteToken: TokenInfo;
|
|
75
|
+
baseAmount: string;
|
|
76
|
+
quoteAmount: string;
|
|
77
|
+
feeRate: string;
|
|
78
|
+
initPrice: string;
|
|
79
|
+
slippageCoefficient: string;
|
|
80
|
+
SLIPPAGE_PROTECTION: number;
|
|
81
|
+
}) => Promise<{
|
|
82
|
+
data: string;
|
|
83
|
+
to: string;
|
|
84
|
+
value?: string | number | undefined;
|
|
85
|
+
} | null>;
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PoolType } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export declare function useModifyDppPool({ pool, }: {
|
|
4
|
+
pool?: {
|
|
5
|
+
chainId: number;
|
|
6
|
+
address: string;
|
|
7
|
+
type: PoolType;
|
|
8
|
+
baseToken: TokenInfo;
|
|
9
|
+
quoteToken: TokenInfo;
|
|
10
|
+
};
|
|
11
|
+
}): {
|
|
12
|
+
modifyDPPMutation: import("@tanstack/react-query/build/legacy/types").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult, Error, {
|
|
13
|
+
baseAmount: string;
|
|
14
|
+
quoteAmount: string;
|
|
15
|
+
isRemove?: boolean | undefined;
|
|
16
|
+
feeRate?: string | undefined;
|
|
17
|
+
initPrice?: string | undefined;
|
|
18
|
+
slippageCoefficient?: string | undefined;
|
|
19
|
+
txTitle: string;
|
|
20
|
+
submittedBack?: (() => void) | undefined;
|
|
21
|
+
}, unknown>;
|
|
22
|
+
};
|