@multiversx/sdk-dapp-liquidity 1.1.3 → 1.1.5

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/api/getChains.js CHANGED
@@ -13,6 +13,6 @@ async function getChains({
13
13
  Authorization: `Bearer ${nativeAuthToken}`
14
14
  }
15
15
  };
16
- return await axios.get(`/chains?isBridge=${bridgeOnly}`, config);
16
+ return axios.get(`/chains?isBridge=${bridgeOnly}`, config);
17
17
  }
18
18
  exports.getChains = getChains;
package/api/getChains.mjs CHANGED
@@ -10,7 +10,7 @@ async function getChains({
10
10
  Authorization: `Bearer ${nativeAuthToken}`
11
11
  }
12
12
  };
13
- return await axios.get(`/chains?isBridge=${bridgeOnly}`, config);
13
+ return axios.get(`/chains?isBridge=${bridgeOnly}`, config);
14
14
  }
15
15
  export {
16
16
  getChains
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.3",
31
+ "version": "1.1.5",
32
32
  "main": "index.js",
33
33
  "module": "index.mjs",
34
34
  "types": "index.d.ts",
@@ -53,11 +53,11 @@
53
53
  "@headlessui/react": "2.2.0",
54
54
  "@multiversx/sdk-dapp-utils": "3.0.2",
55
55
  "@popperjs/core": "2.11.8",
56
- "@reown/appkit": "1.8.13",
57
- "@reown/appkit-common": "1.8.13",
58
- "@reown/appkit-adapter-bitcoin": "1.8.13",
59
- "@reown/appkit-adapter-solana": "1.8.13",
60
- "@reown/appkit-adapter-wagmi": "1.8.13",
56
+ "@reown/appkit": "1.8.14",
57
+ "@reown/appkit-common": "1.8.14",
58
+ "@reown/appkit-adapter-bitcoin": "1.8.14",
59
+ "@reown/appkit-adapter-solana": "1.8.14",
60
+ "@reown/appkit-adapter-wagmi": "1.8.14",
61
61
  "@solana/web3.js": "1.98.4",
62
62
  "@tanstack/react-query": "5.71.3",
63
63
  "animated-number-react": "0.1.2",
@@ -71,8 +71,8 @@
71
71
  "react-select": "5.10.0",
72
72
  "react-toastify": "11.0.3",
73
73
  "tailwind-merge": "2.6.0",
74
- "viem": "^2.24.1",
75
- "wagmi": "^2.14.15",
74
+ "viem": "2.39.3",
75
+ "wagmi": "2.19.5",
76
76
  "yup": "1.4.0"
77
77
  },
78
78
  "peerDependencies": {
@@ -65,7 +65,7 @@ const Deposit = ({
65
65
  onNavigate,
66
66
  onChangeDirection
67
67
  }) => {
68
- var _a, _b, _c, _d, _e, _f;
68
+ var _a, _b;
69
69
  const ref = React.useRef(null);
70
70
  const [isTokenSelectorVisible, setIsTokenSelectorVisible] = React.useState(false);
71
71
  const [pendingSigning, setPendingSigning] = React.useState(false);
@@ -349,6 +349,7 @@ const Deposit = ({
349
349
  }
350
350
  },
351
351
  [
352
+ selectedChainOption,
352
353
  bridgeAddress,
353
354
  handleOnChangeFirstAmount,
354
355
  handleOnChangeSecondAmount,
@@ -618,26 +619,14 @@ const Deposit = ({
618
619
  }
619
620
  )
620
621
  ] }),
621
- account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: [
622
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
623
- "You will be asked to sign ",
624
- siginingTransactionsCount,
625
- " ",
626
- siginingTransactionsCount > 1 ? "transactions" : "transaction",
627
- " ",
628
- "on",
629
- " "
630
- ] }),
631
- /* @__PURE__ */ jsxRuntime.jsx(
632
- "img",
633
- {
634
- src: (_d = (_c = core.getConnections(config)[0]) == null ? void 0 : _c.connector) == null ? void 0 : _d.icon,
635
- alt: "",
636
- className: "liq-mx-1 liq-h-[1rem] liq-w-[1rem]"
637
- }
638
- ),
639
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: (_f = (_e = core.getConnections(config)[0]) == null ? void 0 : _e.connector) == null ? void 0 : _f.name })
640
- ] })
622
+ account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
623
+ "You will be asked to sign ",
624
+ siginingTransactionsCount,
625
+ " ",
626
+ siginingTransactionsCount > 1 ? "transactions" : "transaction",
627
+ " ",
628
+ "on your wallet"
629
+ ] }) })
641
630
  ]
