@multiversx/sdk-dapp-liquidity 2.2.0 → 2.3.0-alpha.0

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.
@@ -1,41 +1,42 @@
1
- import { jsx as r, Fragment as di, jsxs as s } from "react/jsx-runtime";
2
- import { formatAmount as mi } from "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
3
- import { useAppKitNetwork as pi } from "@reown/appkit/react";
4
- import ui from "lodash/debounce";
5
- import { useRef as hi, useState as C, useMemo as m, useCallback as p, useEffect as I } from "react";
6
- import { toast as he } from "react-toastify";
7
- import { useBridgeTokenSelection as fi } from "./hooks/useBridgeTokenSelection.mjs";
8
- import { MVX_CHAIN_IDS as fe } from "../../../constants/index.mjs";
9
- import { getApiURL as gi } from "../../../helpers/getApiURL.mjs";
1
+ import { jsx as r, Fragment as pi, jsxs as s } from "react/jsx-runtime";
2
+ import { formatAmount as ui } from "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
3
+ import { useAppKitNetwork as hi } from "@reown/appkit/react";
4
+ import fi from "lodash/debounce";
5
+ import { useRef as gi, useState as C, useMemo as m, useCallback as d, useEffect as I } from "react";
6
+ import { toast as fe } from "react-toastify";
7
+ import { useBridgeTokenSelection as qi } from "./hooks/useBridgeTokenSelection.mjs";
8
+ import { MVX_CHAIN_IDS as ge } from "../../../constants/index.mjs";
9
+ import { getApiURL as vi } from "../../../helpers/getApiURL.mjs";
10
10
  import "../../constants/index.mjs";
11
- import { safeImageUrl as S } from "../../../helpers/safeImageUrl.mjs";
11
+ import { safeImageUrl as T } from "../../../helpers/safeImageUrl.mjs";
12
12
  import "@solana/web3.js";
13
13
  import "bitcoinjs-lib";
14
14
  import "viem";
15
- import { ChainType as qi } from "../../../types/chainType.mjs";
16
- import { ProviderType as bi } from "../../../types/providerType.mjs";
17
- import { useWeb3App as ge } from "../../context/useWeb3App.mjs";
18
- import { sameBridgeApiChainId as T, toBridgeApiChainId as vi } from "../../helpers/resolveBridgeApiChainId.mjs";
15
+ import { ChainType as bi } from "../../../types/chainType.mjs";
16
+ import { ProviderType as Ci } from "../../../types/providerType.mjs";
17
+ import { useWeb3App as qe } from "../../context/useWeb3App.mjs";
18
+ import { sameBridgeApiChainId as ee, toBridgeApiChainId as Ii } from "../../helpers/resolveBridgeApiChainId.mjs";
19
19
  import "yup";
20
20
  import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
21
21
  import "bignumber.js";
22
- import { useAccount as Ci } from "../../hooks/useAccount.mjs";
22
+ import { useAccount as xi } from "../../hooks/useAccount.mjs";
23
23
  import "axios";
24
- import { useBridgeFormik as Ii, BridgeFormikValuesEnum as F } from "../../hooks/useBridgeFormik.mjs";
25
- import { useFetchBridgeData as xi } from "../../hooks/useFetchBridgeData.mjs";
26
- import { useBridgeApiChainId as Ai } from "../../hooks/useBridgeApiChainId.mjs";
24
+ import { useBridgeFormik as Ai, BridgeFormikValuesEnum as F } from "../../hooks/useBridgeFormik.mjs";
25
+ import { useFetchBridgeData as Ni } from "../../hooks/useFetchBridgeData.mjs";
26
+ import { useBridgeApiChainId as Bi } from "../../hooks/useBridgeApiChainId.mjs";
27
27
  import "@tanstack/react-query";
28
- import { useGetChainId as Bi } from "../../hooks/useGetChainId.mjs";
29
- import { useSendTransactions as Ni } from "../../hooks/useSendTransactions.mjs";
28
+ import { useGetChainId as wi } from "../../hooks/useGetChainId.mjs";
29
+ import { useSendTransactions as yi } from "../../hooks/useSendTransactions.mjs";
30
30
  import "@reown/appkit-adapter-solana/react";
