@unifold/ui-react 0.1.9 → 0.1.11

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/components/deposits/DepositModal.tsx
2
- import { useState as useState5, useEffect as useEffect5 } from "react";
2
+ import { useState as useState7, useEffect as useEffect6 } from "react";
3
3
  import { ChevronRight as ChevronRight7 } from "lucide-react";
4
4
 
5
5
  // src/components/shared/dialog.tsx
@@ -140,12 +140,11 @@ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @
140
140
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
141
141
 
142
142
  // src/components/deposits/TransferCryptoBase.tsx
143
- import { useState as useState2, useEffect as useEffect3 } from "react";
143
+ import { useState as useState4, useEffect as useEffect4 } from "react";
144
144
  import {
145
- ChevronDown as ChevronDown2,
146
- ChevronUp as ChevronUp2,
145
+ ChevronDown as ChevronDown3,
146
+ ChevronUp as ChevronUp3,
147
147
  Info,
148
- Copy,
149
148
  Check as Check2,
150
149
  DollarSign,
151
150
  ShieldCheck,
@@ -248,7 +247,7 @@ function StyledQRCode({
248
247
  }
249
248
 
250
249
  // src/components/deposits/DepositsModal.tsx
251
- import { useEffect as useEffect2, useState } from "react";
250
+ import { useEffect as useEffect3, useState as useState2 } from "react";
252
251
 
253
252
  // src/components/deposits/DepositHeader.tsx
254
253
  import { ArrowLeft, X as X2 } from "lucide-react";
@@ -287,204 +286,13 @@ function DepositHeader({
287
286
 
288
287
  // src/components/deposits/DepositExecutionItem.tsx
289
288
  import { ChevronRight } from "lucide-react";
290
-
291
- // src/lib/api.ts
292
- var API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL || "https://api.unifold.io";
293
- var DEFAULT_PUBLISHABLE_KEY = "pk_test_123";
294
- var DEFAULT_CONFIG = {};
295
- function setApiConfig(config) {
296
- if (config.baseUrl) {
297
- API_BASE_URL = config.baseUrl;
298
- }
299
- if (config.publishableKey) {
300
- DEFAULT_PUBLISHABLE_KEY = config.publishableKey;
301
- }
302
- if (config.defaultConfig) {
303
- DEFAULT_CONFIG = config.defaultConfig;
304
- }
305
- }
306
- function getApiBaseUrl() {
307
- return API_BASE_URL;
308
- }
309
- function getIconUrl(iconPath) {
310
- const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
311
- return `${API_BASE_URL}/api/public${normalizedPath}`;
312
- }
313
- function getIconUrlWithCdn(iconPath, assetCdnUrl) {
314
- if (!assetCdnUrl) {
315
- return getIconUrl(iconPath);
316
- }
317
- const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
318
- const baseUrl = assetCdnUrl.endsWith("/") ? assetCdnUrl.slice(0, -1) : assetCdnUrl;
319
- return `${baseUrl}/api/public${normalizedPath}`;
320
- }
321
- async function createEOA(overrides, publishableKey) {
322
- if (!overrides?.user_id) {
323
- throw new Error("user_id is required");
324
- }
325
- const payload = {
326
- user_id: overrides.user_id,
327
- destination_chain_type: overrides?.destination_chain_type || "ethereum",
328
- destination_chain_id: overrides?.destination_chain_id || DEFAULT_CONFIG.destinationChainId || "8453",
329
- destination_token_address: overrides?.destination_token_address || DEFAULT_CONFIG.destinationTokenAddress || "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
330
- recipient_address: overrides?.recipient_address || DEFAULT_CONFIG.recipientAddress || "0x309a4154a2CD4153Da886E780890C9cb5161553C",
331
- client_metadata: overrides?.client_metadata || {}
332
- };
333
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
334
- const response = await fetch(`${API_BASE_URL}/v1/public/deposit_addresses`, {
335
- method: "POST",
336
- headers: {
337
- accept: "application/json",
338
- "x-publishable-key": pk,
339
- "Content-Type": "application/json"
340
- },
341
- body: JSON.stringify(payload)
342
- });
343
- if (!response.ok) {
344
- throw new Error(`Failed to create EOA: ${response.statusText}`);
345
- }
346
- return response.json();
347
- }
348
- function getWalletByChainType(wallets, chainType) {
349
- return wallets.find((wallet) => wallet.chain_type === chainType);
350
- }
351
- var ExecutionStatus = /* @__PURE__ */ ((ExecutionStatus2) => {
352
- ExecutionStatus2["DELAYED"] = "delayed";
353
- ExecutionStatus2["FAILED"] = "failed";
354
- ExecutionStatus2["PENDING"] = "pending";
355
- ExecutionStatus2["REFUNDED"] = "refunded";
356
- ExecutionStatus2["SUCCEEDED"] = "succeeded";
357
- ExecutionStatus2["WAITING"] = "waiting";
358
- return ExecutionStatus2;
359
- })(ExecutionStatus || {});
360
- var SOLANA_USDC_ADDRESS = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
361
- async function queryExecutions(externalUserId, publishableKey) {
362
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
363
- const response = await fetch(
364
- `${API_BASE_URL}/v1/public/direct_executions/query`,
365
- {
366
- method: "POST",
367
- headers: {
368
- accept: "application/json",
369
- "x-publishable-key": pk,
370
- "Content-Type": "application/json"
371
- },
372
- body: JSON.stringify({
373
- external_user_id: externalUserId
374
- })
375
- }
376
- );
377
- if (!response.ok) {
378
- throw new Error(`Failed to query executions: ${response.statusText}`);
379
- }
380
- return response.json();
381
- }
382
- async function getSupportedDepositTokens(publishableKey) {
383
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
384
- const response = await fetch(
385
- `${API_BASE_URL}/v1/public/tokens/supported_deposit_tokens`,
386
- {
387
- method: "GET",
388
- headers: {
389
- accept: "application/json",
390
- "x-publishable-key": pk
391
- }
392
- }
393
- );
394
- if (!response.ok) {
395
- throw new Error(
396
- `Failed to fetch supported deposit tokens: ${response.statusText}`
397
- );
398
- }
399
- return response.json();
400
- }
401
- async function getMeldQuotes(request, publishableKey) {
402
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
403
- const response = await fetch(
404
- `${API_BASE_URL}/v1/public/onramps/meld/quotes`,
405
- {
406
- method: "POST",
407
- headers: {
408
- accept: "application/json",
409
- "x-publishable-key": pk,
410
- "Content-Type": "application/json"
411
- },
412
- body: JSON.stringify(request)
413
- }
414
- );
415
- if (!response.ok) {
416
- throw new Error(`Failed to fetch Meld quotes: ${response.statusText}`);
417
- }
418
- return response.json();
419
- }
420
- async function createMeldSession(request, publishableKey) {
421
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
422
- const response = await fetch(
423
- `${API_BASE_URL}/v1/public/onramps/meld/sessions`,
424
- {
425
- method: "POST",
426
- headers: {
427
- accept: "application/json",
428
- "x-publishable-key": pk,
429
- "Content-Type": "application/json"
430
- },
431
- body: JSON.stringify(request)
432
- }
433
- );
434
- if (!response.ok) {
435
- throw new Error(`Failed to create Meld session: ${response.statusText}`);
436
- }
437
- return response.json();
438
- }
439
- function getPreferredIconUrl(iconUrls, preferredFormat = "svg") {
440
- if (!iconUrls || iconUrls.length === 0) {
441
- return void 0;
442
- }
443
- const preferred = iconUrls.find((icon) => icon.format === preferredFormat);
444
- if (preferred) {
445
- return preferred.url;
446
- }
447
- return iconUrls[0]?.url;
448
- }
449
- async function getFiatCurrencies(publishableKey) {
450
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
451
- const response = await fetch(
452
- `${API_BASE_URL}/v1/public/onramps/fiat_currencies`,
453
- {
454
- method: "GET",
455
- headers: {
456
- accept: "application/json",
457
- "x-publishable-key": pk
458
- }
459
- }
460
- );
461
- if (!response.ok) {
462
- throw new Error(`Failed to fetch fiat currencies: ${response.statusText}`);
463
- }
464
- return response.json();
465
- }
466
- async function getProjectConfig(publishableKey) {
467
- const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
468
- const response = await fetch(`${API_BASE_URL}/v1/public/projects/config`, {
469
- method: "GET",
470
- headers: {
471
- accept: "application/json",
472
- "x-publishable-key": pk
473
- }
474
- });
475
- if (!response.ok) {
476
- throw new Error(`Failed to fetch project config: ${response.statusText}`);
477
- }
478
- return response.json();
479
- }
480
-
481
- // src/components/deposits/DepositExecutionItem.tsx
289
+ import { ExecutionStatus, getIconUrl } from "@unifold/core";
482
290
  import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
483
291
  function DepositExecutionItem({
484
292
  execution,
485
293
  onClick
486
294
  }) {
487
- const isPending = execution.status === "pending" /* PENDING */ || execution.status === "waiting" /* WAITING */ || execution.status === "delayed" /* DELAYED */;
295
+ const isPending = execution.status === ExecutionStatus.PENDING || execution.status === ExecutionStatus.WAITING || execution.status === ExecutionStatus.DELAYED;
488
296
  const formatDateTime = (timestamp) => {
489
297
  try {
490
298
  const date = new Date(timestamp);
@@ -551,7 +359,7 @@ function DepositExecutionItem({
551
359
  }
552
360
  )
553
361
  }
554
- ) }) : /* @__PURE__ */ jsx5("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-blue-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx5("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ jsx5(
362
+ ) }) : /* @__PURE__ */ jsx5("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx5("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ jsx5(
555
363
  "path",
556
364
  {
557
365
  d: "M10 3L4.5 8.5L2 6",
@@ -563,7 +371,7 @@ function DepositExecutionItem({
563
371
  ) }) })
564
372
  ] }),
565
373
  /* @__PURE__ */ jsxs3("div", { className: "uf-flex-1 uf-min-w-0", children: [
566
- /* @__PURE__ */ jsx5("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit received" : "Deposit completed" }),
374
+ /* @__PURE__ */ jsx5("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit processing" : "Deposit completed" }),
567
375
  /* @__PURE__ */ jsx5("p", { className: "uf-text-muted-foreground uf-text-xs uf-leading-tight", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
568
376
  ] }),
569
377
  /* @__PURE__ */ jsx5("span", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(execution.source_amount_base_unit) }),
@@ -573,30 +381,34 @@ function DepositExecutionItem({
573
381
  );
574
382
  }
575
383
 
