@multiversx/sdk-dapp-liquidity 1.1.0-alpha.14 → 1.1.0-alpha.16

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/index.js CHANGED
@@ -53,7 +53,7 @@ const reactjs_hooks_validation_useSecondAmountSchema = require("./reactjs/hooks/
53
53
  const reactjs_hooks_validation_useTestHasEnoughFunds = require("./reactjs/hooks/validation/useTestHasEnoughFunds.js");
54
54
  const reactjs_hooks_validation_useTestIsConnected = require("./reactjs/hooks/validation/useTestIsConnected.js");
55
55
  const reactjs_hooks_useAccount = require("./reactjs/hooks/useAccount.js");
56
- const reactjs_hooks_useBalances = require("./useBalances-CPQr6NnQ.js");
56
+ const reactjs_hooks_useBalances = require("./useBalances-Ds5d90Cc.js");
57
57
  const reactjs_hooks_useBridgeFormik = require("./reactjs/hooks/useBridgeFormik.js");
58
58
  const reactjs_hooks_useDebounce = require("./reactjs/hooks/useDebounce.js");
59
59
  const reactjs_hooks_useFetchBridgeData = require("./reactjs/hooks/useFetchBridgeData.js");
package/index.mjs CHANGED
@@ -50,7 +50,7 @@ import { useSecondAmountSchema } from "./reactjs/hooks/validation/useSecondAmoun
50
50
  import { useTestHasEnoughFunds } from "./reactjs/hooks/validation/useTestHasEnoughFunds.mjs";
51
51
  import { useTestIsConnected } from "./reactjs/hooks/validation/useTestIsConnected.mjs";
52
52
  import { useAccount } from "./reactjs/hooks/useAccount.mjs";
53
- import { u } from "./useBalances-DZcebYxR.mjs";
53
+ import { u } from "./useBalances-CvRCOieR.mjs";
54
54
  import { BridgeFormikValuesEnum, useBridgeFormik } from "./reactjs/hooks/useBridgeFormik.mjs";
55
55
  import { useDebounce } from "./reactjs/hooks/useDebounce.mjs";
56
56
  import { useFetchBridgeData } from "./reactjs/hooks/useFetchBridgeData.mjs";
package/package.json CHANGED
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/multiversx/mx-sdk-dapp-liquidity#readme",
30
30
  "license": "MIT",
31
- "version": "1.1.0-alpha.14",
31
+ "version": "1.1.0-alpha.16",
32
32
  "main": "index.js",
33
33
  "module": "index.mjs",
34
34
  "types": "index.d.ts",
@@ -44,7 +44,7 @@ const reactjs_components_Connect_MvxAccountDisplay = require("../Connect/MvxAcco
44
44
  const reactjs_components_TokenSelector_TokenSelector = require("../TokenSelector/TokenSelector.js");
45
45
  const viem = require("viem");
46
46
  const actions = require("viem/actions");
47
- const reactjs_hooks_useBalances = require("../../../useBalances-CPQr6NnQ.js");
47
+ const reactjs_hooks_useBalances = require("../../../useBalances-Ds5d90Cc.js");
48
48
  function deepEqual(a, b) {
49
49
  if (a === b)
50
50
  return true;
@@ -220,13 +220,9 @@ const BridgeForm = ({
220
220
  )) ?? (chains == null ? void 0 : chains[0]),
221
221
  [activeChain == null ? void 0 : activeChain.id, chains]
222
222
  );
223
- console.log({
224
- chains,
225
- selectedChainOption
226
- });
227
223
  const defaultReceivingToken = React.useMemo(
228
- () => toOptions.find((x) => x.symbol.toLowerCase().includes("egld")),
229
- [toOptions]
224
+ () => (availableTokens == null ? void 0 : availableTokens[0]) ?? toOptions.find((x) => x.symbol.toLowerCase().includes("usdc")),
225
+ [toOptions, availableTokens]
230
226
  );
231
227
  const hasAmounts = firstAmount !== "" && secondAmount !== "";
232
228
  const fetchRateDebounced = React.useCallback(
@@ -392,33 +388,23 @@ const BridgeForm = ({
392
388
  setPendingSigning(true);
393
389
  setSigningTransactionsCount(() => transactions.length);
394
390
  try {
395
- switch (selectedChainOption == null ? void 0 : selectedChainOption.chainType) {
396
- case types_chainType.ChainType.sol:
397
- try {
398
- for (const transaction of transactions) {
391
+ let txIndex = -1;
392
+ for (const transaction of transactions) {
393
+ ++txIndex;
394
+ let txHash;
395
+ try {
396
+ switch (selectedChainOption == null ? void 0 : selectedChainOption.chainType) {
397
+ case types_chainType.ChainType.sol:
399
398
  if (!transaction.instructions || !transaction.feePayer) {
400
- continue;
399
+ break;
401
400
  }
402
- await solana.signTransaction({
401
+ txHash = await solana.signTransaction({
403
402
  feePayer: transaction.feePayer,
404
403
  instructions: transaction.instructions
405
404
  });
406
- }
407
- setPendingSigning(false);
408
- } catch (e) {
409
- reactToastify.toast.dismiss();
410
- reactToastify.toast.error("Transaction aborted");
411
- onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction aborted");
412
- setPendingSigning(false);
413
- return;
414
- }
415
- break;
416
- case types_chainType.ChainType.evm:
417
- let txIndex = -1;
418
- for (const transaction of transactions) {
419
- ++txIndex;
420
- try {
421
- const txHash = await evm.signTransaction({
405
+ break;
406
+ case types_chainType.ChainType.evm:
407
+ txHash = await evm.signTransaction({
422
408
  ...transaction,
423
409
  value: BigInt(transaction.value),
424
410
  gas: BigInt(transaction.gasLimit),
@@ -428,46 +414,43 @@ const BridgeForm = ({
428
414
  ...transaction,
429
415
  txHash
430
416
  });
431
- setSigningTransactionsCount(
432
- () => transactions.length - 1 - txIndex
433
- );
434
- if (txIndex === transactions.length - 1) {
435
- continue;
436
- }
437
- const transactionReceipt = await waitForTransactionReceipt(
438
- config,
439
- {
440
- confirmations: 1,
441
- hash: txHash
442
- }
443
- );
444
- console.info({
445
- transactionReceipt,
446
- hash: txHash
447
- });
448
- } catch (e) {
449
- reactToastify.toast.dismiss();
450
- reactToastify.toast.error("Transaction aborted");
451
- onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction aborted");
417
+ break;
418
+ default:
419
+ reactToastify.toast.error("Provider not supported");
452
420
  setPendingSigning(false);
453
421
  return;
454
- }
455
422
  }
456
- await sendTransactions({
457
- transactions: signedTransactions,
458
- provider,
459
- url: helpers_getApiURL.getApiURL() ?? "",
460
- token: nativeAuthToken ?? ""
423
+ setSigningTransactionsCount(
424
+ () => transactions.length - 1 - txIndex
425
+ );
426
+ if (txIndex === transactions.length - 1 || !txHash || (selectedChainOption == null ? void 0 : selectedChainOption.chainType) !== types_chainType.ChainType.evm) {
427
+ continue;
428
+ }
429
+ const transactionReceipt = await waitForTransactionReceipt(config, {
430
+ confirmations: 1,
431
+ hash: txHash
461
432
  });
462
- const txHashes = signedTransactions.map((tx) => tx.txHash);
463
- onSuccess(txHashes);
464
- setPendingSigning(false);
465
- break;
466
- default:
467
- reactToastify.toast.error("Provider not supported");
433
+ console.info({
434
+ transactionReceipt,
435
+ hash: txHash
436
+ });
437
+ } catch (e) {
438
+ reactToastify.toast.dismiss();
439
+ reactToastify.toast.error("Transaction aborted");
440
+ onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction aborted");
468
441
  setPendingSigning(false);
469
442
  return;
443
+ }
470
444
  }
445
+ await sendTransactions({
446
+ transactions: signedTransactions,
447
+ provider,
448
+ url: helpers_getApiURL.getApiURL() ?? "",
449
+ token: nativeAuthToken ?? ""
450
+ });
451
+ const txHashes = signedTransactions.map((tx) => tx.txHash);
452
+ onSuccess(txHashes);
453
+ setPendingSigning(false);
471
454
  } catch (e) {
472
455
  console.error(e);
473
456
  reactToastify.toast.dismiss();
@@ -632,6 +615,7 @@ const BridgeForm = ({
632
615
  disabled: isPendingRate,
633
616
  options: fromOptions,
634
617
  areOptionsLoading: isTokensLoading,
618
+ isMvxSelector: false,
635
619
  color: "neutral-850",
636
620
  onChange: onChangeFirstSelect,
637
621
  onBlur: handleBlur,
@@ -41,7 +41,7 @@ import { MvxAccountDisplay } from "../Connect/MvxAccountDisplay.mjs";
41
41
  import { TokenSelector } from "../TokenSelector/TokenSelector.mjs";
42
42
  import { hexToString } from "viem";
43
43
  import { waitForTransactionReceipt as waitForTransactionReceipt$1, getTransaction, call } from "viem/actions";
44
- import { g as getAction } from "../../../useBalances-DZcebYxR.mjs";
44
+ import { g as getAction } from "../../../useBalances-CvRCOieR.mjs";
45
45
  function deepEqual(a, b) {
46
46
  if (a === b)
47
47
  return true;
@@ -217,13 +217,9 @@ const BridgeForm = ({
217
217
  )) ?? (chains == null ? void 0 : chains[0]),
218
218
  [activeChain == null ? void 0 : activeChain.id, chains]
219
219
  );
220
- console.log({
221
- chains,
222
- selectedChainOption
223
- });
224
220
  const defaultReceivingToken = useMemo(
225
- () => toOptions.find((x) => x.symbol.toLowerCase().includes("egld")),
226
- [toOptions]
221
+ () => (availableTokens == null ? void 0 : availableTokens[0]) ?? toOptions.find((x) => x.symbol.toLowerCase().includes("usdc")),
222
+ [toOptions, availableTokens]
227
223
  );
228
224
  const hasAmounts = firstAmount !== "" && secondAmount !== "";
229
225
  const fetchRateDebounced = useCallback(
@@ -389,33 +385,23 @@ const BridgeForm = ({
389
385
  setPendingSigning(true);
390
386
  setSigningTransactionsCount(() => transactions.length);
391
387
  try {
392
- switch (selectedChainOption == null ? void 0 : selectedChainOption.chainType) {
393
- case ChainType.sol:
394
- try {
395
- for (const transaction of transactions) {
388
+ let txIndex = -1;
389
+ for (const transaction of transactions) {
390
+ ++txIndex;
391
+ let txHash;
392
+ try {
393
+ switch (selectedChainOption == null ? void 0 : selectedChainOption.chainType) {
394
+ case ChainType.sol:
396
395
  if (!transaction.instructions || !transaction.feePayer) {
397
- continue;
396
+ break;
398
397
  }
399
- await solana.signTransaction({
398
+ txHash = await solana.signTransaction({
400
399
  feePayer: transaction.feePayer,
401
400
  instructions: transaction.instructions
402
401
  });
403
- }
404
- setPendingSigning(false);
405
- } catch (e) {
406
- toast.dismiss();
407
- toast.error("Transaction aborted");
408
- onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction aborted");
409
- setPendingSigning(false);
410
- return;
411
- }
412
- break;
413
- case ChainType.evm:
414
- let txIndex = -1;
415
- for (const transaction of transactions) {
416
- ++txIndex;
417
- try {
418
- const txHash = await evm.signTransaction({
402
+ break;
403
+ case ChainType.evm:
404
+ txHash = await evm.signTransaction({
419
405
  ...transaction,
420
406
  value: BigInt(transaction.value),
421
407
  gas: BigInt(transaction.gasLimit),
@@ -425,46 +411,43 @@ const BridgeForm = ({
425
411
  ...transaction,
426
412
  txHash
427
413
  });
428
- setSigningTransactionsCount(
429
- () => transactions.length - 1 - txIndex
430
- );
431
- if (txIndex === transactions.length - 1) {
432
- continue;
433
- }
434
- const transactionReceipt = await waitForTransactionReceipt(
435
- config,
436
- {
437
- confirmations: 1,
438
- hash: txHash
439
- }
440
- );
441
- console.info({
442
- transactionReceipt,
443
- hash: txHash
444
- });
445
- } catch (e) {
446
- toast.dismiss();
447
- toast.error("Transaction aborted");
448
- onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction aborted");
414
+ break;
415
+ default:
416
+ toast.error("Provider not supported");
449
417
  setPendingSigning(false);
450
418
  return;
451
- }
452
419
  }
453
- await sendTransactions({
454
- transactions: signedTransactions,
455
- provider,
456
- url: getApiURL() ?? "",
457
- token: nativeAuthToken ?? ""
420
+ setSigningTransactionsCount(
421
+ () => transactions.length - 1 - txIndex
422
+ );
423
+ if (txIndex === transactions.length - 1 || !txHash || (selectedChainOption == null ? void 0 : selectedChainOption.chainType) !== ChainType.evm) {
424
+ continue;
425
+ }
426
+ const transactionReceipt = await waitForTransactionReceipt(config, {
427
+ confirmations: 1,
428
+ hash: txHash
458
429
  });
459
- const txHashes = signedTransactions.map((tx) => tx.txHash);
460
- onSuccess(txHashes);
461
- setPendingSigning(false);
462
- break;
463
- default:
464
- toast.error("Provider not supported");
430
+ console.info({
431
+ transactionReceipt,
432
+ hash: txHash
433
+ });
434
+ } catch (e) {
435
+ toast.dismiss();
436
+ toast.error("Transaction aborted");
437
+ onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction aborted");
465
438
  setPendingSigning(false);
466
439
  return;
440
+ }
467
441
  }
442
+ await sendTransactions({
443
+ transactions: signedTransactions,
444
+ provider,
445
+ url: getApiURL() ?? "",
446
+ token: nativeAuthToken ?? ""
447
+ });
448
+ const txHashes = signedTransactions.map((tx) => tx.txHash);
449
+ onSuccess(txHashes);
450
+ setPendingSigning(false);
468
451
  } catch (e) {
469
452
  console.error(e);
470
453
  toast.dismiss();
@@ -629,6 +612,7 @@ const BridgeForm = ({
629
612
  disabled: isPendingRate,
630
613
  options: fromOptions,
631
614
  areOptionsLoading: isTokensLoading,
615
+ isMvxSelector: false,
632
616
  color: "neutral-850",
633
617
  onChange: onChangeFirstSelect,
634
618
  onBlur: handleBlur,
@@ -45,11 +45,7 @@ const TokenSelector = ({
45
45
  (chain) => !constants_index.MVX_CHAIN_IDS.includes(chain.chainId.toString())
46
46
  )) ?? [];
47
47
  }, [data]);
48
- console.log(`TokenSelector - ${name}`, {
49
- chains,
50
- options,
51
- selectedOption
52
- });
48
+ const isVisuallyDisabled = disabled || chains.length < 2;
53
49
  const handleOnClick = () => setShow(true);
54
50
  React.useEffect(() => {
55
51
  onTokenSelectorDisplay == null ? void 0 : onTokenSelectorDisplay(show);
@@ -83,7 +79,7 @@ const TokenSelector = ({
83
79
  },
84
80
  tokens: options,
85
81
  chains,
86
- isMvxSelector: true,
82
+ isMvxSelector,
87
83
  areChainsLoading,
88
84
  selectedToken: selectedOption
89
85
  }
@@ -105,19 +101,19 @@ const TokenSelector = ({
105
101
  "liq-bg-neutral-900/50 liq-outline liq-outline-1 liq-outline-neutral-700/20 hover:enabled:liq-bg-neutral-600/50 hover:enabled:liq-outline-neutral-600": color === "neutral-850"
106
102
  },
107
103
  {
108
- "disabled:!liq-opacity-70": disabled && !omitDisableClass
104
+ "disabled:!liq-opacity-70": isVisuallyDisabled && !omitDisableClass
109
105
  },
110
106
  {
111
- "!liq-cursor-not-allowed !liq-bg-transparent !liq-outline-transparent": disabled
107
+ "!liq-cursor-not-allowed !liq-bg-transparent !liq-outline-transparent": isVisuallyDisabled
112
108
  },
113
109
  className
114
110
  ),
115
111
  onBlur,
116
112
  onClick: handleOnClick,
117
- disabled,
113
+ disabled: isVisuallyDisabled,
118
114
  children: [
119
115
  /* @__PURE__ */ jsxRuntime.jsx(reactjs_components_TokenSelector_components_SelectedOption.SelectedOption, { value: selectedOption }),
120
- !disabled && /* @__PURE__ */ jsxRuntime.jsx(
116
+ !isVisuallyDisabled && /* @__PURE__ */ jsxRuntime.jsx(
121
117
  reactFontawesome.FontAwesomeIcon,
122
118
  {
123
119
  icon: faChevronDown.faChevronDown,
@@ -42,11 +42,7 @@ const TokenSelector = ({
42
42
  (chain) => !MVX_CHAIN_IDS.includes(chain.chainId.toString())
43
43
  )) ?? [];
44
44
  }, [data]);
45
- console.log(`TokenSelector - ${name}`, {
46
- chains,
47
- options,
48
- selectedOption
49
- });
45
+ const isVisuallyDisabled = disabled || chains.length < 2;
50
46
  const handleOnClick = () => setShow(true);
51
47
  useEffect(() => {
52
48
  onTokenSelectorDisplay == null ? void 0 : onTokenSelectorDisplay(show);
@@ -80,7 +76,7 @@ const TokenSelector = ({
80
76
  },
81
77
  tokens: options,
82
78
  chains,
83
- isMvxSelector: true,
79
+ isMvxSelector,
84
80
  areChainsLoading,
85
81
  selectedToken: selectedOption
86
82
  }
@@ -102,19 +98,19 @@ const TokenSelector = ({
102
98
  "liq-bg-neutral-900/50 liq-outline liq-outline-1 liq-outline-neutral-700/20 hover:enabled:liq-bg-neutral-600/50 hover:enabled:liq-outline-neutral-600": color === "neutral-850"
103
99
  },
104
100
  {
105
- "disabled:!liq-opacity-70": disabled && !omitDisableClass
101
+ "disabled:!liq-opacity-70": isVisuallyDisabled && !omitDisableClass
106
102
  },
107
103
  {
108
- "!liq-cursor-not-allowed !liq-bg-transparent !liq-outline-transparent": disabled
104
+ "!liq-cursor-not-allowed !liq-bg-transparent !liq-outline-transparent": isVisuallyDisabled
109
105
  },
110
106
  className
111
107
  ),
112
108
  onBlur,
113
109
  onClick: handleOnClick,
114
- disabled,
110
+ disabled: isVisuallyDisabled,
115
111
  children: [
116
112
  /* @__PURE__ */ jsx(SelectedOption, { value: selectedOption }),
117
- !disabled && /* @__PURE__ */ jsx(
113
+ !isVisuallyDisabled && /* @__PURE__ */ jsx(
118
114
  FontAwesomeIcon,
119
115
  {
120
116
  icon: faChevronDown,
@@ -19,11 +19,6 @@ const TokenItem = ({
19
19
  const { supportedChains: sdkChains } = reactjs_context_useWeb3App.useWeb3App();
20
20
  const { switchNetwork } = react.useAppKitNetwork();
21
21
  const chainId = reactjs_hooks_useGetChainId.useGetChainId();
22
- console.log({
23
- tokenChain,
24
- sdkChains,
25
- chainId
26
- });
27
22
  const activeChain = React.useMemo(() => {
28
23
  return sdkChains == null ? void 0 : sdkChains.find(
29
24
  (chain) => chain.id.toString() === (chainId == null ? void 0 : chainId.toString())
@@ -16,11 +16,6 @@ const TokenItem = ({
16
16
  const { supportedChains: sdkChains } = useWeb3App();
17
17
  const { switchNetwork } = useAppKitNetwork();
18
18
  const chainId = useGetChainId();
19
- console.log({
20
- tokenChain,
21
- sdkChains,
22
- chainId
23
- });
24
19
  const activeChain = useMemo(() => {
25
20
  return sdkChains == null ? void 0 : sdkChains.find(
26
21
  (chain) => chain.id.toString() === (chainId == null ? void 0 : chainId.toString())
@@ -6,7 +6,7 @@ const reactjs_hooks_validation_useSecondAmountSchema = require("./validation/use
6
6
  const reactjs_hooks_validation_useTestHasEnoughFunds = require("./validation/useTestHasEnoughFunds.js");
7
7
  const reactjs_hooks_validation_useTestIsConnected = require("./validation/useTestIsConnected.js");
8
8
  const reactjs_hooks_useAccount = require("./useAccount.js");
9
- const reactjs_hooks_useBalances = require("../../useBalances-CPQr6NnQ.js");
9
+ const reactjs_hooks_useBalances = require("../../useBalances-Ds5d90Cc.js");
10
10
  const reactjs_hooks_useBridgeFormik = require("./useBridgeFormik.js");
11
11
  const reactjs_hooks_useDebounce = require("./useDebounce.js");
12
12
  const reactjs_hooks_useFetchBridgeData = require("./useFetchBridgeData.js");
@@ -3,7 +3,7 @@ import { useSecondAmountSchema } from "./validation/useSecondAmountSchema.mjs";
3
3
  import { useTestHasEnoughFunds } from "./validation/useTestHasEnoughFunds.mjs";
4
4
  import { useTestIsConnected } from "./validation/useTestIsConnected.mjs";
5
5
  import { useAccount } from "./useAccount.mjs";
6
- import { u } from "../../useBalances-DZcebYxR.mjs";
6
+ import { u } from "../../useBalances-CvRCOieR.mjs";
7
7
  import { BridgeFormikValuesEnum, useBridgeFormik } from "./useBridgeFormik.mjs";
8
8
  import { useDebounce } from "./useDebounce.mjs";
9
9
  import { useFetchBridgeData } from "./useFetchBridgeData.mjs";
@@ -13,7 +13,7 @@ require("yup");
13
13
  require("@multiversx/sdk-dapp-utils/out/helpers/parseAmount");
14
14
  require("../../bignumber-B8vjg9qn.js");
15
15
  require("wagmi");
16
- const reactjs_hooks_useBalances = require("../../useBalances-CPQr6NnQ.js");
16
+ const reactjs_hooks_useBalances = require("../../useBalances-Ds5d90Cc.js");
17
17
  require("formik");
18
18
  require("../constants/index.js");
19
19
  require("@reown/appkit-adapter-solana/react");
@@ -10,7 +10,7 @@ import "yup";
10
10
  import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
11
11
  import "../../bignumber-CKZkoo0g.mjs";
12
12
  import "wagmi";
13
- import { u } from "../../useBalances-DZcebYxR.mjs";
13
+ import { u } from "../../useBalances-CvRCOieR.mjs";
14
14
  import "formik";
15
15
  import "../constants/index.mjs";
16
16
  import "@reown/appkit-adapter-solana/react";
@@ -75,7 +75,7 @@ export declare const useSignTransaction: () => {
75
75
  signTransaction: ({ feePayer, instructions }: {
76
76
  feePayer: string;
77
77
  instructions: ServerTransactionInstruction[];
78
- }) => Promise<void>;
78
+ }) => Promise<string | undefined>;
79
79
  connection: import('@solana/web3.js').Connection | undefined;
80
80
  walletProvider: Provider;
81
81
  };
@@ -34,7 +34,7 @@ const useSignTransaction = () => {
34
34
  if (connection) {
35
35
  transaction.recentBlockhash = (await connection.getLatestBlockhash("confirmed")).blockhash;
36
36
  }
37
- await walletProvider.signAndSendTransaction(transaction);
37
+ return await walletProvider.signAndSendTransaction(transaction);
38
38
  }
39
39
  }
40
40
  return {
@@ -31,7 +31,7 @@ const useSignTransaction = () => {
31
31
  if (connection) {
32
32
  transaction.recentBlockhash = (await connection.getLatestBlockhash("confirmed")).blockhash;
33
33
  }
34
- await walletProvider.signAndSendTransaction(transaction);
34
+ return await walletProvider.signAndSendTransaction(transaction);
35
35
  }
36
36
  }
37
37
  return {
package/reactjs/index.js CHANGED
@@ -36,7 +36,7 @@ const reactjs_hooks_validation_useSecondAmountSchema = require("./hooks/validati
36
36
  const reactjs_hooks_validation_useTestHasEnoughFunds = require("./hooks/validation/useTestHasEnoughFunds.js");
37
37
  const reactjs_hooks_validation_useTestIsConnected = require("./hooks/validation/useTestIsConnected.js");
38
38
  const reactjs_hooks_useAccount = require("./hooks/useAccount.js");
39
- const reactjs_hooks_useBalances = require("../useBalances-CPQr6NnQ.js");
39
+ const reactjs_hooks_useBalances = require("../useBalances-Ds5d90Cc.js");
40
40
  const reactjs_hooks_useBridgeFormik = require("./hooks/useBridgeFormik.js");
41
41
  const reactjs_hooks_useDebounce = require("./hooks/useDebounce.js");
42
42
  const reactjs_hooks_useFetchBridgeData = require("./hooks/useFetchBridgeData.js");
package/reactjs/index.mjs CHANGED
@@ -33,7 +33,7 @@ import { useSecondAmountSchema } from "./hooks/validation/useSecondAmountSchema.
33
33
  import { useTestHasEnoughFunds } from "./hooks/validation/useTestHasEnoughFunds.mjs";
34
34
  import { useTestIsConnected } from "./hooks/validation/useTestIsConnected.mjs";
35
35
  import { useAccount } from "./hooks/useAccount.mjs";
36
- import { u } from "../useBalances-DZcebYxR.mjs";
36
+ import { u } from "../useBalances-CvRCOieR.mjs";
37
37
  import { BridgeFormikValuesEnum, useBridgeFormik } from "./hooks/useBridgeFormik.mjs";
38
38
  import { useDebounce } from "./hooks/useDebounce.mjs";
39
39
  import { useFetchBridgeData } from "./hooks/useFetchBridgeData.mjs";
@@ -41,10 +41,6 @@ function init(options) {
41
41
  bitcoinTestnet: networks.bitcoinTestnet,
42
42
  ...viemNetworks__namespace
43
43
  };
44
- console.log("supported chains", {
45
- networks: networks$1,
46
- viemNetworks: viemNetworks__namespace
47
- });
48
44
  const acceptedNetworks = Object.values(networks$1).filter(
49
45
  (chain) => options.acceptedChainIDs.includes(chain.id.toString()) && !constants_index.MVX_CHAIN_IDS.includes(chain.id.toString())
50
46
  ).map((network) => network);
@@ -71,12 +67,6 @@ function init(options) {
71
67
  adapters: [wagmiAdapter, solanaAdapter, bitcoinAdapter],
72
68
  networks: [supportedChains[0], ...supportedChains.slice(1)]
73
69
  });
74
- console.log("init", {
75
- config: wagmiAdapter.wagmiConfig,
76
- appKit,
77
- options,
78
- supportedChains
79
- });
80
70
  return {
81
71
  config: wagmiAdapter.wagmiConfig,
82
72
  appKit,
@@ -21,10 +21,6 @@ function init(options) {
21
21
  bitcoinTestnet,
22
22
  ...viemNetworks
23
23
  };
24
- console.log("supported chains", {
25
- networks,
26
- viemNetworks
27
- });
28
24
  const acceptedNetworks = Object.values(networks).filter(
29
25
  (chain) => options.acceptedChainIDs.includes(chain.id.toString()) && !MVX_CHAIN_IDS.includes(chain.id.toString())
30
26
  ).map((network) => network);
@@ -51,12 +47,6 @@ function init(options) {
51
47
  adapters: [wagmiAdapter, solanaAdapter, bitcoinAdapter],
52
48
  networks: [supportedChains[0], ...supportedChains.slice(1)]
53
49
  });
54
- console.log("init", {
55
- config: wagmiAdapter.wagmiConfig,
56
- appKit,
57
- options,
58
- supportedChains
59
- });
60
50
  return {
61
51
  config: wagmiAdapter.wagmiConfig,
62
52
  appKit,
@@ -9,7 +9,7 @@ require("react");
9
9
  require("@multiversx/sdk-dapp-utils/out/helpers/parseAmount");
10
10
  require("../../bignumber-B8vjg9qn.js");
11
11
  require("wagmi");
12
- const reactjs_hooks_useBalances = require("../../useBalances-CPQr6NnQ.js");
12
+ const reactjs_hooks_useBalances = require("../../useBalances-Ds5d90Cc.js");
13
13
  require("formik");
14
14
  require("axios");
15
15
  require("../context/Web3AppProvider.js");
@@ -6,7 +6,7 @@ import "react";
6
6
  import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
7
7
  import "../../bignumber-CKZkoo0g.mjs";
8
8
  import "wagmi";
9
- import { u as useBalances } from "../../useBalances-DZcebYxR.mjs";
9
+ import { u as useBalances } from "../../useBalances-CvRCOieR.mjs";
10
10
  import "formik";
11
11
  import "axios";
12
12
  import "../context/Web3AppProvider.mjs";
@@ -180,7 +180,6 @@ const useBalances = () => {
180
180
  const connection = new Connection(rpcUrl);
181
181
  const publicKey = new PublicKey(addr);
182
182
  const balance = await connection.getBalance(publicKey);
183
- console.log(`SOL Balance: ${balance / 1e9} SOL`);
184
183
  return {
185
184
  value: BigInt(balance.toString()),
186
185
  decimals: 9,
@@ -195,7 +194,6 @@ const useBalances = () => {
195
194
  (sum, utxo) => sum + utxo.value,
196
195
  0
197
196
  );
198
- console.log(`BTC Balance: ${balance / 1e8} BTC`);
199
197
  return {
200
198
  value: BigInt(balance.toString()),
201
199
  decimals: 8,
@@ -182,7 +182,6 @@ const useBalances = () => {
182
182
  const connection = new web3_js.Connection(rpcUrl);
183
183
  const publicKey = new web3_js.PublicKey(addr);
184
184
  const balance = await connection.getBalance(publicKey);
185
- console.log(`SOL Balance: ${balance / 1e9} SOL`);
186
185
  return {
187
186
  value: BigInt(balance.toString()),
188
187
  decimals: 9,
@@ -197,7 +196,6 @@ const useBalances = () => {
197
196
  (sum, utxo) => sum + utxo.value,
198
197
  0
199
198
  );
200
- console.log(`BTC Balance: ${balance / 1e8} BTC`);
201
199
  return {
202
200
  value: BigInt(balance.toString()),
203
201
  decimals: 8,