@unifold/ui-react 0.1.7 → 0.1.8
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.d.mts +25 -6
- package/dist/index.d.ts +25 -6
- package/dist/index.js +719 -412
- package/dist/index.mjs +715 -410
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
CurrencyListItem: () => CurrencyListItem,
|
|
36
36
|
CurrencyListSection: () => CurrencyListSection,
|
|
37
37
|
CurrencyModal: () => CurrencyModal,
|
|
38
|
+
DepositDetailModal: () => DepositDetailModal,
|
|
38
39
|
DepositExecutionItem: () => DepositExecutionItem,
|
|
39
40
|
DepositHeader: () => DepositHeader,
|
|
40
41
|
DepositModal: () => DepositModal,
|
|
@@ -81,6 +82,7 @@ __export(index_exports, {
|
|
|
81
82
|
getApiBaseUrl: () => getApiBaseUrl,
|
|
82
83
|
getFiatCurrencies: () => getFiatCurrencies,
|
|
83
84
|
getIconUrl: () => getIconUrl,
|
|
85
|
+
getIconUrlWithCdn: () => getIconUrlWithCdn,
|
|
84
86
|
getMeldQuotes: () => getMeldQuotes,
|
|
85
87
|
getSupportedDepositTokens: () => getSupportedDepositTokens,
|
|
86
88
|
getWalletByChainType: () => getWalletByChainType,
|
|
@@ -94,7 +96,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
94
96
|
|
|
95
97
|
// src/components/deposits/DepositModal.tsx
|
|
96
98
|
var import_react6 = require("react");
|
|
97
|
-
var
|
|
99
|
+
var import_lucide_react14 = require("lucide-react");
|
|
98
100
|
|
|
99
101
|
// src/components/shared/dialog.tsx
|
|
100
102
|
var React2 = __toESM(require("react"));
|
|
@@ -235,7 +237,7 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
|
235
237
|
|
|
236
238
|
// src/components/deposits/TransferCryptoBase.tsx
|
|
237
239
|
var import_react3 = require("react");
|
|
238
|
-
var
|
|
240
|
+
var import_lucide_react7 = require("lucide-react");
|
|
239
241
|
|
|
240
242
|
// src/components/deposits/StyledQRCode.tsx
|
|
241
243
|
var import_react = require("react");
|
|
@@ -393,6 +395,14 @@ function getIconUrl(iconPath) {
|
|
|
393
395
|
const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
|
|
394
396
|
return `${API_BASE_URL}/api/public${normalizedPath}`;
|
|
395
397
|
}
|
|
398
|
+
function getIconUrlWithCdn(iconPath, assetCdnUrl) {
|
|
399
|
+
if (!assetCdnUrl) {
|
|
400
|
+
return getIconUrl(iconPath);
|
|
401
|
+
}
|
|
402
|
+
const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
|
|
403
|
+
const baseUrl = assetCdnUrl.endsWith("/") ? assetCdnUrl.slice(0, -1) : assetCdnUrl;
|
|
404
|
+
return `${baseUrl}/api/public${normalizedPath}`;
|
|
405
|
+
}
|
|
396
406
|
async function createEOA(overrides, publishableKey) {
|
|
397
407
|
if (!overrides?.user_id) {
|
|
398
408
|
throw new Error("user_id is required");
|
|
@@ -511,6 +521,16 @@ async function createMeldSession(request, publishableKey) {
|
|
|
511
521
|
}
|
|
512
522
|
return response.json();
|
|
513
523
|
}
|
|
524
|
+
function getPreferredIconUrl(iconUrls, preferredFormat = "svg") {
|
|
525
|
+
if (!iconUrls || iconUrls.length === 0) {
|
|
526
|
+
return void 0;
|
|
527
|
+
}
|
|
528
|
+
const preferred = iconUrls.find((icon) => icon.format === preferredFormat);
|
|
529
|
+
if (preferred) {
|
|
530
|
+
return preferred.url;
|
|
531
|
+
}
|
|
532
|
+
return iconUrls[0]?.url;
|
|
533
|
+
}
|
|
514
534
|
async function getFiatCurrencies(publishableKey) {
|
|
515
535
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
516
536
|
const response = await fetch(
|
|
@@ -547,49 +567,65 @@ async function getProjectConfig(publishableKey) {
|
|
|
547
567
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
548
568
|
function DepositExecutionItem({
|
|
549
569
|
execution,
|
|
550
|
-
|
|
551
|
-
onClose
|
|
570
|
+
onClick
|
|
552
571
|
}) {
|
|
553
572
|
const isPending = execution.status === "pending" /* PENDING */ || execution.status === "waiting" /* WAITING */ || execution.status === "delayed" /* DELAYED */;
|
|
554
|
-
const formatTxHash = (hash) => {
|
|
555
|
-
if (hash.length <= 12) return hash;
|
|
556
|
-
return `${hash.slice(0, 10)}...${hash.slice(-8)}`;
|
|
557
|
-
};
|
|
558
573
|
const formatDateTime = (timestamp) => {
|
|
559
574
|
try {
|
|
560
575
|
const date = new Date(timestamp);
|
|
561
|
-
|
|
576
|
+
const monthDay = date.toLocaleDateString("en-US", {
|
|
577
|
+
month: "short",
|
|
578
|
+
day: "numeric",
|
|
579
|
+
year: "numeric"
|
|
580
|
+
});
|
|
581
|
+
const time = date.toLocaleTimeString("en-US", {
|
|
562
582
|
hour: "numeric",
|
|
563
583
|
minute: "2-digit",
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
584
|
+
hour12: true
|
|
585
|
+
}).toLowerCase();
|
|
586
|
+
return `${monthDay} at ${time}`;
|
|
567
587
|
} catch {
|
|
568
588
|
return timestamp;
|
|
569
589
|
}
|
|
570
590
|
};
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
591
|
+
const formatUsdAmount = (baseUnitAmount) => {
|
|
592
|
+
try {
|
|
593
|
+
const amount = Number(baseUnitAmount) / 1e6;
|
|
594
|
+
return new Intl.NumberFormat("en-US", {
|
|
595
|
+
style: "currency",
|
|
596
|
+
currency: "USD",
|
|
597
|
+
minimumFractionDigits: 2,
|
|
598
|
+
maximumFractionDigits: 2
|
|
599
|
+
}).format(amount);
|
|
600
|
+
} catch {
|
|
601
|
+
return "$0.00";
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
605
|
+
"button",
|
|
606
|
+
{
|
|
607
|
+
onClick,
|
|
608
|
+
className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-gap-3 hover:uf-bg-secondary/80 uf-transition-colors uf-text-left",
|
|
609
|
+
children: [
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "uf-relative uf-flex-shrink-0 uf-w-9 uf-h-9", children: [
|
|
575
611
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
576
612
|
"img",
|
|
577
613
|
{
|
|
578
614
|
src: execution.source_token_metadata?.icon_url || getIconUrl("/icons/tokens/usdc.svg"),
|
|
579
615
|
alt: "Token",
|
|
580
|
-
width:
|
|
581
|
-
height:
|
|
582
|
-
className: "uf-rounded-full"
|
|
616
|
+
width: 36,
|
|
617
|
+
height: 36,
|
|
618
|
+
className: "uf-rounded-full uf-w-9 uf-h-9"
|
|
583
619
|
}
|
|
584
620
|
),
|
|
585
|
-
isPending ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "uf-absolute uf
|
|
621
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("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__ */ (0, import_jsx_runtime5.jsx)(
|
|
586
622
|
"svg",
|
|
587
623
|
{
|
|
588
624
|
width: "10",
|
|
589
625
|
height: "10",
|
|
590
626
|
viewBox: "0 0 12 12",
|
|
591
627
|
fill: "none",
|
|
592
|
-
className: "uf-animate-spin",
|
|
628
|
+
className: "uf-animate-spin uf-block",
|
|
593
629
|
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
594
630
|
"path",
|
|
595
631
|
{
|
|
@@ -600,7 +636,7 @@ function DepositExecutionItem({
|
|
|
600
636
|
}
|
|
601
637
|
)
|
|
602
638
|
}
|
|
603
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "uf-absolute uf
|
|
639
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("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__ */ (0, import_jsx_runtime5.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
604
640
|
"path",
|
|
605
641
|
{
|
|
606
642
|
d: "M10 3L4.5 8.5L2 6",
|
|
@@ -612,59 +648,249 @@ function DepositExecutionItem({
|
|
|
612
648
|
) }) })
|
|
613
649
|
] }),
|
|
614
650
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "uf-flex-1 uf-min-w-0", children: [
|
|
615
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.
|
|
616
|
-
|
|
617
|
-
|
|
651
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit received" : "Deposit completed" }),
|
|
652
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "uf-text-muted-foreground uf-text-xs uf-leading-tight", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
|
|
653
|
+
] }),
|
|
654
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(execution.source_amount_base_unit) }),
|
|
655
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground uf-flex-shrink-0" })
|
|
656
|
+
]
|
|
657
|
+
}
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
// src/components/deposits/DepositDetailModal.tsx
|
|
662
|
+
var import_lucide_react4 = require("lucide-react");
|
|
663
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
664
|
+
var CHAIN_NAMES = {
|
|
665
|
+
solana: "Solana",
|
|
666
|
+
ethereum: "Ethereum",
|
|
667
|
+
"1": "Ethereum",
|
|
668
|
+
"137": "Polygon",
|
|
669
|
+
"42161": "Arbitrum",
|
|
670
|
+
"10": "Optimism",
|
|
671
|
+
"8453": "Base",
|
|
672
|
+
"43114": "Avalanche",
|
|
673
|
+
"56": "BSC",
|
|
674
|
+
bitcoin: "Bitcoin",
|
|
675
|
+
mainnet: "Mainnet"
|
|
676
|
+
};
|
|
677
|
+
function DepositDetailModal({
|
|
678
|
+
open,
|
|
679
|
+
onOpenChange,
|
|
680
|
+
execution,
|
|
681
|
+
themeClass = ""
|
|
682
|
+
}) {
|
|
683
|
+
if (!execution) return null;
|
|
684
|
+
const isPending = execution.status === "pending" /* PENDING */ || execution.status === "waiting" /* WAITING */ || execution.status === "delayed" /* DELAYED */;
|
|
685
|
+
const formatDateTime = (timestamp) => {
|
|
686
|
+
try {
|
|
687
|
+
const date = new Date(timestamp);
|
|
688
|
+
const monthDay = date.toLocaleDateString("en-US", {
|
|
689
|
+
month: "short",
|
|
690
|
+
day: "numeric",
|
|
691
|
+
year: "numeric"
|
|
692
|
+
});
|
|
693
|
+
const time = date.toLocaleTimeString("en-US", {
|
|
694
|
+
hour: "numeric",
|
|
695
|
+
minute: "2-digit",
|
|
696
|
+
hour12: true
|
|
697
|
+
});
|
|
698
|
+
return `${monthDay} at ${time}`;
|
|
699
|
+
} catch {
|
|
700
|
+
return timestamp;
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
const formatAmount = (baseUnitAmount, decimals = 6) => {
|
|
704
|
+
try {
|
|
705
|
+
const amount = Number(baseUnitAmount) / Math.pow(10, decimals);
|
|
706
|
+
return amount.toFixed(2);
|
|
707
|
+
} catch {
|
|
708
|
+
return "0.00";
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
const formatUsdAmount = (usdAmount, baseUnitAmount) => {
|
|
712
|
+
if (usdAmount) {
|
|
713
|
+
try {
|
|
714
|
+
const amount = Number(usdAmount);
|
|
715
|
+
return new Intl.NumberFormat("en-US", {
|
|
716
|
+
style: "currency",
|
|
717
|
+
currency: "USD",
|
|
718
|
+
minimumFractionDigits: 2,
|
|
719
|
+
maximumFractionDigits: 2
|
|
720
|
+
}).format(amount);
|
|
721
|
+
} catch {
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
if (baseUnitAmount) {
|
|
725
|
+
try {
|
|
726
|
+
const amount = Number(baseUnitAmount) / 1e6;
|
|
727
|
+
return new Intl.NumberFormat("en-US", {
|
|
728
|
+
style: "currency",
|
|
729
|
+
currency: "USD",
|
|
730
|
+
minimumFractionDigits: 2,
|
|
731
|
+
maximumFractionDigits: 2
|
|
732
|
+
}).format(amount);
|
|
733
|
+
} catch {
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
return "$0.00";
|
|
737
|
+
};
|
|
738
|
+
const getNetworkName = (chainType, chainId) => {
|
|
739
|
+
return CHAIN_NAMES[chainId] || CHAIN_NAMES[chainType] || chainType;
|
|
740
|
+
};
|
|
741
|
+
const getSourceTokenSymbol = () => {
|
|
742
|
+
return "USDC";
|
|
743
|
+
};
|
|
744
|
+
const getDestinationTokenSymbol = () => {
|
|
745
|
+
return "USDC";
|
|
746
|
+
};
|
|
747
|
+
const handleClose = () => {
|
|
748
|
+
onOpenChange(false);
|
|
749
|
+
};
|
|
750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
751
|
+
DialogContent,
|
|
752
|
+
{
|
|
753
|
+
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}`,
|
|
754
|
+
children: [
|
|
755
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DepositHeader, { title: "Deposit Details", onClose: handleClose }),
|
|
756
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-px-4 uf-pb-4", children: [
|
|
757
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-py-6", children: [
|
|
758
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-relative uf-mb-3", children: [
|
|
759
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
760
|
+
"img",
|
|
761
|
+
{
|
|
762
|
+
src: execution.source_token_metadata?.icon_url || getIconUrl("/icons/tokens/usdc.svg"),
|
|
763
|
+
alt: "Token",
|
|
764
|
+
width: 64,
|
|
765
|
+
height: 64,
|
|
766
|
+
className: "uf-rounded-full"
|
|
767
|
+
}
|
|
768
|
+
),
|
|
769
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-yellow-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
770
|
+
"svg",
|
|
771
|
+
{
|
|
772
|
+
width: "16",
|
|
773
|
+
height: "16",
|
|
774
|
+
viewBox: "0 0 12 12",
|
|
775
|
+
fill: "none",
|
|
776
|
+
className: "uf-animate-spin uf-block",
|
|
777
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
778
|
+
"path",
|
|
779
|
+
{
|
|
780
|
+
d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
|
|
781
|
+
stroke: "white",
|
|
782
|
+
strokeWidth: "2",
|
|
783
|
+
strokeLinecap: "round"
|
|
784
|
+
}
|
|
785
|
+
)
|
|
786
|
+
}
|
|
787
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-blue-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
788
|
+
"svg",
|
|
789
|
+
{
|
|
790
|
+
width: "16",
|
|
791
|
+
height: "16",
|
|
792
|
+
viewBox: "0 0 12 12",
|
|
793
|
+
fill: "none",
|
|
794
|
+
className: "uf-block",
|
|
795
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
796
|
+
"path",
|
|
797
|
+
{
|
|
798
|
+
d: "M10 3L4.5 8.5L2 6",
|
|
799
|
+
stroke: "white",
|
|
800
|
+
strokeWidth: "2",
|
|
801
|
+
strokeLinecap: "round",
|
|
802
|
+
strokeLinejoin: "round"
|
|
803
|
+
}
|
|
804
|
+
)
|
|
805
|
+
}
|
|
806
|
+
) })
|
|
807
|
+
] }),
|
|
808
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mb-1", children: [
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
810
|
+
"div",
|
|
811
|
+
{
|
|
812
|
+
className: `uf-w-2 uf-h-2 uf-rounded-full ${isPending ? "uf-bg-yellow-500" : "uf-bg-green-500"}`
|
|
813
|
+
}
|
|
814
|
+
),
|
|
815
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: isPending ? "Pending" : "Completed" })
|
|
816
|
+
] }),
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
|
|
818
|
+
] }),
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-3", children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
823
|
+
formatAmount(execution.source_amount_base_unit),
|
|
824
|
+
" ",
|
|
825
|
+
getSourceTokenSymbol()
|
|
826
|
+
] })
|
|
827
|
+
] }),
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
|
|
830
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
831
|
+
formatAmount(execution.destination_amount_base_unit),
|
|
832
|
+
" ",
|
|
833
|
+
getDestinationTokenSymbol()
|
|
834
|
+
] })
|
|
835
|
+
] }),
|
|
836
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
837
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
|
|
838
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
|
|
839
|
+
] })
|
|
840
|
+
] }),
|
|
841
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-4", children: [
|
|
842
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
|
|
843
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
|
|
845
|
+
] }),
|
|
846
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
|
|
849
|
+
] })
|
|
850
|
+
] }),
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-space-y-2", children: [
|
|
852
|
+
execution.explorer_url && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
853
|
+
"a",
|
|
854
|
+
{
|
|
855
|
+
href: execution.explorer_url,
|
|
856
|
+
target: "_blank",
|
|
857
|
+
rel: "noopener noreferrer",
|
|
858
|
+
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",
|
|
859
|
+
children: [
|
|
860
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
861
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react4.ArrowDownCircle, { className: "uf-w-5 uf-h-5" }),
|
|
862
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-font-medium", children: "View Deposit Transaction" })
|
|
863
|
+
] }),
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react4.ExternalLink, { className: "uf-w-4 uf-h-4" })
|
|
865
|
+
]
|
|
866
|
+
}
|
|
867
|
+
),
|
|
868
|
+
!isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
869
|
+
"a",
|
|
870
|
+
{
|
|
871
|
+
href: execution.destination_explorer_url,
|
|
872
|
+
target: "_blank",
|
|
873
|
+
rel: "noopener noreferrer",
|
|
874
|
+
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",
|
|
875
|
+
children: [
|
|
876
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react4.CheckCircle, { className: "uf-w-5 uf-h-5" }),
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "uf-font-medium", children: "View Completion Transaction" })
|
|
879
|
+
] }),
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react4.ExternalLink, { className: "uf-w-4 uf-h-4" })
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
)
|
|
618
884
|
] }),
|
|
619
|
-
/* @__PURE__ */ (0,
|
|
885
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "uf-text-center uf-text-muted-foreground uf-text-xs uf-mt-4", children: "Links open in external browser" })
|
|
620
886
|
] })
|
|
621
|
-
]
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
{
|
|
625
|
-
onClick: onClose,
|
|
626
|
-
className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0 uf-ml-2",
|
|
627
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.X, { className: "uf-w-4 uf-h-4" })
|
|
628
|
-
}
|
|
629
|
-
)
|
|
630
|
-
] }),
|
|
631
|
-
!isPending && execution.explorer_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-gap-1.5 uf-mt-2 uf-pt-2 uf-border-t uf-border-secondary uf-text-xs uf-ml-[42px]", children: [
|
|
632
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "uf-text-muted-foreground", children: "Deposit tx:" }),
|
|
633
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
634
|
-
"a",
|
|
635
|
-
{
|
|
636
|
-
href: execution.explorer_url,
|
|
637
|
-
target: "_blank",
|
|
638
|
-
rel: "noopener noreferrer",
|
|
639
|
-
className: "uf-flex uf-items-center uf-gap-1 uf-text-blue-400 hover:uf-text-blue-300 uf-transition-colors uf-font-mono",
|
|
640
|
-
children: [
|
|
641
|
-
formatTxHash(execution.transaction_hash),
|
|
642
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.ExternalLink, { className: "uf-w-3 uf-h-3" })
|
|
643
|
-
]
|
|
644
|
-
}
|
|
645
|
-
)
|
|
646
|
-
] }),
|
|
647
|
-
!isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-gap-1.5 uf-mt-1 uf-text-xs uf-ml-[42px]", children: [
|
|
648
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "uf-text-muted-foreground", children: "Completion tx:" }),
|
|
649
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
650
|
-
"a",
|
|
651
|
-
{
|
|
652
|
-
href: execution.destination_explorer_url,
|
|
653
|
-
target: "_blank",
|
|
654
|
-
rel: "noopener noreferrer",
|
|
655
|
-
className: "uf-flex uf-items-center uf-gap-1 uf-text-blue-400 hover:uf-text-blue-300 uf-transition-colors uf-font-mono",
|
|
656
|
-
children: [
|
|
657
|
-
formatTxHash(execution.destination_transaction_hashes[execution.destination_transaction_hashes.length - 1]),
|
|
658
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react3.ExternalLink, { className: "uf-w-3 uf-h-3" })
|
|
659
|
-
]
|
|
660
|
-
}
|
|
661
|
-
)
|
|
662
|
-
] })
|
|
663
|
-
] });
|
|
887
|
+
]
|
|
888
|
+
}
|
|
889
|
+
) });
|
|
664
890
|
}
|
|
665
891
|
|
|
666
892
|
// src/components/deposits/DepositsModal.tsx
|
|
667
|
-
var
|
|
893
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
668
894
|
function DepositsModal({
|
|
669
895
|
open,
|
|
670
896
|
onOpenChange,
|
|
@@ -674,6 +900,8 @@ function DepositsModal({
|
|
|
674
900
|
themeClass = ""
|
|
675
901
|
}) {
|
|
676
902
|
const [allExecutions, setAllExecutions] = (0, import_react2.useState)(sessionExecutions);
|
|
903
|
+
const [selectedExecution, setSelectedExecution] = (0, import_react2.useState)(null);
|
|
904
|
+
const [detailModalOpen, setDetailModalOpen] = (0, import_react2.useState)(false);
|
|
677
905
|
(0, import_react2.useEffect)(() => {
|
|
678
906
|
if (!open || !userId) return;
|
|
679
907
|
const fetchExecutions = async () => {
|
|
@@ -699,54 +927,143 @@ function DepositsModal({
|
|
|
699
927
|
const handleClose = () => {
|
|
700
928
|
onOpenChange(false);
|
|
701
929
|
};
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
930
|
+
const handleExecutionClick = (execution) => {
|
|
931
|
+
setSelectedExecution(execution);
|
|
932
|
+
setDetailModalOpen(true);
|
|
933
|
+
};
|
|
934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
935
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(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: [
|
|
936
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DepositHeader, { title: "Deposit Tracker", onClose: handleClose }),
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden uf-pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children: allExecutions.map((execution) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
938
|
+
DepositExecutionItem,
|
|
939
|
+
{
|
|
940
|
+
execution,
|
|
941
|
+
onClick: () => handleExecutionClick(execution)
|
|
942
|
+
},
|
|
943
|
+
execution.id
|
|
944
|
+
)) }) }) })
|
|
945
|
+
] }) }),
|
|
946
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
947
|
+
DepositDetailModal,
|
|
948
|
+
{
|
|
949
|
+
open: detailModalOpen,
|
|
950
|
+
onOpenChange: setDetailModalOpen,
|
|
951
|
+
execution: selectedExecution,
|
|
952
|
+
themeClass
|
|
953
|
+
}
|
|
954
|
+
)
|
|
955
|
+
] });
|
|
706
956
|
}
|
|
707
957
|
|
|
708
958
|
// src/components/deposits/DepositSuccessToast.tsx
|
|
709
|
-
var
|
|
959
|
+
var import_lucide_react5 = require("lucide-react");
|
|
960
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
710
961
|
function DepositSuccessToast({
|
|
711
962
|
depositTx,
|
|
712
|
-
completionTx,
|
|
713
963
|
orderSubmittedAt,
|
|
714
|
-
orderFilledAt,
|
|
715
|
-
explorerUrl,
|
|
716
|
-
completionExplorerUrl,
|
|
717
964
|
status,
|
|
718
965
|
tokenIconUrl,
|
|
966
|
+
sourceAmountBaseUnit = "0",
|
|
719
967
|
onClose
|
|
720
968
|
}) {
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
969
|
+
const isPending = status === "pending" /* PENDING */ || status === "waiting" /* WAITING */ || status === "delayed" /* DELAYED */;
|
|
970
|
+
const formatDateTime = (timestamp) => {
|
|
971
|
+
try {
|
|
972
|
+
const date = new Date(timestamp);
|
|
973
|
+
const monthDay = date.toLocaleDateString("en-US", {
|
|
974
|
+
month: "short",
|
|
975
|
+
day: "numeric",
|
|
976
|
+
year: "numeric"
|
|
977
|
+
});
|
|
978
|
+
const time = date.toLocaleTimeString("en-US", {
|
|
979
|
+
hour: "numeric",
|
|
980
|
+
minute: "2-digit",
|
|
981
|
+
hour12: true
|
|
982
|
+
}).toLowerCase();
|
|
983
|
+
return `${monthDay} at ${time}`;
|
|
984
|
+
} catch {
|
|
985
|
+
return timestamp;
|
|
986
|
+
}
|
|
730
987
|
};
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
988
|
+
const formatUsdAmount = (baseUnitAmount) => {
|
|
989
|
+
try {
|
|
990
|
+
const amount = Number(baseUnitAmount) / 1e6;
|
|
991
|
+
return new Intl.NumberFormat("en-US", {
|
|
992
|
+
style: "currency",
|
|
993
|
+
currency: "USD",
|
|
994
|
+
minimumFractionDigits: 2,
|
|
995
|
+
maximumFractionDigits: 2
|
|
996
|
+
}).format(amount);
|
|
997
|
+
} catch {
|
|
998
|
+
return "$0.00";
|
|
737
999
|
}
|
|
738
|
-
|
|
1000
|
+
};
|
|
1001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("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: [
|
|
1002
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "uf-relative uf-flex-shrink-0", children: [
|
|
1003
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1004
|
+
"img",
|
|
1005
|
+
{
|
|
1006
|
+
src: tokenIconUrl || getIconUrl("/icons/tokens/usdc.svg"),
|
|
1007
|
+
alt: "Token",
|
|
1008
|
+
width: 36,
|
|
1009
|
+
height: 36,
|
|
1010
|
+
className: "uf-rounded-full"
|
|
1011
|
+
}
|
|
1012
|
+
),
|
|
1013
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("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__ */ (0, import_jsx_runtime8.jsx)(
|
|
1014
|
+
"svg",
|
|
1015
|
+
{
|
|
1016
|
+
width: "10",
|
|
1017
|
+
height: "10",
|
|
1018
|
+
viewBox: "0 0 12 12",
|
|
1019
|
+
fill: "none",
|
|
1020
|
+
className: "uf-animate-spin",
|
|
1021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1022
|
+
"path",
|
|
1023
|
+
{
|
|
1024
|
+
d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
|
|
1025
|
+
stroke: "white",
|
|
1026
|
+
strokeWidth: "2",
|
|
1027
|
+
strokeLinecap: "round"
|
|
1028
|
+
}
|
|
1029
|
+
)
|
|
1030
|
+
}
|
|
1031
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("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__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1032
|
+
"path",
|
|
1033
|
+
{
|
|
1034
|
+
d: "M10 3L4.5 8.5L2 6",
|
|
1035
|
+
stroke: "white",
|
|
1036
|
+
strokeWidth: "2",
|
|
1037
|
+
strokeLinecap: "round",
|
|
1038
|
+
strokeLinejoin: "round"
|
|
1039
|
+
}
|
|
1040
|
+
) }) })
|
|
1041
|
+
] }),
|
|
1042
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "uf-flex-1 uf-min-w-0", children: [
|
|
1043
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm", children: isPending ? "Deposit received" : "Deposit completed" }),
|
|
1044
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "uf-text-muted-foreground uf-text-xs", children: formatDateTime(orderSubmittedAt) })
|
|
1045
|
+
] }),
|
|
1046
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(sourceAmountBaseUnit) }),
|
|
1047
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1048
|
+
"button",
|
|
1049
|
+
{
|
|
1050
|
+
onClick: onClose,
|
|
1051
|
+
className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0",
|
|
1052
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react5.X, { className: "uf-w-4 uf-h-4" })
|
|
1053
|
+
}
|
|
1054
|
+
)
|
|
1055
|
+
] }) });
|
|
739
1056
|
}
|
|
740
1057
|
|
|
741
1058
|
// src/components/shared/select.tsx
|
|
742
1059
|
var React3 = __toESM(require("react"));
|
|
743
1060
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
744
|
-
var
|
|
745
|
-
var
|
|
1061
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1062
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
746
1063
|
var Select = SelectPrimitive.Root;
|
|
747
1064
|
var SelectGroup = SelectPrimitive.Group;
|
|
748
1065
|
var SelectValue = SelectPrimitive.Value;
|
|
749
|
-
var SelectTrigger = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1066
|
+
var SelectTrigger = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
750
1067
|
SelectPrimitive.Trigger,
|
|
751
1068
|
{
|
|
752
1069
|
ref,
|
|
@@ -757,12 +1074,12 @@ var SelectTrigger = React3.forwardRef(({ className, children, ...props }, ref) =
|
|
|
757
1074
|
...props,
|
|
758
1075
|
children: [
|
|
759
1076
|
children,
|
|
760
|
-
/* @__PURE__ */ (0,
|
|
1077
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
|
|
761
1078
|
]
|
|
762
1079
|
}
|
|
763
1080
|
));
|
|
764
1081
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
765
|
-
var SelectScrollUpButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1082
|
+
var SelectScrollUpButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
766
1083
|
SelectPrimitive.ScrollUpButton,
|
|
767
1084
|
{
|
|
768
1085
|
ref,
|
|
@@ -771,11 +1088,11 @@ var SelectScrollUpButton = React3.forwardRef(({ className, ...props }, ref) => /
|
|
|
771
1088
|
className
|
|
772
1089
|
),
|
|
773
1090
|
...props,
|
|
774
|
-
children: /* @__PURE__ */ (0,
|
|
1091
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.ChevronUp, { className: "uf-h-4 uf-w-4" })
|
|
775
1092
|
}
|
|
776
1093
|
));
|
|
777
1094
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
778
|
-
var SelectScrollDownButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1095
|
+
var SelectScrollDownButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
779
1096
|
SelectPrimitive.ScrollDownButton,
|
|
780
1097
|
{
|
|
781
1098
|
ref,
|
|
@@ -784,13 +1101,13 @@ var SelectScrollDownButton = React3.forwardRef(({ className, ...props }, ref) =>
|
|
|
784
1101
|
className
|
|
785
1102
|
),
|
|
786
1103
|
...props,
|
|
787
|
-
children: /* @__PURE__ */ (0,
|
|
1104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.ChevronDown, { className: "uf-h-4 uf-w-4" })
|
|
788
1105
|
}
|
|
789
1106
|
));
|
|
790
1107
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
791
1108
|
var SelectContent = React3.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
792
1109
|
const { themeClass } = useTheme();
|
|
793
|
-
return /* @__PURE__ */ (0,
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
794
1111
|
SelectPrimitive.Content,
|
|
795
1112
|
{
|
|
796
1113
|
ref,
|
|
@@ -803,8 +1120,8 @@ var SelectContent = React3.forwardRef(({ className, children, position = "popper
|
|
|
803
1120
|
position,
|
|
804
1121
|
...props,
|
|
805
1122
|
children: [
|
|
806
|
-
/* @__PURE__ */ (0,
|
|
807
|
-
/* @__PURE__ */ (0,
|
|
1123
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectScrollUpButton, {}),
|
|
1124
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
808
1125
|
SelectPrimitive.Viewport,
|
|
809
1126
|
{
|
|
810
1127
|
className: cn(
|
|
@@ -814,13 +1131,13 @@ var SelectContent = React3.forwardRef(({ className, children, position = "popper
|
|
|
814
1131
|
children
|
|
815
1132
|
}
|
|
816
1133
|
),
|
|
817
|
-
/* @__PURE__ */ (0,
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectScrollDownButton, {})
|
|
818
1135
|
]
|
|
819
1136
|
}
|
|
820
1137
|
) });
|
|
821
1138
|
});
|
|
822
1139
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
823
|
-
var SelectLabel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1140
|
+
var SelectLabel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
824
1141
|
SelectPrimitive.Label,
|
|
825
1142
|
{
|
|
826
1143
|
ref,
|
|
@@ -829,7 +1146,7 @@ var SelectLabel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
829
1146
|
}
|
|
830
1147
|
));
|
|
831
1148
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
832
|
-
var SelectItem = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1149
|
+
var SelectItem = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
833
1150
|
SelectPrimitive.Item,
|
|
834
1151
|
{
|
|
835
1152
|
ref,
|
|
@@ -839,13 +1156,13 @@ var SelectItem = React3.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
839
1156
|
),
|
|
840
1157
|
...props,
|
|
841
1158
|
children: [
|
|
842
|
-
/* @__PURE__ */ (0,
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
1159
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "uf-absolute uf-left-2 uf-flex uf-h-3.5 uf-w-3.5 uf-items-center uf-justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react6.Check, { className: "uf-h-4 uf-w-4" }) }) }),
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectPrimitive.ItemText, { children })
|
|
844
1161
|
]
|
|
845
1162
|
}
|
|
846
1163
|
));
|
|
847
1164
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
848
|
-
var SelectSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1165
|
+
var SelectSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
849
1166
|
SelectPrimitive.Separator,
|
|
850
1167
|
{
|
|
851
1168
|
ref,
|
|
@@ -859,7 +1176,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
859
1176
|
var React4 = __toESM(require("react"));
|
|
860
1177
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
861
1178
|
var import_class_variance_authority = require("class-variance-authority");
|
|
862
|
-
var
|
|
1179
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
863
1180
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
864
1181
|
"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",
|
|
865
1182
|
{
|
|
@@ -888,7 +1205,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
888
1205
|
var Button = React4.forwardRef(
|
|
889
1206
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
890
1207
|
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
891
|
-
return /* @__PURE__ */ (0,
|
|
1208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
892
1209
|
Comp,
|
|
893
1210
|
{
|
|
894
1211
|
className: cn(buttonVariants({ variant, size, className })),
|
|
@@ -903,13 +1220,13 @@ Button.displayName = "Button";
|
|
|
903
1220
|
// src/components/shared/tooltip.tsx
|
|
904
1221
|
var React5 = __toESM(require("react"));
|
|
905
1222
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
906
|
-
var
|
|
1223
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
907
1224
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
908
1225
|
var Tooltip = TooltipPrimitive.Root;
|
|
909
1226
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
910
1227
|
var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
911
1228
|
const { themeClass } = useTheme();
|
|
912
|
-
return /* @__PURE__ */ (0,
|
|
1229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
913
1230
|
TooltipPrimitive.Content,
|
|
914
1231
|
{
|
|
915
1232
|
ref,
|
|
@@ -995,7 +1312,7 @@ var en_default = {
|
|
|
995
1312
|
var i18n = en_default;
|
|
996
1313
|
|
|
997
1314
|
// src/components/deposits/TransferCryptoBase.tsx
|
|
998
|
-
var
|
|
1315
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
999
1316
|
var t = i18n.transferCrypto;
|
|
1000
1317
|
var getChainKey = (chainId, chainType) => {
|
|
1001
1318
|
return `${chainType}:${chainId}`;
|
|
@@ -1261,8 +1578,8 @@ function TransferCryptoBase({
|
|
|
1261
1578
|
const processingTime = currentChainFromBackend?.estimated_processing_time ?? null;
|
|
1262
1579
|
const minDepositUsd = currentChainFromBackend?.minimum_deposit_amount_usd ?? 3;
|
|
1263
1580
|
const renderTokenItem = (tokenData) => {
|
|
1264
|
-
return /* @__PURE__ */ (0,
|
|
1265
|
-
/* @__PURE__ */ (0,
|
|
1581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
1582
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1266
1583
|
"img",
|
|
1267
1584
|
{
|
|
1268
1585
|
src: tokenData.icon_url,
|
|
@@ -1272,13 +1589,13 @@ function TransferCryptoBase({
|
|
|
1272
1589
|
className: "uf-rounded-full uf-flex-shrink-0"
|
|
1273
1590
|
}
|
|
1274
1591
|
),
|
|
1275
|
-
/* @__PURE__ */ (0,
|
|
1276
|
-
showDetailedDropdowns && /* @__PURE__ */ (0,
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
|
|
1593
|
+
showDetailedDropdowns && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
|
|
1277
1594
|
] });
|
|
1278
1595
|
};
|
|
1279
1596
|
const renderChainItem = (chainData) => {
|
|
1280
|
-
return /* @__PURE__ */ (0,
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1282
1599
|
"img",
|
|
1283
1600
|
{
|
|
1284
1601
|
src: chainData.icon_url,
|
|
@@ -1288,24 +1605,24 @@ function TransferCryptoBase({
|
|
|
1288
1605
|
className: "uf-rounded-full uf-flex-shrink-0"
|
|
1289
1606
|
}
|
|
1290
1607
|
),
|
|
1291
|
-
/* @__PURE__ */ (0,
|
|
1292
|
-
showDetailedDropdowns && /* @__PURE__ */ (0,
|
|
1608
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
|
|
1609
|
+
showDetailedDropdowns && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
|
|
1293
1610
|
] });
|
|
1294
1611
|
};
|
|
1295
1612
|
const selectContainerClass = layoutVariant === "horizontal" ? "uf-grid uf-grid-cols-2 uf-gap-2.5" : "uf-space-y-3";
|
|
1296
|
-
return /* @__PURE__ */ (0,
|
|
1297
|
-
/* @__PURE__ */ (0,
|
|
1298
|
-
/* @__PURE__ */ (0,
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
1300
|
-
/* @__PURE__ */ (0,
|
|
1613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipProvider, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-space-y-3", children: [
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: selectContainerClass, children: [
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
|
|
1617
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1301
1618
|
Select,
|
|
1302
1619
|
{
|
|
1303
1620
|
value: token,
|
|
1304
1621
|
onValueChange: setToken,
|
|
1305
1622
|
disabled: tokensLoading || supportedTokens.length === 0,
|
|
1306
1623
|
children: [
|
|
1307
|
-
/* @__PURE__ */ (0,
|
|
1308
|
-
/* @__PURE__ */ (0,
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(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__ */ (0, import_jsx_runtime12.jsx)(SelectValue, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
|
|
1625
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectContent, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1309
1626
|
SelectItem,
|
|
1310
1627
|
{
|
|
1311
1628
|
value: tokenData.symbol,
|
|
@@ -1318,51 +1635,51 @@ function TransferCryptoBase({
|
|
|
1318
1635
|
}
|
|
1319
1636
|
)
|
|
1320
1637
|
] }),
|
|
1321
|
-
/* @__PURE__ */ (0,
|
|
1322
|
-
/* @__PURE__ */ (0,
|
|
1638
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1639
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
|
|
1323
1640
|
t.supportedChain,
|
|
1324
|
-
/* @__PURE__ */ (0,
|
|
1641
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "uf-text-[10px]", children: [
|
|
1325
1642
|
"$",
|
|
1326
1643
|
minDepositUsd,
|
|
1327
1644
|
" ",
|
|
1328
1645
|
t.minDeposit.label
|
|
1329
1646
|
] }),
|
|
1330
|
-
/* @__PURE__ */ (0,
|
|
1331
|
-
/* @__PURE__ */ (0,
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Tooltip, { children: [
|
|
1648
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1332
1649
|
"span",
|
|
1333
1650
|
{
|
|
1334
1651
|
className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
|
|
1335
1652
|
tabIndex: 0,
|
|
1336
1653
|
role: "button",
|
|
1337
1654
|
"aria-label": "Minimum deposit information",
|
|
1338
|
-
children: /* @__PURE__ */ (0,
|
|
1655
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Info, { className: "uf-w-3 uf-h-3" })
|
|
1339
1656
|
}
|
|
1340
1657
|
) }),
|
|
1341
|
-
/* @__PURE__ */ (0,
|
|
1658
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1342
1659
|
TooltipContent,
|
|
1343
1660
|
{
|
|
1344
1661
|
side: "left",
|
|
1345
1662
|
align: "center",
|
|
1346
1663
|
className: "uf-max-w-[200px]",
|
|
1347
|
-
children: /* @__PURE__ */ (0,
|
|
1664
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: t.minDeposit.tooltip })
|
|
1348
1665
|
}
|
|
1349
1666
|
)
|
|
1350
1667
|
] })
|
|
1351
1668
|
] }),
|
|
1352
|
-
/* @__PURE__ */ (0,
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1353
1670
|
Select,
|
|
1354
1671
|
{
|
|
1355
1672
|
value: chain,
|
|
1356
1673
|
onValueChange: setChain,
|
|
1357
1674
|
disabled: tokensLoading || availableChainsForToken.length === 0,
|
|
1358
1675
|
children: [
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
1360
|
-
/* @__PURE__ */ (0,
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(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__ */ (0, import_jsx_runtime12.jsx)(SelectValue, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectContent, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
|
|
1361
1678
|
const chainKey = getChainKey(
|
|
1362
1679
|
chainData.chain_id,
|
|
1363
1680
|
chainData.chain_type
|
|
1364
1681
|
);
|
|
1365
|
-
return /* @__PURE__ */ (0,
|
|
1682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1366
1683
|
SelectItem,
|
|
1367
1684
|
{
|
|
1368
1685
|
value: chainKey,
|
|
@@ -1377,14 +1694,14 @@ function TransferCryptoBase({
|
|
|
1377
1694
|
)
|
|
1378
1695
|
] })
|
|
1379
1696
|
] }),
|
|
1380
|
-
/* @__PURE__ */ (0,
|
|
1697
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-bg-card uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1381
1698
|
"div",
|
|
1382
1699
|
{
|
|
1383
1700
|
className: "uf-flex uf-items-center uf-justify-center",
|
|
1384
1701
|
style: { width: 180, height: 180 },
|
|
1385
|
-
children: /* @__PURE__ */ (0,
|
|
1702
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
|
|
1386
1703
|
}
|
|
1387
|
-
) : depositAddress ? /* @__PURE__ */ (0,
|
|
1704
|
+
) : depositAddress ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1388
1705
|
StyledQRCode,
|
|
1389
1706
|
{
|
|
1390
1707
|
value: depositAddress,
|
|
@@ -1394,93 +1711,93 @@ function TransferCryptoBase({
|
|
|
1394
1711
|
darkMode: isDarkMode
|
|
1395
1712
|
},
|
|
1396
1713
|
`qr-${depositAddress}-${chain}`
|
|
1397
|
-
) : /* @__PURE__ */ (0,
|
|
1714
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1398
1715
|
"div",
|
|
1399
1716
|
{
|
|
1400
1717
|
className: "uf-flex uf-items-center uf-justify-center",
|
|
1401
1718
|
style: { width: 180, height: 180 },
|
|
1402
|
-
children: /* @__PURE__ */ (0,
|
|
1719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
|
|
1403
1720
|
}
|
|
1404
1721
|
) }) }),
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1406
|
-
/* @__PURE__ */ (0,
|
|
1407
|
-
/* @__PURE__ */ (0,
|
|
1722
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-justify-between", children: [
|
|
1724
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1", children: [
|
|
1408
1725
|
t.depositAddress.label,
|
|
1409
|
-
/* @__PURE__ */ (0,
|
|
1410
|
-
/* @__PURE__ */ (0,
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Tooltip, { children: [
|
|
1727
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1411
1728
|
"span",
|
|
1412
1729
|
{
|
|
1413
1730
|
className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
|
|
1414
1731
|
tabIndex: 0,
|
|
1415
1732
|
role: "button",
|
|
1416
1733
|
"aria-label": "Deposit address information",
|
|
1417
|
-
children: /* @__PURE__ */ (0,
|
|
1734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Info, { className: "uf-w-3 uf-h-3" })
|
|
1418
1735
|
}
|
|
1419
1736
|
) }),
|
|
1420
|
-
/* @__PURE__ */ (0,
|
|
1737
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1421
1738
|
TooltipContent,
|
|
1422
1739
|
{
|
|
1423
1740
|
side: "top",
|
|
1424
1741
|
align: "center",
|
|
1425
1742
|
className: "uf-max-w-[240px]",
|
|
1426
|
-
children: /* @__PURE__ */ (0,
|
|
1743
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
|
|
1427
1744
|
}
|
|
1428
1745
|
)
|
|
1429
1746
|
] })
|
|
1430
1747
|
] }),
|
|
1431
|
-
copyButtonMode === "compact" && /* @__PURE__ */ (0,
|
|
1748
|
+
copyButtonMode === "compact" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1432
1749
|
"button",
|
|
1433
1750
|
{
|
|
1434
1751
|
onClick: handleCopyAddress,
|
|
1435
1752
|
disabled: loading || !depositAddress,
|
|
1436
1753
|
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",
|
|
1437
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1439
|
-
/* @__PURE__ */ (0,
|
|
1440
|
-
] }) : /* @__PURE__ */ (0,
|
|
1441
|
-
/* @__PURE__ */ (0,
|
|
1442
|
-
/* @__PURE__ */ (0,
|
|
1754
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Check, { className: "uf-w-3 uf-h-3" }),
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: t.copied })
|
|
1757
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1758
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Copy, { className: "uf-w-3 uf-h-3" }),
|
|
1759
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: t.copyAddress })
|
|
1443
1760
|
] })
|
|
1444
1761
|
}
|
|
1445
1762
|
)
|
|
1446
1763
|
] }),
|
|
1447
|
-
loading ? /* @__PURE__ */ (0,
|
|
1764
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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__ */ (0, import_jsx_runtime12.jsx)("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__ */ (0, import_jsx_runtime12.jsx)("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 })
|
|
1448
1765
|
] }),
|
|
1449
|
-
copyButtonMode === "fullWidth" && /* @__PURE__ */ (0,
|
|
1766
|
+
copyButtonMode === "fullWidth" && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1450
1767
|
Button,
|
|
1451
1768
|
{
|
|
1452
1769
|
onClick: handleCopyAddress,
|
|
1453
1770
|
disabled: loading || !depositAddress,
|
|
1454
1771
|
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",
|
|
1455
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
1456
|
-
/* @__PURE__ */ (0,
|
|
1772
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1773
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Check, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
|
|
1457
1774
|
t.copied
|
|
1458
|
-
] }) : /* @__PURE__ */ (0,
|
|
1459
|
-
/* @__PURE__ */ (0,
|
|
1775
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1776
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Copy, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
|
|
1460
1777
|
t.copyAddress
|
|
1461
1778
|
] })
|
|
1462
1779
|
}
|
|
1463
1780
|
),
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1781
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-border-t uf-border-border", children: [
|
|
1782
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1466
1783
|
"button",
|
|
1467
1784
|
{
|
|
1468
1785
|
onClick: () => setDetailsExpanded(!detailsExpanded),
|
|
1469
1786
|
className: "uf-w-full uf-flex uf-items-center uf-justify-between uf-py-2.5",
|
|
1470
1787
|
children: [
|
|
1471
|
-
/* @__PURE__ */ (0,
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
1473
|
-
/* @__PURE__ */ (0,
|
|
1788
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
1789
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.DollarSign, { className: "uf-w-3 uf-h-3" }) }),
|
|
1790
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "uf-text-xs", children: [
|
|
1474
1791
|
t.priceImpact.label,
|
|
1475
1792
|
":",
|
|
1476
1793
|
" ",
|
|
1477
|
-
/* @__PURE__ */ (0,
|
|
1794
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "uf-text-foreground", children: [
|
|
1478
1795
|
priceImpact.toFixed(2),
|
|
1479
1796
|
"%"
|
|
1480
1797
|
] })
|
|
1481
1798
|
] }),
|
|
1482
|
-
/* @__PURE__ */ (0,
|
|
1483
|
-
/* @__PURE__ */ (0,
|
|
1799
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Tooltip, { children: [
|
|
1800
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1484
1801
|
"span",
|
|
1485
1802
|
{
|
|
1486
1803
|
className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
|
|
@@ -1493,75 +1810,75 @@ function TransferCryptoBase({
|
|
|
1493
1810
|
tabIndex: 0,
|
|
1494
1811
|
role: "button",
|
|
1495
1812
|
"aria-label": "Price impact information",
|
|
1496
|
-
children: /* @__PURE__ */ (0,
|
|
1813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Info, { className: "uf-w-3 uf-h-3" })
|
|
1497
1814
|
}
|
|
1498
1815
|
) }),
|
|
1499
|
-
/* @__PURE__ */ (0,
|
|
1816
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1500
1817
|
TooltipContent,
|
|
1501
1818
|
{
|
|
1502
1819
|
side: "top",
|
|
1503
1820
|
align: "center",
|
|
1504
1821
|
className: "uf-max-w-[240px]",
|
|
1505
|
-
children: /* @__PURE__ */ (0,
|
|
1822
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: t.priceImpact.tooltip })
|
|
1506
1823
|
}
|
|
1507
1824
|
)
|
|
1508
1825
|
] })
|
|
1509
1826
|
] }),
|
|
1510
|
-
detailsExpanded ? /* @__PURE__ */ (0,
|
|
1827
|
+
detailsExpanded ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
|
|
1511
1828
|
]
|
|
1512
1829
|
}
|
|
1513
1830
|
),
|
|
1514
|
-
detailsExpanded && /* @__PURE__ */ (0,
|
|
1515
|
-
/* @__PURE__ */ (0,
|
|
1516
|
-
/* @__PURE__ */ (0,
|
|
1517
|
-
/* @__PURE__ */ (0,
|
|
1831
|
+
detailsExpanded && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
|
|
1832
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
1833
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
|
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "uf-text-xs", children: [
|
|
1518
1835
|
t.slippage.label,
|
|
1519
1836
|
":",
|
|
1520
1837
|
" ",
|
|
1521
|
-
/* @__PURE__ */ (0,
|
|
1838
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "uf-text-foreground", children: [
|
|
1522
1839
|
t.slippage.auto,
|
|
1523
1840
|
" \u2022 ",
|
|
1524
1841
|
maxSlippage.toFixed(2),
|
|
1525
1842
|
"%"
|
|
1526
1843
|
] })
|
|
1527
1844
|
] }),
|
|
1528
|
-
/* @__PURE__ */ (0,
|
|
1529
|
-
/* @__PURE__ */ (0,
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Tooltip, { children: [
|
|
1846
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1530
1847
|
"span",
|
|
1531
1848
|
{
|
|
1532
1849
|
className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
|
|
1533
1850
|
tabIndex: 0,
|
|
1534
1851
|
role: "button",
|
|
1535
1852
|
"aria-label": "Slippage information",
|
|
1536
|
-
children: /* @__PURE__ */ (0,
|
|
1853
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Info, { className: "uf-w-3 uf-h-3" })
|
|
1537
1854
|
}
|
|
1538
1855
|
) }),
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1856
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1540
1857
|
TooltipContent,
|
|
1541
1858
|
{
|
|
1542
1859
|
side: "top",
|
|
1543
1860
|
align: "center",
|
|
1544
1861
|
className: "uf-max-w-[240px]",
|
|
1545
|
-
children: /* @__PURE__ */ (0,
|
|
1862
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: t.slippage.tooltip })
|
|
1546
1863
|
}
|
|
1547
1864
|
)
|
|
1548
1865
|
] })
|
|
1549
1866
|
] }),
|
|
1550
|
-
/* @__PURE__ */ (0,
|
|
1551
|
-
/* @__PURE__ */ (0,
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1867
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
1868
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Clock, { className: "uf-w-3 uf-h-3" }) }),
|
|
1869
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "uf-text-xs", children: [
|
|
1553
1870
|
t.processingTime.label,
|
|
1554
1871
|
":",
|
|
1555
1872
|
" ",
|
|
1556
|
-
/* @__PURE__ */ (0,
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
|
|
1557
1874
|
] })
|
|
1558
1875
|
] }),
|
|
1559
|
-
/* @__PURE__ */ (0,
|
|
1560
|
-
/* @__PURE__ */ (0,
|
|
1561
|
-
/* @__PURE__ */ (0,
|
|
1876
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
1877
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.FileText, { className: "uf-w-3 uf-h-3" }) }),
|
|
1878
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "uf-text-xs", children: [
|
|
1562
1879
|
t.help.needHelp,
|
|
1563
1880
|
" ",
|
|
1564
|
-
/* @__PURE__ */ (0,
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1565
1882
|
"a",
|
|
1566
1883
|
{
|
|
1567
1884
|
href: "#",
|
|
@@ -1572,8 +1889,8 @@ function TransferCryptoBase({
|
|
|
1572
1889
|
] })
|
|
1573
1890
|
] })
|
|
1574
1891
|
] }),
|
|
1575
|
-
/* @__PURE__ */ (0,
|
|
1576
|
-
/* @__PURE__ */ (0,
|
|
1892
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1577
1894
|
"a",
|
|
1578
1895
|
{
|
|
1579
1896
|
href: "https://unifold.io/terms",
|
|
@@ -1582,38 +1899,37 @@ function TransferCryptoBase({
|
|
|
1582
1899
|
children: t.terms.termsApply
|
|
1583
1900
|
}
|
|
1584
1901
|
),
|
|
1585
|
-
depositExecutions.length > 1 && /* @__PURE__ */ (0,
|
|
1902
|
+
depositExecutions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1586
1903
|
"button",
|
|
1587
1904
|
{
|
|
1588
1905
|
onClick: () => setDepositsModalOpen(true),
|
|
1589
1906
|
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",
|
|
1590
1907
|
children: [
|
|
1591
|
-
/* @__PURE__ */ (0,
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.Clock, { className: "uf-w-3.5 uf-h-3.5" }),
|
|
1592
1909
|
"Track deposits (",
|
|
1593
1910
|
depositExecutions.length,
|
|
1594
1911
|
")",
|
|
1595
|
-
/* @__PURE__ */ (0,
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react7.ChevronRight, { className: "uf-w-3 uf-h-3" })
|
|
1596
1913
|
]
|
|
1597
1914
|
}
|
|
1598
1915
|
)
|
|
1599
1916
|
] })
|
|
1600
1917
|
] }),
|
|
1601
|
-
depositExecutions.length === 1 && /* @__PURE__ */ (0,
|
|
1918
|
+
depositExecutions.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("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__ */ (0, import_jsx_runtime12.jsx)(
|
|
1602
1919
|
DepositSuccessToast,
|
|
1603
1920
|
{
|
|
1604
1921
|
depositTx: depositExecutions[0].transaction_hash,
|
|
1605
|
-
completionTx: depositExecutions[0].destination_transaction_hashes?.[0] || (depositExecutions[0].status === "succeeded" /* SUCCEEDED */ ? depositExecutions[0].transaction_hash : void 0),
|
|
1606
1922
|
orderSubmittedAt: depositExecutions[0].created_at || (/* @__PURE__ */ new Date()).toISOString(),
|
|
1607
1923
|
orderFilledAt: depositExecutions[0].updated_at || (/* @__PURE__ */ new Date()).toISOString(),
|
|
1608
1924
|
explorerUrl: depositExecutions[0].explorer_url,
|
|
1609
|
-
completionExplorerUrl: depositExecutions[0].destination_explorer_url ?? void 0,
|
|
1610
1925
|
status: depositExecutions[0].status,
|
|
1611
1926
|
tokenIconUrl: depositExecutions[0].source_token_metadata?.icon_url,
|
|
1927
|
+
sourceAmountBaseUnit: depositExecutions[0].source_amount_base_unit,
|
|
1612
1928
|
onClose: () => setDepositExecutions([])
|
|
1613
1929
|
},
|
|
1614
1930
|
depositExecutions[0].id
|
|
1615
1931
|
) }),
|
|
1616
|
-
/* @__PURE__ */ (0,
|
|
1932
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1617
1933
|
DepositsModal,
|
|
1618
1934
|
{
|
|
1619
1935
|
open: depositsModalOpen,
|
|
@@ -1628,9 +1944,9 @@ function TransferCryptoBase({
|
|
|
1628
1944
|
}
|
|
1629
1945
|
|
|
1630
1946
|
// src/components/deposits/TransferCrypto.tsx
|
|
1631
|
-
var
|
|
1947
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1632
1948
|
function TransferCrypto(props) {
|
|
1633
|
-
return /* @__PURE__ */ (0,
|
|
1949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1634
1950
|
TransferCryptoBase,
|
|
1635
1951
|
{
|
|
1636
1952
|
...props,
|
|
@@ -1642,51 +1958,49 @@ function TransferCrypto(props) {
|
|
|
1642
1958
|
|
|
1643
1959
|
// src/components/deposits/BuyWithCard.tsx
|
|
1644
1960
|
var import_react5 = require("react");
|
|
1645
|
-
var
|
|
1961
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1646
1962
|
|
|
1647
1963
|
// src/components/deposits/CurrencyModal.tsx
|
|
1648
1964
|
var import_react4 = require("react");
|
|
1649
|
-
var
|
|
1965
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1650
1966
|
|
|
1651
1967
|
// src/components/currency/CurrencyListItem.tsx
|
|
1652
|
-
var
|
|
1653
|
-
var
|
|
1968
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1969
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1654
1970
|
function CurrencyListItem({
|
|
1655
1971
|
currency,
|
|
1656
1972
|
isSelected,
|
|
1657
1973
|
onSelect
|
|
1658
1974
|
}) {
|
|
1659
|
-
const iconUrl = currency.icon_url;
|
|
1660
|
-
return /* @__PURE__ */ (0,
|
|
1975
|
+
const iconUrl = getPreferredIconUrl(currency.icon_urls, "png") || currency.icon_url;
|
|
1976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1661
1977
|
"button",
|
|
1662
1978
|
{
|
|
1663
1979
|
onClick: () => onSelect(currency.currency_code),
|
|
1664
1980
|
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",
|
|
1665
1981
|
children: [
|
|
1666
|
-
/* @__PURE__ */ (0,
|
|
1667
|
-
/* @__PURE__ */ (0,
|
|
1982
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
1983
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1668
1984
|
"img",
|
|
1669
1985
|
{
|
|
1670
1986
|
src: iconUrl,
|
|
1671
1987
|
alt: currency.name,
|
|
1672
|
-
|
|
1673
|
-
height: 40,
|
|
1674
|
-
className: "uf-w-full uf-h-full uf-object-cover"
|
|
1988
|
+
className: "uf-w-10 uf-h-10 uf-flex-shrink-0"
|
|
1675
1989
|
}
|
|
1676
|
-
)
|
|
1677
|
-
/* @__PURE__ */ (0,
|
|
1678
|
-
/* @__PURE__ */ (0,
|
|
1679
|
-
/* @__PURE__ */ (0,
|
|
1990
|
+
),
|
|
1991
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "uf-text-left", children: [
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
|
|
1993
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
|
|
1680
1994
|
] })
|
|
1681
1995
|
] }),
|
|
1682
|
-
isSelected && /* @__PURE__ */ (0,
|
|
1996
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react8.Check, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
|
|
1683
1997
|
]
|
|
1684
1998
|
}
|
|
1685
1999
|
);
|
|
1686
2000
|
}
|
|
1687
2001
|
|
|
1688
2002
|
// src/components/currency/CurrencyListSection.tsx
|
|
1689
|
-
var
|
|
2003
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1690
2004
|
function CurrencyListSection({
|
|
1691
2005
|
title,
|
|
1692
2006
|
currencies,
|
|
@@ -1694,9 +2008,9 @@ function CurrencyListSection({
|
|
|
1694
2008
|
onSelect
|
|
1695
2009
|
}) {
|
|
1696
2010
|
if (currencies.length === 0) return null;
|
|
1697
|
-
return /* @__PURE__ */ (0,
|
|
1698
|
-
/* @__PURE__ */ (0,
|
|
1699
|
-
currencies.map((currency) => /* @__PURE__ */ (0,
|
|
2011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
2012
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
|
|
2013
|
+
currencies.map((currency) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1700
2014
|
CurrencyListItem,
|
|
1701
2015
|
{
|
|
1702
2016
|
currency,
|
|
@@ -1709,7 +2023,7 @@ function CurrencyListSection({
|
|
|
1709
2023
|
}
|
|
1710
2024
|
|
|
1711
2025
|
// src/components/deposits/CurrencyModal.tsx
|
|
1712
|
-
var
|
|
2026
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1713
2027
|
function CurrencyModal({
|
|
1714
2028
|
open,
|
|
1715
2029
|
onOpenChange,
|
|
@@ -1746,8 +2060,8 @@ function CurrencyModal({
|
|
|
1746
2060
|
onOpenChange(false);
|
|
1747
2061
|
setSearchQuery("");
|
|
1748
2062
|
};
|
|
1749
|
-
return /* @__PURE__ */ (0,
|
|
1750
|
-
/* @__PURE__ */ (0,
|
|
2063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(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: [
|
|
2064
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1751
2065
|
DepositHeader,
|
|
1752
2066
|
{
|
|
1753
2067
|
title: "Currency",
|
|
@@ -1756,9 +2070,9 @@ function CurrencyModal({
|
|
|
1756
2070
|
onClose: handleClose
|
|
1757
2071
|
}
|
|
1758
2072
|
),
|
|
1759
|
-
/* @__PURE__ */ (0,
|
|
1760
|
-
/* @__PURE__ */ (0,
|
|
1761
|
-
/* @__PURE__ */ (0,
|
|
2073
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "uf-relative", children: [
|
|
2074
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react9.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" }),
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1762
2076
|
"input",
|
|
1763
2077
|
{
|
|
1764
2078
|
type: "text",
|
|
@@ -1769,8 +2083,8 @@ function CurrencyModal({
|
|
|
1769
2083
|
}
|
|
1770
2084
|
)
|
|
1771
2085
|
] }) }),
|
|
1772
|
-
/* @__PURE__ */ (0,
|
|
1773
|
-
/* @__PURE__ */ (0,
|
|
2086
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "uf-space-y-2", children: [
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1774
2088
|
CurrencyListSection,
|
|
1775
2089
|
{
|
|
1776
2090
|
title: "Popular currencies",
|
|
@@ -1779,8 +2093,8 @@ function CurrencyModal({
|
|
|
1779
2093
|
onSelect: handleSelect
|
|
1780
2094
|
}
|
|
1781
2095
|
),
|
|
1782
|
-
filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ (0,
|
|
1783
|
-
/* @__PURE__ */ (0,
|
|
2096
|
+
filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "uf-h-2" }),
|
|
2097
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1784
2098
|
CurrencyListSection,
|
|
1785
2099
|
{
|
|
1786
2100
|
title: "All currencies",
|
|
@@ -1789,7 +2103,7 @@ function CurrencyModal({
|
|
|
1789
2103
|
onSelect: handleSelect
|
|
1790
2104
|
}
|
|
1791
2105
|
),
|
|
1792
|
-
filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ (0,
|
|
2106
|
+
filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
|
|
1793
2107
|
] }) })
|
|
1794
2108
|
] }) });
|
|
1795
2109
|
}
|
|
@@ -1843,7 +2157,7 @@ function useUserIp() {
|
|
|
1843
2157
|
}
|
|
1844
2158
|
|
|
1845
2159
|
// src/components/deposits/BuyWithCard.tsx
|
|
1846
|
-
var
|
|
2160
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1847
2161
|
var t2 = i18n.buyWithCard;
|
|
1848
2162
|
var QUICK_AMOUNTS = [100, 500, 1e3];
|
|
1849
2163
|
function getCurrencySymbol(currencyCode) {
|
|
@@ -1871,7 +2185,8 @@ function BuyWithCard({
|
|
|
1871
2185
|
destinationChainId,
|
|
1872
2186
|
destinationTokenAddress,
|
|
1873
2187
|
themeClass = "",
|
|
1874
|
-
wallets: externalWallets
|
|
2188
|
+
wallets: externalWallets,
|
|
2189
|
+
assetCdnUrl
|
|
1875
2190
|
}) {
|
|
1876
2191
|
const [amount, setAmount] = (0, import_react5.useState)("500.00");
|
|
1877
2192
|
const [currency, setCurrency] = (0, import_react5.useState)("usd");
|
|
@@ -2143,38 +2458,36 @@ function BuyWithCard({
|
|
|
2143
2458
|
(a, b) => b.destination_amount - a.destination_amount
|
|
2144
2459
|
);
|
|
2145
2460
|
const currencySymbol = getCurrencySymbol(currency);
|
|
2146
|
-
return /* @__PURE__ */ (0,
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-pb-1 uf-relative uf-overflow-hidden", children: [
|
|
2462
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2148
2463
|
"div",
|
|
2149
2464
|
{
|
|
2150
2465
|
className: `uf-transition-all uf-duration-300 ${showQuotesView || showOnrampView ? "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0" : "uf-opacity-100"}`,
|
|
2151
2466
|
children: [
|
|
2152
|
-
/* @__PURE__ */ (0,
|
|
2153
|
-
/* @__PURE__ */ (0,
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-mb-6 uf-pt-4", children: [
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2154
2469
|
"button",
|
|
2155
2470
|
{
|
|
2156
2471
|
onClick: () => setShowCurrencyModal(true),
|
|
2157
2472
|
disabled: currenciesLoading,
|
|
2158
2473
|
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",
|
|
2159
2474
|
children: [
|
|
2160
|
-
selectedCurrencyData && /* @__PURE__ */ (0,
|
|
2475
|
+
selectedCurrencyData && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2161
2476
|
"img",
|
|
2162
2477
|
{
|
|
2163
|
-
src: selectedCurrencyData.icon_url,
|
|
2478
|
+
src: getPreferredIconUrl(selectedCurrencyData.icon_urls, "png") || selectedCurrencyData.icon_url,
|
|
2164
2479
|
alt: selectedCurrencyData.name,
|
|
2165
|
-
|
|
2166
|
-
height: 16,
|
|
2167
|
-
className: "uf-w-full uf-h-full uf-object-cover uf-rounded-full"
|
|
2480
|
+
className: "uf-w-4 uf-h-4"
|
|
2168
2481
|
}
|
|
2169
|
-
)
|
|
2170
|
-
/* @__PURE__ */ (0,
|
|
2171
|
-
/* @__PURE__ */ (0,
|
|
2482
|
+
),
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.ChevronDown, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
|
|
2172
2485
|
]
|
|
2173
2486
|
}
|
|
2174
2487
|
) }),
|
|
2175
|
-
/* @__PURE__ */ (0,
|
|
2176
|
-
/* @__PURE__ */ (0,
|
|
2177
|
-
/* @__PURE__ */ (0,
|
|
2488
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-text-center uf-mb-4", children: [
|
|
2489
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
|
|
2490
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2178
2491
|
"span",
|
|
2179
2492
|
{
|
|
2180
2493
|
className: "uf-font-normal uf-text-foreground uf-flex-shrink-0 uf-mr-1",
|
|
@@ -2184,7 +2497,7 @@ function BuyWithCard({
|
|
|
2184
2497
|
children: currencySymbol
|
|
2185
2498
|
}
|
|
2186
2499
|
),
|
|
2187
|
-
/* @__PURE__ */ (0,
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2188
2501
|
"input",
|
|
2189
2502
|
{
|
|
2190
2503
|
type: "text",
|
|
@@ -2200,12 +2513,12 @@ function BuyWithCard({
|
|
|
2200
2513
|
}
|
|
2201
2514
|
)
|
|
2202
2515
|
] }) }),
|
|
2203
|
-
quotesLoading ? /* @__PURE__ */ (0,
|
|
2516
|
+
quotesLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
|
|
2204
2517
|
calculateUSDC(),
|
|
2205
2518
|
" USDC (Perps)"
|
|
2206
2519
|
] })
|
|
2207
2520
|
] }),
|
|
2208
|
-
/* @__PURE__ */ (0,
|
|
2521
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2209
2522
|
"button",
|
|
2210
2523
|
{
|
|
2211
2524
|
onClick: () => handleQuickAmount(quickAmount),
|
|
@@ -2218,31 +2531,31 @@ function BuyWithCard({
|
|
|
2218
2531
|
quickAmount
|
|
2219
2532
|
)) })
|
|
2220
2533
|
] }),
|
|
2221
|
-
/* @__PURE__ */ (0,
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
2223
|
-
/* @__PURE__ */ (0,
|
|
2224
|
-
quotes.length > 0 && !quotesLoading && /* @__PURE__ */ (0,
|
|
2534
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-mb-6", children: [
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-font-medium uf-mb-2 uf-px-1", children: [
|
|
2536
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-foreground", children: "Provider" }),
|
|
2537
|
+
quotes.length > 0 && !quotesLoading && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "uf-text-[10px] uf-text-foreground uf-font-normal", children: [
|
|
2225
2538
|
"Refreshing in ",
|
|
2226
2539
|
countdown,
|
|
2227
2540
|
"s"
|
|
2228
2541
|
] })
|
|
2229
2542
|
] }),
|
|
2230
|
-
/* @__PURE__ */ (0,
|
|
2543
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2231
2544
|
"button",
|
|
2232
2545
|
{
|
|
2233
2546
|
onClick: () => handleViewChange("quotes"),
|
|
2234
2547
|
disabled: quotesLoading || quotes.length === 0,
|
|
2235
2548
|
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",
|
|
2236
|
-
children: quotesLoading ? /* @__PURE__ */ (0,
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2239
|
-
/* @__PURE__ */ (0,
|
|
2240
|
-
/* @__PURE__ */ (0,
|
|
2549
|
+
children: quotesLoading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-text-left uf-w-full uf-animate-pulse", children: [
|
|
2550
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
|
|
2551
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
2552
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
|
|
2553
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
|
|
2241
2554
|
] })
|
|
2242
|
-
] }) : /* @__PURE__ */ (0,
|
|
2243
|
-
isAutoSelected && /* @__PURE__ */ (0,
|
|
2244
|
-
selectedProvider && /* @__PURE__ */ (0,
|
|
2245
|
-
/* @__PURE__ */ (0,
|
|
2555
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-w-full uf-text-left", children: [
|
|
2556
|
+
isAutoSelected && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
|
|
2557
|
+
selectedProvider && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
2558
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2246
2559
|
"img",
|
|
2247
2560
|
{
|
|
2248
2561
|
src: selectedProvider.icon_url,
|
|
@@ -2252,22 +2565,22 @@ function BuyWithCard({
|
|
|
2252
2565
|
className: "uf-rounded-full uf-flex-shrink-0"
|
|
2253
2566
|
}
|
|
2254
2567
|
),
|
|
2255
|
-
/* @__PURE__ */ (0,
|
|
2256
|
-
/* @__PURE__ */ (0,
|
|
2257
|
-
/* @__PURE__ */ (0,
|
|
2258
|
-
isAutoSelected && /* @__PURE__ */ (0,
|
|
2259
|
-
isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ (0,
|
|
2260
|
-
selectedProvider.low_kyc === false && /* @__PURE__ */ (0,
|
|
2568
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex-1 uf-min-w-0", children: [
|
|
2569
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
|
|
2570
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
|
|
2571
|
+
isAutoSelected && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
|
|
2572
|
+
isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
|
|
2573
|
+
selectedProvider.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
|
|
2261
2574
|
] })
|
|
2262
2575
|
] }),
|
|
2263
|
-
quotes.length > 0 && /* @__PURE__ */ (0,
|
|
2576
|
+
quotes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
|
|
2264
2577
|
] })
|
|
2265
2578
|
] })
|
|
2266
2579
|
}
|
|
2267
2580
|
),
|
|
2268
|
-
quotesError && /* @__PURE__ */ (0,
|
|
2581
|
+
quotesError && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
|
|
2269
2582
|
] }),
|
|
2270
|
-
/* @__PURE__ */ (0,
|
|
2583
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2271
2584
|
"button",
|
|
2272
2585
|
{
|
|
2273
2586
|
onClick: handleContinue,
|
|
@@ -2282,15 +2595,15 @@ function BuyWithCard({
|
|
|
2282
2595
|
]
|
|
2283
2596
|
}
|
|
2284
2597
|
),
|
|
2285
|
-
/* @__PURE__ */ (0,
|
|
2598
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2286
2599
|
"div",
|
|
2287
2600
|
{
|
|
2288
2601
|
className: `uf-transition-all uf-duration-300 ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
|
|
2289
|
-
children: /* @__PURE__ */ (0,
|
|
2602
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index) => {
|
|
2290
2603
|
const badges = getProviderBadges(quote, sortedQuotes);
|
|
2291
2604
|
const displayName = quote.service_provider_display_name;
|
|
2292
2605
|
const isSelected = selectedProvider?.service_provider === quote.service_provider;
|
|
2293
|
-
return /* @__PURE__ */ (0,
|
|
2606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2294
2607
|
"button",
|
|
2295
2608
|
{
|
|
2296
2609
|
onClick: () => {
|
|
@@ -2303,8 +2616,8 @@ function BuyWithCard({
|
|
|
2303
2616
|
},
|
|
2304
2617
|
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" : ""}`,
|
|
2305
2618
|
children: [
|
|
2306
|
-
/* @__PURE__ */ (0,
|
|
2307
|
-
/* @__PURE__ */ (0,
|
|
2619
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
2620
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2308
2621
|
"img",
|
|
2309
2622
|
{
|
|
2310
2623
|
src: quote.icon_url,
|
|
@@ -2314,10 +2627,10 @@ function BuyWithCard({
|
|
|
2314
2627
|
className: "uf-rounded-full"
|
|
2315
2628
|
}
|
|
2316
2629
|
) }),
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2318
|
-
/* @__PURE__ */ (0,
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2320
|
-
badges.map((badge, i) => /* @__PURE__ */ (0,
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-text-left", children: [
|
|
2631
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
|
|
2632
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
|
|
2633
|
+
badges.map((badge, i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2321
2634
|
"span",
|
|
2322
2635
|
{
|
|
2323
2636
|
className: "uf-text-[10px] uf-text-green-400 uf-font-normal",
|
|
@@ -2328,17 +2641,17 @@ function BuyWithCard({
|
|
|
2328
2641
|
},
|
|
2329
2642
|
i
|
|
2330
2643
|
)),
|
|
2331
|
-
quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ (0,
|
|
2332
|
-
quote.low_kyc === false && /* @__PURE__ */ (0,
|
|
2644
|
+
quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
|
|
2645
|
+
quote.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
|
|
2333
2646
|
] })
|
|
2334
2647
|
] })
|
|
2335
2648
|
] }),
|
|
2336
|
-
/* @__PURE__ */ (0,
|
|
2337
|
-
/* @__PURE__ */ (0,
|
|
2649
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-text-right", children: [
|
|
2650
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: [
|
|
2338
2651
|
quote.destination_amount.toFixed(2),
|
|
2339
2652
|
" USDC"
|
|
2340
2653
|
] }),
|
|
2341
|
-
/* @__PURE__ */ (0,
|
|
2654
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal", children: [
|
|
2342
2655
|
currencySymbol,
|
|
2343
2656
|
" ",
|
|
2344
2657
|
amount
|
|
@@ -2351,12 +2664,12 @@ function BuyWithCard({
|
|
|
2351
2664
|
}) })
|
|
2352
2665
|
}
|
|
2353
2666
|
),
|
|
2354
|
-
/* @__PURE__ */ (0,
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2355
2668
|
"div",
|
|
2356
2669
|
{
|
|
2357
2670
|
className: `uf-transition-all uf-duration-300 ${showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
|
|
2358
|
-
children: onrampSession && /* @__PURE__ */ (0,
|
|
2359
|
-
/* @__PURE__ */ (0,
|
|
2671
|
+
children: onrampSession && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-6 uf-pb-4 uf-px-2", children: [
|
|
2672
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-mb-6", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2360
2673
|
"img",
|
|
2361
2674
|
{
|
|
2362
2675
|
src: onrampSession.provider.icon_url,
|
|
@@ -2366,88 +2679,79 @@ function BuyWithCard({
|
|
|
2366
2679
|
className: "uf-rounded-2xl"
|
|
2367
2680
|
}
|
|
2368
2681
|
) }),
|
|
2369
|
-
/* @__PURE__ */ (0,
|
|
2682
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
|
|
2370
2683
|
"{{provider}}",
|
|
2371
2684
|
onrampSession.provider.service_provider_display_name
|
|
2372
2685
|
) }),
|
|
2373
|
-
/* @__PURE__ */ (0,
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2376
|
-
/* @__PURE__ */ (0,
|
|
2686
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
|
|
2687
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-center", children: [
|
|
2688
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2377
2690
|
"img",
|
|
2378
2691
|
{
|
|
2379
|
-
src:
|
|
2380
|
-
`/icons/currencies/${onrampSession.sourceCurrency.toLowerCase()}.svg
|
|
2692
|
+
src: getIconUrlWithCdn(
|
|
2693
|
+
`/icons/currencies/svg/${onrampSession.sourceCurrency.toLowerCase()}.svg`,
|
|
2694
|
+
assetCdnUrl
|
|
2381
2695
|
),
|
|
2382
2696
|
alt: onrampSession.sourceCurrency.toUpperCase(),
|
|
2383
|
-
|
|
2384
|
-
height: 28,
|
|
2385
|
-
className: "uf-rounded-full"
|
|
2697
|
+
className: "uf-w-7 uf-h-7 uf-rounded-full"
|
|
2386
2698
|
}
|
|
2387
2699
|
) }),
|
|
2388
|
-
/* @__PURE__ */ (0,
|
|
2389
|
-
/* @__PURE__ */ (0,
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youUse }),
|
|
2701
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: onrampSession.sourceCurrency.toUpperCase() })
|
|
2390
2702
|
] }),
|
|
2391
|
-
/* @__PURE__ */ (0,
|
|
2392
|
-
/* @__PURE__ */ (0,
|
|
2393
|
-
/* @__PURE__ */ (0,
|
|
2394
|
-
/* @__PURE__ */ (0,
|
|
2703
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
|
|
2704
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
2705
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-relative", children: [
|
|
2706
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2395
2707
|
"img",
|
|
2396
2708
|
{
|
|
2397
|
-
src:
|
|
2709
|
+
src: getIconUrlWithCdn("/icons/tokens/svg/usdc.svg", assetCdnUrl),
|
|
2398
2710
|
alt: "USDC",
|
|
2399
|
-
|
|
2400
|
-
height: 28,
|
|
2401
|
-
className: "uf-rounded-full"
|
|
2711
|
+
className: "uf-w-7 uf-h-7 uf-rounded-full"
|
|
2402
2712
|
}
|
|
2403
2713
|
),
|
|
2404
|
-
/* @__PURE__ */ (0,
|
|
2714
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2405
2715
|
"img",
|
|
2406
2716
|
{
|
|
2407
|
-
src:
|
|
2717
|
+
src: getIconUrlWithCdn("/icons/networks/svg/polygon.svg", assetCdnUrl),
|
|
2408
2718
|
alt: "Polygon",
|
|
2409
|
-
|
|
2410
|
-
height: 14,
|
|
2411
|
-
className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-rounded-full"
|
|
2719
|
+
className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
|
|
2412
2720
|
}
|
|
2413
2721
|
)
|
|
2414
2722
|
] }) }),
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2416
|
-
/* @__PURE__ */ (0,
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youBuy }),
|
|
2724
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: "USDC" })
|
|
2417
2725
|
] }),
|
|
2418
|
-
/* @__PURE__ */ (0,
|
|
2419
|
-
/* @__PURE__ */ (0,
|
|
2420
|
-
/* @__PURE__ */ (0,
|
|
2421
|
-
/* @__PURE__ */ (0,
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react10.ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "uf-relative", children: [
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2422
2730
|
"img",
|
|
2423
2731
|
{
|
|
2424
|
-
src: destinationToken?.icon_url ||
|
|
2732
|
+
src: destinationToken?.icon_url || getIconUrlWithCdn("/icons/tokens/svg/usdc.svg", assetCdnUrl),
|
|
2425
2733
|
alt: displayTokenSymbol,
|
|
2426
|
-
|
|
2427
|
-
height: 28,
|
|
2428
|
-
className: "uf-rounded-full"
|
|
2734
|
+
className: "uf-w-7 uf-h-7 uf-rounded-full"
|
|
2429
2735
|
}
|
|
2430
2736
|
),
|
|
2431
|
-
destinationChain?.icon_url && /* @__PURE__ */ (0,
|
|
2737
|
+
destinationChain?.icon_url && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2432
2738
|
"img",
|
|
2433
2739
|
{
|
|
2434
2740
|
src: destinationChain.icon_url,
|
|
2435
2741
|
alt: destinationChain.chain_name,
|
|
2436
|
-
|
|
2437
|
-
height: 14,
|
|
2438
|
-
className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-rounded-full"
|
|
2742
|
+
className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
|
|
2439
2743
|
}
|
|
2440
2744
|
)
|
|
2441
2745
|
] }) }),
|
|
2442
|
-
/* @__PURE__ */ (0,
|
|
2443
|
-
/* @__PURE__ */ (0,
|
|
2746
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youReceive }),
|
|
2747
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: displayTokenSymbol })
|
|
2444
2748
|
] })
|
|
2445
2749
|
] }) }),
|
|
2446
|
-
/* @__PURE__ */ (0,
|
|
2750
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
|
|
2447
2751
|
] })
|
|
2448
2752
|
}
|
|
2449
2753
|
),
|
|
2450
|
-
/* @__PURE__ */ (0,
|
|
2754
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2451
2755
|
CurrencyModal,
|
|
2452
2756
|
{
|
|
2453
2757
|
open: showCurrencyModal,
|
|
@@ -2465,8 +2769,8 @@ function BuyWithCard({
|
|
|
2465
2769
|
}
|
|
2466
2770
|
|
|
2467
2771
|
// src/components/deposits/buttons/TransferCryptoButton.tsx
|
|
2468
|
-
var
|
|
2469
|
-
var
|
|
2772
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2773
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2470
2774
|
function TransferCryptoButton({
|
|
2471
2775
|
onClick,
|
|
2472
2776
|
title,
|
|
@@ -2474,23 +2778,23 @@ function TransferCryptoButton({
|
|
|
2474
2778
|
featuredTokens
|
|
2475
2779
|
}) {
|
|
2476
2780
|
const sortedTokens = featuredTokens ? [...featuredTokens].sort((a, b) => a.position - b.position) : [];
|
|
2477
|
-
return /* @__PURE__ */ (0,
|
|
2781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2478
2782
|
"button",
|
|
2479
2783
|
{
|
|
2480
2784
|
onClick,
|
|
2481
2785
|
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",
|
|
2482
2786
|
children: [
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
2484
|
-
/* @__PURE__ */ (0,
|
|
2485
|
-
/* @__PURE__ */ (0,
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2487
|
-
/* @__PURE__ */ (0,
|
|
2787
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
2788
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react11.Zap, { className: "uf-w-5 uf-h-5" }) }),
|
|
2789
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "uf-text-left", children: [
|
|
2790
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
|
|
2791
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
|
|
2488
2792
|
] })
|
|
2489
2793
|
] }),
|
|
2490
|
-
/* @__PURE__ */ (0,
|
|
2491
|
-
/* @__PURE__ */ (0,
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
2795
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "uf-flex uf--space-x-2", children: sortedTokens.map((token) => {
|
|
2492
2796
|
const iconUrl = token.icon_urls.find((u) => u.format === "svg")?.url || token.icon_urls.find((u) => u.format === "png")?.url;
|
|
2493
|
-
return /* @__PURE__ */ (0,
|
|
2797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2494
2798
|
"img",
|
|
2495
2799
|
{
|
|
2496
2800
|
src: iconUrl,
|
|
@@ -2502,7 +2806,7 @@ function TransferCryptoButton({
|
|
|
2502
2806
|
token.name
|
|
2503
2807
|
);
|
|
2504
2808
|
}) }),
|
|
2505
|
-
/* @__PURE__ */ (0,
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react11.ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
|
|
2506
2810
|
] })
|
|
2507
2811
|
]
|
|
2508
2812
|
}
|
|
@@ -2510,31 +2814,31 @@ function TransferCryptoButton({
|
|
|
2510
2814
|
}
|
|
2511
2815
|
|
|
2512
2816
|
// src/components/deposits/buttons/DepositWithCardButton.tsx
|
|
2513
|
-
var
|
|
2514
|
-
var
|
|
2817
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2818
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2515
2819
|
function DepositWithCardButton({
|
|
2516
2820
|
onClick,
|
|
2517
2821
|
title,
|
|
2518
2822
|
subtitle,
|
|
2519
2823
|
paymentNetworks
|
|
2520
2824
|
}) {
|
|
2521
|
-
return /* @__PURE__ */ (0,
|
|
2825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2522
2826
|
"button",
|
|
2523
2827
|
{
|
|
2524
2828
|
onClick,
|
|
2525
2829
|
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",
|
|
2526
2830
|
children: [
|
|
2527
|
-
/* @__PURE__ */ (0,
|
|
2528
|
-
/* @__PURE__ */ (0,
|
|
2529
|
-
/* @__PURE__ */ (0,
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2531
|
-
/* @__PURE__ */ (0,
|
|
2831
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
2832
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react12.CreditCard, { className: "uf-w-5 uf-h-5" }) }),
|
|
2833
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "uf-text-left", children: [
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
|
|
2532
2836
|
] })
|
|
2533
2837
|
] }),
|
|
2534
|
-
/* @__PURE__ */ (0,
|
|
2535
|
-
/* @__PURE__ */ (0,
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: paymentNetworks?.map((network) => {
|
|
2536
2840
|
const iconUrl = network.icon_urls.find((u) => u.format === "svg")?.url || network.icon_urls.find((u) => u.format === "png")?.url;
|
|
2537
|
-
return /* @__PURE__ */ (0,
|
|
2841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2538
2842
|
"img",
|
|
2539
2843
|
{
|
|
2540
2844
|
src: iconUrl,
|
|
@@ -2546,7 +2850,7 @@ function DepositWithCardButton({
|
|
|
2546
2850
|
network.name
|
|
2547
2851
|
);
|
|
2548
2852
|
}) }),
|
|
2549
|
-
/* @__PURE__ */ (0,
|
|
2853
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react12.ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
|
|
2550
2854
|
] })
|
|
2551
2855
|
]
|
|
2552
2856
|
}
|
|
@@ -2554,50 +2858,50 @@ function DepositWithCardButton({
|
|
|
2554
2858
|
}
|
|
2555
2859
|
|
|
2556
2860
|
// src/components/deposits/buttons/DepositTrackerButton.tsx
|
|
2557
|
-
var
|
|
2558
|
-
var
|
|
2861
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2862
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2559
2863
|
function DepositTrackerButton({
|
|
2560
2864
|
onClick,
|
|
2561
2865
|
title,
|
|
2562
2866
|
subtitle,
|
|
2563
2867
|
badge
|
|
2564
2868
|
}) {
|
|
2565
|
-
return /* @__PURE__ */ (0,
|
|
2869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2566
2870
|
"button",
|
|
2567
2871
|
{
|
|
2568
2872
|
onClick,
|
|
2569
2873
|
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",
|
|
2570
2874
|
children: [
|
|
2571
|
-
/* @__PURE__ */ (0,
|
|
2572
|
-
/* @__PURE__ */ (0,
|
|
2573
|
-
/* @__PURE__ */ (0,
|
|
2574
|
-
badge !== void 0 && badge > 0 && /* @__PURE__ */ (0,
|
|
2875
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
2876
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2 uf-relative", children: [
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react13.Clock, { className: "uf-w-5 uf-h-5" }),
|
|
2878
|
+
badge !== void 0 && badge > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("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 })
|
|
2575
2879
|
] }),
|
|
2576
|
-
/* @__PURE__ */ (0,
|
|
2577
|
-
/* @__PURE__ */ (0,
|
|
2578
|
-
/* @__PURE__ */ (0,
|
|
2880
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "uf-text-left", children: [
|
|
2881
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
|
|
2882
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
|
|
2579
2883
|
] })
|
|
2580
2884
|
] }),
|
|
2581
|
-
/* @__PURE__ */ (0,
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react13.ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
|
|
2582
2886
|
]
|
|
2583
2887
|
}
|
|
2584
2888
|
);
|
|
2585
2889
|
}
|
|
2586
2890
|
|
|
2587
2891
|
// src/components/deposits/DepositModal.tsx
|
|
2588
|
-
var
|
|
2892
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2589
2893
|
function SkeletonButton({ variant = "default" }) {
|
|
2590
|
-
return /* @__PURE__ */ (0,
|
|
2591
|
-
/* @__PURE__ */ (0,
|
|
2592
|
-
/* @__PURE__ */ (0,
|
|
2593
|
-
/* @__PURE__ */ (0,
|
|
2594
|
-
/* @__PURE__ */ (0,
|
|
2595
|
-
/* @__PURE__ */ (0,
|
|
2894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("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: [
|
|
2895
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
2896
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "uf-space-y-1.5", children: [
|
|
2898
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
|
|
2899
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
|
|
2596
2900
|
] })
|
|
2597
2901
|
] }),
|
|
2598
|
-
/* @__PURE__ */ (0,
|
|
2599
|
-
variant === "with-icons" && /* @__PURE__ */ (0,
|
|
2600
|
-
/* @__PURE__ */ (0,
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
2903
|
+
variant === "with-icons" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
|
|
2904
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react14.ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
|
|
2601
2905
|
] })
|
|
2602
2906
|
] });
|
|
2603
2907
|
}
|
|
@@ -2715,27 +3019,27 @@ function DepositModal({
|
|
|
2715
3019
|
setQuotesCount(count);
|
|
2716
3020
|
}
|
|
2717
3021
|
};
|
|
2718
|
-
return /* @__PURE__ */ (0,
|
|
2719
|
-
/* @__PURE__ */ (0,
|
|
3022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ThemeProvider, { themeClass, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Dialog, { open, onOpenChange: handleClose, children: [
|
|
3023
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2720
3024
|
DialogContent,
|
|
2721
3025
|
{
|
|
2722
3026
|
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}`,
|
|
2723
3027
|
onPointerDownOutside: (e) => e.preventDefault(),
|
|
2724
3028
|
onInteractOutside: (e) => e.preventDefault(),
|
|
2725
|
-
children: view === "main" ? /* @__PURE__ */ (0,
|
|
2726
|
-
/* @__PURE__ */ (0,
|
|
3029
|
+
children: view === "main" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
3030
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2727
3031
|
DepositHeader,
|
|
2728
3032
|
{
|
|
2729
3033
|
title: modalTitle || "Deposit",
|
|
2730
3034
|
onClose: handleClose
|
|
2731
3035
|
}
|
|
2732
3036
|
),
|
|
2733
|
-
/* @__PURE__ */ (0,
|
|
2734
|
-
/* @__PURE__ */ (0,
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2736
|
-
!hideDepositTracker && /* @__PURE__ */ (0,
|
|
2737
|
-
] }) : /* @__PURE__ */ (0,
|
|
2738
|
-
/* @__PURE__ */ (0,
|
|
3037
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: !projectConfig ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
3038
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SkeletonButton, { variant: "with-icons" }),
|
|
3039
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SkeletonButton, { variant: "with-icons" }),
|
|
3040
|
+
!hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(SkeletonButton, {})
|
|
3041
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
3042
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2739
3043
|
TransferCryptoButton,
|
|
2740
3044
|
{
|
|
2741
3045
|
onClick: () => setView("transfer"),
|
|
@@ -2744,7 +3048,7 @@ function DepositModal({
|
|
|
2744
3048
|
featuredTokens: projectConfig.transfer_crypto.networks
|
|
2745
3049
|
}
|
|
2746
3050
|
),
|
|
2747
|
-
/* @__PURE__ */ (0,
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2748
3052
|
DepositWithCardButton,
|
|
2749
3053
|
{
|
|
2750
3054
|
onClick: () => setView("card"),
|
|
@@ -2753,7 +3057,7 @@ function DepositModal({
|
|
|
2753
3057
|
paymentNetworks: projectConfig.payment_networks.networks
|
|
2754
3058
|
}
|
|
2755
3059
|
),
|
|
2756
|
-
!hideDepositTracker && /* @__PURE__ */ (0,
|
|
3060
|
+
!hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2757
3061
|
DepositTrackerButton,
|
|
2758
3062
|
{
|
|
2759
3063
|
onClick: () => setDepositsModalOpen(true),
|
|
@@ -2763,8 +3067,8 @@ function DepositModal({
|
|
|
2763
3067
|
}
|
|
2764
3068
|
)
|
|
2765
3069
|
] }) })
|
|
2766
|
-
] }) : view === "transfer" ? /* @__PURE__ */ (0,
|
|
2767
|
-
/* @__PURE__ */ (0,
|
|
3070
|
+
] }) : view === "transfer" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
3071
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2768
3072
|
DepositHeader,
|
|
2769
3073
|
{
|
|
2770
3074
|
title: t3.transferCrypto.title,
|
|
@@ -2773,7 +3077,7 @@ function DepositModal({
|
|
|
2773
3077
|
onClose: handleClose
|
|
2774
3078
|
}
|
|
2775
3079
|
),
|
|
2776
|
-
/* @__PURE__ */ (0,
|
|
3080
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2777
3081
|
TransferCrypto,
|
|
2778
3082
|
{
|
|
2779
3083
|
userId,
|
|
@@ -2788,8 +3092,8 @@ function DepositModal({
|
|
|
2788
3092
|
wallets
|
|
2789
3093
|
}
|
|
2790
3094
|
)
|
|
2791
|
-
] }) : /* @__PURE__ */ (0,
|
|
2792
|
-
/* @__PURE__ */ (0,
|
|
3095
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
3096
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2793
3097
|
DepositHeader,
|
|
2794
3098
|
{
|
|
2795
3099
|
title: cardView === "quotes" ? t3.quotes : modalTitle || "Deposit",
|
|
@@ -2799,7 +3103,7 @@ function DepositModal({
|
|
|
2799
3103
|
badge: cardView === "quotes" ? { count: quotesCount } : void 0
|
|
2800
3104
|
}
|
|
2801
3105
|
),
|
|
2802
|
-
/* @__PURE__ */ (0,
|
|
3106
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2803
3107
|
BuyWithCard,
|
|
2804
3108
|
{
|
|
2805
3109
|
userId,
|
|
@@ -2814,13 +3118,14 @@ function DepositModal({
|
|
|
2814
3118
|
onDepositSuccess,
|
|
2815
3119
|
onDepositError,
|
|
2816
3120
|
themeClass,
|
|
2817
|
-
wallets
|
|
3121
|
+
wallets,
|
|
3122
|
+
assetCdnUrl: projectConfig?.asset_cdn_url
|
|
2818
3123
|
}
|
|
2819
3124
|
)
|
|
2820
3125
|
] })
|
|
2821
3126
|
}
|
|
2822
3127
|
),
|
|
2823
|
-
/* @__PURE__ */ (0,
|
|
3128
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2824
3129
|
DepositsModal,
|
|
2825
3130
|
{
|
|
2826
3131
|
open: depositsModalOpen,
|
|
@@ -2835,9 +3140,9 @@ function DepositModal({
|
|
|
2835
3140
|
}
|
|
2836
3141
|
|
|
2837
3142
|
// src/components/deposits/TransferCrypto2.tsx
|
|
2838
|
-
var
|
|
3143
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2839
3144
|
function TransferCrypto2(props) {
|
|
2840
|
-
return /* @__PURE__ */ (0,
|
|
3145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2841
3146
|
TransferCryptoBase,
|
|
2842
3147
|
{
|
|
2843
3148
|
...props,
|
|
@@ -2853,6 +3158,7 @@ function TransferCrypto2(props) {
|
|
|
2853
3158
|
CurrencyListItem,
|
|
2854
3159
|
CurrencyListSection,
|
|
2855
3160
|
CurrencyModal,
|
|
3161
|
+
DepositDetailModal,
|
|
2856
3162
|
DepositExecutionItem,
|
|
2857
3163
|
DepositHeader,
|
|
2858
3164
|
DepositModal,
|
|
@@ -2899,6 +3205,7 @@ function TransferCrypto2(props) {
|
|
|
2899
3205
|
getApiBaseUrl,
|
|
2900
3206
|
getFiatCurrencies,
|
|
2901
3207
|
getIconUrl,
|
|
3208
|
+
getIconUrlWithCdn,
|
|
2902
3209
|
getMeldQuotes,
|
|
2903
3210
|
getSupportedDepositTokens,
|
|
2904
3211
|
getWalletByChainType,
|