@dodoex/widgets 2.6.4 → 2.6.6

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.
Files changed (163) hide show
  1. package/dist/cjs/failed-list-e6c1e563-7122998d.cjs +1 -0
  2. package/dist/cjs/index-183743c8.cjs +45 -0
  3. package/dist/cjs/index-1904ef51.cjs +50 -0
  4. package/dist/cjs/index-19cf4c6e.cjs +50 -0
  5. package/dist/cjs/index-1a21b21a.cjs +45 -0
  6. package/dist/cjs/index-246a9973.cjs +50 -0
  7. package/dist/cjs/index-39149ce7.cjs +45 -0
  8. package/dist/cjs/index-5eca89d2.cjs +50 -0
  9. package/dist/cjs/index-64af8ffd.cjs +45 -0
  10. package/dist/cjs/index-f2a80623.cjs +45 -0
  11. package/dist/cjs/index.cjs +1 -1
  12. package/dist/cjs/lottie-01f67a00.cjs +1 -0
  13. package/dist/cjs/lottie-09dbe581.cjs +1 -0
  14. package/dist/cjs/lottie-2035df95.cjs +1 -0
  15. package/dist/cjs/lottie-7e742196.cjs +1 -0
  16. package/dist/cjs/lottie-924a2436.cjs +1 -0
  17. package/dist/cjs/lottie-b9cf6aee.cjs +1 -0
  18. package/dist/cjs/lottie-c4b6404b.cjs +1 -0
  19. package/dist/cjs/lottie-ed4f1473.cjs +1 -0
  20. package/dist/cjs/lottie-f516f300.cjs +1 -0
  21. package/dist/cjs/no-found-89a3b4af-9c7e1488.cjs +1 -0
  22. package/dist/cjs/no-result-01c60834-3e379801.cjs +1 -0
  23. package/dist/cjs/src/components/AddressWithLinkAndCopy.d.ts +22 -0
  24. package/dist/cjs/src/components/AutoButton.d.ts +7 -0
  25. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/index.d.ts +1 -0
  26. package/dist/cjs/src/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
  27. package/dist/cjs/src/components/ConnectWallet/NeedConnectButton.d.ts +7 -0
  28. package/dist/cjs/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +2 -0
  29. package/dist/cjs/src/components/CopyTooltipToast.d.ts +9 -0
  30. package/dist/cjs/src/components/DataCard/DataCardGroup.d.ts +9 -0
  31. package/dist/cjs/src/components/Dialog.d.ts +1 -0
  32. package/dist/cjs/src/components/List/EmptyList.d.ts +7 -0
  33. package/dist/cjs/src/components/List/FailedList.d.ts +6 -0
  34. package/dist/cjs/src/components/SelectChain.d.ts +12 -0
  35. package/dist/cjs/src/components/TokenLogoPair.d.ts +16 -0
  36. package/dist/cjs/src/components/TokenLogoSimple.d.ts +13 -0
  37. package/dist/cjs/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +2 -0
  38. package/dist/cjs/src/constants/pool.d.ts +2 -0
  39. package/dist/cjs/src/constants/sessionStorage.d.ts +2 -0
  40. package/dist/cjs/src/hooks/Bridge/createBridgeOrder.d.ts +4 -1
  41. package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +1 -0
  42. package/dist/cjs/src/hooks/Chain/useChainList.d.ts +2 -0
  43. package/dist/cjs/src/hooks/Chain/useChainList.test.d.ts +1 -0
  44. package/dist/cjs/src/hooks/ConnectWallet/useWalletInfo.d.ts +6 -0
  45. package/dist/cjs/src/hooks/Submission/useBalanceUpdateLoading.d.ts +15 -0
  46. package/dist/cjs/src/hooks/Token/useTokenStatus.d.ts +17 -0
  47. package/dist/cjs/src/hooks/Token/useTokenStatus.test.d.ts +1 -0
  48. package/dist/cjs/src/hooks/style/useWidgetDevice.d.ts +6 -0
  49. package/dist/cjs/src/hooks/usePrevious.d.ts +1 -0
  50. package/dist/cjs/src/providers/GlobalConfigContext.d.ts +7 -0
  51. package/dist/cjs/src/providers/i18n.d.ts +9 -0
  52. package/dist/cjs/src/providers/queryClient/index.d.ts +2 -0
  53. package/dist/cjs/src/providers/queryClient.d.ts +2 -0
  54. package/dist/cjs/src/router/index.d.ts +7 -0
  55. package/dist/cjs/src/router/types.d.ts +22 -0
  56. package/dist/cjs/src/utils/utils.d.ts +1 -0
  57. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +8 -0
  58. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +18 -0
  59. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +8 -0
  60. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +6 -0
  61. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +8 -0
  62. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +18 -0
  63. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +44 -0
  64. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
  65. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +12 -0
  66. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/index.d.ts +8 -0
  67. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/types.d.ts +19 -0
  68. package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +43 -0
  69. package/dist/cjs/src/widgets/PoolWidget/index.d.ts +2 -0
  70. package/dist/cjs/src/widgets/PoolWidget/list/AddLiquidity.d.ts +9 -0
  71. package/dist/cjs/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +8 -0
  72. package/dist/cjs/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +8 -0
  73. package/dist/cjs/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +5 -0
  74. package/dist/cjs/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +17 -0
  75. package/dist/cjs/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +9 -0
  76. package/dist/cjs/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +6 -0
  77. package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +6 -0
  78. package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +58 -0
  79. package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +15 -0
  80. package/dist/cjs/src/widgets/PoolWidget/utils.d.ts +20 -0
  81. package/dist/failed-list-e6c1e563-478d73e0.js +1 -0
  82. package/dist/index-0e954ab8.js +45 -0
  83. package/dist/index-41db7f0e.js +45 -0
  84. package/dist/index-b07aac90.js +45 -0
  85. package/dist/index-c1a581ca.js +50 -0
  86. package/dist/index-c9dbe645.js +50 -0
  87. package/dist/index-cdf23d80.js +50 -0
  88. package/dist/index-e58d24e5.js +50 -0
  89. package/dist/index-ee546021.js +45 -0
  90. package/dist/index-f055c418.js +45 -0
  91. package/dist/index.js +1 -1
  92. package/dist/lottie-0a7cf033.js +1 -0
  93. package/dist/lottie-449d7c9a.js +1 -0
  94. package/dist/lottie-48250155.js +1 -0
  95. package/dist/lottie-9678ebc9.js +1 -0
  96. package/dist/lottie-9b618308.js +1 -0
  97. package/dist/lottie-b4708423.js +1 -0
  98. package/dist/lottie-baaed8fa.js +1 -0
  99. package/dist/lottie-d6631244.js +1 -0
  100. package/dist/lottie-ed5a9dfd.js +1 -0
  101. package/dist/no-found-89a3b4af-763d58f5.js +1 -0
  102. package/dist/no-result-01c60834-7921d2fa.js +1 -0
  103. package/dist/src/components/AddressWithLinkAndCopy.d.ts +22 -0
  104. package/dist/src/components/AutoButton.d.ts +7 -0
  105. package/dist/src/components/Bridge/BridgeSummaryDialog/index.d.ts +1 -0
  106. package/dist/src/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
  107. package/dist/src/components/ConnectWallet/NeedConnectButton.d.ts +7 -0
  108. package/dist/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +2 -0
  109. package/dist/src/components/CopyTooltipToast.d.ts +9 -0
  110. package/dist/src/components/DataCard/DataCardGroup.d.ts +9 -0
  111. package/dist/src/components/Dialog.d.ts +1 -0
  112. package/dist/src/components/List/EmptyList.d.ts +7 -0
  113. package/dist/src/components/List/FailedList.d.ts +6 -0
  114. package/dist/src/components/SelectChain.d.ts +12 -0
  115. package/dist/src/components/TokenLogoPair.d.ts +16 -0
  116. package/dist/src/components/TokenLogoSimple.d.ts +13 -0
  117. package/dist/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +2 -0
  118. package/dist/src/constants/pool.d.ts +2 -0
  119. package/dist/src/constants/sessionStorage.d.ts +2 -0
  120. package/dist/src/hooks/Bridge/createBridgeOrder.d.ts +4 -1
  121. package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +1 -0
  122. package/dist/src/hooks/Chain/useChainList.d.ts +2 -0
  123. package/dist/src/hooks/Chain/useChainList.test.d.ts +1 -0
  124. package/dist/src/hooks/ConnectWallet/useWalletInfo.d.ts +6 -0
  125. package/dist/src/hooks/Submission/useBalanceUpdateLoading.d.ts +15 -0
  126. package/dist/src/hooks/Token/useTokenStatus.d.ts +17 -0
  127. package/dist/src/hooks/Token/useTokenStatus.test.d.ts +1 -0
  128. package/dist/src/hooks/style/useWidgetDevice.d.ts +6 -0
  129. package/dist/src/hooks/usePrevious.d.ts +1 -0
  130. package/dist/src/providers/GlobalConfigContext.d.ts +7 -0
  131. package/dist/src/providers/i18n.d.ts +9 -0
  132. package/dist/src/providers/queryClient/index.d.ts +2 -0
  133. package/dist/src/providers/queryClient.d.ts +2 -0
  134. package/dist/src/router/index.d.ts +7 -0
  135. package/dist/src/router/types.d.ts +22 -0
  136. package/dist/src/utils/utils.d.ts +1 -0
  137. package/dist/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +8 -0
  138. package/dist/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +18 -0
  139. package/dist/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +8 -0
  140. package/dist/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +6 -0
  141. package/dist/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +8 -0
  142. package/dist/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +18 -0
  143. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +44 -0
  144. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
  145. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +12 -0
  146. package/dist/src/widgets/PoolWidget/PoolOperate/index.d.ts +8 -0
  147. package/dist/src/widgets/PoolWidget/PoolOperate/types.d.ts +19 -0
  148. package/dist/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +43 -0
  149. package/dist/src/widgets/PoolWidget/index.d.ts +2 -0
  150. package/dist/src/widgets/PoolWidget/list/AddLiquidity.d.ts +9 -0
  151. package/dist/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +8 -0
  152. package/dist/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +8 -0
  153. package/dist/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +5 -0
  154. package/dist/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +17 -0
  155. package/dist/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +9 -0
  156. package/dist/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +6 -0
  157. package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +6 -0
  158. package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +58 -0
  159. package/dist/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +15 -0
  160. package/dist/src/widgets/PoolWidget/utils.d.ts +20 -0
  161. package/package.json +1 -1
  162. package/dist/cjs/src/config/i18n-config.d.ts +0 -1
  163. package/dist/src/config/i18n-config.d.ts +0 -1
