@nowramp/form 0.1.63 → 0.1.64

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/dist/index.js CHANGED
@@ -11,7 +11,7 @@
11
11
  import { jsx as e, jsxs as r, Fragment as re } from "react/jsx-runtime";
12
12
  import _e, { useState as b, useRef as V, useCallback as B, useEffect as D, useMemo as W, useReducer as zt, useContext as Jt, createContext as qt } from "react";
13
13
  import { RampApi as $e } from "@nowramp/sdk";
14
- import { createPortal as bt } from "react-dom";
14
+ import { createPortal as Nt } from "react-dom";
15
15
  function en(t, n) {
16
16
  const [a, o] = b(null), [l, i] = b(!0), [m, s] = b(null), d = V(null);
17
17
  (!d.current || d.current !== t) && (d.current = new $e({ apiKey: "", ...t }));
@@ -118,14 +118,14 @@ function an(t, n, a) {
118
118
  return () => clearInterval(f);
119
119
  }, [n, a == null ? void 0 : a.pollInterval, o == null ? void 0 : o.status, h]), { status: o, loading: i, error: s, refetch: h };
120
120
  }
121
- function Nt(t, n) {
121
+ function Et(t, n) {
122
122
  if (!t) return t;
123
123
  const a = t.indexOf(".");
124
124
  if (a === -1) return t;
125
125
  let o = t;
126
126
  return o.length - a - 1 > n && (o = o.slice(0, a + n + 1)), o = o.replace(/0+$/, "").replace(/\.$/, ""), o;
127
127
  }
128
- const It = {
128
+ const Mt = {
129
129
  step: "amount",
130
130
  flowType: "buy",
131
131
  fiatCurrency: "USD",
@@ -193,12 +193,12 @@ function rn(t, n) {
193
193
  case "CLEAR_ERROR":
194
194
  return { ...t, errorMessage: null };
195
195
  case "RESET":
196
- return It;
196
+ return Mt;
197
197
  default:
198
198
  return t;
199
199
  }
200
200
  }
201
- const Mt = qt(null);
201
+ const Bt = qt(null);
202
202
  function on({
203
203
  projectId: t,
204
204
  apiUrl: n = "https://api.nowramp.com",
@@ -219,15 +219,15 @@ function on({
219
219
  onError: S,
220
220
  children: P
221
221
  }) {
222
- const X = W(() => ({ apiUrl: n, projectId: t }), [n, t]), U = d || (s ? s.toLowerCase() : ""), G = o === "sell", z = G ? !!h : !!p, se = (G ? !!(z && s && U) : !!(z && s && U && u)) && f ? "confirm" : "amount", y = p || (o === "buy" ? "250" : ""), [c, w] = zt(rn, {
223
- ...It,
222
+ const X = W(() => ({ apiUrl: n, projectId: t }), [n, t]), U = d || (s ? s.toLowerCase() : ""), G = o === "sell", J = G ? !!h : !!p, se = (G ? !!(J && s && U) : !!(J && s && U && u)) && f ? "confirm" : "amount", y = p || (o === "buy" ? "250" : ""), [c, w] = zt(rn, {
223
+ ...Mt,
224
224
  step: se,
225
225
  flowType: o,
226
226
  fiatCurrency: m,
227
227
  cryptoCurrency: s,
228
228
  network: U,
229
- fiatAmount: Nt(y, 2),
230
- cryptoAmount: Nt(h, 6),
229
+ fiatAmount: Et(y, 2),
230
+ cryptoAmount: Et(h, 6),
231
231
  walletAddress: u,
232
232
  customerId: l
233
233
  }), O = c.flowType === "sell", {
@@ -249,11 +249,11 @@ function on({
249
249
  ))
250
250
  return;
251
251
  const L = T.find(
252
- (ne) => ne.supportedFiats.includes(N) && (ne.id.includes("card") || ne.id.includes("debit"))
253
- ) || T.find((ne) => ne.supportedFiats.includes(N));
252
+ (ae) => ae.supportedFiats.includes(N) && (ae.id.includes("card") || ae.id.includes("debit"))
253
+ ) || T.find((ae) => ae.supportedFiats.includes(N));
254
254
  w({ type: "SET_PAYMENT_METHOD", methodId: (L == null ? void 0 : L.id) || ((Q = T[0]) == null ? void 0 : Q.id) || "" });
255
255
  }, [g, c.fiatCurrency, c.paymentMethodId]);
256
- const ee = W(() => {
256
+ const te = W(() => {
257
257
  if (O) {
258
258
  if (!c.cryptoAmount) return null;
259
259
  const I = parseFloat(c.cryptoAmount);
@@ -268,7 +268,7 @@ function on({
268
268
  return !isNaN(Z) && N < Z ? `Minimum amount is ${T.minAmount} ${c.fiatCurrency}` : !isNaN(L) && N > L ? `Maximum amount is ${T.maxAmount} ${c.fiatCurrency}` : null;
269
269
  }, [g, c.fiatAmount, c.fiatCurrency, c.cryptoAmount, O]), be = W(() => {
270
270
  const N = O ? !!c.cryptoAmount : !!c.fiatAmount;
271
- return !g || !N || !c.cryptoCurrency || !c.network || ee ? null : {
271
+ return !g || !N || !c.cryptoCurrency || !c.network || te ? null : {
272
272
  fiatCurrency: c.fiatCurrency,
273
273
  ...O ? { cryptoAmount: c.cryptoAmount } : { fiatAmount: c.fiatAmount },
274
274
  cryptoCurrency: c.cryptoCurrency,
@@ -277,8 +277,8 @@ function on({
277
277
  country: c.country || void 0,
278
278
  orderType: c.flowType
279
279
  };
280
- }, [g, c.fiatCurrency, c.fiatAmount, c.cryptoAmount, c.cryptoCurrency, c.network, c.paymentMethodId, c.country, ee, O, c.flowType]), {
281
- quotes: te,
280
+ }, [g, c.fiatCurrency, c.fiatAmount, c.cryptoAmount, c.cryptoCurrency, c.network, c.paymentMethodId, c.country, te, O, c.flowType]), {
281
+ quotes: ne,
282
282
  loading: fe,
283
283
  error: k,
284
284
  refetch: Ne
@@ -303,8 +303,8 @@ function on({
303
303
  }, [oe, de, S]);
304
304
  const xe = f || (g == null ? void 0 : g.defaultGateway) || null, ke = V(xe);
305
305
  ke.current = xe;
306
- const Le = V(te);
307
- Le.current = te;
306
+ const Le = V(ne);
307
+ Le.current = ne;
308
308
  const Ee = V(i);
309
309
  Ee.current = i;
310
310
  const Ie = B(async () => {
@@ -342,9 +342,9 @@ function on({
342
342
  const N = O ? !!c.cryptoAmount : !!c.fiatAmount;
343
343
  switch (c.step) {
344
344
  case "confirm":
345
- return !!(N && c.cryptoCurrency && c.network && c.walletAddress && !ee);
345
+ return !!(N && c.cryptoCurrency && c.network && c.walletAddress && !te);
346
346
  case "amount":
347
- return !!(N && c.cryptoCurrency && c.network && !ee);
347
+ return !!(N && c.cryptoCurrency && c.network && !te);
348
348
  case "quotes":
349
349
  return !!c.selectedQuote;
350
350
  case "wallet":
@@ -352,7 +352,7 @@ function on({
352
352
  default:
353
353
  return !1;
354
354
  }
355
- }, [c, ee, O]), Me = {
355
+ }, [c, te, O]), Me = {
356
356
  apiConfig: X,
357
357
  assetBaseUrl: a,
358
358
  config: g,
@@ -360,7 +360,7 @@ function on({
360
360
  configError: oe,
361
361
  state: c,
362
362
  dispatch: w,
363
- quotes: te,
363
+ quotes: ne,
364
364
  quotesLoading: fe,
365
365
  quotesError: k,
366
366
  fetchQuotes: Ne,
@@ -372,15 +372,15 @@ function on({
372
372
  orderStatusLoading: Y,
373
373
  fieldLocks: x || null,
374
374
  defaultGateway: xe,
375
- amountError: ee,
375
+ amountError: te,
376
376
  goToStep: Pe,
377
377
  goBack: Ge,
378
378
  canProceed: Ce
379
379
  };
380
- return /* @__PURE__ */ e(Mt.Provider, { value: Me, children: P });
380
+ return /* @__PURE__ */ e(Bt.Provider, { value: Me, children: P });
381
381
  }
382
382
  function Te() {
383
- const t = Jt(Mt);
383
+ const t = Jt(Bt);
384
384
  if (!t)
385
385
  throw new Error("useRamp must be used within a RampProvider");
386
386
  return t;
@@ -547,7 +547,7 @@ const Oe = {
547
547
  OKC: { name: "OKX Chain", icon: "eth" },
548
548
  UNI_CHAIN: { name: "UNI", icon: "uni" },
549
549
  ZEC: { name: "ZCash", icon: "zec" }
550
- }, Bt = [
550
+ }, Ot = [
551
551
  // --- Popular / Top coins ---
552
552
  { code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
553
553
  { code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
@@ -741,7 +741,7 @@ const Oe = {
741
741
  { code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
742
742
  { code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
743
743
  ], ln = Object.fromEntries(
744
- Bt.map((t) => [t.code, t.name])
744
+ Ot.map((t) => [t.code, t.name])
745
745
  ), cn = {
746
746
  AED: "ae",
747
747
  ALL: "al",
@@ -777,7 +777,7 @@ const Oe = {
777
777
  VND: "vn",
778
778
  ZAR: "za"
779
779
  };
780
- function Ot(t, n = "") {
780
+ function Ht(t, n = "") {
781
781
  return `${n}/crypto-icons/${t.toLowerCase()}.svg`;
782
782
  }
783
783
  function sn(t, n = "") {
@@ -787,11 +787,11 @@ function sn(t, n = "") {
787
787
  function Xe(t) {
788
788
  return Oe[t] || Oe[t.toLowerCase()] || Oe[t.toUpperCase()] || Oe[t.toUpperCase().replace(/-/g, "_")] || Oe[t.toLowerCase().replace(/-/g, "_")];
789
789
  }
790
- function tt(t, n = "") {
790
+ function et(t, n = "") {
791
791
  const a = Xe(t);
792
792
  return a ? `${n}/crypto-icons/${a.icon}.svg` : `${n}/crypto-icons/${t.toLowerCase()}.svg`;
793
793
  }
794
- const Et = [
794
+ const wt = [
795
795
  { code: "ALL", name: "Albania Lek" },
796
796
  { code: "ARS", name: "Argentina Peso" },
797
797
  { code: "AUD", name: "Australian Dollar" },
@@ -804,14 +804,14 @@ const Et = [
804
804
  { code: "CHF", name: "Swiss Franc" },
805
805
  { code: "MXN", name: "Mexican Peso" },
806
806
  { code: "INR", name: "Indian Rupee" }
807
- ], wt = [
807
+ ], At = [
808
808
  { id: "blue", name: "Blue", accent: "#0077FF" },
809
809
  { id: "violet", name: "Violet", accent: "#7C3AED" },
810
810
  { id: "green", name: "Green", accent: "#10B981" },
811
811
  { id: "orange", name: "Orange", accent: "#F59E0B" },
812
812
  { id: "rose", name: "Rose", accent: "#F43F5E" },
813
813
  { id: "mono", name: "Mono", accent: null }
814
- ], At = {
814
+ ], St = {
815
815
  USDC: { USD: 0.9962, EUR: 1.0814, GBP: 1.2573, JPY: 667e-5, CAD: 0.7198, AUD: 0.6384, BRL: 0.1726, CHF: 1.1306, MXN: 0.0487, INR: 0.01187, ARS: 855e-6, ALL: 0.01058 },
816
816
  USDT: { USD: 0.9958, EUR: 1.081, GBP: 1.2568, JPY: 666e-5, CAD: 0.7194, AUD: 0.638, BRL: 0.1724, CHF: 1.1301, MXN: 0.0486, INR: 0.01186, ARS: 854e-6, ALL: 0.01057 },
817
817
  BTC: { USD: 104e-7, EUR: 1129e-8, GBP: 1313e-8, JPY: 696e-10, CAD: 751e-8, AUD: 666e-8, BRL: 18e-7, CHF: 118e-7, MXN: 508e-9, INR: 124e-9, ARS: 892e-11, ALL: 11e-8 },
@@ -847,17 +847,17 @@ const Et = [
847
847
  "EURR",
848
848
  "ZCHF"
849
849
  ]);
850
- function Ht(t) {
850
+ function Dt(t) {
851
851
  return dn.has(t.toUpperCase());
852
852
  }
853
853
  function qn(t, n) {
854
854
  var a, o;
855
- return ((a = At[t]) == null ? void 0 : a[n]) ?? ((o = At.USDC) == null ? void 0 : o[n]) ?? 1;
855
+ return ((a = St[t]) == null ? void 0 : a[n]) ?? ((o = St.USDC) == null ? void 0 : o[n]) ?? 1;
856
856
  }
857
857
  function un(t) {
858
858
  return parseFloat(t.replace(/,/g, "")) || 0;
859
859
  }
860
- function Dt(t) {
860
+ function tt(t) {
861
861
  if (t === 0) return "0";
862
862
  if (t >= 1e3) return t.toLocaleString("en-US", { maximumFractionDigits: 2 });
863
863
  if (t >= 1) return t.toFixed(2);
@@ -865,9 +865,9 @@ function Dt(t) {
865
865
  const n = t.toPrecision(4);
866
866
  return parseFloat(n).toString();
867
867
  }
868
- const ce = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), St = 10, Rt = 1e-4, mn = (() => {
868
+ const ce = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), Rt = 10, Tt = 1e-4, mn = (() => {
869
869
  const t = [];
870
- for (const n of Bt)
870
+ for (const n of Ot)
871
871
  for (const a of n.chains)
872
872
  t.push({ code: n.code, name: n.name, chain: a, popular: n.popular });
873
873
  return t;
@@ -926,11 +926,11 @@ function Pt({
926
926
  }
927
927
  );
928
928
  }
929
- function Tt({ ticker: t, size: n = 32, baseUrl: a = "" }) {
929
+ function kt({ ticker: t, size: n = 32, baseUrl: a = "" }) {
930
930
  return /* @__PURE__ */ e(
931
931
  Pt,
932
932
  {
933
- src: Ot(t, a),
933
+ src: Ht(t, a),
934
934
  alt: t,
935
935
  size: n,
936
936
  background: "#ffffff"
@@ -1319,7 +1319,7 @@ function Tn({
1319
1319
  );
1320
1320
  if (o.checkout.method === "iframe") {
1321
1321
  const x = o.checkout.url, E = ((f = o.checkout.allowedFeatures) == null ? void 0 : f.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1322
- return bt(
1322
+ return Nt(
1323
1323
  /* @__PURE__ */ r(
1324
1324
  "div",
1325
1325
  {
@@ -1467,7 +1467,7 @@ function Tn({
1467
1467
  );
1468
1468
  if (o.checkout.method === "widget" && o.widgetConfig) {
1469
1469
  const x = kn(o.checkout.url, o.widgetConfig);
1470
- return bt(
1470
+ return Nt(
1471
1471
  /* @__PURE__ */ r(
1472
1472
  "div",
1473
1473
  {
@@ -1884,11 +1884,11 @@ function Mn({
1884
1884
  ] })
1885
1885
  ] });
1886
1886
  }
1887
- function kt(t) {
1887
+ function Lt(t) {
1888
1888
  return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
1889
1889
  }
1890
1890
  function Bn({ className: t = "", stablecoinParity: n, partnerName: a }) {
1891
- var z;
1891
+ var J;
1892
1892
  const {
1893
1893
  config: o,
1894
1894
  configLoading: l,
@@ -1898,7 +1898,7 @@ function Bn({ className: t = "", stablecoinParity: n, partnerName: a }) {
1898
1898
  fetchQuotes: d,
1899
1899
  createOrder: p,
1900
1900
  orderLoading: h
1901
- } = Te(), u = i.flowType === "sell", [f, x] = b(null), E = o == null ? void 0 : o.gateways.find(($) => $.id === m), v = (z = s == null ? void 0 : s.bestQuote) != null && z.exchangeRate ? parseFloat(s.bestQuote.exchangeRate) : null, S = parseFloat(i.fiatAmount) || 0, P = !!(n && a && !u && Ht(i.cryptoCurrency) && v), X = P && i.cryptoCurrency.toUpperCase().includes(i.fiatCurrency.toUpperCase()), U = P && S > 0 ? Dt(X ? S : S / v) : null, G = async () => {
1901
+ } = Te(), u = i.flowType === "sell", [f, x] = b(null), E = o == null ? void 0 : o.gateways.find(($) => $.id === m), v = (J = s == null ? void 0 : s.bestQuote) != null && J.exchangeRate ? parseFloat(s.bestQuote.exchangeRate) : null, S = parseFloat(i.fiatAmount) || 0, P = !!(n && a && !u && Dt(i.cryptoCurrency) && v), X = P && i.cryptoCurrency.toUpperCase().includes(i.fiatCurrency.toUpperCase()), U = P && S > 0 ? tt(X ? S : S / v) : null, G = async () => {
1902
1902
  x(null);
1903
1903
  try {
1904
1904
  d(), await p();
@@ -1932,7 +1932,7 @@ function Bn({ className: t = "", stablecoinParity: n, partnerName: a }) {
1932
1932
  value: U ? `${U} ${i.cryptoCurrency}` : `${i.cryptoCurrency} on ${i.network}`
1933
1933
  }
1934
1934
  ),
1935
- /* @__PURE__ */ e(ve, { label: "Wallet", value: kt(i.walletAddress), mono: !0 }),
1935
+ /* @__PURE__ */ e(ve, { label: "Wallet", value: Lt(i.walletAddress), mono: !0 }),
1936
1936
  P && U && /* @__PURE__ */ r("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
1937
1937
  "Charged amount from provider may differ. The rest up to ",
1938
1938
  U,
@@ -1944,7 +1944,7 @@ function Bn({ className: t = "", stablecoinParity: n, partnerName: a }) {
1944
1944
  ] })
1945
1945
  ] }),
1946
1946
  /* @__PURE__ */ e(ve, { label: "Network", value: i.network }),
1947
- u && i.walletAddress && /* @__PURE__ */ e(ve, { label: "Refund address", value: kt(i.walletAddress), mono: !0 })
1947
+ u && i.walletAddress && /* @__PURE__ */ e(ve, { label: "Refund address", value: Lt(i.walletAddress), mono: !0 })
1948
1948
  ] }),
1949
1949
  f && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: f }),
1950
1950
  /* @__PURE__ */ e(
@@ -2112,8 +2112,8 @@ function Pn({
2112
2112
  selectedCode: l
2113
2113
  }) {
2114
2114
  const [i, m] = b(""), s = W(() => {
2115
- if (!a || a.length === 0) return Et;
2116
- const p = new Map(Et.map((h) => [h.code, h.name]));
2115
+ if (!a || a.length === 0) return wt;
2116
+ const p = new Map(wt.map((h) => [h.code, h.name]));
2117
2117
  return a.map((h) => ({
2118
2118
  code: h.code,
2119
2119
  name: h.name || p.get(h.code) || h.code
@@ -2192,7 +2192,7 @@ function Pn({
2192
2192
  ] })
2193
2193
  ] });
2194
2194
  }
2195
- function Lt({ src: t, alt: n, size: a, className: o, style: l }) {
2195
+ function It({ src: t, alt: n, size: a, className: o, style: l }) {
2196
2196
  const [i, m] = b(!1), [s, d] = b(!1);
2197
2197
  D(() => {
2198
2198
  m(!1), d(!1);
@@ -2265,7 +2265,7 @@ function Un({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
2265
2265
  }
2266
2266
  const f = u.split(/\s+/), x = [];
2267
2267
  for (const v of d) {
2268
- const S = Xe(v.chain), P = S ? S.name.toLowerCase() : "", X = ((E = S == null ? void 0 : S.shortName) == null ? void 0 : E.toLowerCase()) || "", U = v.chain.toLowerCase(), G = v.code.toLowerCase(), z = v.name.toLowerCase(), $ = [G, z, P, X, U];
2268
+ const S = Xe(v.chain), P = S ? S.name.toLowerCase() : "", X = ((E = S == null ? void 0 : S.shortName) == null ? void 0 : E.toLowerCase()) || "", U = v.chain.toLowerCase(), G = v.code.toLowerCase(), J = v.name.toLowerCase(), $ = [G, J, P, X, U];
2269
2269
  if (!f.every((c) => $.some((w) => w.includes(c)))) continue;
2270
2270
  let y = 0;
2271
2271
  G === u ? y += 100 : G.startsWith(f[0]) && (y += 50), v.popular && (y += 10), f.length > 1 && (P.includes(f[1]) || X.includes(f[1]) || U.includes(f[1])) && (y += 25), x.push({ item: v, score: y });
@@ -2301,9 +2301,9 @@ function Un({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
2301
2301
  className: "absolute top-0 left-0",
2302
2302
  style: { background: "#ffffff", borderRadius: "50%" },
2303
2303
  children: /* @__PURE__ */ e(
2304
- Lt,
2304
+ It,
2305
2305
  {
2306
- src: Ot(u.code, o),
2306
+ src: Ht(u.code, o),
2307
2307
  alt: u.code,
2308
2308
  size: 32
2309
2309
  }
@@ -2322,9 +2322,9 @@ function Un({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selecte
2322
2322
  background: "#ffffff"
2323
2323
  },
2324
2324
  children: /* @__PURE__ */ e(
2325
- Lt,
2325
+ It,
2326
2326
  {
2327
- src: tt(u.chain, o),
2327
+ src: et(u.chain, o),
2328
2328
  alt: u.chain,
2329
2329
  size: 16
2330
2330
  }
@@ -2574,11 +2574,11 @@ function Xn({
2574
2574
  explorerUrl: X,
2575
2575
  doneButtonText: U = "Done",
2576
2576
  supportEmail: G,
2577
- stablecoinParity: z,
2577
+ stablecoinParity: J,
2578
2578
  partnerName: $,
2579
2579
  onDone: se
2580
2580
  }) {
2581
- var ht, pt, ft, yt, xt, Ct, gt, vt;
2581
+ var pt, ft, yt, xt, Ct, gt, vt, bt;
2582
2582
  const {
2583
2583
  state: y,
2584
2584
  dispatch: c,
@@ -2587,14 +2587,14 @@ function Xn({
2587
2587
  quotes: g,
2588
2588
  quotesLoading: pe,
2589
2589
  quotesError: oe,
2590
- fetchQuotes: ee,
2590
+ fetchQuotes: te,
2591
2591
  createOrder: be,
2592
- orderLoading: te,
2592
+ orderLoading: ne,
2593
2593
  amountError: fe,
2594
2594
  fieldLocks: k,
2595
2595
  apiConfig: Ne,
2596
2596
  assetBaseUrl: F
2597
- } = Te(), [le, de] = b(n === "dark"), [ye, We] = b(a), [j, Y] = b(null), [xe, ke] = b(!1), [Le, Ee] = b(!1), [Ie, Pe] = b(!1), [Ge, Ce] = b(null), [Me, N] = b(!0), [T, Z] = b(!1), [L, I] = b(!1), Q = V(null), ne = V(), we = V(y.flowType);
2597
+ } = Te(), [le, de] = b(n === "dark"), [ye, We] = b(a), [j, Y] = b(null), [xe, ke] = b(!1), [Le, Ee] = b(!1), [Ie, Pe] = b(!1), [Ge, Ce] = b(null), [Me, N] = b(!0), [T, Z] = b(!1), [L, I] = b(!1), Q = V(null), ae = V(), we = V(y.flowType);
2598
2598
  D(() => {
2599
2599
  de(n === "dark");
2600
2600
  }, [n]), D(() => {
@@ -2608,38 +2608,38 @@ function Xn({
2608
2608
  }
2609
2609
  we.current = y.flowType;
2610
2610
  }, [y.flowType, Me]);
2611
- const Ae = y.flowType, _ = Ae === "buy", K = y.cryptoCurrency || "BTC", ae = y.fiatCurrency || "USD", Ye = _ ? y.fiatAmount : y.cryptoAmount, J = un(Ye), ue = (ht = g == null ? void 0 : g.bestQuote) != null && ht.exchangeRate ? parseFloat(g.bestQuote.exchangeRate) : null, Ue = V(null);
2612
- ue && K && ae && (Ue.current = { rate: ue, crypto: K, fiat: ae });
2611
+ const Ae = y.flowType, K = Ae === "buy", _ = y.cryptoCurrency || "BTC", q = y.fiatCurrency || "USD", Ye = K ? y.fiatAmount : y.cryptoAmount, z = un(Ye), ue = (pt = g == null ? void 0 : g.bestQuote) != null && pt.exchangeRate ? parseFloat(g.bestQuote.exchangeRate) : null, Ue = V(null);
2612
+ ue && _ && q && (Ue.current = { rate: ue, crypto: _, fiat: q });
2613
2613
  const rt = W(() => {
2614
2614
  if (g != null && g.bestQuote) {
2615
- const C = _ ? g.bestQuote.cryptoAmount : g.bestQuote.fiatAmount;
2615
+ const C = K ? g.bestQuote.cryptoAmount : g.bestQuote.fiatAmount;
2616
2616
  if (C) return C;
2617
2617
  }
2618
2618
  return "0";
2619
- }, [g, _]), Be = !!(z && $ && _ && Ht(K) && ue), Kt = Be && K.toUpperCase().includes(ae.toUpperCase()), Ze = Be && J > 0 ? Dt(Kt ? J : J / ue) : null, _t = Be && Ze ? Ze : rt, Vt = W(() => {
2620
- var H, me, Je;
2621
- const C = ue || ((H = Ue.current) == null ? void 0 : H.rate), A = ue ? K : (me = Ue.current) == null ? void 0 : me.crypto, R = ue ? ae : (Je = Ue.current) == null ? void 0 : Je.fiat;
2619
+ }, [g, K]), Be = !!(J && $ && K && Dt(_) && ue), Kt = Be && _.toUpperCase().includes(q.toUpperCase()), ot = Be && z > 0 ? tt(Kt ? z : z / ue) : null, _t = Be && ot ? ot : rt, Vt = W(() => {
2620
+ var H, me, ze;
2621
+ const C = ue || ((H = Ue.current) == null ? void 0 : H.rate), A = ue ? _ : (me = Ue.current) == null ? void 0 : me.crypto, R = ue ? q : (ze = Ue.current) == null ? void 0 : ze.fiat;
2622
2622
  return !C || !A || !R ? "" : `1 ${A} ≈ ${C.toFixed(2)} ${R}`;
2623
- }, [K, ae, ue]);
2623
+ }, [_, q, ue]);
2624
2624
  D(() => {
2625
2625
  const C = y.walletAddress.trim(), A = y.network;
2626
2626
  if (!C || C.length < 10) {
2627
2627
  Ce(null), c({ type: "SET_WALLET_ERROR", message: "" });
2628
2628
  return;
2629
2629
  }
2630
- return Pe(!0), Ce(null), clearTimeout(ne.current), ne.current = setTimeout(async () => {
2630
+ return Pe(!0), Ce(null), clearTimeout(ae.current), ae.current = setTimeout(async () => {
2631
2631
  var R, H, me;
2632
2632
  try {
2633
- const qe = await (await fetch(`${Ne.apiUrl}/public/validate/address`, {
2633
+ const Je = await (await fetch(`${Ne.apiUrl}/public/validate/address`, {
2634
2634
  method: "POST",
2635
2635
  headers: { "Content-Type": "application/json" },
2636
2636
  body: JSON.stringify({ address: C, ...A ? { network: A } : {} })
2637
- })).json(), et = ((R = qe.data) == null ? void 0 : R.attributes) || qe.data || qe;
2638
- if (et.isValid)
2637
+ })).json(), qe = ((R = Je.data) == null ? void 0 : R.attributes) || Je.data || Je;
2638
+ if (qe.isValid)
2639
2639
  Ce(!0), c({ type: "SET_WALLET_ERROR", message: "" });
2640
2640
  else {
2641
2641
  Ce(!1);
2642
- const Qt = ((H = et.errors) == null ? void 0 : H[0]) || ((me = et.details) == null ? void 0 : me.formatMessage) || "Invalid wallet address";
2642
+ const Qt = ((H = qe.errors) == null ? void 0 : H[0]) || ((me = qe.details) == null ? void 0 : me.formatMessage) || "Invalid wallet address";
2643
2643
  c({ type: "SET_WALLET_ERROR", message: Qt });
2644
2644
  }
2645
2645
  } catch {
@@ -2647,13 +2647,13 @@ function Xn({
2647
2647
  } finally {
2648
2648
  Pe(!1);
2649
2649
  }
2650
- }, 500), () => clearTimeout(ne.current);
2650
+ }, 500), () => clearTimeout(ae.current);
2651
2651
  }, [y.walletAddress, y.network, Ne.apiUrl]);
2652
- const ot = !Ye || J === 0, lt = J > 0 && (_ ? J < St : J < Rt), it = !!fe || lt || xe && ot, Xt = J > 0 && !fe && !lt, Qe = y.walletAddress.trim().length >= 10 && Ge !== !1 && !Ie, Fe = Xt && Qe && !!y.cryptoCurrency && !!y.network, $t = (C) => {
2652
+ const lt = !Ye || z === 0, it = z > 0 && (K ? z < Rt : z < Tt), ct = !!fe || it || xe && lt, Xt = z > 0 && !fe && !it, Ze = y.walletAddress.trim().length >= 10 && Ge !== !1 && !Ie, Fe = Xt && Ze && !!y.cryptoCurrency && !!y.network, $t = (C) => {
2653
2653
  let A = C.target.value.replace(/[^0-9.,]/g, "");
2654
- const R = _ ? 2 : 6, H = A.indexOf(".");
2655
- H !== -1 && A.length - H - 1 > R && (A = A.slice(0, H + R + 1)), c(_ ? { type: "SET_FIAT_AMOUNT", amount: A } : { type: "SET_CRYPTO_AMOUNT", amount: A });
2656
- }, ct = (C) => {
2654
+ const R = K ? 2 : 6, H = A.indexOf(".");
2655
+ H !== -1 && A.length - H - 1 > R && (A = A.slice(0, H + R + 1)), c(K ? { type: "SET_FIAT_AMOUNT", amount: A } : { type: "SET_CRYPTO_AMOUNT", amount: A });
2656
+ }, st = (C) => {
2657
2657
  C !== Ae && c({ type: "SET_FLOW_TYPE", flowType: C });
2658
2658
  }, jt = B(
2659
2659
  (C) => {
@@ -2671,7 +2671,7 @@ function Xn({
2671
2671
  },
2672
2672
  [c]
2673
2673
  ), Yt = () => {
2674
- Fe && (I(!0), ee());
2674
+ Fe && (I(!0), te());
2675
2675
  };
2676
2676
  D(() => {
2677
2677
  var C;
@@ -2688,46 +2688,46 @@ function Xn({
2688
2688
  }
2689
2689
  }
2690
2690
  }, [L, g, pe, oe, c, be]);
2691
- const st = le ? "theme-dark" : "theme-light", ze = wt.find((C) => C.id === ye) || wt[0], Zt = ze.accent === null, dt = (o ? ce(o) : !1) ? { "--t-accent": o, "--t-cta-bg": o, "--t-cta-text": "#ffffff" } : Zt ? {
2691
+ const dt = le ? "theme-dark" : "theme-light", Qe = At.find((C) => C.id === ye) || At[0], Zt = Qe.accent === null, ut = (o ? ce(o) : !1) ? { "--t-accent": o, "--t-cta-bg": o, "--t-cta-text": "#ffffff" } : Zt ? {
2692
2692
  "--t-accent": le ? "#ffffff" : "#111111",
2693
2693
  "--t-cta-bg": le ? "#ffffff" : "#111111",
2694
2694
  "--t-cta-text": le ? "#000000" : "#ffffff"
2695
2695
  } : {
2696
- "--t-accent": ze.accent,
2697
- "--t-cta-bg": ze.accent,
2696
+ "--t-accent": Qe.accent,
2697
+ "--t-cta-bg": Qe.accent,
2698
2698
  "--t-cta-text": "#ffffff"
2699
- }, q = {};
2700
- d && ce(d) && (q["--t-surface"] = d, q["--t-modal-bg"] = d), p && ce(p) && (q["--t-pill-bg"] = p, q["--t-close-bg"] = p), h && ce(h) && (q["--t-text"] = h), u && ce(u) && (q["--t-text-secondary"] = u), f && ce(f) && (q["--t-text-muted"] = f, q["--t-text-tertiary"] = f), x && ce(x) && (q["--t-success"] = x);
2699
+ }, ee = {};
2700
+ d && ce(d) && (ee["--t-surface"] = d, ee["--t-modal-bg"] = d), p && ce(p) && (ee["--t-pill-bg"] = p, ee["--t-close-bg"] = p), h && ce(h) && (ee["--t-text"] = h), u && ce(u) && (ee["--t-text-secondary"] = u), f && ce(f) && (ee["--t-text-muted"] = f, ee["--t-text-tertiary"] = f), x && ce(x) && (ee["--t-success"] = x);
2701
2701
  const ge = {};
2702
2702
  l && ce(l) ? ge.backgroundColor = l : ge.backgroundColor = "var(--t-bg)", i && (ge.backgroundImage = `url(${i})`, ge.backgroundSize = "cover", ge.backgroundPosition = "center");
2703
2703
  const Ke = {};
2704
2704
  m && ce(m) && (Ke.border = `1px solid ${m}`), s && (Ke.borderRadius = s);
2705
- const ut = y.step === "checkout" ? /* @__PURE__ */ e(Tn, { autoRedirect: P }) : y.step === "processing" ? /* @__PURE__ */ e(Ln, {}) : y.step === "complete" ? /* @__PURE__ */ e(In, { explorerUrl: X, doneButtonText: U, onDone: se }) : y.step === "error" ? /* @__PURE__ */ e(Mn, { supportEmail: G }) : y.step === "confirm" ? /* @__PURE__ */ e(Bn, { stablecoinParity: Be, partnerName: $ }) : null;
2706
- if (ut)
2705
+ const mt = y.step === "checkout" ? /* @__PURE__ */ e(Tn, { autoRedirect: P }) : y.step === "processing" ? /* @__PURE__ */ e(Ln, {}) : y.step === "complete" ? /* @__PURE__ */ e(In, { explorerUrl: X, doneButtonText: U, onDone: se }) : y.step === "error" ? /* @__PURE__ */ e(Mn, { supportEmail: G }) : y.step === "confirm" ? /* @__PURE__ */ e(Bn, { stablecoinParity: Be, partnerName: $ }) : null;
2706
+ if (mt)
2707
2707
  return /* @__PURE__ */ e(
2708
2708
  "div",
2709
2709
  {
2710
- className: `${st} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2710
+ className: `${dt} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2711
2711
  style: {
2712
2712
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
2713
2713
  ...ge,
2714
- ...dt,
2715
- ...q,
2714
+ ...ut,
2715
+ ...ee,
2716
2716
  ...Ke
2717
2717
  },
2718
- children: ut
2718
+ children: mt
2719
2719
  }
2720
2720
  );
2721
- const ie = y.network, Se = ie ? Xe(ie) : null, mt = (Se == null ? void 0 : Se.shortName) || (Se == null ? void 0 : Se.name) || ie;
2721
+ const ie = y.network, Se = ie ? Xe(ie) : null, ht = (Se == null ? void 0 : Se.shortName) || (Se == null ? void 0 : Se.name) || ie;
2722
2722
  return /* @__PURE__ */ r(
2723
2723
  "div",
2724
2724
  {
2725
- className: `${st} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2725
+ className: `${dt} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2726
2726
  style: {
2727
2727
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
2728
2728
  ...ge,
2729
- ...dt,
2730
- ...q,
2729
+ ...ut,
2730
+ ...ee,
2731
2731
  ...Ke
2732
2732
  },
2733
2733
  children: [
@@ -2737,7 +2737,7 @@ function Xn({
2737
2737
  /* @__PURE__ */ e(
2738
2738
  "button",
2739
2739
  {
2740
- onClick: () => ct("buy"),
2740
+ onClick: () => st("buy"),
2741
2741
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
2742
2742
  style: { color: Ae === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
2743
2743
  children: "Buy"
@@ -2746,7 +2746,7 @@ function Xn({
2746
2746
  /* @__PURE__ */ e(
2747
2747
  "button",
2748
2748
  {
2749
- onClick: () => ct("sell"),
2749
+ onClick: () => st("sell"),
2750
2750
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
2751
2751
  style: { color: Ae === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
2752
2752
  children: "Sell"
@@ -2776,7 +2776,7 @@ function Xn({
2776
2776
  style: {
2777
2777
  background: "var(--t-surface)",
2778
2778
  borderRadius: 5,
2779
- border: xe && it ? "1px solid #EF4444" : "1px solid transparent",
2779
+ border: xe && ct ? "1px solid #EF4444" : "1px solid transparent",
2780
2780
  minHeight: 102
2781
2781
  },
2782
2782
  children: [
@@ -2790,14 +2790,14 @@ function Xn({
2790
2790
  value: Ye,
2791
2791
  onChange: $t,
2792
2792
  onBlur: () => ke(!0),
2793
- placeholder: _ ? "250" : "0.01",
2793
+ placeholder: K ? "250" : "0.01",
2794
2794
  className: "bg-transparent outline-none w-0 flex-1 mr-3",
2795
2795
  style: { color: "var(--t-text)", fontSize: 24, fontWeight: 600, lineHeight: "32px", padding: 0, border: "none", borderRadius: 0, backgroundColor: "transparent", height: "auto", width: 0 },
2796
2796
  inputMode: "decimal",
2797
- disabled: !!((pt = k == null ? void 0 : k.sourceAmount) != null && pt.locked)
2797
+ disabled: !!((ft = k == null ? void 0 : k.sourceAmount) != null && ft.locked)
2798
2798
  }
2799
2799
  ),
2800
- _ ? /* @__PURE__ */ r(
2800
+ K ? /* @__PURE__ */ r(
2801
2801
  "button",
2802
2802
  {
2803
2803
  onClick: () => Y("fiat"),
@@ -2809,10 +2809,10 @@ function Xn({
2809
2809
  paddingLeft: 10,
2810
2810
  paddingRight: 10
2811
2811
  },
2812
- disabled: !!((ft = k == null ? void 0 : k.sourceCurrency) != null && ft.locked),
2812
+ disabled: !!((yt = k == null ? void 0 : k.sourceCurrency) != null && yt.locked),
2813
2813
  children: [
2814
- /* @__PURE__ */ e(nt, { currencyCode: ae, size: 16, baseUrl: F }),
2815
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: ae }),
2814
+ /* @__PURE__ */ e(nt, { currencyCode: q, size: 16, baseUrl: F }),
2815
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: q }),
2816
2816
  /* @__PURE__ */ e(He, {})
2817
2817
  ]
2818
2818
  }
@@ -2829,10 +2829,10 @@ function Xn({
2829
2829
  paddingLeft: 10,
2830
2830
  paddingRight: 10
2831
2831
  },
2832
- disabled: !!((yt = k == null ? void 0 : k.destinationCurrency) != null && yt.locked),
2832
+ disabled: !!((xt = k == null ? void 0 : k.destinationCurrency) != null && xt.locked),
2833
2833
  children: [
2834
- /* @__PURE__ */ e(Tt, { ticker: K, size: 16, baseUrl: F }),
2835
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: K }),
2834
+ /* @__PURE__ */ e(kt, { ticker: _, size: 16, baseUrl: F }),
2835
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: _ }),
2836
2836
  /* @__PURE__ */ e(He, {})
2837
2837
  ]
2838
2838
  }
@@ -2841,7 +2841,7 @@ function Xn({
2841
2841
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
2842
2842
  "img",
2843
2843
  {
2844
- src: tt(ie, F),
2844
+ src: et(ie, F),
2845
2845
  alt: ie,
2846
2846
  width: 14,
2847
2847
  height: 14,
@@ -2849,14 +2849,14 @@ function Xn({
2849
2849
  style: { width: 14, height: 14 }
2850
2850
  }
2851
2851
  ) }),
2852
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: mt })
2852
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: ht })
2853
2853
  ] })
2854
2854
  ] })
2855
2855
  ] })
2856
2856
  ]
2857
2857
  }
2858
2858
  ),
2859
- xe && it && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: fe || (ot ? "Amount should be more than 0" : _ ? `Minimum amount is ${St} ${ae}` : `Minimum amount is ${Rt} ${K}`) }),
2859
+ xe && ct && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: fe || (lt ? "Amount should be more than 0" : K ? `Minimum amount is ${Rt} ${q}` : `Minimum amount is ${Tt} ${_}`) }),
2860
2860
  /* @__PURE__ */ r(
2861
2861
  "div",
2862
2862
  {
@@ -2876,13 +2876,13 @@ function Xn({
2876
2876
  pe && !L ? /* @__PURE__ */ e(M, { w: 180, h: 32 }) : /* @__PURE__ */ e(
2877
2877
  Hn,
2878
2878
  {
2879
- value: J > 0 ? _t : "0",
2879
+ value: z > 0 ? _t : "0",
2880
2880
  height: 32,
2881
2881
  className: "font-semibold",
2882
- style: { color: J > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
2882
+ style: { color: z > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
2883
2883
  }
2884
2884
  ),
2885
- _ ? /* @__PURE__ */ r("div", { className: "flex flex-col items-end shrink-0", children: [
2885
+ K ? /* @__PURE__ */ r("div", { className: "flex flex-col items-end shrink-0", children: [
2886
2886
  /* @__PURE__ */ r(
2887
2887
  "button",
2888
2888
  {
@@ -2895,10 +2895,10 @@ function Xn({
2895
2895
  paddingLeft: 10,
2896
2896
  paddingRight: 10
2897
2897
  },
2898
- disabled: !!((xt = k == null ? void 0 : k.destinationCurrency) != null && xt.locked),
2898
+ disabled: !!((Ct = k == null ? void 0 : k.destinationCurrency) != null && Ct.locked),
2899
2899
  children: [
2900
- /* @__PURE__ */ e(Tt, { ticker: K, size: 16, baseUrl: F }),
2901
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: K }),
2900
+ /* @__PURE__ */ e(kt, { ticker: _, size: 16, baseUrl: F }),
2901
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: _ }),
2902
2902
  /* @__PURE__ */ e(He, {})
2903
2903
  ]
2904
2904
  }
@@ -2907,7 +2907,7 @@ function Xn({
2907
2907
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
2908
2908
  "img",
2909
2909
  {
2910
- src: tt(ie, F),
2910
+ src: et(ie, F),
2911
2911
  alt: ie,
2912
2912
  width: 14,
2913
2913
  height: 14,
@@ -2915,7 +2915,7 @@ function Xn({
2915
2915
  style: { width: 14, height: 14 }
2916
2916
  }
2917
2917
  ) }),
2918
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: mt })
2918
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: ht })
2919
2919
  ] })
2920
2920
  ] }) : /* @__PURE__ */ r(
2921
2921
  "button",
@@ -2929,10 +2929,10 @@ function Xn({
2929
2929
  paddingLeft: 10,
2930
2930
  paddingRight: 10
2931
2931
  },
2932
- disabled: !!((Ct = k == null ? void 0 : k.sourceCurrency) != null && Ct.locked),
2932
+ disabled: !!((gt = k == null ? void 0 : k.sourceCurrency) != null && gt.locked),
2933
2933
  children: [
2934
- /* @__PURE__ */ e(nt, { currencyCode: ae, size: 16, baseUrl: F }),
2935
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: ae }),
2934
+ /* @__PURE__ */ e(nt, { currencyCode: q, size: 16, baseUrl: F }),
2935
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: q }),
2936
2936
  /* @__PURE__ */ e(He, {})
2937
2937
  ]
2938
2938
  }
@@ -2941,7 +2941,7 @@ function Xn({
2941
2941
  ]
2942
2942
  }
2943
2943
  ),
2944
- Be && J > 0 && (g == null ? void 0 : g.bestQuote) && /* @__PURE__ */ r(
2944
+ Be && z > 0 && (g == null ? void 0 : g.bestQuote) && /* @__PURE__ */ r(
2945
2945
  "div",
2946
2946
  {
2947
2947
  className: "flex items-start gap-2 mt-[2px] px-[14px] py-[10px]",
@@ -2955,11 +2955,11 @@ function Xn({
2955
2955
  "You will be charged for ",
2956
2956
  rt,
2957
2957
  " ",
2958
- K,
2958
+ _,
2959
2959
  ", the rest up to ",
2960
- Ze,
2960
+ tt(z),
2961
2961
  " ",
2962
- K,
2962
+ q,
2963
2963
  " will be credited to your ",
2964
2964
  $,
2965
2965
  " account"
@@ -2973,7 +2973,7 @@ function Xn({
2973
2973
  className: "flex items-center justify-between mt-[2px] px-[18px] pt-[12px] pb-[14px]",
2974
2974
  style: {
2975
2975
  background: "var(--t-surface)",
2976
- ...(gt = w == null ? void 0 : w.paymentMethods) != null && gt.length ? {} : { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 }
2976
+ ...(vt = w == null ? void 0 : w.paymentMethods) != null && vt.length ? {} : { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 }
2977
2977
  },
2978
2978
  children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: x ? "var(--t-success)" : "var(--t-text-secondary)" }, children: Vt || " " })
2979
2979
  }
@@ -2988,7 +2988,7 @@ function Xn({
2988
2988
  }
2989
2989
  ) }),
2990
2990
  /* @__PURE__ */ r("div", { className: "mt-8", children: [
2991
- /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: _ ? "Receiving wallet address" : "Sending wallet address" }),
2991
+ /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: K ? "Receiving wallet address" : "Sending wallet address" }),
2992
2992
  /* @__PURE__ */ e(
2993
2993
  "input",
2994
2994
  {
@@ -2996,12 +2996,12 @@ function Xn({
2996
2996
  value: y.walletAddress,
2997
2997
  onChange: (C) => c({ type: "SET_WALLET_ADDRESS", address: C.target.value }),
2998
2998
  onBlur: () => Ee(!0),
2999
- placeholder: _ ? "Enter your receiving address" : "Enter your sending address",
2999
+ placeholder: K ? "Enter your receiving address" : "Enter your sending address",
3000
3000
  spellCheck: !1,
3001
3001
  autoComplete: "off",
3002
3002
  className: "w-full bg-transparent text-[13px] outline-none transition-colors",
3003
3003
  style: {
3004
- border: y.walletError || Le && !Qe ? "1px solid #EF4444" : "1px solid var(--t-border)",
3004
+ border: y.walletError || Le && !Ze ? "1px solid #EF4444" : "1px solid var(--t-border)",
3005
3005
  borderRadius: 3.5,
3006
3006
  height: 47,
3007
3007
  padding: "0 14px",
@@ -3009,16 +3009,16 @@ function Xn({
3009
3009
  fontSize: 13,
3010
3010
  backgroundColor: "transparent"
3011
3011
  },
3012
- disabled: !!((vt = k == null ? void 0 : k.destinationAddress) != null && vt.locked)
3012
+ disabled: !!((bt = k == null ? void 0 : k.destinationAddress) != null && bt.locked)
3013
3013
  }
3014
3014
  ),
3015
- y.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: y.walletError }) : Le && !Qe && !Ie ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : Ie && y.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3015
+ y.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: y.walletError }) : Le && !Ze && !Ie ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : Ie && y.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3016
3016
  ] }),
3017
3017
  /* @__PURE__ */ e("div", { className: "flex-1" }),
3018
3018
  /* @__PURE__ */ e(
3019
3019
  "button",
3020
3020
  {
3021
- disabled: !Fe || te || L,
3021
+ disabled: !Fe || ne || L,
3022
3022
  onClick: Yt,
3023
3023
  className: "w-full font-semibold text-[16px] transition-all mt-4",
3024
3024
  style: {
@@ -3026,10 +3026,10 @@ function Xn({
3026
3026
  borderRadius: 5,
3027
3027
  background: "var(--t-cta-bg)",
3028
3028
  color: "var(--t-cta-text)",
3029
- opacity: Fe && !te && !L ? 1 : 0.4,
3030
- cursor: Fe && !te && !L ? "pointer" : "not-allowed"
3029
+ opacity: Fe && !ne && !L ? 1 : 0.4,
3030
+ cursor: Fe && !ne && !L ? "pointer" : "not-allowed"
3031
3031
  },
3032
- children: L ? "Getting best price..." : te ? "Processing..." : _ ? `Buy ${K}` : `Sell ${K}`
3032
+ children: L ? "Getting best price..." : ne ? "Processing..." : K ? `Buy ${_}` : `Sell ${_}`
3033
3033
  }
3034
3034
  ),
3035
3035
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
@@ -3125,7 +3125,7 @@ function $n({
3125
3125
  theme: X,
3126
3126
  skinId: U,
3127
3127
  accentColor: G,
3128
- bgColor: z,
3128
+ bgColor: J,
3129
3129
  bgImage: $,
3130
3130
  borderColor: se,
3131
3131
  borderRadius: y,
@@ -3135,9 +3135,9 @@ function $n({
3135
3135
  textSecondaryColor: g,
3136
3136
  textMutedColor: pe,
3137
3137
  successColor: oe,
3138
- showFlowToggle: ee,
3138
+ showFlowToggle: te,
3139
3139
  showSettings: be,
3140
- showThemeToggle: te,
3140
+ showThemeToggle: ne,
3141
3141
  autoRedirect: fe,
3142
3142
  explorerUrl: k,
3143
3143
  doneButtonText: Ne,
@@ -3173,7 +3173,7 @@ function $n({
3173
3173
  theme: X,
3174
3174
  skinId: U,
3175
3175
  accentColor: G,
3176
- bgColor: z,
3176
+ bgColor: J,
3177
3177
  bgImage: $,
3178
3178
  borderColor: se,
3179
3179
  borderRadius: y,
@@ -3183,9 +3183,9 @@ function $n({
3183
3183
  textSecondaryColor: g,
3184
3184
  textMutedColor: pe,
3185
3185
  successColor: oe,
3186
- showFlowToggle: ee,
3186
+ showFlowToggle: te,
3187
3187
  showSettings: be,
3188
- showThemeToggle: te,
3188
+ showThemeToggle: ne,
3189
3189
  autoRedirect: fe,
3190
3190
  explorerUrl: k,
3191
3191
  doneButtonText: Ne,
@@ -3364,7 +3364,7 @@ export {
3364
3364
  Oe as BLOCKCHAINS,
3365
3365
  hn as BankIcon,
3366
3366
  mn as CRYPTO_CHAIN_COMBOS,
3367
- Bt as CRYPTO_CURRENCIES,
3367
+ Ot as CRYPTO_CURRENCIES,
3368
3368
  vn as CardIcon,
3369
3369
  ta as CheckoutForm,
3370
3370
  Tn as CheckoutStep,
@@ -3376,17 +3376,17 @@ export {
3376
3376
  In as CompleteStep,
3377
3377
  Bn as ConfirmStep,
3378
3378
  Un as CryptoCurrencyModal,
3379
- Tt as CryptoIcon,
3379
+ kt as CryptoIcon,
3380
3380
  En as DarkModeIcon,
3381
3381
  Mn as ErrorStep,
3382
- Et as FIAT_CURRENCIES,
3382
+ wt as FIAT_CURRENCIES,
3383
3383
  cn as FIAT_TO_COUNTRY,
3384
3384
  Pn as FiatCurrencyModal,
3385
3385
  nt as FiatFlag,
3386
3386
  Dn as FormSkeleton,
3387
3387
  at as GenericCoinIcon,
3388
3388
  yn as GooglePayIcon,
3389
- At as MOCK_RATES,
3389
+ St as MOCK_RATES,
3390
3390
  Nn as MenuIcon,
3391
3391
  Ve as Modal,
3392
3392
  xn as PayPalIcon,
@@ -3395,19 +3395,19 @@ export {
3395
3395
  $n as RampForm,
3396
3396
  on as RampProvider,
3397
3397
  pn as RevolutIcon,
3398
- wt as SKINS,
3398
+ At as SKINS,
3399
3399
  je as SearchInput,
3400
3400
  Vn as SettingsScreen,
3401
3401
  M as Skeleton,
3402
3402
  na as SkinSwatch,
3403
3403
  Kn as ToggleSwitch,
3404
- Dt as formatOutput,
3405
- tt as getChainIconUrl,
3406
- Ot as getCryptoIconUrl,
3404
+ tt as formatOutput,
3405
+ et as getChainIconUrl,
3406
+ Ht as getCryptoIconUrl,
3407
3407
  sn as getFiatFlagUrl,
3408
3408
  qn as getMockRate,
3409
3409
  wn as getPaymentIcon,
3410
- Ht as isStablecoin,
3410
+ Dt as isStablecoin,
3411
3411
  un as parseAmount,
3412
3412
  nn as useCheckoutIntent,
3413
3413
  tn as useQuotes,