@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,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function SelectAndInput({ errorMsg, isCustomized, onClick, value, onChange, }: {
|
|
3
|
+
errorMsg: string;
|
|
4
|
+
isCustomized: boolean;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (v: string) => void;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../../hooks/Token';
|
|
2
|
+
import { Version as PoolVersionE } from '../../types';
|
|
3
|
+
export declare const useCreatePoolSubmit: ({ selectedVersion, baseToken, quoteToken, baseAmount, quoteAmount, feeRate, initPrice, slippageCoefficient, }: {
|
|
4
|
+
selectedVersion: PoolVersionE;
|
|
5
|
+
baseToken: TokenInfo | null;
|
|
6
|
+
quoteToken: TokenInfo | null;
|
|
7
|
+
baseAmount: string;
|
|
8
|
+
quoteAmount: string;
|
|
9
|
+
feeRate: string;
|
|
10
|
+
initPrice: string;
|
|
11
|
+
slippageCoefficient: string;
|
|
12
|
+
}) => {
|
|
13
|
+
getCreateParams: () => Promise<any>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Version } from '../types';
|
|
2
|
+
export declare enum PoolTemplate {
|
|
3
|
+
standard = 1,
|
|
4
|
+
singleToken = 2,
|
|
5
|
+
pagged = 3,
|
|
6
|
+
marketMaker = 4
|
|
7
|
+
}
|
|
8
|
+
export declare const useCreatePmm: ({ selectedVersion, baseAmount, quoteAmount, initPrice, slippageCoefficient, }: {
|
|
9
|
+
selectedVersion: Version;
|
|
10
|
+
baseAmount?: string | undefined;
|
|
11
|
+
quoteAmount?: string | undefined;
|
|
12
|
+
initPrice: string;
|
|
13
|
+
slippageCoefficient: string;
|
|
14
|
+
}) => {
|
|
15
|
+
pmmParams: {
|
|
16
|
+
i: number;
|
|
17
|
+
k: number;
|
|
18
|
+
b: number;
|
|
19
|
+
b0: number;
|
|
20
|
+
q: number;
|
|
21
|
+
q0: number;
|
|
22
|
+
R: number;
|
|
23
|
+
} | undefined;
|
|
24
|
+
pmmModel: import("@dodoex/api").PMMModel | undefined;
|
|
25
|
+
midPrice: import("bignumber.js").BigNumber | undefined;
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RadioButtonT } from '../types';
|
|
2
|
+
export declare const getFeeRateList: () => ({
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
value: string;
|
|
6
|
+
tag?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
value: string;
|
|
11
|
+
tag: string;
|
|
12
|
+
})[];
|
|
13
|
+
export declare function useFeeRateList(): RadioButtonT[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioButtonT } from '../types';
|
|
2
|
+
import { StateProps } from '../reducer';
|
|
3
|
+
export declare const getDefaultSlippageCoefficientList: ({ selectedVersion, }: {
|
|
4
|
+
selectedVersion: StateProps['selectedVersion'];
|
|
5
|
+
}) => string[];
|
|
6
|
+
export declare function useSlippageCoefficientList({ selectedVersion, }: {
|
|
7
|
+
selectedVersion: StateProps['selectedVersion'];
|
|
8
|
+
}): RadioButtonT[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Version } from '../types';
|
|
2
|
+
export declare const validFeeRate: (feeRateStr?: string) => string;
|
|
3
|
+
export declare const validSlippageCoefficient: (slippageCoefficientStr: string, selectedVersion: Version) => string;
|
|
4
|
+
export declare function validInitPrice(selectedVersion: Version, initPrice: string, quoteTokenDecimals: number): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { Actions, StateProps } from '../reducer';
|
|
3
|
+
export declare function FeeRateSetting({ dispatch, feeRate, isFeeRateCustomized: isCustomized, }: {
|
|
4
|
+
dispatch: Dispatch<Actions>;
|
|
5
|
+
feeRate: StateProps['feeRate'];
|
|
6
|
+
isFeeRateCustomized: StateProps['isFeeRateCustomized'];
|
|
7
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { Actions, StateProps } from '../reducer';
|
|
3
|
+
export declare function InitPriceSetting({ isEdit, selectedVersion, isFixedRatio, leftTokenAddress, baseToken, quoteToken, fixedRatioPrice, dispatch, }: {
|
|
4
|
+
isEdit?: boolean;
|
|
5
|
+
selectedVersion: StateProps['selectedVersion'];
|
|
6
|
+
isFixedRatio: StateProps['isFixedRatio'];
|
|
7
|
+
leftTokenAddress: StateProps['leftTokenAddress'];
|
|
8
|
+
baseToken: StateProps['baseToken'];
|
|
9
|
+
quoteToken: StateProps['quoteToken'];
|
|
10
|
+
fixedRatioPrice: StateProps['fixedRatioPrice'];
|
|
11
|
+
dispatch: Dispatch<Actions>;
|
|
12
|
+
}): JSX.Element;
|
package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/SlippageCoefficientSetting.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Dispatch } from 'react';
|
|
2
|
+
import { Actions, StateProps } from '../reducer';
|
|
3
|
+
export declare function SlippageCoefficientSetting({ dispatch, slippageCoefficient, selectedVersion, isCustomized, }: {
|
|
4
|
+
dispatch: Dispatch<Actions>;
|
|
5
|
+
slippageCoefficient: StateProps['slippageCoefficient'];
|
|
6
|
+
selectedVersion: StateProps['selectedVersion'];
|
|
7
|
+
isCustomized: StateProps['isSlippageCoefficientCustomized'];
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Version } from './types';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
export interface StateProps {
|
|
4
|
+
currentStep: 0 | 1 | 2;
|
|
5
|
+
selectedVersion: Version;
|
|
6
|
+
baseToken: TokenInfo | null;
|
|
7
|
+
quoteToken: TokenInfo | null;
|
|
8
|
+
baseAmount: string;
|
|
9
|
+
quoteAmount: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to fix the exchange rate fixedRatioPrice to the current legal currency price, true means no modification is allowed
|
|
12
|
+
* single-token is not fixed by default and cannot be fixed, and can be modified
|
|
13
|
+
* After fixing, when modifying the quantity, standard needs to keep the ratio of baseAmount, quoteAmount, fixedRatioPrice unchanged. Pegged needs to be linked regardless of whether it is fixed or not. dpp does not need to, and the three can be modified independently.
|
|
14
|
+
*/
|
|
15
|
+
isFixedRatio: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* PmmState.i
|
|
18
|
+
* The value of standard pool is always DEFAULT_INIT_PRICE_STANDARD
|
|
19
|
+
* Other types can be modified, the initial value is DEFAULT_INIT_PRICE
|
|
20
|
+
* The value of this field for single-token, pegged and dpp types is synchronized with fixedRatioPrice
|
|
21
|
+
*/
|
|
22
|
+
initPrice: string;
|
|
23
|
+
/**
|
|
24
|
+
* Exchange rate, price, exchange ratio, price ratio
|
|
25
|
+
* Except for single-token types, use the initial fiat price to initialize this field
|
|
26
|
+
* single-token defaults to empty, others default to 1
|
|
27
|
+
*/
|
|
28
|
+
fixedRatioPrice: string;
|
|
29
|
+
/** The token on the left side of the exchange rate input box */
|
|
30
|
+
leftTokenAddress: TokenInfo['address'] | undefined;
|
|
31
|
+
slippageCoefficient: string;
|
|
32
|
+
isSlippageCoefficientCustomized: boolean;
|
|
33
|
+
feeRate: string | '0.01' | '0.3' | '1';
|
|
34
|
+
isFeeRateCustomized: boolean;
|
|
35
|
+
}
|
|
36
|
+
declare type Pool = any;
|
|
37
|
+
export declare enum Types {
|
|
38
|
+
SetCurrentStep = 1,
|
|
39
|
+
SelectNewVersion = 2,
|
|
40
|
+
UpdateBaseToken = 3,
|
|
41
|
+
UpdateQuoteToken = 4,
|
|
42
|
+
SwitchTokens = 5,
|
|
43
|
+
UpdateBaseAmount = 6,
|
|
44
|
+
UpdateQuoteAmount = 7,
|
|
45
|
+
UpdateIsFixedRatio = 8,
|
|
46
|
+
UpdateFixedRatioPrice = 9,
|
|
47
|
+
InitFixedRatioPrice = 10,
|
|
48
|
+
ToggleLeftToken = 11,
|
|
49
|
+
UpdateSlippageCoefficient = 12,
|
|
50
|
+
UpdateIsSlippageCoefficientCustomized = 13,
|
|
51
|
+
UpdateFeeRate = 14,
|
|
52
|
+
UpdateIsFeeRateCustomized = 15,
|
|
53
|
+
InitEditParameters = 16
|
|
54
|
+
}
|
|
55
|
+
declare type Payload = {
|
|
56
|
+
[Types.SetCurrentStep]: StateProps['currentStep'];
|
|
57
|
+
[Types.SelectNewVersion]: Version;
|
|
58
|
+
[Types.UpdateBaseToken]: TokenInfo;
|
|
59
|
+
[Types.UpdateQuoteToken]: TokenInfo;
|
|
60
|
+
[Types.SwitchTokens]: undefined;
|
|
61
|
+
[Types.UpdateBaseAmount]: string;
|
|
62
|
+
[Types.UpdateQuoteAmount]: string;
|
|
63
|
+
[Types.UpdateIsFixedRatio]: boolean;
|
|
64
|
+
[Types.UpdateFixedRatioPrice]: string;
|
|
65
|
+
[Types.InitFixedRatioPrice]: {
|
|
66
|
+
baseTokenFiatPrice: number | undefined;
|
|
67
|
+
quoteTokenFiatPrice: number | undefined;
|
|
68
|
+
};
|
|
69
|
+
[Types.ToggleLeftToken]: undefined;
|
|
70
|
+
[Types.UpdateSlippageCoefficient]: string;
|
|
71
|
+
[Types.UpdateIsSlippageCoefficientCustomized]: boolean;
|
|
72
|
+
[Types.UpdateFeeRate]: StateProps['feeRate'];
|
|
73
|
+
[Types.UpdateIsFeeRateCustomized]: boolean;
|
|
74
|
+
[Types.InitEditParameters]: Pool;
|
|
75
|
+
};
|
|
76
|
+
export declare type Actions = ActionMap<Payload>[keyof ActionMap<Payload>];
|
|
77
|
+
export declare function reducer(state: StateProps, action: Actions): StateProps;
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare enum Version {
|
|
3
|
+
/** DVM; public pool */
|
|
4
|
+
standard = "standard",
|
|
5
|
+
/** DVM: quoteReserve = 0; public pool */
|
|
6
|
+
singleToken = "single-token",
|
|
7
|
+
/** DSP */
|
|
8
|
+
pegged = "pagged",
|
|
9
|
+
/** DPP; private pool */
|
|
10
|
+
marketMakerPool = "market-maker-pool"
|
|
11
|
+
}
|
|
12
|
+
export interface VersionItem {
|
|
13
|
+
version: Version;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
exampleImgUrl: React.FunctionComponent<React.SVGProps<SVGSVGElement> & {
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
exampleDarkImgUrl: React.FunctionComponent<React.SVGProps<SVGSVGElement> & {
|
|
20
|
+
title?: string | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
docUrl: string;
|
|
23
|
+
initPriceLabel: string;
|
|
24
|
+
initPriceTips?: string;
|
|
25
|
+
initPriceTipsLink?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare type SectionStatusT = 'waiting' | 'running' | 'completed';
|
|
28
|
+
export interface RadioButtonT {
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
value: string;
|
|
32
|
+
tag?: string;
|
|
33
|
+
tagColor?: string;
|
|
34
|
+
tagBackgroundColor?: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { Version } from './types';
|
|
4
|
+
export declare const DEFAULT_FEE_RATE = "0.3";
|
|
5
|
+
export declare const MIN_FEE_RATE = 0.01;
|
|
6
|
+
export declare const MAX_FEE_RATE = 10;
|
|
7
|
+
export declare const DEFAULT_INIT_PRICE = "1";
|
|
8
|
+
export declare const DEFAULT_INIT_PRICE_STANDARD = "0.0000000000001";
|
|
9
|
+
export declare const MAX_INIT_PRICE = 100000000;
|
|
10
|
+
export declare const DEFAULT_SLIPPAGE_COEFFICIENT = "1";
|
|
11
|
+
export declare const DEFAULT_SLIPPAGE_COEFFICIENT_PEGGED = "0.0001";
|
|
12
|
+
export declare const MAX_SLIPPAGE_COEFFICIENT_PEGGED = "0.1";
|
|
13
|
+
export declare function computeInitPriceText({ selectedVersion, quoteToken, initPrice, midPrice, }: {
|
|
14
|
+
selectedVersion: Version;
|
|
15
|
+
quoteToken: TokenInfo;
|
|
16
|
+
initPrice: string;
|
|
17
|
+
midPrice?: BigNumber;
|
|
18
|
+
}): string | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
export declare function BaseQuotePie({ shortNumber, pieSize, baseReserve, baseAmount, quoteAmount, baseTokenSymbol, quoteTokenSymbol, quoteTokenDecimals, baseTokenDecimals, baseTvlRate, quoteTvlRate, disabledAmount, disabledRate, disabledPercentage, loading, sx, pieRadius: pieRadiusProp, }: {
|
|
5
|
+
baseReserve?: BigNumber;
|
|
6
|
+
/** Quantity converted by midPrice, used to calculate percentages */
|
|
7
|
+
baseAmount?: BigNumber;
|
|
8
|
+
baseTokenDecimals?: number;
|
|
9
|
+
baseTokenSymbol?: string;
|
|
10
|
+
quoteAmount?: BigNumber;
|
|
11
|
+
quoteTokenDecimals?: number;
|
|
12
|
+
quoteTokenSymbol?: string;
|
|
13
|
+
pieSize?: 'small' | 'default';
|
|
14
|
+
shortNumber?: boolean;
|
|
15
|
+
/** Already calculated proportion */
|
|
16
|
+
baseTvlRate?: string;
|
|
17
|
+
quoteTvlRate?: string;
|
|
18
|
+
disabledAmount?: boolean;
|
|
19
|
+
disabledRate?: boolean;
|
|
20
|
+
disabledPercentage?: boolean;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
sx?: BoxProps['sx'];
|
|
23
|
+
pieRadius?: number;
|
|
24
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { usePoolDetail } from '../../hooks/usePoolDetail';
|
|
3
|
+
export default function ChartInfo({ poolDetail, chart24hDataFirst, }: {
|
|
4
|
+
poolDetail?: ReturnType<typeof usePoolDetail>['poolDetail'];
|
|
5
|
+
chart24hDataFirst?: boolean;
|
|
6
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
|
+
import { usePoolDetail } from '../../../hooks/usePoolDetail';
|
|
5
|
+
export declare function formatDateTimeStr(timestamp?: number, short?: boolean): string;
|
|
6
|
+
export declare function TokenWithSymbolRtL({ chainId, address, symbol, amount, sx, }: {
|
|
7
|
+
chainId: ChainId;
|
|
8
|
+
address: string;
|
|
9
|
+
symbol: string;
|
|
10
|
+
amount: string;
|
|
11
|
+
sx?: BoxProps['sx'];
|
|
12
|
+
}): JSX.Element;
|
|
13
|
+
export default function ParametersTable({ detail, }: {
|
|
14
|
+
detail: ReturnType<typeof usePoolDetail>['poolDetail'];
|
|
15
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { usePoolDetail } from '../../../hooks/usePoolDetail';
|
|
3
|
+
export declare function formatDateTimeStr(timestamp?: number, short?: boolean): string;
|
|
4
|
+
export default function SwapsTable({ poolDetail, }: {
|
|
5
|
+
poolDetail: ReturnType<typeof usePoolDetail>['poolDetail'];
|
|
6
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { usePoolDayData } from '../hooks/usePoolDayData';
|
|
3
|
+
declare type DayData = ReturnType<typeof usePoolDayData>['dayDataList']['0'];
|
|
4
|
+
export default function StatBarChart({ unit, data, masterKey, sumKey, }: {
|
|
5
|
+
unit: string;
|
|
6
|
+
data: DayData[];
|
|
7
|
+
masterKey: keyof DayData;
|
|
8
|
+
sumKey: keyof DayData;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { PoolType } from '@dodoex/api';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export declare type LpItem = {
|
|
5
|
+
userId: string;
|
|
6
|
+
baseSupplied: string;
|
|
7
|
+
quoteSupplied: string;
|
|
8
|
+
baseTokenSymbol: string;
|
|
9
|
+
baseTokenAddress: string;
|
|
10
|
+
quoteTokenSymbol: string;
|
|
11
|
+
quoteTokenAddress: string;
|
|
12
|
+
sharePercentage: string;
|
|
13
|
+
dollarValue: string;
|
|
14
|
+
dollarValueBN: BigNumber;
|
|
15
|
+
};
|
|
16
|
+
export declare function useLiquidityProviders({ pool, }: {
|
|
17
|
+
pool: {
|
|
18
|
+
chainId: number;
|
|
19
|
+
address: string;
|
|
20
|
+
type: PoolType;
|
|
21
|
+
baseToken: TokenInfo;
|
|
22
|
+
quoteToken: TokenInfo;
|
|
23
|
+
} | null | undefined;
|
|
24
|
+
}): {
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
errorRefetch: (() => void) | undefined;
|
|
27
|
+
list: LpItem[];
|
|
28
|
+
data: import("@dodoex/api/dist/gql/graphql").FetchLiquidityPositionsQuery;
|
|
29
|
+
error: Error;
|
|
30
|
+
isError: true;
|
|
31
|
+
isPending: false;
|
|
32
|
+
isLoadingError: false;
|
|
33
|
+
isRefetchError: true;
|
|
34
|
+
isSuccess: false;
|
|
35
|
+
status: "error";
|
|
36
|
+
dataUpdatedAt: number;
|
|
37
|
+
errorUpdatedAt: number;
|
|
38
|
+
failureCount: number;
|
|
39
|
+
failureReason: Error | null;
|
|
40
|
+
errorUpdateCount: number;
|
|
41
|
+
isFetched: boolean;
|
|
42
|
+
isFetchedAfterMount: boolean;
|
|
43
|
+
isFetching: boolean;
|
|
44
|
+
isInitialLoading: boolean;
|
|
45
|
+
isPaused: boolean;
|
|
46
|
+
isPlaceholderData: boolean;
|
|
47
|
+
isRefetching: boolean;
|
|
48
|
+
isStale: boolean;
|
|
49
|
+
refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa")._ | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").ae<import("@dodoex/api/dist/gql/graphql").FetchLiquidityPositionsQuery, Error>>;
|
|
50
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
51
|
+
} | {
|
|
52
|
+
isLoading: boolean;
|
|
53
|
+
errorRefetch: (() => void) | undefined;
|
|
54
|
+
list: LpItem[];
|
|
55
|
+
data: import("@dodoex/api/dist/gql/graphql").FetchLiquidityPositionsQuery;
|
|
56
|
+
error: null;
|
|
57
|
+
isError: false;
|
|
58
|
+
isPending: false;
|
|
59
|
+
isLoadingError: false;
|
|
60
|
+
isRefetchError: false;
|
|
61
|
+
isSuccess: true;
|
|
62
|
+
status: "success";
|
|
63
|
+
dataUpdatedAt: number;
|
|
64
|
+
errorUpdatedAt: number;
|
|
65
|
+
failureCount: number;
|
|
66
|
+
failureReason: Error | null;
|
|
67
|
+
errorUpdateCount: number;
|
|
68
|
+
isFetched: boolean;
|
|
69
|
+
isFetchedAfterMount: boolean;
|
|
70
|
+
isFetching: boolean;
|
|
71
|
+
isInitialLoading: boolean;
|
|
72
|
+
isPaused: boolean;
|
|
73
|
+
isPlaceholderData: boolean;
|
|
74
|
+
isRefetching: boolean;
|
|
75
|
+
isStale: boolean;
|
|
76
|
+
refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa")._ | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").ae<import("@dodoex/api/dist/gql/graphql").FetchLiquidityPositionsQuery, Error>>;
|
|
77
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
78
|
+
} | {
|
|
79
|
+
isLoading: boolean;
|
|
80
|
+
errorRefetch: (() => void) | undefined;
|
|
81
|
+
list: LpItem[];
|
|
82
|
+
data: undefined;
|
|
83
|
+
error: Error;
|
|
84
|
+
isError: true;
|
|
85
|
+
isPending: false;
|
|
86
|
+
isLoadingError: true;
|
|
87
|
+
isRefetchError: false;
|
|
88
|
+
isSuccess: false;
|
|
89
|
+
status: "error";
|
|
90
|
+
dataUpdatedAt: number;
|
|
91
|
+
errorUpdatedAt: number;
|
|
92
|
+
failureCount: number;
|
|
93
|
+
failureReason: Error | null;
|
|
94
|
+
errorUpdateCount: number;
|
|
95
|
+
isFetched: boolean;
|
|
96
|
+
isFetchedAfterMount: boolean;
|
|
97
|
+
isFetching: boolean;
|
|
98
|
+
isInitialLoading: boolean;
|
|
99
|
+
isPaused: boolean;
|
|
100
|
+
isPlaceholderData: boolean;
|
|
101
|
+
isRefetching: boolean;
|
|
102
|
+
isStale: boolean;
|
|
103
|
+
refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa")._ | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").ae<import("@dodoex/api/dist/gql/graphql").FetchLiquidityPositionsQuery, Error>>;
|
|
104
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
105
|
+
} | {
|
|
106
|
+
isLoading: boolean;
|
|
107
|
+
errorRefetch: (() => void) | undefined;
|
|
108
|
+
list: LpItem[];
|
|
109
|
+
data: undefined;
|
|
110
|
+
error: null;
|
|
111
|
+
isError: false;
|
|
112
|
+
isPending: true;
|
|
113
|
+
isLoadingError: false;
|
|
114
|
+
isRefetchError: false;
|
|
115
|
+
isSuccess: false;
|
|
116
|
+
status: "pending";
|
|
117
|
+
dataUpdatedAt: number;
|
|
118
|
+
errorUpdatedAt: number;
|
|
119
|
+
failureCount: number;
|
|
120
|
+
failureReason: Error | null;
|
|
121
|
+
errorUpdateCount: number;
|
|
122
|
+
isFetched: boolean;
|
|
123
|
+
isFetchedAfterMount: boolean;
|
|
124
|
+
isFetching: boolean;
|
|
125
|
+
isInitialLoading: boolean;
|
|
126
|
+
isPaused: boolean;
|
|
127
|
+
isPlaceholderData: boolean;
|
|
128
|
+
isRefetching: boolean;
|
|
129
|
+
isStale: boolean;
|
|
130
|
+
refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa")._ | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").ae<import("@dodoex/api/dist/gql/graphql").FetchLiquidityPositionsQuery, Error>>;
|
|
131
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
132
|
+
} | {
|
|
133
|
+
isLoading: boolean;
|
|
134
|
+
errorRefetch: (() => void) | undefined;
|
|
135
|
+
list: LpItem[];
|
|
136
|
+
data: undefined;
|
|
137
|
+
error: null;
|
|
138
|
+
isError: false;
|
|
139
|
+
isPending: true;
|
|
140
|
+
isLoadingError: false;
|
|
141
|
+
isRefetchError: false;
|
|
142
|
+
isSuccess: false;
|
|
143
|
+
status: "pending";
|
|
144
|
+
dataUpdatedAt: number;
|
|
145
|
+
errorUpdatedAt: number;
|
|
146
|
+
failureCount: number;
|
|
147
|
+
failureReason: Error | null;
|
|
148
|
+
errorUpdateCount: number;
|
|
149
|
+
isFetched: boolean;
|
|
150
|
+
isFetchedAfterMount: boolean;
|
|
151
|
+
isFetching: boolean;
|
|
152
|
+
isInitialLoading: boolean;
|
|
153
|
+
isPaused: boolean;
|
|
154
|
+
isPlaceholderData: boolean;
|
|
155
|
+
isRefetching: boolean;
|
|
156
|
+
isStale: boolean;
|
|
157
|
+
refetch: (options?: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa")._ | undefined) => Promise<import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").ae<import("@dodoex/api/dist/gql/graphql").FetchLiquidityPositionsQuery, Error>>;
|
|
158
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
159
|
+
};
|