@dodoex/widgets 3.0.2-beta.16 → 3.0.2-beta.18

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 (74) hide show
  1. package/dist/cjs/locales/en-US.js +1 -1
  2. package/dist/cjs/locales/zh-CN.js +1 -1
  3. package/dist/{helper-DYVJUtvQ.js → helper-BY-qP0mP.js} +1 -1
  4. package/dist/{helper-BNu3rgBV.cjs → helper-CsdI18hz.cjs} +1 -1
  5. package/dist/{index-p0xf7yO5.cjs → index-CQtAqUIV.cjs} +6 -6
  6. package/dist/index-CUkwAXZ8.js +31 -0
  7. package/dist/{index-BM1JzXl2.cjs → index-DHG_S5KR.cjs} +2 -2
  8. package/dist/index-EAeULQnu.js +78 -0
  9. package/dist/index-P1YNB1lp.cjs +31 -0
  10. package/dist/{index-C2g_bloT.js → index-hhGR_o1G.js} +1 -1
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/locales/en-US.js +1 -1
  14. package/dist/locales/zh-CN.js +1 -1
  15. package/dist/types/components/AddressWithLinkAndCopy.d.ts +2 -1
  16. package/dist/types/components/List/EmptyList.d.ts +2 -1
  17. package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +3 -2
  18. package/dist/types/components/TokenLogoPair.d.ts +1 -1
  19. package/dist/types/components/Widget/index.d.ts +25 -1
  20. package/dist/types/components/WidgetContainer.d.ts +1 -1
  21. package/dist/types/constants/api.d.ts +3 -3
  22. package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +99 -22
  23. package/dist/types/hooks/Token/useTokenStatus.d.ts +3 -3
  24. package/dist/types/hooks/contract/useFetchBlockNumber.d.ts +1 -1
  25. package/dist/types/hooks/contract/useFetchETHBalance.d.ts +21 -1
  26. package/dist/types/hooks/useGlobalState.d.ts +32 -0
  27. package/dist/types/hooks/useTokenState.d.ts +18 -0
  28. package/dist/types/utils/address.d.ts +1 -1
  29. package/dist/types/utils/chains.d.ts +1 -1
  30. package/dist/types/utils/token.d.ts +1 -1
  31. package/dist/types/widgets/MiningWidget/MiningList/hooks/useStatusAndStartBlockNumber.d.ts +2 -1
  32. package/dist/types/widgets/MiningWidget/helper.d.ts +2 -1
  33. package/dist/types/widgets/MiningWidget/hooks/helper.d.ts +2 -2
  34. package/dist/types/widgets/MiningWidget/hooks/useMiningItem.d.ts +1 -1
  35. package/dist/types/widgets/MiningWidget/hooks/useMiningList.d.ts +1 -1
  36. package/dist/types/widgets/MiningWidget/hooks/useMyCreatedMiningList.d.ts +1 -1
  37. package/dist/types/widgets/MiningWidget/hooks/useReviewRewardToken.d.ts +2 -2
  38. package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +1 -1
  39. package/dist/types/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +8 -2
  40. package/dist/types/widgets/MiningWidget/hooks/utils.d.ts +1 -1
  41. package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePools.d.ts +1 -1
  42. package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/addresses.d.ts +0 -14
  43. package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +8 -1
  44. package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +2 -2
  45. package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +7 -1
  46. package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +7 -1
  47. package/dist/types/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -1
  48. package/dist/types/widgets/PoolWidget/PoolList/components/migationWidget.d.ts +7 -0
  49. package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +12 -1
  50. package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +11 -1
  51. package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +10 -4
  52. package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +6 -6
  53. package/dist/types/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +10 -10
  54. package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +45 -0
  55. package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +5 -2
  56. package/package.json +4 -6
  57. package/dist/index-BxkgcgOR.js +0 -31
  58. package/dist/index-CcQennNY.js +0 -78
  59. package/dist/index-DcqykOJv.cjs +0 -31
  60. package/dist/types/store/actions/globals.d.ts +0 -9
  61. package/dist/types/store/actions/index.d.ts +0 -4
  62. package/dist/types/store/actions/settings.d.ts +0 -3
  63. package/dist/types/store/actions/token.d.ts +0 -7
  64. package/dist/types/store/actions/wallet.d.ts +0 -6
  65. package/dist/types/store/index.d.ts +0 -12
  66. package/dist/types/store/reducers/globals.d.ts +0 -21
  67. package/dist/types/store/reducers/index.d.ts +0 -17
  68. package/dist/types/store/reducers/settings.d.ts +0 -8
  69. package/dist/types/store/reducers/token.d.ts +0 -22
  70. package/dist/types/store/reducers/wallet.d.ts +0 -13
  71. package/dist/types/store/selectors/globals.d.ts +0 -7
  72. package/dist/types/store/selectors/settings.d.ts +0 -2
  73. package/dist/types/store/selectors/token.d.ts +0 -6
  74. package/dist/types/store/selectors/wallet.d.ts +0 -6
