@unifold/connect-react 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +730 -416
- package/dist/index.mjs +740 -426
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1269,12 +1269,25 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
|
1269
1269
|
return Component;
|
|
1270
1270
|
};
|
|
1271
1271
|
|
|
1272
|
+
// ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-down-circle.js
|
|
1273
|
+
var ArrowDownCircle = createLucideIcon("ArrowDownCircle", [
|
|
1274
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1275
|
+
["path", { d: "M12 8v8", key: "napkw2" }],
|
|
1276
|
+
["path", { d: "m8 12 4 4 4-4", key: "k98ssh" }]
|
|
1277
|
+
]);
|
|
1278
|
+
|
|
1272
1279
|
// ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
|
|
1273
1280
|
var ArrowLeft = createLucideIcon("ArrowLeft", [
|
|
1274
1281
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
1275
1282
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
1276
1283
|
]);
|
|
1277
1284
|
|
|
1285
|
+
// ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check-circle.js
|
|
1286
|
+
var CheckCircle = createLucideIcon("CheckCircle", [
|
|
1287
|
+
["path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14", key: "g774vq" }],
|
|
1288
|
+
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
1289
|
+
]);
|
|
1290
|
+
|
|
1278
1291
|
// ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
|
|
1279
1292
|
var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
1280
1293
|
|
|
@@ -5957,6 +5970,7 @@ var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
|
5957
5970
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
5958
5971
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
5959
5972
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
5973
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5960
5974
|
var React38 = __toESM(require("react"), 1);
|
|
5961
5975
|
|
|
5962
5976
|
// ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3._paqmzknjxz7bmndehagaq3tw4m/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
@@ -9448,7 +9462,7 @@ var ScrollDownButton = SelectScrollDownButton;
|
|
|
9448
9462
|
var Separator = SelectSeparator;
|
|
9449
9463
|
|
|
9450
9464
|
// ../ui-react/dist/index.mjs
|
|
9451
|
-
var
|
|
9465
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
9452
9466
|
var React42 = __toESM(require("react"), 1);
|
|
9453
9467
|
|
|
9454
9468
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
@@ -9595,7 +9609,7 @@ var cva = (base, config) => (props) => {
|
|
|
9595
9609
|
};
|
|
9596
9610
|
|
|
9597
9611
|
// ../ui-react/dist/index.mjs
|
|
9598
|
-
var
|
|
9612
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
9599
9613
|
var React52 = __toESM(require("react"), 1);
|
|
9600
9614
|
|
|
9601
9615
|
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3_hd4qp76o7ebwsrfrhqb6isuuvy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
@@ -10076,21 +10090,21 @@ var Portal4 = TooltipPortal;
|
|
|
10076
10090
|
var Content23 = TooltipContent;
|
|
10077
10091
|
|
|
10078
10092
|
// ../ui-react/dist/index.mjs
|
|
10079
|
-
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
10080
10093
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
10081
10094
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
10095
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
10082
10096
|
var import_react11 = require("react");
|
|
10083
10097
|
var import_react12 = require("react");
|
|
10084
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
10085
10098
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
10086
10099
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
10087
|
-
var import_react_query2 = require("@tanstack/react-query");
|
|
10088
10100
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
10101
|
+
var import_react_query2 = require("@tanstack/react-query");
|
|
10089
10102
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
10090
10103
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
10091
10104
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
10092
10105
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
10093
10106
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10107
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
10094
10108
|
function cn(...inputs) {
|
|
10095
10109
|
return twMerge(clsx(inputs));
|
|
10096
10110
|
}
|
|
@@ -10336,6 +10350,14 @@ function getIconUrl(iconPath) {
|
|
|
10336
10350
|
const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
|
|
10337
10351
|
return `${API_BASE_URL}/api/public${normalizedPath}`;
|
|
10338
10352
|
}
|
|
10353
|
+
function getIconUrlWithCdn(iconPath, assetCdnUrl) {
|
|
10354
|
+
if (!assetCdnUrl) {
|
|
10355
|
+
return getIconUrl(iconPath);
|
|
10356
|
+
}
|
|
10357
|
+
const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
|
|
10358
|
+
const baseUrl = assetCdnUrl.endsWith("/") ? assetCdnUrl.slice(0, -1) : assetCdnUrl;
|
|
10359
|
+
return `${baseUrl}/api/public${normalizedPath}`;
|
|
10360
|
+
}
|
|
10339
10361
|
async function createEOA(overrides, publishableKey) {
|
|
10340
10362
|
if (!overrides?.user_id) {
|
|
10341
10363
|
throw new Error("user_id is required");
|
|
@@ -10444,6 +10466,16 @@ async function createMeldSession(request, publishableKey) {
|
|
|
10444
10466
|
}
|
|
10445
10467
|
return response.json();
|
|
10446
10468
|
}
|
|
10469
|
+
function getPreferredIconUrl(iconUrls, preferredFormat = "svg") {
|
|
10470
|
+
if (!iconUrls || iconUrls.length === 0) {
|
|
10471
|
+
return void 0;
|
|
10472
|
+
}
|
|
10473
|
+
const preferred = iconUrls.find((icon) => icon.format === preferredFormat);
|
|
10474
|
+
if (preferred) {
|
|
10475
|
+
return preferred.url;
|
|
10476
|
+
}
|
|
10477
|
+
return iconUrls[0]?.url;
|
|
10478
|
+
}
|
|
10447
10479
|
async function getFiatCurrencies(publishableKey) {
|
|
10448
10480
|
const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
|
|
10449
10481
|
const response = await fetch(
|
|
@@ -10477,49 +10509,65 @@ async function getProjectConfig(publishableKey) {
|
|
|
10477
10509
|
}
|
|
10478
10510
|
function DepositExecutionItem({
|
|
10479
10511
|
execution,
|
|
10480
|
-
|
|
10481
|
-
onClose
|
|
10512
|
+
onClick
|
|
10482
10513
|
}) {
|
|
10483
10514
|
const isPending = execution.status === "pending" || execution.status === "waiting" || execution.status === "delayed";
|
|
10484
|
-
const formatTxHash = (hash) => {
|
|
10485
|
-
if (hash.length <= 12) return hash;
|
|
10486
|
-
return `${hash.slice(0, 10)}...${hash.slice(-8)}`;
|
|
10487
|
-
};
|
|
10488
10515
|
const formatDateTime = (timestamp) => {
|
|
10489
10516
|
try {
|
|
10490
10517
|
const date = new Date(timestamp);
|
|
10491
|
-
|
|
10518
|
+
const monthDay = date.toLocaleDateString("en-US", {
|
|
10519
|
+
month: "short",
|
|
10520
|
+
day: "numeric",
|
|
10521
|
+
year: "numeric"
|
|
10522
|
+
});
|
|
10523
|
+
const time = date.toLocaleTimeString("en-US", {
|
|
10492
10524
|
hour: "numeric",
|
|
10493
10525
|
minute: "2-digit",
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
}
|
|
10526
|
+
hour12: true
|
|
10527
|
+
}).toLowerCase();
|
|
10528
|
+
return `${monthDay} at ${time}`;
|
|
10497
10529
|
} catch {
|
|
10498
10530
|
return timestamp;
|
|
10499
10531
|
}
|
|
10500
10532
|
};
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10533
|
+
const formatUsdAmount = (baseUnitAmount) => {
|
|
10534
|
+
try {
|
|
10535
|
+
const amount = Number(baseUnitAmount) / 1e6;
|
|
10536
|
+
return new Intl.NumberFormat("en-US", {
|
|
10537
|
+
style: "currency",
|
|
10538
|
+
currency: "USD",
|
|
10539
|
+
minimumFractionDigits: 2,
|
|
10540
|
+
maximumFractionDigits: 2
|
|
10541
|
+
}).format(amount);
|
|
10542
|
+
} catch {
|
|
10543
|
+
return "$0.00";
|
|
10544
|
+
}
|
|
10545
|
+
};
|
|
10546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
10547
|
+
"button",
|
|
10548
|
+
{
|
|
10549
|
+
onClick,
|
|
10550
|
+
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",
|
|
10551
|
+
children: [
|
|
10552
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "uf-relative uf-flex-shrink-0 uf-w-9 uf-h-9", children: [
|
|
10505
10553
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
10506
10554
|
"img",
|
|
10507
10555
|
{
|
|
10508
|
-
src: execution.
|
|
10556
|
+
src: execution.destination_token_metadata?.icon_url || getIconUrl("/icons/tokens/svg/usdc.svg"),
|
|
10509
10557
|
alt: "Token",
|
|
10510
|
-
width:
|
|
10511
|
-
height:
|
|
10512
|
-
className: "uf-rounded-full"
|
|
10558
|
+
width: 36,
|
|
10559
|
+
height: 36,
|
|
10560
|
+
className: "uf-rounded-full uf-w-9 uf-h-9"
|
|
10513
10561
|
}
|
|
10514
10562
|
),
|
|
10515
|
-
isPending ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "uf-absolute uf
|
|
10563
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime22.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_runtime22.jsx)(
|
|
10516
10564
|
"svg",
|
|
10517
10565
|
{
|
|
10518
10566
|
width: "10",
|
|
10519
10567
|
height: "10",
|
|
10520
10568
|
viewBox: "0 0 12 12",
|
|
10521
10569
|
fill: "none",
|
|
10522
|
-
className: "uf-animate-spin",
|
|
10570
|
+
className: "uf-animate-spin uf-block",
|
|
10523
10571
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
10524
10572
|
"path",
|
|
10525
10573
|
{
|
|
@@ -10530,7 +10578,7 @@ function DepositExecutionItem({
|
|
|
10530
10578
|
}
|
|
10531
10579
|
)
|
|
10532
10580
|
}
|
|
10533
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "uf-absolute uf
|
|
10581
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime22.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_runtime22.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
10534
10582
|
"path",
|
|
10535
10583
|
{
|
|
10536
10584
|
d: "M10 3L4.5 8.5L2 6",
|
|
@@ -10542,55 +10590,241 @@ function DepositExecutionItem({
|
|
|
10542
10590
|
) }) })
|
|
10543
10591
|
] }),
|
|
10544
10592
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "uf-flex-1 uf-min-w-0", children: [
|
|
10545
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.
|
|
10546
|
-
|
|
10547
|
-
|
|
10593
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit received" : "Deposit completed" }),
|
|
10594
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "uf-text-muted-foreground uf-text-xs uf-leading-tight", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
|
|
10595
|
+
] }),
|
|
10596
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(execution.source_amount_base_unit) }),
|
|
10597
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground uf-flex-shrink-0" })
|
|
10598
|
+
]
|
|
10599
|
+
}
|
|
10600
|
+
);
|
|
10601
|
+
}
|
|
10602
|
+
var CHAIN_NAMES = {
|
|
10603
|
+
solana: "Solana",
|
|
10604
|
+
ethereum: "Ethereum",
|
|
10605
|
+
"1": "Ethereum",
|
|
10606
|
+
"137": "Polygon",
|
|
10607
|
+
"42161": "Arbitrum",
|
|
10608
|
+
"10": "Optimism",
|
|
10609
|
+
"8453": "Base",
|
|
10610
|
+
"43114": "Avalanche",
|
|
10611
|
+
"56": "BSC",
|
|
10612
|
+
bitcoin: "Bitcoin",
|
|
10613
|
+
mainnet: "Mainnet"
|
|
10614
|
+
};
|
|
10615
|
+
function DepositDetailModal({
|
|
10616
|
+
open,
|
|
10617
|
+
onOpenChange,
|
|
10618
|
+
execution,
|
|
10619
|
+
themeClass = ""
|
|
10620
|
+
}) {
|
|
10621
|
+
if (!execution) return null;
|
|
10622
|
+
const isPending = execution.status === "pending" || execution.status === "waiting" || execution.status === "delayed";
|
|
10623
|
+
const formatDateTime = (timestamp) => {
|
|
10624
|
+
try {
|
|
10625
|
+
const date = new Date(timestamp);
|
|
10626
|
+
const monthDay = date.toLocaleDateString("en-US", {
|
|
10627
|
+
month: "short",
|
|
10628
|
+
day: "numeric",
|
|
10629
|
+
year: "numeric"
|
|
10630
|
+
});
|
|
10631
|
+
const time = date.toLocaleTimeString("en-US", {
|
|
10632
|
+
hour: "numeric",
|
|
10633
|
+
minute: "2-digit",
|
|
10634
|
+
hour12: true
|
|
10635
|
+
});
|
|
10636
|
+
return `${monthDay} at ${time}`;
|
|
10637
|
+
} catch {
|
|
10638
|
+
return timestamp;
|
|
10639
|
+
}
|
|
10640
|
+
};
|
|
10641
|
+
const formatAmount = (baseUnitAmount, decimals = 6) => {
|
|
10642
|
+
try {
|
|
10643
|
+
const amount = Number(baseUnitAmount) / Math.pow(10, decimals);
|
|
10644
|
+
return amount.toFixed(2);
|
|
10645
|
+
} catch {
|
|
10646
|
+
return "0.00";
|
|
10647
|
+
}
|
|
10648
|
+
};
|
|
10649
|
+
const formatUsdAmount = (usdAmount, baseUnitAmount) => {
|
|
10650
|
+
if (usdAmount) {
|
|
10651
|
+
try {
|
|
10652
|
+
const amount = Number(usdAmount);
|
|
10653
|
+
return new Intl.NumberFormat("en-US", {
|
|
10654
|
+
style: "currency",
|
|
10655
|
+
currency: "USD",
|
|
10656
|
+
minimumFractionDigits: 2,
|
|
10657
|
+
maximumFractionDigits: 2
|
|
10658
|
+
}).format(amount);
|
|
10659
|
+
} catch {
|
|
10660
|
+
}
|
|
10661
|
+
}
|
|
10662
|
+
if (baseUnitAmount) {
|
|
10663
|
+
try {
|
|
10664
|
+
const amount = Number(baseUnitAmount) / 1e6;
|
|
10665
|
+
return new Intl.NumberFormat("en-US", {
|
|
10666
|
+
style: "currency",
|
|
10667
|
+
currency: "USD",
|
|
10668
|
+
minimumFractionDigits: 2,
|
|
10669
|
+
maximumFractionDigits: 2
|
|
10670
|
+
}).format(amount);
|
|
10671
|
+
} catch {
|
|
10672
|
+
}
|
|
10673
|
+
}
|
|
10674
|
+
return "$0.00";
|
|
10675
|
+
};
|
|
10676
|
+
const getNetworkName = (chainType, chainId) => {
|
|
10677
|
+
return CHAIN_NAMES[chainId] || CHAIN_NAMES[chainType] || chainType;
|
|
10678
|
+
};
|
|
10679
|
+
const getSourceTokenSymbol = () => {
|
|
10680
|
+
return "USDC";
|
|
10681
|
+
};
|
|
10682
|
+
const getDestinationTokenSymbol = () => {
|
|
10683
|
+
return "USDC";
|
|
10684
|
+
};
|
|
10685
|
+
const handleClose = () => {
|
|
10686
|
+
onOpenChange(false);
|
|
10687
|
+
};
|
|
10688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
10689
|
+
DialogContent2,
|
|
10690
|
+
{
|
|
10691
|
+
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}`,
|
|
10692
|
+
children: [
|
|
10693
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(DepositHeader, { title: "Deposit Details", onClose: handleClose }),
|
|
10694
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-px-4 uf-pb-4", children: [
|
|
10695
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-py-6", children: [
|
|
10696
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-relative uf-mb-3", children: [
|
|
10697
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
10698
|
+
"img",
|
|
10699
|
+
{
|
|
10700
|
+
src: execution.destination_token_metadata?.icon_url || getIconUrl("/icons/tokens/svg/usdc.svg"),
|
|
10701
|
+
alt: "Token",
|
|
10702
|
+
width: 64,
|
|
10703
|
+
height: 64,
|
|
10704
|
+
className: "uf-rounded-full"
|
|
10705
|
+
}
|
|
10706
|
+
),
|
|
10707
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime23.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_runtime23.jsx)(
|
|
10708
|
+
"svg",
|
|
10709
|
+
{
|
|
10710
|
+
width: "16",
|
|
10711
|
+
height: "16",
|
|
10712
|
+
viewBox: "0 0 12 12",
|
|
10713
|
+
fill: "none",
|
|
10714
|
+
className: "uf-animate-spin uf-block",
|
|
10715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
10716
|
+
"path",
|
|
10717
|
+
{
|
|
10718
|
+
d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
|
|
10719
|
+
stroke: "white",
|
|
10720
|
+
strokeWidth: "2",
|
|
10721
|
+
strokeLinecap: "round"
|
|
10722
|
+
}
|
|
10723
|
+
)
|
|
10724
|
+
}
|
|
10725
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime23.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_runtime23.jsx)(
|
|
10726
|
+
"svg",
|
|
10727
|
+
{
|
|
10728
|
+
width: "16",
|
|
10729
|
+
height: "16",
|
|
10730
|
+
viewBox: "0 0 12 12",
|
|
10731
|
+
fill: "none",
|
|
10732
|
+
className: "uf-block",
|
|
10733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
10734
|
+
"path",
|
|
10735
|
+
{
|
|
10736
|
+
d: "M10 3L4.5 8.5L2 6",
|
|
10737
|
+
stroke: "white",
|
|
10738
|
+
strokeWidth: "2",
|
|
10739
|
+
strokeLinecap: "round",
|
|
10740
|
+
strokeLinejoin: "round"
|
|
10741
|
+
}
|
|
10742
|
+
)
|
|
10743
|
+
}
|
|
10744
|
+
) })
|
|
10745
|
+
] }),
|
|
10746
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mb-1", children: [
|
|
10747
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
10748
|
+
"div",
|
|
10749
|
+
{
|
|
10750
|
+
className: `uf-w-2 uf-h-2 uf-rounded-full ${isPending ? "uf-bg-yellow-500" : "uf-bg-green-500"}`
|
|
10751
|
+
}
|
|
10752
|
+
),
|
|
10753
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: isPending ? "Pending" : "Completed" })
|
|
10754
|
+
] }),
|
|
10755
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
|
|
10548
10756
|
] }),
|
|
10549
|
-
/* @__PURE__ */ (0,
|
|
10757
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-3", children: [
|
|
10758
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.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: [
|
|
10759
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
|
|
10760
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
10761
|
+
formatAmount(execution.source_amount_base_unit),
|
|
10762
|
+
" ",
|
|
10763
|
+
getSourceTokenSymbol()
|
|
10764
|
+
] })
|
|
10765
|
+
] }),
|
|
10766
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.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: [
|
|
10767
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
|
|
10768
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "uf-text-foreground uf-font-medium", children: [
|
|
10769
|
+
formatAmount(execution.destination_amount_base_unit),
|
|
10770
|
+
" ",
|
|
10771
|
+
getDestinationTokenSymbol()
|
|
10772
|
+
] })
|
|
10773
|
+
] }),
|
|
10774
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
10775
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
|
|
10776
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
|
|
10777
|
+
] })
|
|
10778
|
+
] }),
|
|
10779
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-4", children: [
|
|
10780
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.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: [
|
|
10781
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
|
|
10782
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
|
|
10783
|
+
] }),
|
|
10784
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
|
|
10785
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
|
|
10786
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
|
|
10787
|
+
] })
|
|
10788
|
+
] }),
|
|
10789
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-space-y-2", children: [
|
|
10790
|
+
execution.explorer_url && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
10791
|
+
"a",
|
|
10792
|
+
{
|
|
10793
|
+
href: execution.explorer_url,
|
|
10794
|
+
target: "_blank",
|
|
10795
|
+
rel: "noopener noreferrer",
|
|
10796
|
+
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",
|
|
10797
|
+
children: [
|
|
10798
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
10799
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowDownCircle, { className: "uf-w-5 uf-h-5" }),
|
|
10800
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-font-medium", children: "View Deposit Transaction" })
|
|
10801
|
+
] }),
|
|
10802
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ExternalLink, { className: "uf-w-4 uf-h-4" })
|
|
10803
|
+
]
|
|
10804
|
+
}
|
|
10805
|
+
),
|
|
10806
|
+
!isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
10807
|
+
"a",
|
|
10808
|
+
{
|
|
10809
|
+
href: execution.destination_explorer_url,
|
|
10810
|
+
target: "_blank",
|
|
10811
|
+
rel: "noopener noreferrer",
|
|
10812
|
+
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",
|
|
10813
|
+
children: [
|
|
10814
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
10815
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CheckCircle, { className: "uf-w-5 uf-h-5" }),
|
|
10816
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "uf-font-medium", children: "View Completion Transaction" })
|
|
10817
|
+
] }),
|
|
10818
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ExternalLink, { className: "uf-w-4 uf-h-4" })
|
|
10819
|
+
]
|
|
10820
|
+
}
|
|
10821
|
+
)
|
|
10822
|
+
] }),
|
|
10823
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "uf-text-center uf-text-muted-foreground uf-text-xs uf-mt-4", children: "Links open in external browser" })
|
|
10550
10824
|
] })
|
|
10551
|
-
]
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
{
|
|
10555
|
-
onClick: onClose,
|
|
10556
|
-
className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0 uf-ml-2",
|
|
10557
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(X, { className: "uf-w-4 uf-h-4" })
|
|
10558
|
-
}
|
|
10559
|
-
)
|
|
10560
|
-
] }),
|
|
10561
|
-
!isPending && execution.explorer_url && /* @__PURE__ */ (0, import_jsx_runtime22.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: [
|
|
10562
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "uf-text-muted-foreground", children: "Deposit tx:" }),
|
|
10563
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
10564
|
-
"a",
|
|
10565
|
-
{
|
|
10566
|
-
href: execution.explorer_url,
|
|
10567
|
-
target: "_blank",
|
|
10568
|
-
rel: "noopener noreferrer",
|
|
10569
|
-
className: "uf-flex uf-items-center uf-gap-1 uf-text-blue-400 hover:uf-text-blue-300 uf-transition-colors uf-font-mono",
|
|
10570
|
-
children: [
|
|
10571
|
-
formatTxHash(execution.transaction_hash),
|
|
10572
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ExternalLink, { className: "uf-w-3 uf-h-3" })
|
|
10573
|
-
]
|
|
10574
|
-
}
|
|
10575
|
-
)
|
|
10576
|
-
] }),
|
|
10577
|
-
!isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ (0, import_jsx_runtime22.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: [
|
|
10578
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "uf-text-muted-foreground", children: "Completion tx:" }),
|
|
10579
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
10580
|
-
"a",
|
|
10581
|
-
{
|
|
10582
|
-
href: execution.destination_explorer_url,
|
|
10583
|
-
target: "_blank",
|
|
10584
|
-
rel: "noopener noreferrer",
|
|
10585
|
-
className: "uf-flex uf-items-center uf-gap-1 uf-text-blue-400 hover:uf-text-blue-300 uf-transition-colors uf-font-mono",
|
|
10586
|
-
children: [
|
|
10587
|
-
formatTxHash(execution.destination_transaction_hashes[execution.destination_transaction_hashes.length - 1]),
|
|
10588
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ExternalLink, { className: "uf-w-3 uf-h-3" })
|
|
10589
|
-
]
|
|
10590
|
-
}
|
|
10591
|
-
)
|
|
10592
|
-
] })
|
|
10593
|
-
] });
|
|
10825
|
+
]
|
|
10826
|
+
}
|
|
10827
|
+
) });
|
|
10594
10828
|
}
|
|
10595
10829
|
function DepositsModal({
|
|
10596
10830
|
open,
|
|
@@ -10601,6 +10835,8 @@ function DepositsModal({
|
|
|
10601
10835
|
themeClass = ""
|
|
10602
10836
|
}) {
|
|
10603
10837
|
const [allExecutions, setAllExecutions] = (0, import_react10.useState)(sessionExecutions);
|
|
10838
|
+
const [selectedExecution, setSelectedExecution] = (0, import_react10.useState)(null);
|
|
10839
|
+
const [detailModalOpen, setDetailModalOpen] = (0, import_react10.useState)(false);
|
|
10604
10840
|
(0, import_react10.useEffect)(() => {
|
|
10605
10841
|
if (!open || !userId) return;
|
|
10606
10842
|
const fetchExecutions = async () => {
|
|
@@ -10626,44 +10862,132 @@ function DepositsModal({
|
|
|
10626
10862
|
const handleClose = () => {
|
|
10627
10863
|
onOpenChange(false);
|
|
10628
10864
|
};
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10865
|
+
const handleExecutionClick = (execution) => {
|
|
10866
|
+
setSelectedExecution(execution);
|
|
10867
|
+
setDetailModalOpen(true);
|
|
10868
|
+
};
|
|
10869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
10870
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(DialogContent2, { 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: [
|
|
10871
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DepositHeader, { title: "Deposit Tracker", onClose: handleClose }),
|
|
10872
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.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_runtime24.jsx)("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: allExecutions.map((execution) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
10873
|
+
DepositExecutionItem,
|
|
10874
|
+
{
|
|
10875
|
+
execution,
|
|
10876
|
+
onClick: () => handleExecutionClick(execution)
|
|
10877
|
+
},
|
|
10878
|
+
execution.id
|
|
10879
|
+
)) }) }) })
|
|
10880
|
+
] }) }),
|
|
10881
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
10882
|
+
DepositDetailModal,
|
|
10883
|
+
{
|
|
10884
|
+
open: detailModalOpen,
|
|
10885
|
+
onOpenChange: setDetailModalOpen,
|
|
10886
|
+
execution: selectedExecution,
|
|
10887
|
+
themeClass
|
|
10888
|
+
}
|
|
10889
|
+
)
|
|
10890
|
+
] });
|
|
10633
10891
|
}
|
|
10634
10892
|
function DepositSuccessToast({
|
|
10635
10893
|
depositTx,
|
|
10636
|
-
completionTx,
|
|
10637
10894
|
orderSubmittedAt,
|
|
10638
|
-
orderFilledAt,
|
|
10639
|
-
explorerUrl,
|
|
10640
|
-
completionExplorerUrl,
|
|
10641
10895
|
status,
|
|
10642
10896
|
tokenIconUrl,
|
|
10897
|
+
sourceAmountBaseUnit = "0",
|
|
10643
10898
|
onClose
|
|
10644
10899
|
}) {
|
|
10645
|
-
const
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10900
|
+
const isPending = status === "pending" || status === "waiting" || status === "delayed";
|
|
10901
|
+
const formatDateTime = (timestamp) => {
|
|
10902
|
+
try {
|
|
10903
|
+
const date = new Date(timestamp);
|
|
10904
|
+
const monthDay = date.toLocaleDateString("en-US", {
|
|
10905
|
+
month: "short",
|
|
10906
|
+
day: "numeric",
|
|
10907
|
+
year: "numeric"
|
|
10908
|
+
});
|
|
10909
|
+
const time = date.toLocaleTimeString("en-US", {
|
|
10910
|
+
hour: "numeric",
|
|
10911
|
+
minute: "2-digit",
|
|
10912
|
+
hour12: true
|
|
10913
|
+
}).toLowerCase();
|
|
10914
|
+
return `${monthDay} at ${time}`;
|
|
10915
|
+
} catch {
|
|
10916
|
+
return timestamp;
|
|
10917
|
+
}
|
|
10654
10918
|
};
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10919
|
+
const formatUsdAmount = (baseUnitAmount) => {
|
|
10920
|
+
try {
|
|
10921
|
+
const amount = Number(baseUnitAmount) / 1e6;
|
|
10922
|
+
return new Intl.NumberFormat("en-US", {
|
|
10923
|
+
style: "currency",
|
|
10924
|
+
currency: "USD",
|
|
10925
|
+
minimumFractionDigits: 2,
|
|
10926
|
+
maximumFractionDigits: 2
|
|
10927
|
+
}).format(amount);
|
|
10928
|
+
} catch {
|
|
10929
|
+
return "$0.00";
|
|
10661
10930
|
}
|
|
10662
|
-
|
|
10931
|
+
};
|
|
10932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime25.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: [
|
|
10933
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "uf-relative uf-flex-shrink-0", children: [
|
|
10934
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
10935
|
+
"img",
|
|
10936
|
+
{
|
|
10937
|
+
src: tokenIconUrl || getIconUrl("/icons/tokens/svg/usdc.svg"),
|
|
10938
|
+
alt: "Token",
|
|
10939
|
+
width: 36,
|
|
10940
|
+
height: 36,
|
|
10941
|
+
className: "uf-rounded-full"
|
|
10942
|
+
}
|
|
10943
|
+
),
|
|
10944
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime25.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_runtime25.jsx)(
|
|
10945
|
+
"svg",
|
|
10946
|
+
{
|
|
10947
|
+
width: "10",
|
|
10948
|
+
height: "10",
|
|
10949
|
+
viewBox: "0 0 12 12",
|
|
10950
|
+
fill: "none",
|
|
10951
|
+
className: "uf-animate-spin",
|
|
10952
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
10953
|
+
"path",
|
|
10954
|
+
{
|
|
10955
|
+
d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
|
|
10956
|
+
stroke: "white",
|
|
10957
|
+
strokeWidth: "2",
|
|
10958
|
+
strokeLinecap: "round"
|
|
10959
|
+
}
|
|
10960
|
+
)
|
|
10961
|
+
}
|
|
10962
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime25.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_runtime25.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
10963
|
+
"path",
|
|
10964
|
+
{
|
|
10965
|
+
d: "M10 3L4.5 8.5L2 6",
|
|
10966
|
+
stroke: "white",
|
|
10967
|
+
strokeWidth: "2",
|
|
10968
|
+
strokeLinecap: "round",
|
|
10969
|
+
strokeLinejoin: "round"
|
|
10970
|
+
}
|
|
10971
|
+
) }) })
|
|
10972
|
+
] }),
|
|
10973
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "uf-flex-1 uf-min-w-0", children: [
|
|
10974
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm", children: isPending ? "Deposit received" : "Deposit completed" }),
|
|
10975
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "uf-text-muted-foreground uf-text-xs", children: formatDateTime(orderSubmittedAt) })
|
|
10976
|
+
] }),
|
|
10977
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(sourceAmountBaseUnit) }),
|
|
10978
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
10979
|
+
"button",
|
|
10980
|
+
{
|
|
10981
|
+
onClick: onClose,
|
|
10982
|
+
className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0",
|
|
10983
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(X, { className: "uf-w-4 uf-h-4" })
|
|
10984
|
+
}
|
|
10985
|
+
)
|
|
10986
|
+
] }) });
|
|
10663
10987
|
}
|
|
10664
10988
|
var Select2 = Root23;
|
|
10665
10989
|
var SelectValue2 = Value;
|
|
10666
|
-
var SelectTrigger2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
10990
|
+
var SelectTrigger2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
10667
10991
|
Trigger,
|
|
10668
10992
|
{
|
|
10669
10993
|
ref,
|
|
@@ -10674,12 +10998,12 @@ var SelectTrigger2 = React38.forwardRef(({ className, children, ...props }, ref)
|
|
|
10674
10998
|
...props,
|
|
10675
10999
|
children: [
|
|
10676
11000
|
children,
|
|
10677
|
-
/* @__PURE__ */ (0,
|
|
11001
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
|
|
10678
11002
|
]
|
|
10679
11003
|
}
|
|
10680
11004
|
));
|
|
10681
11005
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
10682
|
-
var SelectScrollUpButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
11006
|
+
var SelectScrollUpButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10683
11007
|
ScrollUpButton,
|
|
10684
11008
|
{
|
|
10685
11009
|
ref,
|
|
@@ -10688,11 +11012,11 @@ var SelectScrollUpButton2 = React38.forwardRef(({ className, ...props }, ref) =>
|
|
|
10688
11012
|
className
|
|
10689
11013
|
),
|
|
10690
11014
|
...props,
|
|
10691
|
-
children: /* @__PURE__ */ (0,
|
|
11015
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronUp, { className: "uf-h-4 uf-w-4" })
|
|
10692
11016
|
}
|
|
10693
11017
|
));
|
|
10694
11018
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
10695
|
-
var SelectScrollDownButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
11019
|
+
var SelectScrollDownButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10696
11020
|
ScrollDownButton,
|
|
10697
11021
|
{
|
|
10698
11022
|
ref,
|
|
@@ -10701,13 +11025,13 @@ var SelectScrollDownButton2 = React38.forwardRef(({ className, ...props }, ref)
|
|
|
10701
11025
|
className
|
|
10702
11026
|
),
|
|
10703
11027
|
...props,
|
|
10704
|
-
children: /* @__PURE__ */ (0,
|
|
11028
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronDown, { className: "uf-h-4 uf-w-4" })
|
|
10705
11029
|
}
|
|
10706
11030
|
));
|
|
10707
11031
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
10708
11032
|
var SelectContent2 = React38.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
10709
11033
|
const { themeClass } = useTheme();
|
|
10710
|
-
return /* @__PURE__ */ (0,
|
|
11034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Portal3, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
10711
11035
|
Content22,
|
|
10712
11036
|
{
|
|
10713
11037
|
ref,
|
|
@@ -10720,8 +11044,8 @@ var SelectContent2 = React38.forwardRef(({ className, children, position = "popp
|
|
|
10720
11044
|
position,
|
|
10721
11045
|
...props,
|
|
10722
11046
|
children: [
|
|
10723
|
-
/* @__PURE__ */ (0,
|
|
10724
|
-
/* @__PURE__ */ (0,
|
|
11047
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectScrollUpButton2, {}),
|
|
11048
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10725
11049
|
Viewport,
|
|
10726
11050
|
{
|
|
10727
11051
|
className: cn(
|
|
@@ -10731,13 +11055,13 @@ var SelectContent2 = React38.forwardRef(({ className, children, position = "popp
|
|
|
10731
11055
|
children
|
|
10732
11056
|
}
|
|
10733
11057
|
),
|
|
10734
|
-
/* @__PURE__ */ (0,
|
|
11058
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectScrollDownButton2, {})
|
|
10735
11059
|
]
|
|
10736
11060
|
}
|
|
10737
11061
|
) });
|
|
10738
11062
|
});
|
|
10739
11063
|
SelectContent2.displayName = Content22.displayName;
|
|
10740
|
-
var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
11064
|
+
var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10741
11065
|
Label,
|
|
10742
11066
|
{
|
|
10743
11067
|
ref,
|
|
@@ -10746,7 +11070,7 @@ var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
10746
11070
|
}
|
|
10747
11071
|
));
|
|
10748
11072
|
SelectLabel2.displayName = Label.displayName;
|
|
10749
|
-
var SelectItem2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
11073
|
+
var SelectItem2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
10750
11074
|
Item,
|
|
10751
11075
|
{
|
|
10752
11076
|
ref,
|
|
@@ -10756,13 +11080,13 @@ var SelectItem2 = React38.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
10756
11080
|
),
|
|
10757
11081
|
...props,
|
|
10758
11082
|
children: [
|
|
10759
|
-
/* @__PURE__ */ (0,
|
|
10760
|
-
/* @__PURE__ */ (0,
|
|
11083
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.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_runtime26.jsx)(ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Check, { className: "uf-h-4 uf-w-4" }) }) }),
|
|
11084
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ItemText, { children })
|
|
10761
11085
|
]
|
|
10762
11086
|
}
|
|
10763
11087
|
));
|
|
10764
11088
|
SelectItem2.displayName = Item.displayName;
|
|
10765
|
-
var SelectSeparator2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
11089
|
+
var SelectSeparator2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
10766
11090
|
Separator,
|
|
10767
11091
|
{
|
|
10768
11092
|
ref,
|
|
@@ -10799,7 +11123,7 @@ var buttonVariants = cva(
|
|
|
10799
11123
|
var Button = React42.forwardRef(
|
|
10800
11124
|
({ className, variant, size: size4, asChild = false, ...props }, ref) => {
|
|
10801
11125
|
const Comp = asChild ? Slot3 : "button";
|
|
10802
|
-
return /* @__PURE__ */ (0,
|
|
11126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
10803
11127
|
Comp,
|
|
10804
11128
|
{
|
|
10805
11129
|
className: cn(buttonVariants({ variant, size: size4, className })),
|
|
@@ -10815,7 +11139,7 @@ var Tooltip2 = Root32;
|
|
|
10815
11139
|
var TooltipTrigger2 = Trigger2;
|
|
10816
11140
|
var TooltipContent2 = React52.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
10817
11141
|
const { themeClass } = useTheme();
|
|
10818
|
-
return /* @__PURE__ */ (0,
|
|
11142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Portal4, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
10819
11143
|
Content23,
|
|
10820
11144
|
{
|
|
10821
11145
|
ref,
|
|
@@ -11161,8 +11485,8 @@ function TransferCryptoBase({
|
|
|
11161
11485
|
const processingTime = currentChainFromBackend?.estimated_processing_time ?? null;
|
|
11162
11486
|
const minDepositUsd = currentChainFromBackend?.minimum_deposit_amount_usd ?? 3;
|
|
11163
11487
|
const renderTokenItem = (tokenData) => {
|
|
11164
|
-
return /* @__PURE__ */ (0,
|
|
11165
|
-
/* @__PURE__ */ (0,
|
|
11488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
11489
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11166
11490
|
"img",
|
|
11167
11491
|
{
|
|
11168
11492
|
src: tokenData.icon_url,
|
|
@@ -11172,13 +11496,13 @@ function TransferCryptoBase({
|
|
|
11172
11496
|
className: "uf-rounded-full uf-flex-shrink-0"
|
|
11173
11497
|
}
|
|
11174
11498
|
),
|
|
11175
|
-
/* @__PURE__ */ (0,
|
|
11176
|
-
showDetailedDropdowns && /* @__PURE__ */ (0,
|
|
11499
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
|
|
11500
|
+
showDetailedDropdowns && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
|
|
11177
11501
|
] });
|
|
11178
11502
|
};
|
|
11179
11503
|
const renderChainItem = (chainData) => {
|
|
11180
|
-
return /* @__PURE__ */ (0,
|
|
11181
|
-
/* @__PURE__ */ (0,
|
|
11504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
11505
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11182
11506
|
"img",
|
|
11183
11507
|
{
|
|
11184
11508
|
src: chainData.icon_url,
|
|
@@ -11188,24 +11512,24 @@ function TransferCryptoBase({
|
|
|
11188
11512
|
className: "uf-rounded-full uf-flex-shrink-0"
|
|
11189
11513
|
}
|
|
11190
11514
|
),
|
|
11191
|
-
/* @__PURE__ */ (0,
|
|
11192
|
-
showDetailedDropdowns && /* @__PURE__ */ (0,
|
|
11515
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
|
|
11516
|
+
showDetailedDropdowns && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
|
|
11193
11517
|
] });
|
|
11194
11518
|
};
|
|
11195
11519
|
const selectContainerClass = layoutVariant === "horizontal" ? "uf-grid uf-grid-cols-2 uf-gap-2.5" : "uf-space-y-3";
|
|
11196
|
-
return /* @__PURE__ */ (0,
|
|
11197
|
-
/* @__PURE__ */ (0,
|
|
11198
|
-
/* @__PURE__ */ (0,
|
|
11199
|
-
/* @__PURE__ */ (0,
|
|
11200
|
-
/* @__PURE__ */ (0,
|
|
11520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-space-y-3", children: [
|
|
11521
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: selectContainerClass, children: [
|
|
11522
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
11523
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
|
|
11524
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
11201
11525
|
Select2,
|
|
11202
11526
|
{
|
|
11203
11527
|
value: token,
|
|
11204
11528
|
onValueChange: setToken,
|
|
11205
11529
|
disabled: tokensLoading || supportedTokens.length === 0,
|
|
11206
11530
|
children: [
|
|
11207
|
-
/* @__PURE__ */ (0,
|
|
11208
|
-
/* @__PURE__ */ (0,
|
|
11531
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectTrigger2, { 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_runtime29.jsx)(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
|
|
11532
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11209
11533
|
SelectItem2,
|
|
11210
11534
|
{
|
|
11211
11535
|
value: tokenData.symbol,
|
|
@@ -11218,51 +11542,51 @@ function TransferCryptoBase({
|
|
|
11218
11542
|
}
|
|
11219
11543
|
)
|
|
11220
11544
|
] }),
|
|
11221
|
-
/* @__PURE__ */ (0,
|
|
11222
|
-
/* @__PURE__ */ (0,
|
|
11545
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
11546
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
|
|
11223
11547
|
t.supportedChain,
|
|
11224
|
-
/* @__PURE__ */ (0,
|
|
11548
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "uf-text-[10px]", children: [
|
|
11225
11549
|
"$",
|
|
11226
11550
|
minDepositUsd,
|
|
11227
11551
|
" ",
|
|
11228
11552
|
t.minDeposit.label
|
|
11229
11553
|
] }),
|
|
11230
|
-
/* @__PURE__ */ (0,
|
|
11231
|
-
/* @__PURE__ */ (0,
|
|
11554
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip2, { children: [
|
|
11555
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11232
11556
|
"span",
|
|
11233
11557
|
{
|
|
11234
11558
|
className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
|
|
11235
11559
|
tabIndex: 0,
|
|
11236
11560
|
role: "button",
|
|
11237
11561
|
"aria-label": "Minimum deposit information",
|
|
11238
|
-
children: /* @__PURE__ */ (0,
|
|
11562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Info, { className: "uf-w-3 uf-h-3" })
|
|
11239
11563
|
}
|
|
11240
11564
|
) }),
|
|
11241
|
-
/* @__PURE__ */ (0,
|
|
11565
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11242
11566
|
TooltipContent2,
|
|
11243
11567
|
{
|
|
11244
11568
|
side: "left",
|
|
11245
11569
|
align: "center",
|
|
11246
11570
|
className: "uf-max-w-[200px]",
|
|
11247
|
-
children: /* @__PURE__ */ (0,
|
|
11571
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: t.minDeposit.tooltip })
|
|
11248
11572
|
}
|
|
11249
11573
|
)
|
|
11250
11574
|
] })
|
|
11251
11575
|
] }),
|
|
11252
|
-
/* @__PURE__ */ (0,
|
|
11576
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
11253
11577
|
Select2,
|
|
11254
11578
|
{
|
|
11255
11579
|
value: chain,
|
|
11256
11580
|
onValueChange: setChain,
|
|
11257
11581
|
disabled: tokensLoading || availableChainsForToken.length === 0,
|
|
11258
11582
|
children: [
|
|
11259
|
-
/* @__PURE__ */ (0,
|
|
11260
|
-
/* @__PURE__ */ (0,
|
|
11583
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectTrigger2, { 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_runtime29.jsx)(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.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_runtime29.jsx)("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
|
|
11584
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.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) => {
|
|
11261
11585
|
const chainKey = getChainKey(
|
|
11262
11586
|
chainData.chain_id,
|
|
11263
11587
|
chainData.chain_type
|
|
11264
11588
|
);
|
|
11265
|
-
return /* @__PURE__ */ (0,
|
|
11589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11266
11590
|
SelectItem2,
|
|
11267
11591
|
{
|
|
11268
11592
|
value: chainKey,
|
|
@@ -11277,14 +11601,14 @@ function TransferCryptoBase({
|
|
|
11277
11601
|
)
|
|
11278
11602
|
] })
|
|
11279
11603
|
] }),
|
|
11280
|
-
/* @__PURE__ */ (0,
|
|
11604
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.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_runtime29.jsx)(
|
|
11281
11605
|
"div",
|
|
11282
11606
|
{
|
|
11283
11607
|
className: "uf-flex uf-items-center uf-justify-center",
|
|
11284
11608
|
style: { width: 180, height: 180 },
|
|
11285
|
-
children: /* @__PURE__ */ (0,
|
|
11609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
|
|
11286
11610
|
}
|
|
11287
|
-
) : depositAddress ? /* @__PURE__ */ (0,
|
|
11611
|
+
) : depositAddress ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11288
11612
|
StyledQRCode,
|
|
11289
11613
|
{
|
|
11290
11614
|
value: depositAddress,
|
|
@@ -11294,93 +11618,93 @@ function TransferCryptoBase({
|
|
|
11294
11618
|
darkMode: isDarkMode
|
|
11295
11619
|
},
|
|
11296
11620
|
`qr-${depositAddress}-${chain}`
|
|
11297
|
-
) : /* @__PURE__ */ (0,
|
|
11621
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11298
11622
|
"div",
|
|
11299
11623
|
{
|
|
11300
11624
|
className: "uf-flex uf-items-center uf-justify-center",
|
|
11301
11625
|
style: { width: 180, height: 180 },
|
|
11302
|
-
children: /* @__PURE__ */ (0,
|
|
11626
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
|
|
11303
11627
|
}
|
|
11304
11628
|
) }) }),
|
|
11305
|
-
/* @__PURE__ */ (0,
|
|
11306
|
-
/* @__PURE__ */ (0,
|
|
11307
|
-
/* @__PURE__ */ (0,
|
|
11629
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { children: [
|
|
11630
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-justify-between", children: [
|
|
11631
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1", children: [
|
|
11308
11632
|
t.depositAddress.label,
|
|
11309
|
-
/* @__PURE__ */ (0,
|
|
11310
|
-
/* @__PURE__ */ (0,
|
|
11633
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip2, { children: [
|
|
11634
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11311
11635
|
"span",
|
|
11312
11636
|
{
|
|
11313
11637
|
className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
|
|
11314
11638
|
tabIndex: 0,
|
|
11315
11639
|
role: "button",
|
|
11316
11640
|
"aria-label": "Deposit address information",
|
|
11317
|
-
children: /* @__PURE__ */ (0,
|
|
11641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Info, { className: "uf-w-3 uf-h-3" })
|
|
11318
11642
|
}
|
|
11319
11643
|
) }),
|
|
11320
|
-
/* @__PURE__ */ (0,
|
|
11644
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11321
11645
|
TooltipContent2,
|
|
11322
11646
|
{
|
|
11323
11647
|
side: "top",
|
|
11324
11648
|
align: "center",
|
|
11325
11649
|
className: "uf-max-w-[240px]",
|
|
11326
|
-
children: /* @__PURE__ */ (0,
|
|
11650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
|
|
11327
11651
|
}
|
|
11328
11652
|
)
|
|
11329
11653
|
] })
|
|
11330
11654
|
] }),
|
|
11331
|
-
copyButtonMode === "compact" && /* @__PURE__ */ (0,
|
|
11655
|
+
copyButtonMode === "compact" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11332
11656
|
"button",
|
|
11333
11657
|
{
|
|
11334
11658
|
onClick: handleCopyAddress,
|
|
11335
11659
|
disabled: loading || !depositAddress,
|
|
11336
11660
|
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",
|
|
11337
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
11338
|
-
/* @__PURE__ */ (0,
|
|
11339
|
-
/* @__PURE__ */ (0,
|
|
11340
|
-
] }) : /* @__PURE__ */ (0,
|
|
11341
|
-
/* @__PURE__ */ (0,
|
|
11342
|
-
/* @__PURE__ */ (0,
|
|
11661
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
11662
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Check, { className: "uf-w-3 uf-h-3" }),
|
|
11663
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: t.copied })
|
|
11664
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
11665
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Copy, { className: "uf-w-3 uf-h-3" }),
|
|
11666
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: t.copyAddress })
|
|
11343
11667
|
] })
|
|
11344
11668
|
}
|
|
11345
11669
|
)
|
|
11346
11670
|
] }),
|
|
11347
|
-
loading ? /* @__PURE__ */ (0,
|
|
11671
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime29.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_runtime29.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_runtime29.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 })
|
|
11348
11672
|
] }),
|
|
11349
|
-
copyButtonMode === "fullWidth" && /* @__PURE__ */ (0,
|
|
11673
|
+
copyButtonMode === "fullWidth" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11350
11674
|
Button,
|
|
11351
11675
|
{
|
|
11352
11676
|
onClick: handleCopyAddress,
|
|
11353
11677
|
disabled: loading || !depositAddress,
|
|
11354
11678
|
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",
|
|
11355
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
11356
|
-
/* @__PURE__ */ (0,
|
|
11679
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
11680
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Check, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
|
|
11357
11681
|
t.copied
|
|
11358
|
-
] }) : /* @__PURE__ */ (0,
|
|
11359
|
-
/* @__PURE__ */ (0,
|
|
11682
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
11683
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Copy, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
|
|
11360
11684
|
t.copyAddress
|
|
11361
11685
|
] })
|
|
11362
11686
|
}
|
|
11363
11687
|
),
|
|
11364
|
-
/* @__PURE__ */ (0,
|
|
11365
|
-
/* @__PURE__ */ (0,
|
|
11688
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-bg-secondary uf-rounded-xl uf-px-3", children: [
|
|
11689
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
11366
11690
|
"button",
|
|
11367
11691
|
{
|
|
11368
11692
|
onClick: () => setDetailsExpanded(!detailsExpanded),
|
|
11369
11693
|
className: "uf-w-full uf-flex uf-items-center uf-justify-between uf-py-2.5",
|
|
11370
11694
|
children: [
|
|
11371
|
-
/* @__PURE__ */ (0,
|
|
11372
|
-
/* @__PURE__ */ (0,
|
|
11373
|
-
/* @__PURE__ */ (0,
|
|
11695
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
11696
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
|
|
11697
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "uf-text-xs", children: [
|
|
11374
11698
|
t.priceImpact.label,
|
|
11375
11699
|
":",
|
|
11376
11700
|
" ",
|
|
11377
|
-
/* @__PURE__ */ (0,
|
|
11701
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "uf-text-foreground", children: [
|
|
11378
11702
|
priceImpact.toFixed(2),
|
|
11379
11703
|
"%"
|
|
11380
11704
|
] })
|
|
11381
11705
|
] }),
|
|
11382
|
-
/* @__PURE__ */ (0,
|
|
11383
|
-
/* @__PURE__ */ (0,
|
|
11706
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip2, { children: [
|
|
11707
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11384
11708
|
"span",
|
|
11385
11709
|
{
|
|
11386
11710
|
className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
|
|
@@ -11393,75 +11717,75 @@ function TransferCryptoBase({
|
|
|
11393
11717
|
tabIndex: 0,
|
|
11394
11718
|
role: "button",
|
|
11395
11719
|
"aria-label": "Price impact information",
|
|
11396
|
-
children: /* @__PURE__ */ (0,
|
|
11720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Info, { className: "uf-w-3 uf-h-3" })
|
|
11397
11721
|
}
|
|
11398
11722
|
) }),
|
|
11399
|
-
/* @__PURE__ */ (0,
|
|
11723
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11400
11724
|
TooltipContent2,
|
|
11401
11725
|
{
|
|
11402
11726
|
side: "top",
|
|
11403
11727
|
align: "center",
|
|
11404
11728
|
className: "uf-max-w-[240px]",
|
|
11405
|
-
children: /* @__PURE__ */ (0,
|
|
11729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: t.priceImpact.tooltip })
|
|
11406
11730
|
}
|
|
11407
11731
|
)
|
|
11408
11732
|
] })
|
|
11409
11733
|
] }),
|
|
11410
|
-
detailsExpanded ? /* @__PURE__ */ (0,
|
|
11734
|
+
detailsExpanded ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
|
|
11411
11735
|
]
|
|
11412
11736
|
}
|
|
11413
11737
|
),
|
|
11414
|
-
detailsExpanded && /* @__PURE__ */ (0,
|
|
11415
|
-
/* @__PURE__ */ (0,
|
|
11416
|
-
/* @__PURE__ */ (0,
|
|
11417
|
-
/* @__PURE__ */ (0,
|
|
11738
|
+
detailsExpanded && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
|
|
11739
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
11740
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
|
|
11741
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "uf-text-xs", children: [
|
|
11418
11742
|
t.slippage.label,
|
|
11419
11743
|
":",
|
|
11420
11744
|
" ",
|
|
11421
|
-
/* @__PURE__ */ (0,
|
|
11745
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "uf-text-foreground", children: [
|
|
11422
11746
|
t.slippage.auto,
|
|
11423
11747
|
" \u2022 ",
|
|
11424
11748
|
maxSlippage.toFixed(2),
|
|
11425
11749
|
"%"
|
|
11426
11750
|
] })
|
|
11427
11751
|
] }),
|
|
11428
|
-
/* @__PURE__ */ (0,
|
|
11429
|
-
/* @__PURE__ */ (0,
|
|
11752
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip2, { children: [
|
|
11753
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11430
11754
|
"span",
|
|
11431
11755
|
{
|
|
11432
11756
|
className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
|
|
11433
11757
|
tabIndex: 0,
|
|
11434
11758
|
role: "button",
|
|
11435
11759
|
"aria-label": "Slippage information",
|
|
11436
|
-
children: /* @__PURE__ */ (0,
|
|
11760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Info, { className: "uf-w-3 uf-h-3" })
|
|
11437
11761
|
}
|
|
11438
11762
|
) }),
|
|
11439
|
-
/* @__PURE__ */ (0,
|
|
11763
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11440
11764
|
TooltipContent2,
|
|
11441
11765
|
{
|
|
11442
11766
|
side: "top",
|
|
11443
11767
|
align: "center",
|
|
11444
11768
|
className: "uf-max-w-[240px]",
|
|
11445
|
-
children: /* @__PURE__ */ (0,
|
|
11769
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: t.slippage.tooltip })
|
|
11446
11770
|
}
|
|
11447
11771
|
)
|
|
11448
11772
|
] })
|
|
11449
11773
|
] }),
|
|
11450
|
-
/* @__PURE__ */ (0,
|
|
11451
|
-
/* @__PURE__ */ (0,
|
|
11452
|
-
/* @__PURE__ */ (0,
|
|
11774
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
11775
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Clock, { className: "uf-w-3 uf-h-3" }) }),
|
|
11776
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "uf-text-xs", children: [
|
|
11453
11777
|
t.processingTime.label,
|
|
11454
11778
|
":",
|
|
11455
11779
|
" ",
|
|
11456
|
-
/* @__PURE__ */ (0,
|
|
11780
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
|
|
11457
11781
|
] })
|
|
11458
11782
|
] }),
|
|
11459
|
-
/* @__PURE__ */ (0,
|
|
11460
|
-
/* @__PURE__ */ (0,
|
|
11461
|
-
/* @__PURE__ */ (0,
|
|
11783
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
11784
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "uf-bg-card uf-rounded-full uf-p-1", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FileText, { className: "uf-w-3 uf-h-3" }) }),
|
|
11785
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "uf-text-xs", children: [
|
|
11462
11786
|
t.help.needHelp,
|
|
11463
11787
|
" ",
|
|
11464
|
-
/* @__PURE__ */ (0,
|
|
11788
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11465
11789
|
"a",
|
|
11466
11790
|
{
|
|
11467
11791
|
href: "#",
|
|
@@ -11471,49 +11795,48 @@ function TransferCryptoBase({
|
|
|
11471
11795
|
)
|
|
11472
11796
|
] })
|
|
11473
11797
|
] })
|
|
11474
|
-
] }),
|
|
11475
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
|
|
11476
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
11477
|
-
"a",
|
|
11478
|
-
{
|
|
11479
|
-
href: "https://unifold.io/terms",
|
|
11480
|
-
className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
|
|
11481
|
-
target: "_blank",
|
|
11482
|
-
children: t.terms.termsApply
|
|
11483
|
-
}
|
|
11484
|
-
),
|
|
11485
|
-
depositExecutions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
11486
|
-
"button",
|
|
11487
|
-
{
|
|
11488
|
-
onClick: () => setDepositsModalOpen(true),
|
|
11489
|
-
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",
|
|
11490
|
-
children: [
|
|
11491
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
|
|
11492
|
-
"Track deposits (",
|
|
11493
|
-
depositExecutions.length,
|
|
11494
|
-
")",
|
|
11495
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChevronRight, { className: "uf-w-3 uf-h-3" })
|
|
11496
|
-
]
|
|
11497
|
-
}
|
|
11498
|
-
)
|
|
11499
11798
|
] })
|
|
11500
11799
|
] }),
|
|
11501
|
-
|
|
11800
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
|
|
11801
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11802
|
+
"a",
|
|
11803
|
+
{
|
|
11804
|
+
href: "https://unifold.io/terms",
|
|
11805
|
+
className: "uf-text-muted-foreground uf-underline hover:uf-text-foreground uf-transition-colors",
|
|
11806
|
+
target: "_blank",
|
|
11807
|
+
children: t.terms.termsApply
|
|
11808
|
+
}
|
|
11809
|
+
),
|
|
11810
|
+
depositExecutions.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
11811
|
+
"button",
|
|
11812
|
+
{
|
|
11813
|
+
onClick: () => setDepositsModalOpen(true),
|
|
11814
|
+
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",
|
|
11815
|
+
children: [
|
|
11816
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
|
|
11817
|
+
"Track deposits (",
|
|
11818
|
+
depositExecutions.length,
|
|
11819
|
+
")",
|
|
11820
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronRight, { className: "uf-w-3 uf-h-3" })
|
|
11821
|
+
]
|
|
11822
|
+
}
|
|
11823
|
+
)
|
|
11824
|
+
] }),
|
|
11825
|
+
depositExecutions.length === 1 && /* @__PURE__ */ (0, import_jsx_runtime29.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_runtime29.jsx)(
|
|
11502
11826
|
DepositSuccessToast,
|
|
11503
11827
|
{
|
|
11504
11828
|
depositTx: depositExecutions[0].transaction_hash,
|
|
11505
|
-
completionTx: depositExecutions[0].destination_transaction_hashes?.[0] || (depositExecutions[0].status === "succeeded" ? depositExecutions[0].transaction_hash : void 0),
|
|
11506
11829
|
orderSubmittedAt: depositExecutions[0].created_at || (/* @__PURE__ */ new Date()).toISOString(),
|
|
11507
11830
|
orderFilledAt: depositExecutions[0].updated_at || (/* @__PURE__ */ new Date()).toISOString(),
|
|
11508
11831
|
explorerUrl: depositExecutions[0].explorer_url,
|
|
11509
|
-
completionExplorerUrl: depositExecutions[0].destination_explorer_url ?? void 0,
|
|
11510
11832
|
status: depositExecutions[0].status,
|
|
11511
|
-
tokenIconUrl: depositExecutions[0].
|
|
11833
|
+
tokenIconUrl: depositExecutions[0].destination_token_metadata?.icon_url,
|
|
11834
|
+
sourceAmountBaseUnit: depositExecutions[0].source_amount_base_unit,
|
|
11512
11835
|
onClose: () => setDepositExecutions([])
|
|
11513
11836
|
},
|
|
11514
11837
|
depositExecutions[0].id
|
|
11515
11838
|
) }),
|
|
11516
|
-
/* @__PURE__ */ (0,
|
|
11839
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
11517
11840
|
DepositsModal,
|
|
11518
11841
|
{
|
|
11519
11842
|
open: depositsModalOpen,
|
|
@@ -11527,7 +11850,7 @@ function TransferCryptoBase({
|
|
|
11527
11850
|
] }) });
|
|
11528
11851
|
}
|
|
11529
11852
|
function TransferCrypto(props) {
|
|
11530
|
-
return /* @__PURE__ */ (0,
|
|
11853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
11531
11854
|
TransferCryptoBase,
|
|
11532
11855
|
{
|
|
11533
11856
|
...props,
|
|
@@ -11541,30 +11864,28 @@ function CurrencyListItem({
|
|
|
11541
11864
|
isSelected,
|
|
11542
11865
|
onSelect
|
|
11543
11866
|
}) {
|
|
11544
|
-
const iconUrl = currency.icon_url;
|
|
11545
|
-
return /* @__PURE__ */ (0,
|
|
11867
|
+
const iconUrl = getPreferredIconUrl(currency.icon_urls, "png") || currency.icon_url;
|
|
11868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
11546
11869
|
"button",
|
|
11547
11870
|
{
|
|
11548
11871
|
onClick: () => onSelect(currency.currency_code),
|
|
11549
11872
|
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",
|
|
11550
11873
|
children: [
|
|
11551
|
-
/* @__PURE__ */ (0,
|
|
11552
|
-
/* @__PURE__ */ (0,
|
|
11874
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
11875
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
11553
11876
|
"img",
|
|
11554
11877
|
{
|
|
11555
11878
|
src: iconUrl,
|
|
11556
11879
|
alt: currency.name,
|
|
11557
|
-
|
|
11558
|
-
height: 40,
|
|
11559
|
-
className: "uf-w-full uf-h-full uf-object-cover"
|
|
11880
|
+
className: "uf-w-10 uf-h-10 uf-flex-shrink-0"
|
|
11560
11881
|
}
|
|
11561
|
-
)
|
|
11562
|
-
/* @__PURE__ */ (0,
|
|
11563
|
-
/* @__PURE__ */ (0,
|
|
11564
|
-
/* @__PURE__ */ (0,
|
|
11882
|
+
),
|
|
11883
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "uf-text-left", children: [
|
|
11884
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
|
|
11885
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
|
|
11565
11886
|
] })
|
|
11566
11887
|
] }),
|
|
11567
|
-
isSelected && /* @__PURE__ */ (0,
|
|
11888
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Check, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
|
|
11568
11889
|
]
|
|
11569
11890
|
}
|
|
11570
11891
|
);
|
|
@@ -11576,9 +11897,9 @@ function CurrencyListSection({
|
|
|
11576
11897
|
onSelect
|
|
11577
11898
|
}) {
|
|
11578
11899
|
if (currencies.length === 0) return null;
|
|
11579
|
-
return /* @__PURE__ */ (0,
|
|
11580
|
-
/* @__PURE__ */ (0,
|
|
11581
|
-
currencies.map((currency) => /* @__PURE__ */ (0,
|
|
11900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
11901
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
|
|
11902
|
+
currencies.map((currency) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
11582
11903
|
CurrencyListItem,
|
|
11583
11904
|
{
|
|
11584
11905
|
currency,
|
|
@@ -11625,8 +11946,8 @@ function CurrencyModal({
|
|
|
11625
11946
|
onOpenChange(false);
|
|
11626
11947
|
setSearchQuery("");
|
|
11627
11948
|
};
|
|
11628
|
-
return /* @__PURE__ */ (0,
|
|
11629
|
-
/* @__PURE__ */ (0,
|
|
11949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DialogContent2, { 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: [
|
|
11950
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
11630
11951
|
DepositHeader,
|
|
11631
11952
|
{
|
|
11632
11953
|
title: "Currency",
|
|
@@ -11635,9 +11956,9 @@ function CurrencyModal({
|
|
|
11635
11956
|
onClose: handleClose
|
|
11636
11957
|
}
|
|
11637
11958
|
),
|
|
11638
|
-
/* @__PURE__ */ (0,
|
|
11639
|
-
/* @__PURE__ */ (0,
|
|
11640
|
-
/* @__PURE__ */ (0,
|
|
11959
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "uf-relative", children: [
|
|
11960
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(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" }),
|
|
11961
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
11641
11962
|
"input",
|
|
11642
11963
|
{
|
|
11643
11964
|
type: "text",
|
|
@@ -11648,8 +11969,8 @@ function CurrencyModal({
|
|
|
11648
11969
|
}
|
|
11649
11970
|
)
|
|
11650
11971
|
] }) }),
|
|
11651
|
-
/* @__PURE__ */ (0,
|
|
11652
|
-
/* @__PURE__ */ (0,
|
|
11972
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "uf-space-y-2", children: [
|
|
11973
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
11653
11974
|
CurrencyListSection,
|
|
11654
11975
|
{
|
|
11655
11976
|
title: "Popular currencies",
|
|
@@ -11658,8 +11979,8 @@ function CurrencyModal({
|
|
|
11658
11979
|
onSelect: handleSelect
|
|
11659
11980
|
}
|
|
11660
11981
|
),
|
|
11661
|
-
filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ (0,
|
|
11662
|
-
/* @__PURE__ */ (0,
|
|
11982
|
+
filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-h-2" }),
|
|
11983
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
11663
11984
|
CurrencyListSection,
|
|
11664
11985
|
{
|
|
11665
11986
|
title: "All currencies",
|
|
@@ -11668,7 +11989,7 @@ function CurrencyModal({
|
|
|
11668
11989
|
onSelect: handleSelect
|
|
11669
11990
|
}
|
|
11670
11991
|
),
|
|
11671
|
-
filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ (0,
|
|
11992
|
+
filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
|
|
11672
11993
|
] }) })
|
|
11673
11994
|
] }) });
|
|
11674
11995
|
}
|
|
@@ -11744,7 +12065,8 @@ function BuyWithCard({
|
|
|
11744
12065
|
destinationChainId,
|
|
11745
12066
|
destinationTokenAddress,
|
|
11746
12067
|
themeClass = "",
|
|
11747
|
-
wallets: externalWallets
|
|
12068
|
+
wallets: externalWallets,
|
|
12069
|
+
assetCdnUrl
|
|
11748
12070
|
}) {
|
|
11749
12071
|
const [amount, setAmount] = (0, import_react11.useState)("500.00");
|
|
11750
12072
|
const [currency, setCurrency] = (0, import_react11.useState)("usd");
|
|
@@ -12016,38 +12338,36 @@ function BuyWithCard({
|
|
|
12016
12338
|
(a, b) => b.destination_amount - a.destination_amount
|
|
12017
12339
|
);
|
|
12018
12340
|
const currencySymbol = getCurrencySymbol(currency);
|
|
12019
|
-
return /* @__PURE__ */ (0,
|
|
12020
|
-
/* @__PURE__ */ (0,
|
|
12341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-pb-1 uf-relative uf-overflow-hidden", children: [
|
|
12342
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
12021
12343
|
"div",
|
|
12022
12344
|
{
|
|
12023
12345
|
className: `uf-transition-all uf-duration-300 ${showQuotesView || showOnrampView ? "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0" : "uf-opacity-100"}`,
|
|
12024
12346
|
children: [
|
|
12025
|
-
/* @__PURE__ */ (0,
|
|
12026
|
-
/* @__PURE__ */ (0,
|
|
12347
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-mb-6 uf-pt-4", children: [
|
|
12348
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
12027
12349
|
"button",
|
|
12028
12350
|
{
|
|
12029
12351
|
onClick: () => setShowCurrencyModal(true),
|
|
12030
12352
|
disabled: currenciesLoading,
|
|
12031
12353
|
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",
|
|
12032
12354
|
children: [
|
|
12033
|
-
selectedCurrencyData && /* @__PURE__ */ (0,
|
|
12355
|
+
selectedCurrencyData && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12034
12356
|
"img",
|
|
12035
12357
|
{
|
|
12036
|
-
src: selectedCurrencyData.icon_url,
|
|
12358
|
+
src: getPreferredIconUrl(selectedCurrencyData.icon_urls, "png") || selectedCurrencyData.icon_url,
|
|
12037
12359
|
alt: selectedCurrencyData.name,
|
|
12038
|
-
|
|
12039
|
-
height: 16,
|
|
12040
|
-
className: "uf-w-full uf-h-full uf-object-cover uf-rounded-full"
|
|
12360
|
+
className: "uf-w-4 uf-h-4"
|
|
12041
12361
|
}
|
|
12042
|
-
)
|
|
12043
|
-
/* @__PURE__ */ (0,
|
|
12044
|
-
/* @__PURE__ */ (0,
|
|
12362
|
+
),
|
|
12363
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
|
|
12364
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronDown, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
|
|
12045
12365
|
]
|
|
12046
12366
|
}
|
|
12047
12367
|
) }),
|
|
12048
|
-
/* @__PURE__ */ (0,
|
|
12049
|
-
/* @__PURE__ */ (0,
|
|
12050
|
-
/* @__PURE__ */ (0,
|
|
12368
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-text-center uf-mb-4", children: [
|
|
12369
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
|
|
12370
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12051
12371
|
"span",
|
|
12052
12372
|
{
|
|
12053
12373
|
className: "uf-font-normal uf-text-foreground uf-flex-shrink-0 uf-mr-1",
|
|
@@ -12057,7 +12377,7 @@ function BuyWithCard({
|
|
|
12057
12377
|
children: currencySymbol
|
|
12058
12378
|
}
|
|
12059
12379
|
),
|
|
12060
|
-
/* @__PURE__ */ (0,
|
|
12380
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12061
12381
|
"input",
|
|
12062
12382
|
{
|
|
12063
12383
|
type: "text",
|
|
@@ -12073,12 +12393,12 @@ function BuyWithCard({
|
|
|
12073
12393
|
}
|
|
12074
12394
|
)
|
|
12075
12395
|
] }) }),
|
|
12076
|
-
quotesLoading ? /* @__PURE__ */ (0,
|
|
12396
|
+
quotesLoading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
|
|
12077
12397
|
calculateUSDC(),
|
|
12078
12398
|
" USDC (Perps)"
|
|
12079
12399
|
] })
|
|
12080
12400
|
] }),
|
|
12081
|
-
/* @__PURE__ */ (0,
|
|
12401
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
12082
12402
|
"button",
|
|
12083
12403
|
{
|
|
12084
12404
|
onClick: () => handleQuickAmount(quickAmount),
|
|
@@ -12091,31 +12411,31 @@ function BuyWithCard({
|
|
|
12091
12411
|
quickAmount
|
|
12092
12412
|
)) })
|
|
12093
12413
|
] }),
|
|
12094
|
-
/* @__PURE__ */ (0,
|
|
12095
|
-
/* @__PURE__ */ (0,
|
|
12096
|
-
/* @__PURE__ */ (0,
|
|
12097
|
-
quotes.length > 0 && !quotesLoading && /* @__PURE__ */ (0,
|
|
12414
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-mb-6", children: [
|
|
12415
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-font-medium uf-mb-2 uf-px-1", children: [
|
|
12416
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-foreground", children: "Provider" }),
|
|
12417
|
+
quotes.length > 0 && !quotesLoading && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "uf-text-[10px] uf-text-foreground uf-font-normal", children: [
|
|
12098
12418
|
"Refreshing in ",
|
|
12099
12419
|
countdown,
|
|
12100
12420
|
"s"
|
|
12101
12421
|
] })
|
|
12102
12422
|
] }),
|
|
12103
|
-
/* @__PURE__ */ (0,
|
|
12423
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12104
12424
|
"button",
|
|
12105
12425
|
{
|
|
12106
12426
|
onClick: () => handleViewChange("quotes"),
|
|
12107
12427
|
disabled: quotesLoading || quotes.length === 0,
|
|
12108
12428
|
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",
|
|
12109
|
-
children: quotesLoading ? /* @__PURE__ */ (0,
|
|
12110
|
-
/* @__PURE__ */ (0,
|
|
12111
|
-
/* @__PURE__ */ (0,
|
|
12112
|
-
/* @__PURE__ */ (0,
|
|
12113
|
-
/* @__PURE__ */ (0,
|
|
12429
|
+
children: quotesLoading ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-text-left uf-w-full uf-animate-pulse", children: [
|
|
12430
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
|
|
12431
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
12432
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
|
|
12433
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
|
|
12114
12434
|
] })
|
|
12115
|
-
] }) : /* @__PURE__ */ (0,
|
|
12116
|
-
isAutoSelected && /* @__PURE__ */ (0,
|
|
12117
|
-
selectedProvider && /* @__PURE__ */ (0,
|
|
12118
|
-
/* @__PURE__ */ (0,
|
|
12435
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-w-full uf-text-left", children: [
|
|
12436
|
+
isAutoSelected && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
|
|
12437
|
+
selectedProvider && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
12438
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12119
12439
|
"img",
|
|
12120
12440
|
{
|
|
12121
12441
|
src: selectedProvider.icon_url,
|
|
@@ -12125,22 +12445,22 @@ function BuyWithCard({
|
|
|
12125
12445
|
className: "uf-rounded-full uf-flex-shrink-0"
|
|
12126
12446
|
}
|
|
12127
12447
|
),
|
|
12128
|
-
/* @__PURE__ */ (0,
|
|
12129
|
-
/* @__PURE__ */ (0,
|
|
12130
|
-
/* @__PURE__ */ (0,
|
|
12131
|
-
isAutoSelected && /* @__PURE__ */ (0,
|
|
12132
|
-
isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ (0,
|
|
12133
|
-
selectedProvider.low_kyc === false && /* @__PURE__ */ (0,
|
|
12448
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex-1 uf-min-w-0", children: [
|
|
12449
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
|
|
12450
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
|
|
12451
|
+
isAutoSelected && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
|
|
12452
|
+
isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
|
|
12453
|
+
selectedProvider.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
|
|
12134
12454
|
] })
|
|
12135
12455
|
] }),
|
|
12136
|
-
quotes.length > 0 && /* @__PURE__ */ (0,
|
|
12456
|
+
quotes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
|
|
12137
12457
|
] })
|
|
12138
12458
|
] })
|
|
12139
12459
|
}
|
|
12140
12460
|
),
|
|
12141
|
-
quotesError && /* @__PURE__ */ (0,
|
|
12461
|
+
quotesError && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
|
|
12142
12462
|
] }),
|
|
12143
|
-
/* @__PURE__ */ (0,
|
|
12463
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12144
12464
|
"button",
|
|
12145
12465
|
{
|
|
12146
12466
|
onClick: handleContinue,
|
|
@@ -12155,15 +12475,15 @@ function BuyWithCard({
|
|
|
12155
12475
|
]
|
|
12156
12476
|
}
|
|
12157
12477
|
),
|
|
12158
|
-
/* @__PURE__ */ (0,
|
|
12478
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12159
12479
|
"div",
|
|
12160
12480
|
{
|
|
12161
12481
|
className: `uf-transition-all uf-duration-300 ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
|
|
12162
|
-
children: /* @__PURE__ */ (0,
|
|
12482
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index2) => {
|
|
12163
12483
|
const badges = getProviderBadges(quote, sortedQuotes);
|
|
12164
12484
|
const displayName = quote.service_provider_display_name;
|
|
12165
12485
|
const isSelected = selectedProvider?.service_provider === quote.service_provider;
|
|
12166
|
-
return /* @__PURE__ */ (0,
|
|
12486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
12167
12487
|
"button",
|
|
12168
12488
|
{
|
|
12169
12489
|
onClick: () => {
|
|
@@ -12176,8 +12496,8 @@ function BuyWithCard({
|
|
|
12176
12496
|
},
|
|
12177
12497
|
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" : ""}`,
|
|
12178
12498
|
children: [
|
|
12179
|
-
/* @__PURE__ */ (0,
|
|
12180
|
-
/* @__PURE__ */ (0,
|
|
12499
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
12500
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.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_runtime34.jsx)(
|
|
12181
12501
|
"img",
|
|
12182
12502
|
{
|
|
12183
12503
|
src: quote.icon_url,
|
|
@@ -12187,10 +12507,10 @@ function BuyWithCard({
|
|
|
12187
12507
|
className: "uf-rounded-full"
|
|
12188
12508
|
}
|
|
12189
12509
|
) }),
|
|
12190
|
-
/* @__PURE__ */ (0,
|
|
12191
|
-
/* @__PURE__ */ (0,
|
|
12192
|
-
/* @__PURE__ */ (0,
|
|
12193
|
-
badges.map((badge, i) => /* @__PURE__ */ (0,
|
|
12510
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-text-left", children: [
|
|
12511
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
|
|
12512
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
|
|
12513
|
+
badges.map((badge, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
12194
12514
|
"span",
|
|
12195
12515
|
{
|
|
12196
12516
|
className: "uf-text-[10px] uf-text-green-400 uf-font-normal",
|
|
@@ -12201,17 +12521,17 @@ function BuyWithCard({
|
|
|
12201
12521
|
},
|
|
12202
12522
|
i
|
|
12203
12523
|
)),
|
|
12204
|
-
quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ (0,
|
|
12205
|
-
quote.low_kyc === false && /* @__PURE__ */ (0,
|
|
12524
|
+
quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
|
|
12525
|
+
quote.low_kyc === false && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
|
|
12206
12526
|
] })
|
|
12207
12527
|
] })
|
|
12208
12528
|
] }),
|
|
12209
|
-
/* @__PURE__ */ (0,
|
|
12210
|
-
/* @__PURE__ */ (0,
|
|
12529
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-text-right", children: [
|
|
12530
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: [
|
|
12211
12531
|
quote.destination_amount.toFixed(2),
|
|
12212
12532
|
" USDC"
|
|
12213
12533
|
] }),
|
|
12214
|
-
/* @__PURE__ */ (0,
|
|
12534
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal", children: [
|
|
12215
12535
|
currencySymbol,
|
|
12216
12536
|
" ",
|
|
12217
12537
|
amount
|
|
@@ -12224,12 +12544,12 @@ function BuyWithCard({
|
|
|
12224
12544
|
}) })
|
|
12225
12545
|
}
|
|
12226
12546
|
),
|
|
12227
|
-
/* @__PURE__ */ (0,
|
|
12547
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12228
12548
|
"div",
|
|
12229
12549
|
{
|
|
12230
12550
|
className: `uf-transition-all uf-duration-300 ${showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
|
|
12231
|
-
children: onrampSession && /* @__PURE__ */ (0,
|
|
12232
|
-
/* @__PURE__ */ (0,
|
|
12551
|
+
children: onrampSession && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-6 uf-pb-4 uf-px-2", children: [
|
|
12552
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-mb-6", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12233
12553
|
"img",
|
|
12234
12554
|
{
|
|
12235
12555
|
src: onrampSession.provider.icon_url,
|
|
@@ -12239,88 +12559,79 @@ function BuyWithCard({
|
|
|
12239
12559
|
className: "uf-rounded-2xl"
|
|
12240
12560
|
}
|
|
12241
12561
|
) }),
|
|
12242
|
-
/* @__PURE__ */ (0,
|
|
12562
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
|
|
12243
12563
|
"{{provider}}",
|
|
12244
12564
|
onrampSession.provider.service_provider_display_name
|
|
12245
12565
|
) }),
|
|
12246
|
-
/* @__PURE__ */ (0,
|
|
12247
|
-
/* @__PURE__ */ (0,
|
|
12248
|
-
/* @__PURE__ */ (0,
|
|
12249
|
-
/* @__PURE__ */ (0,
|
|
12566
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
|
|
12567
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-items-center uf-justify-center", children: [
|
|
12568
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
12569
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12250
12570
|
"img",
|
|
12251
12571
|
{
|
|
12252
|
-
src:
|
|
12253
|
-
`/icons/currencies/${onrampSession.sourceCurrency.toLowerCase()}.
|
|
12572
|
+
src: getIconUrlWithCdn(
|
|
12573
|
+
`/icons/currencies/png/${onrampSession.sourceCurrency.toLowerCase()}.png`,
|
|
12574
|
+
assetCdnUrl
|
|
12254
12575
|
),
|
|
12255
12576
|
alt: onrampSession.sourceCurrency.toUpperCase(),
|
|
12256
|
-
|
|
12257
|
-
height: 28,
|
|
12258
|
-
className: "uf-rounded-full"
|
|
12577
|
+
className: "uf-w-7 uf-h-7 uf-rounded-full"
|
|
12259
12578
|
}
|
|
12260
12579
|
) }),
|
|
12261
|
-
/* @__PURE__ */ (0,
|
|
12262
|
-
/* @__PURE__ */ (0,
|
|
12580
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youUse }),
|
|
12581
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: onrampSession.sourceCurrency.toUpperCase() })
|
|
12263
12582
|
] }),
|
|
12264
|
-
/* @__PURE__ */ (0,
|
|
12265
|
-
/* @__PURE__ */ (0,
|
|
12266
|
-
/* @__PURE__ */ (0,
|
|
12267
|
-
/* @__PURE__ */ (0,
|
|
12583
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
|
|
12584
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
12585
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-relative", children: [
|
|
12586
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12268
12587
|
"img",
|
|
12269
12588
|
{
|
|
12270
|
-
src:
|
|
12589
|
+
src: getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
|
|
12271
12590
|
alt: "USDC",
|
|
12272
|
-
|
|
12273
|
-
height: 28,
|
|
12274
|
-
className: "uf-rounded-full"
|
|
12591
|
+
className: "uf-w-7 uf-h-7 uf-rounded-full"
|
|
12275
12592
|
}
|
|
12276
12593
|
),
|
|
12277
|
-
/* @__PURE__ */ (0,
|
|
12594
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12278
12595
|
"img",
|
|
12279
12596
|
{
|
|
12280
|
-
src:
|
|
12597
|
+
src: getIconUrlWithCdn("/icons/networks/png/polygon.png", assetCdnUrl),
|
|
12281
12598
|
alt: "Polygon",
|
|
12282
|
-
|
|
12283
|
-
height: 14,
|
|
12284
|
-
className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-rounded-full"
|
|
12599
|
+
className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
|
|
12285
12600
|
}
|
|
12286
12601
|
)
|
|
12287
12602
|
] }) }),
|
|
12288
|
-
/* @__PURE__ */ (0,
|
|
12289
|
-
/* @__PURE__ */ (0,
|
|
12603
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youBuy }),
|
|
12604
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: "USDC" })
|
|
12290
12605
|
] }),
|
|
12291
|
-
/* @__PURE__ */ (0,
|
|
12292
|
-
/* @__PURE__ */ (0,
|
|
12293
|
-
/* @__PURE__ */ (0,
|
|
12294
|
-
/* @__PURE__ */ (0,
|
|
12606
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
|
|
12607
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
|
|
12608
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "uf-relative", children: [
|
|
12609
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12295
12610
|
"img",
|
|
12296
12611
|
{
|
|
12297
|
-
src: destinationToken?.icon_url ||
|
|
12612
|
+
src: destinationToken?.icon_url || getIconUrlWithCdn("/icons/tokens/png/usdc.png", assetCdnUrl),
|
|
12298
12613
|
alt: displayTokenSymbol,
|
|
12299
|
-
|
|
12300
|
-
height: 28,
|
|
12301
|
-
className: "uf-rounded-full"
|
|
12614
|
+
className: "uf-w-7 uf-h-7 uf-rounded-full"
|
|
12302
12615
|
}
|
|
12303
12616
|
),
|
|
12304
|
-
destinationChain?.icon_url && /* @__PURE__ */ (0,
|
|
12617
|
+
destinationChain?.icon_url && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12305
12618
|
"img",
|
|
12306
12619
|
{
|
|
12307
12620
|
src: destinationChain.icon_url,
|
|
12308
12621
|
alt: destinationChain.chain_name,
|
|
12309
|
-
|
|
12310
|
-
height: 14,
|
|
12311
|
-
className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-rounded-full"
|
|
12622
|
+
className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
|
|
12312
12623
|
}
|
|
12313
12624
|
)
|
|
12314
12625
|
] }) }),
|
|
12315
|
-
/* @__PURE__ */ (0,
|
|
12316
|
-
/* @__PURE__ */ (0,
|
|
12626
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youReceive }),
|
|
12627
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: displayTokenSymbol })
|
|
12317
12628
|
] })
|
|
12318
12629
|
] }) }),
|
|
12319
|
-
/* @__PURE__ */ (0,
|
|
12630
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
|
|
12320
12631
|
] })
|
|
12321
12632
|
}
|
|
12322
12633
|
),
|
|
12323
|
-
/* @__PURE__ */ (0,
|
|
12634
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
12324
12635
|
CurrencyModal,
|
|
12325
12636
|
{
|
|
12326
12637
|
open: showCurrencyModal,
|
|
@@ -12343,23 +12654,23 @@ function TransferCryptoButton({
|
|
|
12343
12654
|
featuredTokens
|
|
12344
12655
|
}) {
|
|
12345
12656
|
const sortedTokens = featuredTokens ? [...featuredTokens].sort((a, b) => a.position - b.position) : [];
|
|
12346
|
-
return /* @__PURE__ */ (0,
|
|
12657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
12347
12658
|
"button",
|
|
12348
12659
|
{
|
|
12349
12660
|
onClick,
|
|
12350
12661
|
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",
|
|
12351
12662
|
children: [
|
|
12352
|
-
/* @__PURE__ */ (0,
|
|
12353
|
-
/* @__PURE__ */ (0,
|
|
12354
|
-
/* @__PURE__ */ (0,
|
|
12355
|
-
/* @__PURE__ */ (0,
|
|
12356
|
-
/* @__PURE__ */ (0,
|
|
12663
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
12664
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Zap, { className: "uf-w-5 uf-h-5" }) }),
|
|
12665
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "uf-text-left", children: [
|
|
12666
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
|
|
12667
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
|
|
12357
12668
|
] })
|
|
12358
12669
|
] }),
|
|
12359
|
-
/* @__PURE__ */ (0,
|
|
12360
|
-
/* @__PURE__ */ (0,
|
|
12670
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
12671
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "uf-flex uf--space-x-2", children: sortedTokens.map((token) => {
|
|
12361
12672
|
const iconUrl = token.icon_urls.find((u) => u.format === "svg")?.url || token.icon_urls.find((u) => u.format === "png")?.url;
|
|
12362
|
-
return /* @__PURE__ */ (0,
|
|
12673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
12363
12674
|
"img",
|
|
12364
12675
|
{
|
|
12365
12676
|
src: iconUrl,
|
|
@@ -12371,7 +12682,7 @@ function TransferCryptoButton({
|
|
|
12371
12682
|
token.name
|
|
12372
12683
|
);
|
|
12373
12684
|
}) }),
|
|
12374
|
-
/* @__PURE__ */ (0,
|
|
12685
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
|
|
12375
12686
|
] })
|
|
12376
12687
|
]
|
|
12377
12688
|
}
|
|
@@ -12383,23 +12694,23 @@ function DepositWithCardButton({
|
|
|
12383
12694
|
subtitle,
|
|
12384
12695
|
paymentNetworks
|
|
12385
12696
|
}) {
|
|
12386
|
-
return /* @__PURE__ */ (0,
|
|
12697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
12387
12698
|
"button",
|
|
12388
12699
|
{
|
|
12389
12700
|
onClick,
|
|
12390
12701
|
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",
|
|
12391
12702
|
children: [
|
|
12392
|
-
/* @__PURE__ */ (0,
|
|
12393
|
-
/* @__PURE__ */ (0,
|
|
12394
|
-
/* @__PURE__ */ (0,
|
|
12395
|
-
/* @__PURE__ */ (0,
|
|
12396
|
-
/* @__PURE__ */ (0,
|
|
12703
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
12704
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CreditCard, { className: "uf-w-5 uf-h-5" }) }),
|
|
12705
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "uf-text-left", children: [
|
|
12706
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
|
|
12707
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
|
|
12397
12708
|
] })
|
|
12398
12709
|
] }),
|
|
12399
|
-
/* @__PURE__ */ (0,
|
|
12400
|
-
/* @__PURE__ */ (0,
|
|
12710
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
12711
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: paymentNetworks?.map((network) => {
|
|
12401
12712
|
const iconUrl = network.icon_urls.find((u) => u.format === "svg")?.url || network.icon_urls.find((u) => u.format === "png")?.url;
|
|
12402
|
-
return /* @__PURE__ */ (0,
|
|
12713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
12403
12714
|
"img",
|
|
12404
12715
|
{
|
|
12405
12716
|
src: iconUrl,
|
|
@@ -12411,7 +12722,7 @@ function DepositWithCardButton({
|
|
|
12411
12722
|
network.name
|
|
12412
12723
|
);
|
|
12413
12724
|
}) }),
|
|
12414
|
-
/* @__PURE__ */ (0,
|
|
12725
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
|
|
12415
12726
|
] })
|
|
12416
12727
|
]
|
|
12417
12728
|
}
|
|
@@ -12423,39 +12734,39 @@ function DepositTrackerButton({
|
|
|
12423
12734
|
subtitle,
|
|
12424
12735
|
badge
|
|
12425
12736
|
}) {
|
|
12426
|
-
return /* @__PURE__ */ (0,
|
|
12737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
12427
12738
|
"button",
|
|
12428
12739
|
{
|
|
12429
12740
|
onClick,
|
|
12430
12741
|
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",
|
|
12431
12742
|
children: [
|
|
12432
|
-
/* @__PURE__ */ (0,
|
|
12433
|
-
/* @__PURE__ */ (0,
|
|
12434
|
-
/* @__PURE__ */ (0,
|
|
12435
|
-
badge !== void 0 && badge > 0 && /* @__PURE__ */ (0,
|
|
12743
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
12744
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2 uf-relative", children: [
|
|
12745
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Clock, { className: "uf-w-5 uf-h-5" }),
|
|
12746
|
+
badge !== void 0 && badge > 0 && /* @__PURE__ */ (0, import_jsx_runtime37.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 })
|
|
12436
12747
|
] }),
|
|
12437
|
-
/* @__PURE__ */ (0,
|
|
12438
|
-
/* @__PURE__ */ (0,
|
|
12439
|
-
/* @__PURE__ */ (0,
|
|
12748
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "uf-text-left", children: [
|
|
12749
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
|
|
12750
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
|
|
12440
12751
|
] })
|
|
12441
12752
|
] }),
|
|
12442
|
-
/* @__PURE__ */ (0,
|
|
12753
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
|
|
12443
12754
|
]
|
|
12444
12755
|
}
|
|
12445
12756
|
);
|
|
12446
12757
|
}
|
|
12447
12758
|
function SkeletonButton({ variant = "default" }) {
|
|
12448
|
-
return /* @__PURE__ */ (0,
|
|
12449
|
-
/* @__PURE__ */ (0,
|
|
12450
|
-
/* @__PURE__ */ (0,
|
|
12451
|
-
/* @__PURE__ */ (0,
|
|
12452
|
-
/* @__PURE__ */ (0,
|
|
12453
|
-
/* @__PURE__ */ (0,
|
|
12759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.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: [
|
|
12760
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
|
|
12761
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
|
|
12762
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "uf-space-y-1.5", children: [
|
|
12763
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
|
|
12764
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
|
|
12454
12765
|
] })
|
|
12455
12766
|
] }),
|
|
12456
|
-
/* @__PURE__ */ (0,
|
|
12457
|
-
variant === "with-icons" && /* @__PURE__ */ (0,
|
|
12458
|
-
/* @__PURE__ */ (0,
|
|
12767
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
|
|
12768
|
+
variant === "with-icons" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
|
|
12769
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
|
|
12459
12770
|
] })
|
|
12460
12771
|
] });
|
|
12461
12772
|
}
|
|
@@ -12573,27 +12884,27 @@ function DepositModal({
|
|
|
12573
12884
|
setQuotesCount(count3);
|
|
12574
12885
|
}
|
|
12575
12886
|
};
|
|
12576
|
-
return /* @__PURE__ */ (0,
|
|
12577
|
-
/* @__PURE__ */ (0,
|
|
12887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ThemeProvider, { themeClass, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Dialog2, { open, onOpenChange: handleClose, children: [
|
|
12888
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12578
12889
|
DialogContent2,
|
|
12579
12890
|
{
|
|
12580
12891
|
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}`,
|
|
12581
12892
|
onPointerDownOutside: (e) => e.preventDefault(),
|
|
12582
12893
|
onInteractOutside: (e) => e.preventDefault(),
|
|
12583
|
-
children: view === "main" ? /* @__PURE__ */ (0,
|
|
12584
|
-
/* @__PURE__ */ (0,
|
|
12894
|
+
children: view === "main" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
12895
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12585
12896
|
DepositHeader,
|
|
12586
12897
|
{
|
|
12587
12898
|
title: modalTitle || "Deposit",
|
|
12588
12899
|
onClose: handleClose
|
|
12589
12900
|
}
|
|
12590
12901
|
),
|
|
12591
|
-
/* @__PURE__ */ (0,
|
|
12592
|
-
/* @__PURE__ */ (0,
|
|
12593
|
-
/* @__PURE__ */ (0,
|
|
12594
|
-
!hideDepositTracker && /* @__PURE__ */ (0,
|
|
12595
|
-
] }) : /* @__PURE__ */ (0,
|
|
12596
|
-
/* @__PURE__ */ (0,
|
|
12902
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "uf-pb-4 uf-space-y-3", children: !projectConfig ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
12903
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SkeletonButton, { variant: "with-icons" }),
|
|
12904
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SkeletonButton, { variant: "with-icons" }),
|
|
12905
|
+
!hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SkeletonButton, {})
|
|
12906
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
12907
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12597
12908
|
TransferCryptoButton,
|
|
12598
12909
|
{
|
|
12599
12910
|
onClick: () => setView("transfer"),
|
|
@@ -12602,7 +12913,7 @@ function DepositModal({
|
|
|
12602
12913
|
featuredTokens: projectConfig.transfer_crypto.networks
|
|
12603
12914
|
}
|
|
12604
12915
|
),
|
|
12605
|
-
/* @__PURE__ */ (0,
|
|
12916
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12606
12917
|
DepositWithCardButton,
|
|
12607
12918
|
{
|
|
12608
12919
|
onClick: () => setView("card"),
|
|
@@ -12611,7 +12922,7 @@ function DepositModal({
|
|
|
12611
12922
|
paymentNetworks: projectConfig.payment_networks.networks
|
|
12612
12923
|
}
|
|
12613
12924
|
),
|
|
12614
|
-
!hideDepositTracker && /* @__PURE__ */ (0,
|
|
12925
|
+
!hideDepositTracker && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12615
12926
|
DepositTrackerButton,
|
|
12616
12927
|
{
|
|
12617
12928
|
onClick: () => setDepositsModalOpen(true),
|
|
@@ -12621,8 +12932,8 @@ function DepositModal({
|
|
|
12621
12932
|
}
|
|
12622
12933
|
)
|
|
12623
12934
|
] }) })
|
|
12624
|
-
] }) : view === "transfer" ? /* @__PURE__ */ (0,
|
|
12625
|
-
/* @__PURE__ */ (0,
|
|
12935
|
+
] }) : view === "transfer" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
12936
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12626
12937
|
DepositHeader,
|
|
12627
12938
|
{
|
|
12628
12939
|
title: t3.transferCrypto.title,
|
|
@@ -12631,7 +12942,7 @@ function DepositModal({
|
|
|
12631
12942
|
onClose: handleClose
|
|
12632
12943
|
}
|
|
12633
12944
|
),
|
|
12634
|
-
/* @__PURE__ */ (0,
|
|
12945
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12635
12946
|
TransferCrypto,
|
|
12636
12947
|
{
|
|
12637
12948
|
userId,
|
|
@@ -12646,8 +12957,8 @@ function DepositModal({
|
|
|
12646
12957
|
wallets
|
|
12647
12958
|
}
|
|
12648
12959
|
)
|
|
12649
|
-
] }) : /* @__PURE__ */ (0,
|
|
12650
|
-
/* @__PURE__ */ (0,
|
|
12960
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
|
|
12961
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12651
12962
|
DepositHeader,
|
|
12652
12963
|
{
|
|
12653
12964
|
title: cardView === "quotes" ? t3.quotes : modalTitle || "Deposit",
|
|
@@ -12657,7 +12968,7 @@ function DepositModal({
|
|
|
12657
12968
|
badge: cardView === "quotes" ? { count: quotesCount } : void 0
|
|
12658
12969
|
}
|
|
12659
12970
|
),
|
|
12660
|
-
/* @__PURE__ */ (0,
|
|
12971
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12661
12972
|
BuyWithCard,
|
|
12662
12973
|
{
|
|
12663
12974
|
userId,
|
|
@@ -12672,13 +12983,14 @@ function DepositModal({
|
|
|
12672
12983
|
onDepositSuccess,
|
|
12673
12984
|
onDepositError,
|
|
12674
12985
|
themeClass,
|
|
12675
|
-
wallets
|
|
12986
|
+
wallets,
|
|
12987
|
+
assetCdnUrl: projectConfig?.asset_cdn_url
|
|
12676
12988
|
}
|
|
12677
12989
|
)
|
|
12678
12990
|
] })
|
|
12679
12991
|
}
|
|
12680
12992
|
),
|
|
12681
|
-
/* @__PURE__ */ (0,
|
|
12993
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
12682
12994
|
DepositsModal,
|
|
12683
12995
|
{
|
|
12684
12996
|
open: depositsModalOpen,
|
|
@@ -12693,7 +13005,7 @@ function DepositModal({
|
|
|
12693
13005
|
}
|
|
12694
13006
|
|
|
12695
13007
|
// src/provider.tsx
|
|
12696
|
-
var
|
|
13008
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
12697
13009
|
function UnifoldProvider2({
|
|
12698
13010
|
children,
|
|
12699
13011
|
publishableKey,
|
|
@@ -12785,9 +13097,9 @@ function UnifoldProvider2({
|
|
|
12785
13097
|
}),
|
|
12786
13098
|
[beginDeposit, closeDeposit, handleDepositSuccess, handleDepositError]
|
|
12787
13099
|
);
|
|
12788
|
-
return /* @__PURE__ */ (0,
|
|
13100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UnifoldProvider, { publishableKey, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(ConnectContext.Provider, { value: contextValue, children: [
|
|
12789
13101
|
children,
|
|
12790
|
-
depositConfig && /* @__PURE__ */ (0,
|
|
13102
|
+
depositConfig && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
12791
13103
|
DepositModal,
|
|
12792
13104
|
{
|
|
12793
13105
|
open: isOpen,
|
|
@@ -12839,7 +13151,9 @@ function useUnifold2() {
|
|
|
12839
13151
|
|
|
12840
13152
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
12841
13153
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
13154
|
+
lucide-react/dist/esm/icons/arrow-down-circle.js:
|
|
12842
13155
|
lucide-react/dist/esm/icons/arrow-left.js:
|
|
13156
|
+
lucide-react/dist/esm/icons/check-circle.js:
|
|
12843
13157
|
lucide-react/dist/esm/icons/check.js:
|
|
12844
13158
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
12845
13159
|
lucide-react/dist/esm/icons/chevron-right.js:
|