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

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";
1
+ import { jsx as r, Fragment as pi, jsxs as l } 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 d, useCallback as p, useEffect as I } from "react";
6
6
  import { toast as he } from "react-toastify";
7
- import { useBridgeTokenSelection as fi } from "./hooks/useBridgeTokenSelection.mjs";
7
+ import { useBridgeTokenSelection as qi } from "./hooks/useBridgeTokenSelection.mjs";
8
8
  import { MVX_CHAIN_IDS as fe } from "../../../constants/index.mjs";
9
- import { getApiURL as gi } from "../../../helpers/getApiURL.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";
15
+ import { ChainType as bi } from "../../../types/chainType.mjs";
16
+ import { ProviderType as Ci } from "../../../types/providerType.mjs";
17
17
  import { useWeb3App as ge } from "../../context/useWeb3App.mjs";
18
- import { sameBridgeApiChainId as T, toBridgeApiChainId as vi } from "../../helpers/resolveBridgeApiChainId.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";
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";
35
36
  import { mxClsx as qe } from "../../utils/mxClsx.mjs";
36
- 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";
37
+ import { AmountCard as ve } from "../AmountCard/AmountCard.mjs";
38
+ import { AmountInput as be } 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,218 +46,219 @@ 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";
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";
54
55
  import { TokenSelector as Ce } from "../TokenSelector/TokenSelector.mjs";
55
56
  let U;
