@dodoex/widgets 2.6.6 → 2.6.8

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 (155) hide show
  1. package/dist/cjs/index.cjs +1 -1
  2. package/dist/index.js +1 -1
  3. package/package.json +4 -2
  4. package/dist/cjs/failed-list-e6c1e563-7122998d.cjs +0 -1
  5. package/dist/cjs/index-183743c8.cjs +0 -45
  6. package/dist/cjs/index-1904ef51.cjs +0 -50
  7. package/dist/cjs/index-19cf4c6e.cjs +0 -50
  8. package/dist/cjs/index-1a21b21a.cjs +0 -45
  9. package/dist/cjs/index-246a9973.cjs +0 -50
  10. package/dist/cjs/index-39149ce7.cjs +0 -45
  11. package/dist/cjs/index-5eca89d2.cjs +0 -50
  12. package/dist/cjs/index-64af8ffd.cjs +0 -45
  13. package/dist/cjs/index-f2a80623.cjs +0 -45
  14. package/dist/cjs/lottie-01f67a00.cjs +0 -1
  15. package/dist/cjs/lottie-09dbe581.cjs +0 -1
  16. package/dist/cjs/lottie-2035df95.cjs +0 -1
  17. package/dist/cjs/lottie-7e742196.cjs +0 -1
  18. package/dist/cjs/lottie-924a2436.cjs +0 -1
  19. package/dist/cjs/lottie-b9cf6aee.cjs +0 -1
  20. package/dist/cjs/lottie-c4b6404b.cjs +0 -1
  21. package/dist/cjs/lottie-ed4f1473.cjs +0 -1
  22. package/dist/cjs/lottie-f516f300.cjs +0 -1
  23. package/dist/cjs/no-found-89a3b4af-9c7e1488.cjs +0 -1
  24. package/dist/cjs/no-result-01c60834-3e379801.cjs +0 -1
  25. package/dist/cjs/src/components/AddressWithLinkAndCopy.d.ts +0 -22
  26. package/dist/cjs/src/components/AutoButton.d.ts +0 -7
  27. package/dist/cjs/src/components/ConnectWallet/ConnectWalletDialog.d.ts +0 -5
  28. package/dist/cjs/src/components/ConnectWallet/NeedConnectButton.d.ts +0 -7
  29. package/dist/cjs/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +0 -2
  30. package/dist/cjs/src/components/CopyTooltipToast.d.ts +0 -9
  31. package/dist/cjs/src/components/DataCard/DataCardGroup.d.ts +0 -9
  32. package/dist/cjs/src/components/Dialog.d.ts +0 -1
  33. package/dist/cjs/src/components/List/EmptyList.d.ts +0 -7
  34. package/dist/cjs/src/components/List/FailedList.d.ts +0 -6
  35. package/dist/cjs/src/components/SelectChain.d.ts +0 -12
  36. package/dist/cjs/src/components/TokenLogoPair.d.ts +0 -16
  37. package/dist/cjs/src/components/TokenLogoSimple.d.ts +0 -13
  38. package/dist/cjs/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +0 -2
  39. package/dist/cjs/src/constants/pool.d.ts +0 -2
  40. package/dist/cjs/src/constants/sessionStorage.d.ts +0 -2
  41. package/dist/cjs/src/hooks/Chain/useChainList.d.ts +0 -2
  42. package/dist/cjs/src/hooks/Chain/useChainList.test.d.ts +0 -1
  43. package/dist/cjs/src/hooks/ConnectWallet/useWalletInfo.d.ts +0 -6
  44. package/dist/cjs/src/hooks/Submission/useBalanceUpdateLoading.d.ts +0 -15
  45. package/dist/cjs/src/hooks/Token/useTokenStatus.d.ts +0 -17
  46. package/dist/cjs/src/hooks/Token/useTokenStatus.test.d.ts +0 -1
  47. package/dist/cjs/src/hooks/style/useWidgetDevice.d.ts +0 -6
  48. package/dist/cjs/src/hooks/usePrevious.d.ts +0 -1
  49. package/dist/cjs/src/providers/GlobalConfigContext.d.ts +0 -7
  50. package/dist/cjs/src/providers/i18n.d.ts +0 -9
  51. package/dist/cjs/src/providers/queryClient/index.d.ts +0 -2
  52. package/dist/cjs/src/providers/queryClient.d.ts +0 -2
  53. package/dist/cjs/src/router/index.d.ts +0 -7
  54. package/dist/cjs/src/router/types.d.ts +0 -22
  55. package/dist/cjs/src/utils/utils.d.ts +0 -1
  56. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +0 -8
  57. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +0 -18
  58. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +0 -8
  59. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +0 -6
  60. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +0 -8
  61. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +0 -18
  62. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +0 -44
  63. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +0 -12
  64. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +0 -12
  65. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/index.d.ts +0 -8
  66. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/types.d.ts +0 -19
  67. package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +0 -43
  68. package/dist/cjs/src/widgets/PoolWidget/index.d.ts +0 -2
  69. package/dist/cjs/src/widgets/PoolWidget/list/AddLiquidity.d.ts +0 -9
  70. package/dist/cjs/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +0 -8
  71. package/dist/cjs/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +0 -8
  72. package/dist/cjs/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +0 -5
  73. package/dist/cjs/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +0 -17
  74. package/dist/cjs/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +0 -9
  75. package/dist/cjs/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +0 -6
  76. package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +0 -6
  77. package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +0 -58
  78. package/dist/cjs/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +0 -15
  79. package/dist/cjs/src/widgets/PoolWidget/utils.d.ts +0 -20
  80. package/dist/failed-list-e6c1e563-478d73e0.js +0 -1
  81. package/dist/index-0e954ab8.js +0 -45
  82. package/dist/index-41db7f0e.js +0 -45
  83. package/dist/index-b07aac90.js +0 -45
  84. package/dist/index-c1a581ca.js +0 -50
  85. package/dist/index-c9dbe645.js +0 -50
  86. package/dist/index-cdf23d80.js +0 -50
  87. package/dist/index-e58d24e5.js +0 -50
  88. package/dist/index-ee546021.js +0 -45
  89. package/dist/index-f055c418.js +0 -45
  90. package/dist/lottie-0a7cf033.js +0 -1
  91. package/dist/lottie-449d7c9a.js +0 -1
  92. package/dist/lottie-48250155.js +0 -1
  93. package/dist/lottie-9678ebc9.js +0 -1
  94. package/dist/lottie-9b618308.js +0 -1
  95. package/dist/lottie-b4708423.js +0 -1
  96. package/dist/lottie-baaed8fa.js +0 -1
  97. package/dist/lottie-d6631244.js +0 -1
  98. package/dist/lottie-ed5a9dfd.js +0 -1
  99. package/dist/no-found-89a3b4af-763d58f5.js +0 -1
  100. package/dist/no-result-01c60834-7921d2fa.js +0 -1
  101. package/dist/src/components/AddressWithLinkAndCopy.d.ts +0 -22
  102. package/dist/src/components/AutoButton.d.ts +0 -7
  103. package/dist/src/components/ConnectWallet/ConnectWalletDialog.d.ts +0 -5
  104. package/dist/src/components/ConnectWallet/NeedConnectButton.d.ts +0 -7
  105. package/dist/src/components/ConnectWallet/OpenConnectWalletInfo.d.ts +0 -2
  106. package/dist/src/components/CopyTooltipToast.d.ts +0 -9
  107. package/dist/src/components/DataCard/DataCardGroup.d.ts +0 -9
  108. package/dist/src/components/Dialog.d.ts +0 -1
  109. package/dist/src/components/List/EmptyList.d.ts +0 -7
  110. package/dist/src/components/List/FailedList.d.ts +0 -6
  111. package/dist/src/components/SelectChain.d.ts +0 -12
  112. package/dist/src/components/TokenLogoPair.d.ts +0 -16
  113. package/dist/src/components/TokenLogoSimple.d.ts +0 -13
  114. package/dist/src/components/TokenPicker/TokenSearchLoadingSkelton.d.ts +0 -2
  115. package/dist/src/constants/pool.d.ts +0 -2
  116. package/dist/src/constants/sessionStorage.d.ts +0 -2
  117. package/dist/src/hooks/Chain/useChainList.d.ts +0 -2
  118. package/dist/src/hooks/Chain/useChainList.test.d.ts +0 -1
  119. package/dist/src/hooks/ConnectWallet/useWalletInfo.d.ts +0 -6
  120. package/dist/src/hooks/Submission/useBalanceUpdateLoading.d.ts +0 -15
  121. package/dist/src/hooks/Token/useTokenStatus.d.ts +0 -17
  122. package/dist/src/hooks/Token/useTokenStatus.test.d.ts +0 -1
  123. package/dist/src/hooks/style/useWidgetDevice.d.ts +0 -6
  124. package/dist/src/hooks/usePrevious.d.ts +0 -1
  125. package/dist/src/providers/GlobalConfigContext.d.ts +0 -7
  126. package/dist/src/providers/i18n.d.ts +0 -9
  127. package/dist/src/providers/queryClient/index.d.ts +0 -2
  128. package/dist/src/providers/queryClient.d.ts +0 -2
  129. package/dist/src/router/index.d.ts +0 -7
  130. package/dist/src/router/types.d.ts +0 -22
  131. package/dist/src/utils/utils.d.ts +0 -1
  132. package/dist/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +0 -8
  133. package/dist/src/widgets/PoolWidget/PoolOperate/Footer.d.ts +0 -18
  134. package/dist/src/widgets/PoolWidget/PoolOperate/LiquidityInfo.d.ts +0 -8
  135. package/dist/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +0 -6
  136. package/dist/src/widgets/PoolWidget/PoolOperate/Ratio.d.ts +0 -8
  137. package/dist/src/widgets/PoolWidget/PoolOperate/SlippageSetting.d.ts +0 -18
  138. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +0 -44
  139. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +0 -12
  140. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +0 -12
  141. package/dist/src/widgets/PoolWidget/PoolOperate/index.d.ts +0 -8
  142. package/dist/src/widgets/PoolWidget/PoolOperate/types.d.ts +0 -19
  143. package/dist/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +0 -43
  144. package/dist/src/widgets/PoolWidget/index.d.ts +0 -2
  145. package/dist/src/widgets/PoolWidget/list/AddLiquidity.d.ts +0 -9
  146. package/dist/src/widgets/PoolWidget/list/components/FilterAddressTags.d.ts +0 -8
  147. package/dist/src/widgets/PoolWidget/list/components/FilterTokenTags.d.ts +0 -8
  148. package/dist/src/widgets/PoolWidget/list/components/LoadingCard.d.ts +0 -5
  149. package/dist/src/widgets/PoolWidget/list/components/PoolApyTooltip.d.ts +0 -17
  150. package/dist/src/widgets/PoolWidget/list/components/TokenAndPoolFilter.d.ts +0 -9
  151. package/dist/src/widgets/PoolWidget/list/components/TokenListPoolItem.d.ts +0 -6
  152. package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterChainId.d.ts +0 -6
  153. package/dist/src/widgets/PoolWidget/list/hooks/usePoolListFilterTokenAndPool.d.ts +0 -58
  154. package/dist/src/widgets/PoolWidget/list/hooks/usePoolListTabs.d.ts +0 -15
  155. package/dist/src/widgets/PoolWidget/utils.d.ts +0 -20
@@ -1,43 +0,0 @@
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 {};
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function Pool(): JSX.Element;
@@ -1,9 +0,0 @@
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;
@@ -1,8 +0,0 @@
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;
@@ -1,8 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { BoxProps } from '@dodoex/components';
3
- export default function LoadingCard({ sx }: {
4
- sx?: BoxProps['sx'];
5
- }): JSX.Element;
@@ -1,17 +0,0 @@
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;
@@ -1,9 +0,0 @@
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;
@@ -1,6 +0,0 @@
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;
@@ -1,6 +0,0 @@
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
- };
@@ -1,58 +0,0 @@
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
- };
@@ -1,15 +0,0 @@
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
- };
@@ -1,20 +0,0 @@
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;