576
- // src/components/deposits/DepositDetailModal.tsx
577
- import { ArrowDownCircle, CheckCircle, ExternalLink } from "lucide-react";
384
+ // src/components/deposits/DepositDetailContent.tsx
385
+ import { useEffect as useEffect2, useState } from "react";
386
+ import { ExternalLink, ChevronDown, ChevronUp } from "lucide-react";
387
+ import {
388
+ ExecutionStatus as ExecutionStatus2,
389
+ getIconUrl as getIconUrl2,
390
+ getTokenChains,
391
+ getChainName
392
+ } from "@unifold/core";
578
393
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
579
- var CHAIN_NAMES = {
580
- solana: "Solana",
581
- ethereum: "Ethereum",
582
- "1": "Ethereum",
583
- "137": "Polygon",
584
- "42161": "Arbitrum",
585
- "10": "Optimism",
586
- "8453": "Base",
587
- "43114": "Avalanche",
588
- "56": "BSC",
589
- bitcoin: "Bitcoin",
590
- mainnet: "Mainnet"
591
- };
592
- function DepositDetailModal({
593
- open,
594
- onOpenChange,
595
- execution,
596
- themeClass = ""
597
- }) {
598
- if (!execution) return null;
599
- const isPending = execution.status === "pending" /* PENDING */ || execution.status === "waiting" /* WAITING */ || execution.status === "delayed" /* DELAYED */;
394
+ function formatCurrency(currency) {
395
+ if (!currency) return "";
396
+ const dotIndex = currency.indexOf(".");
397
+ if (dotIndex === -1) {
398
+ return currency.toUpperCase();
399
+ }
400
+ return currency.slice(0, dotIndex).toUpperCase() + currency.slice(dotIndex);
401
+ }
402
+ function DepositDetailContent({ execution }) {
403
+ const [chains, setChains] = useState([]);
404
+ const [showNetworkDetails, setShowNetworkDetails] = useState(false);
405
+ useEffect2(() => {
406
+ getTokenChains().then((response) => setChains(response.data)).catch((err) => console.error("Failed to fetch chains:", err));
407
+ }, []);
408
+ useEffect2(() => {
409
+ setShowNetworkDetails(false);
410
+ }, [execution?.id]);
411
+ const isPending = execution.status === ExecutionStatus2.PENDING || execution.status === ExecutionStatus2.WAITING || execution.status === ExecutionStatus2.DELAYED;
600
412
  const formatDateTime = (timestamp) => {
601
413
  try {
602
414
  const date = new Date(timestamp);
@@ -651,173 +463,165 @@ function DepositDetailModal({
651
463
  return "$0.00";
652
464
  };
653
465
  const getNetworkName = (chainType, chainId) => {
654
- return CHAIN_NAMES[chainId] || CHAIN_NAMES[chainType] || chainType;
655
- };
656
- const getSourceTokenSymbol = () => {
657
- return "USDC";
466
+ return getChainName(chains, chainType, chainId);
658
467
  };
659
- const getDestinationTokenSymbol = () => {
660
- return "USDC";
468
+ const formatTransactionHash = (hash) => {
469
+ if (!hash || hash.length < 12) return hash;
470
+ return `${hash.slice(0, 12)}...${hash.slice(-4)}`;
661
471
  };
662
- const handleClose = () => {
663
- onOpenChange(false);
664
- };
665
- return /* @__PURE__ */ jsx6(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs4(
666
- DialogContent,
667
- {
668
- className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
669
- children: [
670
- /* @__PURE__ */ jsx6(DepositHeader, { title: "Deposit Details", onClose: handleClose }),
671
- /* @__PURE__ */ jsxs4("div", { className: "uf-px-4 uf-pb-4", children: [
672
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-flex-col uf-items-center uf-py-6", children: [
673
- /* @__PURE__ */ jsxs4("div", { className: "uf-relative uf-mb-3", children: [
674
- /* @__PURE__ */ jsx6(
675
- "img",
676
- {
677
- src: execution.destination_token_metadata?.icon_url || getIconUrl("/icons/tokens/svg/usdc.svg"),
678
- alt: "Token",
679
- width: 64,
680
- height: 64,
681
- className: "uf-rounded-full"
682
- }
683
- ),
684
- isPending ? /* @__PURE__ */ jsx6("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-yellow-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx6(
685
- "svg",
686
- {
687
- width: "16",
688
- height: "16",
689
- viewBox: "0 0 12 12",
690
- fill: "none",
691
- className: "uf-animate-spin uf-block",
692
- children: /* @__PURE__ */ jsx6(
693
- "path",
694
- {
695
- d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
696
- stroke: "white",
697
- strokeWidth: "2",
698
- strokeLinecap: "round"
699
- }
700
- )
701
- }
702
- ) }) : /* @__PURE__ */ jsx6("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-blue-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx6(
703
- "svg",
704
- {
705
- width: "16",
706
- height: "16",
707
- viewBox: "0 0 12 12",
708
- fill: "none",
709
- className: "uf-block",
710
- children: /* @__PURE__ */ jsx6(
711
- "path",
712
- {
713
- d: "M10 3L4.5 8.5L2 6",
714
- stroke: "white",
715
- strokeWidth: "2",
716
- strokeLinecap: "round",
717
- strokeLinejoin: "round"
718
- }
719
- )
720
- }
721
- ) })
722
- ] }),
723
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mb-1", children: [
724
- /* @__PURE__ */ jsx6(
725
- "div",
726
- {
727
- className: `uf-w-2 uf-h-2 uf-rounded-full ${isPending ? "uf-bg-yellow-500" : "uf-bg-green-500"}`
728
- }
729
- ),
730
- /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: isPending ? "Pending" : "Completed" })
731
- ] }),
732
- /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
733
- ] }),
734
- /* @__PURE__ */ jsxs4("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-3", children: [
735
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
736
- /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
737
- /* @__PURE__ */ jsxs4("span", { className: "uf-text-foreground uf-font-medium", children: [
738
- formatAmount(execution.source_amount_base_unit),
739
- " ",
740
- getSourceTokenSymbol()
741
- ] })
742
- ] }),
743
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
744
- /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
745
- /* @__PURE__ */ jsxs4("span", { className: "uf-text-foreground uf-font-medium", children: [
746
- formatAmount(execution.destination_amount_base_unit),
747
- " ",
748
- getDestinationTokenSymbol()
749
- ] })
750
- ] }),
751
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
752
- /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
753
- /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
754
- ] })
755
- ] }),
756
- /* @__PURE__ */ jsxs4("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-4", children: [
757
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
758
- /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
759
- /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
760
- ] }),
761
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
762
- /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
763
- /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
764
- ] })
765
- ] }),
766
- /* @__PURE__ */ jsxs4("div", { className: "uf-space-y-2", children: [
767
- execution.explorer_url && /* @__PURE__ */ jsxs4(
768
- "a",
472
+ return /* @__PURE__ */ jsxs4("div", { className: "uf-px-2", children: [
473
+ /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-flex-col uf-items-center uf-py-6", children: [
474
+ /* @__PURE__ */ jsxs4("div", { className: "uf-relative uf-mb-3", children: [
475
+ /* @__PURE__ */ jsx6(
476
+ "img",
477
+ {
478
+ src: execution.destination_token_metadata?.icon_url || getIconUrl2("/icons/tokens/svg/usdc.svg"),
479
+ alt: "Token",
480
+ width: 64,
481
+ height: 64,
482
+ className: "uf-rounded-full"
483
+ }
484
+ ),
485
+ isPending ? /* @__PURE__ */ jsx6("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-yellow-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx6(
486
+ "svg",
487
+ {
488
+ width: "16",
489
+ height: "16",
490
+ viewBox: "0 0 24 24",
491
+ fill: "none",
492
+ className: "uf-animate-spin uf-block",
493
+ children: /* @__PURE__ */ jsx6(
494
+ "path",
769
495
  {
770
- href: execution.explorer_url,
771
- target: "_blank",
772
- rel: "noopener noreferrer",
773
- className: "uf-flex uf-items-center uf-justify-between uf-w-full uf-bg-blue-400 hover:uf-bg-blue-500 uf-text-white uf-rounded-xl uf-px-4 uf-py-3 uf-transition-colors",
774
- children: [
775
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
776
- /* @__PURE__ */ jsx6(ArrowDownCircle, { className: "uf-w-5 uf-h-5" }),
777
- /* @__PURE__ */ jsx6("span", { className: "uf-font-medium", children: "View Deposit Transaction" })
778
- ] }),
779
- /* @__PURE__ */ jsx6(ExternalLink, { className: "uf-w-4 uf-h-4" })
780
- ]
496
+ d: "M21 12a9 9 0 1 1-6.22-8.56",
497
+ stroke: "white",
498
+ strokeWidth: "3",
499
+ strokeLinecap: "round"
781
500
  }
782
- ),
783
- !isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ jsxs4(
784
- "a",
501
+ )
502
+ }
503
+ ) }) : /* @__PURE__ */ jsx6("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-green-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx6(
504
+ "svg",
505
+ {
506
+ width: "16",
507
+ height: "16",
508
+ viewBox: "0 0 12 12",
509
+ fill: "none",
510
+ className: "uf-block",
511
+ children: /* @__PURE__ */ jsx6(
512
+ "path",
785
513
  {
786
- href: execution.destination_explorer_url,
787
- target: "_blank",
788
- rel: "noopener noreferrer",
789
- className: "uf-flex uf-items-center uf-justify-between uf-w-full uf-bg-blue-600 hover:uf-bg-blue-700 uf-text-white uf-rounded-xl uf-px-4 uf-py-3 uf-transition-colors",
790
- children: [
791
- /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
792
- /* @__PURE__ */ jsx6(CheckCircle, { className: "uf-w-5 uf-h-5" }),
793
- /* @__PURE__ */ jsx6("span", { className: "uf-font-medium", children: "View Completion Transaction" })
794
- ] }),
795
- /* @__PURE__ */ jsx6(ExternalLink, { className: "uf-w-4 uf-h-4" })
796
- ]
514
+ d: "M10 3L4.5 8.5L2 6",
515
+ stroke: "white",
516
+ strokeWidth: "2",
517
+ strokeLinecap: "round",
518
+ strokeLinejoin: "round"
797
519
  }
798
520
  )
799
- ] }),
800
- /* @__PURE__ */ jsx6("p", { className: "uf-text-center uf-text-muted-foreground uf-text-xs uf-mt-4", children: "Links open in external browser" })
521
+ }
522
+ ) })
523
+ ] }),
524
+ /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mb-1", children: [
525
+ /* @__PURE__ */ jsx6(
526
+ "div",
527
+ {
528
+ className: `uf-w-2 uf-h-2 uf-rounded-full ${isPending ? "uf-bg-yellow-500" : "uf-bg-green-500"}`
529
+ }
530
+ ),
531
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: isPending ? "Processing" : "Completed" })
532
+ ] }),
533
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
534
+ ] }),
535
+ /* @__PURE__ */ jsxs4("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-3", children: [
536
+ /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
537
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
538
+ /* @__PURE__ */ jsxs4("span", { className: "uf-text-foreground uf-font-medium", children: [
539
+ formatAmount(execution.source_amount_base_unit),
540
+ " ",
541
+ formatCurrency(execution.source_currency)
801
542
  ] })
802
- ]
803
- }
804
- ) });
543
+ ] }),
544
+ /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
545
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
546
+ /* @__PURE__ */ jsxs4("span", { className: "uf-text-foreground uf-font-medium", children: [
547
+ formatAmount(execution.destination_amount_base_unit),
548
+ " ",
549
+ formatCurrency(execution.destination_currency)
550
+ ] })
551
+ ] }),
552
+ /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
553
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
554
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
555
+ ] }),
556
+ /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
557
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
558
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
559
+ ] }),
560
+ /* @__PURE__ */ jsxs4("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
561
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
562
+ /* @__PURE__ */ jsx6("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
563
+ ] })
564
+ ] }),
565
+ /* @__PURE__ */ jsxs4(
566
+ "button",
567
+ {
568
+ type: "button",
569
+ onClick: () => setShowNetworkDetails(!showNetworkDetails),
570
+ className: "uf-flex uf-justify-between uf-items-center uf-w-full uf-px-3 uf-pb-3 uf-text-muted-foreground uf-text-sm hover:uf-text-foreground uf-transition-colors",
571
+ children: [
572
+ /* @__PURE__ */ jsx6("span", { children: showNetworkDetails ? "See less" : "See more details" }),
573
+ showNetworkDetails ? /* @__PURE__ */ jsx6(ChevronUp, { className: "uf-w-4 uf-h-4" }) : /* @__PURE__ */ jsx6(ChevronDown, { className: "uf-w-4 uf-h-4" })
574
+ ]
575
+ }
576
+ ),
577
+ showNetworkDetails && /* @__PURE__ */ jsxs4("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-4", children: [
578
+ execution.transaction_hash && execution.explorer_url && /* @__PURE__ */ jsxs4(
579
+ "a",
580
+ {
581
+ href: execution.explorer_url,
582
+ target: "_blank",
583
+ rel: "noopener noreferrer",
584
+ className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3 uf-border-b uf-border-border/50 hover:uf-bg-card/50 uf-transition-colors",
585
+ children: [
586
+ /* @__PURE__ */ jsx6("div", { className: "uf-text-muted-foreground uf-text-sm", children: "Deposit Tx" }),
587
+ /* @__PURE__ */ jsx6("div", { className: "uf-text-sm uf-text-foreground uf-text-right", children: formatTransactionHash(execution.transaction_hash) }),
588
+ /* @__PURE__ */ jsx6(ExternalLink, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground uf-block" })
589
+ ]
590
+ }
591
+ ),
592
+ !isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ jsxs4(
593
+ "a",
594
+ {
595
+ href: execution.destination_explorer_url,
596
+ target: "_blank",
597
+ rel: "noopener noreferrer",
598
+ className: "uf-grid uf-grid-cols-[auto_1fr_auto] uf-items-center uf-gap-2 uf-px-4 uf-py-3 hover:uf-bg-card/50 uf-transition-colors",
599
+ children: [
600
+ /* @__PURE__ */ jsx6("div", { className: "uf-text-muted-foreground uf-text-sm", children: "Completion Tx" }),
601
+ /* @__PURE__ */ jsx6("div", { className: "uf-text-sm uf-text-foreground uf-text-right", children: formatTransactionHash(execution.destination_transaction_hashes[0]) }),
602
+ /* @__PURE__ */ jsx6(ExternalLink, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground uf-block" })
603
+ ]
604
+ }
605
+ )
606
+ ] })
607
+ ] });
805
608
  }
806
609
 
807
610
  // src/components/deposits/DepositsModal.tsx
611
+ import { queryExecutions } from "@unifold/core";
808
612
  import { Fragment, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
809
613
  function DepositsModal({
810
614
  open,
811
615
  onOpenChange,
616
+ onCloseAll,
812
617
  executions: sessionExecutions,
813
618
  userId,
814
619
  publishableKey,
815
620
  themeClass = ""
816
621
  }) {
817
- const [allExecutions, setAllExecutions] = useState(sessionExecutions);
818
- const [selectedExecution, setSelectedExecution] = useState(null);
819
- const [detailModalOpen, setDetailModalOpen] = useState(false);
820
- useEffect2(() => {
622
+ const [allExecutions, setAllExecutions] = useState2(sessionExecutions);
623
+ const [selectedExecution, setSelectedExecution] = useState2(null);
624
+ useEffect3(() => {
821
625
  if (!open || !userId) return;
822
626
  const fetchExecutions = async () => {
823
627
  try {
@@ -839,49 +643,74 @@ function DepositsModal({
839
643
  clearInterval(pollInterval);
840
644
  };
841
645
  }, [open, userId, publishableKey, sessionExecutions]);
646
+ useEffect3(() => {
647
+ if (!open) {
648
+ setSelectedExecution(null);
649
+ }
650
+ }, [open]);
651
+ const handleBack = () => {
652
+ if (selectedExecution) {
653
+ setSelectedExecution(null);
654
+ } else {
655
+ onOpenChange(false);
656
+ }
657
+ };
842
658
  const handleClose = () => {
843
659
  onOpenChange(false);
660
+ onCloseAll?.();
844
661
  };
845
662
  const handleExecutionClick = (execution) => {
846
663
  setSelectedExecution(execution);
847
- setDetailModalOpen(true);
848
664
  };
849
- return /* @__PURE__ */ jsxs5(Fragment, { children: [
850
- /* @__PURE__ */ jsx7(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs5(DialogContent, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
851
- /* @__PURE__ */ jsx7(DepositHeader, { title: "Deposit Tracker", onClose: handleClose }),
852
- /* @__PURE__ */ jsx7("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden uf-pb-4", children: /* @__PURE__ */ jsx7("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx7("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx7("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx7(Fragment, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx7(
853
- DepositExecutionItem,
854
- {
855
- execution,
856
- onClick: () => handleExecutionClick(execution)
857
- },
858
- execution.id
859
- )) }) }) })
860
- ] }) }),
665
+ return /* @__PURE__ */ jsx7(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsx7(DialogContent, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: selectedExecution ? /* @__PURE__ */ jsxs5(Fragment, { children: [
861
666
  /* @__PURE__ */ jsx7(
862
- DepositDetailModal,
667
+ DepositHeader,
863
668
  {
864
- open: detailModalOpen,
865
- onOpenChange: setDetailModalOpen,
866
- execution: selectedExecution,
867
- themeClass
669
+ title: "Deposit Details",
670
+ showBack: true,
671
+ onBack: () => setSelectedExecution(null),
672
+ onClose: handleClose
868
673
  }
869
- )
870
- ] });
674
+ ),
675
+ /* @__PURE__ */ jsx7(DepositDetailContent, { execution: selectedExecution })
676
+ ] }) : /* @__PURE__ */ jsxs5(Fragment, { children: [
677
+ /* @__PURE__ */ jsx7(
678
+ DepositHeader,
679
+ {
680
+ title: "Deposit Tracker",
681
+ showBack: true,
682
+ onBack: handleBack,
683
+ onClose: handleClose
684
+ }
685
+ ),
686
+ /* @__PURE__ */ jsx7("div", { className: "uf-max-h-[400px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsx7("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx7("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx7("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx7(Fragment, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx7(
687
+ DepositExecutionItem,
688
+ {
689
+ execution,
690
+ onClick: () => handleExecutionClick(execution)
691
+ },
692
+ execution.id
693
+ )) }) }) })
694
+ ] }) }) });
871
695
  }
872
696
 
873
697
  // src/components/deposits/DepositSuccessToast.tsx
698
+ import { useState as useState3 } from "react";
874
699
  import { X as X3 } from "lucide-react";
