@multiversx/sdk-dapp-liquidity 2.3.0-alpha.4 → 2.3.0-alpha.6
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/package.json +1 -1
- package/reactjs/components/BridgeForm/Deposit.js +1 -1
- package/reactjs/components/BridgeForm/Deposit.mjs +149 -146
- package/reactjs/components/BridgeForm/Transfer.js +1 -1
- package/reactjs/components/BridgeForm/Transfer.mjs +169 -163
- package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -1
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +16 -15
- package/reactjs/components/Connect/BridgeConnectButton.js +1 -1
- package/reactjs/components/Connect/BridgeConnectButton.mjs +26 -19
- package/reactjs/components/Connect/CustomConnectButton.d.ts +4 -1
- package/reactjs/components/Connect/CustomConnectButton.js +1 -1
- package/reactjs/components/Connect/CustomConnectButton.mjs +18 -16
- package/reactjs/components/Connect/SwitchChainButton.d.ts +3 -1
- package/reactjs/components/Connect/SwitchChainButton.js +1 -1
- package/reactjs/components/Connect/SwitchChainButton.mjs +19 -14
- package/reactjs/hooks/useBalances.js +1 -1
- package/reactjs/hooks/useBalances.mjs +16 -15
- package/reactjs/hooks/useBridgeFormik.js +1 -1
- package/reactjs/hooks/useBridgeFormik.mjs +14 -14
- package/reactjs/hooks/useDebounce.js +1 -1
- package/reactjs/hooks/useDebounce.mjs +6 -6
- package/reactjs/hooks/useFetchTokens.js +1 -1
- package/reactjs/hooks/useFetchTokens.mjs +19 -14
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("@fortawesome/free-solid-svg-icons/faPowerOff"),y=require("@fortawesome/react-fontawesome"),g=require("@reown/appkit/react"),i=require("../../../helpers/getDisplayName.js"),j=require("./SwitchChainButton.js"),n=require("../../../types/chainType.js"),f=require("../../hooks/useAccount.js"),N=require("../../hooks/useNamespaceAddress.js"),b=require("../../hooks/useSuiConnect.js");require("clsx");require("tailwind-merge");require("../base/MxCard/MxCard.js");const _=require("../base/MxLink/MxLink.js");require("../base/MxSearch/MxSearch.js");require("@fortawesome/free-solid-svg-icons/faClose");require("@headlessui/react");require("react");require("react-dom");require("react-popper");require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");require("../../constants/index.js");const w=require("../CopyButton/CopyButton.js"),T=require("../TrimAddress/TrimAddress.js"),k=({activeChain:e,disabled:t})=>{var d;const o=f.useAccount(),{disconnect:u}=g.useDisconnect(),l=b.useSuiConnect(),c=N.useNamespaceAddress(e==null?void 0:e.chainType),q=(e==null?void 0:e.chainType)===n.ChainType.sui,r=(e==null?void 0:e.chainType)===n.ChainType.evm||(e==null?void 0:e.chainType)===n.ChainType.sui?c:c??o.address,m=async a=>{try{a.preventDefault(),q?await l.disconnect():await u()}catch(x){console.error("Failed to disconnect:",x)}};return r?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:e==null?void 0:e.pngUrl,alt:"",className:"liq-w-6 liq-h-6 liq-rounded-lg"}),s.jsx("span",{className:"liq-truncate liq-text-gray-400",children:i.getDisplayName(e)}),s.jsx("span",{className:"liq-ml-[-5px]",children:":"}),s.jsx("div",{className:"liq-flex liq-items-center liq-justify-between",children:s.jsxs("div",{className:"liq-flex liq-max-w-[10rem] liq-items-center liq-gap-1",children:[s.jsx(_.MxLink,{to:`${(d=e==null?void 0:e.blockExplorerUrls)==null?void 0:d[0]}/address/${r}`,target:"_blank",showExternalIcon:!1,className:"!liq-relative",children:s.jsx("div",{className:"liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",children:s.jsx(T.TrimAddress,{address:r,"data-testid":"evm-address"})})}),s.jsx(w.CopyButton,{text:r,className:"liq-text-sm","data-testid":"evm-copy-button"})]})}),s.jsx("div",{className:"liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1",children:s.jsx("button",{className:"focus-primary liq-flex liq-items-center liq-gap-1 liq-rounded-xl liq-px-0 liq-py-2 liq-text-sm liq-font-semibold liq-text-neutral-400 liq-transition-colors liq-duration-200 hover:enabled:liq-text-white disabled:liq-opacity-50",onClick:m,"data-testid":"evm-disconnect-button",children:s.jsx(y.FontAwesomeIcon,{icon:p.faPowerOff})})})]}):q?s.jsxs("div",{className:"liq-flex liq-max-w-full liq-items-center liq-gap-2",children:[s.jsx("button",{disabled:t||l.isConnecting,onClick:()=>l.connect(),className:"liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",children:s.jsx("div",{className:"liq-flex liq-items-center",children:s.jsxs("div",{className:"liq-flex liq-justify-center liq-items-center liq-gap-2",children:[s.jsx("div",{children:l.isConnecting?"Connecting...":"Connect"}),s.jsx("img",{src:e==null?void 0:e.pngUrl,alt:"",className:"liq-w-4 liq-h-4 liq-rounded-sm"}),s.jsx("div",{className:"liq-truncate md:liq-text-clip",children:i.getDisplayName(e)})]})})}),l.isConnecting&&s.jsx("button",{type:"button",onClick:()=>void l.cancelPendingConnection(),className:"liq-shrink-0 liq-rounded-lg liq-px-2 liq-py-1 liq-text-xs liq-font-medium liq-text-neutral-400 hover:liq-text-white",children:"Cancel"})]}):s.jsx(j.SwitchChainButton,{disabled:t,chainType:e==null?void 0:e.chainType,className:"liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",children:s.jsx("div",{className:"liq-flex liq-items-center",children:s.jsxs("div",{className:"liq-flex liq-justify-center liq-items-center liq-gap-2",children:[s.jsx("div",{children:o.isConnecting?"Connecting...":"Connect"}),s.jsx("img",{src:e==null?void 0:e.pngUrl,alt:"",className:"liq-w-4 liq-h-4 liq-rounded-sm"}),s.jsx("div",{className:"liq-truncate md:liq-text-clip",children:i.getDisplayName(e)})]})})})};exports.BridgeAccountDisplay=k;
|
|
@@ -2,16 +2,16 @@ import { jsxs as r, Fragment as x, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { faPowerOff as g } from "@fortawesome/free-solid-svg-icons/faPowerOff";
|
|
3
3
|
import { FontAwesomeIcon as y } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { useDisconnect as N } from "@reown/appkit/react";
|
|
5
|
-
import { getDisplayName as
|
|
5
|
+
import { getDisplayName as o } from "../../../helpers/getDisplayName.mjs";
|
|
6
6
|
import { SwitchChainButton as b } from "./SwitchChainButton.mjs";
|
|
7
|
-
import { ChainType as
|
|
7
|
+
import { ChainType as t } from "../../../types/chainType.mjs";
|
|
8
8
|
import { useAccount as w } from "../../hooks/useAccount.mjs";
|
|
9
|
-
import { useNamespaceAddress as
|
|
10
|
-
import { useSuiConnect as
|
|
9
|
+
import { useNamespaceAddress as T } from "../../hooks/useNamespaceAddress.mjs";
|
|
10
|
+
import { useSuiConnect as k } from "../../hooks/useSuiConnect.mjs";
|
|
11
11
|
import "clsx";
|
|
12
12
|
import "tailwind-merge";
|
|
13
13
|
import "../base/MxCard/MxCard.mjs";
|
|
14
|
-
import { MxLink as
|
|
14
|
+
import { MxLink as A } from "../base/MxLink/MxLink.mjs";
|
|
15
15
|
import "../base/MxSearch/MxSearch.mjs";
|
|
16
16
|
import "@fortawesome/free-solid-svg-icons/faClose";
|
|
17
17
|
import "@headlessui/react";
|
|
@@ -26,10 +26,10 @@ const v = ({
|
|
|
26
26
|
activeChain: l,
|
|
27
27
|
disabled: n
|
|
28
28
|
}) => {
|
|
29
|
-
var
|
|
30
|
-
const m = w(), { disconnect: p } = N(), i =
|
|
29
|
+
var c;
|
|
30
|
+
const m = w(), { disconnect: p } = N(), i = k(), d = T(l == null ? void 0 : l.chainType), q = (l == null ? void 0 : l.chainType) === t.sui, s = (l == null ? void 0 : l.chainType) === t.evm || (l == null ? void 0 : l.chainType) === t.sui ? d : d ?? m.address, u = async (a) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
a.preventDefault(), q ? await i.disconnect() : await p();
|
|
33
33
|
} catch (f) {
|
|
34
34
|
console.error("Failed to disconnect:", f);
|
|
35
35
|
}
|
|
@@ -43,13 +43,13 @@ const v = ({
|
|
|
43
43
|
className: "liq-w-6 liq-h-6 liq-rounded-lg"
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
/* @__PURE__ */ e("span", { className: "liq-truncate liq-text-gray-400", children:
|
|
46
|
+
/* @__PURE__ */ e("span", { className: "liq-truncate liq-text-gray-400", children: o(l) }),
|
|
47
47
|
/* @__PURE__ */ e("span", { className: "liq-ml-[-5px]", children: ":" }),
|
|
48
48
|
/* @__PURE__ */ e("div", { className: "liq-flex liq-items-center liq-justify-between", children: /* @__PURE__ */ r("div", { className: "liq-flex liq-max-w-[10rem] liq-items-center liq-gap-1", children: [
|
|
49
49
|
/* @__PURE__ */ e(
|
|
50
|
-
|
|
50
|
+
A,
|
|
51
51
|
{
|
|
52
|
-
to: `${(
|
|
52
|
+
to: `${(c = l == null ? void 0 : l.blockExplorerUrls) == null ? void 0 : c[0]}/address/${s}`,
|
|
53
53
|
target: "_blank",
|
|
54
54
|
showExternalIcon: !1,
|
|
55
55
|
className: "!liq-relative",
|
|
@@ -75,12 +75,12 @@ const v = ({
|
|
|
75
75
|
"button",
|
|
76
76
|
{
|
|
77
77
|
className: "focus-primary liq-flex liq-items-center liq-gap-1 liq-rounded-xl liq-px-0 liq-py-2 liq-text-sm liq-font-semibold liq-text-neutral-400 liq-transition-colors liq-duration-200 hover:enabled:liq-text-white disabled:liq-opacity-50",
|
|
78
|
-
onClick:
|
|
78
|
+
onClick: u,
|
|
79
79
|
"data-testid": "evm-disconnect-button",
|
|
80
80
|
children: /* @__PURE__ */ e(y, { icon: g })
|
|
81
81
|
}
|
|
82
82
|
) })
|
|
83
|
-
] }) :
|
|
83
|
+
] }) : q ? /* @__PURE__ */ r("div", { className: "liq-flex liq-max-w-full liq-items-center liq-gap-2", children: [
|
|
84
84
|
/* @__PURE__ */ e(
|
|
85
85
|
"button",
|
|
86
86
|
{
|
|
@@ -97,7 +97,7 @@ const v = ({
|
|
|
97
97
|
className: "liq-w-4 liq-h-4 liq-rounded-sm"
|
|
98
98
|
}
|
|
99
99
|
),
|
|
100
|
-
/* @__PURE__ */ e("div", { className: "liq-truncate md:liq-text-clip", children:
|
|
100
|
+
/* @__PURE__ */ e("div", { className: "liq-truncate md:liq-text-clip", children: o(l) })
|
|
101
101
|
] }) })
|
|
102
102
|
}
|
|
103
103
|
),
|
|
@@ -114,6 +114,7 @@ const v = ({
|
|
|
114
114
|
b,
|
|
115
115
|
{
|
|
116
116
|
disabled: n,
|
|
117
|
+
chainType: l == null ? void 0 : l.chainType,
|
|
117
118
|
className: "liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",
|
|
118
119
|
children: /* @__PURE__ */ e("div", { className: "liq-flex liq-items-center", children: /* @__PURE__ */ r("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
|
|
119
120
|
/* @__PURE__ */ e("div", { children: m.isConnecting ? "Connecting..." : "Connect" }),
|
|
@@ -125,7 +126,7 @@ const v = ({
|
|
|
125
126
|
className: "liq-w-4 liq-h-4 liq-rounded-sm"
|
|
126
127
|
}
|
|
127
128
|
),
|
|
128
|
-
/* @__PURE__ */ e("div", { className: "liq-truncate md:liq-text-clip", children:
|
|
129
|
+
/* @__PURE__ */ e("div", { className: "liq-truncate md:liq-text-clip", children: o(l) })
|
|
129
130
|
] }) })
|
|
130
131
|
}
|
|
131
132
|
);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("./CustomConnectButton.js"),i=require("../../../helpers/getDisplayName.js"),c=require("../../../helpers/safeImageUrl.js");require("@solana/web3.js");require("bitcoinjs-lib");require("viem");const r=require("../../../types/chainType.js"),u=require("../../hooks/useAccount.js"),m=e=>{if(e===r.ChainType.evm)return"eip155";if(e===r.ChainType.sui)return"sui"},q=({activeChain:e,disabled:t,className:l})=>{const s=u.useAccount();return n.jsx(o.CustomConnectButton,{className:l,disabled:t,namespace:m(e==null?void 0:e.chainType),"data-testid":"evm-network-connect-button",children:s.isConnected?null:n.jsxs("div",{className:"liq-flex liq-items-center liq-justify-center liq-gap-1",children:[!s.isConnected&&n.jsx("div",{className:"liq-ml-2 liq-flex liq-items-center liq-gap-1",children:n.jsx("span",{className:"liq-text-primary-200",children:s.isConnecting?"Connecting...":"Connect"})}),e&&n.jsx("img",{src:c.safeImageUrl(e.pngUrl),alt:"",className:"liq-z-10 liq-flex liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"}),(e==null?void 0:e.networkName)&&n.jsx("span",{className:"liq-inline liq-truncate",children:i.getDisplayName(e)})]})})};exports.BridgeConnectButton=q;
|
|
@@ -1,38 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { CustomConnectButton as
|
|
3
|
-
import { getDisplayName as
|
|
4
|
-
import { safeImageUrl as
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { CustomConnectButton as s } from "./CustomConnectButton.mjs";
|
|
3
|
+
import { getDisplayName as i } from "../../../helpers/getDisplayName.mjs";
|
|
4
|
+
import { safeImageUrl as c } from "../../../helpers/safeImageUrl.mjs";
|
|
5
5
|
import "@solana/web3.js";
|
|
6
6
|
import "bitcoinjs-lib";
|
|
7
7
|
import "viem";
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import { ChainType as t } from "../../../types/chainType.mjs";
|
|
9
|
+
import { useAccount as p } from "../../hooks/useAccount.mjs";
|
|
10
|
+
const u = (e) => {
|
|
11
|
+
if (e === t.evm)
|
|
12
|
+
return "eip155";
|
|
13
|
+
if (e === t.sui)
|
|
14
|
+
return "sui";
|
|
15
|
+
}, w = ({
|
|
10
16
|
activeChain: e,
|
|
11
|
-
disabled:
|
|
12
|
-
className:
|
|
17
|
+
disabled: l,
|
|
18
|
+
className: o
|
|
13
19
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
20
|
+
const n = p();
|
|
21
|
+
return /* @__PURE__ */ r(
|
|
22
|
+
s,
|
|
17
23
|
{
|
|
18
|
-
className:
|
|
19
|
-
disabled:
|
|
24
|
+
className: o,
|
|
25
|
+
disabled: l,
|
|
26
|
+
namespace: u(e == null ? void 0 : e.chainType),
|
|
20
27
|
"data-testid": "evm-network-connect-button",
|
|
21
|
-
children:
|
|
22
|
-
!
|
|
23
|
-
e && /* @__PURE__ */
|
|
28
|
+
children: n.isConnected ? null : /* @__PURE__ */ m("div", { className: "liq-flex liq-items-center liq-justify-center liq-gap-1", children: [
|
|
29
|
+
!n.isConnected && /* @__PURE__ */ r("div", { className: "liq-ml-2 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ r("span", { className: "liq-text-primary-200", children: n.isConnecting ? "Connecting..." : "Connect" }) }),
|
|
30
|
+
e && /* @__PURE__ */ r(
|
|
24
31
|
"img",
|
|
25
32
|
{
|
|
26
|
-
src:
|
|
33
|
+
src: c(e.pngUrl),
|
|
27
34
|
alt: "",
|
|
28
35
|
className: "liq-z-10 liq-flex liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
29
36
|
}
|
|
30
37
|
),
|
|
31
|
-
(e == null ? void 0 : e.networkName) && /* @__PURE__ */
|
|
38
|
+
(e == null ? void 0 : e.networkName) && /* @__PURE__ */ r("span", { className: "liq-inline liq-truncate", children: i(e) })
|
|
32
39
|
] })
|
|
33
40
|
}
|
|
34
41
|
);
|
|
35
42
|
};
|
|
36
43
|
export {
|
|
37
|
-
|
|
44
|
+
w as BridgeConnectButton
|
|
38
45
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ChainNamespace } from '@reown/appkit-common';
|
|
2
3
|
|
|
3
|
-
export declare const CustomConnectButton: ({ disabled, className, children, "data-testid": dataTestId }: {
|
|
4
|
+
export declare const CustomConnectButton: ({ disabled, className, children, namespace, "data-testid": dataTestId }: {
|
|
4
5
|
disabled?: boolean;
|
|
5
6
|
className?: string;
|
|
6
7
|
children?: ReactNode;
|
|
8
|
+
/** AppKit namespace to restrict the WC session proposal (e.g. 'eip155'). */
|
|
9
|
+
namespace?: ChainNamespace;
|
|
7
10
|
"data-testid"?: string;
|
|
8
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("@reown/appkit/react"),s=require("wagmi"),b=({disabled:t,className:n,children:e,namespace:o,"data-testid":u})=>{const{open:r}=a.useAppKit(),{isConnected:l,isConnecting:d}=s.useAccount(),{disconnect:C}=s.useDisconnect(),c="liq-font-bold liq-text-inherit liq-rounded-lg";return l?i.jsx("button",{onClick:()=>C(),className:`${c} ${n}`,disabled:t,children:e||"Disconnect"}):i.jsx("button",{"data-testid":u,onClick:()=>r({view:"Connect",...o?{namespace:o}:{}}),className:`${c} ${n}`,disabled:t,children:e||(d?"Trying to connect...":"Connect")})};exports.CustomConnectButton=b;
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useAppKit as
|
|
3
|
-
import { useAccount as m, useDisconnect as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useAppKit as C } from "@reown/appkit/react";
|
|
3
|
+
import { useAccount as m, useDisconnect as p } from "wagmi";
|
|
4
|
+
const b = ({
|
|
5
5
|
disabled: t,
|
|
6
6
|
className: n,
|
|
7
7
|
children: o,
|
|
8
|
-
|
|
8
|
+
namespace: e,
|
|
9
|
+
"data-testid": s
|
|
9
10
|
}) => {
|
|
10
|
-
const { open:
|
|
11
|
-
return
|
|
11
|
+
const { open: r } = C(), { isConnected: u, isConnecting: l } = m(), { disconnect: d } = p(), c = "liq-font-bold liq-text-inherit liq-rounded-lg";
|
|
12
|
+
return u ? /* @__PURE__ */ i(
|
|
12
13
|
"button",
|
|
13
14
|
{
|
|
14
|
-
onClick: () =>
|
|
15
|
-
className: `${
|
|
15
|
+
onClick: () => d(),
|
|
16
|
+
className: `${c} ${n}`,
|
|
16
17
|
disabled: t,
|
|
17
18
|
children: o || "Disconnect"
|
|
18
19
|
}
|
|
19
|
-
) : /* @__PURE__ */
|
|
20
|
+
) : /* @__PURE__ */ i(
|
|
20
21
|
"button",
|
|
21
22
|
{
|
|
22
|
-
"data-testid":
|
|
23
|
-
onClick: () =>
|
|
24
|
-
view: "Connect"
|
|
23
|
+
"data-testid": s,
|
|
24
|
+
onClick: () => r({
|
|
25
|
+
view: "Connect",
|
|
26
|
+
...e ? { namespace: e } : {}
|
|
25
27
|
}),
|
|
26
|
-
className: `${
|
|
28
|
+
className: `${c} ${n}`,
|
|
27
29
|
disabled: t,
|
|
28
|
-
children: o || (
|
|
30
|
+
children: o || (l ? "Trying to connect..." : "Connect")
|
|
29
31
|
}
|
|
30
32
|
);
|
|
31
33
|
};
|
|
32
34
|
export {
|
|
33
|
-
|
|
35
|
+
b as CustomConnectButton
|
|
34
36
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ChainType } from '../../../types/chainType';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
|
-
export declare const SwitchChainButton: ({ children, className, disabled }: {
|
|
4
|
+
export declare const SwitchChainButton: ({ children, className, disabled, chainType }: {
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
className?: string;
|
|
6
7
|
disabled?: boolean;
|
|
8
|
+
chainType?: ChainType;
|
|
7
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),n=require("@reown/appkit/react"),t=require("../../../types/chainType.js"),C=({children:c,className:u,disabled:o,chainType:e})=>{const{open:a}=n.useAppKit(),s=n.useAppKitAccount({namespace:"eip155"}),r=n.useAppKitAccount({namespace:"sui"}),i=e===t.ChainType.evm?"eip155":e===t.ChainType.sui?"sui":void 0,p=e===t.ChainType.evm?!!s.address:e===t.ChainType.sui?!!r.address:s.isConnected,l=`liq-font-bold liq-text-white liq-rounded-lg ${o?"liq-cursor-not-allowed":"liq-cursor-pointer"}`;return m.jsx("button",{onClick:d=>{d.preventDefault(),a({view:p?"Networks":"Connect",...i?{namespace:i}:{}})},className:`${l} ${u}`,disabled:o,"data-tesid":"evm-connect-button",children:c})};exports.SwitchChainButton=C;
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useAppKit as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useAppKit as d, useAppKitAccount as c } from "@reown/appkit/react";
|
|
3
|
+
import { ChainType as o } from "../../../types/chainType.mjs";
|
|
4
|
+
const w = ({
|
|
5
|
+
children: i,
|
|
6
|
+
className: r,
|
|
7
|
+
disabled: t,
|
|
8
|
+
chainType: e
|
|
7
9
|
}) => {
|
|
8
|
-
const { open:
|
|
9
|
-
|
|
10
|
+
const { open: a } = d(), n = c({
|
|
11
|
+
namespace: "eip155"
|
|
12
|
+
}), u = c({ namespace: "sui" }), s = e === o.evm ? "eip155" : e === o.sui ? "sui" : void 0, l = e === o.evm ? !!n.address : e === o.sui ? !!u.address : n.isConnected;
|
|
13
|
+
return /* @__PURE__ */ p(
|
|
10
14
|
"button",
|
|
11
15
|
{
|
|
12
|
-
onClick: (
|
|
13
|
-
|
|
14
|
-
view:
|
|
16
|
+
onClick: (m) => {
|
|
17
|
+
m.preventDefault(), a({
|
|
18
|
+
view: l ? "Networks" : "Connect",
|
|
19
|
+
...s ? { namespace: s } : {}
|
|
15
20
|
});
|
|
16
21
|
},
|
|
17
|
-
className: `${`liq-font-bold liq-text-white liq-rounded-lg ${t ? "liq-cursor-not-allowed" : "liq-cursor-pointer"}`} ${
|
|
22
|
+
className: `${`liq-font-bold liq-text-white liq-rounded-lg ${t ? "liq-cursor-not-allowed" : "liq-cursor-pointer"}`} ${r}`,
|
|
18
23
|
disabled: t,
|
|
19
24
|
"data-tesid": "evm-connect-button",
|
|
20
|
-
children:
|
|
25
|
+
children: i
|
|
21
26
|
}
|
|
22
27
|
);
|
|
23
28
|
};
|
|
24
29
|
export {
|
|
25
|
-
|
|
30
|
+
w as SwitchChainButton
|
|
26
31
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@reown/appkit/react"),d=require("axios"),l=require("react"),b=require("../../helpers/getApiURL.js"),p=require("../context/useWeb3App.js"),h=()=>{const{address:t,isConnected:s}=i.useAppKitAccount(),{nativeAuthToken:c}=p.useWeb3App(),u=async a=>{const n=`${b.getApiURL()}/user/balance/${t}?chainId=${a}`;try{const{data:r}=await d.get(n,{headers:{Authorization:`Bearer ${c}`}});return r.reduce((e,o)=>(e[o.tokenAddress]=o.balance,e),{})}catch(r){throw new Error(`Error fetching balances: ${r}`)}};return{getBalances:l.useCallback(async({tokens:a,chainId:n})=>{const r=await u(n);return a.map(e=>!s||!t||!e.chainId?{tokenId:e.address,balance:"0"}:{tokenId:e.address,balance:r[e.address]??"0"})},[s,t,c])}};exports.useBalances=h;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { useAppKitAccount as
|
|
2
|
-
import
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { getApiURL as
|
|
5
|
-
import { useWeb3App as
|
|
6
|
-
const
|
|
7
|
-
const {
|
|
8
|
-
const n = `${
|
|
1
|
+
import { useAppKitAccount as i } from "@reown/appkit/react";
|
|
2
|
+
import u from "axios";
|
|
3
|
+
import { useCallback as l } from "react";
|
|
4
|
+
import { getApiURL as p } from "../../helpers/getApiURL.mjs";
|
|
5
|
+
import { useWeb3App as m } from "../context/useWeb3App.mjs";
|
|
6
|
+
const $ = () => {
|
|
7
|
+
const { address: a, isConnected: s } = i(), { nativeAuthToken: o } = m(), d = async (t) => {
|
|
8
|
+
const n = `${p()}/user/balance/${a}?chainId=${t}`;
|
|
9
9
|
try {
|
|
10
|
-
const { data: r } = await
|
|
10
|
+
const { data: r } = await u.get(n, {
|
|
11
11
|
headers: {
|
|
12
|
-
Authorization: `Bearer ${
|
|
12
|
+
Authorization: `Bearer ${o}`
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
return r.reduce(
|
|
16
|
-
(e,
|
|
16
|
+
(e, c) => (e[c.tokenAddress] = c.balance, e),
|
|
17
17
|
{}
|
|
18
18
|
);
|
|
19
19
|
} catch (r) {
|
|
@@ -21,9 +21,9 @@ const w = () => {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
return {
|
|
24
|
-
getBalances:
|
|
24
|
+
getBalances: l(
|
|
25
25
|
async ({ tokens: t, chainId: n }) => {
|
|
26
|
-
const r = await
|
|
26
|
+
const r = await d(n);
|
|
27
27
|
return t.map((e) => !s || !a || !e.chainId ? {
|
|
28
28
|
tokenId: e.address,
|
|
29
29
|
balance: "0"
|
|
@@ -32,10 +32,11 @@ const w = () => {
|
|
|
32
32
|
balance: r[e.address] ?? "0"
|
|
33
33
|
});
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
// nativeAuthToken is used inside fetchBalances (auth header); config is not used.
|
|
36
|
+
[s, a, o]
|
|
36
37
|
)
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
$ as useBalances
|
|
41
42
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("formik"),d=require("react"),a=require("yup"),K=require("./validation/useAmountSchema.js"),Q=require("./validation/useSecondAmountSchema.js"),X=require("../../api/confirmRate.js"),Y=require("../../helpers/assertConfirmRateData.js"),Z=require("../../helpers/assertRateConfirmationMatchesIntent.js"),B=require("../../helpers/getApiURL.js"),R=require("../../helpers/isValidAddressForChainType.js"),j=require("../../types/errors.js"),M=require("../../types/providerType.js"),oo=require("../context/useWeb3App.js");var D=(r=>(r.firstToken="firstToken",r.firstAmount="firstAmount",r.secondToken="secondToken",r.secondAmount="secondAmount",r.fromChainId="fromChainId",r.toChainId="toChainId",r))(D||{});const ro=({sender:r,receiver:c,firstToken:h,firstAmount:I,secondToken:C,secondAmount:l,fromChainId:p,toChainId:A,setForceRefetchRate:S,rate:o,onSubmit:O,isMvxConnected:P,senderChainType:q,receiverChainType:v})=>{const u=d.useRef(),{nativeAuthToken:k}=oo.useWeb3App(),[V,_]=d.useState(void 0),g=!r||!q?!0:R.isValidAddressForChainType(r,q),T=!c||!v?!0:R.isValidAddressForChainType(c,v),$=r&&!g?`Invalid ${q} sender address`:void 0,w=c&&!T?`Invalid ${v} receiver address`:void 0,F={firstAmount:"",secondAmount:"",fromChainId:p??"",toChainId:A??""},b=()=>{f.setTouched({},!1),f.setErrors({}),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("formik"),d=require("react"),a=require("yup"),K=require("./validation/useAmountSchema.js"),Q=require("./validation/useSecondAmountSchema.js"),X=require("../../api/confirmRate.js"),Y=require("../../helpers/assertConfirmRateData.js"),Z=require("../../helpers/assertRateConfirmationMatchesIntent.js"),B=require("../../helpers/getApiURL.js"),R=require("../../helpers/isValidAddressForChainType.js"),j=require("../../types/errors.js"),M=require("../../types/providerType.js"),oo=require("../context/useWeb3App.js");var D=(r=>(r.firstToken="firstToken",r.firstAmount="firstAmount",r.secondToken="secondToken",r.secondAmount="secondAmount",r.fromChainId="fromChainId",r.toChainId="toChainId",r))(D||{});const ro=({sender:r,receiver:c,firstToken:h,firstAmount:I,secondToken:C,secondAmount:l,fromChainId:p,toChainId:A,setForceRefetchRate:S,rate:o,onSubmit:O,isMvxConnected:P,senderChainType:q,receiverChainType:v})=>{const u=d.useRef(),{nativeAuthToken:k}=oo.useWeb3App(),[V,_]=d.useState(void 0),g=!r||!q?!0:R.isValidAddressForChainType(r,q),T=!c||!v?!0:R.isValidAddressForChainType(c,v),$=r&&!g?`Invalid ${q} sender address`:void 0,w=c&&!T?`Invalid ${v} receiver address`:void 0,F={firstAmount:"",secondAmount:"",fromChainId:p??"",toChainId:A??""},b=()=>{f.setTouched({},!1),f.setErrors({}),n("firstAmount",""),n("secondAmount","")},L=async t=>{var y,E;if(!u.current){u.current=!0,_(void 0);try{if(!g||!T){u.current=!1;return}Y.assertConfirmRateData({nativeAuthToken:k,orderId:o==null?void 0:o.orderId,fromChainId:t.fromChainId,toChainId:t.toChainId,sender:r,receiver:c});const{data:i}=await X.confirmRate({url:B.getApiURL(),nativeAuthToken:k??"",body:{tokenIn:((y=t.firstToken)==null?void 0:y.address)??"",amountIn:(I==null?void 0:I.toString())??"",fromChainId:t.fromChainId??"",tokenOut:((E=t.secondToken)==null?void 0:E.address)??"",toChainId:t.toChainId??"",amountOut:(l==null?void 0:l.toString())??"",sender:r??"",receiver:c??"",fee:(o==null?void 0:o.fee)??"0",provider:(o==null?void 0:o.provider)??M.ProviderType.None,orderId:(o==null?void 0:o.orderId)??""}}),s=i;if(!s||s.length===0){u.current=!1;return}Z.assertRateConfirmationMatchesIntent({fromChainId:t.fromChainId??"",sender:r??""},s),b(),O({transactions:s,provider:(o==null?void 0:o.provider)??M.ProviderType.None})}catch(i){console.error("Error confirming rate:",i),i instanceof j.ConfirmRateError||i instanceof j.MissingConfirmRateDataError?_(i.message):S==null||S(s=>s+1)}finally{u.current=!1}}},f=J.useFormik({initialValues:F,validationSchema:a.object().shape({firstAmount:K.useAmountSchema({isMvxConnected:P}),firstToken:a.object().required(),secondAmount:Q.useSecondAmountSchema(),secondToken:a.object().required(),fromChainId:a.string().required(),toChainId:a.string().required()}),onSubmit:L}),{errors:e,touched:m,handleBlur:N,handleSubmit:U,handleChange:W,setFieldValue:n,setFieldTouched:x}=f;d.useEffect(()=>{n("firstToken",h,!0)},[h,n]),d.useEffect(()=>{n("secondToken",C,!0)},[C,n]),d.useEffect(()=>{n("fromChainId",p,!0)},[p,n]),d.useEffect(()=>{n("toChainId",A,!0)},[A,n]);const z="secondAmount"in e&&"secondAmount"in m?e.secondAmount:void 0,G="firstAmount"in e&&"firstAmount"in m?e.firstAmount:void 0,H="fromChainId"in e&&"fromChainId"in m?e.fromChainId:void 0;return{formik:f,errors:e,touched:m,firstToken:h,secondToken:C,firstAmountError:G,secondAmountError:z,fromChainError:H,senderAddressError:$,receiverAddressError:w,confirmRateError:V,handleBlur:N,handleChange:W,handleSubmit:U,setFieldValue:n,resetSwapForm:b,setFieldTouched:x}};exports.BridgeFormikValuesEnum=D;exports.useBridgeFormik=ro;
|
|
@@ -36,7 +36,7 @@ const So = ({
|
|
|
36
36
|
fromChainId: p ?? "",
|
|
37
37
|
toChainId: A ?? ""
|
|
38
38
|
}, q = () => {
|
|
39
|
-
f.setTouched({}, !1), f.setErrors({}),
|
|
39
|
+
f.setTouched({}, !1), f.setErrors({}), n("firstAmount", ""), n("secondAmount", "");
|
|
40
40
|
}, P = async (t) => {
|
|
41
41
|
var R, w;
|
|
42
42
|
if (!m.current) {
|
|
@@ -100,27 +100,27 @@ const So = ({
|
|
|
100
100
|
}),
|
|
101
101
|
onSubmit: P
|
|
102
102
|
}), {
|
|
103
|
-
errors:
|
|
103
|
+
errors: i,
|
|
104
104
|
touched: c,
|
|
105
105
|
handleBlur: U,
|
|
106
106
|
handleSubmit: W,
|
|
107
107
|
handleChange: z,
|
|
108
|
-
setFieldValue:
|
|
108
|
+
setFieldValue: n,
|
|
109
109
|
setFieldTouched: G
|
|
110
110
|
} = f;
|
|
111
111
|
u(() => {
|
|
112
|
-
|
|
113
|
-
}, [a]), u(() => {
|
|
114
|
-
|
|
115
|
-
}, [I]), u(() => {
|
|
116
|
-
|
|
117
|
-
}, [p]), u(() => {
|
|
118
|
-
|
|
119
|
-
}, [A]);
|
|
120
|
-
const H = "secondAmount" in
|
|
112
|
+
n("firstToken", a, !0);
|
|
113
|
+
}, [a, n]), u(() => {
|
|
114
|
+
n("secondToken", I, !0);
|
|
115
|
+
}, [I, n]), u(() => {
|
|
116
|
+
n("fromChainId", p, !0);
|
|
117
|
+
}, [p, n]), u(() => {
|
|
118
|
+
n("toChainId", A, !0);
|
|
119
|
+
}, [A, n]);
|
|
120
|
+
const H = "secondAmount" in i && "secondAmount" in c ? i.secondAmount : void 0, J = "firstAmount" in i && "firstAmount" in c ? i.firstAmount : void 0, K = "fromChainId" in i && "fromChainId" in c ? i.fromChainId : void 0;
|
|
121
121
|
return {
|
|
122
122
|
formik: f,
|
|
123
|
-
errors:
|
|
123
|
+
errors: i,
|
|
124
124
|
touched: c,
|
|
125
125
|
firstToken: a,
|
|
126
126
|
secondToken: I,
|
|
@@ -133,7 +133,7 @@ const So = ({
|
|
|
133
133
|
handleBlur: U,
|
|
134
134
|
handleChange: z,
|
|
135
135
|
handleSubmit: W,
|
|
136
|
-
setFieldValue:
|
|
136
|
+
setFieldValue: n,
|
|
137
137
|
resetSwapForm: q,
|
|
138
138
|
setFieldTouched: G
|
|
139
139
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=(e,t)=>{const[s,c]=n.useState(e),o=()=>{const r=setTimeout(()=>c(e),t);return()=>clearTimeout(r)};return n.useEffect(o,[e,t]),s};exports.useDebounce=u;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useState as r, useEffect as n } from "react";
|
|
2
|
-
const
|
|
3
|
-
const [
|
|
2
|
+
const a = (e, t) => {
|
|
3
|
+
const [s, c] = r(e);
|
|
4
4
|
return n(() => {
|
|
5
|
-
const
|
|
6
|
-
return () => clearTimeout(
|
|
7
|
-
}, [t]),
|
|
5
|
+
const o = setTimeout(() => c(e), t);
|
|
6
|
+
return () => clearTimeout(o);
|
|
7
|
+
}, [e, t]), s;
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
a as useDebounce
|
|
11
11
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),A=require("./useAccount.js"),m=require("./useBridgeApiChainId.js"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),A=require("./useAccount.js"),m=require("./useBridgeApiChainId.js"),v=require("../../constants/index.js"),S=require("../context/useWeb3App.js"),j=require("../queries/useGetAllTokens.query.js"),B=require("../queries/useGetMvxTokensBalances.query.js"),h=require("../queries/useGetNonMvxTokensBalances.query.js"),w=({mvxAddress:u,mvxApiURL:f,refetchTrigger:d})=>{const l=m.useBridgeApiChainId(),T=A.useAccount(),{nativeAuthToken:g,bridgeOnly:I}=S.useWeb3App(),_=B.useInvalidateMvxTokensBalancesQuery(),k=h.useInvalidateEvmTokensBalances(),{data:s,isLoading:L,isError:M}=j.useGetAllTokensQuery({nativeAuthToken:g,bridgeOnly:I}),o=a.useMemo(()=>s==null?void 0:s.filter(e=>!v.MVX_CHAIN_IDS.includes(e.chainId.toString())&&e.chainId.toLowerCase()!=="fiat"),[s]),r=a.useMemo(()=>s==null?void 0:s.filter(e=>v.MVX_CHAIN_IDS.includes(e.chainId.toString())),[s]),{data:t,isLoading:q,isError:b}=h.useGetNonMvxTokensBalancesQuery({tokens:o??[],chainId:l}),{data:i,isLoading:E,isError:C}=B.useGetMvxTokensBalancesQuery({tokens:r??[],mvxAddress:u,apiURL:f}),p=a.useMemo(()=>r==null?void 0:r.map(e=>{const n=i==null?void 0:i.find(c=>c.address.toLowerCase()===e.address.toLowerCase());return n?{...n,balance:n.balance.toString()}:{...e,balance:"0"}}),[r,i]),y=a.useMemo(()=>o==null?void 0:o.map(e=>{const n=t==null?void 0:t.find(c=>c.address.toLowerCase()===e.address.toLowerCase()&&c.chainId.toLowerCase()===e.chainId.toLowerCase());return n?{...n,balance:n.balance.toString()}:{...e,balance:"0"}}),[o,t]);return a.useEffect(()=>{u&&_()},[d,u,_]),a.useEffect(()=>{T.address&&k()},[d,l,T.address,k]),{isTokensLoading:L,isTokensError:M,isLoadingEvmTokensBalances:q,isErrorEvmTokensBalances:b,evmTokensWithBalances:y,isLoadingMvxTokensBalances:E,isErrorMvxTokensBalances:C,mvxTokensWithBalances:p,tokens:s}};exports.useFetchTokens=w;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { useMemo as c, useEffect as
|
|
1
|
+
import { useMemo as c, useEffect as T } from "react";
|
|
2
2
|
import { useAccount as y } from "./useAccount.mjs";
|
|
3
3
|
import { useBridgeApiChainId as A } from "./useBridgeApiChainId.mjs";
|
|
4
|
-
import { MVX_CHAIN_IDS as
|
|
4
|
+
import { MVX_CHAIN_IDS as L } from "../../constants/index.mjs";
|
|
5
5
|
import { useWeb3App as Q } from "../context/useWeb3App.mjs";
|
|
6
6
|
import { useGetAllTokensQuery as S } from "../queries/useGetAllTokens.query.mjs";
|
|
7
7
|
import { useInvalidateMvxTokensBalancesQuery as x, useGetMvxTokensBalancesQuery as N } from "../queries/useGetMvxTokensBalances.query.mjs";
|
|
8
8
|
import { useInvalidateEvmTokensBalances as W, useGetNonMvxTokensBalancesQuery as G } from "../queries/useGetNonMvxTokensBalances.query.mjs";
|
|
9
9
|
const X = ({
|
|
10
10
|
mvxAddress: d,
|
|
11
|
-
mvxApiURL:
|
|
11
|
+
mvxApiURL: B,
|
|
12
12
|
refetchTrigger: u
|
|
13
13
|
}) => {
|
|
14
|
-
const l = A(), m = y(), { nativeAuthToken:
|
|
14
|
+
const l = A(), m = y(), { nativeAuthToken: v, bridgeOnly: g } = Q(), f = x(), p = W(), {
|
|
15
15
|
data: a,
|
|
16
16
|
isLoading: h,
|
|
17
17
|
isError: k
|
|
18
18
|
} = S({
|
|
19
|
-
nativeAuthToken:
|
|
20
|
-
bridgeOnly:
|
|
19
|
+
nativeAuthToken: v,
|
|
20
|
+
bridgeOnly: g
|
|
21
21
|
}), s = c(
|
|
22
22
|
() => a == null ? void 0 : a.filter(
|
|
23
|
-
(e) => !
|
|
23
|
+
(e) => !L.includes(e.chainId.toString()) && e.chainId.toLowerCase() !== "fiat"
|
|
24
24
|
),
|
|
25
25
|
[a]
|
|
26
26
|
), o = c(
|
|
27
27
|
() => a == null ? void 0 : a.filter(
|
|
28
|
-
(e) =>
|
|
28
|
+
(e) => L.includes(e.chainId.toString())
|
|
29
29
|
),
|
|
30
30
|
[a]
|
|
31
31
|
), {
|
|
@@ -42,7 +42,7 @@ const X = ({
|
|
|
42
42
|
} = N({
|
|
43
43
|
tokens: o ?? [],
|
|
44
44
|
mvxAddress: d,
|
|
45
|
-
apiURL:
|
|
45
|
+
apiURL: B
|
|
46
46
|
}), M = c(() => o == null ? void 0 : o.map((e) => {
|
|
47
47
|
const n = i == null ? void 0 : i.find(
|
|
48
48
|
(t) => t.address.toLowerCase() === e.address.toLowerCase()
|
|
@@ -66,11 +66,16 @@ const X = ({
|
|
|
66
66
|
balance: "0"
|
|
67
67
|
};
|
|
68
68
|
}), [s, r]);
|
|
69
|
-
return
|
|
70
|
-
d &&
|
|
71
|
-
}, [u, d]),
|
|
72
|
-
m.address &&
|
|
73
|
-
}, [
|
|
69
|
+
return T(() => {
|
|
70
|
+
d && f();
|
|
71
|
+
}, [u, d, f]), T(() => {
|
|
72
|
+
m.address && p();
|
|
73
|
+
}, [
|
|
74
|
+
u,
|
|
75
|
+
l,
|
|
76
|
+
m.address,
|
|
77
|
+
p
|
|
78
|
+
]), {
|
|
74
79
|
isTokensLoading: h,
|
|
75
80
|
isTokensError: k,
|
|
76
81
|
isLoadingEvmTokensBalances: E,
|