31
31
  import "wagmi";
32
32
  import "@reown/appkit-controllers";
33
- import { useInvalidateHistoryQuery as wi } from "../../queries/useGetHistory.query.mjs";
34
- import { useGetRateMutation as yi } from "../../queries/useGetRate.mutation.mjs";
35
- import { mxClsx as qe } from "../../utils/mxClsx.mjs";
33
+ import { useNamespaceAddress as Ei } from "../../hooks/useNamespaceAddress.mjs";
34
+ import { useInvalidateHistoryQuery as Di } from "../../queries/useGetHistory.query.mjs";
35
+ import { useGetRateMutation as Oi } from "../../queries/useGetRate.mutation.mjs";
36
+ import { mxClsx as ve } from "../../utils/mxClsx.mjs";
36
37
  import { AmountCard as be } from "../AmountCard/AmountCard.mjs";
37
- import { AmountInput as ve } from "../AmountInput/AmountInput.mjs";
38
- import { MxButton as Di } from "../base/MxButton/MxButton.mjs";
38
+ import { AmountInput as Ce } from "../AmountInput/AmountInput.mjs";
39
+ import { MxButton as Mi } from "../base/MxButton/MxButton.mjs";
39
40
  import "../base/MxCard/MxCard.mjs";
40
41
  import "../base/MxLink/MxLink.mjs";
41
42
  import "../base/MxSearch/MxSearch.mjs";
@@ -45,247 +46,248 @@ import "@headlessui/react";
45
46
  import "react-dom";
46
47
  import "react-popper";
47
48
  import "../base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs";
48
- import { BridgeHistory as Ei } from "../BridgeHistory/BridgeHistory.mjs";
49
- import { BridgeConnectButton as Oi } from "../Connect/BridgeConnectButton.mjs";
50
- import { MvxConnectButton as Mi } from "../Connect/MvxConnectButton.mjs";
51
- import { BridgeAccountDisplay as Ri } from "../Connect/BridgeAccountDisplay.mjs";
52
- import { MvxAccountDisplay as Vi } from "../Connect/MvxAccountDisplay.mjs";
53
- import { ToggleDirection as Li } from "../ToggleDirection/ToggleDirection.mjs";
54
- import { TokenSelector as Ce } from "../TokenSelector/TokenSelector.mjs";
49
+ import { BridgeHistory as Ri } from "../BridgeHistory/BridgeHistory.mjs";
50
+ import { BridgeConnectButton as Vi } from "../Connect/BridgeConnectButton.mjs";
51
+ import { MvxConnectButton as Li } from "../Connect/MvxConnectButton.mjs";
52
+ import { BridgeAccountDisplay as Fi } from "../Connect/BridgeAccountDisplay.mjs";
53
+ import { MvxAccountDisplay as Ui } from "../Connect/MvxAccountDisplay.mjs";
54
+ import { ToggleDirection as ji } from "../ToggleDirection/ToggleDirection.mjs";
55
+ import { TokenSelector as Ie } from "../TokenSelector/TokenSelector.mjs";
55
56
  let U;
