@multiversx/sdk-dapp-liquidity 1.1.0-alpha.2 → 1.1.0-alpha.21

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 (234) hide show
  1. package/README.md +6 -1
  2. package/api/getTransactions.d.ts +8 -2
  3. package/api/getTransactions.js +23 -3
  4. package/api/getTransactions.mjs +23 -3
  5. package/api/tests/getChains.spec.js +2 -1
  6. package/api/tests/getChains.spec.mjs +2 -1
  7. package/api/tests/getTokens.spec.js +2 -2
  8. package/api/tests/getTokens.spec.mjs +2 -2
  9. package/api/tests/getTransactions.spec.js +79 -69
  10. package/api/tests/getTransactions.spec.mjs +79 -69
  11. package/constants/index.d.ts +1 -1
  12. package/constants/index.js +1 -1
  13. package/constants/index.mjs +1 -1
  14. package/dto/Chain.dto.d.ts +3 -1
  15. package/dto/ConfirmRate.dto.d.ts +1 -0
  16. package/dto/Token.dto.d.ts +7 -2
  17. package/index.js +44 -16
  18. package/index.mjs +14 -16
  19. package/package.json +10 -6
  20. package/reactjs/components/BridgeForm/BridgeForm.d.ts +3 -1
  21. package/reactjs/components/BridgeForm/BridgeForm.js +182 -87
  22. package/reactjs/components/BridgeForm/BridgeForm.mjs +153 -58
  23. package/reactjs/components/BridgeHistory/BridgeHistory.js +73 -26
  24. package/reactjs/components/BridgeHistory/BridgeHistory.mjs +68 -21
  25. package/reactjs/components/Connect/BridgeAccountDisplay.js +2 -5
  26. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +2 -5
  27. package/reactjs/components/Connect/CustomConnectButton.js +2 -5
  28. package/reactjs/components/Connect/CustomConnectButton.mjs +1 -4
  29. package/reactjs/components/Connect/MvxConnectButton.d.ts +2 -4
  30. package/reactjs/components/Connect/MvxConnectButton.js +2 -2
  31. package/reactjs/components/Connect/MvxConnectButton.mjs +2 -2
  32. package/reactjs/components/Connect/SwitchChainButton.js +2 -6
  33. package/reactjs/components/Connect/SwitchChainButton.mjs +1 -5
  34. package/reactjs/components/CopyButton/CopyButton.js +2 -2
  35. package/reactjs/components/CopyButton/CopyButton.mjs +2 -2
  36. package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +5 -5
  37. package/reactjs/components/Error/Error.d.ts +6 -0
  38. package/reactjs/components/Error/Error.js +67 -0
  39. package/reactjs/components/Error/Error.mjs +66 -0
  40. package/reactjs/components/Error/index.d.ts +1 -0
  41. package/reactjs/components/Error/index.js +5 -0
  42. package/reactjs/components/Error/index.mjs +4 -0
  43. package/reactjs/components/TokenSelector/TokenSelector.d.ts +2 -1
  44. package/reactjs/components/TokenSelector/TokenSelector.js +17 -9
  45. package/reactjs/components/TokenSelector/TokenSelector.mjs +13 -5
  46. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +2 -1
  47. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +7 -3
  48. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +4 -0
  49. package/reactjs/components/TokenSelector/components/SelectContent.d.ts +2 -1
  50. package/reactjs/components/TokenSelector/components/SelectContent.js +12 -9
  51. package/reactjs/components/TokenSelector/components/SelectContent.mjs +4 -1
  52. package/reactjs/components/TokenSelector/components/TokenIcon.js +3 -3
  53. package/reactjs/components/TokenSelector/components/TokenItem.js +9 -9
  54. package/reactjs/components/TokenSelector/components/TokenItem.mjs +6 -6
  55. package/reactjs/components/base/MxCard/MxCard.js +2 -2
  56. package/reactjs/components/base/MxCircleLoader/MxCircleLoader.d.ts +4 -0
  57. package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +29 -0
  58. package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +28 -0
  59. package/reactjs/components/base/MxCircleLoader/index.d.ts +1 -0
  60. package/reactjs/components/base/MxCircleLoader/index.js +5 -0
  61. package/reactjs/components/base/MxCircleLoader/index.mjs +4 -0
  62. package/reactjs/components/base/MxLink/MxLink.js +2 -2
  63. package/reactjs/components/base/MxSearch/MxSearch.js +4 -4
  64. package/reactjs/components/base/MxSlideover/MxSlideover.js +4 -4
  65. package/reactjs/components/base/MxTooltip/MxTooltip.js +9 -9
  66. package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +2 -2
  67. package/reactjs/components/index.d.ts +1 -0
  68. package/reactjs/components/index.js +2 -0
  69. package/reactjs/components/index.mjs +2 -0
  70. package/reactjs/context/Web3AppProvider.d.ts +3 -1
  71. package/reactjs/context/Web3AppProvider.js +7 -5
  72. package/reactjs/context/Web3AppProvider.mjs +4 -2
  73. package/reactjs/context/useWeb3App.js +2 -2
  74. package/reactjs/hooks/index.js +1 -1
  75. package/reactjs/hooks/index.mjs +1 -1
  76. package/reactjs/hooks/useAccount.js +1 -5
  77. package/reactjs/hooks/useAccount.mjs +1 -5
  78. package/reactjs/hooks/useBalances.d.ts +4 -4
  79. package/reactjs/hooks/useBalances.js +16 -1
  80. package/reactjs/hooks/useBalances.mjs +16 -1
  81. package/reactjs/hooks/useBridgeFormik.js +9 -16
  82. package/reactjs/hooks/useBridgeFormik.mjs +0 -7
  83. package/reactjs/hooks/useDebounce.js +3 -3
  84. package/reactjs/hooks/useFetchBridgeData.d.ts +14 -4
  85. package/reactjs/hooks/useFetchTokens.d.ts +14 -4
  86. package/reactjs/hooks/useFetchTokens.js +9 -9
  87. package/reactjs/hooks/useFetchTokens.mjs +2 -2
  88. package/reactjs/hooks/useFiatData.d.ts +7 -2
  89. package/reactjs/hooks/useFiatData.js +6 -6
  90. package/reactjs/hooks/useFiatData.mjs +1 -1
  91. package/reactjs/hooks/useGetChainId.js +3 -3
  92. package/reactjs/hooks/useGetChainId.mjs +1 -1
  93. package/reactjs/hooks/useResolveTokenChain.js +2 -2
  94. package/reactjs/hooks/useSendTransactions.js +2 -2
  95. package/reactjs/hooks/useSignTransaction.d.ts +93 -67
  96. package/reactjs/hooks/useSignTransaction.js +53 -4
  97. package/reactjs/hooks/useSignTransaction.mjs +53 -4
  98. package/reactjs/hooks/validation/useTestHasEnoughFunds.js +3 -3
  99. package/reactjs/hooks/validation/useTestIsConnected.js +2 -2
  100. package/reactjs/index.js +44 -16
  101. package/reactjs/index.mjs +14 -16
  102. package/reactjs/init/init.d.ts +220 -1
  103. package/reactjs/init/init.js +34 -10
  104. package/reactjs/init/init.mjs +31 -7
  105. package/reactjs/init/tests/init.spec.js +5 -6
  106. package/reactjs/init/tests/init.spec.mjs +5 -6
  107. package/reactjs/queries/index.d.ts +0 -1
  108. package/reactjs/queries/index.js +0 -2
  109. package/reactjs/queries/index.mjs +1 -3
  110. package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +8 -3
  111. package/reactjs/queries/useGetEvmTokensBalances.query.js +15 -18
  112. package/reactjs/queries/useGetEvmTokensBalances.query.mjs +15 -18
  113. package/reactjs/queries/useGetHistory.query.d.ts +9 -1
  114. package/reactjs/queries/useGetHistory.query.js +23 -5
  115. package/reactjs/queries/useGetHistory.query.mjs +23 -5
  116. package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +7 -2
  117. package/reactjs/queries/useGetMvxTokensBalances.query.js +2 -2
  118. package/reactjs/reexports.d.ts +2 -1
  119. package/reactjs/reexports.js +41 -13
  120. package/reactjs/reexports.mjs +11 -13
  121. package/reactjs/utils/getInitialTokens.d.ts +4 -1
  122. package/reactjs/utils/getInitialTokens.js +3 -3
  123. package/reactjs/utils/getInitialTokens.mjs +3 -3
  124. package/style.css +33 -1730
  125. package/types/chainType.d.ts +6 -0
  126. package/types/chainType.js +11 -0
  127. package/types/chainType.mjs +10 -0
  128. package/types/transaction.d.ts +28 -0
  129. package/types/utxo.d.ts +11 -0
  130. package/types/utxo.js +2 -0
  131. package/types/utxo.mjs +1 -0
  132. package/{useBalances-C_69CFoa.mjs → useBalances-Bom1mw1J.mjs} +101 -23
  133. package/{useBalances-C4YhEYxy.js → useBalances-gZTsFZHe.js} +102 -24
  134. package/index-BIVnypNe.mjs +0 -108
  135. package/index-Ben8n3bd.js +0 -58656
  136. package/index-CnKr4rL1.mjs +0 -91
  137. package/index-CnuruJNu.js +0 -329
  138. package/index-DsBh-EBw.js +0 -108
  139. package/index-iN9APQ6x.mjs +0 -58735
  140. package/modules/fiat/components/FiatForm/FiatForm.d.ts +0 -9
  141. package/modules/fiat/components/FiatForm/FiatForm.js +0 -314
  142. package/modules/fiat/components/FiatForm/FiatForm.mjs +0 -313
  143. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.d.ts +0 -13
  144. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.js +0 -117
  145. package/modules/fiat/components/FiatForm/components/AmountInput/AmountInput.mjs +0 -116
  146. package/modules/fiat/components/FiatForm/components/AmountInput/index.d.ts +0 -1
  147. package/modules/fiat/components/FiatForm/components/AmountInput/index.js +0 -5
  148. package/modules/fiat/components/FiatForm/components/AmountInput/index.mjs +0 -4
  149. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.d.ts +0 -7
  150. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.js +0 -74
  151. package/modules/fiat/components/FiatForm/components/RateReloading/RateReloading.mjs +0 -73
  152. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.d.ts +0 -14
  153. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.js +0 -94
  154. package/modules/fiat/components/FiatForm/components/TokenSelector/TokenSelector.mjs +0 -93
  155. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.d.ts +0 -7
  156. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.js +0 -82
  157. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContainer.mjs +0 -81
  158. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.d.ts +0 -7
  159. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.js +0 -91
  160. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectContent.mjs +0 -90
  161. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.d.ts +0 -5
  162. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.js +0 -30
  163. package/modules/fiat/components/FiatForm/components/TokenSelector/components/SelectedOption.mjs +0 -29
  164. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.d.ts +0 -8
  165. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.js +0 -103
  166. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenIcon.mjs +0 -102
  167. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.d.ts +0 -7
  168. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.js +0 -33
  169. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenItem.mjs +0 -32
  170. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.d.ts +0 -7
  171. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.js +0 -21
  172. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenList.mjs +0 -20
  173. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.d.ts +0 -9
  174. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.js +0 -26
  175. package/modules/fiat/components/FiatForm/components/TokenSelector/components/TokenSymbol.mjs +0 -25
  176. package/modules/fiat/components/FiatForm/components/TokenSelector/index.d.ts +0 -1
  177. package/modules/fiat/components/FiatForm/components/TokenSelector/index.js +0 -5
  178. package/modules/fiat/components/FiatForm/components/TokenSelector/index.mjs +0 -4
  179. package/modules/fiat/components/FiatForm/index.d.ts +0 -1
  180. package/modules/fiat/components/FiatForm/index.js +0 -5
  181. package/modules/fiat/components/FiatForm/index.mjs +0 -4
  182. package/modules/fiat/components/index.d.ts +0 -1
  183. package/modules/fiat/components/index.js +0 -5
  184. package/modules/fiat/components/index.mjs +0 -4
  185. package/modules/fiat/context/FiatProvider.d.ts +0 -8
  186. package/modules/fiat/context/FiatProvider.js +0 -24
  187. package/modules/fiat/context/FiatProvider.mjs +0 -23
  188. package/modules/fiat/context/queryClient.d.ts +0 -3
  189. package/modules/fiat/context/queryClient.js +0 -12
  190. package/modules/fiat/context/queryClient.mjs +0 -11
  191. package/modules/fiat/context/useFiat.d.ts +0 -1
  192. package/modules/fiat/context/useFiat.js +0 -13
  193. package/modules/fiat/context/useFiat.mjs +0 -12
  194. package/modules/fiat/hooks/index.d.ts +0 -2
  195. package/modules/fiat/hooks/index.js +0 -7
  196. package/modules/fiat/hooks/index.mjs +0 -6
  197. package/modules/fiat/hooks/useFiatData.d.ts +0 -7
  198. package/modules/fiat/hooks/useFiatData.js +0 -75
  199. package/modules/fiat/hooks/useFiatData.mjs +0 -74
  200. package/modules/fiat/hooks/validation/index.d.ts +0 -1
  201. package/modules/fiat/hooks/validation/index.js +0 -5
  202. package/modules/fiat/hooks/validation/index.mjs +0 -4
  203. package/modules/fiat/hooks/validation/useAmountSchema.d.ts +0 -2
  204. package/modules/fiat/hooks/validation/useAmountSchema.js +0 -27
  205. package/modules/fiat/hooks/validation/useAmountSchema.mjs +0 -9
  206. package/modules/fiat/index.d.ts +0 -8
  207. package/modules/fiat/index.js +0 -22
  208. package/modules/fiat/index.mjs +0 -21
  209. package/modules/fiat/init/index.d.ts +0 -2
  210. package/modules/fiat/init/index.js +0 -5
  211. package/modules/fiat/init/index.mjs +0 -4
  212. package/modules/fiat/init/init.d.ts +0 -22
  213. package/modules/fiat/init/init.js +0 -15
  214. package/modules/fiat/init/init.mjs +0 -14
  215. package/modules/fiat/queries/index.d.ts +0 -2
  216. package/modules/fiat/queries/index.js +0 -7
  217. package/modules/fiat/queries/index.mjs +0 -6
  218. package/modules/fiat/queries/useGetRate.mutation.d.ts +0 -6
  219. package/modules/fiat/queries/useGetRate.mutation.js +0 -20
  220. package/modules/fiat/queries/useGetRate.mutation.mjs +0 -19
  221. package/modules/fiat/queries/useGetTokens.query.d.ts +0 -5
  222. package/modules/fiat/queries/useGetTokens.query.js +0 -33
  223. package/modules/fiat/queries/useGetTokens.query.mjs +0 -32
  224. package/react-47kZTyAT.mjs +0 -51
  225. package/react-B_iI3-1z.mjs +0 -3133
  226. package/react-BomcNL1v.js +0 -254
  227. package/react-CqKlu0W0.js +0 -51
  228. package/react-R_xxu7fN.js +0 -3133
  229. package/react-cXurUY4Z.mjs +0 -254
  230. package/reactjs/queries/useGetTokens.query.d.ts +0 -3
  231. package/reactjs/queries/useGetTokens.query.js +0 -34
  232. package/reactjs/queries/useGetTokens.query.mjs +0 -33
  233. package/w3m-modal-Bhg44d6I.js +0 -356
  234. package/w3m-modal-Br2Ec3MM.mjs +0 -356
