@dodoex/widgets 3.14.1-react.9 → 3.16.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/LICENSE +674 -674
- package/README.md +70 -70
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/helper-Dry2KYfh.js +1 -0
- package/dist/helper-iRd-4sp4.cjs +1 -0
- package/dist/index-BRTABuMK.cjs +12 -0
- package/dist/index-Ca_h9Yxg.js +34 -0
- package/dist/index-DDwPtr_I.js +12 -0
- package/dist/index-DHfQEIuw.cjs +78 -0
- package/dist/index-DsQIchnJ.js +78 -0
- package/dist/index-vyWzevj_.cjs +34 -0
- package/dist/index.cjs +1 -2
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/components/Bridge/BridgeRouteShortCard.d.ts +2 -4
- package/dist/types/components/Bridge/BridgeSummaryDialog/index.d.ts +2 -2
- package/dist/types/components/Bridge/CompareRoute.d.ts +4 -0
- package/dist/types/components/Bridge/RouteVision.d.ts +7 -0
- package/dist/types/components/Bridge/RouteVisionModal.d.ts +5 -0
- package/dist/types/components/CardWidgets.d.ts +11 -2
- package/dist/types/components/ConnectWallet/NeedConnectButton.d.ts +1 -1
- package/dist/types/components/ErrorMessageDialog.d.ts +2 -1
- package/dist/types/components/HowItWorks.d.ts +5 -5
- package/dist/types/components/Message/index.d.ts +1 -1
- package/dist/types/components/SelectChain.d.ts +1 -2
- package/dist/types/components/SquaredGoBack.d.ts +5 -0
- package/dist/types/components/Swap/SwapOrderHistory/CrossChainOrderList.d.ts +4 -0
- package/dist/types/components/Swap/SwapOrderHistory/CrossOrderCard.d.ts +8 -0
- package/dist/types/components/Swap/SwapOrderHistory/RefundModal.d.ts +9 -0
- package/dist/types/components/Swap/SwapOrderHistory/SameChainOrderList.d.ts +3 -0
- package/dist/types/components/Swap/SwapOrderHistory/index.d.ts +6 -5
- package/dist/types/components/Swap/components/Dialog.d.ts +1 -1
- package/dist/types/components/Swap/components/FiatEntryAndGasRefuel.d.ts +1 -0
- package/dist/types/components/Swap/components/ReceiveAddressInputModal.d.ts +10 -0
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +2 -1
- package/dist/types/components/Swap/components/RouteVisionModal.d.ts +7 -0
- package/dist/types/components/Swap/components/SettingsDialog/index.d.ts +2 -1
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageSetting.d.ts +1 -2
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageWarning.d.ts +1 -3
- package/dist/types/components/Swap/components/SwapSettingsDialog/SupplierSelect.d.ts +5 -0
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +3 -2
- package/dist/types/components/Swap/components/TokenCard/TokenCardSwap.d.ts +48 -0
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +2 -0
- package/dist/types/components/Swap/components/TokenCard/WalletConnectBtn.d.ts +11 -0
- package/dist/types/components/Swap/components/TokenPairPriceWithToggle.d.ts +3 -2
- package/dist/types/components/Swap/index.d.ts +2 -4
- package/dist/types/components/TokenPicker/TokenItem.d.ts +3 -4
- package/dist/types/components/TokenPicker/index.d.ts +3 -3
- package/dist/types/components/Widget/index.d.ts +13 -15
- package/dist/types/components/WithExecutionDialog/index.d.ts +1 -2
- package/dist/types/constants/address.d.ts +6 -0
- package/dist/types/constants/api.d.ts +96 -4
- package/dist/types/constants/chainList.d.ts +10 -0
- package/dist/types/constants/chains.d.ts +17 -1
- package/dist/types/constants/sessionStorage.d.ts +1 -0
- package/dist/types/constants/swap.d.ts +1 -0
- package/dist/types/constants/tokenList.d.ts +8 -9
- package/dist/types/hooks/Bridge/createBridgeOrder.d.ts +4 -24
- package/dist/types/hooks/Bridge/useExecuteBridgeRoute.d.ts +1 -2
- package/dist/types/hooks/Bridge/useFeeList.d.ts +9 -0
- package/dist/types/hooks/Bridge/useFetchRoutePriceBridge.d.ts +138 -48
- package/dist/types/hooks/Bridge/useSendRoute.d.ts +1 -2
- package/dist/types/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +4 -1
- package/dist/types/hooks/Bridge/utils.d.ts +6 -0
- package/dist/types/hooks/ConnectWallet/index.d.ts +0 -2
- package/dist/types/hooks/ConnectWallet/useBTCWalletStore.d.ts +1 -0
- package/dist/types/hooks/ConnectWallet/useSwitchChain.d.ts +1 -12
- package/dist/types/hooks/Submission/types.d.ts +29 -1
- package/dist/types/hooks/Submission/useExecution.d.ts +1 -1
- package/dist/types/hooks/Swap/useBridgeSlippage.d.ts +3 -0
- package/dist/types/hooks/Swap/useCrossSwapOrderList.d.ts +215 -0
- package/dist/types/hooks/Swap/useExecuteSwap.d.ts +2 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +2 -4
- package/dist/types/hooks/Swap/useForecastSlippageList.d.ts +0 -6
- package/dist/types/hooks/Swap/usePrivacySwapStatus.d.ts +10 -0
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +2 -2
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +3 -5
- package/dist/types/hooks/Swap/useSwapSlippage.d.ts +0 -6
- package/dist/types/hooks/Swap/useSwitchToSupplierChain.d.ts +13 -0
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +34 -133
- package/dist/types/hooks/Token/type.d.ts +3 -2
- package/dist/types/hooks/Token/useInitTokenList.d.ts +2 -2
- package/dist/types/hooks/Token/useSelectChainList.d.ts +5 -5
- package/dist/types/hooks/Token/useTokenList.d.ts +4 -8
- package/dist/types/hooks/Token/useTokenListDefaultToken.d.ts +2 -2
- package/dist/types/hooks/Token/useTokenListFetchBalance.d.ts +1 -4
- package/dist/types/hooks/Token/useTokenStatus.d.ts +28 -2
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +2 -1
- package/dist/types/hooks/contract/useFetchMultiTokensForSingleChain.d.ts +20 -0
- package/dist/types/hooks/contract/useFetchTokens.d.ts +9 -4
- package/dist/types/hooks/useAddressValidation.d.ts +2 -0
- package/dist/types/hooks/useGlobalState.d.ts +2 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/hooks/useMessageState.d.ts +2 -1
- package/dist/types/hooks/useRouteVisionData.d.ts +17 -1
- package/dist/types/hooks/useTokenState.d.ts +3 -18
- package/dist/types/index.d.ts +27 -35
- package/dist/types/router/types.d.ts +5 -0
- package/dist/types/utils/CaipNetworksUtil.d.ts +5 -0
- package/dist/types/utils/address.d.ts +1 -1
- package/dist/types/utils/btc.d.ts +42 -0
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/reown-types.d.ts +28 -0
- package/dist/types/utils/solana.d.ts +7 -0
- package/dist/types/utils/token.d.ts +1 -1
- package/dist/types/utils/ton.d.ts +3 -0
- package/dist/types/utils/wallet.d.ts +2 -0
- package/dist/types/utils/zetachain_btc_test.d.ts +5 -0
- package/dist/types/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/usePrevious.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV2Create/Ratio.d.ts +1 -4
- package/dist/types/widgets/PoolWidget/AMMV2Create/Setting.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/AMMV3/AddLiquidityV3.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/hooks.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/index.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/RangeSetList.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/TokenPairSelect.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePoolTickData.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3DerivedMintInfo.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/AMMV3/reducer.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/usePriceInit.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +4 -4
- package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/PriceModeSetting.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/utils.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/ParametersTable.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +7 -5
- package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -7
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +7 -5
- package/dist/types/widgets/PoolWidget/PoolList/components/FilterGroup.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/GoPoolDetailBtn.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/SortButtonGroup.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/TableSortButton.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/tags.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +14 -6
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +8 -7
- package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +2 -6
- package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +2 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +2 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/components/OperateBtn.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +1 -5
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +49 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +2 -6
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +0 -12
- package/dist/types/widgets/PoolWidget/curve/Add.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/AddOrRemove.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/AllPools.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/curve/CurvePoolDetail.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/OperateDialog.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/Remove.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/ApyTooltip.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/CoinReservePieChart.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/CoinsLogoList.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/FilterAddressTags.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/LiquidityProvidersTable.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/OperateButtonContainer.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/curve/components/ParametersTable.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/PoolTitle.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/PoolTotalStats.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/SlippageBonus.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/curve/components/SwapsTable.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/TokenListPoolItem.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/useLiquidityProviders.d.ts +166 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/useLpTokenBalances.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolDetail.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolListFilterTokenAndPool.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolSwapList.d.ts +166 -0
- package/dist/types/widgets/PoolWidget/curve/types.d.ts +44 -0
- package/dist/types/widgets/PoolWidget/curve/utils.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/utils.d.ts +4 -0
- package/package.json +161 -161
- package/dist/28442382d977858a.svg +0 -9
- package/dist/8de9a184d4ef0a11.svg +0 -6
- package/dist/assets/bundle-BBymdwHN.css +0 -65
- package/dist/b3f16b2626f03378.svg +0 -10
- package/dist/ed726d76d93d4899.svg +0 -10
- package/dist/helper-Ds_8_78g.cjs +0 -2
- package/dist/helper-Ds_8_78g.cjs.map +0 -1
- package/dist/helper-l9rrGqkT.js +0 -1
- package/dist/index-B6OsCe_1.cjs +0 -13
- package/dist/index-B6OsCe_1.cjs.map +0 -1
- package/dist/index-Bcqk1fMQ.cjs +0 -15
- package/dist/index-Bcqk1fMQ.cjs.map +0 -1
- package/dist/index-Bp_1xqpK.js +0 -14
- package/dist/index-BrLsqpSG.js +0 -12
- package/dist/index-DyKuKZOu.cjs +0 -79
- package/dist/index-DyKuKZOu.cjs.map +0 -1
- package/dist/index-bVmd7uFj.js +0 -78
- package/dist/index.cjs.map +0 -1
- package/dist/types/components/ConnectWallet/ConnectWalletDialog.d.ts +0 -4
- package/dist/types/components/ConnectWallet/OpenConnectWalletInfo.d.ts +0 -2
- package/dist/types/components/SubmittedDialog.d.ts +0 -7
- package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +0 -5
- package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +0 -7
- package/dist/types/components/SwitchChainDialog/index.d.ts +0 -6
- package/dist/types/components/TokenPicker/ImportToken.d.ts +0 -6
- package/dist/types/components/TokenPicker/TokenDetailInfo.d.ts +0 -6
- package/dist/types/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +0 -9
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +0 -8
- package/dist/types/hooks/ConnectWallet/useWeb3Connectors.d.ts +0 -17
- package/dist/types/hooks/ConnectWallet/web3.d.ts +0 -10
- package/dist/types/hooks/Token/useFindTokenByAddress.test.d.ts +0 -1
- package/dist/types/hooks/Token/useSelectChainList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenStatus.test.d.ts +0 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/OnlyV3Toggle.d.ts +0 -7
- package/dist/types/widgets/PoolWidget/hooks/usePoolListMyLiquidity.d.ts +0 -15
- /package/dist/types/hooks/{Bridge/useFetchRoutePriceBridge.test.d.ts → useAddressValidation.test.d.ts} +0 -0
- /package/dist/types/{widgets/MiningWidget/hooks → hooks}/useRefetch.d.ts +0 -0
- /package/dist/types/{hooks/Chain/useChainList.test.d.ts → tests/1-get-account-state.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useFetchFiatPrice.test.d.ts → tests/1-send-ton.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useFetchRoutePrice.test.d.ts → utils/sui_test.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useMarginAmount.test.d.ts → utils/ton_test.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TokenList } from './Token';
|
|
3
3
|
export type AccountBalance = {
|
|
4
4
|
tokenBalances?: BigNumber;
|
|
5
5
|
tokenAllowances?: BigNumber;
|
|
@@ -10,24 +10,9 @@ export type AccountBalances = {
|
|
|
10
10
|
interface TokenState {
|
|
11
11
|
tokenList: TokenList;
|
|
12
12
|
popularTokenList: TokenList;
|
|
13
|
-
customTokenList: TokenList;
|
|
14
13
|
}
|
|
15
|
-
export declare const useTokenState: import("zustand").UseBoundStore<
|
|
16
|
-
|
|
17
|
-
setState(state: TokenState | ((state: TokenState) => TokenState), replace: true): unknown;
|
|
18
|
-
persist: {
|
|
19
|
-
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<TokenState, TokenState, unknown>>) => void;
|
|
20
|
-
clearStorage: () => void;
|
|
21
|
-
rehydrate: () => Promise<void> | void;
|
|
22
|
-
hasHydrated: () => boolean;
|
|
23
|
-
onHydrate: (fn: (state: TokenState) => void) => () => void;
|
|
24
|
-
onFinishHydration: (fn: (state: TokenState) => void) => () => void;
|
|
25
|
-
getOptions: () => Partial<import("zustand/middleware").PersistOptions<TokenState, TokenState, unknown>>;
|
|
26
|
-
};
|
|
27
|
-
}>;
|
|
28
|
-
export declare function getAllTokenList(state?: TokenState): TokenInfo[];
|
|
14
|
+
export declare const useTokenState: import("zustand").UseBoundStore<import("zustand").StoreApi<TokenState>>;
|
|
15
|
+
export declare function getAllTokenList(state?: TokenState): import("./Token").TokenInfo[];
|
|
29
16
|
export declare function setTokenList(value: TokenState['tokenList']): void;
|
|
30
17
|
export declare function setPopularTokenList(value: TokenState['popularTokenList']): void;
|
|
31
|
-
export declare function setCustomTokenList(value: TokenInfo): void;
|
|
32
|
-
export declare function deleteCustomTokenList(value: TokenInfo): void;
|
|
33
18
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,44 +1,36 @@
|
|
|
1
1
|
import { SwapProps } from './components/Swap';
|
|
2
2
|
import { WidgetProps } from './components/Widget';
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export { WIDGET_CLASS_NAME } from './components/Widget';
|
|
6
|
-
export { MetadataFlag } from './hooks/Submission/types';
|
|
7
|
-
export { rpcServerMap, scanUrlDomainMap } from './constants/chains';
|
|
8
|
-
export { chainListMap } from './constants/chainList';
|
|
9
|
-
export { Widget, UnstyleWidget, Message } from './components/Widget';
|
|
10
|
-
export { WIDGET_MODULE_CLASS_NAME } from './components/WidgetContainer';
|
|
11
|
-
export type { WidgetProps } from './components/Widget';
|
|
12
|
-
export type SwapWidgetProps = WidgetProps & SwapProps;
|
|
13
|
-
export type { TokenInfo } from './hooks/Token/type';
|
|
14
|
-
export { useMessageState } from './hooks/useMessageState';
|
|
3
|
+
export { EmptyList } from './components/List/EmptyList';
|
|
4
|
+
export { FailedList } from './components/List/FailedList';
|
|
15
5
|
export { Swap } from './components/Swap';
|
|
6
|
+
export { TokenCard } from './components/Swap/components/TokenCard';
|
|
16
7
|
export { default as SwapOrderHistory } from './components/Swap/SwapOrderHistory';
|
|
8
|
+
export { default as TokenLogo } from './components/TokenLogo';
|
|
9
|
+
export { Message, UnstyleWidget, Widget, WIDGET_CLASS_NAME, } from './components/Widget';
|
|
10
|
+
export type { WidgetProps } from './components/Widget';
|
|
11
|
+
export { WIDGET_MODULE_CLASS_NAME } from './components/WidgetContainer';
|
|
12
|
+
export { chainListMap } from './constants/chainList';
|
|
13
|
+
export { rpcServerMap, scanUrlDomainMap } from './constants/chains';
|
|
14
|
+
export { MetadataFlag } from './hooks/Submission/types';
|
|
17
15
|
export { useTradeSwapOrderList } from './hooks/Swap/useTradeSwapOrderList';
|
|
16
|
+
export type { TokenInfo } from './hooks/Token/type';
|
|
17
|
+
export { useMessageState } from './hooks/useMessageState';
|
|
18
|
+
export { PageType, useRouterStore } from './router';
|
|
19
|
+
export type { Page } from './router';
|
|
20
|
+
export { getEtherscanPage } from './utils/address';
|
|
21
|
+
export { formatPercentageNumber, formatReadableNumber, formatShortNumber, formatTokenAmountNumber, } from './utils/formatter';
|
|
22
|
+
export type { AppKitNetworkExtend, CaipAddressExtend, CaipNetworkExtend, CaipNetworkIdExtend, ChainNamespaceExtend, UseAppKitAccountReturnExtend, } from './utils/reown-types';
|
|
18
23
|
export { Pool } from './widgets/PoolWidget';
|
|
19
|
-
export { default as PoolList } from './widgets/PoolWidget/PoolList';
|
|
20
|
-
export { default as PoolCreate } from './widgets/PoolWidget/PoolCreate';
|
|
21
24
|
export { default as AMMV2Create } from './widgets/PoolWidget/AMMV2Create';
|
|
22
|
-
export { default as PoolModify } from './widgets/PoolWidget/PoolModify';
|
|
23
|
-
export { default as PoolDetail } from './widgets/PoolWidget/PoolDetail';
|
|
24
|
-
export { default as PoolOperateDialog, PoolOperate, } from './widgets/PoolWidget/PoolOperate';
|
|
25
|
-
export type { PoolOperateProps } from './widgets/PoolWidget/PoolOperate';
|
|
26
|
-
export { usePoolBalanceInfo } from './widgets/PoolWidget/hooks/usePoolBalanceInfo';
|
|
27
|
-
export { MiningList } from './widgets/MiningWidget/MiningList';
|
|
28
|
-
export { MiningDetail } from './widgets/MiningWidget/MiningDetail';
|
|
29
|
-
export { MiningCreate } from './widgets/MiningWidget/MiningCreate';
|
|
30
25
|
export { default as AddLiquidityV3 } from './widgets/PoolWidget/AMMV3/AddLiquidityV3';
|
|
31
|
-
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
32
26
|
export { AMMV3PositionManage } from './widgets/PoolWidget/AMMV3/AMMV3PositionManage';
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export { default as
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export
|
|
43
|
-
export declare function PoolWidget(props: SwapWidgetProps): import("react").JSX.Element;
|
|
44
|
-
export declare function InitSwapWidget(props: SwapWidgetProps): void;
|
|
27
|
+
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
28
|
+
export { CurvePoolDetail } from './widgets/PoolWidget/curve/CurvePoolDetail';
|
|
29
|
+
export { usePoolBalanceInfo } from './widgets/PoolWidget/hooks/usePoolBalanceInfo';
|
|
30
|
+
export { default as PoolCreate } from './widgets/PoolWidget/PoolCreate';
|
|
31
|
+
export { default as PoolDetail } from './widgets/PoolWidget/PoolDetail';
|
|
32
|
+
export { default as PoolList } from './widgets/PoolWidget/PoolList';
|
|
33
|
+
export { default as PoolModify } from './widgets/PoolWidget/PoolModify';
|
|
34
|
+
export { PoolOperate, default as PoolOperateDialog, } from './widgets/PoolWidget/PoolOperate';
|
|
35
|
+
export type { PoolOperateProps } from './widgets/PoolWidget/PoolOperate';
|
|
36
|
+
export type SwapWidgetProps = WidgetProps & SwapProps;
|
|
@@ -3,6 +3,7 @@ import { PoolTab } from '../widgets/PoolWidget/PoolList/hooks/usePoolListTabs';
|
|
|
3
3
|
export declare enum PageType {
|
|
4
4
|
Pool = "pool",
|
|
5
5
|
PoolDetail = "poolDetail",
|
|
6
|
+
CurvePoolDetail = "curvePoolDetail",
|
|
6
7
|
CreatePool = "createPool",
|
|
7
8
|
ModifyPool = "modifyPool",
|
|
8
9
|
MiningList = "miningList",
|
|
@@ -18,6 +19,10 @@ interface PageTypeParams {
|
|
|
18
19
|
address: string;
|
|
19
20
|
chainId: ChainId;
|
|
20
21
|
};
|
|
22
|
+
[PageType.CurvePoolDetail]: {
|
|
23
|
+
address: string;
|
|
24
|
+
chainId: ChainId;
|
|
25
|
+
};
|
|
21
26
|
[PageType.ModifyPool]: {
|
|
22
27
|
address: string;
|
|
23
28
|
chainId: ChainId;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AppKitNetworkExtend, type CaipNetworkExtend } from './reown-types';
|
|
2
|
+
export declare const CaipNetworksUtil: {
|
|
3
|
+
isCaipNetwork(network: AppKitNetworkExtend): network is CaipNetworkExtend;
|
|
4
|
+
getChainNamespace(network: AppKitNetworkExtend): import("./reown-types").ChainNamespaceExtend;
|
|
5
|
+
};
|
|
@@ -12,7 +12,7 @@ export default function isZero(hexNumberString: string): boolean;
|
|
|
12
12
|
* truncate pool address: 0xeBa959390016dd81419A189e5ef6F3B6720e5A90 => 0xeBa9...5A90
|
|
13
13
|
* @param address pool address
|
|
14
14
|
*/
|
|
15
|
-
export declare function truncatePoolAddress(address: string): string;
|
|
15
|
+
export declare function truncatePoolAddress(address: string | undefined): string;
|
|
16
16
|
export declare function sortsAddress(address0: string, address1: string): boolean;
|
|
17
17
|
export declare function getEtherscanPage(chainId: ChainId, id?: string | null, prefix?: string): string;
|
|
18
18
|
export declare function openEtherscanPage(path: string | undefined, chainId: ChainId, customUrl?: string): Promise<void>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { WalletState } from '@dodoex/btc-connect-react';
|
|
2
|
+
export declare const SIGNET: {
|
|
3
|
+
bech32: string;
|
|
4
|
+
bip32: {
|
|
5
|
+
private: number;
|
|
6
|
+
public: number;
|
|
7
|
+
};
|
|
8
|
+
messagePrefix: string;
|
|
9
|
+
pubKeyHash: number;
|
|
10
|
+
scriptHash: number;
|
|
11
|
+
wif: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function transferBitcoin({ toAddress, amount, calldata, btcWallet, btcDepositFee, isTestNet, }: {
|
|
14
|
+
toAddress: string;
|
|
15
|
+
amount: number;
|
|
16
|
+
calldata: string;
|
|
17
|
+
btcWallet: WalletState['btcWallet'];
|
|
18
|
+
btcDepositFee: number;
|
|
19
|
+
isTestNet: boolean;
|
|
20
|
+
}): Promise<string>;
|
|
21
|
+
export declare function getBitcoinFeeEstimate(amount: number, isSignet?: boolean): Promise<{
|
|
22
|
+
feeRates: {
|
|
23
|
+
fastestFee: any;
|
|
24
|
+
halfHourFee: any;
|
|
25
|
+
economyFee: any;
|
|
26
|
+
minimumFee: any;
|
|
27
|
+
};
|
|
28
|
+
optimalRate: any;
|
|
29
|
+
estimatedFee: (vsize: number) => number;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function demonstrateFeeRateOptions(isSignet?: boolean): Promise<void>;
|
|
32
|
+
export declare function demonstrateVsizeCalculation(): void;
|
|
33
|
+
export declare function explainVsizeCalculation(): number;
|
|
34
|
+
export declare function compareFeeRates(vsize: number, isSignet?: boolean): Promise<{
|
|
35
|
+
fastestFee: any;
|
|
36
|
+
economyFee: any;
|
|
37
|
+
fastestFeeTotal: number;
|
|
38
|
+
economyFeeTotal: number;
|
|
39
|
+
difference: number;
|
|
40
|
+
percentageIncrease: string;
|
|
41
|
+
}>;
|
|
42
|
+
export declare function getNetworkFeeStatus(isSignet?: boolean): Promise<any>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type BaseNetwork, ChainId, ChainNamespace, type CaipNetwork } from '@reown/appkit-common';
|
|
2
|
+
import type { NamespaceTypeMap, UseAppKitAccountReturn } from '@reown/appkit/react';
|
|
3
|
+
export type ChainNamespaceExtend = ChainNamespace | 'ton' | 'sui';
|
|
4
|
+
export type CaipNetworkIdExtend = `${ChainNamespaceExtend}:${ChainId}`;
|
|
5
|
+
export type CaipAddressExtend = `${ChainNamespaceExtend}:${ChainId}:${string}`;
|
|
6
|
+
type NamespaceTypeMapExtend = NamespaceTypeMap & {
|
|
7
|
+
ton: 'eoa';
|
|
8
|
+
sui: 'eoa';
|
|
9
|
+
};
|
|
10
|
+
type AccountTypeMapExtend = {
|
|
11
|
+
[K in ChainNamespaceExtend]: {
|
|
12
|
+
namespace: K;
|
|
13
|
+
address: string;
|
|
14
|
+
type: NamespaceTypeMapExtend[K];
|
|
15
|
+
publicKey?: K extends 'bip122' ? string : never;
|
|
16
|
+
path?: K extends 'bip122' ? string : never;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
type AccountTypeExtend = AccountTypeMapExtend[ChainNamespaceExtend];
|
|
20
|
+
export type UseAppKitAccountReturnExtend = {
|
|
21
|
+
allAccounts: AccountTypeExtend[];
|
|
22
|
+
caipAddress: CaipAddressExtend | undefined;
|
|
23
|
+
} & Pick<UseAppKitAccountReturn, 'address' | 'isConnected' | 'embeddedWalletInfo' | 'status'>;
|
|
24
|
+
export type CaipNetworkExtend = Omit<CaipNetwork, 'chainNamespace'> & {
|
|
25
|
+
chainNamespace: ChainNamespaceExtend;
|
|
26
|
+
};
|
|
27
|
+
export type AppKitNetworkExtend = BaseNetwork | CaipNetworkExtend;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
export declare function constructSolanaRouteTransaction({ data }: {
|
|
3
|
+
data: string;
|
|
4
|
+
}): VersionedTransaction | Transaction;
|
|
5
|
+
export declare function constructSolanaBridgeRouteTransaction({ data, }: {
|
|
6
|
+
data: string;
|
|
7
|
+
}): VersionedTransaction;
|
|
@@ -19,7 +19,7 @@ export declare function getTokenPairCompareText({ fromToken, toToken, fromFiatPr
|
|
|
19
19
|
comparePriceText: string;
|
|
20
20
|
loading: boolean;
|
|
21
21
|
};
|
|
22
|
-
export declare function getShowDecimals(decimals: string | number):
|
|
22
|
+
export declare function getShowDecimals(decimals: string | number): 4 | 6;
|
|
23
23
|
export declare function convertFetchTokenToTokenInfo(token: {
|
|
24
24
|
id?: string | null;
|
|
25
25
|
address?: string | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
export declare const isETHChain: (chainId?: number) => {
|
|
2
3
|
/** ETH mainnet */
|
|
3
4
|
isMainnet: boolean;
|
|
@@ -6,3 +7,4 @@ export declare const isETHChain: (chainId?: number) => {
|
|
|
6
7
|
isGor: boolean;
|
|
7
8
|
};
|
|
8
9
|
export declare const reloadWindow: (interval?: number) => void;
|
|
10
|
+
export declare function namespaceToTitle(chainId: ChainId | undefined): "polkadot" | "cosmos" | "Solana" | "Bitcoin" | "" | "a" | "EVM" | "TON" | "Sui";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const executeRouteZetachainBtc: () => Promise<void>;
|
|
2
|
+
export declare function getMempoolUTXO(address: string): Promise<any>;
|
|
3
|
+
export declare function getMempoolTxDetail(txHash: string): Promise<any>;
|
|
4
|
+
export declare function getSignetMempoolUTXO(address: string): Promise<any>;
|
|
5
|
+
export declare function getSignetMempoolTxDetail(txHash: string): Promise<any>;
|
|
@@ -5,7 +5,7 @@ export declare const useCreateMining: ({ submittedBack, handleGotoMiningList, }?
|
|
|
5
5
|
handleGotoMiningList?: () => void;
|
|
6
6
|
}) => {
|
|
7
7
|
state: import("./reducers").StateProps;
|
|
8
|
-
dispatch: import("react").
|
|
8
|
+
dispatch: import("react").Dispatch<import("./reducers").Actions>;
|
|
9
9
|
createMutation: import("@tanstack/react-query").UseMutationResult<void, Error, LpTokenPlatformID | undefined, unknown>;
|
|
10
10
|
blockNumber: BigNumber;
|
|
11
11
|
blockTime: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function usePrevious<Value>(value: Value): Value;
|
|
1
|
+
export declare function usePrevious<Value>(value: Value): Value | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
3
|
import { TokenInfo } from '../../../hooks/Token';
|
|
4
|
-
import { useSlipper } from '../PoolOperate/components/SlippageSetting';
|
|
5
4
|
export declare function RatioPrice({ baseToken, quoteToken, midPrice, loading, disabled, }: {
|
|
6
5
|
baseToken?: TokenInfo;
|
|
7
6
|
quoteToken?: TokenInfo;
|
|
@@ -9,13 +8,11 @@ export declare function RatioPrice({ baseToken, quoteToken, midPrice, loading, d
|
|
|
9
8
|
loading?: boolean;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
}): import("react").JSX.Element;
|
|
12
|
-
export default function Ratio({ baseToken, quoteToken, loading, midPrice, shareOfPool, sx,
|
|
11
|
+
export default function Ratio({ baseToken, quoteToken, loading, midPrice, shareOfPool, sx, }: {
|
|
13
12
|
baseToken?: TokenInfo;
|
|
14
13
|
quoteToken?: TokenInfo;
|
|
15
14
|
loading?: boolean;
|
|
16
15
|
midPrice?: BigNumber | null;
|
|
17
16
|
shareOfPool?: string;
|
|
18
17
|
sx?: BoxProps['sx'];
|
|
19
|
-
slippage: ReturnType<typeof useSlipper>['slipper'];
|
|
20
|
-
setSlippage: ReturnType<typeof useSlipper>['setSlipper'];
|
|
21
18
|
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { AUTO_SWAP_SLIPPAGE_PROTECTION } from '../../../constants/pool';
|
|
3
|
+
export declare const useSlipper: ({ address }: {
|
|
4
|
+
address?: string;
|
|
5
|
+
}) => {
|
|
6
|
+
slipper: number | "auto";
|
|
7
|
+
setSlipper: import("react").Dispatch<import("react").SetStateAction<number | "auto">>;
|
|
8
|
+
slipperValue: number;
|
|
9
|
+
resetSlipper: () => void;
|
|
10
|
+
};
|
|
11
|
+
export default function Setting({ sx, disabled, slippage, onChangeSlippage, }: {
|
|
12
|
+
sx?: BoxProps['sx'];
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
slippage: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION;
|
|
15
|
+
onChangeSlippage: (val: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION) => void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export default function AddLiquidityV3({ params, handleGoBack, handleGoToPoolList, }: {
|
|
2
3
|
params?: {
|
|
3
4
|
from?: string;
|
|
@@ -6,4 +7,4 @@ export default function AddLiquidityV3({ params, handleGoBack, handleGoToPoolLis
|
|
|
6
7
|
};
|
|
7
8
|
handleGoBack: () => void;
|
|
8
9
|
handleGoToPoolList: () => void;
|
|
9
|
-
}):
|
|
10
|
+
}): React.JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { Currency } from '../../sdks/sdk-core';
|
|
2
3
|
import { FeeAmount } from '../../sdks/v3-sdk';
|
|
3
4
|
import { ChartEntry } from './types';
|
|
4
|
-
export declare function useDensityChartData({ currencyA, currencyB, feeAmount, }: {
|
|
5
|
+
export declare function useDensityChartData({ currencyA, currencyB, feeAmount, chainId, }: {
|
|
5
6
|
currencyA?: Currency;
|
|
6
7
|
currencyB?: Currency;
|
|
7
8
|
feeAmount?: FeeAmount;
|
|
9
|
+
chainId: ChainId;
|
|
8
10
|
}): {
|
|
9
11
|
isLoading: boolean;
|
|
10
12
|
error: any;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { Currency, Price } from '../../sdks/sdk-core';
|
|
2
3
|
import { FeeAmount } from '../../sdks/v3-sdk';
|
|
3
4
|
import { Bound } from '../../types';
|
|
4
|
-
export default function LiquidityChartRangeInput({ currencyA, currencyB, feeAmount, ticksAtLimit, price, priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, interactive, }: {
|
|
5
|
+
export default function LiquidityChartRangeInput({ chainId, currencyA, currencyB, feeAmount, ticksAtLimit, price, priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, interactive, }: {
|
|
6
|
+
chainId: ChainId;
|
|
5
7
|
currencyA?: Currency;
|
|
6
8
|
currencyB?: Currency;
|
|
7
9
|
feeAmount?: FeeAmount;
|
package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/usePrevious.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function usePrevious<T>(value: T): T;
|
|
1
|
+
export default function usePrevious<T>(value: T): T | undefined;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { Actions, StateProps } from '../reducer';
|
|
2
3
|
export interface TokenPairSelectProps {
|
|
4
|
+
chainId: ChainId;
|
|
3
5
|
baseToken: StateProps['baseToken'];
|
|
4
6
|
quoteToken: StateProps['quoteToken'];
|
|
5
7
|
dispatch: React.Dispatch<Actions>;
|
|
6
8
|
}
|
|
7
|
-
export declare const TokenPairSelect: ({ baseToken, quoteToken, dispatch, }: TokenPairSelectProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const TokenPairSelect: ({ chainId, baseToken, quoteToken, dispatch, }: TokenPairSelectProps) => import("react").JSX.Element;
|
|
@@ -9,7 +9,7 @@ export interface TickProcessed {
|
|
|
9
9
|
price0: string;
|
|
10
10
|
sdkPrice: Price<Token, Token>;
|
|
11
11
|
}
|
|
12
|
-
export declare function usePoolActiveLiquidity(currencyA: Currency | undefined, currencyB: Currency | undefined, feeAmount: FeeAmount | undefined, chainId
|
|
12
|
+
export declare function usePoolActiveLiquidity(currencyA: Currency | undefined, currencyB: Currency | undefined, feeAmount: FeeAmount | undefined, chainId: ChainId): {
|
|
13
13
|
isLoading: boolean;
|
|
14
14
|
error: any;
|
|
15
15
|
currentTick?: number;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { StateProps } from '../reducer';
|
|
3
4
|
import { Currency, CurrencyAmount, Price, Token } from '../sdks/sdk-core';
|
|
4
5
|
import { Pool, Position } from '../sdks/v3-sdk';
|
|
5
6
|
import { Bound, Field } from '../types';
|
|
6
7
|
import { PoolState } from './usePools';
|
|
7
|
-
export declare function useV3DerivedMintInfo({ state, existingPosition, }: {
|
|
8
|
+
export declare function useV3DerivedMintInfo({ state, existingPosition, chainId, }: {
|
|
8
9
|
state: StateProps;
|
|
9
10
|
existingPosition?: Position;
|
|
11
|
+
chainId: ChainId;
|
|
10
12
|
}): {
|
|
11
13
|
pool?: Pool | null;
|
|
12
14
|
poolState: PoolState;
|
|
@@ -43,4 +45,5 @@ export declare function useV3DerivedMintInfo({ state, existingPosition, }: {
|
|
|
43
45
|
[bound in Bound]?: boolean | undefined;
|
|
44
46
|
};
|
|
45
47
|
isTaxed: boolean;
|
|
48
|
+
invalidPrice?: boolean;
|
|
46
49
|
};
|
|
@@ -6,6 +6,7 @@ export interface StateProps {
|
|
|
6
6
|
baseToken: Maybe<Currency>;
|
|
7
7
|
quoteToken: Maybe<Currency>;
|
|
8
8
|
feeAmount: FeeAmount | undefined;
|
|
9
|
+
step?: number;
|
|
9
10
|
readonly independentField: Field;
|
|
10
11
|
readonly typedValue: string;
|
|
11
12
|
readonly startPriceTypedValue: string;
|
|
@@ -24,7 +25,8 @@ export declare enum Types {
|
|
|
24
25
|
typeStartPriceInput = 8,
|
|
25
26
|
typeLeftRangeInput = 9,
|
|
26
27
|
typeRightRangeInput = 10,
|
|
27
|
-
typeInput = 11
|
|
28
|
+
typeInput = 11,
|
|
29
|
+
UpdateStep = 12
|
|
28
30
|
}
|
|
29
31
|
type Payload = {
|
|
30
32
|
[Types.UpdateBaseToken]: TokenInfo;
|
|
@@ -49,6 +51,7 @@ type Payload = {
|
|
|
49
51
|
typedValue: string;
|
|
50
52
|
noLiquidity: boolean;
|
|
51
53
|
};
|
|
54
|
+
[Types.UpdateStep]: number;
|
|
52
55
|
};
|
|
53
56
|
export type Actions = ActionMap<Payload>[keyof ActionMap<Payload>];
|
|
54
57
|
export declare function reducer(state: StateProps, action: Actions): StateProps;
|
|
@@ -2,8 +2,7 @@ import { BoxProps } from '@dodoex/components';
|
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
3
|
import { StateProps } from '../reducer';
|
|
4
4
|
import { SectionStatusT } from '../types';
|
|
5
|
-
export declare function BaseInfoCardList({
|
|
6
|
-
chainId: number | undefined;
|
|
5
|
+
export declare function BaseInfoCardList({ status, selectedVersion, baseToken, quoteToken, initPrice, slippageCoefficient, midPrice, sx, }: {
|
|
7
6
|
status: SectionStatusT;
|
|
8
7
|
selectedVersion: StateProps['selectedVersion'];
|
|
9
8
|
baseToken: StateProps['baseToken'];
|
|
@@ -12,5 +11,4 @@ export declare function BaseInfoCardList({ chainId, status, selectedVersion, bas
|
|
|
12
11
|
slippageCoefficient: StateProps['slippageCoefficient'];
|
|
13
12
|
midPrice: BigNumber | undefined;
|
|
14
13
|
sx?: BoxProps['sx'];
|
|
15
|
-
cardBg: string;
|
|
16
14
|
}): import("react").JSX.Element | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StateProps } from '../reducer';
|
|
2
|
-
export declare function FeeRateCard({ isWaiting, feeRate,
|
|
2
|
+
export declare function FeeRateCard({ isWaiting, feeRate, }: {
|
|
3
3
|
isWaiting: boolean;
|
|
4
4
|
feeRate: StateProps['feeRate'];
|
|
5
|
-
cardBg: string;
|
|
6
5
|
}): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StateProps } from '../reducer';
|
|
2
|
-
export declare function LqRatioSet({ isWaiting, selectedVersion, baseToken, quoteToken, initPrice, slippageCoefficient, baseAmount, quoteAmount, peggedBaseTokenRatio, peggedQuoteTokenRatio,
|
|
2
|
+
export declare function LqRatioSet({ isWaiting, selectedVersion, baseToken, quoteToken, initPrice, slippageCoefficient, baseAmount, quoteAmount, peggedBaseTokenRatio, peggedQuoteTokenRatio, }: {
|
|
3
3
|
isWaiting: boolean;
|
|
4
4
|
selectedVersion: StateProps['selectedVersion'];
|
|
5
5
|
baseToken: StateProps['baseToken'];
|
|
@@ -10,5 +10,4 @@ export declare function LqRatioSet({ isWaiting, selectedVersion, baseToken, quot
|
|
|
10
10
|
quoteAmount: StateProps['quoteAmount'];
|
|
11
11
|
peggedBaseTokenRatio: StateProps['peggedBaseTokenRatio'];
|
|
12
12
|
peggedQuoteTokenRatio: StateProps['peggedQuoteTokenRatio'];
|
|
13
|
-
cardBg: string;
|
|
14
13
|
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StateProps } from '../reducer';
|
|
2
2
|
import { SectionStatusT } from '../types';
|
|
3
|
-
export declare function LqSettingsShow({
|
|
4
|
-
chainId: number | undefined;
|
|
3
|
+
export declare function LqSettingsShow({ status, selectedVersion, baseToken, quoteToken, initPrice, slippageCoefficient, baseAmount, quoteAmount, }: {
|
|
5
4
|
status: SectionStatusT;
|
|
6
5
|
selectedVersion: StateProps['selectedVersion'];
|
|
7
6
|
baseToken: StateProps['baseToken'];
|
|
@@ -10,5 +9,4 @@ export declare function LqSettingsShow({ chainId, status, selectedVersion, baseT
|
|
|
10
9
|
slippageCoefficient: StateProps['slippageCoefficient'];
|
|
11
10
|
baseAmount: StateProps['baseAmount'];
|
|
12
11
|
quoteAmount: StateProps['quoteAmount'];
|
|
13
|
-
cardBg: string;
|
|
14
12
|
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { StateProps } from '../reducer';
|
|
2
|
-
export declare function PriceModeCard({
|
|
3
|
-
chainId: number | undefined;
|
|
2
|
+
export declare function PriceModeCard({ isWaiting, selectedSubPeggedVersion, }: {
|
|
4
3
|
isWaiting: boolean;
|
|
5
4
|
selectedSubPeggedVersion: StateProps['selectedSubPeggedVersion'];
|
|
6
|
-
cardBg: string;
|
|
7
5
|
}): import("react").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SectionStatusT, VersionItem } from '../types';
|
|
2
|
-
export declare function VersionChartExample({ versionItem, status,
|
|
2
|
+
export declare function VersionChartExample({ versionItem, status, }: {
|
|
3
3
|
versionItem: VersionItem;
|
|
4
4
|
status: SectionStatusT;
|
|
5
|
-
cardBg: string;
|
|
6
5
|
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare function Card({ title, children, isWaiting,
|
|
2
|
+
export declare function Card({ title, children, isWaiting, }: {
|
|
3
3
|
title: React.ReactNode;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
isWaiting: boolean;
|
|
6
|
-
backgroundColor: string;
|
|
7
6
|
}): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default function useDefaultTokens(): {
|
|
2
2
|
defaultBaseToken: import("../../../..").TokenInfo | null;
|
|
3
3
|
defaultQuoteToken: import("../../../..").TokenInfo | null;
|
|
4
|
-
defaultBaseTokenLoading:
|
|
5
|
-
defaultQuoteTokenLoading:
|
|
4
|
+
defaultBaseTokenLoading: false;
|
|
5
|
+
defaultQuoteTokenLoading: false;
|
|
6
6
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import { Dispatch } from 'react';
|
|
3
3
|
import { Actions, StateProps } from '../reducer';
|
|
4
|
-
export declare function usePriceInit({ isSingleTokenVersion, leftTokenAddress, baseToken, quoteToken, dispatch,
|
|
4
|
+
export declare function usePriceInit({ isSingleTokenVersion, leftTokenAddress, baseToken, quoteToken, dispatch, }: {
|
|
5
5
|
isSingleTokenVersion: boolean;
|
|
6
6
|
leftTokenAddress: StateProps['leftTokenAddress'];
|
|
7
7
|
baseToken: StateProps['baseToken'];
|
|
8
8
|
quoteToken: StateProps['quoteToken'];
|
|
9
9
|
dispatch: Dispatch<Actions>;
|
|
10
|
-
isInitPrice?: boolean;
|
|
11
10
|
}): {
|
|
12
11
|
fiatPriceLoading: boolean;
|
|
13
12
|
currentPrice: BigNumber | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { SubPeggedVersionE, Version, VersionItem } from '../types';
|
|
2
|
-
export declare function useVersionList(
|
|
2
|
+
export declare function useVersionList(): {
|
|
3
3
|
versionList: VersionItem[];
|
|
4
4
|
versionMap: Record<Version, VersionItem>;
|
|
5
|
-
subPeggedVersionList: (Pick<VersionItem, "
|
|
5
|
+
subPeggedVersionList: (Pick<VersionItem, "description" | "title"> & {
|
|
6
6
|
version: SubPeggedVersionE;
|
|
7
7
|
})[];
|
|
8
8
|
};
|
|
9
|
-
export declare function getSubPeggedVersionList(
|
|
9
|
+
export declare function getSubPeggedVersionList(): Array<Pick<VersionItem, 'title' | 'description'> & {
|
|
10
10
|
version: SubPeggedVersionE;
|
|
11
11
|
}>;
|
|
12
|
-
export declare function getSubPeggedVersionMap(
|
|
12
|
+
export declare function getSubPeggedVersionMap(): Record<SubPeggedVersionE, Pick<VersionItem, "description" | "title">>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Dispatch } from 'react';
|
|
2
2
|
import { Actions, StateProps } from '../reducer';
|
|
3
3
|
import { usePriceInit } from '../hooks/usePriceInit';
|
|
4
|
-
export declare function InitPriceSetting({
|
|
5
|
-
chainId: number | undefined;
|
|
4
|
+
export declare function InitPriceSetting({ selectedVersion, isStandardVersion, isSingleTokenVersion, isFixedRatio, leftTokenAddress, baseToken, quoteToken, fixedRatioPrice, dispatch, priceInfo, }: {
|
|
6
5
|
selectedVersion: StateProps['selectedVersion'];
|
|
7
6
|
isStandardVersion: boolean;
|
|
8
7
|
isSingleTokenVersion: boolean;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Dispatch } from 'react';
|
|
2
2
|
import { Actions, StateProps } from '../reducer';
|
|
3
|
-
export declare function PriceModeSetting({
|
|
4
|
-
chainId: number | undefined;
|
|
3
|
+
export declare function PriceModeSetting({ selectedVersion, selectedSubPeggedVersion, baseToken, quoteToken, initPrice, dispatch, }: {
|
|
5
4
|
selectedVersion: StateProps['selectedVersion'];
|
|
6
5
|
selectedSubPeggedVersion: StateProps['selectedSubPeggedVersion'];
|
|
7
6
|
baseToken: StateProps['baseToken'];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Actions, StateProps } from '../reducer';
|
|
3
|
-
export default function VersionSelect({
|
|
4
|
-
chainId: number | undefined;
|
|
3
|
+
export default function VersionSelect({ selectedVersion, dispatch, }: {
|
|
5
4
|
selectedVersion: StateProps['selectedVersion'];
|
|
6
5
|
dispatch: React.Dispatch<Actions>;
|
|
7
6
|
}): React.JSX.Element;
|