@multiversx/sdk-dapp-liquidity 1.1.4 → 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 +1 -1
- package/api/getChains.mjs +1 -1
- package/package.json +1 -1
- package/reactjs/components/BridgeForm/Deposit.js +10 -21
- package/reactjs/components/BridgeForm/Deposit.mjs +11 -22
- package/reactjs/components/BridgeForm/Transfer.js +9 -23
- package/reactjs/components/BridgeForm/Transfer.mjs +9 -23
- package/style.css +0 -6
package/api/getChains.js
CHANGED
package/api/getChains.mjs
CHANGED
package/package.json
CHANGED
|
@@ -65,7 +65,7 @@ const Deposit = ({
|
|
|
65
65
|
onNavigate,
|
|
66
66
|
onChangeDirection
|
|
67
67
|
}) => {
|
|
68
|
-
var _a, _b
|
|
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.
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
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
|
|
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
|
|
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__ */
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
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
|
|
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.
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
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
|
|
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__ */
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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
|
}
|