642
631
  }
643
632
  ) });
@@ -3,7 +3,7 @@ import { faSpinner } from "@fortawesome/free-solid-svg-icons/faSpinner";
3
3
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
4
  import { formatAmount } from "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
5
5
  import { useAppKitNetwork } from "@reown/appkit/react";
6
- import { waitForTransactionReceipt, getConnections } from "@wagmi/core";
6
+ import { waitForTransactionReceipt } from "@wagmi/core";
7
7
  import debounce from "lodash/debounce";
8
8
  import { useRef, useState, useMemo, useCallback, useEffect } from "react";
9
9
  import { toast } from "react-toastify";
@@ -62,7 +62,7 @@ const Deposit = ({
62
62
  onNavigate,
63
63
  onChangeDirection
64
64
  }) => {
65
- var _a, _b, _c, _d, _e, _f;
65
+ var _a, _b;
66
66
  const ref = useRef(null);
67
67
  const [isTokenSelectorVisible, setIsTokenSelectorVisible] = useState(false);
68
68
  const [pendingSigning, setPendingSigning] = useState(false);
@@ -346,6 +346,7 @@ const Deposit = ({
346
346
  }
347
347
  },
348
348
  [
349
+ selectedChainOption,
349
350
  bridgeAddress,
350
351
  handleOnChangeFirstAmount,
351
352
  handleOnChangeSecondAmount,
@@ -615,26 +616,14 @@ const Deposit = ({
615
616
  }
616
617
  )
617
618
  ] }),
618
- account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: [
619
- /* @__PURE__ */ jsxs("div", { children: [
620
- "You will be asked to sign ",
621
- siginingTransactionsCount,
622
- " ",
623
- siginingTransactionsCount > 1 ? "transactions" : "transaction",
624
- " ",
625
- "on",
626
- " "
627
- ] }),
628
- /* @__PURE__ */ jsx(
629
- "img",
630
- {
631
- src: (_d = (_c = getConnections(config)[0]) == null ? void 0 : _c.connector) == null ? void 0 : _d.icon,
632
- alt: "",
633
- className: "liq-mx-1 liq-h-[1rem] liq-w-[1rem]"
634
- }
635
- ),
636
- /* @__PURE__ */ jsx("div", { children: (_f = (_e = getConnections(config)[0]) == null ? void 0 : _e.connector) == null ? void 0 : _f.name })
637
- ] })
619
+ account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsx("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ jsxs("div", { children: [
620
+ "You will be asked to sign ",
621
+ siginingTransactionsCount,
622
+ " ",
623
+ siginingTransactionsCount > 1 ? "transactions" : "transaction",
624
+ " ",
625
+ "on your wallet"
626
+ ] }) })
638
627
  ]
639
628
  }
640
629
  ) });
@@ -4,7 +4,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const formatAmount = require("@multiversx/sdk-dapp-utils/out/helpers/formatAmount");
6
6
  const react = require("@reown/appkit/react");
7
- const core = require("@wagmi/core");
8
7
  const debounce = require("lodash/debounce");
9
8
  const React = require("react");
10
9
  const reactToastify = require("react-toastify");