875
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
700
+ import { ExecutionStatus as ExecutionStatus3, getIconUrl as getIconUrl3 } from "@unifold/core";
701
+ import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
876
702
  function DepositSuccessToast({
877
703
  depositTx,
878
704
  orderSubmittedAt,
879
705
  status,
880
706
  tokenIconUrl,
881
707
  sourceAmountBaseUnit = "0",
882
- onClose
708
+ onClose,
709
+ execution
883
710
  }) {
884
- const isPending = status === "pending" /* PENDING */ || status === "waiting" /* WAITING */ || status === "delayed" /* DELAYED */;
711
+ const [detailModalOpen, setDetailModalOpen] = useState3(false);
712
+ const { themeClass } = useTheme();
713
+ const isPending = status === ExecutionStatus3.PENDING || status === ExecutionStatus3.WAITING || status === ExecutionStatus3.DELAYED;
885
714
  const formatDateTime = (timestamp) => {
886
715
  try {
887
716
  const date = new Date(timestamp);
@@ -913,67 +742,130 @@ function DepositSuccessToast({
913
742
  return "$0.00";
914
743
  }
915
744
  };
916
- return /* @__PURE__ */ jsx8("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ jsxs6("div", { className: "uf-bg-card uf-border uf-border-border uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-gap-3", children: [
917
- /* @__PURE__ */ jsxs6("div", { className: "uf-relative uf-flex-shrink-0", children: [
918
- /* @__PURE__ */ jsx8(
919
- "img",
920
- {
921
- src: tokenIconUrl || getIconUrl("/icons/tokens/svg/usdc.svg"),
922
- alt: "Token",
923
- width: 36,
924
- height: 36,
925
- className: "uf-rounded-full"
926
- }
927
- ),
928
- isPending ? /* @__PURE__ */ jsx8("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-yellow-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx8(
745
+ return /* @__PURE__ */ jsxs6(Fragment2, { children: [
746
+ isPending && /* @__PURE__ */ jsx8("style", { children: `
747
+ @keyframes border-travel {
748
+ from { stroke-dashoffset: 0; }
749
+ to { stroke-dashoffset: -1000; }
750
+ }
751
+ ` }),
752
+ /* @__PURE__ */ jsx8("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ jsxs6("div", { className: "uf-relative uf-rounded-xl", children: [
753
+ isPending && /* @__PURE__ */ jsx8(
929
754
  "svg",
930
755
  {
931
- width: "10",
932
- height: "10",
933
- viewBox: "0 0 12 12",
934
- fill: "none",
935
- className: "uf-animate-spin",
756
+ className: "uf-absolute uf-inset-0 uf-w-full uf-h-full uf-pointer-events-none uf-z-[1]",
757
+ style: { overflow: "visible" },
936
758
  children: /* @__PURE__ */ jsx8(
937
- "path",
759
+ "rect",
938
760
  {
939
- d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
940
- stroke: "white",
941
- strokeWidth: "2",
942
- strokeLinecap: "round"
761
+ x: "5",
762
+ y: "2",
763
+ rx: "10",
764
+ ry: "10",
765
+ fill: "none",
766
+ stroke: "#ecc94b",
767
+ strokeWidth: "3",
768
+ strokeDasharray: "120 880",
769
+ strokeLinecap: "round",
770
+ pathLength: "1000",
771
+ style: {
772
+ width: "calc(100% - 10px)",
773
+ height: "calc(100% - 4px)",
774
+ animation: "border-travel 2.5s linear infinite"
775
+ }
943
776
  }
944
777
  )
945
778
  }
946
- ) }) : /* @__PURE__ */ jsx8("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx8("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx8(
947
- "path",
779
+ ),
780
+ /* @__PURE__ */ jsxs6(
781
+ "div",
948
782
  {
949
- d: "M10 3L4.5 8.5L2 6",
950
- stroke: "white",
951
- strokeWidth: "2",
952
- strokeLinecap: "round",
953
- strokeLinejoin: "round"
783
+ onClick: () => execution && setDetailModalOpen(true),
784
+ className: `uf-relative uf-bg-white dark:uf-bg-black hover:uf-opacity-90 uf-rounded-xl uf-p-3 uf-mx-1 uf-flex uf-items-center uf-gap-3 uf-transition-all uf-cursor-pointer ${isPending ? "" : "uf-border uf-border-zinc-300 dark:uf-border-zinc-700"}`,
785
+ children: [
786
+ /* @__PURE__ */ jsxs6("div", { className: "uf-relative uf-flex-shrink-0", children: [
787
+ /* @__PURE__ */ jsx8(
788
+ "img",
789
+ {
790
+ src: tokenIconUrl || getIconUrl3("/icons/tokens/svg/usdc.svg"),
791
+ alt: "Token",
792
+ width: 36,
793
+ height: 36,
794
+ className: "uf-rounded-full"
795
+ }
796
+ ),
797
+ isPending ? /* @__PURE__ */ jsx8("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-yellow-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx8(
798
+ "svg",
799
+ {
800
+ width: "10",
801
+ height: "10",
802
+ viewBox: "0 0 24 24",
803
+ fill: "none",
804
+ className: "uf-animate-spin",
805
+ children: /* @__PURE__ */ jsx8(
806
+ "path",
807
+ {
808
+ d: "M21 12a9 9 0 1 1-6.22-8.56",
809
+ stroke: "white",
810
+ strokeWidth: "3",
811
+ strokeLinecap: "round"
812
+ }
813
+ )
814
+ }
815
+ ) }) : /* @__PURE__ */ jsx8("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx8("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx8(
816
+ "path",
817
+ {
818
+ d: "M10 3L4.5 8.5L2 6",
819
+ stroke: "white",
820
+ strokeWidth: "2",
821
+ strokeLinecap: "round",
822
+ strokeLinejoin: "round"
823
+ }
824
+ ) }) })
825
+ ] }),
826
+ /* @__PURE__ */ jsxs6("div", { className: "uf-flex-1 uf-min-w-0", children: [
827
+ /* @__PURE__ */ jsx8("h3", { className: "uf-text-black dark:uf-text-white uf-font-medium uf-text-sm", children: isPending ? "Deposit processing" : "Deposit completed" }),
828
+ /* @__PURE__ */ jsx8("p", { className: "uf-text-zinc-600 dark:uf-text-zinc-400 uf-text-xs", children: formatDateTime(orderSubmittedAt) })
829
+ ] }),
830
+ /* @__PURE__ */ jsx8("div", { className: "uf-text-black dark:uf-text-white uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(sourceAmountBaseUnit) }),
831
+ /* @__PURE__ */ jsx8(
832
+ "button",
833
+ {
834
+ onClick: (e) => {
835
+ e.stopPropagation();
836
+ onClose();
837
+ },
838
+ className: "uf-text-zinc-600 dark:uf-text-zinc-400 hover:uf-text-black dark:hover:uf-text-white uf-transition-colors uf-p-0.5 uf-flex-shrink-0",
839
+ children: /* @__PURE__ */ jsx8(X3, { className: "uf-w-4 uf-h-4" })
840
+ }
841
+ )
842
+ ]
954
843
  }
955
- ) }) })
956
- ] }),
957
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex-1 uf-min-w-0", children: [
958
- /* @__PURE__ */ jsx8("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm", children: isPending ? "Deposit received" : "Deposit completed" }),
959
- /* @__PURE__ */ jsx8("p", { className: "uf-text-muted-foreground uf-text-xs", children: formatDateTime(orderSubmittedAt) })
960
- ] }),
961
- /* @__PURE__ */ jsx8("div", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(sourceAmountBaseUnit) }),
962
- /* @__PURE__ */ jsx8(
963
- "button",
964
- {
965
- onClick: onClose,
966
- className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0",
967
- children: /* @__PURE__ */ jsx8(X3, { className: "uf-w-4 uf-h-4" })
968
- }
969
- )
970
- ] }) });
844
+ )
845
+ ] }) }),
846
+ execution && /* @__PURE__ */ jsx8(Dialog, { open: detailModalOpen, onOpenChange: setDetailModalOpen, children: /* @__PURE__ */ jsxs6(DialogContent, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-mt-8 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
847
+ /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-justify-between uf-px-4", children: [
848
+ /* @__PURE__ */ jsx8("div", { className: "uf-w-8" }),
849
+ " ",
850
+ /* @__PURE__ */ jsx8("h2", { className: "uf-text-lg uf-font-semibold uf-text-foreground", children: "Deposit Details" }),
851
+ /* @__PURE__ */ jsx8(
852
+ "button",
853
+ {
854
+ onClick: () => setDetailModalOpen(false),
855
+ className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-w-8 uf-flex uf-justify-end",
856
+ children: /* @__PURE__ */ jsx8(X3, { className: "uf-w-5 uf-h-5" })
857
+ }
858
+ )
859
+ ] }),
860
+ /* @__PURE__ */ jsx8(DepositDetailContent, { execution })
861
+ ] }) })
862
+ ] });
971
863
  }
972
864
 
973
865
  // src/components/shared/select.tsx
974
866
  import * as React3 from "react";
975
867
  import * as SelectPrimitive from "@radix-ui/react-select";
976
- import { Check, ChevronDown, ChevronUp } from "lucide-react";
868
+ import { Check, ChevronDown as ChevronDown2, ChevronUp as ChevronUp2 } from "lucide-react";
977
869
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
978
870
  var Select = SelectPrimitive.Root;
979
871
  var SelectGroup = SelectPrimitive.Group;
@@ -989,7 +881,7 @@ var SelectTrigger = React3.forwardRef(({ className, children, ...props }, ref) =
989
881
  ...props,
990
882
  children: [
991
883
  children,
992
- /* @__PURE__ */ jsx9(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx9(ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
884
+ /* @__PURE__ */ jsx9(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx9(ChevronDown2, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
993
885
  ]
994
886
  }
995
887
  ));
@@ -1003,7 +895,7 @@ var SelectScrollUpButton = React3.forwardRef(({ className, ...props }, ref) => /
1003
895
  className
1004
896
  ),
1005
897
  ...props,
1006
- children: /* @__PURE__ */ jsx9(ChevronUp, { className: "uf-h-4 uf-w-4" })
898
+ children: /* @__PURE__ */ jsx9(ChevronUp2, { className: "uf-h-4 uf-w-4" })
1007
899
  }
1008
900
  ));
1009
901
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
@@ -1016,7 +908,7 @@ var SelectScrollDownButton = React3.forwardRef(({ className, ...props }, ref) =>
1016
908
  className
1017
909
  ),
1018
910
  ...props,
1019
- children: /* @__PURE__ */ jsx9(ChevronDown, { className: "uf-h-4 uf-w-4" })
911
+ children: /* @__PURE__ */ jsx9(ChevronDown2, { className: "uf-h-4 uf-w-4" })
1020
912
  }
1021
913
  ));
1022
914
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
@@ -1087,61 +979,16 @@ var SelectSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__
1087
979
  ));
1088
980
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
1089
981
 
1090
- // src/components/shared/button.tsx
1091
- import * as React4 from "react";
1092
- import { Slot } from "@radix-ui/react-slot";
1093
- import { cva } from "class-variance-authority";
1094
- import { jsx as jsx10 } from "react/jsx-runtime";
1095
- var buttonVariants = cva(
1096
- "uf-inline-flex uf-items-center uf-justify-center uf-whitespace-nowrap uf-rounded-md uf-text-sm uf-font-medium uf-ring-offset-background uf-transition-colors focus-visible:uf-outline-none focus-visible:uf-ring-2 focus-visible:uf-ring-ring focus-visible:uf-ring-offset-2 disabled:uf-pointer-events-none disabled:uf-opacity-50",
1097
- {
1098
- variants: {
1099
- variant: {
1100
- default: "uf-bg-primary uf-text-primary-foreground hover:uf-bg-primary/90",
1101
- destructive: "uf-bg-destructive uf-text-destructive-foreground hover:uf-bg-destructive/90",
1102
- outline: "uf-border uf-border-input uf-bg-background hover:uf-bg-accent hover:uf-text-accent-foreground",
1103
- secondary: "uf-bg-secondary uf-text-secondary-foreground hover:uf-bg-secondary/80",
1104
- ghost: "hover:uf-bg-accent hover:uf-text-accent-foreground",
1105
- link: "uf-text-primary uf-underline-offset-4 hover:uf-underline"
1106
- },
1107
- size: {
1108
- default: "uf-h-10 uf-px-4 uf-py-2",
1109
- sm: "uf-h-9 uf-rounded-md uf-px-3",
1110
- lg: "uf-h-11 uf-rounded-md uf-px-8",
1111
- icon: "uf-h-10 uf-w-10"
1112
- }
1113
- },
1114
- defaultVariants: {
1115
- variant: "default",
1116
- size: "default"
1117
- }
1118
- }
1119
- );
1120
- var Button = React4.forwardRef(
1121
- ({ className, variant, size, asChild = false, ...props }, ref) => {
1122
- const Comp = asChild ? Slot : "button";
1123
- return /* @__PURE__ */ jsx10(
1124
- Comp,
1125
- {
1126
- className: cn(buttonVariants({ variant, size, className })),
1127
- ref,
1128
- ...props
1129
- }
1130
- );
1131
- }
1132
- );
1133
- Button.displayName = "Button";
1134
-
1135
982
  // src/components/shared/tooltip.tsx
1136
- import * as React5 from "react";
983
+ import * as React4 from "react";
1137
984
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
1138
- import { jsx as jsx11 } from "react/jsx-runtime";
985
+ import { jsx as jsx10 } from "react/jsx-runtime";
1139
986
  var TooltipProvider = TooltipPrimitive.Provider;
1140
987
  var Tooltip = TooltipPrimitive.Root;
1141
988
  var TooltipTrigger = TooltipPrimitive.Trigger;
1142
- var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
989
+ var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
1143
990
  const { themeClass } = useTheme();
