@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,21 @@
|
|
|
1
|
+
import { PMMModel } from '@dodoex/api';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { BaseMinAndZoomMultiples } from './helper';
|
|
4
|
+
export declare function useDepthLinePoints({ chartHeight, chartWidth, midPrice, xPoints, pmmModel, baseMinAndZoomMultiples, buyYPortion, sellYPortion, }: {
|
|
5
|
+
chartHeight: number;
|
|
6
|
+
chartWidth: number;
|
|
7
|
+
xPoints: number;
|
|
8
|
+
midPrice: BigNumber;
|
|
9
|
+
baseMinAndZoomMultiples: BaseMinAndZoomMultiples;
|
|
10
|
+
buyYPortion: BigNumber;
|
|
11
|
+
sellYPortion: BigNumber;
|
|
12
|
+
pmmModel: PMMModel;
|
|
13
|
+
}): {
|
|
14
|
+
quoteLinePoints: number[];
|
|
15
|
+
quoteLineAreaPoints: number[];
|
|
16
|
+
quoteLineAreaLinearGradientEndPointY: number;
|
|
17
|
+
baseLinePoints: number[];
|
|
18
|
+
baseLineAreaPoints: number[];
|
|
19
|
+
baseLineAreaLinearGradientEndPointY: number;
|
|
20
|
+
midPriceLinePoints: number[];
|
|
21
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function useGridLinePoints({ chartHeight, chartWidth, horizontalLineCount, verticalLineCount, }: {
|
|
2
|
+
chartHeight: number;
|
|
3
|
+
chartWidth: number;
|
|
4
|
+
horizontalLineCount: number;
|
|
5
|
+
verticalLineCount: number;
|
|
6
|
+
}): {
|
|
7
|
+
horizontalGridLines: number[][];
|
|
8
|
+
verticalGridLines: number[][];
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseMinAndZoomMultiples } from './helper';
|
|
2
|
+
export declare function useHorizontalLabelPoints({ chartHeight, chartWidth, xAxisPoints, oneXPx, baseMinAndZoomMultiples, }: {
|
|
3
|
+
chartHeight: number;
|
|
4
|
+
chartWidth: number;
|
|
5
|
+
xAxisPoints: number;
|
|
6
|
+
oneXPx: number;
|
|
7
|
+
baseMinAndZoomMultiples: BaseMinAndZoomMultiples;
|
|
8
|
+
}): {
|
|
9
|
+
horizontalLabelTickPoints: number[][];
|
|
10
|
+
horizontalLabelTextPoints: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
text: string;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PmmModelParams } from '@dodoex/api';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
/**
|
|
4
|
+
* Calculate marginPrice for buying or selling target baseToken
|
|
5
|
+
* @param param0
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function computeMarginPrice({ params, target, isBuy, }: {
|
|
9
|
+
params: PmmModelParams;
|
|
10
|
+
target: BigNumber;
|
|
11
|
+
isBuy?: boolean;
|
|
12
|
+
}): BigNumber;
|
|
13
|
+
/**
|
|
14
|
+
* Calculate the margin price for selling target baseTokens
|
|
15
|
+
*/
|
|
16
|
+
export declare function computeSellMarginPrice({ params, target, }: {
|
|
17
|
+
params: PmmModelParams;
|
|
18
|
+
target: BigNumber;
|
|
19
|
+
}): BigNumber;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare function DepthChartV2({ title, titleColor, description, descriptionColor, buttonColor, placeholder, }: {
|
|
3
|
+
title: string;
|
|
4
|
+
titleColor: string;
|
|
5
|
+
description: string;
|
|
6
|
+
descriptionColor: string;
|
|
7
|
+
buttonColor: string;
|
|
8
|
+
placeholder: React.ReactElement;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export default DepthChartV2;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Title: 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 Description: 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 OptButton: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
} & import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
14
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
+
}, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function chartT(key: string, params: any): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PMMModel, PmmModelParams } from '@dodoex/api';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
export declare const bgColor = "rgba(38, 39, 41, 0.3)";
|
|
5
|
+
export interface ColorMap {
|
|
6
|
+
grid?: string;
|
|
7
|
+
midPriceLine?: string;
|
|
8
|
+
leftBg?: (string | number)[];
|
|
9
|
+
leftLine?: string;
|
|
10
|
+
leftColor?: string;
|
|
11
|
+
rightBg?: (string | number)[];
|
|
12
|
+
rightLine?: string;
|
|
13
|
+
rightColor?: string;
|
|
14
|
+
tooltipBg?: string;
|
|
15
|
+
tooltipColor?: string;
|
|
16
|
+
textColor?: 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
|
+
colorMap?: ColorMap;
|
|
27
|
+
};
|
|
28
|
+
export declare function LiquidityChartKonva({ width, height, params, baseTokenSymbol, quoteTokenSymbol, colorMap, }: Props): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { StatAreaPoint } from './usePoints';
|
|
3
|
+
export declare function computePointYByHeight({ maxHeight, gridAreaHeight, value, }: {
|
|
4
|
+
maxHeight: BigNumber;
|
|
5
|
+
gridAreaHeight: number;
|
|
6
|
+
value: BigNumber;
|
|
7
|
+
}): number;
|
|
8
|
+
export declare function computeHeightByPointY({ maxY, gridAreaHeight, y, }: {
|
|
9
|
+
maxY: BigNumber;
|
|
10
|
+
gridAreaHeight: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}): BigNumber;
|
|
13
|
+
/**
|
|
14
|
+
* Obtain the closest data point from the data point collection through the coordinate point x and a series of point data subsets from the point to the center line.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getStatAreaPointByX({ targetPrice, areaPoints, isLeft, }: {
|
|
17
|
+
targetPrice: BigNumber;
|
|
18
|
+
areaPoints: StatAreaPoint[];
|
|
19
|
+
isLeft: boolean;
|
|
20
|
+
}): {
|
|
21
|
+
targetAreaStatPoint: StatAreaPoint | null;
|
|
22
|
+
targetAreaStatPoints: StatAreaPoint[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Given a pixel's x-coordinate, width, logarithm of the minimum value of the abscissa, and logarithm of the maximum value of the abscissa, calculate the logarithmic coordinate corresponding to the point
|
|
26
|
+
*/
|
|
27
|
+
export declare function computeTargetPrice({ x, width, minXLN10, maxXLN10, }: {
|
|
28
|
+
x: number;
|
|
29
|
+
width: number;
|
|
30
|
+
minXLN10: BigNumber;
|
|
31
|
+
maxXLN10: BigNumber;
|
|
32
|
+
}): BigNumber;
|
|
33
|
+
/**
|
|
34
|
+
* Given the logarithm of a coordinate, the width, the logarithm of the minimum value of the abscissa, and the logarithm of the maximum value of the abscissa, calculate the x coordinate corresponding to the point
|
|
35
|
+
*/
|
|
36
|
+
export declare function computeTargetX({ width, targetLN10, minXLN10, maxXLN10, }: {
|
|
37
|
+
width: number;
|
|
38
|
+
targetLN10: BigNumber;
|
|
39
|
+
minXLN10: BigNumber;
|
|
40
|
+
maxXLN10: BigNumber;
|
|
41
|
+
}): number;
|
|
42
|
+
/**
|
|
43
|
+
* Calculate logarithm
|
|
44
|
+
*/
|
|
45
|
+
export declare function computeTargetLN({ target }: {
|
|
46
|
+
target: BigNumber;
|
|
47
|
+
}): BigNumber;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PMMModel, PmmModelParams } from '@dodoex/api';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
import { ColorMap } from './LiquidityChartKonva';
|
|
5
|
+
declare type Props = {
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
baseTokenSymbol: string;
|
|
9
|
+
quoteTokenSymbol: string;
|
|
10
|
+
pmmModel?: PMMModel;
|
|
11
|
+
pmmParams?: PmmModelParams;
|
|
12
|
+
midPrice?: BigNumber;
|
|
13
|
+
notShowTipText?: boolean;
|
|
14
|
+
colorMap?: ColorMap;
|
|
15
|
+
};
|
|
16
|
+
declare const LiquidityChart: React.FC<Props>;
|
|
17
|
+
export default LiquidityChart;
|
|
@@ -0,0 +1,9 @@
|
|
|
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 TipWrapper: 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>, {}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function useGridLine({ gridAreaHeight, gridAreaWidth, horizontalLineCount, verticalLineCount, color, }: {
|
|
3
|
+
gridAreaHeight: number;
|
|
4
|
+
gridAreaWidth: number;
|
|
5
|
+
horizontalLineCount: number;
|
|
6
|
+
verticalLineCount: number;
|
|
7
|
+
color?: string;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
export declare function useHorizontalLabel({ minXLN10, maxXLN10, labelCount, gridAreaHeight, gridAreaWidth, color, }: {
|
|
4
|
+
minXLN10: BigNumber;
|
|
5
|
+
maxXLN10: BigNumber;
|
|
6
|
+
labelCount: number;
|
|
7
|
+
gridAreaHeight: number;
|
|
8
|
+
gridAreaWidth: number;
|
|
9
|
+
color?: string;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { ColorMap } from './LiquidityChartKonva';
|
|
4
|
+
import { StatAreaPoint } from './usePoints';
|
|
5
|
+
export declare function useLiquidityLine({ leftStatAreaPoints, rightStatAreaPoints, minXLN10, maxXLN10, maxLeftHeight, maxRightHeight, gridAreaWidth, gridAreaHeight, colorMap, }: {
|
|
6
|
+
leftStatAreaPoints: Array<StatAreaPoint>;
|
|
7
|
+
rightStatAreaPoints: Array<StatAreaPoint>;
|
|
8
|
+
minXLN10: BigNumber;
|
|
9
|
+
maxXLN10: BigNumber;
|
|
10
|
+
maxLeftHeight: BigNumber;
|
|
11
|
+
maxRightHeight: BigNumber;
|
|
12
|
+
gridAreaWidth: number;
|
|
13
|
+
gridAreaHeight: number;
|
|
14
|
+
colorMap: ColorMap;
|
|
15
|
+
}): {
|
|
16
|
+
leftLine: JSX.Element;
|
|
17
|
+
rightLine: JSX.Element;
|
|
18
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PmmModelParams } from '@dodoex/api';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
/**
|
|
4
|
+
* data point
|
|
5
|
+
*/
|
|
6
|
+
export declare type StatPoint = {
|
|
7
|
+
giveAmount: BigNumber;
|
|
8
|
+
getAmount: BigNumber;
|
|
9
|
+
price: BigNumber;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Drawing method:
|
|
13
|
+
Substitute the minimum value to get the height of the center point, which is the bottom edge of the area chart. Substitute the maximum value to get the vertex of the area chart. The length of the bottom edge from the vertex is the price range.
|
|
14
|
+
|
|
15
|
+
Divide the total area into one hundred equal parts. Calculate each part on the basis of the previous part. Substitute the new area into the formula to get a new price. The difference from the previous price is the width of the rectangle. The area is divided by The width is the height of the rectangle, which is the ordinate.
|
|
16
|
+
|
|
17
|
+
First, calculate a series of points as a point set based on the rectangular accumulation method.
|
|
18
|
+
|
|
19
|
+
When the mouse hovers, the abscissa is the price. Find the closest price in the point set. Use this price as the end point and the center line as the starting point to get a subset of the point set. You can draw a line by combining the center line and the abscissa. The area of the trapezoid can be drawn.
|
|
20
|
+
|
|
21
|
+
Update: Taking Δl as the ordinate, Δl = (the difference between the quantity passed in from the previous point and the next point) * (the difference between the quantity obtained from the previous point and the next point)
|
|
22
|
+
*/
|
|
23
|
+
export declare type StatAreaPoint = {
|
|
24
|
+
area: BigNumber;
|
|
25
|
+
price: BigNumber;
|
|
26
|
+
middlePrice: BigNumber;
|
|
27
|
+
rectangleHeight: BigNumber;
|
|
28
|
+
};
|
|
29
|
+
export declare function usePoints({ params }: {
|
|
30
|
+
params: PmmModelParams;
|
|
31
|
+
}): {
|
|
32
|
+
leftStatAreaPoints: StatAreaPoint[];
|
|
33
|
+
rightStatAreaPoints: StatAreaPoint[];
|
|
34
|
+
maxLeftHeight: BigNumber;
|
|
35
|
+
maxRightHeight: BigNumber;
|
|
36
|
+
minXLN10: BigNumber;
|
|
37
|
+
maxXLN10: BigNumber;
|
|
38
|
+
middlePriceLN10: BigNumber;
|
|
39
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ContractRequests, GraphQLRequests, TokenApi } from '@dodoex/api';
|
|
1
2
|
import { ChainId } from './chains';
|
|
2
3
|
export declare enum APIServiceKey {
|
|
3
4
|
routePrice = "routePrice",
|
|
@@ -14,3 +15,7 @@ export declare const getCGTokenListAPI: (chainId: ChainId) => any;
|
|
|
14
15
|
export declare const RoutePriceAPI = "https://api.dodoex.io/route-service/v2/widget/getdodoroute";
|
|
15
16
|
export declare const FiatPriceAPI = "https://api.dodoex.io/frontend-price-api/current/batch";
|
|
16
17
|
export declare function getAPIService(key: APIServiceKey, serviceProps?: Partial<APIServices>): string;
|
|
18
|
+
export declare const contractRequests: ContractRequests;
|
|
19
|
+
export declare const tokenContractRequests: ContractRequests;
|
|
20
|
+
export declare const tokenApi: TokenApi;
|
|
21
|
+
export declare const graphQLRequests: GraphQLRequests;
|
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
GOERLI = 5,
|
|
4
|
-
BSC = 56,
|
|
5
|
-
POLYGON = 137,
|
|
6
|
-
ARBITRUM_ONE = 42161,
|
|
7
|
-
AURORA = 1313161554,
|
|
8
|
-
OKCHAIN = 66,
|
|
9
|
-
OPTIMISM = 10,
|
|
10
|
-
AVALANCHE = 43114,
|
|
11
|
-
CONFLUX = 1030,
|
|
12
|
-
BASE = 8453,
|
|
13
|
-
LINEA = 59144,
|
|
14
|
-
SCROLL = 534352,
|
|
15
|
-
MANTA = 169,
|
|
16
|
-
MANTLE = 5000
|
|
17
|
-
}
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export { ChainId, etherTokenAddress, basicTokenMap } from '@dodoex/api';
|
|
18
3
|
export declare const rpcServerMap: {
|
|
19
4
|
[key in ChainId]: Array<string>;
|
|
20
5
|
};
|
|
21
|
-
export declare const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
6
|
+
export declare const getRpcSingleUrlMap: (newRpcServerMap?: {
|
|
7
|
+
[chainId: number]: string[];
|
|
8
|
+
} | undefined) => {
|
|
9
|
+
1: string;
|
|
10
|
+
5: string;
|
|
11
|
+
11155111: string;
|
|
12
|
+
56: string;
|
|
13
|
+
137: string;
|
|
14
|
+
42161: string;
|
|
15
|
+
1313161554: string;
|
|
16
|
+
66: string;
|
|
17
|
+
10: string;
|
|
18
|
+
43114: string;
|
|
19
|
+
1030: string;
|
|
20
|
+
8453: string;
|
|
21
|
+
59144: string;
|
|
22
|
+
534352: string;
|
|
23
|
+
169: string;
|
|
24
|
+
5000: string;
|
|
34
25
|
};
|
|
35
26
|
export declare const platformIdMap: {
|
|
36
27
|
[key in ChainId]: string;
|
|
@@ -38,4 +29,6 @@ export declare const platformIdMap: {
|
|
|
38
29
|
export declare const scanUrlDomainMap: {
|
|
39
30
|
[key in ChainId]: string;
|
|
40
31
|
};
|
|
41
|
-
export {
|
|
32
|
+
export declare const ThegraphKeyMap: {
|
|
33
|
+
[key in ChainId]: string;
|
|
34
|
+
};
|
|
@@ -10,3 +10,5 @@ export declare function getLastToken(side: TokenInfo['side']): LastTokenCache |
|
|
|
10
10
|
export declare function setLastToken(side: TokenInfo['side'], token: LastTokenCache | null): void;
|
|
11
11
|
export declare function getLastSlippage(isBridge: boolean): number | null;
|
|
12
12
|
export declare function setLastSlippage(isBridge: boolean, slippage: number | string | null): void;
|
|
13
|
+
export declare const RiskOncePageLocalStorage: Record<string, string>;
|
|
14
|
+
export declare function getIsPoolEditRiskWarningOpen(): boolean;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export declare const AUTO_SWAP_SLIPPAGE_PROTECTION = "auto";
|
|
2
2
|
export declare const AUTO_LIQUIDITY_SLIPPAGE_PROTECTION = "0.1";
|
|
3
|
+
/**
|
|
4
|
+
* slippage protection
|
|
5
|
+
* First read out the reserve of the pool base and quote. If the slippage is 1%, then it is reserve * 0.99 and pass in func.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SLIPPAGE_PROTECTION = 0.01;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BridgeTXRequest } from '../../components/Bridge/BridgeSummaryDialog';
|
|
2
2
|
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
3
|
+
import { Metadata } from '../Submission/types';
|
|
3
4
|
export default function useExecuteBridgeRoute({ route, bridgeOrderTxRequest, }: {
|
|
4
5
|
route?: BridgeRouteI;
|
|
5
6
|
bridgeOrderTxRequest?: BridgeTXRequest;
|
|
6
|
-
}): () => Promise<import("../Submission/types").ExecutionResult> | undefined;
|
|
7
|
+
}): (metadata?: Metadata) => Promise<import("../Submission/types").ExecutionResult> | undefined;
|
|
@@ -7,12 +7,30 @@ export declare enum State {
|
|
|
7
7
|
Failed = 2,
|
|
8
8
|
Warning = 3
|
|
9
9
|
}
|
|
10
|
+
export declare enum MetadataFlag {
|
|
11
|
+
addLiquidity = "addLiquidity",
|
|
12
|
+
removeLiquidity = "removeLiquidity",
|
|
13
|
+
createDPPPool = "createDPPPool",
|
|
14
|
+
createDSPPool = "createDSPPool",
|
|
15
|
+
createDVMPool = "createDVMPool",
|
|
16
|
+
stakeMining = "stakeMining",
|
|
17
|
+
unstakeMining = "unstakeMining",
|
|
18
|
+
claimMining = "claimMining"
|
|
19
|
+
}
|
|
20
|
+
export declare type Metadata = Record<string, any>;
|
|
10
21
|
export declare type Request = {
|
|
11
22
|
brief: string;
|
|
12
23
|
spec: StepSpec;
|
|
13
24
|
subtitle?: string | React.ReactNode | null;
|
|
25
|
+
metadata?: Metadata;
|
|
14
26
|
tx: string;
|
|
15
27
|
nonce?: number;
|
|
28
|
+
doneTime?: number;
|
|
29
|
+
};
|
|
30
|
+
export declare type TextUpdater = (request: Request) => null | {
|
|
31
|
+
brief: string;
|
|
32
|
+
subtitle?: string;
|
|
33
|
+
metadata?: Metadata;
|
|
16
34
|
};
|
|
17
35
|
export declare type Requests = Map<string, [Request, State]>;
|
|
18
36
|
export declare enum ExecutionResult {
|
|
@@ -34,13 +52,24 @@ export declare type ExecutionCtx = {
|
|
|
34
52
|
* @param subtitle: Additional hint text. e.g.: "10 USDT to 10 USDC"
|
|
35
53
|
* @param early: When given, the returned promise resolves when user confirmed in their wallet.
|
|
36
54
|
* @param mixpanelProps: mixpanel properties
|
|
37
|
-
* @param submittedConfirmBack:
|
|
55
|
+
* @param submittedConfirmBack: submittedConfirmBack
|
|
56
|
+
* @param successBack: successBack
|
|
57
|
+
* @param metadata: metadata
|
|
38
58
|
*/
|
|
39
|
-
execute: (brief: string, spec: StepSpec,
|
|
59
|
+
execute: (brief: string, spec: StepSpec, params?: {
|
|
60
|
+
subtitle?: string | React.ReactNode | null;
|
|
61
|
+
early?: boolean;
|
|
62
|
+
submittedBack?: () => void;
|
|
63
|
+
mixpanelProps?: Record<string, any>;
|
|
64
|
+
submittedConfirmBack?: () => void;
|
|
65
|
+
successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void;
|
|
66
|
+
metadata?: Metadata;
|
|
67
|
+
}) => Promise<ExecutionResult>;
|
|
40
68
|
/**
|
|
41
69
|
* order
|
|
42
70
|
*/
|
|
43
71
|
requests?: Requests;
|
|
72
|
+
updateText: (upd: TextUpdater) => void;
|
|
44
73
|
setShowing?: React.Dispatch<React.SetStateAction<Showing | null>>;
|
|
45
74
|
waitingSubmit: boolean;
|
|
46
75
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Step as StepSpec } from './spec';
|
|
3
|
-
import { ExecutionResult, State, Request, Showing } from './types';
|
|
3
|
+
import { ExecutionResult, State, Request, Showing, ExecutionCtx, TextUpdater } from './types';
|
|
4
4
|
export interface ExecutionProps {
|
|
5
5
|
onTxFail?: (error: Error, data: any) => void;
|
|
6
6
|
onTxSubmit?: (tx: string, data: any) => void;
|
|
@@ -22,8 +22,9 @@ export default function useExecution({ onTxFail, onTxSubmit, onTxSuccess, }?: Ex
|
|
|
22
22
|
setErrorMessage: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
23
23
|
closeShowing: () => void;
|
|
24
24
|
ctxVal: {
|
|
25
|
-
execute: (brief: string, spec: StepSpec,
|
|
25
|
+
execute: (brief: string, spec: StepSpec, options?: Parameters<ExecutionCtx['execute']>[2]) => Promise<ExecutionResult.Failed | ExecutionResult.Success | ExecutionResult.Submitted>;
|
|
26
26
|
requests: Map<string, [Request, State]>;
|
|
27
|
+
updateText: (upd: TextUpdater) => void;
|
|
27
28
|
setShowing: import("react").Dispatch<import("react").SetStateAction<Showing | null>>;
|
|
28
29
|
waitingSubmit: boolean;
|
|
29
30
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ChainId } from '../../constants/chains';
|
|
2
1
|
import { TokenInfo } from '../Token';
|
|
3
2
|
export interface FetchFiatPriceProps {
|
|
4
|
-
chainId: ChainId | undefined;
|
|
5
3
|
fromToken: TokenInfo | null;
|
|
6
4
|
toToken: TokenInfo | null;
|
|
7
5
|
}
|
|
8
|
-
export declare function useFetchFiatPrice({ fromToken, toToken
|
|
6
|
+
export declare function useFetchFiatPrice({ fromToken, toToken }: FetchFiatPriceProps): {
|
|
9
7
|
loading: boolean;
|
|
8
|
+
isLoading: boolean;
|
|
10
9
|
refetch: () => void;
|
|
10
|
+
error: Error | null;
|
|
11
11
|
toFiatPrice: string;
|
|
12
12
|
fromFiatPrice: string;
|
|
13
13
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
2
3
|
import { TokenInfo, TokenList } from './type';
|
|
3
4
|
import { ChainId } from '../../constants/chains';
|
|
4
5
|
export declare const getFuzzySearchTokenSort: (token: TokenInfo, search: string, { matchAddress, }?: {
|
|
5
6
|
matchAddress?: boolean | undefined;
|
|
6
7
|
}) => number;
|
|
7
|
-
export default function useTokenList({ value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, side, chainId: chainIdProps, visible, defaultLoadBalance, }: {
|
|
8
|
-
value?: TokenInfo | null
|
|
9
|
-
onChange: (token: TokenInfo
|
|
8
|
+
export default function useTokenList({ value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, side, chainId: chainIdProps, visible, defaultLoadBalance, multiple, }: {
|
|
9
|
+
value?: TokenInfo | null | Array<TokenInfo>;
|
|
10
|
+
onChange: (token: TokenInfo | Array<TokenInfo>, isOccupied: boolean) => void;
|
|
10
11
|
/** token pair usage */
|
|
11
12
|
occupiedAddrs?: string[];
|
|
12
13
|
/** token pair usage */
|
|
@@ -21,10 +22,15 @@ export default function useTokenList({ value, onChange, occupiedAddrs, occupiedC
|
|
|
21
22
|
/** Token Picker visible */
|
|
22
23
|
visible?: boolean;
|
|
23
24
|
defaultLoadBalance?: boolean;
|
|
25
|
+
multiple?: boolean;
|
|
24
26
|
}): {
|
|
25
27
|
filter: string;
|
|
26
28
|
setFilter: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
27
29
|
showTokenList: TokenList;
|
|
28
30
|
onSelectToken: (token: TokenInfo) => void;
|
|
29
31
|
popularTokenList: TokenInfo[];
|
|
32
|
+
tokenInfoMap: Map<string, {
|
|
33
|
+
balance: BigNumber;
|
|
34
|
+
allowance: BigNumber;
|
|
35
|
+
}>;
|
|
30
36
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo, TokenList } from './type';
|
|
3
|
+
interface SimpleToken {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
address: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function getDefaultToken({ side, tokenList, occupyToken, needFindToken, chainId, }: {
|
|
8
|
+
side: TokenInfo['side'];
|
|
9
|
+
tokenList: TokenList;
|
|
10
|
+
occupyToken?: TokenInfo | null;
|
|
11
|
+
needFindToken?: SimpleToken;
|
|
12
|
+
chainId?: number;
|
|
13
|
+
}): {
|
|
14
|
+
findToken: TokenInfo | null;
|
|
15
|
+
defaultToken: TokenInfo | null;
|
|
16
|
+
};
|
|
17
|
+
export declare function useTokenListDefaultToken({ chainId, account, defaultBaseToken: defaultBaseSimpleToken, defaultQuoteToken: defaultQuoteSimpleToken, tokenListInclude, }?: {
|
|
18
|
+
chainId?: number;
|
|
19
|
+
account?: string;
|
|
20
|
+
defaultBaseToken?: SimpleToken;
|
|
21
|
+
defaultQuoteToken?: SimpleToken;
|
|
22
|
+
/** Must exist in tokenList */
|
|
23
|
+
tokenListInclude?: boolean;
|
|
24
|
+
}): {
|
|
25
|
+
defaultBaseToken: TokenInfo | null;
|
|
26
|
+
defaultQuoteToken: TokenInfo | null;
|
|
27
|
+
defaultBaseTokenLoading: boolean | undefined;
|
|
28
|
+
defaultQuoteTokenLoading: boolean | undefined;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { TokenInfo, TokenList } from './type';
|
|
2
2
|
export default function useTokenListFetchBalance({ chainId, value, tokenList, popularTokenList, visible, defaultLoadBalance, }: {
|
|
3
3
|
chainId: number;
|
|
4
|
-
value?: TokenInfo | null
|
|
4
|
+
value?: TokenInfo | null | Array<TokenInfo>;
|
|
5
5
|
tokenList: TokenList;
|
|
6
6
|
popularTokenList?: TokenList;
|
|
7
7
|
visible?: boolean;
|
|
8
8
|
defaultLoadBalance?: boolean;
|
|
9
|
-
}):
|
|
9
|
+
}): Map<string, {
|
|
10
|
+
balance: import("bignumber.js").BigNumber;
|
|
11
|
+
allowance: import("bignumber.js").BigNumber;
|
|
12
|
+
}>;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import { TokenInfo } from './type';
|
|
3
|
-
export declare function useTokenStatus(token: TokenInfo | undefined | null, { amount, contractAddress, offset, overrideBalance, }?: {
|
|
3
|
+
export declare function useTokenStatus(token: TokenInfo | undefined | null, { amount, contractAddress, offset, overrideBalance, skip, }?: {
|
|
4
4
|
amount?: string | number | BigNumber;
|
|
5
5
|
contractAddress?: string;
|
|
6
6
|
offset?: BigNumber;
|
|
7
7
|
overrideBalance?: BigNumber | null;
|
|
8
|
+
skip?: boolean;
|
|
8
9
|
}): {
|
|
9
10
|
isApproving: boolean;
|
|
10
11
|
isGetApproveLoading: boolean;
|
|
11
12
|
needApprove: boolean;
|
|
12
13
|
needReset: boolean | undefined;
|
|
14
|
+
needShowTokenStatusButton: boolean;
|
|
13
15
|
insufficientBalance: boolean;
|
|
14
16
|
loading: boolean;
|
|
17
|
+
approveTitle: string;
|
|
15
18
|
submitApprove: () => Promise<void>;
|
|
16
19
|
getMaxBalance: () => string;
|
|
17
20
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { default as useMultiContract, getContract } from './useMultiContract';
|
|
2
1
|
export { default as useFetchTokens } from './useFetchTokens';
|
|
3
2
|
export { default as useFetchETHBalance } from './useFetchETHBalance';
|
|
4
3
|
export { default as useFetchBlockNumber } from './useFetchBlockNumber';
|
|
5
|
-
export * from './token';
|