@@ -0,0 +1,12 @@
1
+ export declare enum PoolOrMiningTab {
2
+ Liquidity = 1,
3
+ Mining = 2
4
+ }
5
+ export declare function usePoolOrMiningTabs(): {
6
+ poolOrMiningTab: PoolOrMiningTab;
7
+ poolOrMiningTabs: {
8
+ key: PoolOrMiningTab;
9
+ value: string;
10
+ }[];
11
+ handleChangeTab: (poolTab: PoolOrMiningTab) => void;
12
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { PoolOperateInnerProps } from './PoolOperateInner';
3
+ export interface PoolOperateProps {
4
+ onClose: () => void;
5
+ account: string | undefined;
6
+ pool: PoolOperateInnerProps['pool'];
7
+ }
8
+ export default function PoolOperate({ onClose, pool }: PoolOperateProps): JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { PoolType } from '@dodoex/api';
2
+ import { TokenInfo } from '../../../hooks/Token';
3
+ export declare type OperatePool = {
4
+ address: string;
5
+ chainId: number;
6
+ baseToken: TokenInfo;
7
+ quoteToken: TokenInfo;
8
+ baseLpToken?: {
9
+ id: string;
10
+ decimals: number;
11
+ };
12
+ quoteLpToken?: {
13
+ id: string;
14
+ decimals: number;
15
+ };
16
+ type: PoolType;
17
+ owner?: string;
18
+ creator: string;
19
+ } | undefined;
@@ -0,0 +1,43 @@
1
+ import { PoolType } from '@dodoex/api';
2
+ import { BigNumber } from 'bignumber.js';
3
+ import { ChainId } from '../../../constants/chains';
4
+ import { TokenInfo } from '../../../hooks/Token';
5
+ declare type Balance = BigNumber | null | undefined;
6
+ export declare function usePoolBalanceInfo({ chainId, account, pool, }: {
7
+ chainId: ChainId;
8
+ account?: string;
9
+ pool?: {
10
+ address: string;
11
+ chainId: number;
12
+ baseToken: TokenInfo;
13
+ quoteToken: TokenInfo;
14
+ type: PoolType;
15
+ };
16
+ }): {
17
+ /** existing base lp balance */
18
+ totalBaseLpBalance: BigNumber | null | undefined;
19
+ /** existing quote lp balance */
20
+ totalQuoteLpBalance: BigNumber | null | undefined;
21
+ /** the total deposited base lp balance */
22
+ baseReserve: BigNumber | undefined;
23
+ /** the total deposited quote lp balance */
24
+ quoteReserve: BigNumber | undefined;
25
+ /** classical base equilibrium target */
26
+ classicalBaseTarget: BigNumber | undefined;
27
+ /** classical quote equilibrium target */
28
+ classicalQuoteTarget: BigNumber | undefined;
29
+ /** the user's existing base lp balance */
30
+ userBaseLpBalance: Balance;
31
+ /** the user's existing quote lp balance */
32
+ userQuoteLpBalance: Balance;
33
+ /** The number of base that can be obtained when a user withdraws from the pool */
34
+ userBaseLpToTokenBalance: BigNumber | null | undefined;
35
+ /** The number of quote that can be obtained when a user withdraws from the pool */
36
+ userQuoteLpToTokenBalance: BigNumber | null | undefined;
37
+ userLpBalanceLoading: boolean;
38
+ userLpToTokenBalanceLoading: boolean;
39
+ userLpBalanceError: boolean;
40
+ userLpToTokenBalanceError: boolean;
41
+ userLpToTokenBalanceRefetch: () => void;
42
+ };
43
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function Pool(): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { ChainId } from '../../../constants/chains';
2
+ import React from 'react';
3
+ export default function AddLiquidityList({ scrollParentRef, account, filterChainIds, activeChainId, handleChangeActiveChainId, }: {
4
+ scrollParentRef: React.MutableRefObject<HTMLDivElement | undefined>;
5
+ account?: string;
6
+ filterChainIds?: ChainId[];
7
+ activeChainId: ChainId | undefined;
8
+ handleChangeActiveChainId: (chainId: number | undefined) => void;
9
+ }): JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { BoxProps } from '@dodoex/components';
3
+ import { FetchLiquidityListLqList } from '../../utils';
4
+ export default function FilterAddressTags({ lqList, onDeleteTag, sx, }: {
5
+ lqList: FetchLiquidityListLqList;
6
+ onDeleteTag: () => void;
7
+ sx?: BoxProps['sx'];
8
+ }): JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { BoxProps } from '@dodoex/components';
3
+ import { TokenInfo } from '../../../../hooks/Token';
4
+ export default function FilterTokenTags({ tags, onDeleteTag, sx, }: {
5
+ tags: TokenInfo[];
6
+ onDeleteTag: (tag: TokenInfo) => void;
7
+ sx?: BoxProps['sx'];
8
+ }): JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { BoxProps } from '@dodoex/components';
3
+ export default function LoadingCard({ sx }: {
4
+ sx?: BoxProps['sx'];
5
+ }): JSX.Element;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { BoxProps } from '@dodoex/components';
3
+ import { TokenInfo } from '../../../../hooks/Token';
4
+ export default function PoolApyTooltip({ chainId, baseToken, quoteToken, apy, hasQuote, hasMining, sx, }: {
5
+ chainId: number;
6
+ baseToken: TokenInfo | undefined;
7
+ quoteToken: TokenInfo | undefined;
8
+ apy: {
9
+ transactionBaseApy?: string | null;
10
+ transactionQuoteApy?: string | null;
11
+ miningBaseApy?: string | null;
12
+ miningQuoteApy?: string | null;
13
+ } | undefined | null;
14
+ hasQuote: boolean;
15
+ hasMining: boolean;
16
+ sx?: BoxProps['sx'];
17
+ }): JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { BoxProps } from '@dodoex/components';
3
+ import { TokenInfo } from '../../../../hooks/Token';
4
+ export default function TokenAndPoolFilter({ sx, value, onChange, searchAddress, }: {
5
+ sx?: BoxProps['sx'];
6
+ value: Array<TokenInfo>;
7
+ onChange: (v: Array<TokenInfo>) => void;
8
+ searchAddress: (address: string, onClose: () => void) => Promise<JSX.Element | null>;
9
+ }): JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { FetchLiquidityListLqList } from '../../utils';
3
+ export default function TokenListPoolItem({ list, onClick, }: {
4
+ list: FetchLiquidityListLqList;
5
+ onClick: () => void;
6
+ }): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ChainId } from '../../../../constants/chains';
2
+ export declare function usePoolListFilterChainId(): {
3
+ activeChainId: ChainId | undefined;
4
+ filterChainIds: ChainId[] | undefined;
5
+ handleChangeActiveChainId: (chainId: number | undefined) => void;
6
+ };
@@ -0,0 +1,58 @@
1
+ import { TokenInfo } from '../../../../hooks/Token';
2
+ import { FetchLiquidityListLqList } from '../../utils';
3
+ export declare function usePoolListFilterTokenAndPool(): {
4
+ filterTokens: TokenInfo[];
5
+ filterASymbol: string;
6
+ filterBSymbol: string;
7
+ filterAddressLqList: ({
8
+ id?: string | null | undefined;
9
+ isPrivatePool?: boolean | null | undefined;
10
+ isMyLiquidity?: boolean | null | undefined;
11
+ pair?: {
12
+ id: string;
13
+ chainId: number;
14
+ type: string;
15
+ baseReserve: any;
16
+ quoteReserve: any;
17
+ lastTradePrice: any;
18
+ lpFeeRate: any;
19
+ i?: any;
20
+ creator: any;
21
+ tvl?: any;
22
+ miningAddress?: (string | null)[] | null | undefined;
23
+ baseLpToken?: {
24
+ id: string;
25
+ decimals: any;
26
+ } | null | undefined;
27
+ quoteLpToken?: {
28
+ id: string;
29
+ decimals: any;
30
+ } | null | undefined;
31
+ baseToken: {
32
+ id: string;
33
+ symbol: string;
34
+ name: string;
35
+ decimals: any;
36
+ usdPrice: any;
37
+ logoImg?: string | null | undefined;
38
+ };
39
+ quoteToken: {
40
+ id: string;
41
+ symbol: string;
42
+ name: string;
43
+ decimals: any;
44
+ usdPrice: any;
45
+ logoImg?: string | null | undefined;
46
+ };
47
+ apy?: {
48
+ miningBaseApy?: any;
49
+ miningQuoteApy?: any;
50
+ transactionBaseApy?: any;
51
+ transactionQuoteApy?: any;
52
+ } | null | undefined;
53
+ } | null | undefined;
54
+ } | null)[] | null | undefined;
55
+ handleDeleteToken: (token: TokenInfo) => void;
56
+ handleChangeFilterTokens: (tokens: Array<TokenInfo>) => void;
57
+ handleChangeFilterAddress: (lqList: FetchLiquidityListLqList) => void;
58
+ };
@@ -0,0 +1,15 @@
1
+ export declare enum PoolTab {
2
+ addLiquidity = "add-liquidity",
3
+ myLiquidity = "my-liquidity",
4
+ myCreated = "my-created"
5
+ }
6
+ export declare function usePoolListTabs({ account }: {
7
+ account?: string;
8
+ }): {
9
+ poolTab: PoolTab;
10
+ tabs: {
11
+ key: PoolTab;
12
+ value: string;
13
+ }[];
14
+ handleChangePoolTab: (poolTab: PoolTab) => void;
15
+ };
@@ -0,0 +1,20 @@
1
+ import { PoolApi, ExcludeNone, PoolType } from '@dodoex/api';
2
+ import { ChainId } from '../../constants/chains';
3
+ import { TokenInfo } from '../../hooks/Token';
4
+ import { OperatePool } from './PoolOperate/types';
5
+ export declare const poolApi: PoolApi;
6
+ export declare type FetchLiquidityListLqList = ExcludeNone<ReturnType<Exclude<typeof PoolApi.graphql.fetchLiquidityList['__apiType'], undefined>>['liquidity_list']>['lqList'];
7
+ export declare function convertLiquidityTokenToTokenInfo(token: {
8
+ id: string;
9
+ symbol: string;
10
+ name: string;
11
+ decimals: number;
12
+ usdPrice: number;
13
+ logoImg?: string | null;
14
+ } | undefined, chainId: ChainId | number): TokenInfo | undefined;
15
+ export declare function canOperatePool(account: string | undefined, { owner, creator, type, }: {
16
+ owner?: string | null;
17
+ creator?: string | null;
18
+ type?: PoolType;
19
+ }): boolean;
20
+ export declare function convertFetchLiquidityToOperateData(lqData: ExcludeNone<FetchLiquidityListLqList>[0]): OperatePool;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dodoex/widgets",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "description": "DODO Widgets",
5
5
  "source": "src/index.tsx",
6
6
  "types": "dist/src/index.d.ts",
@@ -1 +0,0 @@
1
- export declare const widgetI18n: import("@lingui/core").I18n;
@@ -1 +0,0 @@
1
- export declare const widgetI18n: import("@lingui/core").I18n;