@@ -5,9 +5,14 @@ const reactQuery = require("@tanstack/react-query");
5
5
  const api_getTransactions = require("../../api/getTransactions.js");
6
6
  const helpers_getApiURL = require("../../helpers/getApiURL.js");
7
7
  const reactjs_context_queryClient = require("../context/queryClient.js");
8
- const reactjs_hooks_useAccount = require("../hooks/useAccount.js");
9
- const useGetHistoryQuery = () => {
10
- const { address } = reactjs_hooks_useAccount.useAccount();
8
+ const useGetHistoryQuery = ({
9
+ address,
10
+ sender,
11
+ provider,
12
+ status,
13
+ tokenIn,
14
+ tokenOut
15
+ }) => {
11
16
  const queryFn = async () => {
12
17
  if (!address) {
13
18
  throw new Error("User is not connected");
@@ -15,7 +20,12 @@ const useGetHistoryQuery = () => {
15
20
  try {
16
21
  const { data } = await api_getTransactions.getTransactions({
17
22
  url: helpers_getApiURL.getApiURL(),
18
- userWalletAddress: address
23
+ address,
24
+ sender,
25
+ provider,
26
+ status,
27
+ tokenIn,
28
+ tokenOut
19
29
  });
20
30
  return data;
21
31
  } catch (error) {
@@ -27,7 +37,15 @@ const useGetHistoryQuery = () => {
27
37
  return ((_a = error.response) == null ? void 0 : _a.status) === 404;
28
38
  };
29
39
  return reactQuery.useQuery({
30
- queryKey: ["user-history", address],
40
+ queryKey: [
41
+ "user-history",
42
+ address,
43
+ sender,
44
+ provider,
45
+ status,
46
+ tokenIn,
47
+ tokenOut
48
+ ],
31
49
  queryFn,
32
50
  retry,
33
51
  enabled: Boolean(address),
@@ -2,9 +2,14 @@ import { useQuery } from "@tanstack/react-query";
2
2
  import { getTransactions } from "../../api/getTransactions.mjs";
3
3
  import { getApiURL } from "../../helpers/getApiURL.mjs";
4
4
  import { getQueryClient } from "../context/queryClient.mjs";
5
- import { useAccount } from "../hooks/useAccount.mjs";
6
- const useGetHistoryQuery = () => {
7
- const { address } = useAccount();
5
+ const useGetHistoryQuery = ({
6
+ address,
7
+ sender,
8
+ provider,
9
+ status,
10
+ tokenIn,
11
+ tokenOut
12
+ }) => {
8
13
  const queryFn = async () => {
9
14
  if (!address) {
10
15
  throw new Error("User is not connected");
@@ -12,7 +17,12 @@ const useGetHistoryQuery = () => {
12
17
  try {
13
18
  const { data } = await getTransactions({
14
19
  url: getApiURL(),
15
- userWalletAddress: address
20
+ address,
21
+ sender,
22
+ provider,
23
+ status,
24
+ tokenIn,
25
+ tokenOut
16
26
  });
17
27
  return data;
18
28
  } catch (error) {
@@ -24,7 +34,15 @@ const useGetHistoryQuery = () => {
24
34
  return ((_a = error.response) == null ? void 0 : _a.status) === 404;
25
35
  };
26
36
  return useQuery({
27
- queryKey: ["user-history", address],
37
+ queryKey: [
38
+ "user-history",
39
+ address,
40
+ sender,
41
+ provider,
42
+ status,
43
+ tokenIn,
44
+ tokenOut
45
+ ],
28
46
  queryFn,
29
47
  retry,
30
48
  enabled: Boolean(address),
@@ -9,7 +9,7 @@ export declare const useGetMvxTokensBalancesQuery: ({ tokens, mvxAddress, apiURL
9
9
  balance: string;
10
10
  address: string;
11
11
  symbol: string;
12
- chainId: number;
12
+ chainId: string;
13
13
  name: string;
14
14
  decimals: number;
15
15
  crosschain: boolean;
@@ -19,6 +19,11 @@ export declare const useGetMvxTokensBalancesQuery: ({ tokens, mvxAddress, apiURL
19
19
  minBridgeAmount: string;
20
20
  maxBridgeAmount: string;
21
21
  };
22
- availableTokens?: string[];
22
+ availableTokens?: {
23
+ address: string;
24
+ chainId: string;
25
+ symbol: string;
26
+ }[];
27
+ isNative?: boolean;
23
28
  }[], AxiosError<unknown, any>>;
24
29
  export declare function invalidateMvxTokensBalancesQuery(): void;
@@ -3,14 +3,14 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const reactQuery = require("@tanstack/react-query");
5
5
  const axios = require("axios");
6
- const require$$0 = require("react");
6
+ const React = require("react");
7
7
  const reactjs_context_queryClient = require("../context/queryClient.js");
8
8
  const useGetMvxTokensBalancesQuery = ({
9
9
  tokens,
10
10
  mvxAddress,
11
11
  apiURL
12
12
  }) => {
13
- const tokenIdentifiers = require$$0.useMemo(() => {
13
+ const tokenIdentifiers = React.useMemo(() => {
14
14
  return tokens.map(({ address }) => address);
15
15
  }, [tokens]);
16
16
  const url = `${apiURL}/accounts/${mvxAddress}/tokens?identifiers=${tokenIdentifiers}`;
@@ -1,5 +1,6 @@
1
1
  import { useWaitForTransactionReceipt } from 'wagmi';
2
+ import { AppKitNetwork } from '@reown/appkit-common';
2
3
  import { useAppKit, useAppKitAccount, useAppKitEvents, useAppKitNetwork, useAppKitState, useAppKitTheme, useDisconnect, useWalletInfo, useAppKitNetworkCore, useAppKitProvider, AppKit } from '@reown/appkit/react';
3
4
 
4
5
  export type { Config, CreateConnectorFn } from 'wagmi';
5
- export { AppKit, useAppKit, useAppKitAccount, useAppKitEvents, useAppKitNetwork, useAppKitState, useAppKitTheme, useDisconnect, useWalletInfo, useAppKitNetworkCore, useAppKitProvider, useWaitForTransactionReceipt };
6
+ export { AppKit, AppKitNetwork, useAppKit, useAppKitAccount, useAppKitEvents, useAppKitNetwork, useAppKitState, useAppKitTheme, useDisconnect, useWalletInfo, useAppKitNetworkCore, useAppKitProvider, useWaitForTransactionReceipt };
@@ -1,21 +1,49 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const react$1 = require("../react-R_xxu7fN.js");
4
+ const react = require("@reown/appkit/react");
5
5
  const wagmi = require("wagmi");
6
- const react = require("../react-CqKlu0W0.js");
7
- const index = require("../index-DsBh-EBw.js");
8
- exports.useAppKitNetwork = react$1.useAppKitNetwork;
6
+ Object.defineProperty(exports, "useAppKit", {
7
+ enumerable: true,
8
+ get: () => react.useAppKit
9
+ });
10
+ Object.defineProperty(exports, "useAppKitAccount", {
11
+ enumerable: true,
12
+ get: () => react.useAppKitAccount
13
+ });
14
+ Object.defineProperty(exports, "useAppKitEvents", {
15
+ enumerable: true,
16
+ get: () => react.useAppKitEvents
17
+ });
18
+ Object.defineProperty(exports, "useAppKitNetwork", {
19
+ enumerable: true,
20
+ get: () => react.useAppKitNetwork
21
+ });
22
+ Object.defineProperty(exports, "useAppKitNetworkCore", {
23
+ enumerable: true,
24
+ get: () => react.useAppKitNetworkCore
25
+ });
26
+ Object.defineProperty(exports, "useAppKitProvider", {
27
+ enumerable: true,
28
+ get: () => react.useAppKitProvider
29
+ });
30
+ Object.defineProperty(exports, "useAppKitState", {
31
+ enumerable: true,
32
+ get: () => react.useAppKitState
33
+ });
34
+ Object.defineProperty(exports, "useAppKitTheme", {
35
+ enumerable: true,
36
+ get: () => react.useAppKitTheme
37
+ });
38
+ Object.defineProperty(exports, "useDisconnect", {
39
+ enumerable: true,
40
+ get: () => react.useDisconnect
41
+ });
42
+ Object.defineProperty(exports, "useWalletInfo", {
43
+ enumerable: true,
44
+ get: () => react.useWalletInfo
45
+ });
9
46
  Object.defineProperty(exports, "useWaitForTransactionReceipt", {
10
47
  enumerable: true,
11
48
  get: () => wagmi.useWaitForTransactionReceipt
12
49
  });
13
- exports.useAppKitAccount = react.useAppKitAccount;
14
- exports.useAppKitNetworkCore = react.useAppKitNetworkCore;
15
- exports.useDisconnect = react.useDisconnect;
16
- exports.useAppKit = index.useAppKit;
17
- exports.useAppKitEvents = index.useAppKitEvents;
18
- exports.useAppKitProvider = index.useAppKitProvider;
19
- exports.useAppKitState = index.useAppKitState;
20
- exports.useAppKitTheme = index.useAppKitTheme;
21
- exports.useWalletInfo = index.useWalletInfo;
@@ -1,17 +1,15 @@
1
- import { u } from "../react-B_iI3-1z.mjs";
1
+ import { useAppKit, useAppKitAccount, useAppKitEvents, useAppKitNetwork, useAppKitNetworkCore, useAppKitProvider, useAppKitState, useAppKitTheme, useDisconnect, useWalletInfo } from "@reown/appkit/react";
2
2
  import { useWaitForTransactionReceipt } from "wagmi";
3
- import { u as u2, b, a } from "../react-47kZTyAT.mjs";
4
- import { u as u3, a as a2, e, b as b2, c, d } from "../index-BIVnypNe.mjs";
5
3
  export {
6
- u3 as useAppKit,
7
- u2 as useAppKitAccount,
8
- a2 as useAppKitEvents,
9
- u as useAppKitNetwork,
10
- b as useAppKitNetworkCore,
11
- e as useAppKitProvider,
12
- b2 as useAppKitState,
13
- c as useAppKitTheme,
14
- a as useDisconnect,
4
+ useAppKit,
5
+ useAppKitAccount,
6
+ useAppKitEvents,
7
+ useAppKitNetwork,
8
+ useAppKitNetworkCore,
9
+ useAppKitProvider,
10
+ useAppKitState,
11
+ useAppKitTheme,
12
+ useDisconnect,
15
13
  useWaitForTransactionReceipt,
16
- d as useWalletInfo
14
+ useWalletInfo
17
15
  };
@@ -2,7 +2,10 @@ export interface InitialTokensType {
2
2
  firstTokenId?: string;
3
3
  secondTokenId?: string;
4
4
  }
5
- export declare const getInitialTokens: () => {
5
+ export declare const getInitialTokens: (initialTokens?: {
6
+ firstTokenId?: string;
7
+ secondTokenId?: string;
8
+ }) => {
6
9
  firstTokenId: string;
7
10
  secondTokenId: string;
8
11
  };
@@ -2,12 +2,12 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const reactjs_constants_index = require("../constants/index.js");
5
- const getInitialTokens = () => {
5
+ const getInitialTokens = (initialTokens) => {
6
6
  const urlParams = new URLSearchParams(reactjs_constants_index.safeWindow.location.search);
7
7
  const { firstToken, secondToken } = Object.fromEntries(urlParams);
8
8
  return {
9
- firstTokenId: firstToken,
10
- secondTokenId: secondToken
9
+ firstTokenId: (initialTokens == null ? void 0 : initialTokens.firstTokenId) || firstToken,
10
+ secondTokenId: (initialTokens == null ? void 0 : initialTokens.secondTokenId) || secondToken
11
11
  };
12
12
  };
13
13
  exports.getInitialTokens = getInitialTokens;
@@ -1,10 +1,10 @@
1
1
  import { safeWindow } from "../constants/index.mjs";
2
- const getInitialTokens = () => {
2
+ const getInitialTokens = (initialTokens) => {
3
3
  const urlParams = new URLSearchParams(safeWindow.location.search);
4
4
  const { firstToken, secondToken } = Object.fromEntries(urlParams);
5
5
  return {
6
- firstTokenId: firstToken,
7
- secondTokenId: secondToken
6
+ firstTokenId: (initialTokens == null ? void 0 : initialTokens.firstTokenId) || firstToken,
7
+ secondTokenId: (initialTokens == null ? void 0 : initialTokens.secondTokenId) || secondToken
8
8
  };
9
9
  };
10
10
  export {