1144
- return /* @__PURE__ */ jsx11(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx11(
991
+ return /* @__PURE__ */ jsx10(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx10(
1145
992
  TooltipPrimitive.Content,
1146
993
  {
1147
994
  ref,
@@ -1157,6 +1004,15 @@ var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props },
1157
1004
  });
1158
1005
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
1159
1006
 
1007
+ // src/components/deposits/TransferCryptoBase.tsx
1008
+ import {
1009
+ createDepositAddress,
1010
+ getWalletByChainType,
1011
+ queryExecutions as queryExecutions2,
1012
+ getSupportedDepositTokens,
1013
+ ExecutionStatus as ExecutionStatus4
1014
+ } from "@unifold/core";
1015
+
1160
1016
  // src/lib/i18n/en.json
1161
1017
  var en_default = {
1162
1018
  transferCrypto: {
@@ -1227,7 +1083,7 @@ var en_default = {
1227
1083
  var i18n = en_default;
1228
1084
 
1229
1085
  // src/components/deposits/TransferCryptoBase.tsx
1230
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
1086
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
1231
1087
  var t = i18n.transferCrypto;
1232
1088
  var getChainKey = (chainId, chainType) => {
1233
1089
  return `${chainType}:${chainId}`;
@@ -1243,7 +1099,6 @@ function TransferCryptoBase({
1243
1099
  destinationChainType,
1244
1100
  destinationChainId,
1245
1101
  destinationTokenAddress,
1246
- copyButtonMode = "compact",
1247
1102
  layoutVariant = "horizontal",
1248
1103
  showDetailedDropdowns = false,
1249
1104
  onExecutionsChange,
@@ -1253,20 +1108,20 @@ function TransferCryptoBase({
1253
1108
  }) {
1254
1109
  const { themeClass } = useTheme();
1255
1110
  const isDarkMode = themeClass.includes("uf-dark");
1256
- const [token, setToken] = useState2("USDC");
1257
- const [chain, setChain] = useState2("solana:mainnet");
1258
- const [copied, setCopied] = useState2(false);
1259
- const [internalWallets, setInternalWallets] = useState2([]);
1260
- const [loading, setLoading] = useState2(!externalWallets?.length);
1111
+ const [token, setToken] = useState4("USDC");
1112
+ const [chain, setChain] = useState4("solana:mainnet");
1113
+ const [copied, setCopied] = useState4(false);
1114
+ const [internalWallets, setInternalWallets] = useState4([]);
1115
+ const [loading, setLoading] = useState4(!externalWallets?.length);
1261
1116
  const wallets = externalWallets?.length ? externalWallets : internalWallets;
1262
- const [error, setError] = useState2(null);
1263
- const [depositExecutions, setDepositExecutions] = useState2([]);
1264
- const [trackedExecutions, setTrackedExecutions] = useState2(/* @__PURE__ */ new Map());
1265
- const [modalOpenedAt, setModalOpenedAt] = useState2(null);
1266
- const [supportedTokens, setSupportedTokens] = useState2([]);
1267
- const [tokensLoading, setTokensLoading] = useState2(true);
1268
- const [detailsExpanded, setDetailsExpanded] = useState2(false);
1269
- const [depositsModalOpen, setDepositsModalOpen] = useState2(false);
1117
+ const [error, setError] = useState4(null);
1118
+ const [depositExecutions, setDepositExecutions] = useState4([]);
1119
+ const [trackedExecutions, setTrackedExecutions] = useState4(/* @__PURE__ */ new Map());
1120
+ const [modalOpenedAt, setModalOpenedAt] = useState4(null);
1121
+ const [supportedTokens, setSupportedTokens] = useState4([]);
1122
+ const [tokensLoading, setTokensLoading] = useState4(true);
1123
+ const [detailsExpanded, setDetailsExpanded] = useState4(false);
1124
+ const [depositsModalOpen, setDepositsModalOpen] = useState4(false);
1270
1125
  const allChainsMap = /* @__PURE__ */ new Map();
1271
1126
  supportedTokens.forEach((t4) => {
1272
1127
  t4.chains.forEach((c) => {
@@ -1284,10 +1139,10 @@ function TransferCryptoBase({
1284
1139
  const currentChainType = currentChainData?.chain_type || "ethereum";
1285
1140
  const currentWallet = getWalletByChainType(wallets, currentChainType);
1286
1141
  const depositAddress = currentWallet?.address || "";
1287
- useEffect3(() => {
1142
+ useEffect4(() => {
1288
1143
  setModalOpenedAt(/* @__PURE__ */ new Date());
1289
1144
  }, []);
1290
- useEffect3(() => {
1145
+ useEffect4(() => {
1291
1146
  async function fetchSupportedTokens() {
1292
1147
  try {
1293
1148
  setTokensLoading(true);
@@ -1316,25 +1171,29 @@ function TransferCryptoBase({
1316
1171
  }
1317
1172
  fetchSupportedTokens();
1318
1173
  }, [publishableKey, chain]);
1319
- useEffect3(() => {
1174
+ useEffect4(() => {
1320
1175
  if (onExecutionsChange) {
1321
1176
  onExecutionsChange(depositExecutions);
1322
1177
  }
1323
1178
  }, [depositExecutions, onExecutionsChange]);
1324
- useEffect3(() => {
1179
+ useEffect4(() => {
1325
1180
  if (externalWallets?.length) {
1326
1181
  setLoading(false);
1327
1182
  return;
1328
1183
  }
1184
+ if (internalWallets.length > 0) {
1185
+ setLoading(false);
1186
+ return;
1187
+ }
1329
1188
  let retryTimeout = null;
1330
1189
  let isCancelled = false;
1331
1190
  const fetchWallets = async () => {
1332
1191
  if (isCancelled) return;
1333
1192
  setLoading(true);
1334
1193
  try {
1335
- const response = await createEOA(
1194
+ const response = await createDepositAddress(
1336
1195
  {
1337
- user_id: userId,
1196
+ external_user_id: userId,
1338
1197
  recipient_address: recipientAddress,
1339
1198
  destination_chain_type: destinationChainType,
1340
1199
  destination_chain_id: destinationChainId,
@@ -1372,7 +1231,7 @@ function TransferCryptoBase({
1372
1231
  publishableKey,
1373
1232
  externalWallets
1374
1233
  ]);
1375
- useEffect3(() => {
1234
+ useEffect4(() => {
1376
1235
  if (!supportedTokens.length) return;
1377
1236
  const currentToken = supportedTokens.find((t4) => t4.symbol === token);
1378
1237
  if (!currentToken || currentToken.chains.length === 0) return;
@@ -1386,11 +1245,11 @@ function TransferCryptoBase({
1386
1245
  setChain(newChain);
1387
1246
  }
1388
1247
  }, [token, supportedTokens, chain]);
1389
- useEffect3(() => {
1248
+ useEffect4(() => {
1390
1249
  if (!userId || !modalOpenedAt) return;
1391
1250
  const pollInterval = setInterval(async () => {
1392
1251
  try {
1393
- const response = await queryExecutions(userId, publishableKey);
1252
+ const response = await queryExecutions2(userId, publishableKey);
1394
1253
  let executionToShow = null;
1395
1254
  for (const execution of response.data) {
1396
1255
  const executionTime = execution.created_at ? new Date(execution.created_at) : null;
@@ -1403,11 +1262,11 @@ function TransferCryptoBase({
1403
1262
  break;
1404
1263
  }
1405
1264
  const inProgressStatuses = [
1406
- "pending" /* PENDING */,
1407
- "waiting" /* WAITING */,
1408
- "delayed" /* DELAYED */
1265
+ ExecutionStatus4.PENDING,
1266
+ ExecutionStatus4.WAITING,
1267
+ ExecutionStatus4.DELAYED
1409
1268
  ];
1410
- if (inProgressStatuses.includes(trackedStatus) && execution.status === "succeeded" /* SUCCEEDED */) {
1269
+ if (inProgressStatuses.includes(trackedStatus) && execution.status === ExecutionStatus4.SUCCEEDED) {
1411
1270
  executionToShow = execution;
1412
1271
  break;
1413
1272
  }
@@ -1430,7 +1289,7 @@ function TransferCryptoBase({
1430
1289
  return updated;
1431
1290
  });
1432
1291
  if (onDepositSuccess) {
1433
- const isCompleted = execution.status === "succeeded" /* SUCCEEDED */;
1292
+ const isCompleted = execution.status === ExecutionStatus4.SUCCEEDED;
1434
1293
  if (isCompleted) {
1435
1294
  onDepositSuccess({
1436
1295
  message: "Deposit completed successfully",
@@ -1494,7 +1353,7 @@ function TransferCryptoBase({
1494
1353
  const minDepositUsd = currentChainFromBackend?.minimum_deposit_amount_usd ?? 3;
1495
1354
  const renderTokenItem = (tokenData) => {
1496
1355
  return /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
1497
- /* @__PURE__ */ jsx12(
1356
+ /* @__PURE__ */ jsx11(
1498
1357
  "img",
1499
1358
  {
1500
1359
  src: tokenData.icon_url,
@@ -1504,13 +1363,13 @@ function TransferCryptoBase({
1504
1363
  className: "uf-rounded-full uf-flex-shrink-0"
1505
1364
  }
1506
1365
  ),
1507
- /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
1508
- showDetailedDropdowns && /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
1366
+ /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
1367
+ showDetailedDropdowns && /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
1509
1368
  ] });
1510
1369
  };
1511
1370
  const renderChainItem = (chainData) => {
1512
1371
  return /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
1513
- /* @__PURE__ */ jsx12(
1372
+ /* @__PURE__ */ jsx11(
1514
1373
  "img",
1515
1374
  {
1516
1375
  src: chainData.icon_url,
@@ -1520,15 +1379,15 @@ function TransferCryptoBase({
1520
1379
  className: "uf-rounded-full uf-flex-shrink-0"
1521
1380
  }
1522
1381
  ),
1523
- /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
1524
- showDetailedDropdowns && /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
1382
+ /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
1383
+ showDetailedDropdowns && /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
1525
1384
  ] });
1526
1385
  };
1527
1386
  const selectContainerClass = layoutVariant === "horizontal" ? "uf-grid uf-grid-cols-2 uf-gap-2.5" : "uf-space-y-3";
1528
- return /* @__PURE__ */ jsx12(TooltipProvider, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs8("div", { className: "uf-space-y-3", children: [
1387
+ return /* @__PURE__ */ jsx11(TooltipProvider, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs8("div", { className: "uf-space-y-3", children: [
1529
1388
  /* @__PURE__ */ jsxs8("div", { className: selectContainerClass, children: [
1530
1389
  /* @__PURE__ */ jsxs8("div", { children: [
1531
- /* @__PURE__ */ jsx12("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
1390
+ /* @__PURE__ */ jsx11("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
1532
1391
  /* @__PURE__ */ jsxs8(
1533
1392
  Select,
1534
1393
  {
@@ -1536,8 +1395,8 @@ function TransferCryptoBase({
1536
1395
  onValueChange: setToken,
1537
1396
  disabled: tokensLoading || supportedTokens.length === 0,
1538
1397
  children: [
1539
- /* @__PURE__ */ jsx12(SelectTrigger, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx12(SelectValue, { children: tokensLoading ? /* @__PURE__ */ jsx12("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx12("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
1540
- /* @__PURE__ */ jsx12(SelectContent, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx12(
1398
+ /* @__PURE__ */ jsx11(SelectTrigger, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx11(SelectValue, { children: tokensLoading ? /* @__PURE__ */ jsx11("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx11("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
1399
+ /* @__PURE__ */ jsx11(SelectContent, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx11(
1541
1400
  SelectItem,
1542
1401
  {
1543
1402
  value: tokenData.symbol,
@@ -1560,23 +1419,23 @@ function TransferCryptoBase({
1560
1419
  t.minDeposit.label
1561
1420
  ] }),
1562
1421
  /* @__PURE__ */ jsxs8(Tooltip, { children: [
1563
- /* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx12(
1422
+ /* @__PURE__ */ jsx11(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx11(
1564
1423
  "span",
1565
1424
  {
1566
1425
  className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
1567
1426
  tabIndex: 0,
1568
1427
  role: "button",
1569
1428
  "aria-label": "Minimum deposit information",
1570
- children: /* @__PURE__ */ jsx12(Info, { className: "uf-w-3 uf-h-3" })
1429
+ children: /* @__PURE__ */ jsx11(Info, { className: "uf-w-3 uf-h-3" })
1571
1430
  }
1572
1431
  ) }),
1573
- /* @__PURE__ */ jsx12(
1432
+ /* @__PURE__ */ jsx11(
1574
1433
  TooltipContent,
1575
1434
  {
1576
1435
  side: "left",
1577
1436
  align: "center",
1578
1437
  className: "uf-max-w-[200px]",
1579
- children: /* @__PURE__ */ jsx12("p", { children: t.minDeposit.tooltip })
1438
+ children: /* @__PURE__ */ jsx11("p", { children: t.minDeposit.tooltip })
1580
1439
  }
1581
1440
  )
1582
1441
  ] })
@@ -1588,13 +1447,13 @@ function TransferCryptoBase({
1588
1447
  onValueChange: setChain,
1589
1448
  disabled: tokensLoading || availableChainsForToken.length === 0,
1590
1449
  children: [
1591
- /* @__PURE__ */ jsx12(SelectTrigger, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx12(SelectValue, { children: tokensLoading ? /* @__PURE__ */ jsx12("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx12("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx12("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
1592
- /* @__PURE__ */ jsx12(SelectContent, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx12("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
1450
+ /* @__PURE__ */ jsx11(SelectTrigger, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx11(SelectValue, { children: tokensLoading ? /* @__PURE__ */ jsx11("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx11("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx11("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
1451
+ /* @__PURE__ */ jsx11(SelectContent, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx11("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
1593
1452
  const chainKey = getChainKey(
1594
1453
  chainData.chain_id,
1595
1454
  chainData.chain_type
1596
1455
  );
1597
- return /* @__PURE__ */ jsx12(
1456
+ return /* @__PURE__ */ jsx11(
1598
1457
  SelectItem,
1599
1458
  {
1600
1459
  value: chainKey,
@@ -1609,14 +1468,14 @@ function TransferCryptoBase({
1609
1468
  )
1610
1469
  ] })
1611
1470
  ] }),
1612
- /* @__PURE__ */ jsx12("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx12("div", { className: "uf-bg-card uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx12(
1471
+ /* @__PURE__ */ jsx11("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx11("div", { className: "uf-bg-card uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx11(
1613
1472
  "div",
1614
1473
  {
1615
1474
  className: "uf-flex uf-items-center uf-justify-center",
1616
1475
  style: { width: 180, height: 180 },
1617
- children: /* @__PURE__ */ jsx12("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
1476
+ children: /* @__PURE__ */ jsx11("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
1618
1477
  }
1619
- ) : depositAddress ? /* @__PURE__ */ jsx12(
1478
+ ) : depositAddress ? /* @__PURE__ */ jsx11(
1620
1479
  StyledQRCode,
1621
1480
  {
1622
1481
  value: depositAddress,
@@ -1626,12 +1485,12 @@ function TransferCryptoBase({
1626
1485
  darkMode: isDarkMode
1627
1486
  },
1628
1487
  `qr-${depositAddress}-${chain}`
1629
- ) : /* @__PURE__ */ jsx12(
1488
+ ) : /* @__PURE__ */ jsx11(
1630
1489
  "div",
1631
1490
  {
1632
1491
  className: "uf-flex uf-items-center uf-justify-center",
1633
1492
  style: { width: 180, height: 180 },
1634
- children: /* @__PURE__ */ jsx12("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
1493
+ children: /* @__PURE__ */ jsx11("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
1635
1494
  }
1636
1495
  ) }) }),
1637
1496
  /* @__PURE__ */ jsxs8("div", { children: [
@@ -1639,60 +1498,42 @@ function TransferCryptoBase({
1639
1498
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-1", children: [
1640
1499
  t.depositAddress.label,
1641
1500
  /* @__PURE__ */ jsxs8(Tooltip, { children: [
1642
- /* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx12(
1501
+ /* @__PURE__ */ jsx11(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx11(
1643
1502
  "span",
1644
1503
  {
1645
1504
  className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
1646
1505
  tabIndex: 0,
1647
1506
  role: "button",
1648
1507
  "aria-label": "Deposit address information",
1649
- children: /* @__PURE__ */ jsx12(Info, { className: "uf-w-3 uf-h-3" })
1508
+ children: /* @__PURE__ */ jsx11(Info, { className: "uf-w-3 uf-h-3" })
1650
1509
  }
1651
1510
  ) }),
1652
- /* @__PURE__ */ jsx12(
1511
+ /* @__PURE__ */ jsx11(
1653
1512
  TooltipContent,
1654
1513
  {
1655
1514
  side: "top",
1656
1515
  align: "center",
1657
1516
  className: "uf-max-w-[240px]",
1658
- children: /* @__PURE__ */ jsx12("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
1517
+ children: /* @__PURE__ */ jsx11("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
1659
1518
  }
1660
1519
  )
1661
1520
  ] })
1662
1521
  ] }),
1663
- copyButtonMode === "compact" && /* @__PURE__ */ jsx12(
1664
- "button",
1665
- {
1666
- onClick: handleCopyAddress,
1667
- disabled: loading || !depositAddress,
1668
- className: "uf-flex uf-items-center uf-gap-1 uf-text-xs uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
1669
- children: copied ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
1670
- /* @__PURE__ */ jsx12(Check2, { className: "uf-w-3 uf-h-3" }),
1671
- /* @__PURE__ */ jsx12("span", { children: t.copied })
1672
- ] }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
1673
- /* @__PURE__ */ jsx12(Copy, { className: "uf-w-3 uf-h-3" }),
1674
- /* @__PURE__ */ jsx12("span", { children: t.copyAddress })
1675
- ] })
1676
- }
1677
- )
1678
- ] }),
1679
- loading ? /* @__PURE__ */ jsx12("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx12("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsx12("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all", children: depositAddress || t.noAddressAvailable })
1680
- ] }),
1681
- copyButtonMode === "fullWidth" && /* @__PURE__ */ jsx12(
1682
- Button,
1683
- {
1684
- onClick: handleCopyAddress,
1685
- disabled: loading || !depositAddress,
1686
- className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-text-foreground uf-rounded-lg uf-h-9 uf-text-sm uf-font-medium disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
1687
- children: copied ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
1688
- /* @__PURE__ */ jsx12(Check2, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
1522
+ /* @__PURE__ */ jsxs8("span", { className: `uf-flex uf-items-center uf-gap-1 uf-text-green-500 uf-transition-opacity uf-duration-200 ${copied ? "uf-opacity-100" : "uf-opacity-0"}`, children: [
1523
+ /* @__PURE__ */ jsx11(Check2, { className: "uf-w-3 uf-h-3" }),
1689
1524
  t.copied
1690
- ] }) : /* @__PURE__ */ jsxs8(Fragment2, { children: [
1691
- /* @__PURE__ */ jsx12(Copy, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
1692
- t.copyAddress
1693
1525
  ] })
1694
- }
1695
- ),
1526
+ ] }),
1527
+ loading ? /* @__PURE__ */ jsx11("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx11("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsx11(
1528
+ "button",
1529
+ {
1530
+ onClick: handleCopyAddress,
1531
+ disabled: !depositAddress,
1532
+ className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all uf-text-left uf-transition-colors uf-cursor-pointer disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
1533
+ children: depositAddress || t.noAddressAvailable
1534
+ }
1535
+ )
1536
+ ] }),
1696
1537
  /* @__PURE__ */ jsxs8("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-3", children: [
1697
1538
  /* @__PURE__ */ jsxs8(
1698
1539
  "button",
@@ -1701,7 +1542,7 @@ function TransferCryptoBase({
1701
1542
  className: "uf-w-full uf-flex uf-items-center uf-justify-between uf-py-2.5",
1702
1543
  children: [
1703
1544
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
1704
- /* @__PURE__ */ jsx12("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx12(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
1545
+ /* @__PURE__ */ jsx11("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx11(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
1705
1546
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
1706
1547
  t.priceImpact.label,
1707
1548
  ":",
@@ -1712,7 +1553,7 @@ function TransferCryptoBase({
1712
1553
  ] })
1713
1554
  ] }),
1714
1555
  /* @__PURE__ */ jsxs8(Tooltip, { children: [
1715
- /* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx12(
1556
+ /* @__PURE__ */ jsx11(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx11(
1716
1557
  "span",
1717
1558
  {
1718
1559
  className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
@@ -1725,27 +1566,27 @@ function TransferCryptoBase({
1725
1566
  tabIndex: 0,
1726
1567
  role: "button",
1727
1568
  "aria-label": "Price impact information",
1728
- children: /* @__PURE__ */ jsx12(Info, { className: "uf-w-3 uf-h-3" })
1569
+ children: /* @__PURE__ */ jsx11(Info, { className: "uf-w-3 uf-h-3" })
1729
1570
  }
1730
1571
  ) }),
1731
- /* @__PURE__ */ jsx12(
1572
+ /* @__PURE__ */ jsx11(
1732
1573
  TooltipContent,
1733
1574
  {
1734
1575
  side: "top",
1735
1576
  align: "center",
1736
1577
  className: "uf-max-w-[240px]",
1737
- children: /* @__PURE__ */ jsx12("p", { children: t.priceImpact.tooltip })
1578
+ children: /* @__PURE__ */ jsx11("p", { children: t.priceImpact.tooltip })
1738
1579
  }
1739
1580
  )
1740
1581
  ] })
1741
1582
  ] }),
1742
- detailsExpanded ? /* @__PURE__ */ jsx12(ChevronUp2, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx12(ChevronDown2, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
1583
+ detailsExpanded ? /* @__PURE__ */ jsx11(ChevronUp3, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx11(ChevronDown3, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
1743
1584
  ]
1744
1585
  }
1745
1586
  ),
1746
1587
  detailsExpanded && /* @__PURE__ */ jsxs8("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
1747
1588
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
1748
- /* @__PURE__ */ jsx12("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx12(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
1589
+ /* @__PURE__ */ jsx11("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx11(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
1749
1590
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
1750
1591
  t.slippage.label,
1751
1592
  ":",
@@ -1758,42 +1599,42 @@ function TransferCryptoBase({
1758
1599
  ] })
1759
1600
  ] }),
1760
1601
  /* @__PURE__ */ jsxs8(Tooltip, { children: [
1761
- /* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx12(
1602
+ /* @__PURE__ */ jsx11(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx11(
1762
1603
  "span",
1763
1604
  {
1764
1605
  className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
1765
1606
  tabIndex: 0,
1766
1607
  role: "button",
1767
1608
  "aria-label": "Slippage information",
1768
- children: /* @__PURE__ */ jsx12(Info, { className: "uf-w-3 uf-h-3" })
1609
+ children: /* @__PURE__ */ jsx11(Info, { className: "uf-w-3 uf-h-3" })
1769
1610
  }
1770
1611
  ) }),
1771
- /* @__PURE__ */ jsx12(
1612
+ /* @__PURE__ */ jsx11(
1772
1613
  TooltipContent,
1773
1614
  {
1774
1615
  side: "top",
1775
1616
  align: "center",
1776
1617
  className: "uf-max-w-[240px]",
1777
- children: /* @__PURE__ */ jsx12("p", { children: t.slippage.tooltip })
1618
+ children: /* @__PURE__ */ jsx11("p", { children: t.slippage.tooltip })
1778
1619
  }
1779
1620
  )
1780
1621
  ] })
1781
1622
  ] }),
1782
1623
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
1783
- /* @__PURE__ */ jsx12("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx12(Clock, { className: "uf-w-3 uf-h-3" }) }),
1624
+ /* @__PURE__ */ jsx11("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx11(Clock, { className: "uf-w-3 uf-h-3" }) }),
1784
1625
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
1785
1626
  t.processingTime.label,
1786
1627
  ":",
1787
1628
  " ",
1788
- /* @__PURE__ */ jsx12("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
1629
+ /* @__PURE__ */ jsx11("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
1789
1630
  ] })
1790
1631
  ] }),
1791
1632
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
1792
- /* @__PURE__ */ jsx12("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx12(FileText, { className: "uf-w-3 uf-h-3" }) }),
1633
+ /* @__PURE__ */ jsx11("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx11(FileText, { className: "uf-w-3 uf-h-3" }) }),
1793
1634
  /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
1794
1635
  t.help.needHelp,
1795
1636
  " ",
1796
- /* @__PURE__ */ jsx12(
1637
+ /* @__PURE__ */ jsx11(
1797
1638
  "a",
1798
1639
  {
1799
1640
  href: "#",
@@ -1806,7 +1647,7 @@ function TransferCryptoBase({
1806
1647
  ] })
1807
1648
  ] }),
1808
1649
  /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
1809
- /* @__PURE__ */ jsx12(
1650
+ /* @__PURE__ */ jsx11(
1810
1651
  "a",
1811
1652
  {
1812
1653
  href: "https://unifold.io/terms",
@@ -1821,16 +1662,16 @@ function TransferCryptoBase({
1821
1662
  onClick: () => setDepositsModalOpen(true),
1822
1663
  className: "uf-flex uf-items-center uf-gap-1 uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-animate-in uf-fade-in uf-slide-in-from-right-8 uf-duration-1000",
1823
1664
  children: [
1824
- /* @__PURE__ */ jsx12(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
1665
+ /* @__PURE__ */ jsx11(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
1825
1666
  "Track deposits (",
1826
1667
  depositExecutions.length,
1827
1668
  ")",
1828
- /* @__PURE__ */ jsx12(ChevronRight2, { className: "uf-w-3 uf-h-3" })
1669
+ /* @__PURE__ */ jsx11(ChevronRight2, { className: "uf-w-3 uf-h-3" })
1829
1670
  ]
1830
1671
  }
1831
1672
  )
1832
1673
  ] }),
1833
- depositExecutions.length === 1 && /* @__PURE__ */ jsx12("div", { className: "uf-fixed uf-bottom-4 uf-left-1/2 uf--translate-x-1/2 uf-w-[360px] uf-max-w-[calc(100vw-2rem)] uf-z-[100]", children: /* @__PURE__ */ jsx12(
1674
+ depositExecutions.length === 1 && /* @__PURE__ */ jsx11("div", { className: "uf-fixed uf-bottom-4 uf-left-1/2 uf--translate-x-1/2 uf-w-[360px] uf-max-w-[calc(100vw-2rem)] uf-z-[100]", children: /* @__PURE__ */ jsx11(
1834
1675
  DepositSuccessToast,
1835
1676
  {
1836
1677
  depositTx: depositExecutions[0].transaction_hash,
@@ -1840,11 +1681,12 @@ function TransferCryptoBase({
1840
1681
  status: depositExecutions[0].status,
1841
1682
  tokenIconUrl: depositExecutions[0].destination_token_metadata?.icon_url,
1842
1683
  sourceAmountBaseUnit: depositExecutions[0].source_amount_base_unit,
1843
- onClose: () => setDepositExecutions([])
1684
+ onClose: () => setDepositExecutions([]),
1685
+ execution: depositExecutions[0]
1844
1686
  },
1845
1687
  depositExecutions[0].id
1846
1688
  ) }),
1847
- /* @__PURE__ */ jsx12(
1689
+ /* @__PURE__ */ jsx11(
1848
1690
  DepositsModal,
1849
1691
  {
1850
1692
  open: depositsModalOpen,
@@ -1859,9 +1701,9 @@ function TransferCryptoBase({
1859
1701
  }
1860
1702
 
1861
1703
  // src/components/deposits/TransferCrypto.tsx
1862
- import { jsx as jsx13 } from "react/jsx-runtime";
1704
+ import { jsx as jsx12 } from "react/jsx-runtime";
1863
1705
  function TransferCrypto(props) {
1864
- return /* @__PURE__ */ jsx13(
1706
+ return /* @__PURE__ */ jsx12(
1865
1707
  TransferCryptoBase,
1866
1708
  {
1867
1709
  ...props,
@@ -1872,16 +1714,27 @@ function TransferCrypto(props) {
1872
1714
  }
1873
1715
 
1874
1716
  // src/components/deposits/BuyWithCard.tsx
1875
- import { useState as useState4, useEffect as useEffect4 } from "react";
1876
- import { ChevronDown as ChevronDown3, ChevronRight as ChevronRight3 } from "lucide-react";
1717
+ import { useState as useState6, useEffect as useEffect5 } from "react";
1718
+ import { ChevronDown as ChevronDown4, ChevronRight as ChevronRight3 } from "lucide-react";
1719
+ import {
1720
+ getMeldQuotes,
1721
+ createMeldSession,
1722
+ createDepositAddress as createDepositAddress2,
1723
+ getWalletByChainType as getWalletByChainType2,
1724
+ getFiatCurrencies,
1725
+ getIconUrlWithCdn,
1726
+ getPreferredIconUrl as getPreferredIconUrl2,
1727
+ getSupportedDepositTokens as getSupportedDepositTokens2
1728
+ } from "@unifold/core";
1877
1729
 
1878
1730
  // src/components/deposits/CurrencyModal.tsx
1879
- import { useState as useState3 } from "react";
1731
+ import { useState as useState5 } from "react";
1880
1732
  import { Search } from "lucide-react";
1881
1733
 
1882
1734
  // src/components/currency/CurrencyListItem.tsx
1883
1735
  import { Check as Check3 } from "lucide-react";
1884
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
1736
+ import { getPreferredIconUrl } from "@unifold/core";
1737
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
1885
1738
  function CurrencyListItem({
1886
1739
  currency,
1887
1740
  isSelected,
@@ -1895,7 +1748,7 @@ function CurrencyListItem({
1895
1748
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
1896
1749
  children: [
1897
1750
  /* @__PURE__ */ jsxs9("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
1898
- /* @__PURE__ */ jsx14(
1751
+ /* @__PURE__ */ jsx13(
1899
1752
  "img",
1900
1753
  {
1901
1754
  src: iconUrl,
@@ -1904,18 +1757,18 @@ function CurrencyListItem({
1904
1757
  }
1905
1758
  ),
1906
1759
  /* @__PURE__ */ jsxs9("div", { className: "uf-text-left", children: [
1907
- /* @__PURE__ */ jsx14("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
1908
- /* @__PURE__ */ jsx14("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
1760
+ /* @__PURE__ */ jsx13("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
1761
+ /* @__PURE__ */ jsx13("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
1909
1762
  ] })
1910
1763
  ] }),
1911
- isSelected && /* @__PURE__ */ jsx14(Check3, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
1764
+ isSelected && /* @__PURE__ */ jsx13(Check3, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
1912
1765
  ]
1913
1766
  }
1914
1767
  );
1915
1768
  }
1916
1769
 
1917
1770
  // src/components/currency/CurrencyListSection.tsx
1918
- import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
1771
+ import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
1919
1772
  function CurrencyListSection({
1920
1773
  title,
1921
1774
  currencies,
@@ -1924,8 +1777,8 @@ function CurrencyListSection({
1924
1777
  }) {
1925
1778
  if (currencies.length === 0) return null;
1926
1779
  return /* @__PURE__ */ jsxs10(Fragment3, { children: [
1927
- /* @__PURE__ */ jsx15("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ jsx15("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
1928
- currencies.map((currency) => /* @__PURE__ */ jsx15(
1780
+ /* @__PURE__ */ jsx14("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ jsx14("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
1781
+ currencies.map((currency) => /* @__PURE__ */ jsx14(
1929
1782
  CurrencyListItem,
1930
1783
  {
1931
1784
  currency,
@@ -1938,7 +1791,7 @@ function CurrencyListSection({
1938
1791
  }
1939
1792
 
1940
1793
  // src/components/deposits/CurrencyModal.tsx
1941
- import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
1794
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
1942
1795
  function CurrencyModal({
1943
1796
  open,
1944
1797
  onOpenChange,
@@ -1948,7 +1801,7 @@ function CurrencyModal({
1948
1801
  onSelectCurrency,
1949
1802
  themeClass = ""
1950
1803
  }) {
1951
- const [searchQuery, setSearchQuery] = useState3("");
1804
+ const [searchQuery, setSearchQuery] = useState5("");
1952
1805
  const preferredCurrencies = preferredCurrencyCodes.map(
1953
1806
  (code) => currencies.find(
1954
1807
  (currency) => currency.currency_code.toLowerCase() === code.toLowerCase()
@@ -1975,8 +1828,8 @@ function CurrencyModal({
1975
1828
  onOpenChange(false);
1976
1829
  setSearchQuery("");
1977
1830
  };
1978
- return /* @__PURE__ */ jsx16(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(DialogContent, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
1979
- /* @__PURE__ */ jsx16(
1831
+ return /* @__PURE__ */ jsx15(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(DialogContent, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
1832
+ /* @__PURE__ */ jsx15(
1980
1833
  DepositHeader,
1981
1834
  {
1982
1835
  title: "Currency",
@@ -1985,9 +1838,9 @@ function CurrencyModal({
1985
1838
  onClose: handleClose
1986
1839
  }
1987
1840
  ),
1988
- /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsxs11("div", { className: "uf-relative", children: [
1989
- /* @__PURE__ */ jsx16(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
1990
- /* @__PURE__ */ jsx16(
1841
+ /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsxs11("div", { className: "uf-relative", children: [
1842
+ /* @__PURE__ */ jsx15(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
1843
+ /* @__PURE__ */ jsx15(
1991
1844
  "input",
1992
1845
  {
1993
1846
  type: "text",
@@ -1998,8 +1851,8 @@ function CurrencyModal({
1998
1851
  }
1999
1852
  )
2000
1853
  ] }) }),
2001
- /* @__PURE__ */ jsx16("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs11("div", { className: "uf-space-y-2", children: [
2002
- /* @__PURE__ */ jsx16(
1854
+ /* @__PURE__ */ jsx15("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs11("div", { className: "uf-space-y-2", children: [
1855
+ /* @__PURE__ */ jsx15(
2003
1856
  CurrencyListSection,
2004
1857
  {
2005
1858
  title: "Popular currencies",
@@ -2008,8 +1861,8 @@ function CurrencyModal({
2008
1861
  onSelect: handleSelect
2009
1862
  }
2010
1863
  ),
2011
- filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx16("div", { className: "uf-h-2" }),
2012
- /* @__PURE__ */ jsx16(
1864
+ filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx15("div", { className: "uf-h-2" }),
1865
+ /* @__PURE__ */ jsx15(
2013
1866
  CurrencyListSection,
2014
1867
  {
2015
1868
  title: "All currencies",
@@ -2018,7 +1871,7 @@ function CurrencyModal({
2018
1871
  onSelect: handleSelect
2019
1872
  }
2020
1873
  ),
2021
- filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx16("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
1874
+ filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx15("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
2022
1875
  ] }) })
2023
1876
  ] }) });
2024
1877
  }
@@ -2072,7 +1925,7 @@ function useUserIp() {
2072
1925
  }
2073
1926
 
2074
1927
  // src/components/deposits/BuyWithCard.tsx
2075
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1928
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
2076
1929
  var t2 = i18n.buyWithCard;
2077
1930
  var QUICK_AMOUNTS = [100, 500, 1e3];
2078
1931
  function getCurrencySymbol(currencyCode) {
@@ -2103,21 +1956,21 @@ function BuyWithCard({
2103
1956
  wallets: externalWallets,
2104
1957
  assetCdnUrl
2105
1958
  }) {
2106
- const [amount, setAmount] = useState4("500.00");
2107
- const [currency, setCurrency] = useState4("usd");
2108
- const [showCurrencyModal, setShowCurrencyModal] = useState4(false);
2109
- const [quotes, setQuotes] = useState4([]);
2110
- const [quotesLoading, setQuotesLoading] = useState4(false);
2111
- const [quotesError, setQuotesError] = useState4(null);
2112
- const [internalView, setInternalView] = useState4("amount");
1959
+ const [amount, setAmount] = useState6("500.00");
1960
+ const [currency, setCurrency] = useState6("usd");
1961
+ const [showCurrencyModal, setShowCurrencyModal] = useState6(false);
1962
+ const [quotes, setQuotes] = useState6([]);
1963
+ const [quotesLoading, setQuotesLoading] = useState6(false);
1964
+ const [quotesError, setQuotesError] = useState6(null);
1965
+ const [internalView, setInternalView] = useState6("amount");
2113
1966
  const { userIpInfo, isLoading: isLoadingIp } = useUserIp();
2114
- const [onrampSession, setOnrampSession] = useState4(
1967
+ const [onrampSession, setOnrampSession] = useState6(
2115
1968
  null
2116
1969
  );
2117
1970
  const currentView = externalView ?? internalView;
2118
1971
  const showQuotesView = currentView === "quotes";
2119
1972
  const showOnrampView = currentView === "onramp";
2120
- useEffect4(() => {
1973
+ useEffect5(() => {
2121
1974
  if (externalView) {
2122
1975
  setInternalView(externalView);
2123
1976
  }
@@ -2130,21 +1983,21 @@ function BuyWithCard({
2130
1983
  onViewChange?.(newView);
2131
1984
  }
2132
1985
  };
2133
- const [selectedProvider, setSelectedProvider] = useState4(
1986
+ const [selectedProvider, setSelectedProvider] = useState6(
2134
1987
  null
2135
1988
  );
2136
- const [isAutoSelected, setIsAutoSelected] = useState4(true);
2137
- const [autoSelectedProvider, setAutoSelectedProvider] = useState4(null);
2138
- const [hasManualSelection, setHasManualSelection] = useState4(false);
2139
- const [internalWallets, setInternalWallets] = useState4([]);
2140
- const [walletsLoading, setWalletsLoading] = useState4(!externalWallets?.length);
1989
+ const [isAutoSelected, setIsAutoSelected] = useState6(true);
1990
+ const [autoSelectedProvider, setAutoSelectedProvider] = useState6(null);
1991
+ const [hasManualSelection, setHasManualSelection] = useState6(false);
1992
+ const [internalWallets, setInternalWallets] = useState6([]);
1993
+ const [walletsLoading, setWalletsLoading] = useState6(!externalWallets?.length);
2141
1994
  const wallets = externalWallets?.length ? externalWallets : internalWallets;
2142
- const [countdown, setCountdown] = useState4(60);
2143
- const [fiatCurrencies, setFiatCurrencies] = useState4([]);
2144
- const [preferredCurrencyCodes, setPreferredCurrencyCodes] = useState4([]);
2145
- const [currenciesLoading, setCurrenciesLoading] = useState4(true);
2146
- const [supportedTokens, setSupportedTokens] = useState4([]);
2147
- const destinationWallet = getWalletByChainType(wallets, "ethereum");
1995
+ const [countdown, setCountdown] = useState6(60);
1996
+ const [fiatCurrencies, setFiatCurrencies] = useState6([]);
1997
+ const [preferredCurrencyCodes, setPreferredCurrencyCodes] = useState6([]);
1998
+ const [currenciesLoading, setCurrenciesLoading] = useState6(true);
1999
+ const [supportedTokens, setSupportedTokens] = useState6([]);
2000
+ const destinationWallet = getWalletByChainType2(wallets, "ethereum");
2148
2001
  const walletDestinationChainId = destinationWallet?.destination_chain_id;
2149
2002
  const resolvedDestinationChainId = destinationChainId || walletDestinationChainId;
2150
2003
  const displayTokenSymbol = destinationTokenSymbol || supportedTokens[0]?.symbol || "USDC";
@@ -2152,7 +2005,7 @@ function BuyWithCard({
2152
2005
  const destinationChain = destinationToken?.chains.find(
2153
2006
  (c) => c.chain_id === resolvedDestinationChainId
2154
2007
  );
2155
- useEffect4(() => {
2008
+ useEffect5(() => {
2156
2009
  async function fetchFiatCurrencies() {
2157
2010
  try {
2158
2011
  const response = await getFiatCurrencies(publishableKey);
@@ -2166,20 +2019,24 @@ function BuyWithCard({
2166
2019
  }
2167
2020
  fetchFiatCurrencies();
2168
2021
  }, [publishableKey]);
2169
- useEffect4(() => {
2022
+ useEffect5(() => {
2170
2023
  if (externalWallets?.length) {
2171
2024
  setWalletsLoading(false);
2172
2025
  return;
2173
2026
  }
2027
+ if (internalWallets.length > 0) {
2028
+ setWalletsLoading(false);
2029
+ return;
2030
+ }
2174
2031
  let retryTimeout = null;
2175
2032
  let isCancelled = false;
2176
2033
  const fetchWallets = async () => {
2177
2034
  if (isCancelled) return;
2178
2035
  setWalletsLoading(true);
2179
2036
  try {
2180
- const response = await createEOA(
2037
+ const response = await createDepositAddress2(
2181
2038
  {
2182
- user_id: userId,
2039
+ external_user_id: userId,
2183
2040
  recipient_address: recipientAddress,
2184
2041
  destination_chain_type: destinationChainType,
2185
2042
  destination_chain_id: destinationChainId,
@@ -2207,10 +2064,10 @@ function BuyWithCard({
2207
2064
  }
2208
2065
  };
2209
2066
  }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey, externalWallets]);
2210
- useEffect4(() => {
2067
+ useEffect5(() => {
2211
2068
  async function fetchSupportedTokens() {
2212
2069
  try {
2213
- const response = await getSupportedDepositTokens(publishableKey);
2070
+ const response = await getSupportedDepositTokens2(publishableKey);
2214
2071
  setSupportedTokens(response.data);
2215
2072
  } catch (err) {
2216
2073
  console.error("Error fetching supported tokens:", err);
@@ -2218,7 +2075,7 @@ function BuyWithCard({
2218
2075
  }
2219
2076
  fetchSupportedTokens();
2220
2077
  }, [publishableKey]);
2221
- useEffect4(() => {
2078
+ useEffect5(() => {
2222
2079
  const amountNum = parseFloat(amount);
2223
2080
  if (isNaN(amountNum) || amountNum <= 0) {
2224
2081
  setQuotes([]);
@@ -2298,7 +2155,7 @@ function BuyWithCard({
2298
2155
  setQuotesLoading(false);
2299
2156
  }
2300
2157
  };
2301
- useEffect4(() => {
2158
+ useEffect5(() => {
2302
2159
  if (quotes.length === 0) return;
2303
2160
  const timer = setInterval(() => {
2304
2161
  setCountdown((prev) => {
@@ -2333,7 +2190,7 @@ function BuyWithCard({
2333
2190
  const handleContinue = async () => {
2334
2191
  if (!selectedProvider) return;
2335
2192
  try {
2336
- const wallet = getWalletByChainType(wallets, "ethereum");
2193
+ const wallet = getWalletByChainType2(wallets, "ethereum");
2337
2194
  if (!wallet?.address) {
2338
2195
  setQuotesError("Wallet address not available");
2339
2196
  return;
@@ -2377,32 +2234,32 @@ function BuyWithCard({
2377
2234
  /* @__PURE__ */ jsxs12(
2378
2235
  "div",
2379
2236
  {
2380
- className: `uf-transition-all uf-duration-300 ${showQuotesView || showOnrampView ? "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0" : "uf-opacity-100"}`,
2237
+ className: `uf-transition-all uf-duration-300 uf-min-h-[420px] ${showQuotesView || showOnrampView ? "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0" : "uf-opacity-100"}`,
2381
2238
  children: [
2382
2239
  /* @__PURE__ */ jsxs12("div", { className: "uf-mb-6 uf-pt-4", children: [
2383
- /* @__PURE__ */ jsx17("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsxs12(
2240
+ /* @__PURE__ */ jsx16("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsxs12(
2384
2241
  "button",
2385
2242
  {
2386
2243
  onClick: () => setShowCurrencyModal(true),
2387
2244
  disabled: currenciesLoading,
2388
2245
  className: "uf-flex uf-items-center uf-gap-1.5 uf-px-3 uf-py-1.5 uf-rounded-lg uf-bg-secondary hover:uf-bg-accent uf-transition-colors disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
2389
2246
  children: [
2390
- selectedCurrencyData && /* @__PURE__ */ jsx17(
2247
+ selectedCurrencyData && /* @__PURE__ */ jsx16(
2391
2248
  "img",
2392
2249
  {
2393
- src: getPreferredIconUrl(selectedCurrencyData.icon_urls, "png") || selectedCurrencyData.icon_url,
2250
+ src: getPreferredIconUrl2(selectedCurrencyData.icon_urls, "png") || selectedCurrencyData.icon_url,
2394
2251
  alt: selectedCurrencyData.name,
2395
2252
  className: "uf-w-4 uf-h-4"
2396
2253
  }
2397
2254
  ),
2398
- /* @__PURE__ */ jsx17("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
2399
- /* @__PURE__ */ jsx17(ChevronDown3, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
2255
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
2256
+ /* @__PURE__ */ jsx16(ChevronDown4, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
2400
2257
  ]
2401
2258
  }
2402
2259
  ) }),
2403
2260
  /* @__PURE__ */ jsxs12("div", { className: "uf-text-center uf-mb-4", children: [
2404
- /* @__PURE__ */ jsx17("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
2405
- /* @__PURE__ */ jsx17(
2261
+ /* @__PURE__ */ jsx16("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
2262
+ /* @__PURE__ */ jsx16(
2406
2263
  "span",
2407
2264
  {
2408
2265
  className: "uf-font-normal uf-text-foreground uf-flex-shrink-0 uf-mr-1",
@@ -2412,7 +2269,7 @@ function BuyWithCard({
2412
2269
  children: currencySymbol
2413
2270
  }
2414
2271
  ),
2415
- /* @__PURE__ */ jsx17(
2272
+ /* @__PURE__ */ jsx16(
2416
2273
  "input",
2417
2274
  {
2418
2275
  type: "text",
@@ -2428,12 +2285,12 @@ function BuyWithCard({
2428
2285
  }
2429
2286
  )
2430
2287
  ] }) }),
2431
- quotesLoading ? /* @__PURE__ */ jsx17("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ jsx17("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ jsxs12("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
2288
+ quotesLoading ? /* @__PURE__ */ jsx16("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ jsx16("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ jsxs12("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
2432
2289
  calculateUSDC(),
2433
2290
  " USDC (Perps)"
2434
2291
  ] })
2435
2292
  ] }),
2436
- /* @__PURE__ */ jsx17("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ jsxs12(
2293
+ /* @__PURE__ */ jsx16("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ jsxs12(
2437
2294
  "button",
2438
2295
  {
2439
2296
  onClick: () => handleQuickAmount(quickAmount),
@@ -2448,29 +2305,29 @@ function BuyWithCard({
2448
2305
  ] }),
2449
2306
  /* @__PURE__ */ jsxs12("div", { className: "uf-mb-6", children: [
2450
2307
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-font-medium uf-mb-2 uf-px-1", children: [
2451
- /* @__PURE__ */ jsx17("span", { className: "uf-text-foreground", children: "Provider" }),
2308
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-foreground", children: "Provider" }),
2452
2309
  quotes.length > 0 && !quotesLoading && /* @__PURE__ */ jsxs12("span", { className: "uf-text-[10px] uf-text-foreground uf-font-normal", children: [
2453
2310
  "Refreshing in ",
2454
2311
  countdown,
2455
2312
  "s"
2456
2313
  ] })
2457
2314
  ] }),
2458
- /* @__PURE__ */ jsx17(
2315
+ /* @__PURE__ */ jsx16(
2459
2316
  "button",
2460
2317
  {
2461
2318
  onClick: () => handleViewChange("quotes"),
2462
2319
  disabled: quotesLoading || quotes.length === 0,
2463
2320
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-4 uf-group disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
2464
2321
  children: quotesLoading ? /* @__PURE__ */ jsxs12("div", { className: "uf-text-left uf-w-full uf-animate-pulse", children: [
2465
- /* @__PURE__ */ jsx17("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
2322
+ /* @__PURE__ */ jsx16("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
2466
2323
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
2467
- /* @__PURE__ */ jsx17("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
2468
- /* @__PURE__ */ jsx17("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
2324
+ /* @__PURE__ */ jsx16("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
2325
+ /* @__PURE__ */ jsx16("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
2469
2326
  ] })
2470
2327
  ] }) : /* @__PURE__ */ jsxs12("div", { className: "uf-w-full uf-text-left", children: [
2471
- isAutoSelected && /* @__PURE__ */ jsx17("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
2328
+ isAutoSelected && /* @__PURE__ */ jsx16("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
2472
2329
  selectedProvider && /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
2473
- /* @__PURE__ */ jsx17(
2330
+ /* @__PURE__ */ jsx16(
2474
2331
  "img",
2475
2332
  {
2476
2333
  src: selectedProvider.icon_url,
@@ -2481,21 +2338,21 @@ function BuyWithCard({
2481
2338
  }
2482
2339
  ),
2483
2340
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex-1 uf-min-w-0", children: [
2484
- /* @__PURE__ */ jsx17("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
2341
+ /* @__PURE__ */ jsx16("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
2485
2342
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
2486
- isAutoSelected && /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
2487
- isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
2488
- selectedProvider.low_kyc === false && /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
2343
+ isAutoSelected && /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
2344
+ isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
2345
+ selectedProvider.low_kyc === false && /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
2489
2346
  ] })
2490
2347
  ] }),
2491
- quotes.length > 0 && /* @__PURE__ */ jsx17(ChevronRight3, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
2348
+ quotes.length > 0 && /* @__PURE__ */ jsx16(ChevronRight3, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
2492
2349
  ] })
2493
2350
  ] })
2494
2351
  }
2495
2352
  ),
2496
- quotesError && /* @__PURE__ */ jsx17("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
2353
+ quotesError && /* @__PURE__ */ jsx16("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
2497
2354
  ] }),
2498
- /* @__PURE__ */ jsx17(
2355
+ /* @__PURE__ */ jsx16(
2499
2356
  "button",
2500
2357
  {
2501
2358
  onClick: handleContinue,
@@ -2510,11 +2367,11 @@ function BuyWithCard({
2510
2367
  ]
2511
2368
  }
2512
2369
  ),
2513
- /* @__PURE__ */ jsx17(
2370
+ /* @__PURE__ */ jsx16(
2514
2371
  "div",
2515
2372
  {
2516
- className: `uf-transition-all uf-duration-300 ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
2517
- children: /* @__PURE__ */ jsx17("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index) => {
2373
+ className: `uf-transition-all uf-duration-300 uf-min-h-[420px] ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
2374
+ children: /* @__PURE__ */ jsx16("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index) => {
2518
2375
  const badges = getProviderBadges(quote, sortedQuotes);
2519
2376
  const displayName = quote.service_provider_display_name;
2520
2377
  const isSelected = selectedProvider?.service_provider === quote.service_provider;
@@ -2532,7 +2389,7 @@ function BuyWithCard({
2532
2389
  className: `uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group ${isSelected ? "uf-ring-2 uf-ring-inset uf-ring-primary" : ""}`,
2533
2390
  children: [
2534
2391
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
2535
- /* @__PURE__ */ jsx17("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0", children: /* @__PURE__ */ jsx17(
2392
+ /* @__PURE__ */ jsx16("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0", children: /* @__PURE__ */ jsx16(
2536
2393
  "img",
2537
2394
  {
2538
2395
  src: quote.icon_url,
@@ -2543,7 +2400,7 @@ function BuyWithCard({
2543
2400
  }
2544
2401
  ) }),
2545
2402
  /* @__PURE__ */ jsxs12("div", { className: "uf-text-left", children: [
2546
- /* @__PURE__ */ jsx17("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
2403
+ /* @__PURE__ */ jsx16("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
2547
2404
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
2548
2405
  badges.map((badge, i) => /* @__PURE__ */ jsxs12(
2549
2406
  "span",
@@ -2556,8 +2413,8 @@ function BuyWithCard({
2556
2413
  },
2557
2414
  i
2558
2415
  )),
2559
- quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
2560
- quote.low_kyc === false && /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
2416
+ quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
2417
+ quote.low_kyc === false && /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
2561
2418
  ] })
2562
2419
  ] })
2563
2420
  ] }),
@@ -2579,12 +2436,12 @@ function BuyWithCard({
2579
2436
  }) })
2580
2437
  }
2581
2438
  ),
2582
- /* @__PURE__ */ jsx17(
2439
+ /* @__PURE__ */ jsx16(
2583
2440
  "div",
2584
2441
  {
2585
2442
  className: `uf-transition-all uf-duration-300 ${showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
2586
2443
  children: onrampSession && /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-6 uf-pb-4 uf-px-2", children: [
2587
- /* @__PURE__ */ jsx17("div", { className: "uf-mb-6", children: /* @__PURE__ */ jsx17(
2444
+ /* @__PURE__ */ jsx16("div", { className: "uf-mb-6", children: /* @__PURE__ */ jsx16(
2588
2445
  "img",
2589
2446
  {
2590
2447
  src: onrampSession.provider.icon_url,
@@ -2594,14 +2451,14 @@ function BuyWithCard({
2594
2451
  className: "uf-rounded-2xl"
2595
2452
  }
2596
2453
  ) }),
2597
- /* @__PURE__ */ jsx17("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
2454
+ /* @__PURE__ */ jsx16("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
2598
2455
  "{{provider}}",
2599
2456
  onrampSession.provider.service_provider_display_name
2600
2457
  ) }),
2601
- /* @__PURE__ */ jsx17("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
2602
- /* @__PURE__ */ jsx17("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-center", children: [
2458
+ /* @__PURE__ */ jsx16("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
2459
+ /* @__PURE__ */ jsx16("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-center", children: [
2603
2460
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
2604
- /* @__PURE__ */ jsx17("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsx17(
2461
+ /* @__PURE__ */ jsx16("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsx16(
2605
2462
  "img",
2606
2463
  {
2607
2464
  src: getIconUrlWithCdn(
@@ -2612,13 +2469,13 @@ function BuyWithCard({
2612
2469
  className: "uf-w-7 uf-h-7 uf-rounded-full"
2613
2470
  }
2614
2471
  ) }),
2615
- /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youUse }),
2616
- /* @__PURE__ */ jsx17("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: onrampSession.sourceCurrency.toUpperCase() })
2472
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youUse }),
2473
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: onrampSession.sourceCurrency.toUpperCase() })
2617
2474
  ] }),
2618
- /* @__PURE__ */ jsx17("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx17(ChevronRight3, { className: "uf-w-4 uf-h-4" }) }),
2475
+ /* @__PURE__ */ jsx16("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx16(ChevronRight3, { className: "uf-w-4 uf-h-4" }) }),
2619
2476
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
2620
- /* @__PURE__ */ jsx17("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
2621
- /* @__PURE__ */ jsx17(
2477
+ /* @__PURE__ */ jsx16("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
2478
+ /* @__PURE__ */ jsx16(
2622
2479
  "img",
2623
2480
  {
2624
2481
  src: getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
@@ -2626,7 +2483,7 @@ function BuyWithCard({
2626
2483
  className: "uf-w-7 uf-h-7 uf-rounded-full"
2627
2484
  }
2628
2485
  ),
2629
- /* @__PURE__ */ jsx17(
2486
+ /* @__PURE__ */ jsx16(
2630
2487
  "img",
2631
2488
  {
2632
2489
  src: getIconUrlWithCdn("/icons/networks/png/polygon.png", assetCdnUrl),
@@ -2635,13 +2492,13 @@ function BuyWithCard({
2635
2492
  }
2636
2493
  )
2637
2494
  ] }) }),
2638
- /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youBuy }),
2639
- /* @__PURE__ */ jsx17("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: "USDC" })
2495
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youBuy }),
2496
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: "USDC" })
2640
2497
  ] }),
2641
- /* @__PURE__ */ jsx17("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx17(ChevronRight3, { className: "uf-w-4 uf-h-4" }) }),
2498
+ /* @__PURE__ */ jsx16("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx16(ChevronRight3, { className: "uf-w-4 uf-h-4" }) }),
2642
2499
  /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
2643
- /* @__PURE__ */ jsx17("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
2644
- /* @__PURE__ */ jsx17(
2500
+ /* @__PURE__ */ jsx16("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
2501
+ /* @__PURE__ */ jsx16(
2645
2502
  "img",
2646
2503
  {
2647
2504
  src: destinationToken?.icon_url || getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
@@ -2649,7 +2506,7 @@ function BuyWithCard({
2649
2506
  className: "uf-w-7 uf-h-7 uf-rounded-full"
2650
2507
  }
2651
2508
  ),
2652
- destinationChain?.icon_url && /* @__PURE__ */ jsx17(
2509
+ destinationChain?.icon_url && /* @__PURE__ */ jsx16(
2653
2510
  "img",
2654
2511
  {
2655
2512
  src: destinationChain.icon_url,
@@ -2658,15 +2515,15 @@ function BuyWithCard({
2658
2515
  }
2659
2516
  )
2660
2517
  ] }) }),
2661
- /* @__PURE__ */ jsx17("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youReceive }),
2662
- /* @__PURE__ */ jsx17("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: displayTokenSymbol })
2518
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youReceive }),
2519
+ /* @__PURE__ */ jsx16("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: displayTokenSymbol })
2663
2520
  ] })
2664
2521
  ] }) }),
2665
- /* @__PURE__ */ jsx17("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ jsx17("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
2522
+ /* @__PURE__ */ jsx16("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ jsx16("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
2666
2523
  ] })
2667
2524
  }
2668
2525
  ),
2669
- /* @__PURE__ */ jsx17(
2526
+ /* @__PURE__ */ jsx16(
2670
2527
  CurrencyModal,
2671
2528
  {
2672
2529
  open: showCurrencyModal,
@@ -2685,7 +2542,7 @@ function BuyWithCard({
2685
2542
 
2686
2543
  // src/components/deposits/buttons/TransferCryptoButton.tsx
2687
2544
  import { Zap, ChevronRight as ChevronRight4 } from "lucide-react";
2688
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
2545
+ import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
2689
2546
  function TransferCryptoButton({
2690
2547
  onClick,
2691
2548
  title,
@@ -2700,16 +2557,16 @@ function TransferCryptoButton({
2700
2557
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
2701
2558
  children: [
2702
2559
  /* @__PURE__ */ jsxs13("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
2703
- /* @__PURE__ */ jsx18("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx18(Zap, { className: "uf-w-5 uf-h-5" }) }),
2560
+ /* @__PURE__ */ jsx17("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx17(Zap, { className: "uf-w-5 uf-h-5" }) }),
2704
2561
  /* @__PURE__ */ jsxs13("div", { className: "uf-text-left", children: [
2705
- /* @__PURE__ */ jsx18("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
2706
- /* @__PURE__ */ jsx18("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
2562
+ /* @__PURE__ */ jsx17("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
2563
+ /* @__PURE__ */ jsx17("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
2707
2564
  ] })
2708
2565
  ] }),
2709
2566
  /* @__PURE__ */ jsxs13("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
2710
- /* @__PURE__ */ jsx18("div", { className: "uf-flex uf--space-x-2", children: sortedTokens.map((token) => {
2567
+ /* @__PURE__ */ jsx17("div", { className: "uf-flex uf--space-x-2", children: sortedTokens.map((token) => {
2711
2568
  const iconUrl = token.icon_urls.find((u) => u.format === "svg")?.url || token.icon_urls.find((u) => u.format === "png")?.url;
2712
- return /* @__PURE__ */ jsx18(
2569
+ return /* @__PURE__ */ jsx17(
2713
2570
  "img",
2714
2571
  {
2715
2572
  src: iconUrl,
@@ -2721,7 +2578,7 @@ function TransferCryptoButton({
2721
2578
  token.name
2722
2579
  );
2723
2580
  }) }),
2724
- /* @__PURE__ */ jsx18(ChevronRight4, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
2581
+ /* @__PURE__ */ jsx17(ChevronRight4, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
2725
2582
  ] })
2726
2583
  ]
2727
2584
  }
@@ -2730,7 +2587,7 @@ function TransferCryptoButton({
2730
2587
 
2731
2588
  // src/components/deposits/buttons/DepositWithCardButton.tsx
2732
2589
  import { CreditCard, ChevronRight as ChevronRight5 } from "lucide-react";
2733
- import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
2590
+ import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
2734
2591
  function DepositWithCardButton({
2735
2592
  onClick,
2736
2593
  title,
@@ -2744,16 +2601,16 @@ function DepositWithCardButton({
2744
2601
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
2745
2602
  children: [
2746
2603
  /* @__PURE__ */ jsxs14("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
2747
- /* @__PURE__ */ jsx19("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx19(CreditCard, { className: "uf-w-5 uf-h-5" }) }),
2604
+ /* @__PURE__ */ jsx18("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx18(CreditCard, { className: "uf-w-5 uf-h-5" }) }),
2748
2605
  /* @__PURE__ */ jsxs14("div", { className: "uf-text-left", children: [
2749
- /* @__PURE__ */ jsx19("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
2750
- /* @__PURE__ */ jsx19("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
2606
+ /* @__PURE__ */ jsx18("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
2607
+ /* @__PURE__ */ jsx18("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
2751
2608
  ] })
2752
2609
  ] }),
2753
2610
  /* @__PURE__ */ jsxs14("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
2754
- /* @__PURE__ */ jsx19("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: paymentNetworks?.map((network) => {
2611
+ /* @__PURE__ */ jsx18("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: paymentNetworks?.map((network) => {
2755
2612
  const iconUrl = network.icon_urls.find((u) => u.format === "svg")?.url || network.icon_urls.find((u) => u.format === "png")?.url;
2756
- return /* @__PURE__ */ jsx19(
2613
+ return /* @__PURE__ */ jsx18(
2757
2614
  "img",
2758
2615
  {
2759
2616
  src: iconUrl,
@@ -2765,7 +2622,7 @@ function DepositWithCardButton({
2765
2622
  network.name
2766
2623
  );
2767
2624
  }) }),
2768
- /* @__PURE__ */ jsx19(ChevronRight5, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
2625
+ /* @__PURE__ */ jsx18(ChevronRight5, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
2769
2626
  ] })
2770
2627
  ]
2771
2628
  }
@@ -2774,7 +2631,7 @@ function DepositWithCardButton({
2774
2631
 
2775
2632
  // src/components/deposits/buttons/DepositTrackerButton.tsx
2776
2633
  import { Clock as Clock2, ChevronRight as ChevronRight6 } from "lucide-react";
2777
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
2634
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
2778
2635
  function DepositTrackerButton({
2779
2636
  onClick,
2780
2637
  title,
@@ -2789,34 +2646,35 @@ function DepositTrackerButton({
2789
2646
  children: [
2790
2647
  /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
2791
2648
  /* @__PURE__ */ jsxs15("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2 uf-relative", children: [
2792
- /* @__PURE__ */ jsx20(Clock2, { className: "uf-w-5 uf-h-5" }),
2793
- badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx20("div", { className: "uf-absolute -uf-top-1 -uf-right-1 uf-bg-blue-500 uf-text-primary-foreground uf-text-[10px] uf-font-semibold uf-rounded-full uf-min-w-[18px] uf-h-[18px] uf-flex uf-items-center uf-justify-center uf-px-1", children: badge > 99 ? "99+" : badge })
2649
+ /* @__PURE__ */ jsx19(Clock2, { className: "uf-w-5 uf-h-5" }),
2650
+ badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx19("div", { className: "uf-absolute -uf-top-1 -uf-right-1 uf-bg-blue-500 uf-text-primary-foreground uf-text-[10px] uf-font-semibold uf-rounded-full uf-min-w-[18px] uf-h-[18px] uf-flex uf-items-center uf-justify-center uf-px-1", children: badge > 99 ? "99+" : badge })
2794
2651
  ] }),
2795
2652
  /* @__PURE__ */ jsxs15("div", { className: "uf-text-left", children: [
2796
- /* @__PURE__ */ jsx20("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
2797
- /* @__PURE__ */ jsx20("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
2653
+ /* @__PURE__ */ jsx19("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
2654
+ /* @__PURE__ */ jsx19("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
2798
2655
  ] })
2799
2656
  ] }),
2800
- /* @__PURE__ */ jsx20(ChevronRight6, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
2657
+ /* @__PURE__ */ jsx19(ChevronRight6, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
2801
2658
  ]
2802
2659
  }
2803
2660
  );
2804
2661
  }
2805
2662
 
2806
2663
  // src/components/deposits/DepositModal.tsx
2807
- import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
2664
+ import { getProjectConfig, createDepositAddress as createDepositAddress3 } from "@unifold/core";
2665
+ import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
2808
2666
  function SkeletonButton({ variant = "default" }) {
2809
2667
  return /* @__PURE__ */ jsxs16("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-animate-pulse", children: [
2810
2668
  /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
2811
- /* @__PURE__ */ jsx21("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
2669
+ /* @__PURE__ */ jsx20("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
2812
2670
  /* @__PURE__ */ jsxs16("div", { className: "uf-space-y-1.5", children: [
2813
- /* @__PURE__ */ jsx21("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
2814
- /* @__PURE__ */ jsx21("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
2671
+ /* @__PURE__ */ jsx20("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
2672
+ /* @__PURE__ */ jsx20("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
2815
2673
  ] })
2816
2674
  ] }),
2817
2675
  /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
2818
- variant === "with-icons" && /* @__PURE__ */ jsx21("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx21("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
2819
- /* @__PURE__ */ jsx21(ChevronRight7, { className: "uf-w-4 uf-h-4 uf-text-muted" })
2676
+ variant === "with-icons" && /* @__PURE__ */ jsx20("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx20("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
2677
+ /* @__PURE__ */ jsx20(ChevronRight7, { className: "uf-w-4 uf-h-4 uf-text-muted" })
2820
2678
  ] })
2821
2679
  ] });
2822
2680
  }
@@ -2837,24 +2695,24 @@ function DepositModal({
2837
2695
  onDepositError,
2838
2696
  theme = "dark"
2839
2697
  }) {
2840
- const [view, setView] = useState5("main");
2841
- const [cardView, setCardView] = useState5(
2698
+ const [view, setView] = useState7("main");
2699
+ const [cardView, setCardView] = useState7(
2842
2700
  "amount"
2843
2701
  );
2844
- const [quotesCount, setQuotesCount] = useState5(0);
2845
- const [depositsModalOpen, setDepositsModalOpen] = useState5(false);
2846
- const [depositExecutions, setDepositExecutions] = useState5([]);
2847
- const [projectConfig, setProjectConfig] = useState5(null);
2848
- const [wallets, setWallets] = useState5([]);
2849
- const [walletsLoading, setWalletsLoading] = useState5(false);
2850
- useEffect5(() => {
2702
+ const [quotesCount, setQuotesCount] = useState7(0);
2703
+ const [depositsModalOpen, setDepositsModalOpen] = useState7(false);
2704
+ const [depositExecutions, setDepositExecutions] = useState7([]);
2705
+ const [projectConfig, setProjectConfig] = useState7(null);
2706
+ const [wallets, setWallets] = useState7([]);
2707
+ const [walletsLoading, setWalletsLoading] = useState7(false);
2708
+ useEffect6(() => {
2851
2709
  setProjectConfig(null);
2852
2710
  }, [publishableKey]);
2853
- useEffect5(() => {
2711
+ useEffect6(() => {
2854
2712
  setWallets([]);
2855
2713
  }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
2856
- const [resolvedTheme, setResolvedTheme] = useState5(theme === "auto" ? "dark" : theme);
2857
- useEffect5(() => {
2714
+ const [resolvedTheme, setResolvedTheme] = useState7(theme === "auto" ? "dark" : theme);
2715
+ useEffect6(() => {
2858
2716
  if (theme === "auto") {
2859
2717
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
2860
2718
  setResolvedTheme(mediaQuery.matches ? "dark" : "light");
@@ -2867,12 +2725,12 @@ function DepositModal({
2867
2725
  setResolvedTheme(theme);
2868
2726
  }
2869
2727
  }, [theme]);
2870
- useEffect5(() => {
2728
+ useEffect6(() => {
2871
2729
  if (open && !projectConfig) {
2872
2730
  getProjectConfig(publishableKey).then(setProjectConfig).catch(console.error);
2873
2731
  }
2874
2732
  }, [open, publishableKey, projectConfig]);
2875
- useEffect5(() => {
2733
+ useEffect6(() => {
2876
2734
  if (!open || wallets.length > 0) return;
2877
2735
  let retryTimeout = null;
2878
2736
  let isCancelled = false;
@@ -2880,9 +2738,9 @@ function DepositModal({
2880
2738
  if (isCancelled) return;
2881
2739
  setWalletsLoading(true);
2882
2740
  try {
2883
- const response = await createEOA(
2741
+ const response = await createDepositAddress3(
2884
2742
  {
2885
- user_id: userId,
2743
+ external_user_id: userId,
2886
2744
  recipient_address: recipientAddress,
2887
2745
  destination_chain_type: destinationChainType,
2888
2746
  destination_chain_id: destinationChainId,
@@ -2934,27 +2792,27 @@ function DepositModal({
2934
2792
  setQuotesCount(count);
2935
2793
  }
2936
2794
  };
2937
- return /* @__PURE__ */ jsx21(ThemeProvider, { themeClass, children: /* @__PURE__ */ jsxs16(Dialog, { open, onOpenChange: handleClose, children: [
2938
- /* @__PURE__ */ jsx21(
2795
+ return /* @__PURE__ */ jsx20(ThemeProvider, { themeClass, children: /* @__PURE__ */ jsxs16(Dialog, { open, onOpenChange: handleClose, children: [
2796
+ /* @__PURE__ */ jsx20(
2939
2797
  DialogContent,
2940
2798
  {
2941
2799
  className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 uf-overflow-visible [&>button]:uf-hidden ${themeClass}`,
2942
2800
  onPointerDownOutside: (e) => e.preventDefault(),
2943
2801
  onInteractOutside: (e) => e.preventDefault(),
2944
2802
  children: view === "main" ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
2945
- /* @__PURE__ */ jsx21(
2803
+ /* @__PURE__ */ jsx20(
2946
2804
  DepositHeader,
2947
2805
  {
2948
2806
  title: modalTitle || "Deposit",
2949
2807
  onClose: handleClose
2950
2808
  }
2951
2809
  ),
2952
- /* @__PURE__ */ jsx21("div", { className: "uf-pb-4 uf-space-y-3", children: !projectConfig ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
2953
- /* @__PURE__ */ jsx21(SkeletonButton, { variant: "with-icons" }),
2954
- /* @__PURE__ */ jsx21(SkeletonButton, { variant: "with-icons" }),
2955
- !hideDepositTracker && /* @__PURE__ */ jsx21(SkeletonButton, {})
2810
+ /* @__PURE__ */ jsx20("div", { className: "uf-pb-4 uf-space-y-3", children: !projectConfig ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
2811
+ /* @__PURE__ */ jsx20(SkeletonButton, { variant: "with-icons" }),
2812
+ /* @__PURE__ */ jsx20(SkeletonButton, { variant: "with-icons" }),
2813
+ !hideDepositTracker && /* @__PURE__ */ jsx20(SkeletonButton, {})
2956
2814
  ] }) : /* @__PURE__ */ jsxs16(Fragment4, { children: [
2957
- /* @__PURE__ */ jsx21(
2815
+ /* @__PURE__ */ jsx20(
2958
2816
  TransferCryptoButton,
2959
2817
  {
2960
2818
  onClick: () => setView("transfer"),
@@ -2963,7 +2821,7 @@ function DepositModal({
2963
2821
  featuredTokens: projectConfig.transfer_crypto.networks
2964
2822
  }
2965
2823
  ),
2966
- /* @__PURE__ */ jsx21(
2824
+ /* @__PURE__ */ jsx20(
2967
2825
  DepositWithCardButton,
2968
2826
  {
2969
2827
  onClick: () => setView("card"),
@@ -2972,7 +2830,7 @@ function DepositModal({
2972
2830
  paymentNetworks: projectConfig.payment_networks.networks
2973
2831
  }
2974
2832
  ),
2975
- !hideDepositTracker && /* @__PURE__ */ jsx21(
2833
+ !hideDepositTracker && /* @__PURE__ */ jsx20(
2976
2834
  DepositTrackerButton,
2977
2835
  {
2978
2836
  onClick: () => setDepositsModalOpen(true),
@@ -2983,7 +2841,7 @@ function DepositModal({
2983
2841
  )
2984
2842
  ] }) })
2985
2843
  ] }) : view === "transfer" ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
2986
- /* @__PURE__ */ jsx21(
2844
+ /* @__PURE__ */ jsx20(
2987
2845
  DepositHeader,
2988
2846
  {
2989
2847
  title: t3.transferCrypto.title,
@@ -2992,7 +2850,7 @@ function DepositModal({
2992
2850
  onClose: handleClose
2993
2851
  }
2994
2852
  ),
2995
- /* @__PURE__ */ jsx21(
2853
+ /* @__PURE__ */ jsx20(
2996
2854
  TransferCrypto,
2997
2855
  {
2998
2856
  userId,
@@ -3008,17 +2866,17 @@ function DepositModal({
3008
2866
  }
3009
2867
  )
3010
2868
  ] }) : /* @__PURE__ */ jsxs16(Fragment4, { children: [
3011
- /* @__PURE__ */ jsx21(
2869
+ /* @__PURE__ */ jsx20(
3012
2870
  DepositHeader,
3013
2871
  {
3014
- title: cardView === "quotes" ? t3.quotes : modalTitle || "Deposit",
2872
+ title: cardView === "quotes" ? t3.quotes : t3.depositWithCard.title,
3015
2873
  showBack: true,
3016
2874
  onBack: handleBack,
3017
2875
  onClose: handleClose,
3018
2876
  badge: cardView === "quotes" ? { count: quotesCount } : void 0
3019
2877
  }
3020
2878
  ),
3021
- /* @__PURE__ */ jsx21(
2879
+ /* @__PURE__ */ jsx20(
3022
2880
  BuyWithCard,
3023
2881
  {
3024
2882
  userId,
@@ -3040,11 +2898,12 @@ function DepositModal({
3040
2898
  ] })
3041
2899
  }
3042
2900
  ),
3043
- /* @__PURE__ */ jsx21(
2901
+ /* @__PURE__ */ jsx20(
3044
2902
  DepositsModal,
3045
2903
  {
3046
2904
  open: depositsModalOpen,
3047
2905
  onOpenChange: setDepositsModalOpen,
2906
+ onCloseAll: handleClose,
3048
2907
  executions: depositExecutions,
3049
2908
  userId,
3050
2909
  publishableKey,
@@ -3055,9 +2914,9 @@ function DepositModal({
3055
2914
  }
3056
2915
 
3057
2916
  // src/components/deposits/TransferCrypto2.tsx
3058
- import { jsx as jsx22 } from "react/jsx-runtime";
2917
+ import { jsx as jsx21 } from "react/jsx-runtime";
3059
2918
  function TransferCrypto2(props) {
3060
- return /* @__PURE__ */ jsx22(
2919
+ return /* @__PURE__ */ jsx21(
3061
2920
  TransferCryptoBase,
3062
2921
  {
3063
2922
  ...props,
@@ -3066,13 +2925,81 @@ function TransferCrypto2(props) {
3066
2925
  }
3067
2926
  );
3068
2927
  }
2928
+
2929
+ // src/components/shared/button.tsx
2930
+ import * as React5 from "react";
2931
+ import { Slot } from "@radix-ui/react-slot";
2932
+ import { cva } from "class-variance-authority";
2933
+ import { jsx as jsx22 } from "react/jsx-runtime";
2934
+ var buttonVariants = cva(
2935
+ "uf-inline-flex uf-items-center uf-justify-center uf-whitespace-nowrap uf-rounded-md uf-text-sm uf-font-medium uf-ring-offset-background uf-transition-colors focus-visible:uf-outline-none focus-visible:uf-ring-2 focus-visible:uf-ring-ring focus-visible:uf-ring-offset-2 disabled:uf-pointer-events-none disabled:uf-opacity-50",
2936
+ {
2937
+ variants: {
2938
+ variant: {
2939
+ default: "uf-bg-primary uf-text-primary-foreground hover:uf-bg-primary/90",
2940
+ destructive: "uf-bg-destructive uf-text-destructive-foreground hover:uf-bg-destructive/90",
2941
+ outline: "uf-border uf-border-input uf-bg-background hover:uf-bg-accent hover:uf-text-accent-foreground",
2942
+ secondary: "uf-bg-secondary uf-text-secondary-foreground hover:uf-bg-secondary/80",
2943
+ ghost: "hover:uf-bg-accent hover:uf-text-accent-foreground",
2944
+ link: "uf-text-primary uf-underline-offset-4 hover:uf-underline"
2945
+ },
2946
+ size: {
2947
+ default: "uf-h-10 uf-px-4 uf-py-2",
2948
+ sm: "uf-h-9 uf-rounded-md uf-px-3",
2949
+ lg: "uf-h-11 uf-rounded-md uf-px-8",
2950
+ icon: "uf-h-10 uf-w-10"
2951
+ }
2952
+ },
2953
+ defaultVariants: {
2954
+ variant: "default",
2955
+ size: "default"
2956
+ }
2957
+ }
2958
+ );
2959
+ var Button = React5.forwardRef(
2960
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
2961
+ const Comp = asChild ? Slot : "button";
2962
+ return /* @__PURE__ */ jsx22(
2963
+ Comp,
2964
+ {
2965
+ className: cn(buttonVariants({ variant, size, className })),
2966
+ ref,
2967
+ ...props
2968
+ }
2969
+ );
2970
+ }
2971
+ );
2972
+ Button.displayName = "Button";
2973
+
2974
+ // src/index.ts
2975
+ import {
2976
+ createDepositAddress as createDepositAddress4,
2977
+ getWalletByChainType as getWalletByChainType3,
2978
+ queryExecutions as queryExecutions3,
2979
+ getSupportedDepositTokens as getSupportedDepositTokens3,
2980
+ getMeldQuotes as getMeldQuotes2,
2981
+ createMeldSession as createMeldSession2,
2982
+ getFiatCurrencies as getFiatCurrencies2,
2983
+ getTokenChains as getTokenChains2,
2984
+ getChainName as getChainName2,
2985
+ getIconUrl as getIconUrl4,
2986
+ getIconUrlWithCdn as getIconUrlWithCdn2,
2987
+ getPreferredIconUrl as getPreferredIconUrl3,
2988
+ getProjectConfig as getProjectConfig2,
2989
+ setApiConfig,
2990
+ getApiBaseUrl,
2991
+ ExecutionStatus as ExecutionStatus5,
2992
+ SOLANA_USDC_ADDRESS
2993
+ } from "@unifold/core";
2994
+ import { useUserIp as useUserIp2 } from "@unifold/core";
2995
+ import { i18n as i18n2 } from "@unifold/core";
3069
2996
  export {
3070
2997
  Button,
3071
2998
  BuyWithCard,
3072
2999
  CurrencyListItem,
3073
3000
  CurrencyListSection,
3074
3001
  CurrencyModal,
3075
- DepositDetailModal,
3002
+ DepositDetailContent,
3076
3003
  DepositExecutionItem,
3077
3004
  DepositHeader,
3078
3005
  DepositModal,
@@ -3090,7 +3017,7 @@ export {
3090
3017
  DialogPortal,
3091
3018
  DialogTitle,
3092
3019
  DialogTrigger,
3093
- ExecutionStatus,
3020
+ ExecutionStatus5 as ExecutionStatus,
3094
3021
  SOLANA_USDC_ADDRESS,
3095
3022
  Select,
3096
3023
  SelectContent,
@@ -3114,18 +3041,22 @@ export {
3114
3041
  TransferCryptoButton,
3115
3042
  buttonVariants,
3116
3043
  cn,
3117
- createEOA,
3118
- createMeldSession,
3044
+ createDepositAddress4 as createDepositAddress,
3045
+ createMeldSession2 as createMeldSession,
3119
3046
  getApiBaseUrl,
3120
- getFiatCurrencies,
3121
- getIconUrl,
3122
- getIconUrlWithCdn,
3123
- getMeldQuotes,
3124
- getSupportedDepositTokens,
3125
- getWalletByChainType,
3126
- i18n,
3127
- queryExecutions,
3047
+ getChainName2 as getChainName,
3048
+ getFiatCurrencies2 as getFiatCurrencies,
3049
+ getIconUrl4 as getIconUrl,
3050
+ getIconUrlWithCdn2 as getIconUrlWithCdn,
3051
+ getMeldQuotes2 as getMeldQuotes,
3052
+ getPreferredIconUrl3 as getPreferredIconUrl,
3053
+ getProjectConfig2 as getProjectConfig,
3054
+ getSupportedDepositTokens3 as getSupportedDepositTokens,
3055
+ getTokenChains2 as getTokenChains,
3056
+ getWalletByChainType3 as getWalletByChainType,
3057
+ i18n2 as i18n,
3058
+ queryExecutions3 as queryExecutions,
3128
3059
  setApiConfig,
3129
3060
  useTheme,
3130
- useUserIp
3061
+ useUserIp2 as useUserIp
3131
3062
  };