@@ -29,16 +29,22 @@ export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuot
29
29
  addPortion: BigNumber;
30
30
  amountLoading: boolean;
31
31
  amountError: boolean;
32
- amountRefetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<unknown, Error>>;
32
+ amountRefetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
33
+ baseReserve: BigNumber;
34
+ quoteReserve: BigNumber;
35
+ } | null, Error>>;
33
36
  amountCheckedDisabled: boolean;
34
- midPrice: any;
37
+ midPrice: BigNumber | undefined;
35
38
  uniV2Pair: {
36
39
  isRearTokenA: boolean;
37
40
  pair: import("@uniswap/v2-sdk").Pair | null;
38
41
  price: BigNumber | undefined;
39
42
  invertedPrice: BigNumber | undefined;
40
- reserveQuery: import("@tanstack/react-query").UseQueryResult<unknown, Error>;
41
- totalBaseLpQuery: import("@tanstack/react-query").UseQueryResult<unknown, Error>;
43
+ reserveQuery: import("@tanstack/react-query").UseQueryResult<{
44
+ baseReserve: BigNumber;
45
+ quoteReserve: BigNumber;
46
+ } | null, Error>;
47
+ totalBaseLpQuery: import("@tanstack/react-query").UseQueryResult<BigNumber | null, Error>;
42
48
  liquidityMinted: BigNumber | undefined;
43
49
  poolTokenPercentage: BigNumber | undefined;
44
50
  shareOfPool: string;
@@ -12,12 +12,12 @@ export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteA
12
12
  isGetApproveLoading: boolean;
13
13
  needApprove: boolean;
14
14
  needReset: boolean | undefined;
15
- needShowTokenStatusButton: any;
16
- insufficientBalance: any;
15
+ needShowTokenStatusButton: boolean;
16
+ insufficientBalance: boolean;
17
17
  loading: boolean;
18
18
  approveTitle: string;
19
19
  submitApprove: () => Promise<void>;
20
- getMaxBalance: () => any;
20
+ getMaxBalance: () => string;
21
21
  };
