@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
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
3
|
import { BridgeRouteI } from '../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
4
4
|
import { TokenInfo } from '../../../hooks/Token/type';
|
|
5
|
-
export default function RouteCard({ fromToken, toToken, fromChainId, toChainId, fromAmount,
|
|
5
|
+
export default function RouteCard({ fromToken, toToken, fromChainId, toChainId, fromAmount, toTokenAmount, toolDetails, product, executionDuration, feeUSD, selected, setSelected, spenderContractAddress, isBestPrice, }: {
|
|
6
6
|
fromToken?: TokenInfo;
|
|
7
7
|
toToken?: TokenInfo;
|
|
8
8
|
fromChainId: number;
|
|
9
9
|
toChainId: number;
|
|
10
10
|
fromAmount?: BridgeRouteI['fromAmount'];
|
|
11
|
-
fromTokenBalance: BigNumber | null;
|
|
12
11
|
toTokenAmount?: BigNumber | null;
|
|
13
12
|
toolDetails: BridgeRouteI['step']['toolDetails'];
|
|
14
13
|
product: BridgeRouteI['product'];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function Confirm({ open, onClose, title, children, singleBtn, danger, singleBtnText, cancelText, confirmText, disabledConfirm, confirmLoading, isManualClose, onConfirm, }: React.PropsWithChildren<{
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
singleBtn?: boolean;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
singleBtnText?: React.ReactNode;
|
|
9
|
+
cancelText?: React.ReactNode;
|
|
10
|
+
confirmText?: React.ReactNode;
|
|
11
|
+
disabledConfirm?: boolean;
|
|
12
|
+
confirmLoading?: boolean;
|
|
13
|
+
isManualClose?: boolean;
|
|
14
|
+
onConfirm?: () => void;
|
|
15
|
+
}>): JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '@dodoex/components';
|
|
3
3
|
import { ChainId } from '../../constants/chains';
|
|
4
|
-
export default function NeedConnectButton({ chainId, ...props }: ButtonProps & {
|
|
4
|
+
export default function NeedConnectButton({ chainId, includeButton, ...props }: ButtonProps & {
|
|
5
5
|
/** chainId that needs to be connected */
|
|
6
6
|
chainId?: ChainId;
|
|
7
|
+
includeButton?: boolean;
|
|
7
8
|
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
export declare function HowItWorks({ title, desc, linkTo, LeftImage, sx, }: {
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
desc: React.ReactNode;
|
|
6
|
+
linkTo: string;
|
|
7
|
+
LeftImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement> & {
|
|
8
|
+
title?: string | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
sx?: BoxProps['sx'];
|
|
11
|
+
}): JSX.Element;
|
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
import { ChainId } from '../../../../constants/chains';
|
|
3
3
|
export interface ConnectWalletProps {
|
|
4
4
|
needSwitchChain?: ChainId;
|
|
5
|
-
/** If true is returned, the default wallet connection logic will not be executed */
|
|
6
|
-
onConnectWalletClick?: () => boolean | Promise<boolean>;
|
|
7
5
|
}
|
|
8
|
-
export default function ConnectWallet({ needSwitchChain
|
|
6
|
+
export default function ConnectWallet({ needSwitchChain }: ConnectWalletProps): JSX.Element;
|
|
@@ -4,6 +4,7 @@ export interface DialogProps {
|
|
|
4
4
|
open: boolean;
|
|
5
5
|
onClose?: () => void;
|
|
6
6
|
afterClose?: () => void;
|
|
7
|
+
scope?: boolean;
|
|
7
8
|
title?: string | React.ReactNode;
|
|
8
9
|
rightSlot?: React.ReactNode;
|
|
9
10
|
canBack?: boolean;
|
|
@@ -11,4 +12,4 @@ export interface DialogProps {
|
|
|
11
12
|
height?: number | string;
|
|
12
13
|
testId?: string;
|
|
13
14
|
}
|
|
14
|
-
export default function Dialog({
|
|
15
|
+
export default function Dialog({ scope, ...props }: DialogProps): JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import BigNumber from 'bignumber.js';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare function BalanceText({ onClick, balance, decimals, address, showMaxBtn, loading, balanceText, }: {
|
|
4
4
|
onClick?: (max: string) => void;
|
|
5
5
|
balance: BigNumber | null;
|
|
6
6
|
decimals?: number;
|
|
7
7
|
address?: string;
|
|
8
8
|
showMaxBtn?: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
balanceText?: React.ReactNode;
|
|
9
11
|
}): JSX.Element;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps } from '@dodoex/components';
|
|
3
|
-
export declare
|
|
4
|
-
readOnly?: boolean;
|
|
3
|
+
export declare const NumberInput: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
readOnly?: boolean | undefined;
|
|
5
5
|
sx?: BoxProps['sx'];
|
|
6
|
-
value?: string;
|
|
7
|
-
decimals?: number;
|
|
8
|
-
onFocus?: () => void;
|
|
9
|
-
onChange?: (v: string) => void;
|
|
6
|
+
value?: string | undefined;
|
|
7
|
+
decimals?: number | undefined;
|
|
8
|
+
onFocus?: (() => void) | undefined;
|
|
9
|
+
onChange?: ((v: string) => void) | undefined;
|
|
10
10
|
suffix?: React.ReactNode | string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
suffixGap?: number | undefined;
|
|
12
|
+
withClear?: boolean | undefined;
|
|
13
|
+
placeholder?: string | undefined;
|
|
14
|
+
readonlyShowSuffix?: boolean | undefined;
|
|
15
|
+
typography?: string | undefined;
|
|
16
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare function TokenLogoCollapse({ token, onClick, showChainLogo, }: {
|
|
4
|
-
token?:
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export declare function TokenLogoCollapse({ token, onClick, showChainLogo, readonly, }: {
|
|
4
|
+
token?: TokenInfo | null;
|
|
5
5
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
6
6
|
showChainLogo?: boolean;
|
|
7
|
+
readonly?: boolean;
|
|
7
8
|
}): JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TokenPickerProps } from '../../../TokenPicker';
|
|
3
3
|
import { DialogProps } from '../Dialog';
|
|
4
|
-
export declare function TokenPickerDialog({ open, value, onClose, occupiedAddrs, occupiedChainId, onTokenChange, side, defaultLoadBalance, }: {
|
|
4
|
+
export declare function TokenPickerDialog({ open, title, value, onClose, occupiedAddrs, occupiedChainId, onTokenChange, side, defaultLoadBalance, multiple, searchPlaceholder, searchOtherAddress, chainId, }: {
|
|
5
5
|
open: boolean;
|
|
6
|
+
title?: React.ReactNode | string;
|
|
6
7
|
occupiedAddrs?: string[];
|
|
7
8
|
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
8
9
|
onClose: DialogProps['onClose'];
|
|
@@ -10,4 +11,8 @@ export declare function TokenPickerDialog({ open, value, onClose, occupiedAddrs,
|
|
|
10
11
|
onTokenChange: TokenPickerProps['onChange'];
|
|
11
12
|
side?: TokenPickerProps['side'];
|
|
12
13
|
defaultLoadBalance?: boolean;
|
|
14
|
+
multiple?: TokenPickerProps['multiple'];
|
|
15
|
+
searchPlaceholder?: TokenPickerProps['searchPlaceholder'];
|
|
16
|
+
searchOtherAddress?: TokenPickerProps['searchOtherAddress'];
|
|
17
|
+
chainId?: TokenPickerProps['chainId'];
|
|
13
18
|
}): JSX.Element;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
4
|
import { TokenPickerProps } from '../../../TokenPicker';
|
|
5
|
+
import BigNumber from 'bignumber.js';
|
|
6
|
+
import { ChainId } from '@dodoex/api';
|
|
4
7
|
export interface TokenCardProps {
|
|
5
8
|
amt: string;
|
|
6
9
|
fiatPriceTxt?: string | React.ReactNode;
|
|
@@ -10,14 +13,24 @@ export interface TokenCardProps {
|
|
|
10
13
|
occupiedAddrs?: string[];
|
|
11
14
|
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
12
15
|
onMaxClick?: (max: string) => void;
|
|
13
|
-
token?:
|
|
16
|
+
token?: TokenInfo | null;
|
|
14
17
|
onInputChange?: (v: string) => void;
|
|
15
18
|
onInputFocus?: () => void;
|
|
16
19
|
onTokenClick?: () => void;
|
|
17
|
-
onTokenChange:
|
|
20
|
+
onTokenChange?: (token: TokenInfo, isOccupied: boolean) => void;
|
|
18
21
|
side?: TokenPickerProps['side'];
|
|
19
22
|
showChainLogo?: boolean;
|
|
20
23
|
onlyCurrentChain?: boolean;
|
|
21
24
|
defaultLoadBalance?: boolean;
|
|
25
|
+
overrideBalance?: BigNumber | null;
|
|
26
|
+
overrideBalanceLoading?: boolean;
|
|
27
|
+
balanceText?: React.ReactNode;
|
|
28
|
+
showPercentage?: boolean;
|
|
29
|
+
inputReadonlyTooltip?: React.ReactNode;
|
|
30
|
+
inputTypography?: string;
|
|
31
|
+
chainId?: ChainId;
|
|
32
|
+
hideToken?: boolean;
|
|
22
33
|
}
|
|
23
|
-
export declare function
|
|
34
|
+
export declare function CardPlus(): JSX.Element;
|
|
35
|
+
export declare function CardPlusConnected(): JSX.Element;
|
|
36
|
+
export declare function TokenCard({ sx, amt, token, readOnly, showMaxBtn, onMaxClick, fiatPriceTxt, occupiedAddrs, occupiedChainId, onInputFocus, onTokenClick, onInputChange, onTokenChange, side, showChainLogo, onlyCurrentChain, defaultLoadBalance, overrideBalance, overrideBalanceLoading, balanceText, showPercentage, inputReadonlyTooltip, inputTypography, chainId, hideToken, }: TokenCardProps): JSX.Element;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ConnectWalletProps } from './components/ConnectWallet';
|
|
3
2
|
import { GetAutoSlippage } from '../../hooks/setting/useSetAutoSlippage';
|
|
4
3
|
export interface SwapProps {
|
|
5
4
|
/** Higher priority setting slippage */
|
|
6
5
|
getAutoSlippage?: GetAutoSlippage;
|
|
7
|
-
onConnectWalletClick?: ConnectWalletProps['onConnectWalletClick'];
|
|
8
6
|
}
|
|
9
|
-
export declare function Swap({ getAutoSlippage
|
|
7
|
+
export declare function Swap({ getAutoSlippage }?: SwapProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function TokenItem({ chainId, address, showName, size, offset, rightContent, }: {
|
|
3
|
+
chainId: number;
|
|
4
|
+
address: string;
|
|
5
|
+
showName: string;
|
|
6
|
+
size: number;
|
|
7
|
+
offset?: number;
|
|
8
|
+
rightContent?: React.ReactNode;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -12,5 +12,7 @@ export interface TokenLogoProps {
|
|
|
12
12
|
cross?: boolean;
|
|
13
13
|
sx?: BoxProps['sx'];
|
|
14
14
|
chainId?: number;
|
|
15
|
+
noShowChain?: boolean;
|
|
16
|
+
noBorder?: boolean;
|
|
15
17
|
}
|
|
16
|
-
export default function TokenLogo({ width, height, marginRight, url, zIndex, cross, address: addressProps, token: tokenProps, sx, chainId, }: TokenLogoProps): React.ReactElement;
|
|
18
|
+
export default function TokenLogo({ width, height, marginRight, url, zIndex, cross, address: addressProps, token: tokenProps, sx, chainId, noShowChain, noBorder, }: TokenLogoProps): React.ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps } from '@dodoex/components';
|
|
3
|
-
export
|
|
3
|
+
export interface TokenLogoPairProps {
|
|
4
4
|
tokens: Array<{
|
|
5
5
|
address?: string;
|
|
6
6
|
logoURI?: string;
|
|
@@ -13,4 +13,5 @@ export declare function TokenLogoPair({ tokens, width, height, gap, cross, mr, c
|
|
|
13
13
|
chainId?: number;
|
|
14
14
|
showChainLogo?: boolean;
|
|
15
15
|
sx?: BoxProps['sx'];
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
export declare function TokenLogoPair({ tokens, width, height, gap, cross, mr, chainId, showChainLogo, sx, }: TokenLogoPairProps): JSX.Element | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { TokenInfo } from './../../hooks/Token';
|
|
3
|
-
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
export default function TokenItem({ token, disabled, style, balance: balanceBigNumber, onClick, }: {
|
|
4
5
|
token: TokenInfo;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
style?: CSSProperties;
|
|
8
|
+
balance?: BigNumber;
|
|
7
9
|
onClick: () => void;
|
|
8
10
|
}): JSX.Element;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import type { TokenInfo } from '../../hooks/Token';
|
|
3
3
|
import { ChainId } from '../../constants/chains';
|
|
4
4
|
export interface TokenPickerProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
chainId?: ChainId;
|
|
6
|
+
value?: TokenInfo | null | Array<TokenInfo>;
|
|
7
|
+
onChange: (token: TokenInfo | Array<TokenInfo>, isOccupied: boolean) => void;
|
|
7
8
|
/** token pair usage */
|
|
8
9
|
occupiedAddrs?: string[];
|
|
9
10
|
/** token pair usage */
|
|
@@ -15,5 +16,9 @@ export interface TokenPickerProps {
|
|
|
15
16
|
visible?: boolean;
|
|
16
17
|
side?: 'from' | 'to';
|
|
17
18
|
defaultLoadBalance?: boolean;
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
searchPlaceholder?: string;
|
|
21
|
+
/** like search pool address */
|
|
22
|
+
searchOtherAddress?: (address: string) => Promise<JSX.Element | null>;
|
|
18
23
|
}
|
|
19
|
-
export default function TokenPicker({ value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, visible, side, defaultLoadBalance, }: TokenPickerProps): JSX.Element;
|
|
24
|
+
export default function TokenPicker({ chainId, value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, visible, side, defaultLoadBalance, multiple, searchPlaceholder, searchOtherAddress, }: TokenPickerProps): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps } from '@dodoex/components';
|
|
3
|
+
import { useTokenStatus } from '../hooks/Token/useTokenStatus';
|
|
4
|
+
export default function TokenStatusButton({ status, children, buttonProps, }: React.PropsWithChildren<{
|
|
5
|
+
status: ReturnType<typeof useTokenStatus>;
|
|
6
|
+
buttonProps?: ButtonProps;
|
|
7
|
+
}>): JSX.Element;
|
|
@@ -8,8 +8,9 @@ import { ChainId } from '../../constants/chains';
|
|
|
8
8
|
import { DefaultTokenInfo } from '../../hooks/Token/type';
|
|
9
9
|
import { APIServices } from '../../constants/api';
|
|
10
10
|
import { SwapProps } from '../Swap';
|
|
11
|
+
import { GlobalFunctionConfig } from '../../providers/GlobalConfigContext';
|
|
11
12
|
export declare const WIDGET_CLASS_NAME = "dodo-widget-container";
|
|
12
|
-
export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, ExecutionProps, SwapProps {
|
|
13
|
+
export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, ExecutionProps, GlobalFunctionConfig, SwapProps {
|
|
13
14
|
apikey?: string;
|
|
14
15
|
theme?: ThemeOptions;
|
|
15
16
|
colorMode?: PaletteMode;
|
|
@@ -27,5 +28,6 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
27
28
|
crossChain?: boolean;
|
|
28
29
|
noPowerBy?: boolean;
|
|
29
30
|
onProviderChanged?: (provider?: any) => void;
|
|
31
|
+
gotoBuyToken?: GlobalFunctionConfig['gotoBuyToken'];
|
|
30
32
|
}
|
|
31
33
|
export declare function Widget(props: PropsWithChildren<WidgetProps>): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function WidgetConfirm({ open, onClose, title, children, singleBtn, danger, singleBtnText, cancelText, confirmText, disabledConfirm, confirmLoading, isManualClose, onConfirm, }: React.PropsWithChildren<{
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
singleBtn?: boolean;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
singleBtnText?: React.ReactNode;
|
|
9
|
+
cancelText?: React.ReactNode;
|
|
10
|
+
confirmText?: React.ReactNode;
|
|
11
|
+
disabledConfirm?: boolean;
|
|
12
|
+
confirmLoading?: boolean;
|
|
13
|
+
isManualClose?: boolean;
|
|
14
|
+
onConfirm?: () => void;
|
|
15
|
+
}>): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface WidgetDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
afterClose?: () => void;
|
|
6
|
+
title?: string | React.ReactNode;
|
|
7
|
+
titleCenter?: boolean;
|
|
8
|
+
rightSlot?: React.ReactNode;
|
|
9
|
+
canBack?: boolean;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
width?: number | string;
|
|
12
|
+
height?: number | string;
|
|
13
|
+
testId?: string;
|
|
14
|
+
}
|
|
15
|
+
export default function WidgetDialog({ open, onClose, afterClose, title, titleCenter, rightSlot, canBack, children, width, height, testId, }: WidgetDialogProps): JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BaseButton: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
display?: CSSProperties['display'];
|
|
4
|
+
hidden?: boolean;
|
|
5
|
+
children?: JSX.Element | Array<JSX.Element | undefined> | string | undefined;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
export declare const Display: React.MemoExoticComponent<({ display, hidden, children, style, }: Props) => JSX.Element>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Input: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
error?: boolean | undefined;
|
|
7
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ISwtichBtn extends React.HTMLProps<HTMLInputElement> {
|
|
3
|
+
shouldSwitch?: boolean;
|
|
4
|
+
variant?: 'dark' | 'light';
|
|
5
|
+
}
|
|
6
|
+
export declare const TogglePriceIcon: ({ shouldSwitch, variant }: ISwtichBtn) => JSX.Element;
|
|
7
|
+
export declare const ToggleIconWithoutBg: () => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PMMModel, PmmModelParams } from '@dodoex/api';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
import { BaseMinAndZoomMultiples } from './helper';
|
|
5
|
+
export declare const bgColor = "rgba(38, 39, 41, 0.3)";
|
|
6
|
+
export interface ColorMap {
|
|
7
|
+
grid?: string;
|
|
8
|
+
midPriceLine?: string;
|
|
9
|
+
leftBg?: (string | number)[];
|
|
10
|
+
leftLine?: string;
|
|
11
|
+
leftColor?: string;
|
|
12
|
+
rightBg?: (string | number)[];
|
|
13
|
+
rightLine?: string;
|
|
14
|
+
rightColor?: string;
|
|
15
|
+
tooltipBg?: string;
|
|
16
|
+
tooltipColor?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare type Props = {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
params: PmmModelParams;
|
|
22
|
+
midPrice: BigNumber;
|
|
23
|
+
pmmModel: PMMModel;
|
|
24
|
+
baseTokenSymbol: string;
|
|
25
|
+
quoteTokenSymbol: string;
|
|
26
|
+
baseMinAndZoomMultiples: BaseMinAndZoomMultiples;
|
|
27
|
+
colorMap?: ColorMap;
|
|
28
|
+
setBaseMinAndZoomMultiples: React.Dispatch<React.SetStateAction<BaseMinAndZoomMultiples>>;
|
|
29
|
+
};
|
|
30
|
+
export declare function DepthChartKonva({ width, height, midPrice, pmmModel, params, baseTokenSymbol, quoteTokenSymbol, baseMinAndZoomMultiples, colorMap, setBaseMinAndZoomMultiples, }: Props): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import Konva from 'konva';
|
|
3
|
+
import { PMMModel } from '@dodoex/api';
|
|
4
|
+
export declare function colorRgb(str: string): string;
|
|
5
|
+
export declare type EvaluatedPoint = {
|
|
6
|
+
side: 'bid' | 'ask' | 'no-one';
|
|
7
|
+
vert: BigNumber;
|
|
8
|
+
base: BigNumber;
|
|
9
|
+
quote: BigNumber;
|
|
10
|
+
};
|
|
11
|
+
export declare type BaseMinAndZoomMultiples = {
|
|
12
|
+
baseMin: BigNumber;
|
|
13
|
+
zoomMultiples: number;
|
|
14
|
+
/** Price impact point active display hover */
|
|
15
|
+
targetMarginPriceX: number;
|
|
16
|
+
};
|
|
17
|
+
export declare function evalPoint({ val, model, }: {
|
|
18
|
+
val: BigNumber;
|
|
19
|
+
model: PMMModel;
|
|
20
|
+
midPrice: BigNumber;
|
|
21
|
+
}): EvaluatedPoint;
|
|
22
|
+
/**
|
|
23
|
+
* Returns two vertical coordinates, buyBaseVert on the left and sellBaseVert on the right.
|
|
24
|
+
* @param param0
|
|
25
|
+
*/
|
|
26
|
+
export declare function computeBaseVert({ midPrice, q, q0, pmmModel, }: {
|
|
27
|
+
midPrice: BigNumber;
|
|
28
|
+
q: number;
|
|
29
|
+
q0: number;
|
|
30
|
+
pmmModel: PMMModel;
|
|
31
|
+
}): {
|
|
32
|
+
buyBaseVert: BigNumber;
|
|
33
|
+
sellBaseVert: BigNumber;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* // 1000/800 The price represented by one pixel
|
|
37
|
+
// Maximum value on the right side of the middle price = middle price * 10 = middle price * 10^1
|
|
38
|
+
// Calculate the x-axis coordinate (price): middle price*10^(xPortion*x)+middle price; x is the number of equal parts that divide the right half into 50 parts
|
|
39
|
+
* @param chartWidth icon width
|
|
40
|
+
* @param zoomMultiples magnification factors
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
export declare function computeXPortion(chartWidth: number, zoomMultiples?: number): BigNumber;
|
|
44
|
+
export declare function updateTooltip({ tooltip, x, chartWidth, chartHeight, buyBaseVert, sellBaseVert, pmmModel, midPrice, baseTokenSymbol, quoteTokenSymbol, t, baseMinAndZoomMultiples, isHover, color, leftColor, rightColor, }: {
|
|
45
|
+
x: number;
|
|
46
|
+
tooltip: Konva.Layer;
|
|
47
|
+
chartWidth: number;
|
|
48
|
+
chartHeight: number;
|
|
49
|
+
buyBaseVert: BigNumber;
|
|
50
|
+
sellBaseVert: BigNumber;
|
|
51
|
+
pmmModel: PMMModel;
|
|
52
|
+
midPrice: BigNumber;
|
|
53
|
+
baseTokenSymbol: string;
|
|
54
|
+
quoteTokenSymbol: string;
|
|
55
|
+
t: any;
|
|
56
|
+
baseMinAndZoomMultiples: BaseMinAndZoomMultiples;
|
|
57
|
+
isHover?: boolean;
|
|
58
|
+
color?: string;
|
|
59
|
+
leftColor?: string;
|
|
60
|
+
rightColor?: string;
|
|
61
|
+
}): void;
|
|
62
|
+
/**
|
|
63
|
+
* Calculate the minimum value on the left by pulling distance or button click
|
|
64
|
+
*/
|
|
65
|
+
export declare function computeBaseMinByDistance({ dragDistance, prevBaseMin, chartWidth, zoomMultiples, }: {
|
|
66
|
+
dragDistance: number;
|
|
67
|
+
prevBaseMin: BigNumber;
|
|
68
|
+
chartWidth: number;
|
|
69
|
+
zoomMultiples: number;
|
|
70
|
+
}): BigNumber;
|
|
71
|
+
export declare const baseZoomMultiples = 1;
|
|
72
|
+
export declare function computeZoomMultiplesWhenZoom({ prevZoomMultiples, zoomIn, }: {
|
|
73
|
+
prevZoomMultiples: number;
|
|
74
|
+
zoomIn: boolean;
|
|
75
|
+
}): number;
|
|
76
|
+
/**
|
|
77
|
+
* Given a price target corresponding to the abscissa, calculate the abscissa of the point
|
|
78
|
+
* The buying impact point is at the left 1/4 position
|
|
79
|
+
* The selling impact point is 3/4 on the right
|
|
80
|
+
*
|
|
81
|
+
* Returns a coordinate point, baseMin and zoomMultiples
|
|
82
|
+
*
|
|
83
|
+
* Take the initial state as the starting point, that is, midPrice * 10 ^ -1 as the starting point of the horizontal axis, and it is a left-right symmetrical state, that is, the logarithm of the horizontal axis is from -1 -> 0 -> 1
|
|
84
|
+
*
|
|
85
|
+
* type === 'sell'
|
|
86
|
+
* targetPrice = midPrice * 10 ^ n
|
|
87
|
+
* n = Math.log10(targetPrice / midPrice)
|
|
88
|
+
* n = maxN * (3 / 4)
|
|
89
|
+
*
|
|
90
|
+
* If the new price is within the existing range, the zoom factor will not be adjusted (the price impact will not change the shape of the graph after graph scaling or translation)
|
|
91
|
+
* If it is not within the current interval, check whether it is midPrice * 10 ^-1 and midPrice * 10^1. If you still do not adjust the zoom factor, hit the specified point directly, otherwise you need to adjust the zoom factor (avoid inputting extremely small values) The value cannot be scaled to the specified range, resulting in stuck)
|
|
92
|
+
*/
|
|
93
|
+
export declare function computeTargetXByTargetPrice({ type, targetPrice, midPrice, width, }: {
|
|
94
|
+
type: 'buy' | 'sell';
|
|
95
|
+
targetPrice: BigNumber;
|
|
96
|
+
midPrice: BigNumber;
|
|
97
|
+
width: number;
|
|
98
|
+
}): {
|
|
99
|
+
zoomMultiples: BigNumber;
|
|
100
|
+
targetX: number;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* If the new price is within the existing range, the zoom factor will not be adjusted (the price impact will not change the shape of the graph after graph scaling or translation)
|
|
104
|
+
* If it is not within the current interval, check whether it is midPrice * 10 ^-1 and midPrice * 10^1. If it is within the range, adjust the zoom factor to 1, and then impact to the specified point, otherwise you need to adjust the zoom factor ( Avoid entering extremely small values that may result in inability to scale to the specified range and cause stucks)
|
|
105
|
+
*
|
|
106
|
+
* Returns an abscissa and a flag indicating whether to skip
|
|
107
|
+
*/
|
|
108
|
+
export declare function beforePriceImpactEffect({ currentBaseMinAndZoomMultiples, targetPrice, midPrice, width, }: {
|
|
109
|
+
currentBaseMinAndZoomMultiples: BaseMinAndZoomMultiples;
|
|
110
|
+
targetPrice: BigNumber;
|
|
111
|
+
midPrice: BigNumber;
|
|
112
|
+
width: number;
|
|
113
|
+
}): {
|
|
114
|
+
isSkip: boolean;
|
|
115
|
+
targetX: number;
|
|
116
|
+
baseMin: BigNumber;
|
|
117
|
+
zoomMultiples: number;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Recalculate baseMin after the zoom factor changes
|
|
121
|
+
*/
|
|
122
|
+
export declare function computeBaseAfterZoom({ midPrice, zoomMultiples, }: {
|
|
123
|
+
midPrice: BigNumber;
|
|
124
|
+
zoomMultiples: number;
|
|
125
|
+
}): BigNumber;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { ColorMap } from './DepthChartKonva';
|
|
4
|
+
import { PMMModel, PmmModelParams } from '@dodoex/api';
|
|
5
|
+
declare type Props = {
|
|
6
|
+
chartId: string;
|
|
7
|
+
width?: number;
|
|
8
|
+
baseTokenSymbol: string;
|
|
9
|
+
quoteTokenSymbol: string;
|
|
10
|
+
pmmModel?: PMMModel;
|
|
11
|
+
pmmParams?: PmmModelParams;
|
|
12
|
+
midPrice?: BigNumber;
|
|
13
|
+
height?: number;
|
|
14
|
+
notShowAmountInput?: boolean;
|
|
15
|
+
colorMap?: ColorMap;
|
|
16
|
+
};
|
|
17
|
+
declare const DepthChart: React.FC<Props>;
|
|
18
|
+
export default DepthChart;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
+
export declare const AmountInputContainer: import("@emotion/styled").StyledComponent<{
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
+
export declare const InputSectionWrapper: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
borderColor?: string | undefined;
|
|
15
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
16
|
+
export declare const PriceImpactWrapper: import("@emotion/styled").StyledComponent<{
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
20
|
+
export declare const OptButtonGroup: import("@emotion/styled").StyledComponent<{
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const OptButton: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
} & import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
28
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
29
|
+
}, {}, {}>;
|