@@ -70,7 +69,7 @@ const Transfer = ({
70
69
  onNavigate,
71
70
  onChangeDirection
72
71
  }) => {
73
- var _a, _b, _c, _d, _e, _f;
72
+ var _a, _b;
74
73
  const ref = React.useRef(null);
75
74
  const [isTokenSelectorVisible, setIsTokenSelectorVisible] = React.useState(false);
76
75
  const [forceRefetchRate, setForceRefetchRate] = React.useState(1);
@@ -79,7 +78,6 @@ const Transfer = ({
79
78
  const account = reactjs_hooks_useAccount.useAccount();
80
79
  const { switchNetwork } = react.useAppKitNetwork();
81
80
  const {
82
- config,
83
81
  options,
84
82
  supportedChains: sdkChains,
85
83
  nativeAuthToken,
@@ -538,26 +536,14 @@ const Transfer = ({
538
536
  }
539
537
  )
540
538
  ] }),
541
- account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: [
542
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
543
- "You will be asked to sign ",
544
- siginingTransactionsCount,
545
- " ",
546
- siginingTransactionsCount > 1 ? "transactions" : "transaction",
547
- " ",
548
- "on",
549
- " "
550
- ] }),
551
- /* @__PURE__ */ jsxRuntime.jsx(
552
- "img",
553
- {
554
- src: (_d = (_c = core.getConnections(config)[0]) == null ? void 0 : _c.connector) == null ? void 0 : _d.icon,
555
- alt: "",
556
- className: "liq-mx-1 liq-h-[1rem] liq-w-[1rem]"
557
- }
558
- ),
559
- /* @__PURE__ */ jsxRuntime.jsx("div", { children: (_f = (_e = core.getConnections(config)[0]) == null ? void 0 : _e.connector) == null ? void 0 : _f.name })
560
- ] })
539
+ account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
540
+ "You will be asked to sign ",
541
+ siginingTransactionsCount,
542
+ " ",
543
+ siginingTransactionsCount > 1 ? "transactions" : "transaction",
544
+ " ",
545
+ "on your wallet"
546
+ ] }) })
561
547
  ]
562
548
  }
563
549
  ) });
@@ -1,7 +1,6 @@
1
1
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
2
  import { formatAmount } from "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
3
3
  import { useAppKitNetwork } from "@reown/appkit/react";
4
- import { getConnections } from "@wagmi/core";
5
4
  import debounce from "lodash/debounce";
6
5
  import { useRef, useState, useMemo, useCallback, useEffect } from "react";
7
6
  import { toast } from "react-toastify";
@@ -67,7 +66,7 @@ const Transfer = ({
67
66
  onNavigate,
68
67
  onChangeDirection
69
68
  }) => {
70
- var _a, _b, _c, _d, _e, _f;
69
+ var _a, _b;
71
70
  const ref = useRef(null);
72
71
  const [isTokenSelectorVisible, setIsTokenSelectorVisible] = useState(false);
73
72
  const [forceRefetchRate, setForceRefetchRate] = useState(1);
@@ -76,7 +75,6 @@ const Transfer = ({
76
75
  const account = useAccount();
77
76
  const { switchNetwork } = useAppKitNetwork();
78
77
  const {
79
- config,
80
78
  options,
81
79
  supportedChains: sdkChains,
82
80
  nativeAuthToken,
@@ -535,26 +533,14 @@ const Transfer = ({
535
533
  }
536
534
  )
537
535
  ] }),
538
- account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: [
539
- /* @__PURE__ */ jsxs("div", { children: [
540
- "You will be asked to sign ",
541
- siginingTransactionsCount,
542
- " ",
543
- siginingTransactionsCount > 1 ? "transactions" : "transaction",
544
- " ",
545
- "on",
546
- " "
547
- ] }),
548
- /* @__PURE__ */ jsx(
549
- "img",
550
- {
551
- src: (_d = (_c = getConnections(config)[0]) == null ? void 0 : _c.connector) == null ? void 0 : _d.icon,
552
- alt: "",
553
- className: "liq-mx-1 liq-h-[1rem] liq-w-[1rem]"
554
- }
555
- ),
556
- /* @__PURE__ */ jsx("div", { children: (_f = (_e = getConnections(config)[0]) == null ? void 0 : _e.connector) == null ? void 0 : _f.name })
557
- ] })
536
+ account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsx("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ jsxs("div", { children: [
537
+ "You will be asked to sign ",
538
+ siginingTransactionsCount,
539
+ " ",
540
+ siginingTransactionsCount > 1 ? "transactions" : "transaction",
541
+ " ",
542
+ "on your wallet"
543
+ ] }) })
558
544
  ]
559
545
  }
560
546
  ) });
package/style.css CHANGED
@@ -692,9 +692,6 @@ video {
692
692
  .liq-h-\[1\.5rem\]{
693
693
  height: 1.5rem;
694
694
  }
695
- .liq-h-\[1rem\]{
696
- height: 1rem;
697
- }
698
695
  .liq-h-full{
699
696
  height: 100%;
700
697
  }
@@ -743,9 +740,6 @@ video {
743
740
  .liq-w-\[1\.5rem\]{
744
741
  width: 1.5rem;
745
742
  }
746
- .liq-w-\[1rem\]{
747
- width: 1rem;
748
- }
749
743
  .liq-w-full{
750
744
  width: 100%;
751
745
  }