@dodoex/widgets 2.6.7 → 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/failed-list-e6c1e563-7122998d.cjs +1 -0
- package/dist/cjs/helper-889c5e9a.cjs +1 -0
- package/dist/cjs/index-183743c8.cjs +45 -0
- package/dist/cjs/index-1904ef51.cjs +50 -0
- package/dist/cjs/index-19cf4c6e.cjs +50 -0
- package/dist/cjs/index-1a21b21a.cjs +45 -0
- package/dist/cjs/index-246a9973.cjs +50 -0
- package/dist/cjs/index-256d5f78.cjs +12 -0
- package/dist/cjs/index-39149ce7.cjs +45 -0
- package/dist/cjs/index-4190bae6.cjs +58 -0
- package/dist/cjs/index-457c65f3.cjs +78 -0
- package/dist/cjs/index-5eca89d2.cjs +50 -0
- package/dist/cjs/index-64af8ffd.cjs +45 -0
- package/dist/cjs/index-f2a80623.cjs +45 -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-01f67a00.cjs +1 -0
- package/dist/cjs/lottie-09dbe581.cjs +1 -0
- package/dist/cjs/lottie-2035df95.cjs +1 -0
- package/dist/cjs/lottie-7e742196.cjs +1 -0
- package/dist/cjs/lottie-924a2436.cjs +1 -0
- package/dist/cjs/lottie-b9cf6aee.cjs +1 -0
- package/dist/cjs/lottie-c4b6404b.cjs +1 -0
- package/dist/cjs/lottie-ed4f1473.cjs +1 -0
- package/dist/cjs/lottie-edc8e0b8.cjs +1 -0
- package/dist/cjs/lottie-f516f300.cjs +1 -0
- package/dist/cjs/no-found-89a3b4af-9c7e1488.cjs +1 -0
- package/dist/cjs/no-result-01c60834-3e379801.cjs +1 -0
- package/dist/cjs/src/components/AddressWithLinkAndCopy.d.ts +22 -0
- package/dist/cjs/src/components/AutoButton.d.ts +7 -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/ConnectWalletDialog.d.ts +5 -0
- package/dist/cjs/src/components/ConnectWallet/NeedConnectButton.d.ts +8 -0
- package/dist/cjs/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +2 -0
- package/dist/cjs/src/components/CopyTooltipToast.d.ts +9 -0
- package/dist/cjs/src/components/DataCard/DataCardGroup.d.ts +9 -0
- package/dist/cjs/src/components/Dialog.d.ts +1 -0
- 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/List/EmptyList.d.ts +7 -0
- package/dist/cjs/src/components/List/FailedList.d.ts +6 -0
- package/dist/cjs/src/components/RiskDialog.d.ts +7 -0
- package/dist/cjs/src/components/SelectChain.d.ts +12 -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 +17 -0
- package/dist/cjs/src/components/TokenLogoSimple.d.ts +13 -0
- package/dist/cjs/src/components/TokenPicker/TokenItem.d.ts +3 -1
- package/dist/cjs/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +2 -0
- 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 +7 -0
- package/dist/cjs/src/constants/sessionStorage.d.ts +2 -0
- package/dist/cjs/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +2 -1
- package/dist/cjs/src/hooks/Chain/useChainList.d.ts +2 -0
- package/dist/cjs/src/hooks/Chain/useChainList.test.d.ts +1 -0
- package/dist/cjs/src/hooks/ConnectWallet/useWalletInfo.d.ts +6 -0
- package/dist/cjs/src/hooks/Submission/types.d.ts +31 -2
- package/dist/cjs/src/hooks/Submission/useBalanceUpdateLoading.d.ts +15 -0
- 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 +20 -0
- package/dist/cjs/src/hooks/Token/useTokenStatus.test.d.ts +1 -0
- 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/hooks/style/useWidgetDevice.d.ts +6 -0
- package/dist/cjs/src/hooks/usePrevious.d.ts +1 -0
- package/dist/cjs/src/index.d.ts +6 -0
- package/dist/cjs/src/providers/GlobalConfigContext.d.ts +21 -0
- package/dist/cjs/src/providers/i18n.d.ts +9 -0
- package/dist/cjs/src/providers/queryClient/index.d.ts +2 -0
- package/dist/cjs/src/providers/queryClient.d.ts +2 -0
- package/dist/cjs/src/router/index.d.ts +9 -0
- package/dist/cjs/src/router/types.d.ts +35 -0
- 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/utils/utils.d.ts +1 -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 +9 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +18 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +18 -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 +46 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePercentageRemove.d.ts +26 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +14 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +33 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/index.d.ts +14 -0
- package/dist/cjs/src/widgets/PoolWidget/PoolOperate/types.d.ts +17 -0
- 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 +48 -0
- 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/index.d.ts +2 -0
- package/dist/cjs/src/widgets/PoolWidget/list/AddLiquidity.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +8 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +5 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +17 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +9 -0
- package/dist/cjs/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +6 -0
- package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +58 -0
- package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +15 -0
- package/dist/cjs/src/widgets/PoolWidget/utils.d.ts +17 -0
- package/dist/failed-list-e6c1e563-478d73e0.js +1 -0
- package/dist/helper-7cc29594.js +1 -0
- package/dist/index-0e954ab8.js +45 -0
- package/dist/index-41db7f0e.js +45 -0
- package/dist/index-ae19eed4.js +12 -0
- package/dist/index-b07aac90.js +45 -0
- package/dist/index-c1a581ca.js +50 -0
- package/dist/index-c9dbe645.js +50 -0
- package/dist/index-cdf23d80.js +50 -0
- package/dist/index-d9d9a2cd.js +78 -0
- package/dist/index-db2c9b8f.js +58 -0
- package/dist/index-e58d24e5.js +50 -0
- package/dist/index-ee546021.js +45 -0
- package/dist/index-f055c418.js +45 -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-0a7cf033.js +1 -0
- package/dist/lottie-449d7c9a.js +1 -0
- package/dist/lottie-48250155.js +1 -0
- package/dist/lottie-9678ebc9.js +1 -0
- package/dist/lottie-9b618308.js +1 -0
- package/dist/lottie-b4708423.js +1 -0
- package/dist/lottie-baaed8fa.js +1 -0
- package/dist/lottie-d6631244.js +1 -0
- package/dist/lottie-ed5a9dfd.js +1 -0
- package/dist/lottie-f76894b7.js +1 -0
- package/dist/no-found-89a3b4af-763d58f5.js +1 -0
- package/dist/no-result-01c60834-7921d2fa.js +1 -0
- package/dist/src/components/AddressWithLinkAndCopy.d.ts +22 -0
- package/dist/src/components/AutoButton.d.ts +7 -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/ConnectWalletDialog.d.ts +5 -0
- package/dist/src/components/ConnectWallet/NeedConnectButton.d.ts +8 -0
- package/dist/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +2 -0
- package/dist/src/components/CopyTooltipToast.d.ts +9 -0
- package/dist/src/components/DataCard/DataCardGroup.d.ts +9 -0
- package/dist/src/components/Dialog.d.ts +1 -0
- package/dist/src/components/GoBack.d.ts +6 -0
- package/dist/src/components/HowItWorks.d.ts +11 -0
- package/dist/src/components/List/EmptyList.d.ts +7 -0
- package/dist/src/components/List/FailedList.d.ts +6 -0
- package/dist/src/components/RiskDialog.d.ts +7 -0
- package/dist/src/components/SelectChain.d.ts +12 -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 +17 -0
- package/dist/src/components/TokenLogoSimple.d.ts +13 -0
- package/dist/src/components/TokenPicker/TokenItem.d.ts +3 -1
- package/dist/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +2 -0
- 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 +7 -0
- package/dist/src/constants/sessionStorage.d.ts +2 -0
- package/dist/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +2 -1
- package/dist/src/hooks/Chain/useChainList.d.ts +2 -0
- package/dist/src/hooks/Chain/useChainList.test.d.ts +1 -0
- package/dist/src/hooks/ConnectWallet/useWalletInfo.d.ts +6 -0
- package/dist/src/hooks/Submission/types.d.ts +31 -2
- package/dist/src/hooks/Submission/useBalanceUpdateLoading.d.ts +15 -0
- 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 +20 -0
- package/dist/src/hooks/Token/useTokenStatus.test.d.ts +1 -0
- 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/hooks/style/useWidgetDevice.d.ts +6 -0
- package/dist/src/hooks/usePrevious.d.ts +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/providers/GlobalConfigContext.d.ts +21 -0
- package/dist/src/providers/i18n.d.ts +9 -0
- package/dist/src/providers/queryClient/index.d.ts +2 -0
- package/dist/src/providers/queryClient.d.ts +2 -0
- package/dist/src/router/index.d.ts +9 -0
- package/dist/src/router/types.d.ts +35 -0
- 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/utils/utils.d.ts +1 -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 +9 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +18 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +18 -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 +46 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePercentageRemove.d.ts +26 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +14 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +33 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/index.d.ts +14 -0
- package/dist/src/widgets/PoolWidget/PoolOperate/types.d.ts +17 -0
- 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 +48 -0
- 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/index.d.ts +2 -0
- package/dist/src/widgets/PoolWidget/list/AddLiquidity.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +8 -0
- package/dist/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +5 -0
- package/dist/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +17 -0
- package/dist/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +9 -0
- package/dist/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +6 -0
- package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +58 -0
- package/dist/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +15 -0
- package/dist/src/widgets/PoolWidget/utils.d.ts +17 -0
- package/package.json +12 -2
- package/dist/cjs/tokenList-ee5e15c8.cjs +0 -1
- package/dist/tokenList-4ef211de.js +0 -1
|
@@ -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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const AUTO_SWAP_SLIPPAGE_PROTECTION = "auto";
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
declare type BalanceData = {
|
|
3
|
+
[address: string]: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Record the loading status of the balance waiting to be updated after the chain is successfully uploaded
|
|
7
|
+
* Insert token data into logBalance in metadata when uploading, within 5 minutes after successful uploading. If the newly passed in balance is consistent with the previously recorded balance, loading will be returned
|
|
8
|
+
* After the balance is updated, or after 5 minutes, loading will return false. And delete the recorded metadata information to avoid calculating this data next time
|
|
9
|
+
* The 5-minute time limit is to avoid operations on other terminals or other tabs, which will cause the balance comparison to be invalid and keep loading.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useBalanceUpdateLoading: () => {
|
|
12
|
+
balanceData: BalanceData;
|
|
13
|
+
isTokenLoading: (address: string, balance: BigNumber | number | string) => boolean;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -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
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { TokenInfo } from './type';
|
|
3
|
+
export declare function useTokenStatus(token: TokenInfo | undefined | null, { amount, contractAddress, offset, overrideBalance, skip, }?: {
|
|
4
|
+
amount?: string | number | BigNumber;
|
|
5
|
+
contractAddress?: string;
|
|
6
|
+
offset?: BigNumber;
|
|
7
|
+
overrideBalance?: BigNumber | null;
|
|
8
|
+
skip?: boolean;
|
|
9
|
+
}): {
|
|
10
|
+
isApproving: boolean;
|
|
11
|
+
isGetApproveLoading: boolean;
|
|
12
|
+
needApprove: boolean;
|
|
13
|
+
needReset: boolean | undefined;
|
|
14
|
+
needShowTokenStatusButton: boolean;
|
|
15
|
+
insufficientBalance: boolean;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
approveTitle: string;
|
|
18
|
+
submitApprove: () => Promise<void>;
|
|
19
|
+
getMaxBalance: () => string;
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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';
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
export default function useFetchETHBalance(chainId?: number):
|
|
1
|
+
export default function useFetchETHBalance(chainId?: number): import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
|
|
2
|
+
symbol: string;
|
|
3
|
+
address: string;
|
|
4
|
+
name: string;
|
|
5
|
+
decimals: number;
|
|
6
|
+
balance: import("bignumber.js").BigNumber;
|
|
7
|
+
allowance: import("bignumber.js").BigNumber;
|
|
8
|
+
account: string;
|
|
9
|
+
spender: string | undefined;
|
|
10
|
+
chainId: number;
|
|
11
|
+
} | {
|
|
12
|
+
address: string;
|
|
13
|
+
decimals: number;
|
|
14
|
+
symbol: string;
|
|
15
|
+
name: string;
|
|
16
|
+
balance: import("bignumber.js").BigNumber;
|
|
17
|
+
spender: string | undefined;
|
|
18
|
+
allowance: import("bignumber.js").BigNumber;
|
|
19
|
+
chainId: number;
|
|
20
|
+
account?: undefined;
|
|
21
|
+
} | null, Error>;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
1
|
import { TokenList } from '../Token';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
declare type TokenInfoMap = Map<string, {
|
|
5
4
|
balance: BigNumber;
|
|
6
5
|
allowance: BigNumber;
|
|
7
|
-
|
|
8
|
-
symbol?: string;
|
|
9
|
-
name?: string;
|
|
10
|
-
};
|
|
6
|
+
}>;
|
|
11
7
|
export default function useFetchTokens({ tokenList, addresses: addressesProps, blockNumber, chainId, skip, }: {
|
|
12
8
|
tokenList?: TokenList;
|
|
13
9
|
addresses?: string[];
|
|
14
10
|
blockNumber?: number;
|
|
15
11
|
chainId?: number;
|
|
16
12
|
skip?: boolean;
|
|
17
|
-
}):
|
|
18
|
-
data: TokenResult[] | undefined;
|
|
19
|
-
};
|
|
13
|
+
}): TokenInfoMap;
|
|
20
14
|
export {};
|
|
@@ -13,4 +13,4 @@ export declare enum WatchResult {
|
|
|
13
13
|
export declare const getEstimateGas: (params: any, provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
|
|
14
14
|
export declare const getGasPrice: (provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
|
|
15
15
|
export declare const sendTransaction: (params: Deferrable<TransactionRequest>, provider: JsonRpcProvider) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
16
|
-
export declare const approve: (tokenAddress: string, accountAddress: string, contractAddress: string, allowance: BigNumber, provider: JsonRpcProvider
|
|
16
|
+
export declare const approve: (tokenAddress: string, accountAddress: string, contractAddress: string, allowance: BigNumber, provider: JsonRpcProvider) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function usePrevious<Value>(value: Value): Value | undefined;
|
package/dist/cjs/src/index.d.ts
CHANGED
|
@@ -2,5 +2,11 @@
|
|
|
2
2
|
import { WidgetProps } from './components/Widget';
|
|
3
3
|
export declare type SwapWidgetProps = WidgetProps;
|
|
4
4
|
export type { TokenInfo } from './hooks/Token/type';
|
|
5
|
+
export { Swap } from './components/Swap';
|
|
6
|
+
export { Pool } from './widgets/PoolWidget';
|
|
7
|
+
export { default as PoolOperate } from './widgets/PoolWidget/PoolOperate';
|
|
8
|
+
export type { PoolOperateProps } from './widgets/PoolWidget/PoolOperate';
|
|
9
|
+
export declare function WidgetProvider({ children, ...props }: React.PropsWithChildren<WidgetProps>): void;
|
|
5
10
|
export declare function SwapWidget(props: SwapWidgetProps): JSX.Element;
|
|
11
|
+
export declare function PoolWidget(props: SwapWidgetProps): JSX.Element;
|
|
6
12
|
export declare function InitSwapWidget(props: SwapWidgetProps): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TokenInfo } from '../hooks/Token';
|
|
3
|
+
export interface GlobalFunctionConfig {
|
|
4
|
+
widgetRef?: React.RefObject<HTMLDivElement>;
|
|
5
|
+
/** If true is returned, the default wallet connection logic will not be executed */
|
|
6
|
+
onConnectWalletClick?: () => boolean | Promise<boolean>;
|
|
7
|
+
/** When the token balance is insufficient, users can purchase or swap callbacks */
|
|
8
|
+
gotoBuyToken?: (params: {
|
|
9
|
+
token: TokenInfo;
|
|
10
|
+
account: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
getTokenLogoUrl?: (params: {
|
|
13
|
+
address?: string;
|
|
14
|
+
width?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
url?: string;
|
|
17
|
+
chainId?: number;
|
|
18
|
+
}) => string;
|
|
19
|
+
}
|
|
20
|
+
export declare const GlobalConfigContext: import("react").Context<GlobalFunctionConfig>;
|
|
21
|
+
export declare const useGlobalConfig: () => GlobalFunctionConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SupportedLang } from '../constants/locales';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface LangProviderProps {
|
|
4
|
+
locale?: SupportedLang;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function loadI18(locale?: SupportedLang): Promise<void>;
|
|
8
|
+
export declare function LangProvider({ locale, children }: LangProviderProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Page } from './types';
|
|
2
|
+
interface RouterState {
|
|
3
|
+
page?: Page;
|
|
4
|
+
historyList: Array<Page>;
|
|
5
|
+
push: (page: Page) => void;
|
|
6
|
+
back: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useRouterStore: import("zustand").UseBoundStore<import("zustand").StoreApi<RouterState>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ChainId } from '../constants/chains';
|
|
2
|
+
import { PoolTab } from '../widgets/PoolWidget/PoolList/hooks/usePoolListTabs';
|
|
3
|
+
export declare enum PageType {
|
|
4
|
+
Pool = "pool",
|
|
5
|
+
PoolDetail = "poolDetail",
|
|
6
|
+
CreatePool = "createPool",
|
|
7
|
+
ModifyPool = "modifyPool",
|
|
8
|
+
MiningDetail = "miningDetail"
|
|
9
|
+
}
|
|
10
|
+
interface PageTypeParams {
|
|
11
|
+
[PageType.Pool]: {
|
|
12
|
+
tab?: PoolTab;
|
|
13
|
+
} | undefined;
|
|
14
|
+
[PageType.PoolDetail]: {
|
|
15
|
+
address: string;
|
|
16
|
+
chainId: ChainId;
|
|
17
|
+
};
|
|
18
|
+
[PageType.ModifyPool]: {
|
|
19
|
+
address: string;
|
|
20
|
+
chainId: ChainId;
|
|
21
|
+
};
|
|
22
|
+
[PageType.CreatePool]: {
|
|
23
|
+
fromAddress?: string;
|
|
24
|
+
toAddress?: string;
|
|
25
|
+
} | undefined;
|
|
26
|
+
[PageType.MiningDetail]: {
|
|
27
|
+
address: string;
|
|
28
|
+
chainId: ChainId;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface Page<T extends PageType = PageType> {
|
|
32
|
+
type: T;
|
|
33
|
+
params?: PageTypeParams[T];
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
1
|
import { AppThunkAction } from '.';
|
|
3
2
|
import { TokenList, TokenInfo } from '../../hooks/Token';
|
|
4
|
-
import {
|
|
3
|
+
import { SlippageWithToken } from '../reducers/token';
|
|
5
4
|
export declare const setTokenList: (tokenList: TokenList) => AppThunkAction;
|
|
6
5
|
export declare const setPopularTokenList: (popularTokenList: TokenList) => AppThunkAction;
|
|
7
6
|
export declare const setSlippageWithTokens: (slippageWithTokens: SlippageWithToken[]) => AppThunkAction;
|
|
8
7
|
export declare const setDefaultFromToken: (token: TokenInfo) => AppThunkAction;
|
|
9
8
|
export declare const setDefaultToToken: (token: TokenInfo) => AppThunkAction;
|
|
10
|
-
export declare const setEthBalance: (chainId: number, balance: BigNumber) => AppThunkAction;
|
|
11
|
-
export declare const setTokenBalances: (accountBalances: AccountBalances) => AppThunkAction;
|
|
12
|
-
export declare const setTokenAllowances: (allowance: BigNumber) => AppThunkAction;
|
|
13
|
-
export declare const setBalanceLoadings: (balanceLoadings: {
|
|
14
|
-
[x: string]: boolean;
|
|
15
|
-
}) => AppThunkAction;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AppThunkAction } from '.';
|
|
2
2
|
import { ChainId } from '../../constants/chains';
|
|
3
|
+
import { State } from '../reducers/wallet';
|
|
3
4
|
export declare const setDefaultChainId: (chainId: ChainId) => AppThunkAction;
|
|
4
5
|
export declare const setFromTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
|
|
5
6
|
export declare const setBlockNumber: (blockNumber: number) => AppThunkAction;
|
|
7
|
+
export declare const setOpenConnectWalletInfo: (openConnectWalletInfo: State['openConnectWalletInfo']) => AppThunkAction;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/** @ts-ignore */
|
|
1
2
|
export declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").CombinedState<{
|
|
2
3
|
settings: import("./reducers/settings").State;
|
|
3
4
|
wallet: import("./reducers/wallet").State;
|
|
4
5
|
token: import("./reducers/token").State;
|
|
5
6
|
globals: import("./reducers/globals").State;
|
|
6
|
-
}>, import("redux").AnyAction,
|
|
7
|
+
}>, import("redux").AnyAction, [import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
8
|
+
settings: import("./reducers/settings").State;
|
|
9
|
+
wallet: import("./reducers/wallet").State;
|
|
10
|
+
token: import("./reducers/token").State;
|
|
11
|
+
globals: import("./reducers/globals").State;
|
|
12
|
+
}>, import("redux").AnyAction, undefined>]>;
|
|
@@ -15,13 +15,6 @@ export declare type SlippageWithToken = {
|
|
|
15
15
|
export declare type State = {
|
|
16
16
|
tokenList: TokenList;
|
|
17
17
|
popularTokenList: TokenList;
|
|
18
|
-
ethBalance: {
|
|
19
|
-
[key: number]: BigNumber;
|
|
20
|
-
};
|
|
21
|
-
accountBalances: AccountBalances;
|
|
22
|
-
balanceLoadings: {
|
|
23
|
-
[key in string]: boolean;
|
|
24
|
-
};
|
|
25
18
|
slippageWithTokens: SlippageWithToken[];
|
|
26
19
|
defaultFromToken?: DefaultTokenInfo;
|
|
27
20
|
defaultToToken?: DefaultTokenInfo;
|
|
@@ -4,6 +4,10 @@ export declare type State = {
|
|
|
4
4
|
chainId: ChainId;
|
|
5
5
|
fromTokenChainId?: ChainId;
|
|
6
6
|
latestBlockNumber: number;
|
|
7
|
+
openConnectWalletInfo: boolean | {
|
|
8
|
+
/** Wallet is connected, chainID needs to be switched */
|
|
9
|
+
chainId?: ChainId;
|
|
10
|
+
};
|
|
7
11
|
};
|
|
8
12
|
export declare const initialState: State;
|
|
9
13
|
declare const _default: (state: State | undefined, action: AnyAction) => State;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import BigNumber from 'bignumber.js';
|
|
2
1
|
import { ChainId } from '../../constants/chains';
|
|
3
2
|
import type { DefaultTokenInfo } from '../../hooks/Token';
|
|
4
3
|
import { RootState } from '../reducers';
|
|
@@ -6,14 +5,5 @@ export declare const getTokenList: (state?: RootState) => import("../../hooks/To
|
|
|
6
5
|
export declare const getAllTokenList: (state?: RootState) => import("../../hooks/Token").TokenInfo[];
|
|
7
6
|
export declare const getPopularTokenList: (chainId: ChainId, state?: RootState) => import("../../hooks/Token").TokenInfo[];
|
|
8
7
|
export declare const getSlippageWithTokens: (state?: RootState) => import("../reducers/token").SlippageWithToken[];
|
|
9
|
-
export declare const getAccountBalances: (state?: RootState) => import("../reducers/token").AccountBalances;
|
|
10
|
-
export declare const getEthBalance: (state?: RootState) => {
|
|
11
|
-
[key: number]: BigNumber;
|
|
12
|
-
};
|
|
13
8
|
export declare const getDefaultFromToken: (state?: RootState) => DefaultTokenInfo | undefined;
|
|
14
9
|
export declare const getDefaultToToken: (state?: RootState) => DefaultTokenInfo | undefined;
|
|
15
|
-
export declare const getTokenBalance: (tokenAddress: string, state?: RootState) => BigNumber;
|
|
16
|
-
export declare const getTokenAllowance: (tokenAddress: string, state?: RootState) => void;
|
|
17
|
-
export declare const getBalanceLoadings: (state?: RootState) => {
|
|
18
|
-
[x: string]: boolean;
|
|
19
|
-
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { RootState } from '../reducers';
|
|
2
|
-
export declare const getDefaultChainId: (state?: RootState) => import("
|
|
3
|
-
export declare const getFromTokenChainId: (state?: RootState) => import("
|
|
2
|
+
export declare const getDefaultChainId: (state?: RootState) => import("@dodoex/api").ChainId;
|
|
3
|
+
export declare const getFromTokenChainId: (state?: RootState) => import("@dodoex/api").ChainId | undefined;
|
|
4
4
|
export declare const getLatestBlockNumber: (state?: RootState) => number;
|
|
5
|
+
export declare const getOpenConnectWalletInfo: (state?: RootState) => boolean | {
|
|
6
|
+
chainId?: import("@dodoex/api").ChainId | undefined;
|
|
7
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChainId } from '../constants/chains';
|
|
2
2
|
export declare const isSameAddress: (tokenAddress1: string, tokenAddress2: string) => boolean;
|
|
3
|
-
export declare function isAddress(value: any):
|
|
3
|
+
export declare function isAddress(value: any): boolean;
|
|
4
4
|
export declare function isETHAddress(addr: string): boolean;
|
|
5
5
|
/**
|
|
6
6
|
* Returns true if the string value is zero in hex
|
|
@@ -12,4 +12,4 @@ export default function isZero(hexNumberString: string): boolean;
|
|
|
12
12
|
* @param address pool address
|
|
13
13
|
*/
|
|
14
14
|
export declare function truncatePoolAddress(address: string): string;
|
|
15
|
-
export declare function getEtherscanPage(
|
|
15
|
+
export declare function getEtherscanPage(chainId: ChainId, id?: string | null, prefix?: string): string;
|