22
22
  quoteTokenStatus: {
23
23
  token: import("../../../..").TokenInfo | null | undefined;
@@ -25,11 +25,11 @@ export declare function useRemoveLiquidityTokenStatus({ pool, baseAmount, quoteA
25
25
  isGetApproveLoading: boolean;
26
26
  needApprove: boolean;
27
27
  needReset: boolean | undefined;
28
- needShowTokenStatusButton: any;
29
- insufficientBalance: any;
28
+ needShowTokenStatusButton: boolean;
29
+ insufficientBalance: boolean;
30
30
  loading: boolean;
31
31
  approveTitle: string;
32
32
  submitApprove: () => Promise<void>;
33
- getMaxBalance: () => any;
33
+ getMaxBalance: () => string;
34
34
  };
35
35
  };
@@ -15,28 +15,28 @@ export declare function usePoolBalanceInfo({ account, pool, }: {
15
15
  };
16
16
  }): {
17
17
  /** existing base lp balance */
18
- totalBaseLpBalance: unknown;
18
+ totalBaseLpBalance: BigNumber | null | undefined;
19
19
  /** existing quote lp balance */
20
- totalQuoteLpBalance: unknown;
20
+ totalQuoteLpBalance: BigNumber | null | undefined;
21
21
  /** the total deposited base lp balance */
22
- baseReserve: any;
22
+ baseReserve: BigNumber | undefined;
23
23
  /** the total deposited quote lp balance */
24
- quoteReserve: any;
24
+ quoteReserve: BigNumber | undefined;
25
25
  /** classical base equilibrium target */
26
- classicalBaseTarget: any;
26
+ classicalBaseTarget: BigNumber | undefined;
27
27
  /** classical quote equilibrium target */
28
- classicalQuoteTarget: any;
28
+ classicalQuoteTarget: BigNumber | undefined;
29
29
  /** the user's existing base lp balance */
30
- userBaseLpBalance: any;
30
+ userBaseLpBalance: Balance;
31
31
  /** the user's existing quote lp balance */
32
- userQuoteLpBalance: any;
32
+ userQuoteLpBalance: Balance;
33
33
  /** The number of base that can be obtained when a user withdraws from the pool */
34
- userBaseLpToTokenBalance: any;
34
+ userBaseLpToTokenBalance: BigNumber | undefined;
35
35
  /** The number of quote that can be obtained when a user withdraws from the pool */
36
36
  userQuoteLpToTokenBalance: BigNumber | null | undefined;
37
37
  baseLpToTokenProportion: BigNumber | undefined;
38
38
  quoteLpToTokenProportion: BigNumber | undefined;
39
- isSinglePool: any;
39
+ isSinglePool: boolean;
40
40
  userLpBalanceLoading: boolean;
41
41
  userLpToTokenBalanceLoading: boolean;
42
42
  userLpBalanceError: boolean;
@@ -11,6 +11,13 @@ export declare function usePoolDetail({ id, chainId, }: {
11
11
  baseToken: TokenInfo;
12
12
  quoteToken: TokenInfo;
13
13
  miningAddress: string;
14
+ apy: {
15
+ miningBaseApy?: any | null;
16
+ miningQuoteApy?: any | null;
17
+ transactionBaseApy?: any | null;
18
+ transactionQuoteApy?: any | null;
19
+ metromMiningApy?: any | null;
20
+ } | null | undefined;
14
21
  baseApy: string | undefined;
15
22
  quoteApy: string | undefined;
16
23
  isCpPool: boolean;
@@ -39,11 +46,13 @@ export declare function usePoolDetail({ id, chainId, }: {
39
46
  id: string;
40
47
  symbol: string;
41
48
  name: string;
49
+ decimals: any;
42
50
  } | null;
43
51
  quoteLpToken?: {
44
52
  id: string;
45
53
  symbol: string;
46
54
  name: string;
55
+ decimals: any;
47
56
  } | null;
48
57
  } | null;
49
58
  data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolQuery;
@@ -78,6 +87,13 @@ export declare function usePoolDetail({ id, chainId, }: {
78
87
  baseToken: TokenInfo;
79
88
  quoteToken: TokenInfo;
80
89
  miningAddress: string;
90
+ apy: {
91
+ miningBaseApy?: any | null;
92
+ miningQuoteApy?: any | null;
93
+ transactionBaseApy?: any | null;
94
+ transactionQuoteApy?: any | null;
95
+ metromMiningApy?: any | null;
96
+ } | null | undefined;
81
97
  baseApy: string | undefined;
82
98
  quoteApy: string | undefined;
83
99
  isCpPool: boolean;
@@ -106,11 +122,13 @@ export declare function usePoolDetail({ id, chainId, }: {
106
122
  id: string;
107
123
  symbol: string;
108
124
  name: string;
125
+ decimals: any;
109
126
  } | null;
110
127
  quoteLpToken?: {
111
128
  id: string;
112
129
  symbol: string;
113
130
  name: string;
131
+ decimals: any;
114
132
  } | null;
115
133
  } | null;
116
134
  data: import("@dodoex/api/dist/types/gql/graphql").FetchPoolQuery;
@@ -145,6 +163,13 @@ export declare function usePoolDetail({ id, chainId, }: {
145
163
  baseToken: TokenInfo;
146
164
  quoteToken: TokenInfo;
147
165
  miningAddress: string;
166
+ apy: {
167
+ miningBaseApy?: any | null;
168
+ miningQuoteApy?: any | null;
169
+ transactionBaseApy?: any | null;
170
+ transactionQuoteApy?: any | null;
171
+ metromMiningApy?: any | null;
172
+ } | null | undefined;
148
173
  baseApy: string | undefined;
149
174
  quoteApy: string | undefined;
150
175
  isCpPool: boolean;
@@ -173,11 +198,13 @@ export declare function usePoolDetail({ id, chainId, }: {
173
198
  id: string;
174
199
  symbol: string;
175
200
  name: string;
201
+ decimals: any;
176
202
  } | null;
177
203
  quoteLpToken?: {
178
204
  id: string;
179
205
  symbol: string;
180
206
  name: string;
207
+ decimals: any;
181
208
  } | null;
182
209
  } | null;
183
210
  data: undefined;
@@ -212,6 +239,13 @@ export declare function usePoolDetail({ id, chainId, }: {
212
239
  baseToken: TokenInfo;
213
240
  quoteToken: TokenInfo;
214
241
  miningAddress: string;
242
+ apy: {
243
+ miningBaseApy?: any | null;
244
+ miningQuoteApy?: any | null;
245
+ transactionBaseApy?: any | null;
246
+ transactionQuoteApy?: any | null;
247
+ metromMiningApy?: any | null;
248
+ } | null | undefined;
215
249
  baseApy: string | undefined;
216
250
  quoteApy: string | undefined;
217
251
  isCpPool: boolean;
@@ -240,11 +274,13 @@ export declare function usePoolDetail({ id, chainId, }: {
240
274
  id: string;
241
275
  symbol: string;
242
276
  name: string;
277
+ decimals: any;
243
278
  } | null;
244
279
  quoteLpToken?: {
245
280
  id: string;
246
281
  symbol: string;
247
282
  name: string;
283
+ decimals: any;
248
284
  } | null;
249
285
  } | null;
250
286
  data: undefined;
@@ -279,6 +315,13 @@ export declare function usePoolDetail({ id, chainId, }: {
279
315
  baseToken: TokenInfo;
280
316
  quoteToken: TokenInfo;
281
317
  miningAddress: string;
318
+ apy: {
319
+ miningBaseApy?: any | null;
320
+ miningQuoteApy?: any | null;
321
+ transactionBaseApy?: any | null;
322
+ transactionQuoteApy?: any | null;
323
+ metromMiningApy?: any | null;
324
+ } | null | undefined;
282
325
  baseApy: string | undefined;
283
326
  quoteApy: string | undefined;
284
327
  isCpPool: boolean;
@@ -307,11 +350,13 @@ export declare function usePoolDetail({ id, chainId, }: {
307
350
  id: string;
308
351
  symbol: string;
309
352
  name: string;
353
+ decimals: any;
310
354
  } | null;
311
355
  quoteLpToken?: {
312
356
  id: string;
313
357
  symbol: string;
314
358
  name: string;
359
+ decimals: any;
315
360
  } | null;
316
361
  } | null;
317
362
  data: undefined;
@@ -15,8 +15,11 @@ export declare function useUniV2Pairs({ pool, baseAmount, quoteAmount, }: {
15
15
  pair: Pair | null;
16
16
  price: BigNumber | undefined;
17
17
  invertedPrice: BigNumber | undefined;
18
- reserveQuery: import("@tanstack/react-query").UseQueryResult<unknown, Error>;
19
- totalBaseLpQuery: import("@tanstack/react-query").UseQueryResult<unknown, Error>;
18
+ reserveQuery: import("@tanstack/react-query").UseQueryResult<{
19
+ baseReserve: BigNumber;
20
+ quoteReserve: BigNumber;
21
+ } | null, Error>;
22
+ totalBaseLpQuery: import("@tanstack/react-query").UseQueryResult<BigNumber | null, Error>;
20
23
  liquidityMinted: BigNumber | undefined;
21
24
  poolTokenPercentage: BigNumber | undefined;
22
25
  shareOfPool: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dodoex/widgets",
3
- "version": "3.0.2-beta.16",
3
+ "version": "3.0.2-beta.18",
4
4
  "description": "DODO Widgets",
5
5
  "source": "src/index.tsx",
6
6
  "types": "dist/types/index.d.ts",
@@ -58,10 +58,10 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@babel/runtime": "^7.17.0",
61
- "@dodoex/api": "3.0.3-morph.7",
61
+ "@dodoex/api": "3.0.3-beta.3",
62
62
  "@dodoex/components": "3.0.3",
63
63
  "@dodoex/contract-request": "^1.3.0",
64
- "@dodoex/dodo-contract-request": "^1.9.0-alpha.15",
64
+ "@dodoex/dodo-contract-request": "1.10.0-alpha.4",
65
65
  "@dodoex/icons": "^2.0.2",
66
66
  "@emotion/react": "^11.10.0",
67
67
  "@emotion/styled": "^11.10.0",
@@ -106,9 +106,7 @@
106
106
  "peerDependencies": {
107
107
  "@babel/runtime": ">=7.17.0",
108
108
  "react": ">=17.0.1",
109
- "react-dom": ">=17.0.1",
110
- "react-redux": ">=7.2.2",
111
- "redux": ">=4.1.2"
109
+ "react-dom": ">=17.0.1"
112
110
  },
113
111
  "devDependencies": {
114
112
  "@babel/preset-env": "^7.16.11",