56
- const Ft = ({
57
- mvxChainId: D,
58
- mvxAddress: o,
59
- username: Ie,
60
- callbackRoute: xe = "/",
61
- firstTokenIdentifier: Ae,
57
+ const Wt = ({
58
+ mvxChainId: E,
59
+ mvxAddress: a,
60
+ username: xe,
61
+ callbackRoute: Ae = "/",
62
+ firstTokenIdentifier: Ne,
62
63
  secondTokenIdentifier: Be,
63
- firstTokenAmount: E,
64
+ firstTokenAmount: D,
64
65
  secondTokenAmount: x,
65
- refetchTrigger: Ne,
66
- showHistory: we,
67
- forcedDestinationTokenSymbol: ye,
68
- onSuccessfullySentTransaction: u,
66
+ refetchTrigger: we,
67
+ showHistory: ye,
68
+ forcedDestinationTokenSymbol: Ee,
69
+ onSuccessfullySentTransaction: p,
69
70
  onFailedSentTransaction: f,
70
71
  onHistoryClose: O,
71
- onMvxConnect: ee,
72
+ onMvxConnect: ie,
72
73
  onMvxDisconnect: De,
73
- onNavigate: Ee,
74
- onChangeDirection: Oe
74
+ onNavigate: Oe,
75
+ onChangeDirection: Me
75
76
  }) => {
76
- var pe, ue;
77
- const Me = hi(null), [j, Re] = C(!1), [Ve, Le] = C(1), [P, ie] = C(0), [te, re] = C([]), l = Ci(), { switchNetwork: ne } = pi(), oe = wi(), {
78
- options: ae,
77
+ var ue, he;
78
+ const Re = gi(null), [j, Ve] = C(!1), [Le, Fe] = C(1), [P, te] = C(0), [re, oe] = C([]), u = xi(), { switchNetwork: ne } = hi(), ae = Di(), {
79
+ options: se,
79
80
  supportedChains: A,
80
81
  nativeAuthToken: W,
81
- bridgeOnly: Fe
82
- } = ge(), k = Bi(), se = Ai(), le = Ni(), {
83
- signMvxTransactions: G,
84
- resetMvxTransactionHash: Q,
85
- latestMvxTransactionHash: _
86
- } = ge(), {
87
- evmTokensWithBalances: Ue,
88
- mvxTokensWithBalances: je,
89
- isTokensLoading: Pe,
90
- isLoadingEvmTokensBalances: We,
91
- isLoadingMvxTokensBalances: ke,
92
- chains: B = [],
93
- isChainsLoading: Ge
94
- } = xi({
95
- refetchTrigger: Ne,
96
- mvxAddress: o,
97
- mvxApiURL: ae.mvxApiURL
98
- }), $ = Pe || We || ke || Ge, Qe = m(() => A.find((e) => T(e.id, k)), [k, A]), g = m(() => B.find(
99
- (e) => e.chainId.toString() === D.toString()
100
- ), [k, B]), {
101
- mutate: _e,
102
- data: n,
103
- isPending: N,
82
+ bridgeOnly: Ue
83
+ } = qe(), G = wi(), le = Bi(), ce = yi(), {
84
+ signMvxTransactions: Q,
85
+ resetMvxTransactionHash: _,
86
+ latestMvxTransactionHash: $
87
+ } = qe(), {
88
+ evmTokensWithBalances: je,
89
+ mvxTokensWithBalances: Pe,
90
+ isTokensLoading: We,
91
+ isLoadingEvmTokensBalances: Ge,
92
+ isLoadingMvxTokensBalances: Qe,
93
+ chains: N = [],
94
+ isChainsLoading: _e
95
+ } = Ni({
96
+ refetchTrigger: we,
97
+ mvxAddress: a,
98
+ mvxApiURL: se.mvxApiURL
99
+ }), z = We || Ge || Qe || _e, $e = m(() => A.find((e) => ee(e.id, G)), [G, A]), g = m(() => N.find(
100
+ (e) => e.chainId.toString() === E.toString()
101
+ ), [G, N]), {
102
+ mutate: ze,
103
+ data: o,
104
+ isPending: B,
104
105
  error: q
105
- } = yi(), w = ((pe = q == null ? void 0 : q.response) == null ? void 0 : pe.status) === 400 ? (ue = q == null ? void 0 : q.response) == null ? void 0 : ue.data.message : void 0, $e = p(
106
+ } = Oi(), w = ((ue = q == null ? void 0 : q.response) == null ? void 0 : ue.status) === 400 ? (he = q == null ? void 0 : q.response) == null ? void 0 : he.data.message : void 0, He = d(
106
107
  (e) => {
107
- const v = A.find(
108
- (ci) => T(ci.id, e.id)
108
+ const b = A.find(
109
+ (di) => ee(di.id, e.id)
109
110
  );
110
- v && ne(v);
111
+ b && ne(b);
111
112
  },
112
113
  [A, ne]
113
114
  ), {
114
115
  firstToken: i,
115
116
  secondToken: t,
116
- fromOptions: ze,
117
- toOptions: He,
117
+ fromOptions: Ke,
118
+ toOptions: Xe,
118
119
  selectedChainOption: y,
119
- onChangeFirstSelect: Ke,
120
- onChangeSecondSelect: Xe,
121
- handleChangeDirection: Ye
122
- } = fi({
123
- chains: B,
124
- activeChain: Qe,
120
+ onChangeFirstSelect: Ye,
121
+ onChangeSecondSelect: ke,
122
+ handleChangeDirection: Je
123
+ } = qi({
124
+ chains: N,
125
+ activeChain: $e,
125
126
  sdkChains: A,
126
- switchNetwork: $e,
127
- fromTokens: je,
128
- toTokens: Ue,
129
- firstTokenIdentifier: Ae,
127
+ switchNetwork: He,
128
+ fromTokens: Pe,
129
+ toTokens: je,
130
+ firstTokenIdentifier: Ne,
130
131
  secondTokenIdentifier: Be,
131
- forcedDestinationTokenSymbol: ye,
132
- isTokensLoading: $,
133
- mvxChainId: D,
134
- callbackRoute: xe,
135
- onNavigate: Ee
136
- }), Je = () => {
137
- Ye(), Oe();
138
- }, [c, Ze] = C(E ?? ""), [M, R] = C(x ?? ""), Se = m(() => i ? fe.includes(i.chainId.toString()) : !1, [i == null ? void 0 : i.chainId]), Te = m(() => t ? fe.includes(t.chainId.toString()) : !1, [t == null ? void 0 : t.chainId]), a = m(() => t ? B.find(
139
- (e) => T(e.chainId, t.chainId)
140
- ) ?? y : y, [t == null ? void 0 : t.chainId, B, y]), V = m(
141
- () => vi(t == null ? void 0 : t.chainId) ?? se,
142
- [t == null ? void 0 : t.chainId, se]
143
- ), ce = l.address, de = l.isConnected && !!ce, z = c !== "" && M !== "", H = p(
144
- ui(async (e) => {
145
- !e || !Number(e) || !l.address || !(i != null && i.address) || !(t != null && t.address) || !y || !V || _e({
132
+ forcedDestinationTokenSymbol: Ee,
133
+ isTokensLoading: z,
134
+ mvxChainId: E,
135
+ callbackRoute: Ae,
136
+ onNavigate: Oe
137
+ }), Ze = () => {
138
+ Je(), Me();
139
+ }, [l, Se] = C(D ?? ""), [M, R] = C(x ?? ""), Te = m(() => i ? ge.includes(i.chainId.toString()) : !1, [i == null ? void 0 : i.chainId]), ei = m(() => t ? ge.includes(t.chainId.toString()) : !1, [t == null ? void 0 : t.chainId]), n = m(() => t ? N.find(
140
+ (e) => ee(e.chainId, t.chainId)
141
+ ) ?? y : y, [t == null ? void 0 : t.chainId, N, y]), V = m(
142
+ () => Ii(t == null ? void 0 : t.chainId) ?? le,
143
+ [t == null ? void 0 : t.chainId, le]
144
+ ), ii = Ei(n == null ? void 0 : n.chainType), me = u.address, de = u.isConnected && !!me, H = l !== "" && M !== "", K = d(
145
+ fi(async (e) => {
146
+ !e || !Number(e) || !u.address || !(i != null && i.address) || !(t != null && t.address) || !y || !V || ze({
146
147
  nativeAuthToken: W ?? "",
147
148
  body: {
148
149
  tokenIn: i.address,
149
150
  amountIn: e,
150
- fromChainId: D,
151
+ fromChainId: E,
151
152
  tokenOut: t.address,
152
153
  toChainId: V
153
154
  }
154
155
  });
155
156
  }, 500),
156
157
  [
157
- l.address,
158
+ u.address,
158
159
  V,
159
160
  i == null ? void 0 : i.address,
160
161
  t == null ? void 0 : t.address,
161
162
  y
162
163
  ]
163
- ), d = p((e) => {
164
- Ze(() => e);
165
- }, []), b = p((e) => {
164
+ ), c = d((e) => {
165
+ Se(() => e);
166
+ }, []), v = d((e) => {
166
167
  R(() => e);
167
- }, []), ei = p(() => {
168
+ }, []), ti = d(() => {
168
169
  O == null || O();
169
- }, [O]), ii = p(() => {
170
- const e = mi({
170
+ }, [O]), ri = d(() => {
171
+ const e = ui({
171
172
  decimals: i == null ? void 0 : i.decimals,
172
173
  input: (i == null ? void 0 : i.balance) ?? "0",
173
174
  addCommas: !1,
174
175
  digits: 4
175
176
  });
176
- h.setFieldValue("firstAmount", e), d(e);
177
- }, [i == null ? void 0 : i.balance, i == null ? void 0 : i.decimals, d]), ti = p(
177
+ h.setFieldValue("firstAmount", e), c(e);
178
+ }, [i == null ? void 0 : i.balance, i == null ? void 0 : i.decimals, c]), oi = d(
178
179
  async (e) => {
179
- d(""), b(""), oe(), oe(), u == null || u(e);
180
+ c(""), v(""), ae(), ae(), p == null || p(e);
180
181
  },
181
182
  [
182
- d,
183
- b,
184
- u
183
+ c,
184
+ v,
185
+ p
185
186
  ]
186
- ), ri = p(
187
+ ), ni = d(
187
188
  async ({ transactions: e }) => {
188
- ie(() => e.length);
189
+ te(() => e.length);
189
190
  try {
190
- if (!G)
191
+ if (!Q)
191
192
  throw new Error("signMvxTransactions function is not provided");
192
- await G(e), re(e);
193
- } catch (v) {
194
- console.error(v), he.dismiss(), he.error("Transaction cancelled"), f == null || f("Transaction cancelled"), ie(0), oi(), d(""), b("");
193
+ await Q(e), oe(e);
194
+ } catch (b) {
195
+ console.error(b), fe.dismiss(), fe.error("Transaction cancelled"), f == null || f("Transaction cancelled"), te(0), si(), c(""), v("");
195
196
  }
196
197
  },
197
198
  [
198
- ce,
199
- d,
200
- b,
199
+ me,
200
+ c,
201
+ v,
201
202
  W,
202
- ti,
203
- G
203
+ oi,
204
+ Q
204
205
  ]
205
206
  ), {
206
207
  formik: h,
207
- firstAmountError: K,
208
- secondAmountError: X,
209
- fromChainError: Y,
208
+ firstAmountError: X,
209
+ secondAmountError: Y,
210
+ fromChainError: k,
210
211
  senderAddressError: J,
211
212
  receiverAddressError: Z,
213
+ confirmRateError: S,
212
214
  handleBlur: L,
213
- handleChange: me,
214
- handleSubmit: ni,
215
- resetSwapForm: oi
216
- } = Ii({
217
- isMvxConnected: !!o,
218
- rate: n,
219
- sender: o ?? "",
220
- receiver: l.address ?? "",
215
+ handleChange: pe,
216
+ handleSubmit: ai,
217
+ resetSwapForm: si
218
+ } = Ai({
219
+ isMvxConnected: !!a,
220
+ rate: o,
221
+ sender: a ?? "",
222
+ receiver: ii ?? "",
221
223
  firstToken: i,
222
- firstAmount: c,
223
- fromChainId: D,
224
+ firstAmount: l,
225
+ fromChainId: E,
224
226
  toChainId: V,
225
227
  secondToken: t,
226
228
  secondAmount: M,
227
- setForceRefetchRate: Le,
228
- senderChainType: qi.mvx,
229
- receiverChainType: a == null ? void 0 : a.chainType,
230
- onSubmit: ri
231
- }), ai = !!(K || X || Y || w || J || Z), si = m(() => c !== "" ? w ?? K : void 0, [K, c, w]), li = m(() => M !== "" ? Y ?? X : void 0, [Y, X, M]);
232
- return I(() => (c || R(""), H(c), U && clearInterval(U), U = setInterval(() => {
233
- H(c);
234
- }, 50 * 1e3), () => clearInterval(U)), [c, Ve, H]), I(() => {
235
- n != null && n.amountOut && (h.setFieldValue(F.secondAmount, n.amountOut), R(n.amountOut));
236
- }, [n == null ? void 0 : n.amountOut]), I(() => {
229
+ setForceRefetchRate: Fe,
230
+ senderChainType: bi.mvx,
231
+ receiverChainType: n == null ? void 0 : n.chainType,
232
+ onSubmit: ni
233
+ }), li = !!(X || Y || k || w || J || Z || S), ci = m(() => l !== "" ? w ?? X : void 0, [X, l, w]), mi = m(() => M !== "" ? k ?? Y : void 0, [k, Y, M]);
234
+ return I(() => (l || R(""), K(l), U && clearInterval(U), U = setInterval(() => {
235
+ K(l);
236
+ }, 50 * 1e3), () => clearInterval(U)), [l, Le, K]), I(() => {
237
+ o != null && o.amountOut && (h.setFieldValue(F.secondAmount, o.amountOut), R(o.amountOut));
238
+ }, [o == null ? void 0 : o.amountOut]), I(() => {
237
239
  w && (h.setFieldValue(F.secondAmount, "0"), R("0"));
238
240
  }, [w]), I(() => {
239
- E && (h.setFieldValue(
241
+ D && (h.setFieldValue(
240
242
  F.firstAmount,
241
- E
242
- ), d(E));
243
+ D
244
+ ), c(D));
243
245
  }, []), I(() => {
244
246
  x && (h.setFieldValue(
245
247
  F.secondAmount,
246
248
  x
247
- ), b(x));
249
+ ), v(x));
248
250
  }, [x]), I(() => {
249
- if (_)
251
+ if ($)
250
252
  try {
251
- const e = _;
252
- le({
253
- transactions: te.map((v) => ({
254
- ...v,
253
+ const e = $;
254
+ ce({
255
+ transactions: re.map((b) => ({
256
+ ...b,
255
257
  txHash: e,
256
- receiver: l.address
258
+ receiver: u.address
257
259
  })),
258
- provider: (n == null ? void 0 : n.provider) ?? bi.None,
259
- url: gi() ?? "",
260
+ provider: (o == null ? void 0 : o.provider) ?? Ci.None,
261
+ url: vi() ?? "",
260
262
  token: W ?? ""
261
- }), u == null || u([e]);
263
+ }), p == null || p([e]);
262
264
  } catch (e) {
263
265
  console.error("Error while sending transactions:", e), f == null || f(
264
266
  "An error occurred while sending the transaction"
265
267
  );
266
268
  return;
267
269
  } finally {
268
- Q == null || Q(), re([]);
270
+ _ == null || _(), oe([]);
269
271
  }
270
272
  }, [
271
- _,
272
- te,
273
- n == null ? void 0 : n.provider,
274
- le
275
- ]), /* @__PURE__ */ r(di, { children: /* @__PURE__ */ s(
273
+ $,
274
+ re,
275
+ o == null ? void 0 : o.provider,
276
+ ce
277
+ ]), /* @__PURE__ */ r(pi, { children: /* @__PURE__ */ s(
276
278
  "form",
277
279
  {
278
- ref: Me,
280
+ ref: Re,
279
281
  noValidate: !0,
280
282
  className: "liq-flex liq-flex-col liq-gap-1 liq-relative",
281
283
  autoComplete: "off",
282
- onSubmit: ni,
284
+ onSubmit: ai,
283
285
  children: [
284
- we && /* @__PURE__ */ r(Ei, { mvxAddress: o, onClose: ei }),
286
+ ye && /* @__PURE__ */ r(Ri, { mvxAddress: a, onClose: ti }),
285
287
  /* @__PURE__ */ s(
286
288
  be,
287
289
  {
288
- className: qe(
290
+ className: ve(
289
291
  "liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6",
290
292
  {
291
293
  "liq-pointer-events-none": j,
@@ -296,58 +298,58 @@ const Ft = ({
296
298
  /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
297
299
  /* @__PURE__ */ r("span", { children: "From" }),
298
300
  /* @__PURE__ */ r(
299
- Vi,
301
+ Ui,
300
302
  {
301
- accountAddress: o,
302
- chainIcon: S(g == null ? void 0 : g.pngUrl),
303
- username: Ie,
304
- accountExplorerUrl: `${ae.mvxExplorerAddress}/accounts/${o}`,
303
+ accountAddress: a,
304
+ chainIcon: T(g == null ? void 0 : g.pngUrl),
305
+ username: xe,
306
+ accountExplorerUrl: `${se.mvxExplorerAddress}/accounts/${a}`,
305
307
  showTag: !0,
306
308
  onDisconnect: De,
307
- onConnect: ee
309
+ onConnect: ie
308
310
  }
309
311
  )
310
312
  ] }),
311
313
  J && /* @__PURE__ */ r("div", { className: "liq-text-red-400 liq-text-xs liq-mt-1", children: J }),
312
314
  /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
313
315
  /* @__PURE__ */ r(
314
- ve,
316
+ Ce,
315
317
  {
316
318
  inputName: "firstAmount",
317
319
  inputValue: h.values.firstAmount,
318
- amountError: si,
320
+ amountError: ci,
319
321
  disabled: !1,
320
- onInputDebounceChange: d,
321
- onInputChange: me,
322
+ onInputDebounceChange: c,
323
+ onInputChange: pe,
322
324
  onBlur: L
323
325
  }
324
326
  ),
325
327
  /* @__PURE__ */ r(
326
- Ce,
328
+ Ie,
327
329
  {
328
330
  name: "firstToken",
329
- disabled: N,
330
- options: ze,
331
- areOptionsLoading: $,
332
- isMvxSelector: Se,
331
+ disabled: B,
332
+ options: Ke,
333
+ areOptionsLoading: z,
334
+ isMvxSelector: Te,
333
335
  isDestination: !1,
334
336
  color: "neutral-850",
335
- onChange: Ke,
337
+ onChange: Ye,
336
338
  onBlur: L,
337
- onMaxBtnClick: ii,
339
+ onMaxBtnClick: ri,
338
340
  selectedOption: i,
339
- onTokenSelectorDisplay: (e) => Re(e)
341
+ onTokenSelectorDisplay: (e) => Ve(e)
340
342
  }
341
343
  )
342
344
  ] })
343
345
  ]
344
346
  }
345
347
  ),
346
- /* @__PURE__ */ r("div", { className: "liq-absolute liq-left-[6%] liq-top-[40%] -liq-mt-1 liq-z-10", children: Fe && /* @__PURE__ */ r(Li, { onChangeDirection: Je }) }),
348
+ /* @__PURE__ */ r("div", { className: "liq-absolute liq-left-[6%] liq-top-[40%] -liq-mt-1 liq-z-10", children: Ue && /* @__PURE__ */ r(ji, { onChangeDirection: Ze }) }),
347
349
  /* @__PURE__ */ s(
348
350
  be,
349
351
  {
350
- className: qe(
352
+ className: ve(
351
353
  "liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6",
352
354
  {
353
355
  "liq-pointer-events-none": j
@@ -357,38 +359,39 @@ const Ft = ({
357
359
  /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
358
360
  /* @__PURE__ */ r("span", { children: "To" }),
359
361
  /* @__PURE__ */ r(
360
- Ri,
362
+ Fi,
361
363
  {
362
- disabled: N,
363
- activeChain: a
364
+ disabled: B,
365
+ activeChain: n
364
366
  }
365
367
  )
366
368
  ] }),
367
369
  Z && /* @__PURE__ */ r("div", { className: "liq-text-red-400 liq-text-xs liq-mt-1", children: Z }),
370
+ S && /* @__PURE__ */ r("div", { className: "liq-text-red-400 liq-text-xs liq-mt-1", children: S }),
368
371
  /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
369
372
  /* @__PURE__ */ r(
370
- ve,
373
+ Ce,
371
374
  {
372
375
  inputName: "secondAmount",
373
376
  inputValue: h.values.secondAmount,
374
- amountError: li,
377
+ amountError: mi,
375
378
  disabled: !1,
376
- onInputDebounceChange: b,
377
- onInputChange: me,
379
+ onInputDebounceChange: v,
380
+ onInputChange: pe,
378
381
  onBlur: L
379
382
  }
380
383
  ),
381
384
  /* @__PURE__ */ r(
382
- Ce,
385
+ Ie,
383
386
  {
384
387
  name: "secondToken",
385
- disabled: N,
388
+ disabled: B,
386
389
  omitDisableClass: !0,
387
- options: He,
388
- areOptionsLoading: $,
389
- isMvxSelector: Te,
390
+ options: Xe,
391
+ areOptionsLoading: z,
392
+ isMvxSelector: ei,
390
393
  color: "neutral-850",
391
- onChange: Xe,
394
+ onChange: ke,
392
395
  onBlur: L,
393
396
  selectedOption: t
394
397
  }
@@ -398,49 +401,49 @@ const Ft = ({
398
401
  }
399
402
  ),
400
403
  /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-justify-center", children: [
401
- !o && /* @__PURE__ */ r(
402
- Mi,
404
+ !a && /* @__PURE__ */ r(
405
+ Li,
403
406
  {
404
- mvxAccountAddress: o,
405
- icon: S(g == null ? void 0 : g.pngUrl),
406
- onClick: ee
407
+ mvxAccountAddress: a,
408
+ icon: T(g == null ? void 0 : g.pngUrl),
409
+ onClick: ie
407
410
  }
408
411
  ),
409
- o && !de && /* @__PURE__ */ r(
410
- Oi,
412
+ a && !de && /* @__PURE__ */ r(
413
+ Vi,
411
414
  {
412
415
  className: "liq-w-full liq-rounded-xl liq-bg-neutral-850/50 liq-px-8 liq-py-3 liq-font-semibold liq-text-primary-200 liq-transition-colors liq-duration-200 hover:enabled:liq-bg-primary-700/80 disabled:liq-opacity-50",
413
- disabled: N,
414
- activeChain: a
416
+ disabled: B,
417
+ activeChain: n
415
418
  }
416
419
  ),
417
- o && de && /* @__PURE__ */ s(
418
- Di,
420
+ a && de && /* @__PURE__ */ s(
421
+ Mi,
419
422
  {
420
423
  "data-testid": "submit-button",
421
424
  type: "submit",
422
425
  variant: "neutral-850",
423
426
  className: "liq-w-full disabled:liq-bg-neutral-850/50 liq-py-3 hover:enabled:liq-bg-primary !liq-text-primary-200",
424
- disabled: !z || N || !o || !l.address || ai,
427
+ disabled: !H || B || !a || !u.address || li,
425
428
  children: [
426
- z && /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
429
+ H && /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
427
430
  /* @__PURE__ */ r("div", { children: "Transfer to " }),
428
431
  /* @__PURE__ */ r(
429
432
  "img",
430
433
  {
431
- src: S(a == null ? void 0 : a.pngUrl),
434
+ src: T(n == null ? void 0 : n.pngUrl),
432
435
  alt: "",
433
436
  className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
434
437
  }
435
438
  ),
436
- /* @__PURE__ */ r("div", { children: a == null ? void 0 : a.networkName })
439
+ /* @__PURE__ */ r("div", { children: n == null ? void 0 : n.networkName })
437
440
  ] }),
438
- !z && /* @__PURE__ */ r("span", { className: "liq-text-neutral-100", children: "Enter amount" })
441
+ !H && /* @__PURE__ */ r("span", { className: "liq-text-neutral-100", children: "Enter amount" })
439
442
  ]
440
443
  }
441
444
  )
442
445
  ] }),
443
- l.address && P > 0 && /* @__PURE__ */ r("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ s("div", { children: [
446
+ u.address && P > 0 && /* @__PURE__ */ r("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ s("div", { children: [
444
447
  "You will be asked to sign ",
445
448
  P,
446
449
  " ",
@@ -453,5 +456,5 @@ const Ft = ({
453
456
  ) });
454
457
  };
455
458
  export {
456
- Ft as Transfer
459
+ Wt as Transfer
457
460
  };