@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,36 @@
|
|
|
1
|
+
import { PoolType } from '@dodoex/api';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
import { usePoolBalanceInfo } from '../usePoolBalanceInfo';
|
|
5
|
+
export interface SubmitLiquidityParams {
|
|
6
|
+
balanceInfo?: ReturnType<typeof usePoolBalanceInfo>;
|
|
7
|
+
baseAmount: string;
|
|
8
|
+
quoteAmount: string;
|
|
9
|
+
slippageProtection: number;
|
|
10
|
+
SLIPPAGE_PROTECTION: number;
|
|
11
|
+
txTitle: string;
|
|
12
|
+
isRemove?: boolean;
|
|
13
|
+
submittedBack?: () => void;
|
|
14
|
+
successBack?: () => void;
|
|
15
|
+
withdrawInfo?: {
|
|
16
|
+
withdrawFee: string;
|
|
17
|
+
receiveBaseAmount: string;
|
|
18
|
+
receiveQuoteAmount: string;
|
|
19
|
+
receiveAmountBg: BigNumber | undefined;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare const useOperateLiquidity: (pool?: {
|
|
23
|
+
chainId: number;
|
|
24
|
+
address: string;
|
|
25
|
+
type: PoolType;
|
|
26
|
+
baseToken: TokenInfo;
|
|
27
|
+
quoteToken: TokenInfo;
|
|
28
|
+
baseLpToken?: {
|
|
29
|
+
id: string;
|
|
30
|
+
};
|
|
31
|
+
quoteLpToken?: {
|
|
32
|
+
id: string;
|
|
33
|
+
};
|
|
34
|
+
}) => {
|
|
35
|
+
operateLiquidityMutation: import("@tanstack/react-query/build/legacy/types").UseMutationResult<void, Error, SubmitLiquidityParams, unknown>;
|
|
36
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PoolType } from '@dodoex/api';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
export declare const useWithdrawInfo: ({ pool, isBase, baseAmount, quoteAmount, }: {
|
|
4
|
+
pool?: {
|
|
5
|
+
chainId: number;
|
|
6
|
+
address: string;
|
|
7
|
+
type: PoolType;
|
|
8
|
+
baseToken: {
|
|
9
|
+
symbol: string;
|
|
10
|
+
decimals: number;
|
|
11
|
+
};
|
|
12
|
+
quoteToken: {
|
|
13
|
+
symbol: string;
|
|
14
|
+
decimals: number;
|
|
15
|
+
};
|
|
16
|
+
} | undefined;
|
|
17
|
+
isBase?: boolean | undefined;
|
|
18
|
+
baseAmount: string;
|
|
19
|
+
quoteAmount: string;
|
|
20
|
+
}) => {
|
|
21
|
+
withdrawFee: string;
|
|
22
|
+
baseWithdrawFee: string;
|
|
23
|
+
quoteWithdrawFee: string;
|
|
24
|
+
receiveBaseAmount: string;
|
|
25
|
+
receiveQuoteAmount: string;
|
|
26
|
+
receiveAmountBg: BigNumber | undefined;
|
|
27
|
+
receiveList: {
|
|
28
|
+
amount: string;
|
|
29
|
+
symbol: string;
|
|
30
|
+
}[];
|
|
31
|
+
loading: boolean;
|
|
32
|
+
error: Error | null;
|
|
33
|
+
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { PoolType } from '@dodoex/api';
|
|
2
2
|
import { BigNumber } from 'bignumber.js';
|
|
3
|
-
import { ChainId } from '../../../constants/chains';
|
|
4
3
|
import { TokenInfo } from '../../../hooks/Token';
|
|
5
4
|
declare type Balance = BigNumber | null | undefined;
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
5
|
+
export declare function getLpToTokenBalance(userLpBalance: Balance, totalLpBalance: Balance, reserve: Balance, target: Balance, address: string | undefined, type: PoolType | undefined, decimals: number | undefined): BigNumber | null | undefined;
|
|
6
|
+
export declare function usePoolBalanceInfo({ account, pool, }: {
|
|
8
7
|
account?: string;
|
|
9
8
|
pool?: {
|
|
10
9
|
address: string;
|
|
@@ -34,10 +33,16 @@ export declare function usePoolBalanceInfo({ chainId, account, pool, }: {
|
|
|
34
33
|
userBaseLpToTokenBalance: BigNumber | null | undefined;
|
|
35
34
|
/** The number of quote that can be obtained when a user withdraws from the pool */
|
|
36
35
|
userQuoteLpToTokenBalance: BigNumber | null | undefined;
|
|
36
|
+
baseLpToTokenProportion: BigNumber | undefined;
|
|
37
|
+
quoteLpToTokenProportion: BigNumber | undefined;
|
|
38
|
+
isSinglePool: boolean;
|
|
37
39
|
userLpBalanceLoading: boolean;
|
|
38
40
|
userLpToTokenBalanceLoading: boolean;
|
|
39
41
|
userLpBalanceError: boolean;
|
|
40
42
|
userLpToTokenBalanceError: boolean;
|
|
41
43
|
userLpToTokenBalanceRefetch: () => void;
|
|
44
|
+
error: boolean;
|
|
45
|
+
loading: boolean;
|
|
46
|
+
refetch: () => void;
|
|
42
47
|
};
|
|
43
48
|
export {};
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { ChainId, PoolType } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
export declare function usePoolDetail({ id, chainId, }: {
|
|
4
|
+
id: string | undefined;
|
|
5
|
+
chainId: ChainId | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
poolDetail: {
|
|
8
|
+
address: string;
|
|
9
|
+
type: PoolType;
|
|
10
|
+
chainId: ChainId;
|
|
11
|
+
baseToken: TokenInfo;
|
|
12
|
+
quoteToken: TokenInfo;
|
|
13
|
+
miningAddress: string;
|
|
14
|
+
baseApy: string | undefined;
|
|
15
|
+
quoteApy: string | undefined;
|
|
16
|
+
isCpPool: boolean;
|
|
17
|
+
cpAddress: string | undefined;
|
|
18
|
+
cpLiquidator: string | undefined;
|
|
19
|
+
cpCreator: string | undefined;
|
|
20
|
+
cpCreatedAtTimestamp: string | undefined;
|
|
21
|
+
id: string;
|
|
22
|
+
creator: any;
|
|
23
|
+
owner?: any;
|
|
24
|
+
traderCount: any;
|
|
25
|
+
volumeBaseToken: any;
|
|
26
|
+
volumeQuoteToken: any;
|
|
27
|
+
volumeUSD: any;
|
|
28
|
+
feeBase: any;
|
|
29
|
+
feeQuote: any;
|
|
30
|
+
mtFeeRate: any;
|
|
31
|
+
lpFeeRate: any;
|
|
32
|
+
i?: any;
|
|
33
|
+
k?: any;
|
|
34
|
+
baseReserve: any;
|
|
35
|
+
quoteReserve: any;
|
|
36
|
+
createdAtTimestamp: any;
|
|
37
|
+
lastTradePrice: any;
|
|
38
|
+
baseLpToken?: {
|
|
39
|
+
id: string;
|
|
40
|
+
symbol: string;
|
|
41
|
+
name: string;
|
|
42
|
+
} | null | undefined;
|
|
43
|
+
quoteLpToken?: {
|
|
44
|
+
id: string;
|
|
45
|
+
symbol: string;
|
|
46
|
+
name: string;
|
|
47
|
+
} | null | undefined;
|
|
48
|
+
} | null;
|
|
49
|
+
data: import("@dodoex/api/dist/gql/graphql").FetchPoolQuery;
|
|
50
|
+
error: Error;
|
|
51
|
+
isError: true;
|
|
52
|
+
isPending: false;
|
|
53
|
+
isLoading: false;
|
|
54
|
+
isLoadingError: false;
|
|
55
|
+
isRefetchError: true;
|
|
56
|
+
isSuccess: false;
|
|
57
|
+
status: "error";
|
|
58
|
+
dataUpdatedAt: number;
|
|
59
|
+
errorUpdatedAt: number;
|
|
60
|
+
failureCount: number;
|
|
61
|
+
failureReason: Error | null;
|
|
62
|
+
errorUpdateCount: number;
|
|
63
|
+
isFetched: boolean;
|
|
64
|
+
isFetchedAfterMount: boolean;
|
|
65
|
+
isFetching: boolean;
|
|
66
|
+
isInitialLoading: boolean;
|
|
67
|
+
isPaused: boolean;
|
|
68
|
+
isPlaceholderData: boolean;
|
|
69
|
+
isRefetching: boolean;
|
|
70
|
+
isStale: boolean;
|
|
71
|
+
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").FetchPoolQuery, Error>>;
|
|
72
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
73
|
+
} | {
|
|
74
|
+
poolDetail: {
|
|
75
|
+
address: string;
|
|
76
|
+
type: PoolType;
|
|
77
|
+
chainId: ChainId;
|
|
78
|
+
baseToken: TokenInfo;
|
|
79
|
+
quoteToken: TokenInfo;
|
|
80
|
+
miningAddress: string;
|
|
81
|
+
baseApy: string | undefined;
|
|
82
|
+
quoteApy: string | undefined;
|
|
83
|
+
isCpPool: boolean;
|
|
84
|
+
cpAddress: string | undefined;
|
|
85
|
+
cpLiquidator: string | undefined;
|
|
86
|
+
cpCreator: string | undefined;
|
|
87
|
+
cpCreatedAtTimestamp: string | undefined;
|
|
88
|
+
id: string;
|
|
89
|
+
creator: any;
|
|
90
|
+
owner?: any;
|
|
91
|
+
traderCount: any;
|
|
92
|
+
volumeBaseToken: any;
|
|
93
|
+
volumeQuoteToken: any;
|
|
94
|
+
volumeUSD: any;
|
|
95
|
+
feeBase: any;
|
|
96
|
+
feeQuote: any;
|
|
97
|
+
mtFeeRate: any;
|
|
98
|
+
lpFeeRate: any;
|
|
99
|
+
i?: any;
|
|
100
|
+
k?: any;
|
|
101
|
+
baseReserve: any;
|
|
102
|
+
quoteReserve: any;
|
|
103
|
+
createdAtTimestamp: any;
|
|
104
|
+
lastTradePrice: any;
|
|
105
|
+
baseLpToken?: {
|
|
106
|
+
id: string;
|
|
107
|
+
symbol: string;
|
|
108
|
+
name: string;
|
|
109
|
+
} | null | undefined;
|
|
110
|
+
quoteLpToken?: {
|
|
111
|
+
id: string;
|
|
112
|
+
symbol: string;
|
|
113
|
+
name: string;
|
|
114
|
+
} | null | undefined;
|
|
115
|
+
} | null;
|
|
116
|
+
data: import("@dodoex/api/dist/gql/graphql").FetchPoolQuery;
|
|
117
|
+
error: null;
|
|
118
|
+
isError: false;
|
|
119
|
+
isPending: false;
|
|
120
|
+
isLoading: false;
|
|
121
|
+
isLoadingError: false;
|
|
122
|
+
isRefetchError: false;
|
|
123
|
+
isSuccess: true;
|
|
124
|
+
status: "success";
|
|
125
|
+
dataUpdatedAt: number;
|
|
126
|
+
errorUpdatedAt: number;
|
|
127
|
+
failureCount: number;
|
|
128
|
+
failureReason: Error | null;
|
|
129
|
+
errorUpdateCount: number;
|
|
130
|
+
isFetched: boolean;
|
|
131
|
+
isFetchedAfterMount: boolean;
|
|
132
|
+
isFetching: boolean;
|
|
133
|
+
isInitialLoading: boolean;
|
|
134
|
+
isPaused: boolean;
|
|
135
|
+
isPlaceholderData: boolean;
|
|
136
|
+
isRefetching: boolean;
|
|
137
|
+
isStale: boolean;
|
|
138
|
+
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").FetchPoolQuery, Error>>;
|
|
139
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
140
|
+
} | {
|
|
141
|
+
poolDetail: {
|
|
142
|
+
address: string;
|
|
143
|
+
type: PoolType;
|
|
144
|
+
chainId: ChainId;
|
|
145
|
+
baseToken: TokenInfo;
|
|
146
|
+
quoteToken: TokenInfo;
|
|
147
|
+
miningAddress: string;
|
|
148
|
+
baseApy: string | undefined;
|
|
149
|
+
quoteApy: string | undefined;
|
|
150
|
+
isCpPool: boolean;
|
|
151
|
+
cpAddress: string | undefined;
|
|
152
|
+
cpLiquidator: string | undefined;
|
|
153
|
+
cpCreator: string | undefined;
|
|
154
|
+
cpCreatedAtTimestamp: string | undefined;
|
|
155
|
+
id: string;
|
|
156
|
+
creator: any;
|
|
157
|
+
owner?: any;
|
|
158
|
+
traderCount: any;
|
|
159
|
+
volumeBaseToken: any;
|
|
160
|
+
volumeQuoteToken: any;
|
|
161
|
+
volumeUSD: any;
|
|
162
|
+
feeBase: any;
|
|
163
|
+
feeQuote: any;
|
|
164
|
+
mtFeeRate: any;
|
|
165
|
+
lpFeeRate: any;
|
|
166
|
+
i?: any;
|
|
167
|
+
k?: any;
|
|
168
|
+
baseReserve: any;
|
|
169
|
+
quoteReserve: any;
|
|
170
|
+
createdAtTimestamp: any;
|
|
171
|
+
lastTradePrice: any;
|
|
172
|
+
baseLpToken?: {
|
|
173
|
+
id: string;
|
|
174
|
+
symbol: string;
|
|
175
|
+
name: string;
|
|
176
|
+
} | null | undefined;
|
|
177
|
+
quoteLpToken?: {
|
|
178
|
+
id: string;
|
|
179
|
+
symbol: string;
|
|
180
|
+
name: string;
|
|
181
|
+
} | null | undefined;
|
|
182
|
+
} | null;
|
|
183
|
+
data: undefined;
|
|
184
|
+
error: Error;
|
|
185
|
+
isError: true;
|
|
186
|
+
isPending: false;
|
|
187
|
+
isLoading: false;
|
|
188
|
+
isLoadingError: true;
|
|
189
|
+
isRefetchError: false;
|
|
190
|
+
isSuccess: false;
|
|
191
|
+
status: "error";
|
|
192
|
+
dataUpdatedAt: number;
|
|
193
|
+
errorUpdatedAt: number;
|
|
194
|
+
failureCount: number;
|
|
195
|
+
failureReason: Error | null;
|
|
196
|
+
errorUpdateCount: number;
|
|
197
|
+
isFetched: boolean;
|
|
198
|
+
isFetchedAfterMount: boolean;
|
|
199
|
+
isFetching: boolean;
|
|
200
|
+
isInitialLoading: boolean;
|
|
201
|
+
isPaused: boolean;
|
|
202
|
+
isPlaceholderData: boolean;
|
|
203
|
+
isRefetching: boolean;
|
|
204
|
+
isStale: boolean;
|
|
205
|
+
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").FetchPoolQuery, Error>>;
|
|
206
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
207
|
+
} | {
|
|
208
|
+
poolDetail: {
|
|
209
|
+
address: string;
|
|
210
|
+
type: PoolType;
|
|
211
|
+
chainId: ChainId;
|
|
212
|
+
baseToken: TokenInfo;
|
|
213
|
+
quoteToken: TokenInfo;
|
|
214
|
+
miningAddress: string;
|
|
215
|
+
baseApy: string | undefined;
|
|
216
|
+
quoteApy: string | undefined;
|
|
217
|
+
isCpPool: boolean;
|
|
218
|
+
cpAddress: string | undefined;
|
|
219
|
+
cpLiquidator: string | undefined;
|
|
220
|
+
cpCreator: string | undefined;
|
|
221
|
+
cpCreatedAtTimestamp: string | undefined;
|
|
222
|
+
id: string;
|
|
223
|
+
creator: any;
|
|
224
|
+
owner?: any;
|
|
225
|
+
traderCount: any;
|
|
226
|
+
volumeBaseToken: any;
|
|
227
|
+
volumeQuoteToken: any;
|
|
228
|
+
volumeUSD: any;
|
|
229
|
+
feeBase: any;
|
|
230
|
+
feeQuote: any;
|
|
231
|
+
mtFeeRate: any;
|
|
232
|
+
lpFeeRate: any;
|
|
233
|
+
i?: any;
|
|
234
|
+
k?: any;
|
|
235
|
+
baseReserve: any;
|
|
236
|
+
quoteReserve: any;
|
|
237
|
+
createdAtTimestamp: any;
|
|
238
|
+
lastTradePrice: any;
|
|
239
|
+
baseLpToken?: {
|
|
240
|
+
id: string;
|
|
241
|
+
symbol: string;
|
|
242
|
+
name: string;
|
|
243
|
+
} | null | undefined;
|
|
244
|
+
quoteLpToken?: {
|
|
245
|
+
id: string;
|
|
246
|
+
symbol: string;
|
|
247
|
+
name: string;
|
|
248
|
+
} | null | undefined;
|
|
249
|
+
} | null;
|
|
250
|
+
data: undefined;
|
|
251
|
+
error: null;
|
|
252
|
+
isError: false;
|
|
253
|
+
isPending: true;
|
|
254
|
+
isLoading: true;
|
|
255
|
+
isLoadingError: false;
|
|
256
|
+
isRefetchError: false;
|
|
257
|
+
isSuccess: false;
|
|
258
|
+
status: "pending";
|
|
259
|
+
dataUpdatedAt: number;
|
|
260
|
+
errorUpdatedAt: number;
|
|
261
|
+
failureCount: number;
|
|
262
|
+
failureReason: Error | null;
|
|
263
|
+
errorUpdateCount: number;
|
|
264
|
+
isFetched: boolean;
|
|
265
|
+
isFetchedAfterMount: boolean;
|
|
266
|
+
isFetching: boolean;
|
|
267
|
+
isInitialLoading: boolean;
|
|
268
|
+
isPaused: boolean;
|
|
269
|
+
isPlaceholderData: boolean;
|
|
270
|
+
isRefetching: boolean;
|
|
271
|
+
isStale: boolean;
|
|
272
|
+
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").FetchPoolQuery, Error>>;
|
|
273
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
274
|
+
} | {
|
|
275
|
+
poolDetail: {
|
|
276
|
+
address: string;
|
|
277
|
+
type: PoolType;
|
|
278
|
+
chainId: ChainId;
|
|
279
|
+
baseToken: TokenInfo;
|
|
280
|
+
quoteToken: TokenInfo;
|
|
281
|
+
miningAddress: string;
|
|
282
|
+
baseApy: string | undefined;
|
|
283
|
+
quoteApy: string | undefined;
|
|
284
|
+
isCpPool: boolean;
|
|
285
|
+
cpAddress: string | undefined;
|
|
286
|
+
cpLiquidator: string | undefined;
|
|
287
|
+
cpCreator: string | undefined;
|
|
288
|
+
cpCreatedAtTimestamp: string | undefined;
|
|
289
|
+
id: string;
|
|
290
|
+
creator: any;
|
|
291
|
+
owner?: any;
|
|
292
|
+
traderCount: any;
|
|
293
|
+
volumeBaseToken: any;
|
|
294
|
+
volumeQuoteToken: any;
|
|
295
|
+
volumeUSD: any;
|
|
296
|
+
feeBase: any;
|
|
297
|
+
feeQuote: any;
|
|
298
|
+
mtFeeRate: any;
|
|
299
|
+
lpFeeRate: any;
|
|
300
|
+
i?: any;
|
|
301
|
+
k?: any;
|
|
302
|
+
baseReserve: any;
|
|
303
|
+
quoteReserve: any;
|
|
304
|
+
createdAtTimestamp: any;
|
|
305
|
+
lastTradePrice: any;
|
|
306
|
+
baseLpToken?: {
|
|
307
|
+
id: string;
|
|
308
|
+
symbol: string;
|
|
309
|
+
name: string;
|
|
310
|
+
} | null | undefined;
|
|
311
|
+
quoteLpToken?: {
|
|
312
|
+
id: string;
|
|
313
|
+
symbol: string;
|
|
314
|
+
name: string;
|
|
315
|
+
} | null | undefined;
|
|
316
|
+
} | null;
|
|
317
|
+
data: undefined;
|
|
318
|
+
error: null;
|
|
319
|
+
isError: false;
|
|
320
|
+
isPending: true;
|
|
321
|
+
isLoadingError: false;
|
|
322
|
+
isRefetchError: false;
|
|
323
|
+
isSuccess: false;
|
|
324
|
+
status: "pending";
|
|
325
|
+
dataUpdatedAt: number;
|
|
326
|
+
errorUpdatedAt: number;
|
|
327
|
+
failureCount: number;
|
|
328
|
+
failureReason: Error | null;
|
|
329
|
+
errorUpdateCount: number;
|
|
330
|
+
isFetched: boolean;
|
|
331
|
+
isFetchedAfterMount: boolean;
|
|
332
|
+
isFetching: boolean;
|
|
333
|
+
isLoading: boolean;
|
|
334
|
+
isInitialLoading: boolean;
|
|
335
|
+
isPaused: boolean;
|
|
336
|
+
isPlaceholderData: boolean;
|
|
337
|
+
isRefetching: boolean;
|
|
338
|
+
isStale: boolean;
|
|
339
|
+
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").FetchPoolQuery, Error>>;
|
|
340
|
+
fetchStatus: import("@tanstack/query-core/build/legacy/queryClient-MRqjmcFa").a6;
|
|
341
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PoolType } from '@dodoex/api';
|
|
2
|
+
import { Theme } from '@dodoex/components';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
export declare const getPoolTypeTag: (type: PoolType, quoteReserve: BigNumber | undefined | null, theme: Theme) => {
|
|
5
|
+
typeLabel: string;
|
|
6
|
+
typeColor: any;
|
|
7
|
+
typeBgColor: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const usePoolTypeTag: ({ type, quoteReserve, }: {
|
|
10
|
+
type: PoolType;
|
|
11
|
+
quoteReserve: BigNumber | undefined | null;
|
|
12
|
+
}) => {
|
|
13
|
+
typeLabel: string;
|
|
14
|
+
typeColor: any;
|
|
15
|
+
typeBgColor: string;
|
|
16
|
+
};
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import { PoolApi, ExcludeNone
|
|
1
|
+
import { PoolApi, ExcludeNone } from '@dodoex/api';
|
|
2
2
|
import { ChainId } from '../../constants/chains';
|
|
3
3
|
import { TokenInfo } from '../../hooks/Token';
|
|
4
4
|
import { OperatePool } from './PoolOperate/types';
|
|
5
5
|
export declare const poolApi: PoolApi;
|
|
6
6
|
export declare type FetchLiquidityListLqList = ExcludeNone<ReturnType<Exclude<typeof PoolApi.graphql.fetchLiquidityList['__apiType'], undefined>>['liquidity_list']>['lqList'];
|
|
7
|
+
export declare type FetchMyLiquidityListLqList = ExcludeNone<ReturnType<Exclude<typeof PoolApi.graphql.fetchMyLiquidityList['__apiType'], undefined>>['liquidity_list']>['lqList'];
|
|
8
|
+
export declare type FetchPoolList = ExcludeNone<ReturnType<Exclude<typeof PoolApi.graphql.fetchPoolList['__apiType'], undefined>>['pairs']>;
|
|
7
9
|
export declare function convertLiquidityTokenToTokenInfo(token: {
|
|
8
10
|
id: string;
|
|
9
11
|
symbol: string;
|
|
10
12
|
name: string;
|
|
11
13
|
decimals: number;
|
|
12
|
-
usdPrice: number;
|
|
13
14
|
logoImg?: string | null;
|
|
14
15
|
} | undefined, chainId: ChainId | number): TokenInfo | undefined;
|
|
15
|
-
export declare function canOperatePool(account: string | undefined, { owner, creator, type, }: {
|
|
16
|
-
owner?: string | null;
|
|
17
|
-
creator?: string | null;
|
|
18
|
-
type?: PoolType;
|
|
19
|
-
}): boolean;
|
|
20
16
|
export declare function convertFetchLiquidityToOperateData(lqData: ExcludeNone<FetchLiquidityListLqList>[0]): OperatePool;
|
|
17
|
+
export declare function convertFetchPoolToOperateData(pool: FetchPoolList[0], chainId: number): OperatePool;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-beta.0",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@babel/runtime": "^7.17.0",
|
|
59
|
+
"@dodoex/api": ">=0.0.1",
|
|
59
60
|
"@dodoex/components": "^2.0.1",
|
|
60
61
|
"@dodoex/icons": "^2.0.1",
|
|
61
62
|
"@emotion/react": "^11.10.0",
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
"@reduxjs/toolkit": "^1.6.1",
|
|
69
70
|
"@semantic-release/changelog": "^6.0.1",
|
|
70
71
|
"@semantic-release/git": "^10.0.1",
|
|
72
|
+
"@tanstack/react-query": "^5.18.1",
|
|
71
73
|
"@web3-react/core": "8.2.0",
|
|
72
74
|
"@web3-react/eip1193": "8.2.0",
|
|
73
75
|
"@web3-react/metamask": "8.2.1",
|
|
@@ -75,11 +77,18 @@
|
|
|
75
77
|
"@web3-react/walletconnect-v2": "8.3.6",
|
|
76
78
|
"axios": "^0.27.2",
|
|
77
79
|
"bignumber.js": "^9.0.2",
|
|
80
|
+
"dayjs": "^1.11.11",
|
|
78
81
|
"identicon.js": "^2.3.3",
|
|
82
|
+
"konva": "^9.3.6",
|
|
79
83
|
"lodash": "^4.17.21",
|
|
80
84
|
"make-plural": "^7.0.0",
|
|
85
|
+
"react-icons": "^5.0.1",
|
|
86
|
+
"react-infinite-scroller": "^1.2.6",
|
|
87
|
+
"react-konva": "^18.2.10",
|
|
81
88
|
"react-window": "^1.8.8",
|
|
82
|
-
"
|
|
89
|
+
"recharts": "^2.12.7",
|
|
90
|
+
"semantic-release": "^19.0.2",
|
|
91
|
+
"zustand": "^4.5.1"
|
|
83
92
|
},
|
|
84
93
|
"peerDependencies": {
|
|
85
94
|
"@babel/runtime": ">=7.17.0",
|
|
@@ -107,6 +116,7 @@
|
|
|
107
116
|
"@types/identicon.js": "^2.3.1",
|
|
108
117
|
"@types/jest": "^29.0.3",
|
|
109
118
|
"@types/lodash": "^4.14.184",
|
|
119
|
+
"@types/react-infinite-scroller": "^1.2.5",
|
|
110
120
|
"@types/react-window": "^1.8.5",
|
|
111
121
|
"@uniswap/sdk-core": "^3.0.2",
|
|
112
122
|
"babel-plugin-macros": "^3.1.0",
|