kaleido-ui 0.1.5 → 0.1.6
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/web/index.cjs +1034 -977
- package/dist/web/index.d.cts +15 -3
- package/dist/web/index.d.ts +15 -3
- package/dist/web/index.js +712 -656
- package/package.json +1 -1
package/dist/web/index.cjs
CHANGED
|
@@ -82,6 +82,7 @@ __export(web_exports, {
|
|
|
82
82
|
DialogPortal: () => DialogPortal,
|
|
83
83
|
DialogTitle: () => DialogTitle,
|
|
84
84
|
DialogTrigger: () => DialogTrigger,
|
|
85
|
+
DotPagination: () => DotPagination,
|
|
85
86
|
ErrorBoundary: () => ErrorBoundary,
|
|
86
87
|
ErrorCard: () => ErrorCard,
|
|
87
88
|
ExpandIcon: () => ExpandIcon,
|
|
@@ -188,7 +189,12 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
188
189
|
cta: "w-full bg-primary text-primary-foreground font-bold rounded-2xl shadow-md hover:brightness-115 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none",
|
|
189
190
|
"cta-gradient": "w-full bg-gradient-to-r from-primary to-primary/80 text-primary-foreground font-extrabold rounded-2xl shadow-lg hover:opacity-90 hover:-translate-y-0.5 active:translate-y-0 active:opacity-100 disabled:opacity-40 disabled:shadow-none disabled:cursor-not-allowed disabled:bg-accent disabled:text-muted-foreground",
|
|
190
191
|
"danger-subtle": "bg-danger/10 border border-danger/20 text-danger font-bold rounded-xl hover:brightness-115",
|
|
191
|
-
hyperlink: "group text-muted-foreground underline underline-offset-2 hover:text-white hover:decoration-primary hover:[&_.icon]:text-primary bg-transparent font-normal"
|
|
192
|
+
hyperlink: "group text-muted-foreground underline underline-offset-2 hover:text-white hover:decoration-primary hover:[&_.icon]:text-primary bg-transparent font-normal",
|
|
193
|
+
// Hierarchy variants — primary/secondary/tertiary action emphasis.
|
|
194
|
+
// Pair with size="lg" or size="cta" for full-bleed buttons.
|
|
195
|
+
h1: "w-full bg-primary text-primary-foreground font-bold rounded-2xl shadow-md hover:brightness-115 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none",
|
|
196
|
+
h2: "w-full bg-primary/15 text-primary font-semibold rounded-xl border border-primary/20 hover:bg-primary/25 hover:border-primary/35",
|
|
197
|
+
h3: "text-primary font-semibold rounded-lg hover:bg-primary/10 active:bg-primary/15"
|
|
192
198
|
},
|
|
193
199
|
size: {
|
|
194
200
|
default: "h-11 px-5 py-2",
|
|
@@ -947,8 +953,54 @@ function Toaster() {
|
|
|
947
953
|
] });
|
|
948
954
|
}
|
|
949
955
|
|
|
950
|
-
// src/web/
|
|
956
|
+
// src/web/primitives/dot-pagination.tsx
|
|
957
|
+
var React12 = __toESM(require("react"), 1);
|
|
951
958
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
959
|
+
var toneClasses = {
|
|
960
|
+
primary: "bg-primary",
|
|
961
|
+
warning: "bg-warning"
|
|
962
|
+
};
|
|
963
|
+
var DotPagination = React12.forwardRef(
|
|
964
|
+
({ count: count2, index, tone = "primary", onSelect, ariaLabel, className, ...props }, ref) => {
|
|
965
|
+
if (count2 <= 1) return null;
|
|
966
|
+
const interactive = typeof onSelect === "function";
|
|
967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
968
|
+
"div",
|
|
969
|
+
{
|
|
970
|
+
ref,
|
|
971
|
+
role: "tablist",
|
|
972
|
+
"aria-label": ariaLabel ?? "Pagination",
|
|
973
|
+
className: cn("flex items-center justify-center gap-1.5", className),
|
|
974
|
+
...props,
|
|
975
|
+
children: Array.from({ length: count2 }).map((_, i) => {
|
|
976
|
+
const active = i === index;
|
|
977
|
+
const dotClass = cn(
|
|
978
|
+
"rounded-full transition-all duration-200",
|
|
979
|
+
active ? cn("h-2 w-5 shadow-sm", toneClasses[tone]) : "h-2 w-2 bg-white/25",
|
|
980
|
+
interactive && "cursor-pointer hover:bg-white/40"
|
|
981
|
+
);
|
|
982
|
+
const Tag = interactive ? "button" : "span";
|
|
983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
984
|
+
Tag,
|
|
985
|
+
{
|
|
986
|
+
type: interactive ? "button" : void 0,
|
|
987
|
+
role: "tab",
|
|
988
|
+
"aria-selected": active,
|
|
989
|
+
"aria-label": `Page ${i + 1} of ${count2}`,
|
|
990
|
+
onClick: interactive ? () => onSelect(i) : void 0,
|
|
991
|
+
className: dotClass
|
|
992
|
+
},
|
|
993
|
+
i
|
|
994
|
+
);
|
|
995
|
+
})
|
|
996
|
+
}
|
|
997
|
+
);
|
|
998
|
+
}
|
|
999
|
+
);
|
|
1000
|
+
DotPagination.displayName = "DotPagination";
|
|
1001
|
+
|
|
1002
|
+
// src/web/components/status-badge.tsx
|
|
1003
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
952
1004
|
function StatusBadge({ status, className }) {
|
|
953
1005
|
const config = {
|
|
954
1006
|
success: {
|
|
@@ -988,7 +1040,7 @@ function StatusBadge({ status, className }) {
|
|
|
988
1040
|
}
|
|
989
1041
|
};
|
|
990
1042
|
const { color, bg, border, icon, label } = config[status];
|
|
991
|
-
return /* @__PURE__ */ (0,
|
|
1043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
992
1044
|
"div",
|
|
993
1045
|
{
|
|
994
1046
|
className: cn(
|
|
@@ -999,15 +1051,15 @@ function StatusBadge({ status, className }) {
|
|
|
999
1051
|
className
|
|
1000
1052
|
),
|
|
1001
1053
|
children: [
|
|
1002
|
-
/* @__PURE__ */ (0,
|
|
1003
|
-
/* @__PURE__ */ (0,
|
|
1054
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: icon }),
|
|
1055
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: label })
|
|
1004
1056
|
]
|
|
1005
1057
|
}
|
|
1006
1058
|
);
|
|
1007
1059
|
}
|
|
1008
1060
|
|
|
1009
1061
|
// src/web/components/network-badge.tsx
|
|
1010
|
-
var
|
|
1062
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1011
1063
|
var networkConfig = {
|
|
1012
1064
|
L1: {
|
|
1013
1065
|
color: "text-network-bitcoin-text",
|
|
@@ -1090,7 +1142,7 @@ function NetworkBadge({
|
|
|
1090
1142
|
const chipSize = size === "sm" ? "size-6" : "size-8";
|
|
1091
1143
|
const imageSize = size === "sm" ? "size-3.5" : "size-icon-lg";
|
|
1092
1144
|
if (!content) {
|
|
1093
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1094
1146
|
"span",
|
|
1095
1147
|
{
|
|
1096
1148
|
className: cn(
|
|
@@ -1099,7 +1151,7 @@ function NetworkBadge({
|
|
|
1099
1151
|
iconBg,
|
|
1100
1152
|
className
|
|
1101
1153
|
),
|
|
1102
|
-
children: /* @__PURE__ */ (0,
|
|
1154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1103
1155
|
"img",
|
|
1104
1156
|
{
|
|
1105
1157
|
src: icon,
|
|
@@ -1110,7 +1162,7 @@ function NetworkBadge({
|
|
|
1110
1162
|
}
|
|
1111
1163
|
);
|
|
1112
1164
|
}
|
|
1113
|
-
return /* @__PURE__ */ (0,
|
|
1165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1114
1166
|
"span",
|
|
1115
1167
|
{
|
|
1116
1168
|
className: cn(
|
|
@@ -1121,7 +1173,7 @@ function NetworkBadge({
|
|
|
1121
1173
|
className
|
|
1122
1174
|
),
|
|
1123
1175
|
children: [
|
|
1124
|
-
/* @__PURE__ */ (0,
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1125
1177
|
"img",
|
|
1126
1178
|
{
|
|
1127
1179
|
src: icon,
|
|
@@ -1177,7 +1229,7 @@ function useAssetIcon(ticker, cdnBaseUrl) {
|
|
|
1177
1229
|
}
|
|
1178
1230
|
|
|
1179
1231
|
// src/web/components/asset-icon.tsx
|
|
1180
|
-
var
|
|
1232
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1181
1233
|
var ASSET_COLORS = {
|
|
1182
1234
|
BTC: "bg-transparent",
|
|
1183
1235
|
ETH: "bg-asset-eth",
|
|
@@ -1204,7 +1256,7 @@ function AssetIcon({ ticker, logoUri, cdnBaseUrl, size = 40, className }) {
|
|
|
1204
1256
|
const iconUrl = logoUri ? logoUri : localIcon ? localIcon : failed ? null : useFallback || !cdnUrl ? fallbackUrl || null : cdnUrl || fallbackUrl || null;
|
|
1205
1257
|
const bgColor = ASSET_COLORS[normTicker] || "bg-secondary";
|
|
1206
1258
|
if (iconUrl) {
|
|
1207
|
-
return /* @__PURE__ */ (0,
|
|
1259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1208
1260
|
"div",
|
|
1209
1261
|
{
|
|
1210
1262
|
className: cn(
|
|
@@ -1213,7 +1265,7 @@ function AssetIcon({ ticker, logoUri, cdnBaseUrl, size = 40, className }) {
|
|
|
1213
1265
|
className
|
|
1214
1266
|
),
|
|
1215
1267
|
style: { width: size, height: size },
|
|
1216
|
-
children: /* @__PURE__ */ (0,
|
|
1268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1217
1269
|
"img",
|
|
1218
1270
|
{
|
|
1219
1271
|
src: iconUrl,
|
|
@@ -1239,7 +1291,7 @@ function AssetIcon({ ticker, logoUri, cdnBaseUrl, size = 40, className }) {
|
|
|
1239
1291
|
}
|
|
1240
1292
|
);
|
|
1241
1293
|
}
|
|
1242
|
-
return /* @__PURE__ */ (0,
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1243
1295
|
"div",
|
|
1244
1296
|
{
|
|
1245
1297
|
className: cn(
|
|
@@ -1255,7 +1307,7 @@ function AssetIcon({ ticker, logoUri, cdnBaseUrl, size = 40, className }) {
|
|
|
1255
1307
|
|
|
1256
1308
|
// src/web/components/asset-card.tsx
|
|
1257
1309
|
var import_react4 = require("react");
|
|
1258
|
-
var
|
|
1310
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1259
1311
|
function AssetCard({
|
|
1260
1312
|
ticker,
|
|
1261
1313
|
name,
|
|
@@ -1270,7 +1322,7 @@ function AssetCard({
|
|
|
1270
1322
|
const shown = balanceVisible ? displayBalance : "\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
1271
1323
|
const [hovered, setHovered] = (0, import_react4.useState)(false);
|
|
1272
1324
|
const gradientStyle = accentColor ? { background: `linear-gradient(135deg, var(--card) 30%, ${accentColor}${hovered ? "77" : "55"} 75%, ${accentColor}${hovered ? "dd" : "b3"} 100%)`, transition: "background 0.3s ease" } : void 0;
|
|
1273
|
-
return /* @__PURE__ */ (0,
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1274
1326
|
"div",
|
|
1275
1327
|
{
|
|
1276
1328
|
className: cn(
|
|
@@ -1284,10 +1336,10 @@ function AssetCard({
|
|
|
1284
1336
|
onMouseEnter: () => setHovered(true),
|
|
1285
1337
|
onMouseLeave: () => setHovered(false),
|
|
1286
1338
|
children: [
|
|
1287
|
-
/* @__PURE__ */ (0,
|
|
1288
|
-
/* @__PURE__ */ (0,
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1290
|
-
/* @__PURE__ */ (0,
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-white/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none" }),
|
|
1340
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center justify-between relative z-10", children: [
|
|
1341
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1291
1343
|
AssetIcon,
|
|
1292
1344
|
{
|
|
1293
1345
|
ticker,
|
|
@@ -1296,8 +1348,8 @@ function AssetCard({
|
|
|
1296
1348
|
className: "group-hover:scale-105 transition-transform"
|
|
1297
1349
|
}
|
|
1298
1350
|
),
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
1300
|
-
/* @__PURE__ */ (0,
|
|
1351
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col", children: [
|
|
1352
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1301
1353
|
"span",
|
|
1302
1354
|
{
|
|
1303
1355
|
className: cn(
|
|
@@ -1307,12 +1359,12 @@ function AssetCard({
|
|
|
1307
1359
|
children: name
|
|
1308
1360
|
}
|
|
1309
1361
|
),
|
|
1310
|
-
/* @__PURE__ */ (0,
|
|
1362
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-wrap gap-1 mt-1", children: networks.map((network) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NetworkBadge, { network, showLabel: true, size: "sm" }, network)) })
|
|
1311
1363
|
] })
|
|
1312
1364
|
] }),
|
|
1313
|
-
/* @__PURE__ */ (0,
|
|
1314
|
-
/* @__PURE__ */ (0,
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1365
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "text-right", children: [
|
|
1366
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "font-bold text-lg tracking-tight text-foreground group-hover:opacity-90 transition-colors", children: shown }),
|
|
1367
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-tiny text-muted-foreground font-medium tracking-wide uppercase mt-0.5", children: ticker })
|
|
1316
1368
|
] })
|
|
1317
1369
|
] })
|
|
1318
1370
|
]
|
|
@@ -1321,7 +1373,7 @@ function AssetCard({
|
|
|
1321
1373
|
}
|
|
1322
1374
|
|
|
1323
1375
|
// src/web/components/transaction-card.tsx
|
|
1324
|
-
var
|
|
1376
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1325
1377
|
function TransactionCard({
|
|
1326
1378
|
direction,
|
|
1327
1379
|
status,
|
|
@@ -1354,7 +1406,7 @@ function TransactionCard({
|
|
|
1354
1406
|
failed: "text-danger",
|
|
1355
1407
|
error: "text-danger"
|
|
1356
1408
|
}[status] ?? "text-foreground";
|
|
1357
|
-
return /* @__PURE__ */ (0,
|
|
1409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1358
1410
|
"div",
|
|
1359
1411
|
{
|
|
1360
1412
|
className: cn(
|
|
@@ -1365,28 +1417,28 @@ function TransactionCard({
|
|
|
1365
1417
|
),
|
|
1366
1418
|
onClick,
|
|
1367
1419
|
children: [
|
|
1368
|
-
/* @__PURE__ */ (0,
|
|
1369
|
-
/* @__PURE__ */ (0,
|
|
1370
|
-
/* @__PURE__ */ (0,
|
|
1420
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-white/5 to-transparent opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none" }),
|
|
1421
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-3 relative z-10", children: [
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1371
1423
|
"div",
|
|
1372
1424
|
{
|
|
1373
1425
|
className: cn(
|
|
1374
1426
|
"size-11 rounded-full flex items-center justify-center shadow-inner group-hover:scale-105 transition-transform",
|
|
1375
1427
|
iconStyle
|
|
1376
1428
|
),
|
|
1377
|
-
children: /* @__PURE__ */ (0,
|
|
1429
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "material-symbols-outlined text-icon-xl", children: isInbound ? "arrow_downward" : "arrow_outward" })
|
|
1378
1430
|
}
|
|
1379
1431
|
),
|
|
1380
|
-
/* @__PURE__ */ (0,
|
|
1381
|
-
/* @__PURE__ */ (0,
|
|
1382
|
-
/* @__PURE__ */ (0,
|
|
1383
|
-
/* @__PURE__ */ (0,
|
|
1384
|
-
/* @__PURE__ */ (0,
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col", children: [
|
|
1433
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "font-bold text-sm tracking-wide text-foreground", children: isInbound ? "Received" : "Sent" }),
|
|
1434
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-2 mt-1", children: [
|
|
1435
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(StatusBadge, { status }),
|
|
1436
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-tiny text-muted-foreground font-medium tracking-wide", children: formatDate(timestamp) })
|
|
1385
1437
|
] })
|
|
1386
1438
|
] })
|
|
1387
1439
|
] }),
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1389
|
-
/* @__PURE__ */ (0,
|
|
1440
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "text-right relative z-10", children: [
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1390
1442
|
"p",
|
|
1391
1443
|
{
|
|
1392
1444
|
className: cn(
|
|
@@ -1399,7 +1451,7 @@ function TransactionCard({
|
|
|
1399
1451
|
]
|
|
1400
1452
|
}
|
|
1401
1453
|
),
|
|
1402
|
-
/* @__PURE__ */ (0,
|
|
1454
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-tiny text-muted-foreground font-medium tracking-wide uppercase mt-0.5", children: unit })
|
|
1403
1455
|
] })
|
|
1404
1456
|
]
|
|
1405
1457
|
}
|
|
@@ -1407,7 +1459,7 @@ function TransactionCard({
|
|
|
1407
1459
|
}
|
|
1408
1460
|
|
|
1409
1461
|
// src/web/components/app-icon.tsx
|
|
1410
|
-
var
|
|
1462
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1411
1463
|
var APP_ICON_NAMES = {
|
|
1412
1464
|
activity: "history",
|
|
1413
1465
|
bitcoin: "currency_bitcoin",
|
|
@@ -1436,12 +1488,12 @@ var APP_ICON_NAMES = {
|
|
|
1436
1488
|
arkadeLayers: "layers"
|
|
1437
1489
|
};
|
|
1438
1490
|
function AppIcon({ name, strokeWidth: _strokeWidth, ...props }) {
|
|
1439
|
-
return /* @__PURE__ */ (0,
|
|
1491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon2, { name: APP_ICON_NAMES[name], ...props });
|
|
1440
1492
|
}
|
|
1441
1493
|
|
|
1442
1494
|
// src/web/components/scroll-area.tsx
|
|
1443
1495
|
var import_react5 = require("react");
|
|
1444
|
-
var
|
|
1496
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1445
1497
|
var useIsomorphicLayoutEffect = typeof window === "undefined" ? import_react5.useEffect : import_react5.useLayoutEffect;
|
|
1446
1498
|
function readPxToken(name, fallback) {
|
|
1447
1499
|
if (typeof window === "undefined") return fallback;
|
|
@@ -1535,8 +1587,8 @@ function ScrollArea({
|
|
|
1535
1587
|
resizeObserver.disconnect();
|
|
1536
1588
|
};
|
|
1537
1589
|
}, [updateThumb]);
|
|
1538
|
-
return /* @__PURE__ */ (0,
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("relative min-h-0 overflow-hidden", className), ...props, children: [
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1540
1592
|
Viewport3,
|
|
1541
1593
|
{
|
|
1542
1594
|
ref: viewportRef,
|
|
@@ -1544,7 +1596,7 @@ function ScrollArea({
|
|
|
1544
1596
|
children
|
|
1545
1597
|
}
|
|
1546
1598
|
),
|
|
1547
|
-
thumb.visible && /* @__PURE__ */ (0,
|
|
1599
|
+
thumb.visible && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1548
1600
|
"div",
|
|
1549
1601
|
{
|
|
1550
1602
|
"aria-hidden": true,
|
|
@@ -1554,7 +1606,7 @@ function ScrollArea({
|
|
|
1554
1606
|
onPointerLeave: () => setIsHoveringThumb(false),
|
|
1555
1607
|
onPointerDown: handleTrackPointerDown,
|
|
1556
1608
|
style: { zIndex: "var(--z-scrollbar)" },
|
|
1557
|
-
children: /* @__PURE__ */ (0,
|
|
1609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1558
1610
|
"div",
|
|
1559
1611
|
{
|
|
1560
1612
|
className: cn(
|
|
@@ -1579,7 +1631,7 @@ function ScrollArea({
|
|
|
1579
1631
|
}
|
|
1580
1632
|
|
|
1581
1633
|
// src/web/components/network-status-chip.tsx
|
|
1582
|
-
var
|
|
1634
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1583
1635
|
function NetworkStatusChip({
|
|
1584
1636
|
icon,
|
|
1585
1637
|
dotClassName,
|
|
@@ -1587,7 +1639,7 @@ function NetworkStatusChip({
|
|
|
1587
1639
|
ariaLabel,
|
|
1588
1640
|
className
|
|
1589
1641
|
}) {
|
|
1590
|
-
return /* @__PURE__ */ (0,
|
|
1642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1591
1643
|
"button",
|
|
1592
1644
|
{
|
|
1593
1645
|
type: "button",
|
|
@@ -1599,20 +1651,20 @@ function NetworkStatusChip({
|
|
|
1599
1651
|
className
|
|
1600
1652
|
),
|
|
1601
1653
|
children: [
|
|
1602
|
-
/* @__PURE__ */ (0,
|
|
1603
|
-
dotClassName && /* @__PURE__ */ (0,
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "shrink-0", children: icon }),
|
|
1655
|
+
dotClassName && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: cn("size-2 rounded-full", dotClassName) })
|
|
1604
1656
|
]
|
|
1605
1657
|
}
|
|
1606
1658
|
);
|
|
1607
1659
|
}
|
|
1608
1660
|
|
|
1609
1661
|
// src/web/components/network-icon.tsx
|
|
1610
|
-
var
|
|
1662
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1611
1663
|
function LightningNetworkIcon({
|
|
1612
1664
|
className = "size-3.5",
|
|
1613
1665
|
alt = "Lightning"
|
|
1614
1666
|
}) {
|
|
1615
|
-
return /* @__PURE__ */ (0,
|
|
1667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1616
1668
|
"img",
|
|
1617
1669
|
{
|
|
1618
1670
|
src: "/icons/lightning/lightning.svg",
|
|
@@ -1622,7 +1674,7 @@ function LightningNetworkIcon({
|
|
|
1622
1674
|
);
|
|
1623
1675
|
}
|
|
1624
1676
|
function SparkNetworkIcon({ className = "size-3.5", alt = "Spark" }) {
|
|
1625
|
-
return /* @__PURE__ */ (0,
|
|
1677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1626
1678
|
"img",
|
|
1627
1679
|
{
|
|
1628
1680
|
src: "/icons/spark/Asterisk/Spark Asterisk White.svg",
|
|
@@ -1635,7 +1687,7 @@ function ArkadeNetworkIcon({
|
|
|
1635
1687
|
className = "size-3.5 rounded-sm",
|
|
1636
1688
|
alt = "Arkade"
|
|
1637
1689
|
}) {
|
|
1638
|
-
return /* @__PURE__ */ (0,
|
|
1690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1639
1691
|
"img",
|
|
1640
1692
|
{
|
|
1641
1693
|
src: "/icons/arkade/arkade-icon.svg",
|
|
@@ -1646,7 +1698,7 @@ function ArkadeNetworkIcon({
|
|
|
1646
1698
|
}
|
|
1647
1699
|
|
|
1648
1700
|
// src/web/components/action-tile.tsx
|
|
1649
|
-
var
|
|
1701
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1650
1702
|
function ActionTile({
|
|
1651
1703
|
icon,
|
|
1652
1704
|
label,
|
|
@@ -1656,7 +1708,7 @@ function ActionTile({
|
|
|
1656
1708
|
ariaLabel,
|
|
1657
1709
|
"data-testid": dataTestId
|
|
1658
1710
|
}) {
|
|
1659
|
-
return /* @__PURE__ */ (0,
|
|
1711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1660
1712
|
"button",
|
|
1661
1713
|
{
|
|
1662
1714
|
type: "button",
|
|
@@ -1672,8 +1724,8 @@ function ActionTile({
|
|
|
1672
1724
|
className
|
|
1673
1725
|
),
|
|
1674
1726
|
children: [
|
|
1675
|
-
/* @__PURE__ */ (0,
|
|
1676
|
-
/* @__PURE__ */ (0,
|
|
1727
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "flex shrink-0 items-center justify-center text-current leading-none [&_.material-symbols-outlined]:text-icon-lg [&_.material-symbols-outlined]:leading-none", children: icon }),
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate text-tiny font-semibold tracking-wide", children: label })
|
|
1677
1729
|
]
|
|
1678
1730
|
}
|
|
1679
1731
|
);
|
|
@@ -1682,7 +1734,7 @@ function ActionTile({
|
|
|
1682
1734
|
// src/web/components/qr-code.tsx
|
|
1683
1735
|
var import_react6 = require("react");
|
|
1684
1736
|
var import_qr = __toESM(require("qr"), 1);
|
|
1685
|
-
var
|
|
1737
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1686
1738
|
function isFinderPattern(row, col, size) {
|
|
1687
1739
|
if (row < 7 && col < 7) return true;
|
|
1688
1740
|
if (row < 7 && col >= size - 7) return true;
|
|
@@ -1697,7 +1749,7 @@ function isLogoZone(row, col, size, logoModules) {
|
|
|
1697
1749
|
function renderFinderPattern(originX, originY, moduleSize, fg, bg, key) {
|
|
1698
1750
|
const r = moduleSize * 0.6;
|
|
1699
1751
|
return [
|
|
1700
|
-
/* @__PURE__ */ (0,
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1701
1753
|
"rect",
|
|
1702
1754
|
{
|
|
1703
1755
|
x: originX,
|
|
@@ -1710,7 +1762,7 @@ function renderFinderPattern(originX, originY, moduleSize, fg, bg, key) {
|
|
|
1710
1762
|
},
|
|
1711
1763
|
`${key}-o`
|
|
1712
1764
|
),
|
|
1713
|
-
/* @__PURE__ */ (0,
|
|
1765
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1714
1766
|
"rect",
|
|
1715
1767
|
{
|
|
1716
1768
|
x: originX + moduleSize,
|
|
@@ -1723,7 +1775,7 @@ function renderFinderPattern(originX, originY, moduleSize, fg, bg, key) {
|
|
|
1723
1775
|
},
|
|
1724
1776
|
`${key}-i`
|
|
1725
1777
|
),
|
|
1726
|
-
/* @__PURE__ */ (0,
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1727
1779
|
"rect",
|
|
1728
1780
|
{
|
|
1729
1781
|
x: originX + moduleSize * 2,
|
|
@@ -1739,18 +1791,18 @@ function renderFinderPattern(originX, originY, moduleSize, fg, bg, key) {
|
|
|
1739
1791
|
];
|
|
1740
1792
|
}
|
|
1741
1793
|
var LOGO_VIEWBOX = 412;
|
|
1742
|
-
var LOGO_PATHS = /* @__PURE__ */ (0,
|
|
1743
|
-
/* @__PURE__ */ (0,
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
1745
|
-
/* @__PURE__ */ (0,
|
|
1746
|
-
/* @__PURE__ */ (0,
|
|
1794
|
+
var LOGO_PATHS = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1795
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M137.306 411.865H0.000244141L68.6795 343.29L137.306 411.865Z", fill: "#6F32FF" }),
|
|
1796
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M0 0H137.306L68.6267 68.574L0 0Z", fill: "#6F32FF" }),
|
|
1797
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M137.148 274.559H274.455L411.708 411.866H274.401L137.148 274.559Z", fill: "#17B581" }),
|
|
1798
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1747
1799
|
"path",
|
|
1748
1800
|
{
|
|
1749
1801
|
d: "M137.149 274.559L68.6274 205.933L137.201 137.306L274.455 137.411L205.776 206.038L274.456 274.559H137.149Z",
|
|
1750
1802
|
fill: "#15E99A"
|
|
1751
1803
|
}
|
|
1752
1804
|
),
|
|
1753
|
-
/* @__PURE__ */ (0,
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { d: "M274.479 0.104797H411.786L274.533 137.411H137.226L274.479 0.104797Z", fill: "#17B581" })
|
|
1754
1806
|
] });
|
|
1755
1807
|
function QrCode({ value, size = 160, className }) {
|
|
1756
1808
|
const svgContent = (0, import_react6.useMemo)(() => {
|
|
@@ -1773,7 +1825,7 @@ function QrCode({ value, size = 160, className }) {
|
|
|
1773
1825
|
if (!matrix[row][col]) continue;
|
|
1774
1826
|
const cx = quietZone + col * moduleSize + moduleSize / 2;
|
|
1775
1827
|
const cy = quietZone + row * moduleSize + moduleSize / 2;
|
|
1776
|
-
elements.push(/* @__PURE__ */ (0,
|
|
1828
|
+
elements.push(/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx, cy, r: dotRadius, fill: fg }, `d-${row}-${col}`));
|
|
1777
1829
|
}
|
|
1778
1830
|
}
|
|
1779
1831
|
const finderPositions = [
|
|
@@ -1796,15 +1848,15 @@ function QrCode({ value, size = 160, className }) {
|
|
|
1796
1848
|
const centerX = quietZone + n * moduleSize / 2;
|
|
1797
1849
|
const centerY = quietZone + n * moduleSize / 2;
|
|
1798
1850
|
const logoCircleR = logoZoneSize * moduleSize * 0.52;
|
|
1799
|
-
elements.push(/* @__PURE__ */ (0,
|
|
1851
|
+
elements.push(/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: centerX, cy: centerY, r: logoCircleR, fill: bg }, "logo-bg"));
|
|
1800
1852
|
const logoBox = logoCircleR * 1.35;
|
|
1801
1853
|
const logoX = centerX - logoBox / 2;
|
|
1802
1854
|
const logoY = centerY - logoBox / 2;
|
|
1803
1855
|
const scale = logoBox / LOGO_VIEWBOX;
|
|
1804
1856
|
elements.push(
|
|
1805
|
-
/* @__PURE__ */ (0,
|
|
1857
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("g", { transform: `translate(${logoX}, ${logoY}) scale(${scale})`, children: LOGO_PATHS }, "logo")
|
|
1806
1858
|
);
|
|
1807
|
-
return /* @__PURE__ */ (0,
|
|
1859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1808
1860
|
"svg",
|
|
1809
1861
|
{
|
|
1810
1862
|
viewBox: `0 0 ${svgSize} ${svgSize}`,
|
|
@@ -1816,11 +1868,11 @@ function QrCode({ value, size = 160, className }) {
|
|
|
1816
1868
|
}
|
|
1817
1869
|
);
|
|
1818
1870
|
}, [value]);
|
|
1819
|
-
return /* @__PURE__ */ (0,
|
|
1871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className, style: { width: size, height: size }, children: svgContent });
|
|
1820
1872
|
}
|
|
1821
1873
|
|
|
1822
1874
|
// src/web/components/bottom-nav.tsx
|
|
1823
|
-
var
|
|
1875
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1824
1876
|
function BottomNav({
|
|
1825
1877
|
activeView,
|
|
1826
1878
|
items,
|
|
@@ -1828,7 +1880,7 @@ function BottomNav({
|
|
|
1828
1880
|
position = "fixed",
|
|
1829
1881
|
className
|
|
1830
1882
|
}) {
|
|
1831
|
-
return /* @__PURE__ */ (0,
|
|
1883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1832
1884
|
"nav",
|
|
1833
1885
|
{
|
|
1834
1886
|
className: cn(
|
|
@@ -1836,9 +1888,9 @@ function BottomNav({
|
|
|
1836
1888
|
position === "fixed" ? "fixed bottom-6 left-1/2 z-[var(--z-nav)] -translate-x-1/2" : "relative",
|
|
1837
1889
|
className
|
|
1838
1890
|
),
|
|
1839
|
-
children: /* @__PURE__ */ (0,
|
|
1891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center justify-around px-0 py-2", children: items.map(({ id, label, icon, iconName, testId }) => {
|
|
1840
1892
|
const isActive = activeView === id;
|
|
1841
|
-
return /* @__PURE__ */ (0,
|
|
1893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1842
1894
|
"button",
|
|
1843
1895
|
{
|
|
1844
1896
|
type: "button",
|
|
@@ -1849,8 +1901,8 @@ function BottomNav({
|
|
|
1849
1901
|
isActive ? "bg-white/10 text-primary" : "text-muted-foreground hover:text-white/75 active:scale-95"
|
|
1850
1902
|
),
|
|
1851
1903
|
children: [
|
|
1852
|
-
icon ?? (iconName ? /* @__PURE__ */ (0,
|
|
1853
|
-
/* @__PURE__ */ (0,
|
|
1904
|
+
icon ?? (iconName ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon2, { name: iconName, className: "text-icon-xl" }) : null),
|
|
1905
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "mt-0.5 text-xxs font-semibold transition-colors duration-300", children: label })
|
|
1854
1906
|
]
|
|
1855
1907
|
},
|
|
1856
1908
|
id
|
|
@@ -1862,15 +1914,15 @@ function BottomNav({
|
|
|
1862
1914
|
|
|
1863
1915
|
// src/web/components/account-status-tabs.tsx
|
|
1864
1916
|
var import_react7 = require("react");
|
|
1865
|
-
var
|
|
1917
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1866
1918
|
function AccountStatusTabs({
|
|
1867
1919
|
accounts
|
|
1868
1920
|
}) {
|
|
1869
1921
|
const [selectedAccountId, setSelectedAccountId] = (0, import_react7.useState)(null);
|
|
1870
1922
|
const selectedAccount = selectedAccountId ? accounts.find((account) => account.id === selectedAccountId) : null;
|
|
1871
|
-
return /* @__PURE__ */ (0,
|
|
1872
|
-
/* @__PURE__ */ (0,
|
|
1873
|
-
/* @__PURE__ */ (0,
|
|
1923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex max-w-full items-center justify-end overflow-x-auto no-scrollbar pl-3", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex items-center gap-1 px-1", children: accounts.map((account) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "group relative shrink-0", children: [
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1874
1926
|
NetworkStatusChip,
|
|
1875
1927
|
{
|
|
1876
1928
|
onClick: () => setSelectedAccountId(account.id),
|
|
@@ -1879,27 +1931,27 @@ function AccountStatusTabs({
|
|
|
1879
1931
|
ariaLabel: `Open ${account.title} details`
|
|
1880
1932
|
}
|
|
1881
1933
|
),
|
|
1882
|
-
/* @__PURE__ */ (0,
|
|
1934
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1883
1935
|
"div",
|
|
1884
1936
|
{
|
|
1885
1937
|
className: cn(
|
|
1886
1938
|
"pointer-events-none absolute bottom-[calc(100%+12px)] right-0 z-20 hidden w-64 rounded-2xl border bg-popover/95 p-3.5 opacity-0 shadow-2xl backdrop-blur-xl transition-all duration-150 group-hover:opacity-100 md:block"
|
|
1887
1939
|
),
|
|
1888
1940
|
children: [
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
1890
|
-
/* @__PURE__ */ (0,
|
|
1891
|
-
/* @__PURE__ */ (0,
|
|
1892
|
-
/* @__PURE__ */ (0,
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "shrink-0", children: account.icon }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0", children: [
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-xxs font-black uppercase tracking-[0.18em] text-white/55", children: account.label }),
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: cn("size-2 rounded-full", account.dotTone) })
|
|
1895
1947
|
] }),
|
|
1896
|
-
/* @__PURE__ */ (0,
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
1948
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-sm font-semibold text-white/90", children: account.title }),
|
|
1949
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-xs font-medium text-white/45", children: account.state })
|
|
1898
1950
|
] })
|
|
1899
1951
|
] }),
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
1901
|
-
/* @__PURE__ */ (0,
|
|
1902
|
-
/* @__PURE__ */ (0,
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-3 text-xs leading-relaxed text-white/60", children: account.detail }),
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-2 text-xs leading-relaxed text-white/45", children: account.description }),
|
|
1954
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-3 flex flex-wrap gap-1.5", children: account.capabilityBullets.map((capability) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1903
1955
|
"span",
|
|
1904
1956
|
{
|
|
1905
1957
|
className: "rounded-full border bg-white/[0.05] px-2 py-1 text-xxs font-medium text-white/60",
|
|
@@ -1911,14 +1963,14 @@ function AccountStatusTabs({
|
|
|
1911
1963
|
}
|
|
1912
1964
|
)
|
|
1913
1965
|
] }, account.id)) }) }),
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1966
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1915
1967
|
Dialog,
|
|
1916
1968
|
{
|
|
1917
1969
|
open: selectedAccountId !== null,
|
|
1918
1970
|
onOpenChange: (open) => !open && setSelectedAccountId(null),
|
|
1919
|
-
children: selectedAccount && /* @__PURE__ */ (0,
|
|
1920
|
-
/* @__PURE__ */ (0,
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1971
|
+
children: selectedAccount && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogContent, { className: "max-w-md border bg-popover p-0 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "p-6", children: [
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogHeader, { className: "text-left", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1922
1974
|
"div",
|
|
1923
1975
|
{
|
|
1924
1976
|
className: cn(
|
|
@@ -1929,17 +1981,17 @@ function AccountStatusTabs({
|
|
|
1929
1981
|
children: selectedAccount.icon
|
|
1930
1982
|
}
|
|
1931
1983
|
),
|
|
1932
|
-
/* @__PURE__ */ (0,
|
|
1933
|
-
/* @__PURE__ */ (0,
|
|
1934
|
-
/* @__PURE__ */ (0,
|
|
1935
|
-
/* @__PURE__ */ (0,
|
|
1984
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0", children: [
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-xxs font-black uppercase tracking-[0.18em] text-muted-foreground", children: selectedAccount.label }),
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: cn("size-2 rounded-full", selectedAccount.dotTone) })
|
|
1936
1988
|
] }),
|
|
1937
|
-
/* @__PURE__ */ (0,
|
|
1938
|
-
/* @__PURE__ */ (0,
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "mt-1 text-xl font-bold text-white", children: selectedAccount.title }),
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogDescription, { className: "mt-2 text-sm leading-relaxed text-white/60", children: selectedAccount.description })
|
|
1939
1991
|
] })
|
|
1940
1992
|
] }) }),
|
|
1941
|
-
/* @__PURE__ */ (0,
|
|
1942
|
-
/* @__PURE__ */ (0,
|
|
1993
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mt-5 grid grid-cols-2 gap-3", children: [
|
|
1994
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1943
1995
|
"div",
|
|
1944
1996
|
{
|
|
1945
1997
|
className: cn(
|
|
@@ -1947,20 +1999,20 @@ function AccountStatusTabs({
|
|
|
1947
1999
|
selectedAccount.networkBannerClassName
|
|
1948
2000
|
),
|
|
1949
2001
|
children: [
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
2002
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em]", children: "Network" }),
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-sm font-semibold", children: selectedAccount.networkLabel })
|
|
1952
2004
|
]
|
|
1953
2005
|
}
|
|
1954
2006
|
),
|
|
1955
|
-
/* @__PURE__ */ (0,
|
|
1956
|
-
/* @__PURE__ */ (0,
|
|
1957
|
-
/* @__PURE__ */ (0,
|
|
2007
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "rounded-2xl border bg-white/[0.04] px-4 py-3", children: [
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em] text-white/45", children: "Status" }),
|
|
2009
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-sm font-semibold text-white/90", children: selectedAccount.state })
|
|
1958
2010
|
] })
|
|
1959
2011
|
] }),
|
|
1960
|
-
/* @__PURE__ */ (0,
|
|
1961
|
-
/* @__PURE__ */ (0,
|
|
1962
|
-
/* @__PURE__ */ (0,
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
2012
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-5 text-sm leading-relaxed text-muted-foreground", children: selectedAccount.detail }),
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mt-5", children: [
|
|
2014
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em] text-white/45", children: "Capabilities" }),
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-3 flex flex-wrap gap-2", children: selectedAccount.capabilityBullets.map((capability) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1964
2016
|
"span",
|
|
1965
2017
|
{
|
|
1966
2018
|
className: "rounded-full border bg-white/[0.05] px-2.5 py-1 text-xxs font-medium text-white/65",
|
|
@@ -1977,7 +2029,7 @@ function AccountStatusTabs({
|
|
|
1977
2029
|
|
|
1978
2030
|
// src/web/components/filter-dropdown.tsx
|
|
1979
2031
|
var import_react8 = require("react");
|
|
1980
|
-
var
|
|
2032
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1981
2033
|
function FilterDropdown({
|
|
1982
2034
|
label,
|
|
1983
2035
|
value,
|
|
@@ -1992,8 +2044,8 @@ function FilterDropdown({
|
|
|
1992
2044
|
const displayedCluster = specificOptions.slice(0, clusterMax);
|
|
1993
2045
|
const clusterOverflow = specificOptions.length - displayedCluster.length;
|
|
1994
2046
|
const isFiltered = value !== "all";
|
|
1995
|
-
return /* @__PURE__ */ (0,
|
|
1996
|
-
/* @__PURE__ */ (0,
|
|
2047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("relative flex-1", className), children: [
|
|
2048
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1997
2049
|
"button",
|
|
1998
2050
|
{
|
|
1999
2051
|
type: "button",
|
|
@@ -2003,7 +2055,7 @@ function FilterDropdown({
|
|
|
2003
2055
|
isFiltered ? "bg-white/[0.13] shadow-inner" : "bg-white/[0.09] backdrop-blur-md hover:bg-white/[0.13]"
|
|
2004
2056
|
),
|
|
2005
2057
|
children: [
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2058
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2007
2059
|
"span",
|
|
2008
2060
|
{
|
|
2009
2061
|
className: cn(
|
|
@@ -2013,17 +2065,17 @@ function FilterDropdown({
|
|
|
2013
2065
|
children: label
|
|
2014
2066
|
}
|
|
2015
2067
|
),
|
|
2016
|
-
/* @__PURE__ */ (0,
|
|
2017
|
-
/* @__PURE__ */ (0,
|
|
2018
|
-
clusterOverflow > 0 && /* @__PURE__ */ (0,
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex min-w-0 flex-1 items-center justify-center gap-1.5", children: value === "all" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex min-w-0 items-center justify-center", children: [
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex shrink-0 items-center -space-x-2", children: displayedCluster.map((option) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "inline-flex shrink-0 items-center justify-center", children: option.clusterIcon ?? option.icon }, option.id)) }),
|
|
2070
|
+
clusterOverflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "ml-1 text-xxs font-semibold leading-none text-muted-foreground", children: [
|
|
2019
2071
|
"+",
|
|
2020
2072
|
clusterOverflow
|
|
2021
2073
|
] })
|
|
2022
|
-
] }) : /* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2074
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex size-6 shrink-0 items-center justify-center", children: selected?.icon }),
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-tiny font-bold text-white", children: selected?.label })
|
|
2025
2077
|
] }) }),
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2078
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2027
2079
|
Icon2,
|
|
2028
2080
|
{
|
|
2029
2081
|
name: "expand_more",
|
|
@@ -2036,7 +2088,7 @@ function FilterDropdown({
|
|
|
2036
2088
|
]
|
|
2037
2089
|
}
|
|
2038
2090
|
),
|
|
2039
|
-
isOpen && /* @__PURE__ */ (0,
|
|
2091
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "absolute left-0 top-full z-50 mt-1.5 flex min-w-[140px] flex-col gap-0.5 rounded-2xl bg-popover/95 p-1.5 shadow-2xl backdrop-blur-xl", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2040
2092
|
"button",
|
|
2041
2093
|
{
|
|
2042
2094
|
type: "button",
|
|
@@ -2049,9 +2101,8 @@ function FilterDropdown({
|
|
|
2049
2101
|
value === option.id ? "bg-white/15 text-white shadow-sm" : "text-white/60 hover:bg-accent hover:text-white/90"
|
|
2050
2102
|
),
|
|
2051
2103
|
children: [
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2053
|
-
/* @__PURE__ */ (0,
|
|
2054
|
-
value === option.id && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "ml-auto size-1.5 rounded-full bg-primary" })
|
|
2104
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex size-6 shrink-0 items-center justify-center", children: option.icon }),
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: cn("text-xs", value === option.id ? "font-bold" : "font-medium"), children: option.label })
|
|
2055
2106
|
]
|
|
2056
2107
|
},
|
|
2057
2108
|
option.id
|
|
@@ -2060,35 +2111,35 @@ function FilterDropdown({
|
|
|
2060
2111
|
}
|
|
2061
2112
|
|
|
2062
2113
|
// src/web/components/settings-tile.tsx
|
|
2063
|
-
var
|
|
2114
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2064
2115
|
function SettingsTile({ icon, title, description, value, onClick }) {
|
|
2065
|
-
return /* @__PURE__ */ (0,
|
|
2116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2066
2117
|
"button",
|
|
2067
2118
|
{
|
|
2068
2119
|
type: "button",
|
|
2069
2120
|
onClick,
|
|
2070
2121
|
className: "w-full rounded-2xl bg-card p-5 text-left transition-all duration-200 hover:bg-accent active:scale-[0.98]",
|
|
2071
|
-
children: /* @__PURE__ */ (0,
|
|
2072
|
-
/* @__PURE__ */ (0,
|
|
2073
|
-
/* @__PURE__ */ (0,
|
|
2074
|
-
/* @__PURE__ */ (0,
|
|
2075
|
-
/* @__PURE__ */ (0,
|
|
2076
|
-
description && /* @__PURE__ */ (0,
|
|
2122
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
2123
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
2124
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted", children: icon }),
|
|
2125
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-bold text-body tracking-wide text-foreground", children: title }),
|
|
2127
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "mt-0.5 text-sm font-medium text-muted-foreground", children: description })
|
|
2077
2128
|
] })
|
|
2078
2129
|
] }),
|
|
2079
|
-
/* @__PURE__ */ (0,
|
|
2080
|
-
value && /* @__PURE__ */ (0,
|
|
2081
|
-
/* @__PURE__ */ (0,
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
2131
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-mono text-xs text-muted-foreground", children: value }),
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppIcon, { name: "chevronRight", className: "size-4 text-muted-foreground" })
|
|
2082
2133
|
] })
|
|
2083
2134
|
] })
|
|
2084
2135
|
}
|
|
2085
2136
|
);
|
|
2086
2137
|
}
|
|
2087
2138
|
function SettingsStatusPanel({ label, value }) {
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "rounded-xl bg-white/[0.03] px-4 py-3 text-xs text-muted-foreground", children: [
|
|
2089
2140
|
label,
|
|
2090
2141
|
": ",
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2142
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold text-white", children: value })
|
|
2092
2143
|
] });
|
|
2093
2144
|
}
|
|
2094
2145
|
function SettingsActionButton({
|
|
@@ -2096,7 +2147,7 @@ function SettingsActionButton({
|
|
|
2096
2147
|
children,
|
|
2097
2148
|
onClick
|
|
2098
2149
|
}) {
|
|
2099
|
-
return /* @__PURE__ */ (0,
|
|
2150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2100
2151
|
"button",
|
|
2101
2152
|
{
|
|
2102
2153
|
type: "button",
|
|
@@ -2114,7 +2165,7 @@ function SettingsActionButton({
|
|
|
2114
2165
|
var import_react9 = require("react");
|
|
2115
2166
|
|
|
2116
2167
|
// src/web/components/page-header.tsx
|
|
2117
|
-
var
|
|
2168
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2118
2169
|
function PageHeader({
|
|
2119
2170
|
left,
|
|
2120
2171
|
title,
|
|
@@ -2126,47 +2177,47 @@ function PageHeader({
|
|
|
2126
2177
|
backLabel = "Go back",
|
|
2127
2178
|
borderClassName
|
|
2128
2179
|
}) {
|
|
2129
|
-
const backButton = onBack ? /* @__PURE__ */ (0,
|
|
2180
|
+
const backButton = onBack ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2130
2181
|
"button",
|
|
2131
2182
|
{
|
|
2132
2183
|
type: "button",
|
|
2133
2184
|
onClick: onBack,
|
|
2134
2185
|
"aria-label": backLabel,
|
|
2135
2186
|
className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-surface-card text-muted-foreground shadow-inner transition-all hover:bg-accent hover:text-foreground active:scale-95",
|
|
2136
|
-
children: /* @__PURE__ */ (0,
|
|
2187
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon2, { name: "arrow_back", size: "lg" })
|
|
2137
2188
|
}
|
|
2138
2189
|
) : null;
|
|
2139
|
-
const resolvedLeft = backButton && left ? /* @__PURE__ */ (0,
|
|
2190
|
+
const resolvedLeft = backButton && left ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2140
2191
|
backButton,
|
|
2141
2192
|
left
|
|
2142
2193
|
] }) : backButton ?? left;
|
|
2143
|
-
const titleBlock = title ? /* @__PURE__ */ (0,
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2145
|
-
subtitle && /* @__PURE__ */ (0,
|
|
2194
|
+
const titleBlock = title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cn("min-w-0", titleAlign === "center" ? "max-w-xs text-center" : "text-left"), children: [
|
|
2195
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "truncate font-bold text-body text-foreground", children: title }),
|
|
2196
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mt-1 truncate text-xs text-muted-foreground", children: subtitle })
|
|
2146
2197
|
] }) : null;
|
|
2147
|
-
return /* @__PURE__ */ (0,
|
|
2198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("header", { className: cn(
|
|
2148
2199
|
"sticky top-0 z-[var(--z-header)] flex min-h-14 shrink-0 items-center bg-background px-4 py-2 shadow-header backdrop-blur-xl",
|
|
2149
2200
|
borderClassName && "border-b",
|
|
2150
2201
|
borderClassName,
|
|
2151
2202
|
className
|
|
2152
|
-
), children: title && titleAlign === "start" ? /* @__PURE__ */ (0,
|
|
2153
|
-
/* @__PURE__ */ (0,
|
|
2203
|
+
), children: title && titleAlign === "start" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
2204
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
2154
2205
|
resolvedLeft,
|
|
2155
2206
|
titleBlock
|
|
2156
2207
|
] }),
|
|
2157
|
-
/* @__PURE__ */ (0,
|
|
2158
|
-
] }) : title ? /* @__PURE__ */ (0,
|
|
2159
|
-
/* @__PURE__ */ (0,
|
|
2160
|
-
/* @__PURE__ */ (0,
|
|
2161
|
-
/* @__PURE__ */ (0,
|
|
2162
|
-
] }) : /* @__PURE__ */ (0,
|
|
2163
|
-
/* @__PURE__ */ (0,
|
|
2164
|
-
/* @__PURE__ */ (0,
|
|
2208
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ml-3 flex shrink-0 items-center justify-end gap-2", children: right })
|
|
2209
|
+
] }) : title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
2210
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex min-w-0 flex-1 items-center", children: resolvedLeft }),
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "shrink-0", children: titleBlock }),
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-2", children: right })
|
|
2213
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
2214
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex shrink-0 items-center", children: resolvedLeft }),
|
|
2215
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ml-auto flex min-w-0 items-center justify-end gap-2", children: right })
|
|
2165
2216
|
] }) });
|
|
2166
2217
|
}
|
|
2167
2218
|
|
|
2168
2219
|
// src/web/components/account-settings-shared.tsx
|
|
2169
|
-
var
|
|
2220
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2170
2221
|
var SUPPORTED_ACCOUNT_NETWORKS = {
|
|
2171
2222
|
RGB: ["regtest", "testnet", "signet"],
|
|
2172
2223
|
SPARK: ["regtest", "mainnet"],
|
|
@@ -2208,15 +2259,15 @@ function getAccountNetworkUi(network) {
|
|
|
2208
2259
|
}
|
|
2209
2260
|
function AccountHeaderIcons({ accountId }) {
|
|
2210
2261
|
if (accountId === "RGB") {
|
|
2211
|
-
return /* @__PURE__ */ (0,
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex -space-x-1", children: [
|
|
2263
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex size-10 items-center justify-center rounded-full bg-network-bitcoin/15 shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: "/icons/lightning/lightning.svg", alt: "Lightning", className: "size-5 object-contain" }) }),
|
|
2264
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex size-10 items-center justify-center rounded-full bg-primary/15 shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: "/icons/rgb/rgb-logo.svg", alt: "RGB", className: "size-5 object-contain" }) })
|
|
2214
2265
|
] });
|
|
2215
2266
|
}
|
|
2216
2267
|
if (accountId === "SPARK") {
|
|
2217
|
-
return /* @__PURE__ */ (0,
|
|
2268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex size-10 items-center justify-center rounded-full bg-info/10 shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: "/icons/spark/Asterisk/Spark Asterisk White.svg", alt: "Spark", className: "size-5 object-contain" }) });
|
|
2218
2269
|
}
|
|
2219
|
-
return /* @__PURE__ */ (0,
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "flex size-10 items-center justify-center rounded-full bg-network-arkade/10 shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("img", { src: "/icons/arkade/arkade-icon.svg", alt: "Arkade", className: "size-5 rounded-sm object-contain" }) });
|
|
2220
2271
|
}
|
|
2221
2272
|
function getAccountStatusUi(status) {
|
|
2222
2273
|
switch (status) {
|
|
@@ -2244,7 +2295,7 @@ function AccountNetworkSelector({
|
|
|
2244
2295
|
disabled = false
|
|
2245
2296
|
}) {
|
|
2246
2297
|
const networks = SUPPORTED_ACCOUNT_NETWORKS[accountId];
|
|
2247
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2248
2299
|
"div",
|
|
2249
2300
|
{
|
|
2250
2301
|
role: "radiogroup",
|
|
@@ -2256,7 +2307,7 @@ function AccountNetworkSelector({
|
|
|
2256
2307
|
children: networks.map((network) => {
|
|
2257
2308
|
const ui = getAccountNetworkUi(network);
|
|
2258
2309
|
const selected = value === network;
|
|
2259
|
-
return /* @__PURE__ */ (0,
|
|
2310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2260
2311
|
"button",
|
|
2261
2312
|
{
|
|
2262
2313
|
type: "button",
|
|
@@ -2296,8 +2347,8 @@ function AccountNetworkPicker({
|
|
|
2296
2347
|
setIsSaving(false);
|
|
2297
2348
|
}
|
|
2298
2349
|
};
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2300
|
-
/* @__PURE__ */ (0,
|
|
2350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-3", children: [
|
|
2351
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2301
2352
|
AccountNetworkSelector,
|
|
2302
2353
|
{
|
|
2303
2354
|
accountId,
|
|
@@ -2306,10 +2357,10 @@ function AccountNetworkPicker({
|
|
|
2306
2357
|
disabled: isSaving
|
|
2307
2358
|
}
|
|
2308
2359
|
),
|
|
2309
|
-
isDirty && /* @__PURE__ */ (0,
|
|
2310
|
-
/* @__PURE__ */ (0,
|
|
2360
|
+
isDirty && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Button, { variant: "cta", size: "sm", onClick: handleSave, disabled: isSaving, children: isSaving ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
2361
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-background/30 border-t-background" }),
|
|
2311
2362
|
"Reconnecting..."
|
|
2312
|
-
] }) : /* @__PURE__ */ (0,
|
|
2363
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
2313
2364
|
"Save - Switch to ",
|
|
2314
2365
|
getAccountNetworkLabel(draft)
|
|
2315
2366
|
] }) })
|
|
@@ -2321,31 +2372,31 @@ function AccountSettingsShell({
|
|
|
2321
2372
|
subtitle,
|
|
2322
2373
|
children
|
|
2323
2374
|
}) {
|
|
2324
|
-
return /* @__PURE__ */ (0,
|
|
2325
|
-
/* @__PURE__ */ (0,
|
|
2375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "min-h-screen bg-background pb-28 font-display text-foreground", children: [
|
|
2376
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2326
2377
|
PageHeader,
|
|
2327
2378
|
{
|
|
2328
2379
|
title,
|
|
2329
2380
|
subtitle,
|
|
2330
2381
|
titleAlign: "start",
|
|
2331
|
-
left: /* @__PURE__ */ (0,
|
|
2382
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountHeaderIcons, { accountId }),
|
|
2332
2383
|
className: "px-5 py-4"
|
|
2333
2384
|
}
|
|
2334
2385
|
),
|
|
2335
|
-
/* @__PURE__ */ (0,
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("main", { className: "space-y-6 px-5 py-6", children })
|
|
2336
2387
|
] });
|
|
2337
2388
|
}
|
|
2338
2389
|
function AccountInfoGrid({ items }) {
|
|
2339
|
-
return /* @__PURE__ */ (0,
|
|
2340
|
-
/* @__PURE__ */ (0,
|
|
2341
|
-
/* @__PURE__ */ (0,
|
|
2390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "grid gap-3 sm:grid-cols-2", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "rounded-xl bg-black/20 p-3 text-xs", children: [
|
|
2391
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-muted-foreground", children: item.label }),
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-1 break-all text-white/90", children: item.value })
|
|
2342
2393
|
] }, item.label)) });
|
|
2343
2394
|
}
|
|
2344
2395
|
function AccountNotice({
|
|
2345
2396
|
tone = "default",
|
|
2346
2397
|
children
|
|
2347
2398
|
}) {
|
|
2348
|
-
return /* @__PURE__ */ (0,
|
|
2399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2349
2400
|
"div",
|
|
2350
2401
|
{
|
|
2351
2402
|
className: cn(
|
|
@@ -2360,7 +2411,7 @@ function AccountNetworkNotice({
|
|
|
2360
2411
|
network,
|
|
2361
2412
|
children
|
|
2362
2413
|
}) {
|
|
2363
|
-
return /* @__PURE__ */ (0,
|
|
2414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("rounded-xl px-3 py-3 text-xs", getAccountNetworkUi(network).bannerClassName), children });
|
|
2364
2415
|
}
|
|
2365
2416
|
function AccountStatusPills({
|
|
2366
2417
|
status,
|
|
@@ -2368,8 +2419,8 @@ function AccountStatusPills({
|
|
|
2368
2419
|
}) {
|
|
2369
2420
|
const statusUi = getAccountStatusUi(status);
|
|
2370
2421
|
const networkUi = getAccountNetworkUi(network);
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
2372
|
-
/* @__PURE__ */ (0,
|
|
2422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2423
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2373
2424
|
"span",
|
|
2374
2425
|
{
|
|
2375
2426
|
className: cn(
|
|
@@ -2379,7 +2430,7 @@ function AccountStatusPills({
|
|
|
2379
2430
|
children: statusUi.label === "Ready" ? "Connected" : statusUi.label
|
|
2380
2431
|
}
|
|
2381
2432
|
),
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2433
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2383
2434
|
"span",
|
|
2384
2435
|
{
|
|
2385
2436
|
className: cn(
|
|
@@ -2392,7 +2443,7 @@ function AccountStatusPills({
|
|
|
2392
2443
|
] });
|
|
2393
2444
|
}
|
|
2394
2445
|
function SectionTitle({ children }) {
|
|
2395
|
-
return /* @__PURE__ */ (0,
|
|
2446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "text-xs font-bold uppercase tracking-wider text-muted-foreground", children });
|
|
2396
2447
|
}
|
|
2397
2448
|
function InlineAction({
|
|
2398
2449
|
title,
|
|
@@ -2401,7 +2452,7 @@ function InlineAction({
|
|
|
2401
2452
|
onClick
|
|
2402
2453
|
}) {
|
|
2403
2454
|
const className = accent === "purple" ? "bg-network-arkade/10 text-network-arkade hover:bg-network-arkade/15" : accent === "blue" ? "bg-info/10 text-info hover:bg-info/15" : "bg-primary/10 text-primary hover:bg-primary/15";
|
|
2404
|
-
return /* @__PURE__ */ (0,
|
|
2455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2405
2456
|
"button",
|
|
2406
2457
|
{
|
|
2407
2458
|
type: "button",
|
|
@@ -2411,11 +2462,11 @@ function InlineAction({
|
|
|
2411
2462
|
className
|
|
2412
2463
|
),
|
|
2413
2464
|
children: [
|
|
2414
|
-
/* @__PURE__ */ (0,
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2416
|
-
/* @__PURE__ */ (0,
|
|
2465
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2466
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-semibold text-white", children: title }),
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
2417
2468
|
] }),
|
|
2418
|
-
/* @__PURE__ */ (0,
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "material-symbols-outlined text-icon-lg", children: "chevron_right" })
|
|
2419
2470
|
]
|
|
2420
2471
|
}
|
|
2421
2472
|
);
|
|
@@ -2426,19 +2477,19 @@ function TransferRouteCard({
|
|
|
2426
2477
|
eta,
|
|
2427
2478
|
feeHint
|
|
2428
2479
|
}) {
|
|
2429
|
-
return /* @__PURE__ */ (0,
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2431
|
-
/* @__PURE__ */ (0,
|
|
2432
|
-
/* @__PURE__ */ (0,
|
|
2480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "rounded-2xl bg-card/60 p-4 shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
2481
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2482
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-bold text-white", children: label }),
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: summary })
|
|
2433
2484
|
] }),
|
|
2434
|
-
/* @__PURE__ */ (0,
|
|
2435
|
-
/* @__PURE__ */ (0,
|
|
2436
|
-
/* @__PURE__ */ (0,
|
|
2485
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "text-right", children: [
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xxs font-bold uppercase tracking-wider text-white/60", children: eta }),
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-tiny text-primary", children: feeHint })
|
|
2437
2488
|
] })
|
|
2438
2489
|
] }) });
|
|
2439
2490
|
}
|
|
2440
2491
|
function ExpandIcon({ expanded }) {
|
|
2441
|
-
return /* @__PURE__ */ (0,
|
|
2492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon2, { name: expanded ? "expand_less" : "expand_more", size: "md" });
|
|
2442
2493
|
}
|
|
2443
2494
|
function AccountSettingsRow({
|
|
2444
2495
|
accountId,
|
|
@@ -2448,23 +2499,23 @@ function AccountSettingsRow({
|
|
|
2448
2499
|
description,
|
|
2449
2500
|
onClick
|
|
2450
2501
|
}) {
|
|
2451
|
-
return /* @__PURE__ */ (0,
|
|
2502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2452
2503
|
"button",
|
|
2453
2504
|
{
|
|
2454
2505
|
type: "button",
|
|
2455
2506
|
onClick,
|
|
2456
2507
|
className: "w-full rounded-3xl bg-white/[0.03] p-4 text-left shadow-inner transition-colors hover:bg-white/[0.05]",
|
|
2457
|
-
children: /* @__PURE__ */ (0,
|
|
2458
|
-
/* @__PURE__ */ (0,
|
|
2459
|
-
/* @__PURE__ */ (0,
|
|
2460
|
-
/* @__PURE__ */ (0,
|
|
2461
|
-
/* @__PURE__ */ (0,
|
|
2462
|
-
/* @__PURE__ */ (0,
|
|
2463
|
-
/* @__PURE__ */ (0,
|
|
2508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountHeaderIcons, { accountId }),
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-bold text-white", children: title }),
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
2464
2515
|
] }),
|
|
2465
|
-
/* @__PURE__ */ (0,
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon2, { name: "chevron_right", size: "sm", className: "text-white/40" })
|
|
2466
2517
|
] }),
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-3", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountStatusPills, { status, network }) })
|
|
2468
2519
|
] })
|
|
2469
2520
|
] })
|
|
2470
2521
|
}
|
|
@@ -2472,7 +2523,7 @@ function AccountSettingsRow({
|
|
|
2472
2523
|
}
|
|
2473
2524
|
|
|
2474
2525
|
// src/web/components/account-capabilities-card.tsx
|
|
2475
|
-
var
|
|
2526
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2476
2527
|
function AccountCapabilitiesCard({
|
|
2477
2528
|
accountId,
|
|
2478
2529
|
title,
|
|
@@ -2486,8 +2537,8 @@ function AccountCapabilitiesCard({
|
|
|
2486
2537
|
children
|
|
2487
2538
|
}) {
|
|
2488
2539
|
const accentClasses = accent === "primary" ? "bg-primary/5 text-primary" : accent === "blue" ? "bg-info/5 text-info" : "bg-network-arkade/5 text-network-arkade";
|
|
2489
|
-
return /* @__PURE__ */ (0,
|
|
2490
|
-
/* @__PURE__ */ (0,
|
|
2540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "rounded-2xl bg-card/70 p-4 shadow-inner transition-all duration-300", children: [
|
|
2541
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2491
2542
|
"div",
|
|
2492
2543
|
{
|
|
2493
2544
|
className: cn(
|
|
@@ -2496,15 +2547,15 @@ function AccountCapabilitiesCard({
|
|
|
2496
2547
|
),
|
|
2497
2548
|
onClick: collapsible ? onToggle : void 0,
|
|
2498
2549
|
children: [
|
|
2499
|
-
/* @__PURE__ */ (0,
|
|
2500
|
-
/* @__PURE__ */ (0,
|
|
2501
|
-
/* @__PURE__ */ (0,
|
|
2502
|
-
/* @__PURE__ */ (0,
|
|
2503
|
-
/* @__PURE__ */ (0,
|
|
2550
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
2551
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccountHeaderIcons, { accountId }),
|
|
2552
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2553
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-sm font-bold text-white group-hover:text-white/90", children: title }),
|
|
2554
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
2504
2555
|
] })
|
|
2505
2556
|
] }),
|
|
2506
|
-
/* @__PURE__ */ (0,
|
|
2507
|
-
/* @__PURE__ */ (0,
|
|
2557
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col items-end gap-2", children: [
|
|
2558
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2508
2559
|
"span",
|
|
2509
2560
|
{
|
|
2510
2561
|
className: cn(
|
|
@@ -2514,75 +2565,76 @@ function AccountCapabilitiesCard({
|
|
|
2514
2565
|
children: status
|
|
2515
2566
|
}
|
|
2516
2567
|
),
|
|
2517
|
-
collapsible && /* @__PURE__ */ (0,
|
|
2568
|
+
collapsible && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mt-1 text-white/30 transition-colors group-hover:text-white/60", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon2, { name: isExpanded ? "expand_less" : "expand_more", size: "md" }) })
|
|
2518
2569
|
] })
|
|
2519
2570
|
]
|
|
2520
2571
|
}
|
|
2521
2572
|
),
|
|
2522
|
-
isExpanded && /* @__PURE__ */ (0,
|
|
2523
|
-
/* @__PURE__ */ (0,
|
|
2524
|
-
/* @__PURE__ */ (0,
|
|
2525
|
-
capabilities.map((capability) => /* @__PURE__ */ (0,
|
|
2526
|
-
/* @__PURE__ */ (0,
|
|
2527
|
-
/* @__PURE__ */ (0,
|
|
2573
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mt-5 duration-200 animate-in fade-in slide-in-from-top-2", children: [
|
|
2574
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mb-6 space-y-2", children: [
|
|
2575
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h4", { className: "mb-2 text-xxs font-bold uppercase tracking-wider text-muted-foreground", children: "Capabilities" }),
|
|
2576
|
+
capabilities.map((capability) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
2577
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "inline-block size-1.5 rounded-full bg-current opacity-80" }),
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: capability })
|
|
2528
2579
|
] }, capability))
|
|
2529
2580
|
] }),
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pt-5", children })
|
|
2531
2582
|
] })
|
|
2532
2583
|
] });
|
|
2533
2584
|
}
|
|
2534
2585
|
|
|
2535
2586
|
// src/web/components/wallet-asset-list.tsx
|
|
2536
|
-
var
|
|
2587
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2537
2588
|
function AssetSkeleton({ index }) {
|
|
2538
|
-
return /* @__PURE__ */ (0,
|
|
2589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2539
2590
|
"div",
|
|
2540
2591
|
{
|
|
2541
2592
|
className: "flex items-center justify-between rounded-card bg-white/[0.03] p-3 animate-pulse",
|
|
2542
2593
|
style: { animationDelay: `${index * 100}ms` },
|
|
2543
2594
|
children: [
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
2546
|
-
/* @__PURE__ */ (0,
|
|
2547
|
-
/* @__PURE__ */ (0,
|
|
2595
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative", children: [
|
|
2597
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "size-8 rounded-full bg-white/10" }),
|
|
2598
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute -bottom-1 -right-1 size-icon-md rounded-full bg-white/10" })
|
|
2548
2599
|
] }),
|
|
2549
|
-
/* @__PURE__ */ (0,
|
|
2550
|
-
/* @__PURE__ */ (0,
|
|
2551
|
-
/* @__PURE__ */ (0,
|
|
2600
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
2601
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-3.5 w-20 rounded bg-white/10" }),
|
|
2602
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-2.5 w-10 rounded bg-white/5" })
|
|
2552
2603
|
] })
|
|
2553
2604
|
] }),
|
|
2554
|
-
/* @__PURE__ */ (0,
|
|
2555
|
-
/* @__PURE__ */ (0,
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2605
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col items-end gap-1.5", children: [
|
|
2606
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-3.5 w-16 rounded bg-white/10" }),
|
|
2607
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-2.5 w-8 rounded bg-white/5" })
|
|
2557
2608
|
] })
|
|
2558
2609
|
]
|
|
2559
2610
|
}
|
|
2560
2611
|
);
|
|
2561
2612
|
}
|
|
2562
2613
|
function EmptyState({ state }) {
|
|
2563
|
-
return /* @__PURE__ */ (0,
|
|
2564
|
-
state.icon && /* @__PURE__ */ (0,
|
|
2565
|
-
state.title && /* @__PURE__ */ (0,
|
|
2566
|
-
state.description && /* @__PURE__ */ (0,
|
|
2614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "py-8 text-center", children: [
|
|
2615
|
+
state.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mx-auto mb-3 flex size-12 items-center justify-center rounded-card border bg-card", children: state.icon }),
|
|
2616
|
+
state.title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "mb-1 text-sm font-medium text-muted-foreground", children: state.title }),
|
|
2617
|
+
state.description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-muted-foreground/70", children: state.description })
|
|
2567
2618
|
] });
|
|
2568
2619
|
}
|
|
2569
2620
|
function WalletAssetList({
|
|
2570
2621
|
items,
|
|
2571
2622
|
title = "Your Assets",
|
|
2572
2623
|
amountLabel = "Amount",
|
|
2624
|
+
hideHeader = false,
|
|
2573
2625
|
isLoading = false,
|
|
2574
2626
|
loadingRows = 2,
|
|
2575
2627
|
emptyStates = [],
|
|
2576
2628
|
bottomSpacer = true,
|
|
2577
2629
|
className
|
|
2578
2630
|
}) {
|
|
2579
|
-
return /* @__PURE__ */ (0,
|
|
2580
|
-
/* @__PURE__ */ (0,
|
|
2581
|
-
/* @__PURE__ */ (0,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
2632
|
+
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "mb-1 mt-3 flex items-center justify-between px-2", children: [
|
|
2633
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs font-bold uppercase tracking-widest text-foreground/80", children: title }),
|
|
2634
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs font-bold uppercase tracking-widest text-foreground/80", children: amountLabel })
|
|
2583
2635
|
] }),
|
|
2584
|
-
isLoading && /* @__PURE__ */ (0,
|
|
2585
|
-
!isLoading && items.map((item) => /* @__PURE__ */ (0,
|
|
2636
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col gap-3", children: Array.from({ length: loadingRows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(AssetSkeleton, { index }, index)) }),
|
|
2637
|
+
!isLoading && items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2586
2638
|
AssetCard,
|
|
2587
2639
|
{
|
|
2588
2640
|
ticker: item.ticker,
|
|
@@ -2596,16 +2648,16 @@ function WalletAssetList({
|
|
|
2596
2648
|
},
|
|
2597
2649
|
item.id
|
|
2598
2650
|
)),
|
|
2599
|
-
!isLoading && emptyStates.map((state) => /* @__PURE__ */ (0,
|
|
2600
|
-
bottomSpacer && /* @__PURE__ */ (0,
|
|
2651
|
+
!isLoading && emptyStates.map((state) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(EmptyState, { state }, state.id)),
|
|
2652
|
+
bottomSpacer && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-32" })
|
|
2601
2653
|
] });
|
|
2602
2654
|
}
|
|
2603
2655
|
|
|
2604
2656
|
// src/web/components/balance-breakdown.tsx
|
|
2605
2657
|
var import_react10 = require("react");
|
|
2606
|
-
var
|
|
2658
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2607
2659
|
function OnchainIcon({ className = "" }) {
|
|
2608
|
-
return /* @__PURE__ */ (0,
|
|
2660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2609
2661
|
"span",
|
|
2610
2662
|
{
|
|
2611
2663
|
className: `material-symbols-outlined leading-none ${className}`,
|
|
@@ -2619,7 +2671,7 @@ function ImageIcon({
|
|
|
2619
2671
|
alt,
|
|
2620
2672
|
className = ""
|
|
2621
2673
|
}) {
|
|
2622
|
-
return /* @__PURE__ */ (0,
|
|
2674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { src, alt, className });
|
|
2623
2675
|
}
|
|
2624
2676
|
function numberOnly(formatted) {
|
|
2625
2677
|
return formatted.replace(/\u00a0(sats|BTC|mBTC)$/, "").replace(/^\u20bf/, "");
|
|
@@ -2651,47 +2703,51 @@ function BalanceBreakdown({
|
|
|
2651
2703
|
}) {
|
|
2652
2704
|
const [expanded, setExpanded] = (0, import_react10.useState)(false);
|
|
2653
2705
|
const fiatTotal = formatFiatValue(totalBTC);
|
|
2654
|
-
return /* @__PURE__ */ (0,
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative overflow-hidden rounded-3xl bg-card p-5", children: [
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "pointer-events-none absolute right-0 top-0 h-48 w-48 -translate-y-1/4 translate-x-1/4 rounded-full bg-white/[0.04] blur-[60px]" }),
|
|
2708
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative z-10 flex items-start justify-between gap-3", children: [
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2658
2710
|
"button",
|
|
2659
2711
|
{
|
|
2660
2712
|
onClick: cycle,
|
|
2661
2713
|
className: "group flex min-w-0 flex-1 flex-col items-start text-left",
|
|
2662
2714
|
title: `Tap to switch unit (current: ${label})`,
|
|
2663
2715
|
children: [
|
|
2664
|
-
/* @__PURE__ */ (0,
|
|
2665
|
-
isLoading ? /* @__PURE__ */ (0,
|
|
2666
|
-
/* @__PURE__ */ (0,
|
|
2667
|
-
/* @__PURE__ */ (0,
|
|
2668
|
-
] }) : /* @__PURE__ */ (0,
|
|
2669
|
-
/* @__PURE__ */ (0,
|
|
2670
|
-
/* @__PURE__ */ (0,
|
|
2671
|
-
unit !== "fiat" && /* @__PURE__ */ (0,
|
|
2672
|
-
isPartial && /* @__PURE__ */ (0,
|
|
2716
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-1 text-xxs font-bold uppercase tracking-widest text-white/40", children: "Total Balance" }),
|
|
2717
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-1 space-y-2", children: [
|
|
2718
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-9 w-36 animate-pulse rounded-lg bg-white/10" }),
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-3 w-20 animate-pulse rounded bg-white/5" })
|
|
2720
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
2721
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex min-w-0 max-w-full flex-wrap items-baseline gap-x-2.5 gap-y-1", children: [
|
|
2722
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-display font-black leading-[1.1] tracking-tighter text-white drop-shadow-sm transition-all duration-300 group-active:scale-95 group-active:text-primary", children: balanceVisible ? numberOnly(format(totalBTC)) : "\u2022\u2022\u2022\u2022\u2022\u2022" }),
|
|
2723
|
+
unit !== "fiat" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "inline-block rounded-md border border-white/10 bg-white/5 px-2 py-0.5 text-tiny font-bold uppercase tracking-widest text-white/45", children: label }),
|
|
2724
|
+
isPartial && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2673
2725
|
"span",
|
|
2674
2726
|
{
|
|
2675
2727
|
className: "inline-flex size-4 items-center justify-center rounded-full border bg-white/[0.06]",
|
|
2676
2728
|
title: "Loading remaining balances",
|
|
2677
|
-
children: /* @__PURE__ */ (0,
|
|
2729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "size-2 animate-spin rounded-full border border-primary/30 border-t-primary" })
|
|
2678
2730
|
}
|
|
2679
2731
|
)
|
|
2680
2732
|
] }),
|
|
2681
|
-
balanceVisible &&
|
|
2733
|
+
balanceVisible && unit !== "fiat" && fiatTotal && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mt-1 font-mono text-xs font-medium text-white/45", children: fiatTotal }),
|
|
2734
|
+
balanceVisible && unit === "fiat" && totalBTC > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "mt-1 font-mono text-xs font-medium text-white/45", children: [
|
|
2735
|
+
(totalBTC / 1e8).toFixed(8).replace(/\.?0+$/, ""),
|
|
2736
|
+
"\xA0BTC"
|
|
2737
|
+
] })
|
|
2682
2738
|
] })
|
|
2683
2739
|
]
|
|
2684
2740
|
}
|
|
2685
2741
|
),
|
|
2686
|
-
/* @__PURE__ */ (0,
|
|
2687
|
-
onRefresh && /* @__PURE__ */ (0,
|
|
2742
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-1 flex shrink-0 items-center gap-1.5", children: [
|
|
2743
|
+
onRefresh && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2688
2744
|
"button",
|
|
2689
2745
|
{
|
|
2690
2746
|
onClick: onRefresh,
|
|
2691
2747
|
disabled: isRefreshing,
|
|
2692
2748
|
className: "flex size-7 items-center justify-center rounded-full bg-white/[0.08] transition-all hover:bg-white/[0.12] disabled:opacity-40",
|
|
2693
2749
|
title: "Refresh balances",
|
|
2694
|
-
children: /* @__PURE__ */ (0,
|
|
2750
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2695
2751
|
"span",
|
|
2696
2752
|
{
|
|
2697
2753
|
className: `material-symbols-outlined text-icon-sm leading-none text-white/60${isRefreshing ? " animate-spin" : ""}`,
|
|
@@ -2700,12 +2756,12 @@ function BalanceBreakdown({
|
|
|
2700
2756
|
)
|
|
2701
2757
|
}
|
|
2702
2758
|
),
|
|
2703
|
-
/* @__PURE__ */ (0,
|
|
2759
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2704
2760
|
"button",
|
|
2705
2761
|
{
|
|
2706
2762
|
onClick: () => setExpanded(!expanded),
|
|
2707
2763
|
className: "flex size-7 items-center justify-center rounded-full bg-white/[0.08] transition-all hover:bg-white/[0.12]",
|
|
2708
|
-
children: /* @__PURE__ */ (0,
|
|
2764
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2709
2765
|
Icon2,
|
|
2710
2766
|
{
|
|
2711
2767
|
name: expanded ? "expand_less" : "expand_more",
|
|
@@ -2717,12 +2773,12 @@ function BalanceBreakdown({
|
|
|
2717
2773
|
)
|
|
2718
2774
|
] })
|
|
2719
2775
|
] }),
|
|
2720
|
-
expanded && /* @__PURE__ */ (0,
|
|
2721
|
-
/* @__PURE__ */ (0,
|
|
2722
|
-
/* @__PURE__ */ (0,
|
|
2776
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-4 space-y-1 border-t border-white/[0.08] pt-4 duration-300 animate-in fade-in slide-in-from-top-2", children: [
|
|
2777
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "Bitcoin" }),
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2723
2779
|
NetworkRow,
|
|
2724
2780
|
{
|
|
2725
|
-
icon: /* @__PURE__ */ (0,
|
|
2781
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(OnchainIcon, { className: "text-icon-sm" }),
|
|
2726
2782
|
iconColor: "text-network-spark",
|
|
2727
2783
|
dotColor: "bg-network-spark",
|
|
2728
2784
|
label: "BTC on-chain",
|
|
@@ -2734,10 +2790,10 @@ function BalanceBreakdown({
|
|
|
2734
2790
|
formatFiat: formatFiatValue
|
|
2735
2791
|
}
|
|
2736
2792
|
),
|
|
2737
|
-
/* @__PURE__ */ (0,
|
|
2793
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2738
2794
|
NetworkRow,
|
|
2739
2795
|
{
|
|
2740
|
-
icon: /* @__PURE__ */ (0,
|
|
2796
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2741
2797
|
ImageIcon,
|
|
2742
2798
|
{
|
|
2743
2799
|
src: "/icons/lightning/lightning.svg",
|
|
@@ -2756,10 +2812,10 @@ function BalanceBreakdown({
|
|
|
2756
2812
|
formatFiat: formatFiatValue
|
|
2757
2813
|
}
|
|
2758
2814
|
),
|
|
2759
|
-
/* @__PURE__ */ (0,
|
|
2815
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2760
2816
|
NetworkRow,
|
|
2761
2817
|
{
|
|
2762
|
-
icon: /* @__PURE__ */ (0,
|
|
2818
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2763
2819
|
ImageIcon,
|
|
2764
2820
|
{
|
|
2765
2821
|
src: "/icons/spark/Asterisk/Spark Asterisk White.svg",
|
|
@@ -2778,10 +2834,10 @@ function BalanceBreakdown({
|
|
|
2778
2834
|
formatFiat: formatFiatValue
|
|
2779
2835
|
}
|
|
2780
2836
|
),
|
|
2781
|
-
/* @__PURE__ */ (0,
|
|
2837
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2782
2838
|
NetworkRow,
|
|
2783
2839
|
{
|
|
2784
|
-
icon: /* @__PURE__ */ (0,
|
|
2840
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2785
2841
|
ImageIcon,
|
|
2786
2842
|
{
|
|
2787
2843
|
src: "/icons/arkade/arkade-icon.svg",
|
|
@@ -2800,45 +2856,45 @@ function BalanceBreakdown({
|
|
|
2800
2856
|
formatFiat: formatFiatValue
|
|
2801
2857
|
}
|
|
2802
2858
|
),
|
|
2803
|
-
rgbAssets.length > 0 && /* @__PURE__ */ (0,
|
|
2804
|
-
accounts.RGB?.connected && nodeInfo?.pubkey && /* @__PURE__ */ (0,
|
|
2805
|
-
/* @__PURE__ */ (0,
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2859
|
+
rgbAssets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RgbAssetsBreakdown, { assets: rgbAssets, balanceVisible }),
|
|
2860
|
+
accounts.RGB?.connected && nodeInfo?.pubkey && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "RLN Details" }),
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "grid grid-cols-3 gap-2", children: [
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2808
2864
|
StatusChip,
|
|
2809
2865
|
{
|
|
2810
2866
|
label: "Node",
|
|
2811
2867
|
value: `${nodeInfo.pubkey.slice(0, 8)}...${nodeInfo.pubkey.slice(-6)}`
|
|
2812
2868
|
}
|
|
2813
2869
|
),
|
|
2814
|
-
/* @__PURE__ */ (0,
|
|
2815
|
-
/* @__PURE__ */ (0,
|
|
2870
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StatusChip, { label: "Peers", value: String(nodeInfo.num_peers ?? 0) }),
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StatusChip, { label: "Channels", value: String(nodeInfo.num_channels ?? 0) })
|
|
2816
2872
|
] })
|
|
2817
2873
|
] })
|
|
2818
2874
|
] }),
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2875
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative z-10 mt-3 flex gap-2.5 border-t border-white/[0.08] pt-3", children: [
|
|
2876
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2821
2877
|
ActionTile,
|
|
2822
2878
|
{
|
|
2823
|
-
icon: /* @__PURE__ */ (0,
|
|
2879
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "material-symbols-outlined text-icon-lg leading-none", children: "call_received" }),
|
|
2824
2880
|
label: "Deposit",
|
|
2825
2881
|
onClick: () => onNavigate?.("deposit"),
|
|
2826
2882
|
"data-testid": "dashboard-action-deposit"
|
|
2827
2883
|
}
|
|
2828
2884
|
),
|
|
2829
|
-
/* @__PURE__ */ (0,
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2830
2886
|
ActionTile,
|
|
2831
2887
|
{
|
|
2832
|
-
icon: /* @__PURE__ */ (0,
|
|
2888
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "material-symbols-outlined text-icon-lg leading-none", children: "swap_horiz" }),
|
|
2833
2889
|
label: "Swap",
|
|
2834
2890
|
onClick: () => onNavigate?.("swap"),
|
|
2835
2891
|
"data-testid": "dashboard-action-swap"
|
|
2836
2892
|
}
|
|
2837
2893
|
),
|
|
2838
|
-
/* @__PURE__ */ (0,
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2839
2895
|
ActionTile,
|
|
2840
2896
|
{
|
|
2841
|
-
icon: /* @__PURE__ */ (0,
|
|
2897
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "material-symbols-outlined text-icon-lg leading-none", children: "arrow_outward" }),
|
|
2842
2898
|
label: "Withdraw",
|
|
2843
2899
|
onClick: () => onNavigate?.("withdraw"),
|
|
2844
2900
|
"data-testid": "dashboard-action-withdraw"
|
|
@@ -2851,34 +2907,34 @@ function RgbAssetsBreakdown({
|
|
|
2851
2907
|
assets,
|
|
2852
2908
|
balanceVisible
|
|
2853
2909
|
}) {
|
|
2854
|
-
return /* @__PURE__ */ (0,
|
|
2855
|
-
/* @__PURE__ */ (0,
|
|
2856
|
-
/* @__PURE__ */ (0,
|
|
2910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "RGB Assets" }),
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "space-y-2", children: assets.map((asset) => {
|
|
2857
2913
|
const bal = asset.balance ?? {};
|
|
2858
2914
|
const onChain = Number(bal.future || 0);
|
|
2859
2915
|
const offChain = Number(bal.offchain_outbound || 0);
|
|
2860
2916
|
const total = onChain + offChain;
|
|
2861
2917
|
const precision = asset.precision || 0;
|
|
2862
2918
|
const formatRgb = (value) => (value / Math.pow(10, precision)).toFixed(precision);
|
|
2863
|
-
return /* @__PURE__ */ (0,
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
2866
|
-
/* @__PURE__ */ (0,
|
|
2867
|
-
/* @__PURE__ */ (0,
|
|
2868
|
-
/* @__PURE__ */ (0,
|
|
2919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-start justify-between py-1", children: [
|
|
2920
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
2921
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex size-5 items-center justify-center overflow-hidden rounded border border-network-rgb/20 bg-network-rgb/10", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { src: "/icons/rgb/rgb-logo.svg", alt: "RGB", className: "size-3.5 object-contain" }) }),
|
|
2922
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col", children: [
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-semibold text-white/90", children: asset.ticker }),
|
|
2924
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "max-w-[90px] truncate text-xxs text-white/40", children: asset.name })
|
|
2869
2925
|
] })
|
|
2870
2926
|
] }),
|
|
2871
|
-
/* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
balanceVisible && (onChain > 0 || offChain > 0) && /* @__PURE__ */ (0,
|
|
2874
|
-
onChain > 0 && /* @__PURE__ */ (0,
|
|
2927
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-end text-right", children: [
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "tabular-nums text-sm font-bold text-white", children: balanceVisible ? formatRgb(total) : "\u2022\u2022\u2022\u2022\u2022\u2022" }),
|
|
2929
|
+
balanceVisible && (onChain > 0 || offChain > 0) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-0.5 flex items-center gap-1 text-xxs text-white/40", children: [
|
|
2930
|
+
onChain > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "text-network-spark/80", children: [
|
|
2875
2931
|
formatRgb(onChain),
|
|
2876
2932
|
" on-chain"
|
|
2877
2933
|
] }),
|
|
2878
|
-
onChain > 0 && offChain > 0 && /* @__PURE__ */ (0,
|
|
2879
|
-
offChain > 0 && /* @__PURE__ */ (0,
|
|
2934
|
+
onChain > 0 && offChain > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-white/20", children: "|" }),
|
|
2935
|
+
offChain > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1 text-network-lightning/80", children: [
|
|
2880
2936
|
formatRgb(offChain),
|
|
2881
|
-
/* @__PURE__ */ (0,
|
|
2937
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2882
2938
|
ImageIcon,
|
|
2883
2939
|
{
|
|
2884
2940
|
src: "/icons/lightning/lightning.svg",
|
|
@@ -2894,9 +2950,9 @@ function RgbAssetsBreakdown({
|
|
|
2894
2950
|
] });
|
|
2895
2951
|
}
|
|
2896
2952
|
function StatusChip({ label, value }) {
|
|
2897
|
-
return /* @__PURE__ */ (0,
|
|
2898
|
-
/* @__PURE__ */ (0,
|
|
2899
|
-
/* @__PURE__ */ (0,
|
|
2953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "rounded-xl border border-white/[0.08] bg-white/5 px-3 py-2", children: [
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-xxs font-bold uppercase tracking-widest text-white/30", children: label }),
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mt-1 truncate text-xs font-semibold text-white/80", children: value })
|
|
2900
2956
|
] });
|
|
2901
2957
|
}
|
|
2902
2958
|
function NetworkRow({
|
|
@@ -2913,31 +2969,31 @@ function NetworkRow({
|
|
|
2913
2969
|
}) {
|
|
2914
2970
|
const fiat = formatFiat(amount);
|
|
2915
2971
|
const isEmpty = amount === 0 && !isPending;
|
|
2916
|
-
return /* @__PURE__ */ (0,
|
|
2972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2917
2973
|
"div",
|
|
2918
2974
|
{
|
|
2919
2975
|
className: `flex items-center justify-between rounded-xl px-3 py-2 transition-colors ${isEmpty ? "opacity-35" : "bg-white/[0.03] hover:bg-accent"}`,
|
|
2920
2976
|
children: [
|
|
2921
|
-
/* @__PURE__ */ (0,
|
|
2922
|
-
/* @__PURE__ */ (0,
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
2977
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `h-7 w-0.5 rounded-full ${dotColor} opacity-80` }),
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2924
2980
|
"div",
|
|
2925
2981
|
{
|
|
2926
2982
|
className: `flex size-7 items-center justify-center rounded-lg bg-white/5 text-icon-sm ${iconColor}`,
|
|
2927
2983
|
children: icon
|
|
2928
2984
|
}
|
|
2929
2985
|
),
|
|
2930
|
-
/* @__PURE__ */ (0,
|
|
2931
|
-
/* @__PURE__ */ (0,
|
|
2932
|
-
/* @__PURE__ */ (0,
|
|
2986
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col", children: [
|
|
2987
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-semibold leading-tight text-white/80", children: label }),
|
|
2988
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mt-0.5 text-xxs font-medium leading-tight text-white/30", children: sublabel })
|
|
2933
2989
|
] })
|
|
2934
2990
|
] }),
|
|
2935
|
-
/* @__PURE__ */ (0,
|
|
2936
|
-
/* @__PURE__ */ (0,
|
|
2937
|
-
/* @__PURE__ */ (0,
|
|
2938
|
-
] }) : /* @__PURE__ */ (0,
|
|
2939
|
-
/* @__PURE__ */ (0,
|
|
2940
|
-
fiat && visible && !isEmpty && /* @__PURE__ */ (0,
|
|
2991
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col items-end", children: isPending ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
2992
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-3.5 w-12 animate-pulse rounded bg-white/10" }),
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "inline-flex size-3 items-center justify-center rounded-full border bg-white/[0.06]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "size-1.5 animate-spin rounded-full border border-primary/30 border-t-primary" }) })
|
|
2994
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
2995
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "tabular-nums text-xs font-bold text-white", children: visible ? format(amount) : "\u2022\u2022\u2022\u2022\u2022\u2022" }),
|
|
2996
|
+
fiat && visible && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mt-0.5 font-mono text-xxs text-white/35", children: fiat })
|
|
2941
2997
|
] }) })
|
|
2942
2998
|
]
|
|
2943
2999
|
}
|
|
@@ -2947,7 +3003,7 @@ function NetworkRow({
|
|
|
2947
3003
|
// src/web/components/asset-selector.tsx
|
|
2948
3004
|
var import_react11 = require("react");
|
|
2949
3005
|
var import_react_dom = require("react-dom");
|
|
2950
|
-
var
|
|
3006
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2951
3007
|
function AssetSelector({
|
|
2952
3008
|
label,
|
|
2953
3009
|
selectedTicker,
|
|
@@ -2977,7 +3033,7 @@ function AssetSelector({
|
|
|
2977
3033
|
});
|
|
2978
3034
|
const categoryLabelById = new Map(categories.map((category) => [category.id, category.label]));
|
|
2979
3035
|
const modalOverlay = open && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
|
|
2980
|
-
/* @__PURE__ */ (0,
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2981
3037
|
"div",
|
|
2982
3038
|
{
|
|
2983
3039
|
className: "fixed inset-0 z-[var(--z-modal)] flex items-end justify-center bg-black/60 backdrop-blur-sm duration-200 animate-in fade-in sm:items-center sm:p-4",
|
|
@@ -2985,33 +3041,33 @@ function AssetSelector({
|
|
|
2985
3041
|
setOpen(false);
|
|
2986
3042
|
setSearch("");
|
|
2987
3043
|
},
|
|
2988
|
-
children: /* @__PURE__ */ (0,
|
|
3044
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2989
3045
|
"div",
|
|
2990
3046
|
{
|
|
2991
3047
|
className: "flex max-h-[85vh] w-full max-w-[26rem] flex-col overflow-hidden rounded-t-3xl border-t border-border bg-popover/95 shadow-popover backdrop-blur-2xl duration-300 animate-in slide-in-from-bottom-8 sm:max-h-[80vh] sm:rounded-3xl sm:border sm:slide-in-from-bottom-0 sm:zoom-in-95",
|
|
2992
3048
|
onClick: (event) => event.stopPropagation(),
|
|
2993
3049
|
children: [
|
|
2994
|
-
/* @__PURE__ */ (0,
|
|
2995
|
-
/* @__PURE__ */ (0,
|
|
2996
|
-
/* @__PURE__ */ (0,
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0 border-b border-white/[0.08] bg-white/[0.03] px-4 py-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0", children: [
|
|
3052
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "text-xxs font-bold uppercase tracking-eyebrow-wide text-text-dimmed", children: [
|
|
2997
3053
|
label,
|
|
2998
3054
|
" Asset"
|
|
2999
3055
|
] }),
|
|
3000
|
-
/* @__PURE__ */ (0,
|
|
3056
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "mt-1 text-sm font-semibold text-white/90", children: [
|
|
3001
3057
|
filtered.length,
|
|
3002
3058
|
" option",
|
|
3003
3059
|
filtered.length === 1 ? "" : "s",
|
|
3004
3060
|
" available"
|
|
3005
3061
|
] })
|
|
3006
3062
|
] }),
|
|
3007
|
-
selected && /* @__PURE__ */ (0,
|
|
3008
|
-
/* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3063
|
+
selected && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 rounded-full border border-primary/15 bg-primary/10 px-2.5 py-1", children: [
|
|
3064
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-tiny font-semibold text-primary", children: selected.ticker })
|
|
3010
3066
|
] })
|
|
3011
3067
|
] }) }),
|
|
3012
|
-
/* @__PURE__ */ (0,
|
|
3013
|
-
/* @__PURE__ */ (0,
|
|
3014
|
-
/* @__PURE__ */ (0,
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-shrink-0 border-b border-white/[0.08] px-4 py-3", children: [
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative", children: [
|
|
3070
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3015
3071
|
Icon2,
|
|
3016
3072
|
{
|
|
3017
3073
|
name: "search",
|
|
@@ -3019,7 +3075,7 @@ function AssetSelector({
|
|
|
3019
3075
|
className: "absolute left-3.5 top-1/2 -translate-y-1/2 text-white/35"
|
|
3020
3076
|
}
|
|
3021
3077
|
),
|
|
3022
|
-
/* @__PURE__ */ (0,
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3023
3079
|
"input",
|
|
3024
3080
|
{
|
|
3025
3081
|
autoFocus: true,
|
|
@@ -3031,9 +3087,9 @@ function AssetSelector({
|
|
|
3031
3087
|
}
|
|
3032
3088
|
)
|
|
3033
3089
|
] }),
|
|
3034
|
-
hasCategoryFilters && /* @__PURE__ */ (0,
|
|
3090
|
+
hasCategoryFilters && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: categories.map((category) => {
|
|
3035
3091
|
const isActive = activeCategories.includes(category.id);
|
|
3036
|
-
return /* @__PURE__ */ (0,
|
|
3092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3037
3093
|
"button",
|
|
3038
3094
|
{
|
|
3039
3095
|
type: "button",
|
|
@@ -3050,9 +3106,9 @@ function AssetSelector({
|
|
|
3050
3106
|
);
|
|
3051
3107
|
}) })
|
|
3052
3108
|
] }),
|
|
3053
|
-
/* @__PURE__ */ (0,
|
|
3054
|
-
/* @__PURE__ */ (0,
|
|
3055
|
-
/* @__PURE__ */ (0,
|
|
3109
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ScrollArea, { className: "min-h-0", viewportClassName: "px-2 py-2", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col items-center gap-2 px-4 py-10 text-center text-sm text-white/30", children: [
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon2, { name: "search", size: "md", className: "opacity-40" }),
|
|
3111
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { children: [
|
|
3056
3112
|
"No results",
|
|
3057
3113
|
search ? ` for "${search}"` : ""
|
|
3058
3114
|
] })
|
|
@@ -3060,7 +3116,7 @@ function AssetSelector({
|
|
|
3060
3116
|
const isSelected = option.ticker === selectedTicker;
|
|
3061
3117
|
const isDisabled = option.ticker === disabledTicker;
|
|
3062
3118
|
const optionCategoryLabel = option.categoryLabel || (option.category ? categoryLabelById.get(option.category) : void 0);
|
|
3063
|
-
return /* @__PURE__ */ (0,
|
|
3119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3064
3120
|
"button",
|
|
3065
3121
|
{
|
|
3066
3122
|
type: "button",
|
|
@@ -3077,7 +3133,7 @@ function AssetSelector({
|
|
|
3077
3133
|
isSelected ? "border-primary/30 bg-primary/[0.12]" : isDisabled ? "cursor-not-allowed border-white/[0.04] bg-white/[0.015] opacity-45" : "border-transparent bg-transparent hover:border-border hover:bg-accent"
|
|
3078
3134
|
),
|
|
3079
3135
|
children: [
|
|
3080
|
-
/* @__PURE__ */ (0,
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3081
3137
|
AssetIcon,
|
|
3082
3138
|
{
|
|
3083
3139
|
ticker: option.ticker,
|
|
@@ -3089,11 +3145,11 @@ function AssetSelector({
|
|
|
3089
3145
|
)
|
|
3090
3146
|
}
|
|
3091
3147
|
),
|
|
3092
|
-
/* @__PURE__ */ (0,
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3094
|
-
/* @__PURE__ */ (0,
|
|
3095
|
-
/* @__PURE__ */ (0,
|
|
3096
|
-
option.network && /* @__PURE__ */ (0,
|
|
3148
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center justify-between gap-2 font-semibold text-white", children: [
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: option.ticker }),
|
|
3152
|
+
option.network && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3097
3153
|
NetworkBadge,
|
|
3098
3154
|
{
|
|
3099
3155
|
network: option.network,
|
|
@@ -3102,13 +3158,13 @@ function AssetSelector({
|
|
|
3102
3158
|
}
|
|
3103
3159
|
)
|
|
3104
3160
|
] }),
|
|
3105
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3161
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wide text-primary", children: "Current" })
|
|
3106
3162
|
] }),
|
|
3107
|
-
/* @__PURE__ */ (0,
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3109
|
-
/* @__PURE__ */ (0,
|
|
3110
|
-
optionCategoryLabel && /* @__PURE__ */ (0,
|
|
3111
|
-
isDisabled && /* @__PURE__ */ (0,
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mt-0.5 flex items-center justify-between gap-3", children: [
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "truncate text-xs text-white/35", children: option.name ?? option.ticker }),
|
|
3165
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3166
|
+
optionCategoryLabel && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "rounded-full border border-border-default bg-surface-overlay px-2 py-0.5 text-xxs font-semibold uppercase tracking-eyebrow text-text-dimmed", children: optionCategoryLabel }),
|
|
3167
|
+
isDisabled && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-xxs font-medium uppercase tracking-wide text-white/25", children: "In use" })
|
|
3112
3168
|
] })
|
|
3113
3169
|
] })
|
|
3114
3170
|
] })
|
|
@@ -3125,8 +3181,8 @@ function AssetSelector({
|
|
|
3125
3181
|
document.body
|
|
3126
3182
|
) : null;
|
|
3127
3183
|
if (compact) {
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ref, className: "relative w-36 flex-shrink-0", children: [
|
|
3185
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3130
3186
|
"button",
|
|
3131
3187
|
{
|
|
3132
3188
|
type: "button",
|
|
@@ -3136,10 +3192,10 @@ function AssetSelector({
|
|
|
3136
3192
|
"group flex w-full items-center gap-3 rounded-full px-3 py-2 text-left transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3137
3193
|
open ? "bg-primary/[0.12] shadow-md" : "bg-black/20 hover:bg-black/35"
|
|
3138
3194
|
),
|
|
3139
|
-
children: selected ? /* @__PURE__ */ (0,
|
|
3140
|
-
/* @__PURE__ */ (0,
|
|
3141
|
-
/* @__PURE__ */ (0,
|
|
3142
|
-
selected.network && /* @__PURE__ */ (0,
|
|
3195
|
+
children: selected ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative shrink-0", children: [
|
|
3197
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 38 }),
|
|
3198
|
+
selected.network && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3143
3199
|
NetworkBadge,
|
|
3144
3200
|
{
|
|
3145
3201
|
network: selected.network,
|
|
@@ -3148,17 +3204,17 @@ function AssetSelector({
|
|
|
3148
3204
|
}
|
|
3149
3205
|
)
|
|
3150
3206
|
] }),
|
|
3151
|
-
/* @__PURE__ */ (0,
|
|
3152
|
-
] }) : /* @__PURE__ */ (0,
|
|
3207
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "min-w-0 flex-1 text-left", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate text-xl font-bold leading-tight text-white", children: selected.ticker }) })
|
|
3208
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-1 py-1", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-sm font-semibold text-white/45", children: "Select..." }) })
|
|
3153
3209
|
}
|
|
3154
3210
|
),
|
|
3155
3211
|
modalOverlay
|
|
3156
3212
|
] });
|
|
3157
3213
|
}
|
|
3158
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
-
/* @__PURE__ */ (0,
|
|
3160
|
-
/* @__PURE__ */ (0,
|
|
3161
|
-
/* @__PURE__ */ (0,
|
|
3214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1.5", ref, children: [
|
|
3215
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "ml-1 text-xs font-semibold uppercase tracking-wider text-white/40", children: label }),
|
|
3216
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative", children: [
|
|
3217
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3162
3218
|
"button",
|
|
3163
3219
|
{
|
|
3164
3220
|
type: "button",
|
|
@@ -3166,12 +3222,12 @@ function AssetSelector({
|
|
|
3166
3222
|
onClick: () => !disabled && setOpen((value) => !value),
|
|
3167
3223
|
className: "flex w-full items-center justify-between rounded-xl border bg-card/70 p-3 text-left transition-all duration-200 hover:border-primary/40 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3168
3224
|
children: [
|
|
3169
|
-
/* @__PURE__ */ (0,
|
|
3170
|
-
/* @__PURE__ */ (0,
|
|
3171
|
-
/* @__PURE__ */ (0,
|
|
3172
|
-
/* @__PURE__ */ (0,
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex items-center gap-3", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 32 }),
|
|
3227
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
|
|
3228
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1.5 text-sm font-semibold text-white", children: [
|
|
3173
3229
|
selected.ticker,
|
|
3174
|
-
selected.network && /* @__PURE__ */ (0,
|
|
3230
|
+
selected.network && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3175
3231
|
NetworkBadge,
|
|
3176
3232
|
{
|
|
3177
3233
|
network: selected.network,
|
|
@@ -3180,10 +3236,10 @@ function AssetSelector({
|
|
|
3180
3236
|
}
|
|
3181
3237
|
)
|
|
3182
3238
|
] }),
|
|
3183
|
-
/* @__PURE__ */ (0,
|
|
3239
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-0.5 text-xs text-white/35", children: selected.name })
|
|
3184
3240
|
] })
|
|
3185
|
-
] }) : /* @__PURE__ */ (0,
|
|
3186
|
-
/* @__PURE__ */ (0,
|
|
3241
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-sm text-white/35", children: "Select asset..." }) }),
|
|
3242
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3187
3243
|
Icon2,
|
|
3188
3244
|
{
|
|
3189
3245
|
name: "expand_more",
|
|
@@ -3200,7 +3256,7 @@ function AssetSelector({
|
|
|
3200
3256
|
}
|
|
3201
3257
|
|
|
3202
3258
|
// src/web/components/swap-input-card.tsx
|
|
3203
|
-
var
|
|
3259
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3204
3260
|
var PERCENTAGES = [25, 50, 75, 100];
|
|
3205
3261
|
function SwapInputCard({
|
|
3206
3262
|
fromTicker,
|
|
@@ -3237,12 +3293,12 @@ function SwapInputCard({
|
|
|
3237
3293
|
onFlip,
|
|
3238
3294
|
onSubmit
|
|
3239
3295
|
}) {
|
|
3240
|
-
return /* @__PURE__ */ (0,
|
|
3241
|
-
/* @__PURE__ */ (0,
|
|
3242
|
-
/* @__PURE__ */ (0,
|
|
3243
|
-
/* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3297
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative mb-3 flex flex-col rounded-3xl bg-white/[0.03] shadow-2xl shadow-black/40 backdrop-blur-2xl transition-all duration-300", children: [
|
|
3298
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "p-3.5 pb-4", children: [
|
|
3299
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-2 flex items-center justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xs font-bold uppercase tracking-widest text-white/60", children: "You Pay" }) }),
|
|
3300
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3246
3302
|
AssetSelector,
|
|
3247
3303
|
{
|
|
3248
3304
|
compact: true,
|
|
@@ -3255,8 +3311,8 @@ function SwapInputCard({
|
|
|
3255
3311
|
onChange: onFromTickerChange
|
|
3256
3312
|
}
|
|
3257
3313
|
),
|
|
3258
|
-
/* @__PURE__ */ (0,
|
|
3259
|
-
/* @__PURE__ */ (0,
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0 flex-1 text-right", children: [
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3260
3316
|
"input",
|
|
3261
3317
|
{
|
|
3262
3318
|
type: "text",
|
|
@@ -3267,7 +3323,7 @@ function SwapInputCard({
|
|
|
3267
3323
|
className: "w-full border-none bg-transparent text-right text-2xl font-bold text-white placeholder:text-white/15 focus:outline-none"
|
|
3268
3324
|
}
|
|
3269
3325
|
),
|
|
3270
|
-
fromUnitIsToggle && onToggleFromUnit ? /* @__PURE__ */ (0,
|
|
3326
|
+
fromUnitIsToggle && onToggleFromUnit ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3271
3327
|
"button",
|
|
3272
3328
|
{
|
|
3273
3329
|
type: "button",
|
|
@@ -3276,12 +3332,12 @@ function SwapInputCard({
|
|
|
3276
3332
|
title: "Tap to switch unit",
|
|
3277
3333
|
children: fromUnitLabel
|
|
3278
3334
|
}
|
|
3279
|
-
) : /* @__PURE__ */ (0,
|
|
3335
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: fromUnitLabel })
|
|
3280
3336
|
] })
|
|
3281
3337
|
] }),
|
|
3282
|
-
/* @__PURE__ */ (0,
|
|
3283
|
-
/* @__PURE__ */ (0,
|
|
3284
|
-
/* @__PURE__ */ (0,
|
|
3338
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mt-2 flex items-center justify-between gap-2", children: [
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xxs font-medium text-white/60", children: showMaxText && maxText ? `Max: ${maxText}` : `Available: ${availableText}` }),
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center gap-1", children: PERCENTAGES.map((percent) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3285
3341
|
"button",
|
|
3286
3342
|
{
|
|
3287
3343
|
type: "button",
|
|
@@ -3300,20 +3356,20 @@ function SwapInputCard({
|
|
|
3300
3356
|
)) })
|
|
3301
3357
|
] })
|
|
3302
3358
|
] }),
|
|
3303
|
-
/* @__PURE__ */ (0,
|
|
3359
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "relative mx-6 flex h-px items-center justify-center bg-white/[0.08]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3304
3360
|
"button",
|
|
3305
3361
|
{
|
|
3306
3362
|
type: "button",
|
|
3307
3363
|
onClick: onFlip,
|
|
3308
3364
|
title: "Flip assets",
|
|
3309
3365
|
className: "absolute flex h-11 w-11 items-center justify-center rounded-full bg-card text-primary shadow-lg shadow-black/35 transition-all duration-500 hover:rotate-180 hover:bg-accent active:scale-95 active:shadow-none",
|
|
3310
|
-
children: /* @__PURE__ */ (0,
|
|
3366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { name: "swap_vert", size: "md" })
|
|
3311
3367
|
}
|
|
3312
3368
|
) }),
|
|
3313
|
-
/* @__PURE__ */ (0,
|
|
3314
|
-
/* @__PURE__ */ (0,
|
|
3315
|
-
/* @__PURE__ */ (0,
|
|
3316
|
-
/* @__PURE__ */ (0,
|
|
3369
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "rounded-b-3xl bg-gradient-to-br from-white/[0.01] to-primary/[0.04] p-3.5 pt-4 transition-all duration-300", children: [
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mb-2 text-xs font-bold uppercase tracking-widest text-primary/70", children: "You Receive" }),
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3372
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3317
3373
|
AssetSelector,
|
|
3318
3374
|
{
|
|
3319
3375
|
compact: true,
|
|
@@ -3326,24 +3382,24 @@ function SwapInputCard({
|
|
|
3326
3382
|
onChange: onToTickerChange
|
|
3327
3383
|
}
|
|
3328
3384
|
),
|
|
3329
|
-
/* @__PURE__ */ (0,
|
|
3330
|
-
isLoadingQuote ? /* @__PURE__ */ (0,
|
|
3331
|
-
/* @__PURE__ */ (0,
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0 flex-1 text-right", children: [
|
|
3386
|
+
isLoadingQuote ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ml-auto h-8 w-28 animate-pulse rounded-lg bg-white/10" }) : receiveAmount ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-2xl font-bold text-primary", children: receiveAmount }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-2xl font-bold text-white/15", children: "-" }),
|
|
3387
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: receiveUnitLabel || toTicker || "-" })
|
|
3332
3388
|
] })
|
|
3333
3389
|
] })
|
|
3334
3390
|
] })
|
|
3335
3391
|
] }),
|
|
3336
|
-
(quoteError || quoteRateText || quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0,
|
|
3337
|
-
quoteRateText && /* @__PURE__ */ (0,
|
|
3338
|
-
/* @__PURE__ */ (0,
|
|
3339
|
-
/* @__PURE__ */ (0,
|
|
3392
|
+
(quoteError || quoteRateText || quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "rounded-xl bg-card/60 p-3", children: quoteError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-center text-xs text-danger", children: quoteError }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1.5", children: [
|
|
3393
|
+
quoteRateText && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3394
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/40", children: "Rate" }),
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-medium text-white/65", children: quoteRateText })
|
|
3340
3396
|
] }),
|
|
3341
|
-
(quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0,
|
|
3342
|
-
/* @__PURE__ */ (0,
|
|
3343
|
-
/* @__PURE__ */ (0,
|
|
3344
|
-
quoteFeeText && /* @__PURE__ */ (0,
|
|
3345
|
-
quoteFeeText && quoteExpiresText && /* @__PURE__ */ (0,
|
|
3346
|
-
quoteExpiresText && /* @__PURE__ */ (0,
|
|
3397
|
+
(quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3398
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/40", children: "Fee" }),
|
|
3399
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3400
|
+
quoteFeeText && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/65", children: quoteFeeText }),
|
|
3401
|
+
quoteFeeText && quoteExpiresText && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/15", children: "\xB7" }),
|
|
3402
|
+
quoteExpiresText && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3347
3403
|
"span",
|
|
3348
3404
|
{
|
|
3349
3405
|
className: cn(
|
|
@@ -3356,11 +3412,11 @@ function SwapInputCard({
|
|
|
3356
3412
|
] })
|
|
3357
3413
|
] })
|
|
3358
3414
|
] }) }),
|
|
3359
|
-
warning && /* @__PURE__ */ (0,
|
|
3360
|
-
/* @__PURE__ */ (0,
|
|
3361
|
-
/* @__PURE__ */ (0,
|
|
3415
|
+
warning && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-start gap-2 rounded-xl bg-danger/10 p-3", children: [
|
|
3416
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { name: "warning", size: "sm", className: "mt-0.5 text-danger" }),
|
|
3417
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xs leading-relaxed text-danger", children: warning })
|
|
3362
3418
|
] }),
|
|
3363
|
-
/* @__PURE__ */ (0,
|
|
3419
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3364
3420
|
Button,
|
|
3365
3421
|
{
|
|
3366
3422
|
variant: submitVariant,
|
|
@@ -3375,14 +3431,14 @@ function SwapInputCard({
|
|
|
3375
3431
|
}
|
|
3376
3432
|
|
|
3377
3433
|
// src/web/components/page-shell.tsx
|
|
3378
|
-
var
|
|
3434
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3379
3435
|
function PageShell({
|
|
3380
3436
|
children,
|
|
3381
3437
|
fullHeight = true,
|
|
3382
3438
|
centered = true,
|
|
3383
3439
|
className
|
|
3384
3440
|
}) {
|
|
3385
|
-
return /* @__PURE__ */ (0,
|
|
3441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3386
3442
|
"div",
|
|
3387
3443
|
{
|
|
3388
3444
|
className: cn(
|
|
@@ -3392,8 +3448,8 @@ function PageShell({
|
|
|
3392
3448
|
className
|
|
3393
3449
|
),
|
|
3394
3450
|
children: [
|
|
3395
|
-
/* @__PURE__ */ (0,
|
|
3396
|
-
/* @__PURE__ */ (0,
|
|
3451
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "aria-hidden": true, className: "absolute inset-0 bg-page-radial pointer-events-none" }),
|
|
3452
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("relative z-10 w-full", !centered && "h-full min-h-0"), children })
|
|
3397
3453
|
]
|
|
3398
3454
|
}
|
|
3399
3455
|
);
|
|
@@ -3403,7 +3459,7 @@ function HeadlineGradient({
|
|
|
3403
3459
|
as: Tag = "h1",
|
|
3404
3460
|
className
|
|
3405
3461
|
}) {
|
|
3406
|
-
return /* @__PURE__ */ (0,
|
|
3462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3407
3463
|
Tag,
|
|
3408
3464
|
{
|
|
3409
3465
|
className: cn(
|
|
@@ -3415,7 +3471,7 @@ function HeadlineGradient({
|
|
|
3415
3471
|
);
|
|
3416
3472
|
}
|
|
3417
3473
|
function LoadingCard({ message = "Loading...", className }) {
|
|
3418
|
-
return /* @__PURE__ */ (0,
|
|
3474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3419
3475
|
"div",
|
|
3420
3476
|
{
|
|
3421
3477
|
className: cn(
|
|
@@ -3423,8 +3479,8 @@ function LoadingCard({ message = "Loading...", className }) {
|
|
|
3423
3479
|
className
|
|
3424
3480
|
),
|
|
3425
3481
|
children: [
|
|
3426
|
-
/* @__PURE__ */ (0,
|
|
3427
|
-
/* @__PURE__ */ (0,
|
|
3482
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mb-4 size-12 animate-spin rounded-full border-2 border-primary/20 border-t-primary" }),
|
|
3483
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-sm", children: message })
|
|
3428
3484
|
]
|
|
3429
3485
|
}
|
|
3430
3486
|
);
|
|
@@ -3436,15 +3492,15 @@ function ErrorCard({
|
|
|
3436
3492
|
retryLabel = "Try Again",
|
|
3437
3493
|
className
|
|
3438
3494
|
}) {
|
|
3439
|
-
return /* @__PURE__ */ (0,
|
|
3495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3440
3496
|
"div",
|
|
3441
3497
|
{
|
|
3442
3498
|
className: cn("flex flex-col items-center justify-center py-16 text-center", className),
|
|
3443
3499
|
children: [
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3445
|
-
/* @__PURE__ */ (0,
|
|
3446
|
-
/* @__PURE__ */ (0,
|
|
3447
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3500
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mb-4 flex size-16 items-center justify-center rounded-full bg-danger/10", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "material-symbols-outlined text-danger", style: { fontSize: "32px" }, children: "error" }) }),
|
|
3501
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h3", { className: "mb-1 text-base font-semibold", children: title }),
|
|
3502
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "mb-4 max-w-xs text-xs text-muted-foreground", children: description }),
|
|
3503
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3448
3504
|
"button",
|
|
3449
3505
|
{
|
|
3450
3506
|
type: "button",
|
|
@@ -3462,7 +3518,7 @@ function FadeOverlay({
|
|
|
3462
3518
|
heightClassName = "h-12",
|
|
3463
3519
|
className
|
|
3464
3520
|
}) {
|
|
3465
|
-
return /* @__PURE__ */ (0,
|
|
3521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3466
3522
|
"div",
|
|
3467
3523
|
{
|
|
3468
3524
|
"aria-hidden": true,
|
|
@@ -3477,9 +3533,9 @@ function FadeOverlay({
|
|
|
3477
3533
|
}
|
|
3478
3534
|
|
|
3479
3535
|
// src/web/components/activity-list.tsx
|
|
3480
|
-
var
|
|
3536
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3481
3537
|
function DefaultEmptyIcon({ name }) {
|
|
3482
|
-
return /* @__PURE__ */ (0,
|
|
3538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "material-symbols-outlined text-foreground/30", style: { fontSize: "32px" }, children: name });
|
|
3483
3539
|
}
|
|
3484
3540
|
function ActivityList({
|
|
3485
3541
|
items,
|
|
@@ -3499,28 +3555,28 @@ function ActivityList({
|
|
|
3499
3555
|
filteredEmptyDescription = "Try adjusting your search, status, or network filter."
|
|
3500
3556
|
}) {
|
|
3501
3557
|
if (isLoading) {
|
|
3502
|
-
return /* @__PURE__ */ (0,
|
|
3558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadingCard, { message: "Loading activity..." });
|
|
3503
3559
|
}
|
|
3504
3560
|
if (error && items.length === 0) {
|
|
3505
|
-
return /* @__PURE__ */ (0,
|
|
3561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ErrorCard, { title: "Failed to load", description: error, onRetry });
|
|
3506
3562
|
}
|
|
3507
3563
|
if (items.length === 0) {
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
/* @__PURE__ */ (0,
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3512
|
-
hasActiveFilters && onClearFilters ? /* @__PURE__ */ (0,
|
|
3564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col items-center justify-center py-16", children: [
|
|
3565
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mb-4 flex size-16 items-center justify-center rounded-full bg-white/5", children: emptyIcon ?? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DefaultEmptyIcon, { name: "receipt_long" }) }),
|
|
3566
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "mb-1 text-base font-semibold", children: hasActiveFilters ? filteredEmptyTitle : emptyTitle }),
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "mb-4 max-w-[240px] text-center text-xs text-muted-foreground", children: hasActiveFilters ? filteredEmptyDescription : emptyDescription }),
|
|
3568
|
+
hasActiveFilters && onClearFilters ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { variant: "surface", size: "sm", onClick: onClearFilters, children: "Clear Filters" }) : renderEmptyActions?.()
|
|
3513
3569
|
] });
|
|
3514
3570
|
}
|
|
3515
|
-
return /* @__PURE__ */ (0,
|
|
3571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-2.5", children: items.map((item) => {
|
|
3516
3572
|
const isExpanded = expandedId === item.id;
|
|
3517
3573
|
const details = renderDetails?.(item);
|
|
3518
|
-
return /* @__PURE__ */ (0,
|
|
3574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3519
3575
|
"div",
|
|
3520
3576
|
{
|
|
3521
3577
|
className: "relative overflow-hidden rounded-3xl bg-surface-card shadow-inner transition-all animate-in fade-in slide-in-from-bottom-2 duration-500",
|
|
3522
3578
|
children: [
|
|
3523
|
-
/* @__PURE__ */ (0,
|
|
3579
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3524
3580
|
TransactionCard,
|
|
3525
3581
|
{
|
|
3526
3582
|
direction: item.direction,
|
|
@@ -3531,12 +3587,12 @@ function ActivityList({
|
|
|
3531
3587
|
onClick: () => onExpandedChange?.(isExpanded ? null : item.id)
|
|
3532
3588
|
}
|
|
3533
3589
|
),
|
|
3534
|
-
isExpanded && /* @__PURE__ */ (0,
|
|
3535
|
-
(item.network || item.label) && /* @__PURE__ */ (0,
|
|
3536
|
-
item.network && /* @__PURE__ */ (0,
|
|
3537
|
-
item.label && /* @__PURE__ */ (0,
|
|
3590
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "bg-gradient-to-b from-white/[0.025] to-primary/[0.035] shadow-inner animate-in slide-in-from-top-2 duration-300", children: [
|
|
3591
|
+
(item.network || item.label) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-2.5", children: [
|
|
3592
|
+
item.network && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NetworkBadge, { network: item.network, showLabel: true }),
|
|
3593
|
+
item.label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xxs font-medium text-muted-foreground", children: item.label })
|
|
3538
3594
|
] }),
|
|
3539
|
-
details && /* @__PURE__ */ (0,
|
|
3595
|
+
details && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-1.5 px-3 pb-3 pt-1", children: details })
|
|
3540
3596
|
] })
|
|
3541
3597
|
]
|
|
3542
3598
|
},
|
|
@@ -3546,7 +3602,7 @@ function ActivityList({
|
|
|
3546
3602
|
}
|
|
3547
3603
|
|
|
3548
3604
|
// src/web/components/activity-filter-bar.tsx
|
|
3549
|
-
var
|
|
3605
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3550
3606
|
function ActivityFilterBar({
|
|
3551
3607
|
searchTerm,
|
|
3552
3608
|
onSearchTermChange,
|
|
@@ -3557,16 +3613,16 @@ function ActivityFilterBar({
|
|
|
3557
3613
|
onClearFilters,
|
|
3558
3614
|
searchPlaceholder = "Search by txid, asset..."
|
|
3559
3615
|
}) {
|
|
3560
|
-
return /* @__PURE__ */ (0,
|
|
3561
|
-
/* @__PURE__ */ (0,
|
|
3562
|
-
/* @__PURE__ */ (0,
|
|
3616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex h-10 items-center gap-2", children: [
|
|
3617
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative h-full flex-1", children: [
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3563
3619
|
AppIcon,
|
|
3564
3620
|
{
|
|
3565
3621
|
name: "search",
|
|
3566
3622
|
className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-white/40"
|
|
3567
3623
|
}
|
|
3568
3624
|
),
|
|
3569
|
-
/* @__PURE__ */ (0,
|
|
3625
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3570
3626
|
"input",
|
|
3571
3627
|
{
|
|
3572
3628
|
type: "text",
|
|
@@ -3576,45 +3632,45 @@ function ActivityFilterBar({
|
|
|
3576
3632
|
className: "h-full w-full rounded-2xl bg-surface-card pl-9 pr-8 text-xs text-white shadow-inner backdrop-blur-xl transition-all placeholder:text-white/30 focus:bg-surface-elevated focus:outline-none"
|
|
3577
3633
|
}
|
|
3578
3634
|
),
|
|
3579
|
-
searchTerm && /* @__PURE__ */ (0,
|
|
3635
|
+
searchTerm && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3580
3636
|
"button",
|
|
3581
3637
|
{
|
|
3582
3638
|
type: "button",
|
|
3583
3639
|
onClick: () => onSearchTermChange(""),
|
|
3584
3640
|
className: "absolute right-2 top-1/2 -translate-y-1/2 text-white/40 transition-colors hover:text-white",
|
|
3585
|
-
children: /* @__PURE__ */ (0,
|
|
3641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AppIcon, { name: "close", className: "size-icon-sm" })
|
|
3586
3642
|
}
|
|
3587
3643
|
)
|
|
3588
3644
|
] }),
|
|
3589
|
-
/* @__PURE__ */ (0,
|
|
3645
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-full w-28 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3590
3646
|
Select,
|
|
3591
3647
|
{
|
|
3592
3648
|
value: statusFilter,
|
|
3593
3649
|
onValueChange: (value) => onStatusFilterChange(value),
|
|
3594
3650
|
children: [
|
|
3595
|
-
/* @__PURE__ */ (0,
|
|
3596
|
-
/* @__PURE__ */ (0,
|
|
3651
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SelectTrigger, { className: "h-full rounded-2xl border-0 bg-surface-card px-3 py-0 text-xs font-bold text-white shadow-inner backdrop-blur-xl hover:bg-surface-elevated focus:ring-0 data-[state=open]:bg-surface-elevated", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SelectValue, {}) }),
|
|
3652
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SelectContent, { className: "border-0 bg-popover/95 p-1.5 shadow-popover", children: statusOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SelectItem, { value: option.value, className: "py-2 text-xs", children: option.label }, option.value)) })
|
|
3597
3653
|
]
|
|
3598
3654
|
}
|
|
3599
3655
|
) }),
|
|
3600
|
-
hasActiveFilters && onClearFilters && /* @__PURE__ */ (0,
|
|
3656
|
+
hasActiveFilters && onClearFilters && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Button, { variant: "surface", size: "icon-lg", onClick: onClearFilters, title: "Clear Filters", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AppIcon, { name: "close", className: "size-icon-lg" }) })
|
|
3601
3657
|
] });
|
|
3602
3658
|
}
|
|
3603
3659
|
|
|
3604
3660
|
// src/web/components/activity-network-filters.tsx
|
|
3605
|
-
var
|
|
3661
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3606
3662
|
function getActivityNetworkFilterIcon(filter) {
|
|
3607
3663
|
switch (filter) {
|
|
3608
3664
|
case "onchain":
|
|
3609
|
-
return /* @__PURE__ */ (0,
|
|
3665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AppIcon, { name: "onchain", className: "size-icon-sm" });
|
|
3610
3666
|
case "lightning":
|
|
3611
|
-
return /* @__PURE__ */ (0,
|
|
3667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(LightningNetworkIcon, { className: "size-3.5", alt: "" });
|
|
3612
3668
|
case "spark":
|
|
3613
|
-
return /* @__PURE__ */ (0,
|
|
3669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SparkNetworkIcon, { className: "size-3.5", alt: "" });
|
|
3614
3670
|
case "arkade":
|
|
3615
|
-
return /* @__PURE__ */ (0,
|
|
3671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ArkadeNetworkIcon, { className: "size-3.5 rounded", alt: "" });
|
|
3616
3672
|
default:
|
|
3617
|
-
return /* @__PURE__ */ (0,
|
|
3673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AppIcon, { name: "allNetworks", className: "size-icon-sm" });
|
|
3618
3674
|
}
|
|
3619
3675
|
}
|
|
3620
3676
|
function ActivityNetworkFilters({
|
|
@@ -3624,9 +3680,9 @@ function ActivityNetworkFilters({
|
|
|
3624
3680
|
className
|
|
3625
3681
|
}) {
|
|
3626
3682
|
if (filters.length <= 1) return null;
|
|
3627
|
-
return /* @__PURE__ */ (0,
|
|
3683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("flex gap-1.5 overflow-x-auto py-0.5 no-scrollbar", className), children: filters.map((filter) => {
|
|
3628
3684
|
const isActive = activeFilter === filter.value;
|
|
3629
|
-
return /* @__PURE__ */ (0,
|
|
3685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3630
3686
|
"button",
|
|
3631
3687
|
{
|
|
3632
3688
|
type: "button",
|
|
@@ -3636,7 +3692,7 @@ function ActivityNetworkFilters({
|
|
|
3636
3692
|
isActive ? "bg-primary/15 text-primary shadow-inner hover:bg-primary/20" : "bg-surface-card text-white/45 hover:bg-surface-elevated hover:text-white/80"
|
|
3637
3693
|
),
|
|
3638
3694
|
children: [
|
|
3639
|
-
/* @__PURE__ */ (0,
|
|
3695
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3640
3696
|
"span",
|
|
3641
3697
|
{
|
|
3642
3698
|
className: cn(
|
|
@@ -3646,7 +3702,7 @@ function ActivityNetworkFilters({
|
|
|
3646
3702
|
children: filter.icon ?? getActivityNetworkFilterIcon(filter.value)
|
|
3647
3703
|
}
|
|
3648
3704
|
),
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: filter.label })
|
|
3650
3706
|
]
|
|
3651
3707
|
},
|
|
3652
3708
|
filter.value
|
|
@@ -3655,17 +3711,17 @@ function ActivityNetworkFilters({
|
|
|
3655
3711
|
}
|
|
3656
3712
|
|
|
3657
3713
|
// src/web/components/activity-type-tabs.tsx
|
|
3658
|
-
var
|
|
3714
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3659
3715
|
function ActivityTypeTabs({ counts = {} }) {
|
|
3660
|
-
return /* @__PURE__ */ (0,
|
|
3661
|
-
/* @__PURE__ */ (0,
|
|
3716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(TabsList, { className: "grid h-12 w-full grid-cols-4 gap-1 rounded-full bg-surface-card p-1 backdrop-blur-xl", children: [
|
|
3717
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3662
3718
|
TabsTrigger,
|
|
3663
3719
|
{
|
|
3664
3720
|
value: "all",
|
|
3665
3721
|
className: "h-full rounded-full px-2 text-xs font-bold tracking-wide transition-all data-[state=active]:bg-surface-elevated data-[state=active]:text-white",
|
|
3666
3722
|
children: [
|
|
3667
3723
|
"All",
|
|
3668
|
-
counts.all ? /* @__PURE__ */ (0,
|
|
3724
|
+
counts.all ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "ml-1 opacity-60", children: [
|
|
3669
3725
|
"(",
|
|
3670
3726
|
counts.all,
|
|
3671
3727
|
")"
|
|
@@ -3673,13 +3729,13 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3673
3729
|
]
|
|
3674
3730
|
}
|
|
3675
3731
|
),
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3732
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3677
3733
|
TabsTrigger,
|
|
3678
3734
|
{
|
|
3679
3735
|
value: "received",
|
|
3680
3736
|
className: "group h-full rounded-full px-1.5 text-xs font-bold tracking-wide transition-all hover:text-tx-receive data-[state=active]:bg-tx-receive/15 data-[state=active]:text-tx-receive data-[state=active]:hover:bg-tx-receive/20 data-[state=active]:hover:text-tx-receive",
|
|
3681
3737
|
children: [
|
|
3682
|
-
/* @__PURE__ */ (0,
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3683
3739
|
AppIcon,
|
|
3684
3740
|
{
|
|
3685
3741
|
name: "receive",
|
|
@@ -3687,17 +3743,17 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3687
3743
|
className: "mr-1 shrink-0 leading-none text-muted-foreground transition-colors group-hover:text-tx-receive group-data-[state=active]:text-tx-receive"
|
|
3688
3744
|
}
|
|
3689
3745
|
),
|
|
3690
|
-
/* @__PURE__ */ (0,
|
|
3746
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "In" })
|
|
3691
3747
|
]
|
|
3692
3748
|
}
|
|
3693
3749
|
),
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3750
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3695
3751
|
TabsTrigger,
|
|
3696
3752
|
{
|
|
3697
3753
|
value: "sent",
|
|
3698
3754
|
className: "group h-full rounded-full px-1.5 text-xs font-bold tracking-wide transition-all hover:text-tx-sent data-[state=active]:bg-tx-sent/15 data-[state=active]:text-tx-sent data-[state=active]:hover:bg-tx-sent/20 data-[state=active]:hover:text-tx-sent",
|
|
3699
3755
|
children: [
|
|
3700
|
-
/* @__PURE__ */ (0,
|
|
3756
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3701
3757
|
AppIcon,
|
|
3702
3758
|
{
|
|
3703
3759
|
name: "send",
|
|
@@ -3705,17 +3761,17 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3705
3761
|
className: "mr-1 shrink-0 leading-none text-muted-foreground transition-colors group-hover:text-tx-sent group-data-[state=active]:text-tx-sent"
|
|
3706
3762
|
}
|
|
3707
3763
|
),
|
|
3708
|
-
/* @__PURE__ */ (0,
|
|
3764
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "Out" })
|
|
3709
3765
|
]
|
|
3710
3766
|
}
|
|
3711
3767
|
),
|
|
3712
|
-
/* @__PURE__ */ (0,
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3713
3769
|
TabsTrigger,
|
|
3714
3770
|
{
|
|
3715
3771
|
value: "swaps",
|
|
3716
3772
|
className: "group h-full rounded-full px-1.5 text-xs font-bold tracking-wide transition-all hover:text-network-arkade data-[state=active]:bg-network-arkade/15 data-[state=active]:text-network-arkade data-[state=active]:hover:bg-network-arkade/20 data-[state=active]:hover:text-network-arkade",
|
|
3717
3773
|
children: [
|
|
3718
|
-
/* @__PURE__ */ (0,
|
|
3774
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3719
3775
|
AppIcon,
|
|
3720
3776
|
{
|
|
3721
3777
|
name: "swap",
|
|
@@ -3723,7 +3779,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3723
3779
|
className: "mr-1 shrink-0 leading-none text-muted-foreground transition-colors group-hover:text-network-arkade group-data-[state=active]:text-network-arkade"
|
|
3724
3780
|
}
|
|
3725
3781
|
),
|
|
3726
|
-
/* @__PURE__ */ (0,
|
|
3782
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "Swaps" })
|
|
3727
3783
|
]
|
|
3728
3784
|
}
|
|
3729
3785
|
)
|
|
@@ -3731,7 +3787,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3731
3787
|
}
|
|
3732
3788
|
|
|
3733
3789
|
// src/web/components/activity-detail-row.tsx
|
|
3734
|
-
var
|
|
3790
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3735
3791
|
function ActivityDetailRow({
|
|
3736
3792
|
label,
|
|
3737
3793
|
value,
|
|
@@ -3739,11 +3795,11 @@ function ActivityDetailRow({
|
|
|
3739
3795
|
onCopy,
|
|
3740
3796
|
isCopied
|
|
3741
3797
|
}) {
|
|
3742
|
-
return /* @__PURE__ */ (0,
|
|
3743
|
-
/* @__PURE__ */ (0,
|
|
3744
|
-
/* @__PURE__ */ (0,
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3746
|
-
onCopy && /* @__PURE__ */ (0,
|
|
3798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center justify-between py-1 last:pb-0", children: [
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-muted-foreground", children: label }),
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex max-w-[65%] items-center gap-2", children: [
|
|
3801
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate font-mono text-xs font-medium text-white/90", children: value }),
|
|
3802
|
+
onCopy && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3747
3803
|
"button",
|
|
3748
3804
|
{
|
|
3749
3805
|
type: "button",
|
|
@@ -3753,7 +3809,7 @@ function ActivityDetailRow({
|
|
|
3753
3809
|
},
|
|
3754
3810
|
className: "rounded-md p-1 text-white/30 transition-colors hover:bg-accent hover:text-primary active:scale-95",
|
|
3755
3811
|
title: fullValue ? `Copy: ${fullValue}` : "Copy",
|
|
3756
|
-
children: /* @__PURE__ */ (0,
|
|
3812
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: "14px" }, children: isCopied ? "check" : "content_copy" })
|
|
3757
3813
|
}
|
|
3758
3814
|
)
|
|
3759
3815
|
] })
|
|
@@ -3761,7 +3817,7 @@ function ActivityDetailRow({
|
|
|
3761
3817
|
}
|
|
3762
3818
|
|
|
3763
3819
|
// src/web/components/withdraw-destination-input.tsx
|
|
3764
|
-
var
|
|
3820
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3765
3821
|
function WithdrawDestinationInput({
|
|
3766
3822
|
destination,
|
|
3767
3823
|
setDestination,
|
|
@@ -3772,10 +3828,10 @@ function WithdrawDestinationInput({
|
|
|
3772
3828
|
handlePaste,
|
|
3773
3829
|
handleReset
|
|
3774
3830
|
}) {
|
|
3775
|
-
return /* @__PURE__ */ (0,
|
|
3776
|
-
/* @__PURE__ */ (0,
|
|
3777
|
-
/* @__PURE__ */ (0,
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "space-y-2", children: [
|
|
3832
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Destination" }),
|
|
3833
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "relative", children: [
|
|
3834
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3779
3835
|
"input",
|
|
3780
3836
|
{
|
|
3781
3837
|
type: "text",
|
|
@@ -3786,8 +3842,8 @@ function WithdrawDestinationInput({
|
|
|
3786
3842
|
onChange: (event) => setDestination(event.target.value)
|
|
3787
3843
|
}
|
|
3788
3844
|
),
|
|
3789
|
-
/* @__PURE__ */ (0,
|
|
3790
|
-
destination && /* @__PURE__ */ (0,
|
|
3845
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "absolute right-4 top-1/2 flex -translate-y-1/2 items-center gap-2", children: [
|
|
3846
|
+
destination && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3791
3847
|
"button",
|
|
3792
3848
|
{
|
|
3793
3849
|
type: "button",
|
|
@@ -3796,10 +3852,10 @@ function WithdrawDestinationInput({
|
|
|
3796
3852
|
handleReset();
|
|
3797
3853
|
},
|
|
3798
3854
|
className: "text-xs text-muted-foreground transition-colors hover:text-white",
|
|
3799
|
-
children: /* @__PURE__ */ (0,
|
|
3855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "material-symbols-outlined text-icon-md", children: "close" })
|
|
3800
3856
|
}
|
|
3801
3857
|
),
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3803
3859
|
"button",
|
|
3804
3860
|
{
|
|
3805
3861
|
type: "button",
|
|
@@ -3810,24 +3866,24 @@ function WithdrawDestinationInput({
|
|
|
3810
3866
|
)
|
|
3811
3867
|
] })
|
|
3812
3868
|
] }),
|
|
3813
|
-
destination && /* @__PURE__ */ (0,
|
|
3814
|
-
/* @__PURE__ */ (0,
|
|
3869
|
+
destination && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "ml-1 flex items-center gap-2 text-xs", children: isDecoding || isResolvingLnurl ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-1 text-muted-foreground", children: [
|
|
3870
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-sm", children: "progress_activity" }),
|
|
3815
3871
|
isResolvingLnurl ? "Resolving..." : "Decoding..."
|
|
3816
|
-
] }) : addressType !== "unknown" && addressType !== "invalid" ? /* @__PURE__ */ (0,
|
|
3817
|
-
/* @__PURE__ */ (0,
|
|
3818
|
-
/* @__PURE__ */ (0,
|
|
3872
|
+
] }) : addressType !== "unknown" && addressType !== "invalid" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3873
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-primary", children: "\u2713" }),
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { "data-testid": "withdraw-detected-network", className: "text-muted-foreground", children: [
|
|
3819
3875
|
"Detected: ",
|
|
3820
3876
|
detectedNetworkLabel ?? addressType
|
|
3821
3877
|
] })
|
|
3822
|
-
] }) : addressType === "invalid" ? /* @__PURE__ */ (0,
|
|
3823
|
-
/* @__PURE__ */ (0,
|
|
3824
|
-
/* @__PURE__ */ (0,
|
|
3878
|
+
] }) : addressType === "invalid" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3879
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-danger", children: "\u2717" }),
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { "data-testid": "withdraw-invalid-destination", className: "text-danger", children: "Invalid address format" })
|
|
3825
3881
|
] }) : null })
|
|
3826
3882
|
] });
|
|
3827
3883
|
}
|
|
3828
3884
|
|
|
3829
3885
|
// src/web/components/withdraw-amount-input.tsx
|
|
3830
|
-
var
|
|
3886
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3831
3887
|
function WithdrawAmountInput({
|
|
3832
3888
|
addressType,
|
|
3833
3889
|
amount,
|
|
@@ -3849,13 +3905,13 @@ function WithdrawAmountInput({
|
|
|
3849
3905
|
}) {
|
|
3850
3906
|
const unitLabel = selectedAssetId === "BTC" ? "sats" : selectedAssetTicker ?? "units";
|
|
3851
3907
|
const showAmountInput = addressType === "bitcoin" || addressType === "spark" || addressType === "arkade" || addressType === "lightning-address" || addressType === "lnurl-pay" || addressType === "rgb" && !decodedRgbInvoice?.assignment?.value || addressType === "lightning" && !decodedLnInvoice?.amount && !decodedLnInvoice?.asset_amount;
|
|
3852
|
-
return /* @__PURE__ */ (0,
|
|
3853
|
-
showAmountInput && /* @__PURE__ */ (0,
|
|
3854
|
-
/* @__PURE__ */ (0,
|
|
3855
|
-
/* @__PURE__ */ (0,
|
|
3856
|
-
/* @__PURE__ */ (0,
|
|
3857
|
-
/* @__PURE__ */ (0,
|
|
3858
|
-
/* @__PURE__ */ (0,
|
|
3908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
3909
|
+
showAmountInput && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-2", children: [
|
|
3910
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Amount" }),
|
|
3911
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative flex flex-col items-center justify-center gap-2 overflow-hidden rounded-3xl border bg-card/90 px-6 py-8 shadow-lg backdrop-blur-2xl transition-all focus-within:border-primary/50", children: [
|
|
3912
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-b from-transparent to-primary/5" }),
|
|
3913
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "z-10 flex w-full items-baseline justify-center gap-2", children: [
|
|
3914
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3859
3915
|
"input",
|
|
3860
3916
|
{
|
|
3861
3917
|
type: "text",
|
|
@@ -3866,9 +3922,9 @@ function WithdrawAmountInput({
|
|
|
3866
3922
|
onChange: handleAmountChange
|
|
3867
3923
|
}
|
|
3868
3924
|
),
|
|
3869
|
-
/* @__PURE__ */ (0,
|
|
3925
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-xl font-medium text-muted-foreground", children: unitLabel })
|
|
3870
3926
|
] }),
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3872
3928
|
"button",
|
|
3873
3929
|
{
|
|
3874
3930
|
type: "button",
|
|
@@ -3878,26 +3934,26 @@ function WithdrawAmountInput({
|
|
|
3878
3934
|
}
|
|
3879
3935
|
)
|
|
3880
3936
|
] }),
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
3937
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "mt-1 px-1 text-right text-xs text-muted-foreground", children: [
|
|
3882
3938
|
"Available: ",
|
|
3883
3939
|
formattedBalance,
|
|
3884
3940
|
" ",
|
|
3885
3941
|
unitLabel
|
|
3886
3942
|
] }),
|
|
3887
|
-
lnurlPayData && /* @__PURE__ */ (0,
|
|
3888
|
-
/* @__PURE__ */ (0,
|
|
3943
|
+
lnurlPayData && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "mt-2 space-y-1 px-1", children: [
|
|
3944
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
3889
3945
|
Math.ceil(lnurlPayData.params.min).toLocaleString(),
|
|
3890
3946
|
" \u2013",
|
|
3891
3947
|
" ",
|
|
3892
3948
|
Math.floor(lnurlPayData.params.max).toLocaleString(),
|
|
3893
3949
|
" sats"
|
|
3894
3950
|
] }),
|
|
3895
|
-
lnurlPayData.params.description && /* @__PURE__ */ (0,
|
|
3951
|
+
lnurlPayData.params.description && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xs italic text-muted-foreground", children: lnurlPayData.params.description })
|
|
3896
3952
|
] })
|
|
3897
3953
|
] }),
|
|
3898
|
-
addressType === "rgb" && decodedRgbInvoice?.recipient_type === "Witness" && /* @__PURE__ */ (0,
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
3900
|
-
/* @__PURE__ */ (0,
|
|
3954
|
+
addressType === "rgb" && decodedRgbInvoice?.recipient_type === "Witness" && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-2", children: [
|
|
3955
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: "ml-1 text-xs font-medium text-muted-foreground", children: "Witness Amount (sats) - min 512" }),
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3901
3957
|
"input",
|
|
3902
3958
|
{
|
|
3903
3959
|
type: "number",
|
|
@@ -3910,32 +3966,32 @@ function WithdrawAmountInput({
|
|
|
3910
3966
|
className: "w-full rounded-xl border bg-card px-4 py-3 text-sm text-white transition-colors focus:border-primary/50 focus:outline-none"
|
|
3911
3967
|
}
|
|
3912
3968
|
),
|
|
3913
|
-
/* @__PURE__ */ (0,
|
|
3969
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "ml-1 text-xs text-muted-foreground", children: "Bitcoin amount sent to create the witness UTXO for the recipient." })
|
|
3914
3970
|
] }),
|
|
3915
|
-
(addressType === "bitcoin" || addressType === "rgb") && /* @__PURE__ */ (0,
|
|
3916
|
-
/* @__PURE__ */ (0,
|
|
3917
|
-
/* @__PURE__ */ (0,
|
|
3971
|
+
(addressType === "bitcoin" || addressType === "rgb") && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-2", children: [
|
|
3972
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Fee Rate" }),
|
|
3973
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "grid grid-cols-3 gap-3", children: ["slow", "normal", "fast"].map((rate) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3918
3974
|
"button",
|
|
3919
3975
|
{
|
|
3920
3976
|
type: "button",
|
|
3921
3977
|
onClick: () => setFeeRate(rate),
|
|
3922
3978
|
className: `group relative overflow-hidden rounded-[16px] border px-3 py-3 shadow-sm transition-all active:scale-[0.98] ${feeRate === rate ? "border-primary/40 bg-primary/10" : "border-border bg-card/40 backdrop-blur-xl hover:border-primary/40"}`,
|
|
3923
3979
|
children: [
|
|
3924
|
-
/* @__PURE__ */ (0,
|
|
3980
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3925
3981
|
"div",
|
|
3926
3982
|
{
|
|
3927
3983
|
className: `pointer-events-none absolute inset-0 bg-gradient-to-br from-primary/10 to-transparent transition-opacity ${feeRate === rate ? "opacity-100" : "opacity-0 group-hover:opacity-100"}`
|
|
3928
3984
|
}
|
|
3929
3985
|
),
|
|
3930
|
-
/* @__PURE__ */ (0,
|
|
3931
|
-
/* @__PURE__ */ (0,
|
|
3986
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative z-10 flex flex-col items-center", children: [
|
|
3987
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3932
3988
|
"div",
|
|
3933
3989
|
{
|
|
3934
3990
|
className: `text-sm font-bold capitalize transition-colors ${feeRate === rate ? "text-primary" : "text-muted-foreground group-hover:text-primary"}`,
|
|
3935
3991
|
children: rate
|
|
3936
3992
|
}
|
|
3937
3993
|
),
|
|
3938
|
-
/* @__PURE__ */ (0,
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3939
3995
|
"div",
|
|
3940
3996
|
{
|
|
3941
3997
|
className: `mt-0.5 text-xxs font-medium transition-colors ${feeRate === rate ? "text-primary/70" : "text-white/40 group-hover:text-white/70"}`,
|
|
@@ -3951,18 +4007,18 @@ function WithdrawAmountInput({
|
|
|
3951
4007
|
rate
|
|
3952
4008
|
)) })
|
|
3953
4009
|
] }),
|
|
3954
|
-
addressType === "rgb" && /* @__PURE__ */ (0,
|
|
3955
|
-
/* @__PURE__ */ (0,
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
3957
|
-
/* @__PURE__ */ (0,
|
|
4010
|
+
addressType === "rgb" && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between rounded-xl border bg-card p-3", children: [
|
|
4011
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm font-medium text-white", children: "Gift / Donation" }),
|
|
4013
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xs text-muted-foreground", children: "Skip amount checks for this transfer" })
|
|
3958
4014
|
] }),
|
|
3959
|
-
/* @__PURE__ */ (0,
|
|
4015
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3960
4016
|
"button",
|
|
3961
4017
|
{
|
|
3962
4018
|
type: "button",
|
|
3963
4019
|
className: `relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${donation ? "bg-primary" : "bg-secondary"}`,
|
|
3964
4020
|
onClick: () => setDonation(!donation),
|
|
3965
|
-
children: /* @__PURE__ */ (0,
|
|
4021
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3966
4022
|
"span",
|
|
3967
4023
|
{
|
|
3968
4024
|
className: `inline-block h-4 w-4 rounded-full transition-transform ${donation ? "translate-x-6 bg-black" : "translate-x-1 bg-foreground/90"}`
|
|
@@ -3975,7 +4031,7 @@ function WithdrawAmountInput({
|
|
|
3975
4031
|
}
|
|
3976
4032
|
|
|
3977
4033
|
// src/web/components/withdraw-invoice-info.tsx
|
|
3978
|
-
var
|
|
4034
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3979
4035
|
function getAssetPrecisionForId(allAssets, assetId) {
|
|
3980
4036
|
return allAssets.find((asset) => asset.asset_id === assetId)?.precision ?? 0;
|
|
3981
4037
|
}
|
|
@@ -3996,31 +4052,31 @@ function WithdrawInvoiceInfo({
|
|
|
3996
4052
|
maxLightningCapacity
|
|
3997
4053
|
}) {
|
|
3998
4054
|
if (decodedLnInvoice && addressType === "lightning") {
|
|
3999
|
-
return /* @__PURE__ */ (0,
|
|
4000
|
-
/* @__PURE__ */ (0,
|
|
4001
|
-
decodedLnInvoice.amount != null && decodedLnInvoice.amount > 0 && /* @__PURE__ */ (0,
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4003
|
-
/* @__PURE__ */ (0,
|
|
4055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "space-y-3 rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4056
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-primary", children: "Lightning Invoice" }),
|
|
4057
|
+
decodedLnInvoice.amount != null && decodedLnInvoice.amount > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4058
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Amount" }),
|
|
4059
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "font-bold text-white", children: [
|
|
4004
4060
|
decodedLnInvoice.amount.toLocaleString(),
|
|
4005
4061
|
" ",
|
|
4006
4062
|
decodedLnInvoice.asset_id ? "units" : "sats"
|
|
4007
4063
|
] })
|
|
4008
4064
|
] }),
|
|
4009
|
-
decodedLnInvoice.asset_id && /* @__PURE__ */ (0,
|
|
4010
|
-
/* @__PURE__ */ (0,
|
|
4011
|
-
/* @__PURE__ */ (0,
|
|
4065
|
+
decodedLnInvoice.asset_id && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4066
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Asset" }),
|
|
4067
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-mono text-xs text-white", children: allAssets.find((asset) => asset.asset_id === decodedLnInvoice.asset_id)?.ticker ?? `${decodedLnInvoice.asset_id.substring(0, 12)}...` })
|
|
4012
4068
|
] }),
|
|
4013
|
-
decodedLnInvoice.asset_amount != null && decodedLnInvoice.asset_amount > 0 && /* @__PURE__ */ (0,
|
|
4014
|
-
/* @__PURE__ */ (0,
|
|
4015
|
-
/* @__PURE__ */ (0,
|
|
4069
|
+
decodedLnInvoice.asset_amount != null && decodedLnInvoice.asset_amount > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4070
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Asset Amount" }),
|
|
4071
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-bold text-white", children: decodedLnInvoice.asset_amount.toLocaleString() })
|
|
4016
4072
|
] }),
|
|
4017
|
-
decodedLnInvoice.description && /* @__PURE__ */ (0,
|
|
4018
|
-
/* @__PURE__ */ (0,
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
4073
|
+
decodedLnInvoice.description && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4074
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Description" }),
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "max-w-[180px] truncate text-right text-white", children: decodedLnInvoice.description })
|
|
4020
4076
|
] }),
|
|
4021
|
-
/* @__PURE__ */ (0,
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4077
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Channel Capacity" }),
|
|
4079
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "text-white", children: [
|
|
4024
4080
|
Math.floor(maxLightningCapacity / 1e3).toLocaleString(),
|
|
4025
4081
|
" sats"
|
|
4026
4082
|
] })
|
|
@@ -4028,26 +4084,26 @@ function WithdrawInvoiceInfo({
|
|
|
4028
4084
|
] });
|
|
4029
4085
|
}
|
|
4030
4086
|
if (decodedRgbInvoice && addressType === "rgb") {
|
|
4031
|
-
return /* @__PURE__ */ (0,
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
4033
|
-
decodedRgbInvoice.asset_id && /* @__PURE__ */ (0,
|
|
4034
|
-
/* @__PURE__ */ (0,
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "space-y-3 rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4088
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-primary", children: "RGB Invoice" }),
|
|
4089
|
+
decodedRgbInvoice.asset_id && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4090
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Asset" }),
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-mono text-xs text-white", children: allAssets.find((asset) => asset.asset_id === decodedRgbInvoice.asset_id)?.ticker ?? `${decodedRgbInvoice.asset_id.substring(0, 8)}...${decodedRgbInvoice.asset_id.slice(-8)}` })
|
|
4036
4092
|
] }),
|
|
4037
|
-
decodedRgbInvoice.assignment?.value != null && decodedRgbInvoice.assignment.value > 0 && /* @__PURE__ */ (0,
|
|
4038
|
-
/* @__PURE__ */ (0,
|
|
4039
|
-
/* @__PURE__ */ (0,
|
|
4093
|
+
decodedRgbInvoice.assignment?.value != null && decodedRgbInvoice.assignment.value > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4094
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Requested Amount" }),
|
|
4095
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-bold text-white", children: formatRawAmount(
|
|
4040
4096
|
decodedRgbInvoice.assignment.value,
|
|
4041
4097
|
getAssetPrecisionForId(allAssets, decodedRgbInvoice.asset_id ?? selectedAssetId)
|
|
4042
4098
|
) })
|
|
4043
4099
|
] }),
|
|
4044
|
-
decodedRgbInvoice.recipient_type && /* @__PURE__ */ (0,
|
|
4045
|
-
/* @__PURE__ */ (0,
|
|
4046
|
-
/* @__PURE__ */ (0,
|
|
4100
|
+
decodedRgbInvoice.recipient_type && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4101
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Recipient Type" }),
|
|
4102
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-white", children: decodedRgbInvoice.recipient_type })
|
|
4047
4103
|
] }),
|
|
4048
|
-
/* @__PURE__ */ (0,
|
|
4049
|
-
/* @__PURE__ */ (0,
|
|
4050
|
-
/* @__PURE__ */ (0,
|
|
4104
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4105
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Your Balance" }),
|
|
4106
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "text-white", children: [
|
|
4051
4107
|
formatRawAmount(assetBalance, getAssetPrecisionForId(allAssets, selectedAssetId)),
|
|
4052
4108
|
" ",
|
|
4053
4109
|
selectedAssetTicker ?? "units"
|
|
@@ -4056,9 +4112,9 @@ function WithdrawInvoiceInfo({
|
|
|
4056
4112
|
] });
|
|
4057
4113
|
}
|
|
4058
4114
|
if (addressType === "bitcoin" || addressType === "arkade") {
|
|
4059
|
-
return /* @__PURE__ */ (0,
|
|
4060
|
-
/* @__PURE__ */ (0,
|
|
4061
|
-
/* @__PURE__ */ (0,
|
|
4115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "rounded-2xl border bg-card p-5 shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4116
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: addressType === "arkade" ? "Available Arkade Balance" : "Available Balance" }),
|
|
4117
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "font-bold text-white", children: [
|
|
4062
4118
|
formatRawAmount(assetBalance, getAssetPrecisionForId(allAssets, selectedAssetId)),
|
|
4063
4119
|
" ",
|
|
4064
4120
|
selectedAssetTicker ?? "sats"
|
|
@@ -4069,14 +4125,14 @@ function WithdrawInvoiceInfo({
|
|
|
4069
4125
|
}
|
|
4070
4126
|
|
|
4071
4127
|
// src/web/components/withdraw-route-selector.tsx
|
|
4072
|
-
var
|
|
4128
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4073
4129
|
function RouteChoiceCard({
|
|
4074
4130
|
route,
|
|
4075
4131
|
selected,
|
|
4076
4132
|
recommended,
|
|
4077
4133
|
onClick
|
|
4078
4134
|
}) {
|
|
4079
|
-
return /* @__PURE__ */ (0,
|
|
4135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4080
4136
|
"button",
|
|
4081
4137
|
{
|
|
4082
4138
|
type: "button",
|
|
@@ -4087,17 +4143,17 @@ function RouteChoiceCard({
|
|
|
4087
4143
|
selected ? "border-primary/30 bg-primary/10" : "border-border bg-white/4 hover:border-white/20 hover:bg-white/6"
|
|
4088
4144
|
),
|
|
4089
4145
|
children: [
|
|
4090
|
-
/* @__PURE__ */ (0,
|
|
4091
|
-
/* @__PURE__ */ (0,
|
|
4092
|
-
/* @__PURE__ */ (0,
|
|
4093
|
-
/* @__PURE__ */ (0,
|
|
4094
|
-
recommended && /* @__PURE__ */ (0,
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
|
|
4150
|
+
recommended && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xxs font-bold uppercase tracking-wider text-primary", children: "Recommended" })
|
|
4095
4151
|
] }),
|
|
4096
|
-
/* @__PURE__ */ (0,
|
|
4152
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
|
|
4097
4153
|
] }),
|
|
4098
|
-
/* @__PURE__ */ (0,
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint })
|
|
4099
4155
|
] }),
|
|
4100
|
-
/* @__PURE__ */ (0,
|
|
4156
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary })
|
|
4101
4157
|
]
|
|
4102
4158
|
}
|
|
4103
4159
|
);
|
|
@@ -4110,12 +4166,12 @@ function WithdrawRouteSelector({
|
|
|
4110
4166
|
selectedAccountTitle,
|
|
4111
4167
|
onRouteChange
|
|
4112
4168
|
}) {
|
|
4113
|
-
return /* @__PURE__ */ (0,
|
|
4114
|
-
/* @__PURE__ */ (0,
|
|
4115
|
-
/* @__PURE__ */ (0,
|
|
4116
|
-
/* @__PURE__ */ (0,
|
|
4169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "space-y-3", children: [
|
|
4170
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Route" }),
|
|
4172
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "ml-1 mt-1 text-xs text-muted-foreground", children: "Choose the account to spend from. The transfer method is derived from the destination you entered." })
|
|
4117
4173
|
] }),
|
|
4118
|
-
/* @__PURE__ */ (0,
|
|
4174
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "space-y-2", children: routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4119
4175
|
RouteChoiceCard,
|
|
4120
4176
|
{
|
|
4121
4177
|
route,
|
|
@@ -4125,19 +4181,19 @@ function WithdrawRouteSelector({
|
|
|
4125
4181
|
},
|
|
4126
4182
|
route.account
|
|
4127
4183
|
)) }),
|
|
4128
|
-
selectedRouteSummary && activeRouteAccount && /* @__PURE__ */ (0,
|
|
4129
|
-
/* @__PURE__ */ (0,
|
|
4130
|
-
/* @__PURE__ */ (0,
|
|
4131
|
-
/* @__PURE__ */ (0,
|
|
4184
|
+
selectedRouteSummary && activeRouteAccount && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "rounded-2xl border bg-white/4 p-4", children: [
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xs uppercase tracking-wider text-white/35", children: "Selected path" }),
|
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xs font-bold text-white", children: selectedAccountTitle })
|
|
4132
4188
|
] }),
|
|
4133
|
-
/* @__PURE__ */ (0,
|
|
4134
|
-
/* @__PURE__ */ (0,
|
|
4189
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-2 text-sm font-semibold text-white", children: selectedRouteSummary.methodLabel }),
|
|
4190
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: selectedRouteSummary.summary })
|
|
4135
4191
|
] })
|
|
4136
4192
|
] });
|
|
4137
4193
|
}
|
|
4138
4194
|
|
|
4139
4195
|
// src/web/components/withdraw-confirmation.tsx
|
|
4140
|
-
var
|
|
4196
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4141
4197
|
function WithdrawConfirmation({
|
|
4142
4198
|
isConfirming,
|
|
4143
4199
|
isPollingStatus,
|
|
@@ -4157,8 +4213,8 @@ function WithdrawConfirmation({
|
|
|
4157
4213
|
amount,
|
|
4158
4214
|
handleConfirmSend
|
|
4159
4215
|
}) {
|
|
4160
|
-
return /* @__PURE__ */ (0,
|
|
4161
|
-
/* @__PURE__ */ (0,
|
|
4216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-h-screen bg-background pb-6 font-display text-foreground", children: [
|
|
4217
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4162
4218
|
PageHeader,
|
|
4163
4219
|
{
|
|
4164
4220
|
title: "Confirm Payment",
|
|
@@ -4170,71 +4226,71 @@ function WithdrawConfirmation({
|
|
|
4170
4226
|
className: isConfirming || isPollingStatus ? "pointer-events-none opacity-70" : void 0
|
|
4171
4227
|
}
|
|
4172
4228
|
),
|
|
4173
|
-
/* @__PURE__ */ (0,
|
|
4174
|
-
/* @__PURE__ */ (0,
|
|
4175
|
-
/* @__PURE__ */ (0,
|
|
4176
|
-
/* @__PURE__ */ (0,
|
|
4177
|
-
/* @__PURE__ */ (0,
|
|
4229
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("main", { className: "space-y-6 px-5", children: [
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-center py-6", children: [
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "mb-1 text-sm uppercase tracking-wide text-muted-foreground", children: "Sending" }),
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h1", { className: "mb-2 text-4xl font-bold", children: displayAmount.toLocaleString() }),
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-base text-muted-foreground", children: selectedAssetId === "BTC" ? "sats" : selectedAsset?.ticker ?? "units" })
|
|
4178
4234
|
] }),
|
|
4179
|
-
/* @__PURE__ */ (0,
|
|
4180
|
-
/* @__PURE__ */ (0,
|
|
4181
|
-
/* @__PURE__ */ (0,
|
|
4182
|
-
/* @__PURE__ */ (0,
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "overflow-hidden rounded-2xl border bg-card/90 shadow-inner backdrop-blur-2xl", children: [
|
|
4236
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4237
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "To" }),
|
|
4238
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "max-w-[200px] truncate font-mono text-sm text-white", title: destination, children: destination.length > 24 ? `${destination.substring(0, 12)}...${destination.slice(-12)}` : destination })
|
|
4183
4239
|
] }),
|
|
4184
|
-
/* @__PURE__ */ (0,
|
|
4185
|
-
/* @__PURE__ */ (0,
|
|
4186
|
-
/* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4188
|
-
/* @__PURE__ */ (0,
|
|
4240
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4241
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Network" }),
|
|
4242
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
4243
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "size-1.5 rounded-full bg-primary" }),
|
|
4244
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: networkLabel })
|
|
4189
4245
|
] })
|
|
4190
4246
|
] }),
|
|
4191
|
-
routeAccount && /* @__PURE__ */ (0,
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4193
|
-
/* @__PURE__ */ (0,
|
|
4247
|
+
routeAccount && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4248
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "From Account" }),
|
|
4249
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: routeAccount })
|
|
4194
4250
|
] }),
|
|
4195
|
-
routeMethod && /* @__PURE__ */ (0,
|
|
4196
|
-
/* @__PURE__ */ (0,
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4251
|
+
routeMethod && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4252
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Route Method" }),
|
|
4253
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: routeMethod })
|
|
4198
4254
|
] }),
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4200
|
-
/* @__PURE__ */ (0,
|
|
4201
|
-
/* @__PURE__ */ (0,
|
|
4255
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4256
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Asset" }),
|
|
4257
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: selectedAsset?.ticker ?? selectedAssetId })
|
|
4202
4258
|
] }),
|
|
4203
|
-
estimatedFee > 0 && /* @__PURE__ */ (0,
|
|
4204
|
-
/* @__PURE__ */ (0,
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4206
|
-
/* @__PURE__ */ (0,
|
|
4259
|
+
estimatedFee > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between p-5", children: [
|
|
4260
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Network Fee" }),
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-end", children: [
|
|
4262
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "text-sm text-white", children: [
|
|
4207
4263
|
"~",
|
|
4208
4264
|
estimatedFee.toLocaleString(),
|
|
4209
4265
|
" sats"
|
|
4210
4266
|
] }),
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4267
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "mt-0.5 text-xxs font-bold capitalize tracking-wider text-primary", children: feeRate })
|
|
4212
4268
|
] })
|
|
4213
4269
|
] }),
|
|
4214
|
-
addressType === "rgb" && decodedRgbInvoice?.recipient_type === "Witness" && /* @__PURE__ */ (0,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4270
|
+
addressType === "rgb" && decodedRgbInvoice?.recipient_type === "Witness" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-t border-border p-4", children: [
|
|
4271
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Witness Amount" }),
|
|
4272
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "text-sm text-white", children: [
|
|
4217
4273
|
witnessAmountSat,
|
|
4218
4274
|
" sats"
|
|
4219
4275
|
] })
|
|
4220
4276
|
] })
|
|
4221
4277
|
] }),
|
|
4222
|
-
selectedAssetId === "BTC" && estimatedFee > 0 && /* @__PURE__ */ (0,
|
|
4223
|
-
/* @__PURE__ */ (0,
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4278
|
+
selectedAssetId === "BTC" && estimatedFee > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between rounded-2xl border border-primary/20 bg-primary/10 p-5 px-2 shadow-inner", children: [
|
|
4279
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold uppercase tracking-wider text-primary", children: "Total to deduct" }),
|
|
4280
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "text-xl font-bold text-white", children: [
|
|
4225
4281
|
(Math.round(parseFloat(amount) || 0) + estimatedFee).toLocaleString(),
|
|
4226
4282
|
" ",
|
|
4227
|
-
/* @__PURE__ */ (0,
|
|
4283
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-lg text-primary/70", children: "sats" })
|
|
4228
4284
|
] })
|
|
4229
4285
|
] }),
|
|
4230
|
-
isPollingStatus && /* @__PURE__ */ (0,
|
|
4231
|
-
/* @__PURE__ */ (0,
|
|
4232
|
-
/* @__PURE__ */ (0,
|
|
4233
|
-
/* @__PURE__ */ (0,
|
|
4234
|
-
/* @__PURE__ */ (0,
|
|
4286
|
+
isPollingStatus && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-3 rounded-xl border border-primary/20 bg-primary/5 p-4", children: [
|
|
4287
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "material-symbols-outlined animate-spin text-primary", children: "progress_activity" }),
|
|
4288
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm font-medium text-white", children: "Processing payment..." }),
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xs text-muted-foreground", children: "Waiting for confirmation" })
|
|
4235
4291
|
] })
|
|
4236
4292
|
] }),
|
|
4237
|
-
/* @__PURE__ */ (0,
|
|
4293
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4238
4294
|
Button,
|
|
4239
4295
|
{
|
|
4240
4296
|
variant: "cta",
|
|
@@ -4242,11 +4298,11 @@ function WithdrawConfirmation({
|
|
|
4242
4298
|
onClick: handleConfirmSend,
|
|
4243
4299
|
disabled: isConfirming || isPollingStatus,
|
|
4244
4300
|
className: "mt-2 w-full",
|
|
4245
|
-
children: isConfirming || isPollingStatus ? /* @__PURE__ */ (0,
|
|
4246
|
-
/* @__PURE__ */ (0,
|
|
4301
|
+
children: isConfirming || isPollingStatus ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
4302
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-2xl", children: "progress_activity" }),
|
|
4247
4303
|
isPollingStatus ? "Waiting for confirmation..." : "Sending..."
|
|
4248
|
-
] }) : /* @__PURE__ */ (0,
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4304
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
4305
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "material-symbols-outlined text-icon-2xl font-bold", children: "fingerprint" }),
|
|
4250
4306
|
"Confirm & Send"
|
|
4251
4307
|
] })
|
|
4252
4308
|
}
|
|
@@ -4256,7 +4312,7 @@ function WithdrawConfirmation({
|
|
|
4256
4312
|
}
|
|
4257
4313
|
|
|
4258
4314
|
// src/web/components/withdraw-success.tsx
|
|
4259
|
-
var
|
|
4315
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4260
4316
|
function WithdrawSuccess({
|
|
4261
4317
|
displayAmount,
|
|
4262
4318
|
selectedAssetId,
|
|
@@ -4265,35 +4321,35 @@ function WithdrawSuccess({
|
|
|
4265
4321
|
handleReset,
|
|
4266
4322
|
onDone
|
|
4267
4323
|
}) {
|
|
4268
|
-
return /* @__PURE__ */ (0,
|
|
4269
|
-
/* @__PURE__ */ (0,
|
|
4270
|
-
/* @__PURE__ */ (0,
|
|
4271
|
-
/* @__PURE__ */ (0,
|
|
4272
|
-
/* @__PURE__ */ (0,
|
|
4273
|
-
/* @__PURE__ */ (0,
|
|
4324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative flex min-h-screen flex-col overflow-hidden bg-background p-6 font-display text-foreground", children: [
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pointer-events-none absolute left-0 top-0 h-full w-full bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-primary/30 to-transparent opacity-20" }),
|
|
4326
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "z-10 flex flex-1 flex-col items-center justify-center", children: [
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative mb-8", children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "absolute inset-0 animate-pulse rounded-full bg-primary/30 blur-2xl" }),
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "relative scale-110 rounded-full bg-primary p-6 text-background shadow-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "material-symbols-outlined text-icon-6xl font-bold", children: "check" }) })
|
|
4274
4330
|
] }),
|
|
4275
|
-
/* @__PURE__ */ (0,
|
|
4276
|
-
/* @__PURE__ */ (0,
|
|
4277
|
-
/* @__PURE__ */ (0,
|
|
4278
|
-
/* @__PURE__ */ (0,
|
|
4279
|
-
/* @__PURE__ */ (0,
|
|
4280
|
-
/* @__PURE__ */ (0,
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h1", { className: "mb-2 text-3xl font-bold", children: "Payment Sent!" }),
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "max-w-xs text-center text-muted-foreground", children: "Your transaction has been successfully processed." }),
|
|
4333
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mt-12 w-full max-w-xs space-y-4", children: [
|
|
4334
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm text-muted-foreground", children: "Amount" }),
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "text-xl font-bold", children: [
|
|
4281
4337
|
displayAmount.toLocaleString(),
|
|
4282
4338
|
" ",
|
|
4283
|
-
selectedAssetId === "BTC" ? /* @__PURE__ */ (0,
|
|
4339
|
+
selectedAssetId === "BTC" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm text-primary/70", children: "sats" }) : selectedAsset?.ticker ?? "units"
|
|
4284
4340
|
] })
|
|
4285
4341
|
] }),
|
|
4286
|
-
(txResult?.paymentHash || txResult?.payment_hash) && /* @__PURE__ */ (0,
|
|
4287
|
-
/* @__PURE__ */ (0,
|
|
4288
|
-
/* @__PURE__ */ (0,
|
|
4342
|
+
(txResult?.paymentHash || txResult?.payment_hash) && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4343
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Payment Hash" }),
|
|
4344
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "break-all font-mono text-xs leading-relaxed text-muted-foreground", children: txResult.paymentHash ?? txResult.payment_hash })
|
|
4289
4345
|
] }),
|
|
4290
|
-
txResult?.txid && /* @__PURE__ */ (0,
|
|
4291
|
-
/* @__PURE__ */ (0,
|
|
4292
|
-
/* @__PURE__ */ (0,
|
|
4346
|
+
txResult?.txid && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4347
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Transaction ID" }),
|
|
4348
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "break-all font-mono text-xs leading-relaxed text-muted-foreground", children: txResult.txid })
|
|
4293
4349
|
] })
|
|
4294
4350
|
] })
|
|
4295
4351
|
] }),
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4352
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "z-10 space-y-3 py-6", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4297
4353
|
"button",
|
|
4298
4354
|
{
|
|
4299
4355
|
type: "button",
|
|
@@ -4309,7 +4365,7 @@ function WithdrawSuccess({
|
|
|
4309
4365
|
}
|
|
4310
4366
|
|
|
4311
4367
|
// src/web/components/setting-item.tsx
|
|
4312
|
-
var
|
|
4368
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4313
4369
|
function SettingItem({
|
|
4314
4370
|
icon,
|
|
4315
4371
|
iconSrc,
|
|
@@ -4323,7 +4379,7 @@ function SettingItem({
|
|
|
4323
4379
|
iconColor = "text-primary"
|
|
4324
4380
|
}) {
|
|
4325
4381
|
const isClickable = !!onClick;
|
|
4326
|
-
return /* @__PURE__ */ (0,
|
|
4382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4327
4383
|
"div",
|
|
4328
4384
|
{
|
|
4329
4385
|
className: cn(
|
|
@@ -4332,26 +4388,26 @@ function SettingItem({
|
|
|
4332
4388
|
className
|
|
4333
4389
|
),
|
|
4334
4390
|
onClick,
|
|
4335
|
-
children: /* @__PURE__ */ (0,
|
|
4336
|
-
/* @__PURE__ */ (0,
|
|
4337
|
-
(icon || iconSrc) && /* @__PURE__ */ (0,
|
|
4391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
4392
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
4393
|
+
(icon || iconSrc) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4338
4394
|
"div",
|
|
4339
4395
|
{
|
|
4340
4396
|
className: cn(
|
|
4341
4397
|
"flex-shrink-0 size-10 rounded-xl flex items-center justify-center bg-primary/15 group-hover:bg-primary/25 group-hover:scale-105 transition-all",
|
|
4342
4398
|
iconColor
|
|
4343
4399
|
),
|
|
4344
|
-
children: iconSrc ? /* @__PURE__ */ (0,
|
|
4400
|
+
children: iconSrc ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("img", { src: iconSrc, alt: iconAlt ?? title, className: "size-5 object-contain" }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "material-symbols-outlined text-icon-xl", children: icon })
|
|
4345
4401
|
}
|
|
4346
4402
|
),
|
|
4347
|
-
/* @__PURE__ */ (0,
|
|
4348
|
-
/* @__PURE__ */ (0,
|
|
4349
|
-
description && /* @__PURE__ */ (0,
|
|
4403
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
4404
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-bold text-body text-foreground tracking-wide", children: title }),
|
|
4405
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm text-muted-foreground mt-0.5 font-medium", children: description })
|
|
4350
4406
|
] })
|
|
4351
4407
|
] }),
|
|
4352
|
-
/* @__PURE__ */ (0,
|
|
4353
|
-
value && /* @__PURE__ */ (0,
|
|
4354
|
-
showChevron && isClickable && /* @__PURE__ */ (0,
|
|
4408
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
4409
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs text-muted-foreground font-mono", children: value }),
|
|
4410
|
+
showChevron && isClickable && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "material-symbols-outlined text-icon-md text-muted-foreground group-hover:scale-110 group-hover:text-white transition-all", children: "chevron_right" })
|
|
4355
4411
|
] })
|
|
4356
4412
|
] })
|
|
4357
4413
|
}
|
|
@@ -4359,9 +4415,9 @@ function SettingItem({
|
|
|
4359
4415
|
}
|
|
4360
4416
|
|
|
4361
4417
|
// src/web/components/section-label.tsx
|
|
4362
|
-
var
|
|
4418
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4363
4419
|
function SectionLabel({ children, className }) {
|
|
4364
|
-
return /* @__PURE__ */ (0,
|
|
4420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4365
4421
|
"span",
|
|
4366
4422
|
{
|
|
4367
4423
|
className: cn("text-xxs font-black uppercase tracking-eyebrow-wide text-muted-foreground", className),
|
|
@@ -4371,7 +4427,7 @@ function SectionLabel({ children, className }) {
|
|
|
4371
4427
|
}
|
|
4372
4428
|
|
|
4373
4429
|
// src/web/components/alert-banner.tsx
|
|
4374
|
-
var
|
|
4430
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4375
4431
|
var variantStyles = {
|
|
4376
4432
|
error: { container: "bg-danger/40", icon: "text-danger", iconName: "error" },
|
|
4377
4433
|
warning: { container: "bg-warning/40", icon: "text-warning", iconName: "warning" },
|
|
@@ -4380,15 +4436,15 @@ var variantStyles = {
|
|
|
4380
4436
|
};
|
|
4381
4437
|
function AlertBanner({ variant = "info", icon, children, className }) {
|
|
4382
4438
|
const styles = variantStyles[variant];
|
|
4383
|
-
return /* @__PURE__ */ (0,
|
|
4384
|
-
/* @__PURE__ */ (0,
|
|
4385
|
-
/* @__PURE__ */ (0,
|
|
4439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("rounded-xl p-3 flex items-center gap-2", styles.container, className), children: [
|
|
4440
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon2, { name: icon ?? styles.iconName, size: "md", className: cn("shrink-0", styles.icon) }),
|
|
4441
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("text-sm", styles.icon), children })
|
|
4386
4442
|
] });
|
|
4387
4443
|
}
|
|
4388
4444
|
|
|
4389
4445
|
// src/web/components/error-boundary.tsx
|
|
4390
4446
|
var import_react12 = require("react");
|
|
4391
|
-
var
|
|
4447
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4392
4448
|
var ErrorBoundary = class extends import_react12.Component {
|
|
4393
4449
|
constructor(props) {
|
|
4394
4450
|
super(props);
|
|
@@ -4402,11 +4458,11 @@ var ErrorBoundary = class extends import_react12.Component {
|
|
|
4402
4458
|
}
|
|
4403
4459
|
render() {
|
|
4404
4460
|
if (this.state.hasError) {
|
|
4405
|
-
return this.props.fallback ?? /* @__PURE__ */ (0,
|
|
4406
|
-
/* @__PURE__ */ (0,
|
|
4407
|
-
/* @__PURE__ */ (0,
|
|
4408
|
-
/* @__PURE__ */ (0,
|
|
4409
|
-
/* @__PURE__ */ (0,
|
|
4461
|
+
return this.props.fallback ?? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "min-h-screen bg-background text-foreground font-display flex flex-col items-center justify-center p-6 gap-4", children: [
|
|
4462
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "material-symbols-outlined text-danger text-icon-5xl", children: "error" }),
|
|
4463
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h2", { className: "text-lg font-bold", children: "Something went wrong" }),
|
|
4464
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm text-muted-foreground text-center", children: this.state.error?.message ?? "An unexpected error occurred." }),
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4410
4466
|
"button",
|
|
4411
4467
|
{
|
|
4412
4468
|
onClick: () => {
|
|
@@ -4534,7 +4590,7 @@ var colors = {
|
|
|
4534
4590
|
};
|
|
4535
4591
|
|
|
4536
4592
|
// src/web/components/deposit-ui-shared.tsx
|
|
4537
|
-
var
|
|
4593
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4538
4594
|
var GLOW_ALPHA = "26";
|
|
4539
4595
|
function qrGlowStyle(hex) {
|
|
4540
4596
|
return { boxShadow: `0 0 30px ${hex}${GLOW_ALPHA}` };
|
|
@@ -4548,7 +4604,7 @@ var NETWORK_CONFIG = {
|
|
|
4548
4604
|
border: "border-network-bitcoin/40",
|
|
4549
4605
|
qrBorder: "border-network-bitcoin/30",
|
|
4550
4606
|
qrGlow: qrGlowStyle(colors.network.bitcoin),
|
|
4551
|
-
icon: /* @__PURE__ */ (0,
|
|
4607
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined text-icon-xs leading-none", children: "link" })
|
|
4552
4608
|
},
|
|
4553
4609
|
lightning: {
|
|
4554
4610
|
label: "Lightning",
|
|
@@ -4558,7 +4614,7 @@ var NETWORK_CONFIG = {
|
|
|
4558
4614
|
border: "border-network-lightning/40",
|
|
4559
4615
|
qrBorder: "border-network-lightning/30",
|
|
4560
4616
|
qrGlow: qrGlowStyle(colors.network.lightning),
|
|
4561
|
-
icon: /* @__PURE__ */ (0,
|
|
4617
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/lightning/lightning.svg", className: "size-3", alt: "" })
|
|
4562
4618
|
},
|
|
4563
4619
|
spark: {
|
|
4564
4620
|
label: "Spark",
|
|
@@ -4568,7 +4624,7 @@ var NETWORK_CONFIG = {
|
|
|
4568
4624
|
border: "border-info/40",
|
|
4569
4625
|
qrBorder: "border-info/30",
|
|
4570
4626
|
qrGlow: qrGlowStyle(colors.info),
|
|
4571
|
-
icon: /* @__PURE__ */ (0,
|
|
4627
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/spark/Asterisk/Spark Asterisk White.svg", className: "h-3 w-3", alt: "" })
|
|
4572
4628
|
},
|
|
4573
4629
|
arkade: {
|
|
4574
4630
|
label: "Arkade",
|
|
@@ -4578,7 +4634,7 @@ var NETWORK_CONFIG = {
|
|
|
4578
4634
|
border: "border-network-arkade/40",
|
|
4579
4635
|
qrBorder: "border-network-arkade/30",
|
|
4580
4636
|
qrGlow: qrGlowStyle(colors.network.arkade),
|
|
4581
|
-
icon: /* @__PURE__ */ (0,
|
|
4637
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/arkade/arkade-icon.svg", className: "h-3 w-3 rounded-sm", alt: "" })
|
|
4582
4638
|
}
|
|
4583
4639
|
};
|
|
4584
4640
|
var ACCOUNT_META = {
|
|
@@ -4587,14 +4643,14 @@ var ACCOUNT_META = {
|
|
|
4587
4643
|
accentBg: "bg-primary/10",
|
|
4588
4644
|
accentText: "text-primary",
|
|
4589
4645
|
accentBorder: "border-primary/30",
|
|
4590
|
-
icon: /* @__PURE__ */ (0,
|
|
4646
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/rgb/rgb-logo.svg", alt: "", className: "h-2.5 w-2.5 object-contain" })
|
|
4591
4647
|
},
|
|
4592
4648
|
SPARK: {
|
|
4593
4649
|
shortLabel: "Spark",
|
|
4594
4650
|
accentBg: "bg-info/10",
|
|
4595
4651
|
accentText: "text-info",
|
|
4596
4652
|
accentBorder: "border-info/30",
|
|
4597
|
-
icon: /* @__PURE__ */ (0,
|
|
4653
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4598
4654
|
"img",
|
|
4599
4655
|
{
|
|
4600
4656
|
src: "/icons/spark/Asterisk/Spark Asterisk White.svg",
|
|
@@ -4608,7 +4664,7 @@ var ACCOUNT_META = {
|
|
|
4608
4664
|
accentBg: "bg-network-arkade/10",
|
|
4609
4665
|
accentText: "text-network-arkade",
|
|
4610
4666
|
accentBorder: "border-network-arkade/30",
|
|
4611
|
-
icon: /* @__PURE__ */ (0,
|
|
4667
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/arkade/arkade-icon.svg", alt: "", className: "h-2.5 w-2.5 rounded-[1px] object-contain" })
|
|
4612
4668
|
}
|
|
4613
4669
|
};
|
|
4614
4670
|
var METHOD_META = {
|
|
@@ -4625,7 +4681,7 @@ function InvoiceStatusBanner({
|
|
|
4625
4681
|
isInvoiceFailedOrExpired,
|
|
4626
4682
|
invoiceStatus
|
|
4627
4683
|
}) {
|
|
4628
|
-
return /* @__PURE__ */ (0,
|
|
4684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4629
4685
|
"div",
|
|
4630
4686
|
{
|
|
4631
4687
|
className: cn(
|
|
@@ -4633,17 +4689,17 @@ function InvoiceStatusBanner({
|
|
|
4633
4689
|
isInvoicePaid ? "border-primary/30 bg-primary/10 text-primary" : isInvoiceFailedOrExpired ? "border-danger/20 bg-danger/10 text-danger" : "border-warning/20 bg-warning/10 text-warning"
|
|
4634
4690
|
),
|
|
4635
4691
|
children: [
|
|
4636
|
-
isInvoicePending && /* @__PURE__ */ (0,
|
|
4637
|
-
/* @__PURE__ */ (0,
|
|
4638
|
-
/* @__PURE__ */ (0,
|
|
4692
|
+
isInvoicePending && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
4693
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-sm", children: "progress_activity" }),
|
|
4694
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: "Waiting for payment..." })
|
|
4639
4695
|
] }),
|
|
4640
|
-
isInvoicePaid && /* @__PURE__ */ (0,
|
|
4641
|
-
/* @__PURE__ */ (0,
|
|
4642
|
-
/* @__PURE__ */ (0,
|
|
4696
|
+
isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
4697
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "check_circle" }),
|
|
4698
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: "Payment received!" })
|
|
4643
4699
|
] }),
|
|
4644
|
-
isInvoiceFailedOrExpired && /* @__PURE__ */ (0,
|
|
4645
|
-
/* @__PURE__ */ (0,
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4700
|
+
isInvoiceFailedOrExpired && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
4701
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "cancel" }),
|
|
4702
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
|
|
4647
4703
|
"Invoice ",
|
|
4648
4704
|
invoiceStatus?.toLowerCase() === "expired" ? "expired" : "failed"
|
|
4649
4705
|
] })
|
|
@@ -4653,20 +4709,20 @@ function InvoiceStatusBanner({
|
|
|
4653
4709
|
);
|
|
4654
4710
|
}
|
|
4655
4711
|
function PaidOverlay() {
|
|
4656
|
-
return /* @__PURE__ */ (0,
|
|
4657
|
-
/* @__PURE__ */ (0,
|
|
4658
|
-
/* @__PURE__ */ (0,
|
|
4712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "absolute inset-0 flex items-center justify-center rounded-2xl bg-background/80", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4713
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex size-14 items-center justify-center rounded-full bg-primary", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined text-icon-4xl text-background", children: "check" }) }),
|
|
4714
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-sm font-bold text-primary", children: "Received!" })
|
|
4659
4715
|
] }) });
|
|
4660
4716
|
}
|
|
4661
4717
|
function CopyIcon({ copied }) {
|
|
4662
|
-
return /* @__PURE__ */ (0,
|
|
4718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4663
4719
|
"div",
|
|
4664
4720
|
{
|
|
4665
4721
|
className: cn(
|
|
4666
4722
|
"flex-shrink-0 rounded-lg p-2 transition-all",
|
|
4667
4723
|
copied ? "bg-primary/15 text-primary" : "bg-white/5 text-white/40 group-hover:bg-primary/10 group-hover:text-primary"
|
|
4668
4724
|
),
|
|
4669
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
4725
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon2, { name: "check", size: "sm" }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon2, { name: "content_copy", size: "sm" })
|
|
4670
4726
|
}
|
|
4671
4727
|
);
|
|
4672
4728
|
}
|
|
@@ -4676,7 +4732,7 @@ function AccountChoiceChip({
|
|
|
4676
4732
|
onClick
|
|
4677
4733
|
}) {
|
|
4678
4734
|
const meta = ACCOUNT_META[account];
|
|
4679
|
-
return /* @__PURE__ */ (0,
|
|
4735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4680
4736
|
"button",
|
|
4681
4737
|
{
|
|
4682
4738
|
type: "button",
|
|
@@ -4688,7 +4744,7 @@ function AccountChoiceChip({
|
|
|
4688
4744
|
),
|
|
4689
4745
|
children: [
|
|
4690
4746
|
meta.icon,
|
|
4691
|
-
/* @__PURE__ */ (0,
|
|
4747
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: meta.shortLabel })
|
|
4692
4748
|
]
|
|
4693
4749
|
}
|
|
4694
4750
|
);
|
|
@@ -4737,8 +4793,8 @@ function NetworkInfoDisclosure({
|
|
|
4737
4793
|
}) {
|
|
4738
4794
|
const [open, setOpen] = (0, import_react13.useState)(false);
|
|
4739
4795
|
if (networks.length === 0) return null;
|
|
4740
|
-
return /* @__PURE__ */ (0,
|
|
4741
|
-
/* @__PURE__ */ (0,
|
|
4796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cn("overflow-hidden rounded-xl border border-white/8 bg-white/3 transition-all", className), children: [
|
|
4797
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4742
4798
|
"button",
|
|
4743
4799
|
{
|
|
4744
4800
|
type: "button",
|
|
@@ -4746,24 +4802,24 @@ function NetworkInfoDisclosure({
|
|
|
4746
4802
|
"aria-expanded": open,
|
|
4747
4803
|
className: "flex w-full items-center gap-2 px-2.5 py-1.5 text-left transition-colors hover:bg-white/4",
|
|
4748
4804
|
children: [
|
|
4749
|
-
/* @__PURE__ */ (0,
|
|
4750
|
-
/* @__PURE__ */ (0,
|
|
4751
|
-
/* @__PURE__ */ (0,
|
|
4805
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon2, { name: "info", size: "xs", className: "text-white/40" }),
|
|
4806
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-xxs font-bold uppercase tracking-widest text-white/50", children: "What are these networks?" }),
|
|
4807
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon2, { name: open ? "expand_less" : "expand_more", size: "xs", className: "text-white/40" })
|
|
4752
4808
|
]
|
|
4753
4809
|
}
|
|
4754
4810
|
),
|
|
4755
|
-
open && /* @__PURE__ */ (0,
|
|
4811
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "space-y-2 px-2.5 pb-2.5 pt-0.5 animate-in fade-in slide-in-from-top-1 duration-200", children: networks.map((network) => {
|
|
4756
4812
|
const info = NETWORK_INFO[network];
|
|
4757
4813
|
const cfg = NETWORK_CONFIG[network];
|
|
4758
|
-
return /* @__PURE__ */ (0,
|
|
4759
|
-
/* @__PURE__ */ (0,
|
|
4760
|
-
/* @__PURE__ */ (0,
|
|
4761
|
-
/* @__PURE__ */ (0,
|
|
4814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-1", children: [
|
|
4815
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
4816
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: cn("flex size-4 flex-shrink-0 items-center justify-center rounded-md", cfg.bg), children: cfg.icon }),
|
|
4817
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: cn("text-xxs font-bold uppercase tracking-widest", cfg.text), children: info.title })
|
|
4762
4818
|
] }),
|
|
4763
|
-
/* @__PURE__ */ (0,
|
|
4764
|
-
/* @__PURE__ */ (0,
|
|
4765
|
-
/* @__PURE__ */ (0,
|
|
4766
|
-
/* @__PURE__ */ (0,
|
|
4819
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "pl-5 text-tiny leading-snug text-muted-foreground", children: info.detail }),
|
|
4820
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "space-y-0.5 pl-5", children: info.bullets.map((bullet) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("li", { className: "flex items-start gap-1.5 text-xxs leading-snug text-white/50", children: [
|
|
4821
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "mt-[1px] text-white/30", children: "-" }),
|
|
4822
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: bullet })
|
|
4767
4823
|
] }, bullet)) })
|
|
4768
4824
|
] }, network);
|
|
4769
4825
|
}) })
|
|
@@ -4777,7 +4833,7 @@ function MethodChoiceChip({
|
|
|
4777
4833
|
onClick
|
|
4778
4834
|
}) {
|
|
4779
4835
|
const meta = METHOD_META[method];
|
|
4780
|
-
return /* @__PURE__ */ (0,
|
|
4836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4781
4837
|
"button",
|
|
4782
4838
|
{
|
|
4783
4839
|
type: "button",
|
|
@@ -4790,14 +4846,14 @@ function MethodChoiceChip({
|
|
|
4790
4846
|
),
|
|
4791
4847
|
children: [
|
|
4792
4848
|
meta.label,
|
|
4793
|
-
!enabled && disabledReason && /* @__PURE__ */ (0,
|
|
4849
|
+
!enabled && disabledReason && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xxs font-normal opacity-60", children: disabledReason })
|
|
4794
4850
|
]
|
|
4795
4851
|
}
|
|
4796
4852
|
);
|
|
4797
4853
|
}
|
|
4798
4854
|
|
|
4799
4855
|
// src/web/components/deposit-success-screen.tsx
|
|
4800
|
-
var
|
|
4856
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4801
4857
|
function DepositSuccessScreen({
|
|
4802
4858
|
handleDone,
|
|
4803
4859
|
displayTicker,
|
|
@@ -4810,20 +4866,20 @@ function DepositSuccessScreen({
|
|
|
4810
4866
|
const isInstant = network === "lightning" || network === "spark";
|
|
4811
4867
|
const title = isInstant ? "Payment Received!" : "Deposit Detected!";
|
|
4812
4868
|
const subtitle = isInstant ? `Your ${displayTicker} has arrived via ${networkLabel}.` : `Incoming deposit detected via ${networkLabel}. Funds will be available after confirmation.`;
|
|
4813
|
-
return /* @__PURE__ */ (0,
|
|
4814
|
-
/* @__PURE__ */ (0,
|
|
4815
|
-
/* @__PURE__ */ (0,
|
|
4816
|
-
/* @__PURE__ */ (0,
|
|
4869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex h-screen flex-col overflow-hidden bg-background font-display text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-1 flex-col items-center justify-center p-6 text-center", children: [
|
|
4870
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative mb-8", children: [
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "absolute inset-0 scale-150 animate-pulse rounded-full bg-primary/20 blur-2xl" }),
|
|
4872
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "relative flex size-28 items-center justify-center rounded-full border-2 border-primary/40 bg-primary/10 shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "material-symbols-outlined text-display text-primary animate-in zoom-in-50 duration-500", children: "check_circle" }) })
|
|
4817
4873
|
] }),
|
|
4818
|
-
/* @__PURE__ */ (0,
|
|
4819
|
-
/* @__PURE__ */ (0,
|
|
4820
|
-
/* @__PURE__ */ (0,
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4822
|
-
/* @__PURE__ */ (0,
|
|
4823
|
-
/* @__PURE__ */ (0,
|
|
4824
|
-
/* @__PURE__ */ (0,
|
|
4874
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h1", { className: "mb-2 text-2xl font-bold text-white", children: title }),
|
|
4875
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mb-8 max-w-[260px] text-sm leading-relaxed text-muted-foreground", children: subtitle }),
|
|
4876
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "mb-10 flex items-center gap-3 rounded-2xl border bg-white/5 px-4 py-3", children: [
|
|
4877
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AssetIcon, { ticker: displayTicker, size: 36 }),
|
|
4878
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-left", children: [
|
|
4879
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm font-bold text-white", children: displayTicker }),
|
|
4880
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-xs text-white/40", children: selectedAsset?.name ?? displayTicker })
|
|
4825
4881
|
] }),
|
|
4826
|
-
/* @__PURE__ */ (0,
|
|
4882
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
4827
4883
|
"div",
|
|
4828
4884
|
{
|
|
4829
4885
|
className: cn(
|
|
@@ -4834,27 +4890,27 @@ function DepositSuccessScreen({
|
|
|
4834
4890
|
),
|
|
4835
4891
|
children: [
|
|
4836
4892
|
net.icon,
|
|
4837
|
-
/* @__PURE__ */ (0,
|
|
4893
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: networkLabel })
|
|
4838
4894
|
]
|
|
4839
4895
|
}
|
|
4840
4896
|
)
|
|
4841
4897
|
] }),
|
|
4842
|
-
/* @__PURE__ */ (0,
|
|
4843
|
-
/* @__PURE__ */ (0,
|
|
4898
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Button, { variant: "cta", size: "cta", onClick: handleDone, children: [
|
|
4899
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "material-symbols-outlined text-icon-lg", children: "home" }),
|
|
4844
4900
|
"Back to Dashboard"
|
|
4845
4901
|
] })
|
|
4846
4902
|
] }) });
|
|
4847
4903
|
}
|
|
4848
4904
|
|
|
4849
4905
|
// src/web/components/deposit-network-default-modal.tsx
|
|
4850
|
-
var
|
|
4906
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4851
4907
|
var NETWORK_OPTIONS = {
|
|
4852
4908
|
RGB: {
|
|
4853
4909
|
network: "onchain",
|
|
4854
4910
|
account: "RGB",
|
|
4855
4911
|
label: "On-chain / Lightning",
|
|
4856
4912
|
description: "Classic Bitcoin address or Lightning invoice via the RLN node.",
|
|
4857
|
-
icon: /* @__PURE__ */ (0,
|
|
4913
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "material-symbols-outlined text-icon-lg", children: "link" }),
|
|
4858
4914
|
accentBg: "bg-network-bitcoin/10",
|
|
4859
4915
|
accentBorder: "border-network-bitcoin/30",
|
|
4860
4916
|
accentText: "text-network-bitcoin"
|
|
@@ -4864,7 +4920,7 @@ var NETWORK_OPTIONS = {
|
|
|
4864
4920
|
account: "SPARK",
|
|
4865
4921
|
label: "Spark",
|
|
4866
4922
|
description: "Receive directly into your Spark account. Fast and free.",
|
|
4867
|
-
icon: /* @__PURE__ */ (0,
|
|
4923
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src: "/icons/spark/Asterisk/Spark Asterisk White.svg", alt: "", className: "h-[18px]" }),
|
|
4868
4924
|
accentBg: "bg-info/10",
|
|
4869
4925
|
accentBorder: "border-info/30",
|
|
4870
4926
|
accentText: "text-info"
|
|
@@ -4874,7 +4930,7 @@ var NETWORK_OPTIONS = {
|
|
|
4874
4930
|
account: "ARKADE",
|
|
4875
4931
|
label: "Arkade",
|
|
4876
4932
|
description: "Receive directly into your Arkade account. Low fees, near-instant settlement.",
|
|
4877
|
-
icon: /* @__PURE__ */ (0,
|
|
4933
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src: "/icons/arkade/arkade-icon.svg", alt: "", className: "h-[18px]" }),
|
|
4878
4934
|
accentBg: "bg-network-arkade/10",
|
|
4879
4935
|
accentBorder: "border-network-arkade/30",
|
|
4880
4936
|
accentText: "text-network-arkade"
|
|
@@ -4889,20 +4945,20 @@ function DepositNetworkDefaultModal({
|
|
|
4889
4945
|
}) {
|
|
4890
4946
|
if (!open) return null;
|
|
4891
4947
|
const options = availableAccounts.map((id) => NETWORK_OPTIONS[id]).filter(Boolean);
|
|
4892
|
-
return /* @__PURE__ */ (0,
|
|
4893
|
-
/* @__PURE__ */ (0,
|
|
4894
|
-
/* @__PURE__ */ (0,
|
|
4895
|
-
/* @__PURE__ */ (0,
|
|
4896
|
-
/* @__PURE__ */ (0,
|
|
4948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "fixed inset-0 z-50 flex items-end justify-center bg-black/60 backdrop-blur-sm", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "w-full space-y-4 rounded-t-2xl border-t border-border bg-background px-4 pb-7 pt-5 animate-in slide-in-from-bottom-4 duration-200", children: [
|
|
4949
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "-mt-1 mb-1 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "h-1 w-10 rounded-full bg-white/15" }) }),
|
|
4950
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
4951
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm font-bold text-white", children: "Choose your default network" }),
|
|
4952
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "mt-0.5 text-tiny text-white/45", children: [
|
|
4897
4953
|
"Pick how you would like to receive",
|
|
4898
4954
|
" ",
|
|
4899
|
-
/* @__PURE__ */ (0,
|
|
4955
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "font-semibold text-muted-foreground", children: assetTicker }),
|
|
4900
4956
|
" by default. You can always switch in the deposit screen."
|
|
4901
4957
|
] })
|
|
4902
4958
|
] }),
|
|
4903
|
-
/* @__PURE__ */ (0,
|
|
4959
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "space-y-2", children: options.map((option) => {
|
|
4904
4960
|
const isSuggested = option.account === suggestedAccount;
|
|
4905
|
-
return /* @__PURE__ */ (0,
|
|
4961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4906
4962
|
"button",
|
|
4907
4963
|
{
|
|
4908
4964
|
type: "button",
|
|
@@ -4912,7 +4968,7 @@ function DepositNetworkDefaultModal({
|
|
|
4912
4968
|
isSuggested ? cn("border-2", option.accentBorder, option.accentBg) : "border border-white/8 bg-white/4 hover:bg-white/8"
|
|
4913
4969
|
),
|
|
4914
4970
|
children: [
|
|
4915
|
-
/* @__PURE__ */ (0,
|
|
4971
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4916
4972
|
"div",
|
|
4917
4973
|
{
|
|
4918
4974
|
className: cn(
|
|
@@ -4923,10 +4979,10 @@ function DepositNetworkDefaultModal({
|
|
|
4923
4979
|
children: option.icon
|
|
4924
4980
|
}
|
|
4925
4981
|
),
|
|
4926
|
-
/* @__PURE__ */ (0,
|
|
4927
|
-
/* @__PURE__ */ (0,
|
|
4928
|
-
/* @__PURE__ */ (0,
|
|
4929
|
-
isSuggested && /* @__PURE__ */ (0,
|
|
4982
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
4983
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4984
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-xs font-bold", isSuggested ? option.accentText : "text-white"), children: option.label }),
|
|
4985
|
+
isSuggested && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4930
4986
|
"span",
|
|
4931
4987
|
{
|
|
4932
4988
|
className: cn(
|
|
@@ -4938,9 +4994,9 @@ function DepositNetworkDefaultModal({
|
|
|
4938
4994
|
}
|
|
4939
4995
|
)
|
|
4940
4996
|
] }),
|
|
4941
|
-
/* @__PURE__ */ (0,
|
|
4997
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "mt-0.5 text-xxs leading-snug text-white/45", children: option.description })
|
|
4942
4998
|
] }),
|
|
4943
|
-
/* @__PURE__ */ (0,
|
|
4999
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4944
5000
|
"span",
|
|
4945
5001
|
{
|
|
4946
5002
|
className: cn(
|
|
@@ -4959,7 +5015,7 @@ function DepositNetworkDefaultModal({
|
|
|
4959
5015
|
}
|
|
4960
5016
|
|
|
4961
5017
|
// src/web/components/btc-unified-receive.tsx
|
|
4962
|
-
var
|
|
5018
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4963
5019
|
function BtcUnifiedReceive({
|
|
4964
5020
|
btcSelectedAccount,
|
|
4965
5021
|
accountReceiveResult,
|
|
@@ -4980,10 +5036,10 @@ function BtcUnifiedReceive({
|
|
|
4980
5036
|
}) {
|
|
4981
5037
|
const accountNetwork = btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain";
|
|
4982
5038
|
const qrNetwork = NETWORK_CONFIG[accountNetwork];
|
|
4983
|
-
return /* @__PURE__ */ (0,
|
|
4984
|
-
/* @__PURE__ */ (0,
|
|
4985
|
-
/* @__PURE__ */ (0,
|
|
4986
|
-
/* @__PURE__ */ (0,
|
|
5039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
|
|
5040
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-1.5 rounded-xl border border-white/8 bg-white/3 p-2.5", children: [
|
|
5041
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex items-center justify-between px-1", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Amount (optional)" }) }),
|
|
5042
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4987
5043
|
"input",
|
|
4988
5044
|
{
|
|
4989
5045
|
type: "text",
|
|
@@ -4994,13 +5050,13 @@ function BtcUnifiedReceive({
|
|
|
4994
5050
|
inputMode: "decimal"
|
|
4995
5051
|
}
|
|
4996
5052
|
),
|
|
4997
|
-
amount && loading && /* @__PURE__ */ (0,
|
|
4998
|
-
/* @__PURE__ */ (0,
|
|
5053
|
+
amount && loading && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("p", { className: "flex items-center gap-1 text-xxs text-warning/70", children: [
|
|
5054
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
|
|
4999
5055
|
"Updating invoice..."
|
|
5000
5056
|
] })
|
|
5001
5057
|
] }),
|
|
5002
|
-
/* @__PURE__ */ (0,
|
|
5003
|
-
/* @__PURE__ */ (0,
|
|
5058
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
5059
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5004
5060
|
"div",
|
|
5005
5061
|
{
|
|
5006
5062
|
className: cn(
|
|
@@ -5009,12 +5065,12 @@ function BtcUnifiedReceive({
|
|
|
5009
5065
|
),
|
|
5010
5066
|
style: qrNetwork.qrGlow,
|
|
5011
5067
|
children: [
|
|
5012
|
-
/* @__PURE__ */ (0,
|
|
5013
|
-
isInvoicePaid && /* @__PURE__ */ (0,
|
|
5068
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QrCode, { value: accountReceiveResult.qrValue, size: 200 }),
|
|
5069
|
+
isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PaidOverlay, {})
|
|
5014
5070
|
]
|
|
5015
5071
|
}
|
|
5016
5072
|
),
|
|
5017
|
-
/* @__PURE__ */ (0,
|
|
5073
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5018
5074
|
"button",
|
|
5019
5075
|
{
|
|
5020
5076
|
type: "button",
|
|
@@ -5027,13 +5083,13 @@ function BtcUnifiedReceive({
|
|
|
5027
5083
|
void copyToClipboard(accountReceiveResult.qrValue);
|
|
5028
5084
|
},
|
|
5029
5085
|
children: [
|
|
5030
|
-
/* @__PURE__ */ (0,
|
|
5086
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon2, { name: copied ? "check" : "content_copy", size: "xs" }),
|
|
5031
5087
|
copied ? "Copied" : `Copy ${accountReceiveResult.qrLabel}`
|
|
5032
5088
|
]
|
|
5033
5089
|
}
|
|
5034
5090
|
)
|
|
5035
5091
|
] }),
|
|
5036
|
-
invoiceStatus && /* @__PURE__ */ (0,
|
|
5092
|
+
invoiceStatus && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5037
5093
|
InvoiceStatusBanner,
|
|
5038
5094
|
{
|
|
5039
5095
|
isInvoicePending,
|
|
@@ -5042,11 +5098,11 @@ function BtcUnifiedReceive({
|
|
|
5042
5098
|
invoiceStatus
|
|
5043
5099
|
}
|
|
5044
5100
|
),
|
|
5045
|
-
/* @__PURE__ */ (0,
|
|
5046
|
-
/* @__PURE__ */ (0,
|
|
5101
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "space-y-1.5", children: [
|
|
5102
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/30", children: "Available Addresses" }),
|
|
5047
5103
|
accountReceiveResult.addresses.map((address) => {
|
|
5048
5104
|
const network = NETWORK_CONFIG[address.network];
|
|
5049
|
-
return /* @__PURE__ */ (0,
|
|
5105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5050
5106
|
"div",
|
|
5051
5107
|
{
|
|
5052
5108
|
className: cn(
|
|
@@ -5057,19 +5113,19 @@ function BtcUnifiedReceive({
|
|
|
5057
5113
|
style: { borderLeftWidth: 3, borderLeftColor: network.color },
|
|
5058
5114
|
onClick: () => void copyToClipboard(address.value),
|
|
5059
5115
|
children: [
|
|
5060
|
-
/* @__PURE__ */ (0,
|
|
5061
|
-
/* @__PURE__ */ (0,
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5063
|
-
/* @__PURE__ */ (0,
|
|
5116
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: cn("flex size-5 flex-shrink-0 items-center justify-center rounded-md", network.bg), children: network.icon }),
|
|
5117
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5118
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: cn("text-xxs font-bold uppercase tracking-widest", network.text), children: address.label }),
|
|
5119
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "mt-0.5 truncate font-mono text-tiny text-muted-foreground", children: address.value.length > 50 ? `${address.value.slice(0, 18)}...${address.value.slice(-14)}` : address.value })
|
|
5064
5120
|
] }),
|
|
5065
|
-
/* @__PURE__ */ (0,
|
|
5121
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CopyIcon, { copied })
|
|
5066
5122
|
]
|
|
5067
5123
|
},
|
|
5068
5124
|
address.network
|
|
5069
5125
|
);
|
|
5070
5126
|
})
|
|
5071
5127
|
] }),
|
|
5072
|
-
/* @__PURE__ */ (0,
|
|
5128
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5073
5129
|
NetworkInfoDisclosure,
|
|
5074
5130
|
{
|
|
5075
5131
|
networks: Array.from(
|
|
@@ -5077,8 +5133,8 @@ function BtcUnifiedReceive({
|
|
|
5077
5133
|
)
|
|
5078
5134
|
}
|
|
5079
5135
|
),
|
|
5080
|
-
/* @__PURE__ */ (0,
|
|
5081
|
-
/* @__PURE__ */ (0,
|
|
5136
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex gap-2.5 pt-1", children: [
|
|
5137
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5082
5138
|
"button",
|
|
5083
5139
|
{
|
|
5084
5140
|
type: "button",
|
|
@@ -5090,13 +5146,13 @@ function BtcUnifiedReceive({
|
|
|
5090
5146
|
},
|
|
5091
5147
|
className: "flex flex-1 items-center justify-center gap-1.5 rounded-xl border py-3 text-xs font-bold text-muted-foreground transition-all hover:border-border hover:bg-accent hover:text-white active:scale-[0.98]",
|
|
5092
5148
|
children: [
|
|
5093
|
-
/* @__PURE__ */ (0,
|
|
5149
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "refresh" }),
|
|
5094
5150
|
"New Address"
|
|
5095
5151
|
]
|
|
5096
5152
|
}
|
|
5097
5153
|
),
|
|
5098
|
-
/* @__PURE__ */ (0,
|
|
5099
|
-
/* @__PURE__ */ (0,
|
|
5154
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Button, { variant: "cta", onClick: handleDone, children: [
|
|
5155
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "check" }),
|
|
5100
5156
|
"Done"
|
|
5101
5157
|
] })
|
|
5102
5158
|
] })
|
|
@@ -5104,7 +5160,7 @@ function BtcUnifiedReceive({
|
|
|
5104
5160
|
}
|
|
5105
5161
|
|
|
5106
5162
|
// src/web/components/deposit-generated-view.tsx
|
|
5107
|
-
var
|
|
5163
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5108
5164
|
function parseAssetAmount(amountString, asset) {
|
|
5109
5165
|
const value = Number(amountString);
|
|
5110
5166
|
if (!Number.isFinite(value)) return 0;
|
|
@@ -5143,10 +5199,10 @@ function DepositGeneratedView({
|
|
|
5143
5199
|
setInvoiceStatus,
|
|
5144
5200
|
handleDone
|
|
5145
5201
|
}) {
|
|
5146
|
-
return /* @__PURE__ */ (0,
|
|
5147
|
-
(network === "lightning" || network === "arkade" && arkSubMode === "ark") && isBtc && /* @__PURE__ */ (0,
|
|
5148
|
-
/* @__PURE__ */ (0,
|
|
5149
|
-
/* @__PURE__ */ (0,
|
|
5202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
|
|
5203
|
+
(network === "lightning" || network === "arkade" && arkSubMode === "ark") && isBtc && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-1.5 rounded-xl border border-white/8 bg-white/3 p-2.5", children: [
|
|
5204
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex items-center justify-between px-1", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Specify amount (optional)" }) }),
|
|
5205
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5150
5206
|
"input",
|
|
5151
5207
|
{
|
|
5152
5208
|
type: "text",
|
|
@@ -5157,16 +5213,16 @@ function DepositGeneratedView({
|
|
|
5157
5213
|
inputMode: "decimal"
|
|
5158
5214
|
}
|
|
5159
5215
|
),
|
|
5160
|
-
amount && /* @__PURE__ */ (0,
|
|
5161
|
-
/* @__PURE__ */ (0,
|
|
5216
|
+
amount && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-xxs text-warning/70", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
5217
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
|
|
5162
5218
|
"Updating ",
|
|
5163
5219
|
network === "arkade" ? "URI" : "invoice",
|
|
5164
5220
|
"..."
|
|
5165
5221
|
] }) : network === "arkade" ? `Unified URI for ${amount} ${getUnitLabel()}` : `Invoice for ${amount} ${getUnitLabel()}` })
|
|
5166
5222
|
] }),
|
|
5167
|
-
network === "lightning" && !isBtc && /* @__PURE__ */ (0,
|
|
5168
|
-
/* @__PURE__ */ (0,
|
|
5169
|
-
/* @__PURE__ */ (0,
|
|
5223
|
+
network === "lightning" && !isBtc && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-1.5 rounded-xl border border-white/8 bg-white/3 p-2.5", children: [
|
|
5224
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex items-center justify-between px-1", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: "Specify amount (optional)" }) }),
|
|
5225
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5170
5226
|
"input",
|
|
5171
5227
|
{
|
|
5172
5228
|
type: "text",
|
|
@@ -5177,19 +5233,19 @@ function DepositGeneratedView({
|
|
|
5177
5233
|
inputMode: "decimal"
|
|
5178
5234
|
}
|
|
5179
5235
|
),
|
|
5180
|
-
amount && /* @__PURE__ */ (0,
|
|
5181
|
-
/* @__PURE__ */ (0,
|
|
5236
|
+
amount && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-xxs text-warning/70", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex items-center gap-1", children: [
|
|
5237
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
|
|
5182
5238
|
"Updating invoice..."
|
|
5183
5239
|
] }) : `Invoice for ${amount} ${getUnitLabel()}` }),
|
|
5184
|
-
amount && maxDepositAmount > 0 && parseAssetAmount(amount, selectedAsset) > maxDepositAmount && /* @__PURE__ */ (0,
|
|
5240
|
+
amount && maxDepositAmount > 0 && parseAssetAmount(amount, selectedAsset) > maxDepositAmount && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("p", { className: "rounded-lg border border-danger/20 bg-danger/10 px-2.5 py-1.5 text-xxs text-danger", children: [
|
|
5185
5241
|
"Exceeds max: ",
|
|
5186
5242
|
formatAssetAmount(maxDepositAmount, selectedAsset),
|
|
5187
5243
|
" ",
|
|
5188
5244
|
getUnitLabel()
|
|
5189
5245
|
] })
|
|
5190
5246
|
] }),
|
|
5191
|
-
/* @__PURE__ */ (0,
|
|
5192
|
-
/* @__PURE__ */ (0,
|
|
5247
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
5248
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5193
5249
|
"div",
|
|
5194
5250
|
{
|
|
5195
5251
|
className: cn(
|
|
@@ -5198,7 +5254,7 @@ function DepositGeneratedView({
|
|
|
5198
5254
|
),
|
|
5199
5255
|
style: net.qrGlow,
|
|
5200
5256
|
children: [
|
|
5201
|
-
network !== "spark" && network !== "arkade" && /* @__PURE__ */ (0,
|
|
5257
|
+
network !== "spark" && network !== "arkade" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5202
5258
|
"div",
|
|
5203
5259
|
{
|
|
5204
5260
|
className: cn(
|
|
@@ -5208,16 +5264,16 @@ function DepositGeneratedView({
|
|
|
5208
5264
|
),
|
|
5209
5265
|
children: [
|
|
5210
5266
|
net.icon,
|
|
5211
|
-
/* @__PURE__ */ (0,
|
|
5267
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: net.label })
|
|
5212
5268
|
]
|
|
5213
5269
|
}
|
|
5214
5270
|
),
|
|
5215
|
-
/* @__PURE__ */ (0,
|
|
5216
|
-
isInvoicePaid && /* @__PURE__ */ (0,
|
|
5271
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(QrCode, { value: address, size: 188 }),
|
|
5272
|
+
isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PaidOverlay, {})
|
|
5217
5273
|
]
|
|
5218
5274
|
}
|
|
5219
5275
|
),
|
|
5220
|
-
/* @__PURE__ */ (0,
|
|
5276
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5221
5277
|
"button",
|
|
5222
5278
|
{
|
|
5223
5279
|
type: "button",
|
|
@@ -5230,13 +5286,13 @@ function DepositGeneratedView({
|
|
|
5230
5286
|
void copyToClipboard(address);
|
|
5231
5287
|
},
|
|
5232
5288
|
children: [
|
|
5233
|
-
/* @__PURE__ */ (0,
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon2, { name: copied ? "check" : "content_copy", size: "xs" }),
|
|
5234
5290
|
copied ? "Copied" : network === "lightning" ? "Copy Invoice" : "Copy Address"
|
|
5235
5291
|
]
|
|
5236
5292
|
}
|
|
5237
5293
|
)
|
|
5238
5294
|
] }),
|
|
5239
|
-
network === "lightning" && invoiceStatus && /* @__PURE__ */ (0,
|
|
5295
|
+
network === "lightning" && invoiceStatus && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5240
5296
|
InvoiceStatusBanner,
|
|
5241
5297
|
{
|
|
5242
5298
|
isInvoicePending,
|
|
@@ -5245,7 +5301,7 @@ function DepositGeneratedView({
|
|
|
5245
5301
|
invoiceStatus
|
|
5246
5302
|
}
|
|
5247
5303
|
),
|
|
5248
|
-
/* @__PURE__ */ (0,
|
|
5304
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5249
5305
|
"div",
|
|
5250
5306
|
{
|
|
5251
5307
|
"data-testid": "deposit-generated-address",
|
|
@@ -5258,16 +5314,16 @@ function DepositGeneratedView({
|
|
|
5258
5314
|
style: { borderLeftWidth: 3, borderLeftColor: net.color },
|
|
5259
5315
|
onClick: () => void copyToClipboard(address),
|
|
5260
5316
|
children: [
|
|
5261
|
-
/* @__PURE__ */ (0,
|
|
5262
|
-
/* @__PURE__ */ (0,
|
|
5263
|
-
/* @__PURE__ */ (0,
|
|
5264
|
-
/* @__PURE__ */ (0,
|
|
5317
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: cn("flex size-5 flex-shrink-0 items-center justify-center rounded-md", net.bg), children: net.icon }),
|
|
5318
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5319
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: cn("text-xxs font-bold uppercase tracking-widest", net.text), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { "data-testid": "deposit-address-label", children: addressLabel }) }),
|
|
5320
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "mt-0.5 truncate font-mono text-tiny text-muted-foreground", children: address.length > 50 ? `${address.slice(0, 18)}...${address.slice(-14)}` : address })
|
|
5265
5321
|
] }),
|
|
5266
|
-
/* @__PURE__ */ (0,
|
|
5322
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CopyIcon, { copied })
|
|
5267
5323
|
]
|
|
5268
5324
|
}
|
|
5269
5325
|
),
|
|
5270
|
-
recipientId && /* @__PURE__ */ (0,
|
|
5326
|
+
recipientId && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5271
5327
|
"div",
|
|
5272
5328
|
{
|
|
5273
5329
|
className: cn(
|
|
@@ -5277,23 +5333,23 @@ function DepositGeneratedView({
|
|
|
5277
5333
|
style: { borderLeftWidth: 3, borderLeftColor: "var(--primary)" },
|
|
5278
5334
|
onClick: () => void copyToClipboard(recipientId),
|
|
5279
5335
|
children: [
|
|
5280
|
-
/* @__PURE__ */ (0,
|
|
5281
|
-
/* @__PURE__ */ (0,
|
|
5282
|
-
/* @__PURE__ */ (0,
|
|
5283
|
-
/* @__PURE__ */ (0,
|
|
5336
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex size-5 flex-shrink-0 items-center justify-center rounded-md bg-primary/15", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon2, { name: "person", size: "xs", className: "text-primary" }) }),
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5338
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-primary", children: "Recipient ID" }),
|
|
5339
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "mt-0.5 truncate font-mono text-tiny text-muted-foreground", children: recipientId.length > 50 ? `${recipientId.slice(0, 18)}...${recipientId.slice(-14)}` : recipientId })
|
|
5284
5340
|
] }),
|
|
5285
|
-
/* @__PURE__ */ (0,
|
|
5341
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CopyIcon, { copied })
|
|
5286
5342
|
]
|
|
5287
5343
|
}
|
|
5288
5344
|
),
|
|
5289
|
-
/* @__PURE__ */ (0,
|
|
5345
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5290
5346
|
NetworkInfoDisclosure,
|
|
5291
5347
|
{
|
|
5292
5348
|
networks: network === "arkade" ? arkSubMode === "boarding" ? ["onchain", "arkade"] : ["arkade"] : [network]
|
|
5293
5349
|
}
|
|
5294
5350
|
),
|
|
5295
|
-
/* @__PURE__ */ (0,
|
|
5296
|
-
/* @__PURE__ */ (0,
|
|
5351
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex gap-2.5 pt-1", children: [
|
|
5352
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5297
5353
|
"button",
|
|
5298
5354
|
{
|
|
5299
5355
|
type: "button",
|
|
@@ -5305,14 +5361,14 @@ function DepositGeneratedView({
|
|
|
5305
5361
|
},
|
|
5306
5362
|
className: "flex flex-1 items-center justify-center gap-1.5 rounded-xl border py-3 text-xs font-bold text-muted-foreground transition-all hover:border-border hover:bg-accent hover:text-white active:scale-[0.98]",
|
|
5307
5363
|
children: [
|
|
5308
|
-
/* @__PURE__ */ (0,
|
|
5364
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "refresh" }),
|
|
5309
5365
|
"New ",
|
|
5310
5366
|
network === "lightning" ? "Invoice" : "Address"
|
|
5311
5367
|
]
|
|
5312
5368
|
}
|
|
5313
5369
|
),
|
|
5314
|
-
/* @__PURE__ */ (0,
|
|
5315
|
-
/* @__PURE__ */ (0,
|
|
5370
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Button, { variant: "cta", onClick: handleDone, children: [
|
|
5371
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "check" }),
|
|
5316
5372
|
"Done"
|
|
5317
5373
|
] })
|
|
5318
5374
|
] })
|
|
@@ -5320,7 +5376,7 @@ function DepositGeneratedView({
|
|
|
5320
5376
|
}
|
|
5321
5377
|
|
|
5322
5378
|
// src/web/components/deposit-pre-generation.tsx
|
|
5323
|
-
var
|
|
5379
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5324
5380
|
var ACCOUNT_TITLES = {
|
|
5325
5381
|
RGB: "RGB & Lightning",
|
|
5326
5382
|
SPARK: "Spark",
|
|
@@ -5357,62 +5413,62 @@ function DepositPreGeneration({
|
|
|
5357
5413
|
generateInvoice
|
|
5358
5414
|
}) {
|
|
5359
5415
|
const method = METHOD_META2[currentMethod];
|
|
5360
|
-
return /* @__PURE__ */ (0,
|
|
5361
|
-
/* @__PURE__ */ (0,
|
|
5362
|
-
/* @__PURE__ */ (0,
|
|
5363
|
-
/* @__PURE__ */ (0,
|
|
5364
|
-
/* @__PURE__ */ (0,
|
|
5365
|
-
/* @__PURE__ */ (0,
|
|
5366
|
-
/* @__PURE__ */ (0,
|
|
5416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-3", children: [
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "rounded-2xl border border-white/8 bg-white/4 p-3", children: [
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Receive Summary" }),
|
|
5419
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mt-2 grid grid-cols-1 gap-2 text-xs", children: [
|
|
5420
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5421
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-white/45", children: "Asset" }),
|
|
5422
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "font-bold text-white", children: selectedAsset?.ticker ?? (isBtc ? "BTC" : "Asset") })
|
|
5367
5423
|
] }),
|
|
5368
|
-
/* @__PURE__ */ (0,
|
|
5369
|
-
/* @__PURE__ */ (0,
|
|
5370
|
-
/* @__PURE__ */ (0,
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-white/45", children: "Destination account" }),
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "font-bold text-white", children: ACCOUNT_TITLES[selectedAccount] })
|
|
5371
5427
|
] }),
|
|
5372
|
-
/* @__PURE__ */ (0,
|
|
5373
|
-
/* @__PURE__ */ (0,
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5428
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5429
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-white/45", children: "Transfer method" }),
|
|
5430
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "font-bold text-white", children: method.label })
|
|
5375
5431
|
] }),
|
|
5376
|
-
/* @__PURE__ */ (0,
|
|
5432
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-tiny text-white/35", children: method.summary })
|
|
5377
5433
|
] })
|
|
5378
5434
|
] }),
|
|
5379
|
-
channelsLoading && selectedAccount === "RGB" && currentMethod === "lightning" && !isBtc && /* @__PURE__ */ (0,
|
|
5380
|
-
/* @__PURE__ */ (0,
|
|
5381
|
-
/* @__PURE__ */ (0,
|
|
5435
|
+
channelsLoading && selectedAccount === "RGB" && currentMethod === "lightning" && !isBtc && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-2.5 rounded-xl border bg-card p-3", children: [
|
|
5436
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-lg text-primary", children: "progress_activity" }),
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-xs font-medium text-white/60", children: "Checking channel availability..." })
|
|
5382
5438
|
] }),
|
|
5383
|
-
showChannelWarning && /* @__PURE__ */ (0,
|
|
5384
|
-
/* @__PURE__ */ (0,
|
|
5385
|
-
/* @__PURE__ */ (0,
|
|
5439
|
+
showChannelWarning && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(AlertBanner, { variant: "warning", children: [
|
|
5440
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "No Lightning Channels" }),
|
|
5441
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-tiny text-warning/70", children: "Only on-chain deposits are available." })
|
|
5386
5442
|
] }),
|
|
5387
|
-
showLiquidityWarning && /* @__PURE__ */ (0,
|
|
5388
|
-
/* @__PURE__ */ (0,
|
|
5389
|
-
/* @__PURE__ */ (0,
|
|
5443
|
+
showLiquidityWarning && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(AlertBanner, { variant: "warning", children: [
|
|
5444
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "No Inbound Liquidity" }),
|
|
5445
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-tiny text-warning/70", children: [
|
|
5390
5446
|
"No channels with inbound capacity for ",
|
|
5391
5447
|
selectedAsset?.ticker ?? "this asset",
|
|
5392
5448
|
"."
|
|
5393
5449
|
] })
|
|
5394
5450
|
] }),
|
|
5395
|
-
isAutoGenerate && loading && /* @__PURE__ */ (0,
|
|
5396
|
-
/* @__PURE__ */ (0,
|
|
5397
|
-
/* @__PURE__ */ (0,
|
|
5398
|
-
/* @__PURE__ */ (0,
|
|
5451
|
+
isAutoGenerate && loading && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col items-center gap-4 py-10", children: [
|
|
5452
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("flex size-16 items-center justify-center rounded-2xl border", net.bg, net.border), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: cn("material-symbols-outlined animate-spin text-icon-4xl", net.text), children: "progress_activity" }) }),
|
|
5453
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-1 text-center", children: [
|
|
5454
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-sm font-bold text-muted-foreground", children: [
|
|
5399
5455
|
"Generating ",
|
|
5400
5456
|
network === "lightning" ? "invoice" : "address",
|
|
5401
5457
|
"..."
|
|
5402
5458
|
] }),
|
|
5403
|
-
/* @__PURE__ */ (0,
|
|
5459
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-xs text-white/30", children: [
|
|
5404
5460
|
net.label,
|
|
5405
5461
|
" network"
|
|
5406
5462
|
] })
|
|
5407
5463
|
] })
|
|
5408
5464
|
] }),
|
|
5409
|
-
network === "onchain" && !isBtc && /* @__PURE__ */ (0,
|
|
5410
|
-
/* @__PURE__ */ (0,
|
|
5411
|
-
/* @__PURE__ */ (0,
|
|
5412
|
-
/* @__PURE__ */ (0,
|
|
5413
|
-
/* @__PURE__ */ (0,
|
|
5465
|
+
network === "onchain" && !isBtc && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-2 rounded-xl border bg-card p-3", children: [
|
|
5466
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5467
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5468
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h4", { className: "text-xs font-bold text-white", children: "Receive with Privacy" }),
|
|
5469
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mt-0.5 text-xxs text-muted-foreground", children: usePrivacy ? "Blinded UTXO - enhanced privacy" : "Witness address - less private" })
|
|
5414
5470
|
] }),
|
|
5415
|
-
/* @__PURE__ */ (0,
|
|
5471
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5416
5472
|
"button",
|
|
5417
5473
|
{
|
|
5418
5474
|
type: "button",
|
|
@@ -5421,7 +5477,7 @@ function DepositPreGeneration({
|
|
|
5421
5477
|
usePrivacy ? "bg-primary" : "bg-white/10"
|
|
5422
5478
|
),
|
|
5423
5479
|
onClick: () => setUsePrivacy(!usePrivacy),
|
|
5424
|
-
children: /* @__PURE__ */ (0,
|
|
5480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5425
5481
|
"span",
|
|
5426
5482
|
{
|
|
5427
5483
|
className: cn(
|
|
@@ -5433,21 +5489,21 @@ function DepositPreGeneration({
|
|
|
5433
5489
|
}
|
|
5434
5490
|
)
|
|
5435
5491
|
] }),
|
|
5436
|
-
!usePrivacy && /* @__PURE__ */ (0,
|
|
5492
|
+
!usePrivacy && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "rounded-lg border border-warning/15 bg-warning/5 px-2.5 py-1.5 text-xxs text-warning/80", children: "Sender needs to add sats to create a new UTXO for you." })
|
|
5437
5493
|
] }),
|
|
5438
|
-
network === "onchain" && !isBtc && /* @__PURE__ */ (0,
|
|
5439
|
-
/* @__PURE__ */ (0,
|
|
5440
|
-
/* @__PURE__ */ (0,
|
|
5494
|
+
network === "onchain" && !isBtc && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-1.5", children: [
|
|
5495
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
5496
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: [
|
|
5441
5497
|
"Amount (",
|
|
5442
5498
|
getUnitLabel(),
|
|
5443
5499
|
") - Optional"
|
|
5444
5500
|
] }),
|
|
5445
|
-
selectedAsset && /* @__PURE__ */ (0,
|
|
5501
|
+
selectedAsset && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "text-xxs text-white/30", children: [
|
|
5446
5502
|
selectedAsset.precision ?? 0,
|
|
5447
5503
|
" decimals"
|
|
5448
5504
|
] })
|
|
5449
5505
|
] }),
|
|
5450
|
-
/* @__PURE__ */ (0,
|
|
5506
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5451
5507
|
"input",
|
|
5452
5508
|
{
|
|
5453
5509
|
type: "text",
|
|
@@ -5459,20 +5515,20 @@ function DepositPreGeneration({
|
|
|
5459
5515
|
}
|
|
5460
5516
|
)
|
|
5461
5517
|
] }),
|
|
5462
|
-
!isAutoGenerate && /* @__PURE__ */ (0,
|
|
5463
|
-
/* @__PURE__ */ (0,
|
|
5518
|
+
!isAutoGenerate && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Button, { variant: "cta", size: "cta", onClick: generateInvoice, disabled: loading, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
|
|
5519
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-md", children: "progress_activity" }),
|
|
5464
5520
|
"Generating..."
|
|
5465
|
-
] }) : /* @__PURE__ */ (0,
|
|
5466
|
-
/* @__PURE__ */ (0,
|
|
5521
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
|
|
5522
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined text-icon-md", children: "qr_code_2" }),
|
|
5467
5523
|
"Generate Address"
|
|
5468
5524
|
] }) })
|
|
5469
5525
|
] });
|
|
5470
5526
|
}
|
|
5471
5527
|
|
|
5472
5528
|
// src/web/components/deposit-asset-selection.tsx
|
|
5473
|
-
var
|
|
5529
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5474
5530
|
function NetBadge({ icon, className }) {
|
|
5475
|
-
return /* @__PURE__ */ (0,
|
|
5531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: cn("inline-flex items-center justify-center rounded border px-1.5 py-0.5", className), children: icon });
|
|
5476
5532
|
}
|
|
5477
5533
|
function DepositAssetSelection({
|
|
5478
5534
|
setCurrentView,
|
|
@@ -5513,24 +5569,24 @@ function DepositAssetSelection({
|
|
|
5513
5569
|
enabled: isArkadeConnected
|
|
5514
5570
|
}
|
|
5515
5571
|
].filter((option) => option.enabled);
|
|
5516
|
-
return /* @__PURE__ */ (0,
|
|
5517
|
-
/* @__PURE__ */ (0,
|
|
5518
|
-
/* @__PURE__ */ (0,
|
|
5519
|
-
/* @__PURE__ */ (0,
|
|
5520
|
-
/* @__PURE__ */ (0,
|
|
5521
|
-
/* @__PURE__ */ (0,
|
|
5522
|
-
/* @__PURE__ */ (0,
|
|
5572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex h-screen flex-col overflow-hidden bg-background font-display text-foreground", children: [
|
|
5573
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PageHeader, { title: "Deposit", onBack: () => setCurrentView("dashboard") }),
|
|
5574
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-shrink-0 space-y-2 px-5 pb-3 pt-4", children: [
|
|
5575
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5576
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5577
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex size-6 items-center justify-center rounded-full bg-primary shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-tiny font-black text-background", children: "1" }) }),
|
|
5578
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-xs font-bold tracking-wide text-primary", children: "Select Asset" })
|
|
5523
5579
|
] }),
|
|
5524
|
-
/* @__PURE__ */ (0,
|
|
5525
|
-
/* @__PURE__ */ (0,
|
|
5526
|
-
/* @__PURE__ */ (0,
|
|
5527
|
-
/* @__PURE__ */ (0,
|
|
5580
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mx-1 h-px flex-1 bg-white/10" }),
|
|
5581
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex size-6 items-center justify-center rounded-full border border-white/20", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-tiny font-black text-white/30", children: "2" }) }),
|
|
5583
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-xs font-bold tracking-wide text-white/30", children: "Receive" })
|
|
5528
5584
|
] })
|
|
5529
5585
|
] }),
|
|
5530
|
-
/* @__PURE__ */ (0,
|
|
5586
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "h-0.5 w-full overflow-hidden rounded-full bg-white/5", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "h-full w-1/2 rounded-full bg-primary transition-all duration-500" }) })
|
|
5531
5587
|
] }),
|
|
5532
|
-
/* @__PURE__ */ (0,
|
|
5533
|
-
/* @__PURE__ */ (0,
|
|
5588
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-shrink-0 px-5 pb-3", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative", children: [
|
|
5589
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5534
5590
|
Icon2,
|
|
5535
5591
|
{
|
|
5536
5592
|
name: "search",
|
|
@@ -5538,7 +5594,7 @@ function DepositAssetSelection({
|
|
|
5538
5594
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-white/30"
|
|
5539
5595
|
}
|
|
5540
5596
|
),
|
|
5541
|
-
/* @__PURE__ */ (0,
|
|
5597
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5542
5598
|
"input",
|
|
5543
5599
|
{
|
|
5544
5600
|
autoFocus: true,
|
|
@@ -5551,8 +5607,8 @@ function DepositAssetSelection({
|
|
|
5551
5607
|
}
|
|
5552
5608
|
)
|
|
5553
5609
|
] }) }),
|
|
5554
|
-
/* @__PURE__ */ (0,
|
|
5555
|
-
btcAsset && /* @__PURE__ */ (0,
|
|
5610
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ScrollArea, { className: "min-h-0 flex-1", viewportClassName: "space-y-1.5 px-5 pb-3", children: [
|
|
5611
|
+
btcAsset && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5556
5612
|
"button",
|
|
5557
5613
|
{
|
|
5558
5614
|
type: "button",
|
|
@@ -5560,104 +5616,104 @@ function DepositAssetSelection({
|
|
|
5560
5616
|
className: "group flex w-full items-center gap-3 rounded-2xl border border-white/8 bg-white/3 px-4 py-3 text-sm transition-all hover:border-border hover:bg-accent",
|
|
5561
5617
|
onClick: () => onSelectAsset(btcAsset),
|
|
5562
5618
|
children: [
|
|
5563
|
-
/* @__PURE__ */ (0,
|
|
5564
|
-
/* @__PURE__ */ (0,
|
|
5565
|
-
/* @__PURE__ */ (0,
|
|
5566
|
-
/* @__PURE__ */ (0,
|
|
5619
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssetIcon, { ticker: "BTC", size: 40 }),
|
|
5620
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
5621
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: "Bitcoin" }),
|
|
5622
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-0.5 text-xs text-white/40", children: "Choose destination account next" })
|
|
5567
5623
|
] }),
|
|
5568
|
-
/* @__PURE__ */ (0,
|
|
5569
|
-
/* @__PURE__ */ (0,
|
|
5624
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-shrink-0 gap-1", children: [
|
|
5625
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5570
5626
|
NetBadge,
|
|
5571
5627
|
{
|
|
5572
5628
|
className: "border-network-bitcoin/20 bg-network-bitcoin/15",
|
|
5573
|
-
icon: /* @__PURE__ */ (0,
|
|
5629
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined leading-none text-network-bitcoin", style: { fontSize: 10 }, children: "link" })
|
|
5574
5630
|
}
|
|
5575
5631
|
),
|
|
5576
|
-
/* @__PURE__ */ (0,
|
|
5632
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5577
5633
|
NetBadge,
|
|
5578
5634
|
{
|
|
5579
5635
|
className: "border-warning/20 bg-warning/15",
|
|
5580
|
-
icon: /* @__PURE__ */ (0,
|
|
5636
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: "/icons/lightning/lightning.svg", className: "h-2.5 w-2.5", alt: "" })
|
|
5581
5637
|
}
|
|
5582
5638
|
),
|
|
5583
|
-
isSparkConnected && /* @__PURE__ */ (0,
|
|
5639
|
+
isSparkConnected && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5584
5640
|
NetBadge,
|
|
5585
5641
|
{
|
|
5586
5642
|
className: "border-info/20 bg-info/15",
|
|
5587
|
-
icon: /* @__PURE__ */ (0,
|
|
5643
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: "/icons/spark/Asterisk/Spark Asterisk White.svg", className: "h-2.5 w-2.5", alt: "Spark" })
|
|
5588
5644
|
}
|
|
5589
5645
|
),
|
|
5590
|
-
isArkadeConnected && /* @__PURE__ */ (0,
|
|
5646
|
+
isArkadeConnected && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5591
5647
|
NetBadge,
|
|
5592
5648
|
{
|
|
5593
5649
|
className: "border-network-arkade/20 bg-network-arkade/15",
|
|
5594
|
-
icon: /* @__PURE__ */ (0,
|
|
5650
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: "/icons/arkade/arkade-icon.svg", className: "h-2.5 w-2.5 rounded-sm", alt: "Arkade" })
|
|
5595
5651
|
}
|
|
5596
5652
|
)
|
|
5597
5653
|
] }),
|
|
5598
|
-
/* @__PURE__ */ (0,
|
|
5654
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined flex-shrink-0 text-icon-md text-white/20 transition-colors group-hover:text-white/50", children: "arrow_forward" })
|
|
5599
5655
|
]
|
|
5600
5656
|
}
|
|
5601
5657
|
),
|
|
5602
|
-
noResults ? /* @__PURE__ */ (0,
|
|
5658
|
+
noResults ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "py-8 text-center text-sm text-white/30", children: [
|
|
5603
5659
|
'No assets match "',
|
|
5604
5660
|
searchQuery,
|
|
5605
5661
|
'"'
|
|
5606
|
-
] }) : rgbAssets.map((asset) => /* @__PURE__ */ (0,
|
|
5662
|
+
] }) : rgbAssets.map((asset) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5607
5663
|
"button",
|
|
5608
5664
|
{
|
|
5609
5665
|
type: "button",
|
|
5610
5666
|
className: "group flex w-full items-center gap-3 rounded-2xl border border-white/8 bg-white/3 px-4 py-3 text-sm transition-all hover:border-border hover:bg-accent",
|
|
5611
5667
|
onClick: () => onSelectAsset(asset),
|
|
5612
5668
|
children: [
|
|
5613
|
-
/* @__PURE__ */ (0,
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5615
|
-
/* @__PURE__ */ (0,
|
|
5669
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative flex-shrink-0", children: [
|
|
5670
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssetIcon, { ticker: asset.ticker, size: 40 }),
|
|
5671
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full border bg-card", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: "/icons/rgb/rgb-logo.svg", className: "block h-2.5 w-2.5 object-contain", alt: "RGB" }) })
|
|
5616
5672
|
] }),
|
|
5617
|
-
/* @__PURE__ */ (0,
|
|
5618
|
-
/* @__PURE__ */ (0,
|
|
5619
|
-
/* @__PURE__ */ (0,
|
|
5673
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
5674
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: asset.ticker }),
|
|
5675
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-0.5 truncate text-xs text-white/40", children: asset.name ?? "RGB Asset" })
|
|
5620
5676
|
] }),
|
|
5621
|
-
/* @__PURE__ */ (0,
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5677
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-shrink-0 gap-1", children: [
|
|
5678
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5623
5679
|
NetBadge,
|
|
5624
5680
|
{
|
|
5625
5681
|
className: "border-network-bitcoin/20 bg-network-bitcoin/15",
|
|
5626
|
-
icon: /* @__PURE__ */ (0,
|
|
5682
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined leading-none text-network-bitcoin", style: { fontSize: 10 }, children: "link" })
|
|
5627
5683
|
}
|
|
5628
5684
|
),
|
|
5629
|
-
/* @__PURE__ */ (0,
|
|
5685
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5630
5686
|
NetBadge,
|
|
5631
5687
|
{
|
|
5632
5688
|
className: "border-warning/20 bg-warning/15",
|
|
5633
|
-
icon: /* @__PURE__ */ (0,
|
|
5689
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: "/icons/lightning/lightning.svg", className: "h-2.5 w-2.5", alt: "" })
|
|
5634
5690
|
}
|
|
5635
5691
|
)
|
|
5636
5692
|
] }),
|
|
5637
|
-
/* @__PURE__ */ (0,
|
|
5693
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined flex-shrink-0 text-icon-md text-white/20 transition-colors group-hover:text-white/50", children: "arrow_forward" })
|
|
5638
5694
|
]
|
|
5639
5695
|
},
|
|
5640
5696
|
asset.asset_id
|
|
5641
5697
|
)),
|
|
5642
|
-
!searchQuery && /* @__PURE__ */ (0,
|
|
5698
|
+
!searchQuery && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "pb-1 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5643
5699
|
"button",
|
|
5644
5700
|
{
|
|
5645
5701
|
type: "button",
|
|
5646
5702
|
onClick: () => setCurrentView("bridge"),
|
|
5647
5703
|
className: "group flex w-full items-center gap-3 rounded-2xl border border-info/20 bg-gradient-to-r from-info/10 to-network-arkade/10 p-3 transition-all hover:border-info/40",
|
|
5648
5704
|
children: [
|
|
5649
|
-
/* @__PURE__ */ (0,
|
|
5650
|
-
/* @__PURE__ */ (0,
|
|
5651
|
-
/* @__PURE__ */ (0,
|
|
5652
|
-
/* @__PURE__ */ (0,
|
|
5705
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-info/20", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined text-lg text-info", children: "swap_calls" }) }),
|
|
5706
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-1 text-left", children: [
|
|
5707
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-sm font-semibold text-white transition-colors group-hover:text-info", children: "Bridge from another chain" }),
|
|
5708
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xxs leading-tight text-white/40", children: "USDC, USDT, ETH, SOL via Flashnet" })
|
|
5653
5709
|
] }),
|
|
5654
|
-
/* @__PURE__ */ (0,
|
|
5710
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined text-lg text-white/30 transition-colors group-hover:text-info", children: "arrow_forward" })
|
|
5655
5711
|
]
|
|
5656
5712
|
}
|
|
5657
5713
|
) }),
|
|
5658
|
-
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */ (0,
|
|
5659
|
-
/* @__PURE__ */ (0,
|
|
5660
|
-
/* @__PURE__ */ (0,
|
|
5714
|
+
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "space-y-2 pt-2", children: [
|
|
5715
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "px-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xxs font-bold uppercase tracking-[0.18em] text-white/35", children: "New Asset" }) }),
|
|
5716
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5661
5717
|
"div",
|
|
5662
5718
|
{
|
|
5663
5719
|
className: cn(
|
|
@@ -5666,7 +5722,7 @@ function DepositAssetSelection({
|
|
|
5666
5722
|
),
|
|
5667
5723
|
children: newAssetOptions.map((option) => {
|
|
5668
5724
|
const active = isNewAsset && newAssetAccount === option.account;
|
|
5669
|
-
return /* @__PURE__ */ (0,
|
|
5725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5670
5726
|
"button",
|
|
5671
5727
|
{
|
|
5672
5728
|
type: "button",
|
|
@@ -5677,21 +5733,21 @@ function DepositAssetSelection({
|
|
|
5677
5733
|
),
|
|
5678
5734
|
onClick: () => handleAddNewAsset(option.account),
|
|
5679
5735
|
children: [
|
|
5680
|
-
/* @__PURE__ */ (0,
|
|
5681
|
-
/* @__PURE__ */ (0,
|
|
5682
|
-
/* @__PURE__ */ (0,
|
|
5736
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative", children: [
|
|
5737
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssetIcon, { ticker: option.ticker, size: 40 }),
|
|
5738
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5683
5739
|
"div",
|
|
5684
5740
|
{
|
|
5685
5741
|
className: cn(
|
|
5686
5742
|
"absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full border",
|
|
5687
5743
|
active ? "border-network-arkade/40 bg-network-arkade" : "border-border bg-card"
|
|
5688
5744
|
),
|
|
5689
|
-
children: active ? /* @__PURE__ */ (0,
|
|
5745
|
+
children: active ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon2, { name: "check", size: "xs", className: "text-white" }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Icon2, { name: "add", size: "xs", className: "text-muted-foreground" })
|
|
5690
5746
|
}
|
|
5691
5747
|
)
|
|
5692
5748
|
] }),
|
|
5693
|
-
/* @__PURE__ */ (0,
|
|
5694
|
-
/* @__PURE__ */ (0,
|
|
5749
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mt-2 min-w-0", children: [
|
|
5750
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5695
5751
|
"div",
|
|
5696
5752
|
{
|
|
5697
5753
|
className: cn(
|
|
@@ -5701,7 +5757,7 @@ function DepositAssetSelection({
|
|
|
5701
5757
|
children: option.account
|
|
5702
5758
|
}
|
|
5703
5759
|
),
|
|
5704
|
-
/* @__PURE__ */ (0,
|
|
5760
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-1 text-xxs leading-tight text-white/40", children: option.title })
|
|
5705
5761
|
] })
|
|
5706
5762
|
]
|
|
5707
5763
|
},
|
|
@@ -5712,10 +5768,10 @@ function DepositAssetSelection({
|
|
|
5712
5768
|
)
|
|
5713
5769
|
] })
|
|
5714
5770
|
] }),
|
|
5715
|
-
isNewAsset && newAssetAccount === "RGB" && /* @__PURE__ */ (0,
|
|
5716
|
-
/* @__PURE__ */ (0,
|
|
5717
|
-
/* @__PURE__ */ (0,
|
|
5718
|
-
/* @__PURE__ */ (0,
|
|
5771
|
+
isNewAsset && newAssetAccount === "RGB" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
5772
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-shrink-0 px-5 pb-3 animate-in fade-in slide-in-from-bottom-2 duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "space-y-2 rounded-2xl border border-network-arkade/20 bg-network-arkade/5 p-3", children: [
|
|
5773
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-tiny leading-relaxed text-network-arkade/80", children: "Leave empty to receive any RGB asset, or enter a specific asset ID." }),
|
|
5774
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5719
5775
|
"input",
|
|
5720
5776
|
{
|
|
5721
5777
|
className: "w-full rounded-xl border bg-white/5 px-3 py-2 font-mono text-sm text-white transition-all placeholder:text-white/25 focus:border-network-arkade/40 focus:outline-none",
|
|
@@ -5726,16 +5782,16 @@ function DepositAssetSelection({
|
|
|
5726
5782
|
}
|
|
5727
5783
|
)
|
|
5728
5784
|
] }) }),
|
|
5729
|
-
/* @__PURE__ */ (0,
|
|
5785
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex-shrink-0 px-5 pb-5 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Button, { variant: "cta", size: "cta", onClick: handleContinueToGenerate, children: [
|
|
5730
5786
|
"Continue with New Asset",
|
|
5731
|
-
/* @__PURE__ */ (0,
|
|
5787
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined text-icon-xl font-bold", children: "arrow_forward" })
|
|
5732
5788
|
] }) })
|
|
5733
5789
|
] })
|
|
5734
5790
|
] });
|
|
5735
5791
|
}
|
|
5736
5792
|
|
|
5737
5793
|
// src/web/components/deposit-invoice-generation.tsx
|
|
5738
|
-
var
|
|
5794
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5739
5795
|
var ACCOUNT_TITLES2 = {
|
|
5740
5796
|
RGB: "RGB & Lightning",
|
|
5741
5797
|
SPARK: "Spark",
|
|
@@ -5888,7 +5944,7 @@ function DepositInvoiceGeneration({
|
|
|
5888
5944
|
if (nextMethod) applyMethodSelection(account, nextMethod);
|
|
5889
5945
|
};
|
|
5890
5946
|
if (depositDetected) {
|
|
5891
|
-
return /* @__PURE__ */ (0,
|
|
5947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5892
5948
|
DepositSuccessScreen,
|
|
5893
5949
|
{
|
|
5894
5950
|
handleDone,
|
|
@@ -5904,26 +5960,26 @@ function DepositInvoiceGeneration({
|
|
|
5904
5960
|
const addressLabel = network === "spark" ? "Spark Address" : network === "arkade" ? arkSubMode === "boarding" ? "Boarding Address" : "Arkade Address" : network === "lightning" ? "Lightning Invoice" : "Deposit Address";
|
|
5905
5961
|
const showChannelWarning = selectedAccount === "RGB" && network === "lightning" && !channelsLoading && channels.length === 0 && !isSparkConnected;
|
|
5906
5962
|
const showLiquidityWarning = !isSparkLightning && network === "lightning" && maxDepositAmount === 0 && !channelsLoading && !isBtc;
|
|
5907
|
-
return /* @__PURE__ */ (0,
|
|
5908
|
-
/* @__PURE__ */ (0,
|
|
5963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex h-screen flex-col overflow-hidden bg-background font-display text-foreground", children: [
|
|
5964
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5909
5965
|
PageHeader,
|
|
5910
5966
|
{
|
|
5911
5967
|
title: `Receive ${selectedAsset?.ticker ?? (isNewAsset ? "RGB" : "Asset")}`,
|
|
5912
5968
|
subtitle: selectedAsset?.name,
|
|
5913
5969
|
titleAlign: "start",
|
|
5914
5970
|
onBack: handleBack,
|
|
5915
|
-
left: /* @__PURE__ */ (0,
|
|
5916
|
-
right: /* @__PURE__ */ (0,
|
|
5917
|
-
/* @__PURE__ */ (0,
|
|
5918
|
-
/* @__PURE__ */ (0,
|
|
5919
|
-
/* @__PURE__ */ (0,
|
|
5971
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AssetIcon, { ticker: displayTicker, size: 28 }),
|
|
5972
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
5973
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex size-5 items-center justify-center rounded-full bg-primary/10 shadow-inner", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-xxs font-black text-primary", children: "1" }) }),
|
|
5974
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-px w-3 bg-white/10" }),
|
|
5975
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex size-5 items-center justify-center rounded-full bg-primary shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-xxs font-black text-background", children: "2" }) })
|
|
5920
5976
|
] })
|
|
5921
5977
|
}
|
|
5922
5978
|
),
|
|
5923
|
-
/* @__PURE__ */ (0,
|
|
5924
|
-
/* @__PURE__ */ (0,
|
|
5925
|
-
/* @__PURE__ */ (0,
|
|
5926
|
-
/* @__PURE__ */ (0,
|
|
5979
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex-shrink-0 border-b border-border bg-background px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-2", children: [
|
|
5980
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Destination Account" }),
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: availableAccounts.map((account) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5927
5983
|
AccountChoiceChip,
|
|
5928
5984
|
{
|
|
5929
5985
|
account,
|
|
@@ -5948,9 +6004,9 @@ function DepositInvoiceGeneration({
|
|
|
5948
6004
|
account
|
|
5949
6005
|
)) })
|
|
5950
6006
|
] }),
|
|
5951
|
-
!isBtc && !(isNewAsset && (network === "spark" || network === "arkade")) && /* @__PURE__ */ (0,
|
|
5952
|
-
/* @__PURE__ */ (0,
|
|
5953
|
-
/* @__PURE__ */ (0,
|
|
6007
|
+
!isBtc && !(isNewAsset && (network === "spark" || network === "arkade")) && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
6008
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Transfer Method" }),
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-1.5 flex gap-1.5 overflow-x-auto no-scrollbar", children: methodOptions.map(({ method, enabled, disabledReason }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5954
6010
|
MethodChoiceChip,
|
|
5955
6011
|
{
|
|
5956
6012
|
method,
|
|
@@ -5963,7 +6019,7 @@ function DepositInvoiceGeneration({
|
|
|
5963
6019
|
)) })
|
|
5964
6020
|
] })
|
|
5965
6021
|
] }) }),
|
|
5966
|
-
/* @__PURE__ */ (0,
|
|
6022
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ScrollArea, { className: "flex-1", viewportAs: "main", viewportClassName: "space-y-2.5 px-4 py-2.5", children: isBtc && accountReceiveResult ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5967
6023
|
BtcUnifiedReceive,
|
|
5968
6024
|
{
|
|
5969
6025
|
btcSelectedAccount,
|
|
@@ -5983,8 +6039,8 @@ function DepositInvoiceGeneration({
|
|
|
5983
6039
|
setAccountReceiveResult,
|
|
5984
6040
|
handleDone
|
|
5985
6041
|
}
|
|
5986
|
-
) : isBtc && !accountReceiveResult && loading ? /* @__PURE__ */ (0,
|
|
5987
|
-
/* @__PURE__ */ (0,
|
|
6042
|
+
) : isBtc && !accountReceiveResult && loading ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col items-center gap-4 py-10", children: [
|
|
6043
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5988
6044
|
"div",
|
|
5989
6045
|
{
|
|
5990
6046
|
className: cn(
|
|
@@ -5992,7 +6048,7 @@ function DepositInvoiceGeneration({
|
|
|
5992
6048
|
NETWORK_CONFIG[btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain"].bg,
|
|
5993
6049
|
NETWORK_CONFIG[btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain"].border
|
|
5994
6050
|
),
|
|
5995
|
-
children: /* @__PURE__ */ (0,
|
|
6051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5996
6052
|
"span",
|
|
5997
6053
|
{
|
|
5998
6054
|
className: cn(
|
|
@@ -6004,11 +6060,11 @@ function DepositInvoiceGeneration({
|
|
|
6004
6060
|
)
|
|
6005
6061
|
}
|
|
6006
6062
|
),
|
|
6007
|
-
/* @__PURE__ */ (0,
|
|
6008
|
-
/* @__PURE__ */ (0,
|
|
6009
|
-
/* @__PURE__ */ (0,
|
|
6063
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-1 text-center", children: [
|
|
6064
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm font-bold text-muted-foreground", children: "Generating addresses..." }),
|
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xs text-white/30", children: ACCOUNT_TITLES2[btcSelectedAccount] })
|
|
6010
6066
|
] })
|
|
6011
|
-
] }) : !address ? /* @__PURE__ */ (0,
|
|
6067
|
+
] }) : !address ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6012
6068
|
DepositPreGeneration,
|
|
6013
6069
|
{
|
|
6014
6070
|
selectedAsset,
|
|
@@ -6029,7 +6085,7 @@ function DepositInvoiceGeneration({
|
|
|
6029
6085
|
getUnitLabel,
|
|
6030
6086
|
generateInvoice
|
|
6031
6087
|
}
|
|
6032
|
-
) : /* @__PURE__ */ (0,
|
|
6088
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6033
6089
|
DepositGeneratedView,
|
|
6034
6090
|
{
|
|
6035
6091
|
network,
|
|
@@ -6113,6 +6169,7 @@ function DepositInvoiceGeneration({
|
|
|
6113
6169
|
DialogPortal,
|
|
6114
6170
|
DialogTitle,
|
|
6115
6171
|
DialogTrigger,
|
|
6172
|
+
DotPagination,
|
|
6116
6173
|
ErrorBoundary,
|
|
6117
6174
|
ErrorCard,
|
|
6118
6175
|
ExpandIcon,
|