56
- const Ft = ({
57
- mvxChainId: D,
58
- mvxAddress: o,
57
+ const Wt = ({
58
+ mvxChainId: E,
59
+ mvxAddress: a,
59
60
  username: Ie,
60
61
  callbackRoute: xe = "/",
61
62
  firstTokenIdentifier: Ae,
62
- secondTokenIdentifier: Be,
63
- firstTokenAmount: E,
63
+ secondTokenIdentifier: Ne,
64
+ firstTokenAmount: D,
64
65
  secondTokenAmount: x,
65
- refetchTrigger: Ne,
66
+ refetchTrigger: Be,
66
67
  showHistory: we,
67
68
  forcedDestinationTokenSymbol: ye,
68
69
  onSuccessfullySentTransaction: u,
69
70
  onFailedSentTransaction: f,
70
71
  onHistoryClose: O,
71
- onMvxConnect: ee,
72
- onMvxDisconnect: De,
73
- onNavigate: Ee,
72
+ onMvxConnect: ie,
73
+ onMvxDisconnect: Ee,
74
+ onNavigate: De,
74
75
  onChangeDirection: Oe
75
76
  }) => {
76
77
  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,
78
+ const Me = gi(null), [j, Re] = C(!1), [Ve, Le] = C(1), [P, te] = C(0), [re, oe] = C([]), Fe = xi(), { switchNetwork: ne } = hi(), ae = Di(), {
79
+ options: le,
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: _
82
+ bridgeOnly: Ue
83
+ } = ge(), G = wi(), se = Bi(), ce = yi(), {
84
+ signMvxTransactions: Q,
85
+ resetMvxTransactionHash: _,
86
+ latestMvxTransactionHash: $
86
87
  } = 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,
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: Be,
97
+ mvxAddress: a,
98
+ mvxApiURL: le.mvxApiURL
99
+ }), z = We || Ge || Qe || _e, $e = d(() => A.find((e) => ee(e.id, G)), [G, A]), g = d(() => 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 = ((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, He = p(
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,
127
+ switchNetwork: He,
128
+ fromTokens: Pe,
129
+ toTokens: je,
129
130
  firstTokenIdentifier: Ae,
130
- secondTokenIdentifier: Be,
131
+ secondTokenIdentifier: Ne,
131
132
  forcedDestinationTokenSymbol: ye,
132
- isTokensLoading: $,
133
- mvxChainId: D,
133
+ isTokensLoading: z,
134
+ mvxChainId: E,
134
135
  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,
136
+ onNavigate: De
137
+ }), Ze = () => {
138
+ Je(), Oe();
139
+ }, [s, Se] = C(D ?? ""), [M, R] = C(x ?? ""), Te = d(() => i ? fe.includes(i.chainId.toString()) : !1, [i == null ? void 0 : i.chainId]), ei = d(() => t ? fe.includes(t.chainId.toString()) : !1, [t == null ? void 0 : t.chainId]), n = d(() => t ? N.find(
140
+ (e) => ee(e.chainId, t.chainId)
141
+ ) ?? y : y, [t == null ? void 0 : t.chainId, N, y]), V = d(
142
+ () => Ii(t == null ? void 0 : t.chainId) ?? se,
142
143
  [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({
144
+ ), c = Ei(n == null ? void 0 : n.chainType), ii = c, me = Fe.isConnected && !!c, H = s !== "" && M !== "", K = p(
145
+ fi(async (e) => {
146
+ !e || !Number(e) || !c || !(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
+ c,
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
+ ), m = p((e) => {
165
+ Se(() => e);
166
+ }, []), v = p((e) => {
166
167
  R(() => e);
167
- }, []), ei = p(() => {
168
+ }, []), ti = p(() => {
168
169
  O == null || O();
169
- }, [O]), ii = p(() => {
170
- const e = mi({
170
+ }, [O]), ri = p(() => {
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), m(e);
178
+ }, [i == null ? void 0 : i.balance, i == null ? void 0 : i.decimals, m]), oi = p(
178
179
  async (e) => {
179
- d(""), b(""), oe(), oe(), u == null || u(e);
180
+ m(""), v(""), ae(), ae(), u == null || u(e);
180
181
  },
181
182
  [
182
- d,
183
- b,
183
+ m,
184
+ v,
184
185
  u
185
186
  ]
186
- ), ri = p(
187
+ ), ni = p(
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), he.dismiss(), he.error("Transaction cancelled"), f == null || f("Transaction cancelled"), te(0), li(), m(""), v("");
195
196
  }
196
197
  },
197
198
  [
198
- ce,
199
- d,
200
- b,
199
+ ii,
200
+ m,
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: de,
216
+ handleSubmit: ai,
217
+ resetSwapForm: li
218
+ } = Ai({
219
+ isMvxConnected: !!a,
220
+ rate: o,
221
+ sender: a ?? "",
222
+ receiver: c ?? "",
221
223
  firstToken: i,
222
- firstAmount: c,
223
- fromChainId: D,
224
+ firstAmount: s,
225
+ fromChainId: E,
224
226
  toChainId: V,
225
227
  secondToken: t,
226
228
  secondAmount: M,
227
229
  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(() => {
230
+ senderChainType: bi.mvx,
231
+ receiverChainType: n == null ? void 0 : n.chainType,
232
+ onSubmit: ni
233
+ }), si = !!(X || Y || k || w || J || Z || S), ci = d(() => s !== "" ? w ?? X : void 0, [X, s, w]), mi = d(() => M !== "" ? k ?? Y : void 0, [k, Y, M]);
234
+ return I(() => (s || R(""), K(s), U && clearInterval(U), U = setInterval(() => {
235
+ K(s);
236
+ }, 50 * 1e3), () => clearInterval(U)), [s, Ve, 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
+ ), m(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: c
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
263
  }), u == null || u([e]);
262
264
  } catch (e) {
@@ -265,25 +267,25 @@ const Ft = ({
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__ */ l(
276
278
  "form",
277
279
  {
278
280
  ref: Me,
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 }),
285
- /* @__PURE__ */ s(
286
- be,
286
+ we && /* @__PURE__ */ r(Ri, { mvxAddress: a, onClose: ti }),
287
+ /* @__PURE__ */ l(
288
+ ve,
287
289
  {
288
290
  className: qe(
289
291
  "liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6",
@@ -293,32 +295,32 @@ const Ft = ({
293
295
  }
294
296
  ),
295
297
  children: [
296
- /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
298
+ /* @__PURE__ */ l("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
+ accountAddress: a,
304
+ chainIcon: T(g == null ? void 0 : g.pngUrl),
303
305
  username: Ie,
304
- accountExplorerUrl: `${ae.mvxExplorerAddress}/accounts/${o}`,
306
+ accountExplorerUrl: `${le.mvxExplorerAddress}/accounts/${a}`,
305
307
  showTag: !0,
306
- onDisconnect: De,
307
- onConnect: ee
308
+ onDisconnect: 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
- /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
314
+ /* @__PURE__ */ l("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
313
315
  /* @__PURE__ */ r(
314
- ve,
316
+ be,
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: m,
323
+ onInputChange: de,
322
324
  onBlur: L
323
325
  }
324
326
  ),
@@ -326,15 +328,15 @@ const Ft = ({
326
328
  Ce,
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
341
  onTokenSelectorDisplay: (e) => Re(e)
340
342
  }
@@ -343,9 +345,9 @@ const Ft = ({
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 }) }),
347
- /* @__PURE__ */ s(
348
- be,
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 }) }),
349
+ /* @__PURE__ */ l(
350
+ ve,
349
351
  {
350
352
  className: qe(
351
353
  "liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6",
@@ -354,27 +356,28 @@ const Ft = ({
354
356
  }
355
357
  ),
356
358
  children: [
357
- /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
359
+ /* @__PURE__ */ l("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 }),
368
- /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
370
+ S && /* @__PURE__ */ r("div", { className: "liq-text-red-400 liq-text-xs liq-mt-1", children: S }),
371
+ /* @__PURE__ */ l("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
369
372
  /* @__PURE__ */ r(
370
- ve,
373
+ be,
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: de,
378
381
  onBlur: L
379
382
  }
380
383
  ),
@@ -382,13 +385,13 @@ const Ft = ({
382
385
  Ce,
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
  }
@@ -397,50 +400,50 @@ const Ft = ({
397
400
  ]
398
401
  }
399
402
  ),
400
- /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-justify-center", children: [
401
- !o && /* @__PURE__ */ r(
402
- Mi,
403
+ /* @__PURE__ */ l("div", { className: "liq-flex liq-items-center liq-justify-center", children: [
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 && !me && /* @__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 && me && /* @__PURE__ */ l(
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 || !c || si,
425
428
  children: [
426
- z && /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
429
+ H && /* @__PURE__ */ l("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
+ c && P > 0 && /* @__PURE__ */ r("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ l("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
  };