kaleido-ui 0.1.5 → 0.1.7
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 +1038 -980
- package/dist/web/index.d.cts +23 -5
- package/dist/web/index.d.ts +23 -5
- package/dist/web/index.js +716 -659
- 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,44 +1914,45 @@ 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
|
-
accounts
|
|
1919
|
+
accounts,
|
|
1920
|
+
onSelect
|
|
1868
1921
|
}) {
|
|
1869
1922
|
const [selectedAccountId, setSelectedAccountId] = (0, import_react7.useState)(null);
|
|
1870
1923
|
const selectedAccount = selectedAccountId ? accounts.find((account) => account.id === selectedAccountId) : null;
|
|
1871
|
-
return /* @__PURE__ */ (0,
|
|
1872
|
-
/* @__PURE__ */ (0,
|
|
1873
|
-
/* @__PURE__ */ (0,
|
|
1924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
1925
|
+
/* @__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: [
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1874
1927
|
NetworkStatusChip,
|
|
1875
1928
|
{
|
|
1876
|
-
onClick: () => setSelectedAccountId(account.id),
|
|
1929
|
+
onClick: () => onSelect ? onSelect(account.id) : setSelectedAccountId(account.id),
|
|
1877
1930
|
icon: account.icon,
|
|
1878
1931
|
dotClassName: account.dotTone,
|
|
1879
|
-
ariaLabel: `Open ${account.title} details`
|
|
1932
|
+
ariaLabel: onSelect ? `Open ${account.title}` : `Open ${account.title} details`
|
|
1880
1933
|
}
|
|
1881
1934
|
),
|
|
1882
|
-
/* @__PURE__ */ (0,
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1883
1936
|
"div",
|
|
1884
1937
|
{
|
|
1885
1938
|
className: cn(
|
|
1886
1939
|
"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
1940
|
),
|
|
1888
1941
|
children: [
|
|
1889
|
-
/* @__PURE__ */ (0,
|
|
1890
|
-
/* @__PURE__ */ (0,
|
|
1891
|
-
/* @__PURE__ */ (0,
|
|
1892
|
-
/* @__PURE__ */ (0,
|
|
1893
|
-
/* @__PURE__ */ (0,
|
|
1894
|
-
/* @__PURE__ */ (0,
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "shrink-0", children: account.icon }),
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0", children: [
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-xxs font-black uppercase tracking-[0.18em] text-white/55", children: account.label }),
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: cn("size-2 rounded-full", account.dotTone) })
|
|
1895
1948
|
] }),
|
|
1896
|
-
/* @__PURE__ */ (0,
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
1949
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-sm font-semibold text-white/90", children: account.title }),
|
|
1950
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-xs font-medium text-white/45", children: account.state })
|
|
1898
1951
|
] })
|
|
1899
1952
|
] }),
|
|
1900
|
-
/* @__PURE__ */ (0,
|
|
1901
|
-
/* @__PURE__ */ (0,
|
|
1902
|
-
/* @__PURE__ */ (0,
|
|
1953
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-3 text-xs leading-relaxed text-white/60", children: account.detail }),
|
|
1954
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-2 text-xs leading-relaxed text-white/45", children: account.description }),
|
|
1955
|
+
/* @__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
1956
|
"span",
|
|
1904
1957
|
{
|
|
1905
1958
|
className: "rounded-full border bg-white/[0.05] px-2 py-1 text-xxs font-medium text-white/60",
|
|
@@ -1911,14 +1964,14 @@ function AccountStatusTabs({
|
|
|
1911
1964
|
}
|
|
1912
1965
|
)
|
|
1913
1966
|
] }, account.id)) }) }),
|
|
1914
|
-
/* @__PURE__ */ (0,
|
|
1967
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1915
1968
|
Dialog,
|
|
1916
1969
|
{
|
|
1917
1970
|
open: selectedAccountId !== null,
|
|
1918
1971
|
onOpenChange: (open) => !open && setSelectedAccountId(null),
|
|
1919
|
-
children: selectedAccount && /* @__PURE__ */ (0,
|
|
1920
|
-
/* @__PURE__ */ (0,
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1972
|
+
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: [
|
|
1973
|
+
/* @__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: [
|
|
1974
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1922
1975
|
"div",
|
|
1923
1976
|
{
|
|
1924
1977
|
className: cn(
|
|
@@ -1929,17 +1982,17 @@ function AccountStatusTabs({
|
|
|
1929
1982
|
children: selectedAccount.icon
|
|
1930
1983
|
}
|
|
1931
1984
|
),
|
|
1932
|
-
/* @__PURE__ */ (0,
|
|
1933
|
-
/* @__PURE__ */ (0,
|
|
1934
|
-
/* @__PURE__ */ (0,
|
|
1935
|
-
/* @__PURE__ */ (0,
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "min-w-0", children: [
|
|
1986
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-xxs font-black uppercase tracking-[0.18em] text-muted-foreground", children: selectedAccount.label }),
|
|
1988
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: cn("size-2 rounded-full", selectedAccount.dotTone) })
|
|
1936
1989
|
] }),
|
|
1937
|
-
/* @__PURE__ */ (0,
|
|
1938
|
-
/* @__PURE__ */ (0,
|
|
1990
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogTitle, { className: "mt-1 text-xl font-bold text-white", children: selectedAccount.title }),
|
|
1991
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DialogDescription, { className: "mt-2 text-sm leading-relaxed text-white/60", children: selectedAccount.description })
|
|
1939
1992
|
] })
|
|
1940
1993
|
] }) }),
|
|
1941
|
-
/* @__PURE__ */ (0,
|
|
1942
|
-
/* @__PURE__ */ (0,
|
|
1994
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mt-5 grid grid-cols-2 gap-3", children: [
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1943
1996
|
"div",
|
|
1944
1997
|
{
|
|
1945
1998
|
className: cn(
|
|
@@ -1947,20 +2000,20 @@ function AccountStatusTabs({
|
|
|
1947
2000
|
selectedAccount.networkBannerClassName
|
|
1948
2001
|
),
|
|
1949
2002
|
children: [
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em]", children: "Network" }),
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-sm font-semibold", children: selectedAccount.networkLabel })
|
|
1952
2005
|
]
|
|
1953
2006
|
}
|
|
1954
2007
|
),
|
|
1955
|
-
/* @__PURE__ */ (0,
|
|
1956
|
-
/* @__PURE__ */ (0,
|
|
1957
|
-
/* @__PURE__ */ (0,
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "rounded-2xl border bg-white/[0.04] px-4 py-3", children: [
|
|
2009
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em] text-white/45", children: "Status" }),
|
|
2010
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 text-sm font-semibold text-white/90", children: selectedAccount.state })
|
|
1958
2011
|
] })
|
|
1959
2012
|
] }),
|
|
1960
|
-
/* @__PURE__ */ (0,
|
|
1961
|
-
/* @__PURE__ */ (0,
|
|
1962
|
-
/* @__PURE__ */ (0,
|
|
1963
|
-
/* @__PURE__ */ (0,
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "mt-5 text-sm leading-relaxed text-muted-foreground", children: selectedAccount.detail }),
|
|
2014
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mt-5", children: [
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "text-icon-xxs font-black uppercase tracking-[0.18em] text-white/45", children: "Capabilities" }),
|
|
2016
|
+
/* @__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
2017
|
"span",
|
|
1965
2018
|
{
|
|
1966
2019
|
className: "rounded-full border bg-white/[0.05] px-2.5 py-1 text-xxs font-medium text-white/65",
|
|
@@ -1977,7 +2030,7 @@ function AccountStatusTabs({
|
|
|
1977
2030
|
|
|
1978
2031
|
// src/web/components/filter-dropdown.tsx
|
|
1979
2032
|
var import_react8 = require("react");
|
|
1980
|
-
var
|
|
2033
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1981
2034
|
function FilterDropdown({
|
|
1982
2035
|
label,
|
|
1983
2036
|
value,
|
|
@@ -1992,8 +2045,8 @@ function FilterDropdown({
|
|
|
1992
2045
|
const displayedCluster = specificOptions.slice(0, clusterMax);
|
|
1993
2046
|
const clusterOverflow = specificOptions.length - displayedCluster.length;
|
|
1994
2047
|
const isFiltered = value !== "all";
|
|
1995
|
-
return /* @__PURE__ */ (0,
|
|
1996
|
-
/* @__PURE__ */ (0,
|
|
2048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("relative flex-1", className), children: [
|
|
2049
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1997
2050
|
"button",
|
|
1998
2051
|
{
|
|
1999
2052
|
type: "button",
|
|
@@ -2003,7 +2056,7 @@ function FilterDropdown({
|
|
|
2003
2056
|
isFiltered ? "bg-white/[0.13] shadow-inner" : "bg-white/[0.09] backdrop-blur-md hover:bg-white/[0.13]"
|
|
2004
2057
|
),
|
|
2005
2058
|
children: [
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2007
2060
|
"span",
|
|
2008
2061
|
{
|
|
2009
2062
|
className: cn(
|
|
@@ -2013,17 +2066,17 @@ function FilterDropdown({
|
|
|
2013
2066
|
children: label
|
|
2014
2067
|
}
|
|
2015
2068
|
),
|
|
2016
|
-
/* @__PURE__ */ (0,
|
|
2017
|
-
/* @__PURE__ */ (0,
|
|
2018
|
-
clusterOverflow > 0 && /* @__PURE__ */ (0,
|
|
2069
|
+
/* @__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: [
|
|
2070
|
+
/* @__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)) }),
|
|
2071
|
+
clusterOverflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "ml-1 text-xxs font-semibold leading-none text-muted-foreground", children: [
|
|
2019
2072
|
"+",
|
|
2020
2073
|
clusterOverflow
|
|
2021
2074
|
] })
|
|
2022
|
-
] }) : /* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2075
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex size-6 shrink-0 items-center justify-center", children: selected?.icon }),
|
|
2077
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-tiny font-bold text-white", children: selected?.label })
|
|
2025
2078
|
] }) }),
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2079
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2027
2080
|
Icon2,
|
|
2028
2081
|
{
|
|
2029
2082
|
name: "expand_more",
|
|
@@ -2036,7 +2089,7 @@ function FilterDropdown({
|
|
|
2036
2089
|
]
|
|
2037
2090
|
}
|
|
2038
2091
|
),
|
|
2039
|
-
isOpen && /* @__PURE__ */ (0,
|
|
2092
|
+
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
2093
|
"button",
|
|
2041
2094
|
{
|
|
2042
2095
|
type: "button",
|
|
@@ -2049,9 +2102,8 @@ function FilterDropdown({
|
|
|
2049
2102
|
value === option.id ? "bg-white/15 text-white shadow-sm" : "text-white/60 hover:bg-accent hover:text-white/90"
|
|
2050
2103
|
),
|
|
2051
2104
|
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" })
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex size-6 shrink-0 items-center justify-center", children: option.icon }),
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: cn("text-xs", value === option.id ? "font-bold" : "font-medium"), children: option.label })
|
|
2055
2107
|
]
|
|
2056
2108
|
},
|
|
2057
2109
|
option.id
|
|
@@ -2060,35 +2112,35 @@ function FilterDropdown({
|
|
|
2060
2112
|
}
|
|
2061
2113
|
|
|
2062
2114
|
// src/web/components/settings-tile.tsx
|
|
2063
|
-
var
|
|
2115
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2064
2116
|
function SettingsTile({ icon, title, description, value, onClick }) {
|
|
2065
|
-
return /* @__PURE__ */ (0,
|
|
2117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2066
2118
|
"button",
|
|
2067
2119
|
{
|
|
2068
2120
|
type: "button",
|
|
2069
2121
|
onClick,
|
|
2070
2122
|
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,
|
|
2123
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
2124
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
2125
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-muted", children: icon }),
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
2127
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-bold text-body tracking-wide text-foreground", children: title }),
|
|
2128
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "mt-0.5 text-sm font-medium text-muted-foreground", children: description })
|
|
2077
2129
|
] })
|
|
2078
2130
|
] }),
|
|
2079
|
-
/* @__PURE__ */ (0,
|
|
2080
|
-
value && /* @__PURE__ */ (0,
|
|
2081
|
-
/* @__PURE__ */ (0,
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
2132
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-mono text-xs text-muted-foreground", children: value }),
|
|
2133
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(AppIcon, { name: "chevronRight", className: "size-4 text-muted-foreground" })
|
|
2082
2134
|
] })
|
|
2083
2135
|
] })
|
|
2084
2136
|
}
|
|
2085
2137
|
);
|
|
2086
2138
|
}
|
|
2087
2139
|
function SettingsStatusPanel({ label, value }) {
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2140
|
+
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
2141
|
label,
|
|
2090
2142
|
": ",
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2143
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold text-white", children: value })
|
|
2092
2144
|
] });
|
|
2093
2145
|
}
|
|
2094
2146
|
function SettingsActionButton({
|
|
@@ -2096,7 +2148,7 @@ function SettingsActionButton({
|
|
|
2096
2148
|
children,
|
|
2097
2149
|
onClick
|
|
2098
2150
|
}) {
|
|
2099
|
-
return /* @__PURE__ */ (0,
|
|
2151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2100
2152
|
"button",
|
|
2101
2153
|
{
|
|
2102
2154
|
type: "button",
|
|
@@ -2114,7 +2166,7 @@ function SettingsActionButton({
|
|
|
2114
2166
|
var import_react9 = require("react");
|
|
2115
2167
|
|
|
2116
2168
|
// src/web/components/page-header.tsx
|
|
2117
|
-
var
|
|
2169
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2118
2170
|
function PageHeader({
|
|
2119
2171
|
left,
|
|
2120
2172
|
title,
|
|
@@ -2126,47 +2178,47 @@ function PageHeader({
|
|
|
2126
2178
|
backLabel = "Go back",
|
|
2127
2179
|
borderClassName
|
|
2128
2180
|
}) {
|
|
2129
|
-
const backButton = onBack ? /* @__PURE__ */ (0,
|
|
2181
|
+
const backButton = onBack ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2130
2182
|
"button",
|
|
2131
2183
|
{
|
|
2132
2184
|
type: "button",
|
|
2133
2185
|
onClick: onBack,
|
|
2134
2186
|
"aria-label": backLabel,
|
|
2135
2187
|
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,
|
|
2188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon2, { name: "arrow_back", size: "lg" })
|
|
2137
2189
|
}
|
|
2138
2190
|
) : null;
|
|
2139
|
-
const resolvedLeft = backButton && left ? /* @__PURE__ */ (0,
|
|
2191
|
+
const resolvedLeft = backButton && left ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2140
2192
|
backButton,
|
|
2141
2193
|
left
|
|
2142
2194
|
] }) : backButton ?? left;
|
|
2143
|
-
const titleBlock = title ? /* @__PURE__ */ (0,
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2145
|
-
subtitle && /* @__PURE__ */ (0,
|
|
2195
|
+
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: [
|
|
2196
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "truncate font-bold text-body text-foreground", children: title }),
|
|
2197
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mt-1 truncate text-xs text-muted-foreground", children: subtitle })
|
|
2146
2198
|
] }) : null;
|
|
2147
|
-
return /* @__PURE__ */ (0,
|
|
2199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("header", { className: cn(
|
|
2148
2200
|
"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
2201
|
borderClassName && "border-b",
|
|
2150
2202
|
borderClassName,
|
|
2151
2203
|
className
|
|
2152
|
-
), children: title && titleAlign === "start" ? /* @__PURE__ */ (0,
|
|
2153
|
-
/* @__PURE__ */ (0,
|
|
2204
|
+
), children: title && titleAlign === "start" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
2205
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
2154
2206
|
resolvedLeft,
|
|
2155
2207
|
titleBlock
|
|
2156
2208
|
] }),
|
|
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,
|
|
2209
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ml-3 flex shrink-0 items-center justify-end gap-2", children: right })
|
|
2210
|
+
] }) : title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
2211
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex min-w-0 flex-1 items-center", children: resolvedLeft }),
|
|
2212
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "shrink-0", children: titleBlock }),
|
|
2213
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-2", children: right })
|
|
2214
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
|
|
2215
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex shrink-0 items-center", children: resolvedLeft }),
|
|
2216
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ml-auto flex min-w-0 items-center justify-end gap-2", children: right })
|
|
2165
2217
|
] }) });
|
|
2166
2218
|
}
|
|
2167
2219
|
|
|
2168
2220
|
// src/web/components/account-settings-shared.tsx
|
|
2169
|
-
var
|
|
2221
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2170
2222
|
var SUPPORTED_ACCOUNT_NETWORKS = {
|
|
2171
2223
|
RGB: ["regtest", "testnet", "signet"],
|
|
2172
2224
|
SPARK: ["regtest", "mainnet"],
|
|
@@ -2208,15 +2260,15 @@ function getAccountNetworkUi(network) {
|
|
|
2208
2260
|
}
|
|
2209
2261
|
function AccountHeaderIcons({ accountId }) {
|
|
2210
2262
|
if (accountId === "RGB") {
|
|
2211
|
-
return /* @__PURE__ */ (0,
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex -space-x-1", children: [
|
|
2264
|
+
/* @__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" }) }),
|
|
2265
|
+
/* @__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
2266
|
] });
|
|
2215
2267
|
}
|
|
2216
2268
|
if (accountId === "SPARK") {
|
|
2217
|
-
return /* @__PURE__ */ (0,
|
|
2269
|
+
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
2270
|
}
|
|
2219
|
-
return /* @__PURE__ */ (0,
|
|
2271
|
+
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
2272
|
}
|
|
2221
2273
|
function getAccountStatusUi(status) {
|
|
2222
2274
|
switch (status) {
|
|
@@ -2244,7 +2296,7 @@ function AccountNetworkSelector({
|
|
|
2244
2296
|
disabled = false
|
|
2245
2297
|
}) {
|
|
2246
2298
|
const networks = SUPPORTED_ACCOUNT_NETWORKS[accountId];
|
|
2247
|
-
return /* @__PURE__ */ (0,
|
|
2299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2248
2300
|
"div",
|
|
2249
2301
|
{
|
|
2250
2302
|
role: "radiogroup",
|
|
@@ -2256,7 +2308,7 @@ function AccountNetworkSelector({
|
|
|
2256
2308
|
children: networks.map((network) => {
|
|
2257
2309
|
const ui = getAccountNetworkUi(network);
|
|
2258
2310
|
const selected = value === network;
|
|
2259
|
-
return /* @__PURE__ */ (0,
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2260
2312
|
"button",
|
|
2261
2313
|
{
|
|
2262
2314
|
type: "button",
|
|
@@ -2296,8 +2348,8 @@ function AccountNetworkPicker({
|
|
|
2296
2348
|
setIsSaving(false);
|
|
2297
2349
|
}
|
|
2298
2350
|
};
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2300
|
-
/* @__PURE__ */ (0,
|
|
2351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-3", children: [
|
|
2352
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2301
2353
|
AccountNetworkSelector,
|
|
2302
2354
|
{
|
|
2303
2355
|
accountId,
|
|
@@ -2306,10 +2358,10 @@ function AccountNetworkPicker({
|
|
|
2306
2358
|
disabled: isSaving
|
|
2307
2359
|
}
|
|
2308
2360
|
),
|
|
2309
|
-
isDirty && /* @__PURE__ */ (0,
|
|
2310
|
-
/* @__PURE__ */ (0,
|
|
2361
|
+
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: [
|
|
2362
|
+
/* @__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
2363
|
"Reconnecting..."
|
|
2312
|
-
] }) : /* @__PURE__ */ (0,
|
|
2364
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
2313
2365
|
"Save - Switch to ",
|
|
2314
2366
|
getAccountNetworkLabel(draft)
|
|
2315
2367
|
] }) })
|
|
@@ -2321,31 +2373,31 @@ function AccountSettingsShell({
|
|
|
2321
2373
|
subtitle,
|
|
2322
2374
|
children
|
|
2323
2375
|
}) {
|
|
2324
|
-
return /* @__PURE__ */ (0,
|
|
2325
|
-
/* @__PURE__ */ (0,
|
|
2376
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "min-h-screen bg-background pb-28 font-display text-foreground", children: [
|
|
2377
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2326
2378
|
PageHeader,
|
|
2327
2379
|
{
|
|
2328
2380
|
title,
|
|
2329
2381
|
subtitle,
|
|
2330
2382
|
titleAlign: "start",
|
|
2331
|
-
left: /* @__PURE__ */ (0,
|
|
2383
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountHeaderIcons, { accountId }),
|
|
2332
2384
|
className: "px-5 py-4"
|
|
2333
2385
|
}
|
|
2334
2386
|
),
|
|
2335
|
-
/* @__PURE__ */ (0,
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("main", { className: "space-y-6 px-5 py-6", children })
|
|
2336
2388
|
] });
|
|
2337
2389
|
}
|
|
2338
2390
|
function AccountInfoGrid({ items }) {
|
|
2339
|
-
return /* @__PURE__ */ (0,
|
|
2340
|
-
/* @__PURE__ */ (0,
|
|
2341
|
-
/* @__PURE__ */ (0,
|
|
2391
|
+
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: [
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-muted-foreground", children: item.label }),
|
|
2393
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-1 break-all text-white/90", children: item.value })
|
|
2342
2394
|
] }, item.label)) });
|
|
2343
2395
|
}
|
|
2344
2396
|
function AccountNotice({
|
|
2345
2397
|
tone = "default",
|
|
2346
2398
|
children
|
|
2347
2399
|
}) {
|
|
2348
|
-
return /* @__PURE__ */ (0,
|
|
2400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2349
2401
|
"div",
|
|
2350
2402
|
{
|
|
2351
2403
|
className: cn(
|
|
@@ -2360,7 +2412,7 @@ function AccountNetworkNotice({
|
|
|
2360
2412
|
network,
|
|
2361
2413
|
children
|
|
2362
2414
|
}) {
|
|
2363
|
-
return /* @__PURE__ */ (0,
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("rounded-xl px-3 py-3 text-xs", getAccountNetworkUi(network).bannerClassName), children });
|
|
2364
2416
|
}
|
|
2365
2417
|
function AccountStatusPills({
|
|
2366
2418
|
status,
|
|
@@ -2368,8 +2420,8 @@ function AccountStatusPills({
|
|
|
2368
2420
|
}) {
|
|
2369
2421
|
const statusUi = getAccountStatusUi(status);
|
|
2370
2422
|
const networkUi = getAccountNetworkUi(network);
|
|
2371
|
-
return /* @__PURE__ */ (0,
|
|
2372
|
-
/* @__PURE__ */ (0,
|
|
2423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
2424
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2373
2425
|
"span",
|
|
2374
2426
|
{
|
|
2375
2427
|
className: cn(
|
|
@@ -2379,7 +2431,7 @@ function AccountStatusPills({
|
|
|
2379
2431
|
children: statusUi.label === "Ready" ? "Connected" : statusUi.label
|
|
2380
2432
|
}
|
|
2381
2433
|
),
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2434
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2383
2435
|
"span",
|
|
2384
2436
|
{
|
|
2385
2437
|
className: cn(
|
|
@@ -2392,7 +2444,7 @@ function AccountStatusPills({
|
|
|
2392
2444
|
] });
|
|
2393
2445
|
}
|
|
2394
2446
|
function SectionTitle({ children }) {
|
|
2395
|
-
return /* @__PURE__ */ (0,
|
|
2447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("h3", { className: "text-xs font-bold uppercase tracking-wider text-muted-foreground", children });
|
|
2396
2448
|
}
|
|
2397
2449
|
function InlineAction({
|
|
2398
2450
|
title,
|
|
@@ -2401,7 +2453,7 @@ function InlineAction({
|
|
|
2401
2453
|
onClick
|
|
2402
2454
|
}) {
|
|
2403
2455
|
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,
|
|
2456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2405
2457
|
"button",
|
|
2406
2458
|
{
|
|
2407
2459
|
type: "button",
|
|
@@ -2411,11 +2463,11 @@ function InlineAction({
|
|
|
2411
2463
|
className
|
|
2412
2464
|
),
|
|
2413
2465
|
children: [
|
|
2414
|
-
/* @__PURE__ */ (0,
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2416
|
-
/* @__PURE__ */ (0,
|
|
2466
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2467
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-semibold text-white", children: title }),
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
2417
2469
|
] }),
|
|
2418
|
-
/* @__PURE__ */ (0,
|
|
2470
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "material-symbols-outlined text-icon-lg", children: "chevron_right" })
|
|
2419
2471
|
]
|
|
2420
2472
|
}
|
|
2421
2473
|
);
|
|
@@ -2426,19 +2478,19 @@ function TransferRouteCard({
|
|
|
2426
2478
|
eta,
|
|
2427
2479
|
feeHint
|
|
2428
2480
|
}) {
|
|
2429
|
-
return /* @__PURE__ */ (0,
|
|
2430
|
-
/* @__PURE__ */ (0,
|
|
2431
|
-
/* @__PURE__ */ (0,
|
|
2432
|
-
/* @__PURE__ */ (0,
|
|
2481
|
+
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: [
|
|
2482
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-bold text-white", children: label }),
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: summary })
|
|
2433
2485
|
] }),
|
|
2434
|
-
/* @__PURE__ */ (0,
|
|
2435
|
-
/* @__PURE__ */ (0,
|
|
2436
|
-
/* @__PURE__ */ (0,
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "text-right", children: [
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-xxs font-bold uppercase tracking-wider text-white/60", children: eta }),
|
|
2488
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-tiny text-primary", children: feeHint })
|
|
2437
2489
|
] })
|
|
2438
2490
|
] }) });
|
|
2439
2491
|
}
|
|
2440
2492
|
function ExpandIcon({ expanded }) {
|
|
2441
|
-
return /* @__PURE__ */ (0,
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon2, { name: expanded ? "expand_less" : "expand_more", size: "md" });
|
|
2442
2494
|
}
|
|
2443
2495
|
function AccountSettingsRow({
|
|
2444
2496
|
accountId,
|
|
@@ -2448,23 +2500,23 @@ function AccountSettingsRow({
|
|
|
2448
2500
|
description,
|
|
2449
2501
|
onClick
|
|
2450
2502
|
}) {
|
|
2451
|
-
return /* @__PURE__ */ (0,
|
|
2503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2452
2504
|
"button",
|
|
2453
2505
|
{
|
|
2454
2506
|
type: "button",
|
|
2455
2507
|
onClick,
|
|
2456
2508
|
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,
|
|
2509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountHeaderIcons, { accountId }),
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm font-bold text-white", children: title }),
|
|
2515
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
2464
2516
|
] }),
|
|
2465
|
-
/* @__PURE__ */ (0,
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon2, { name: "chevron_right", size: "sm", className: "text-white/40" })
|
|
2466
2518
|
] }),
|
|
2467
|
-
/* @__PURE__ */ (0,
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-3", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AccountStatusPills, { status, network }) })
|
|
2468
2520
|
] })
|
|
2469
2521
|
] })
|
|
2470
2522
|
}
|
|
@@ -2472,7 +2524,7 @@ function AccountSettingsRow({
|
|
|
2472
2524
|
}
|
|
2473
2525
|
|
|
2474
2526
|
// src/web/components/account-capabilities-card.tsx
|
|
2475
|
-
var
|
|
2527
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2476
2528
|
function AccountCapabilitiesCard({
|
|
2477
2529
|
accountId,
|
|
2478
2530
|
title,
|
|
@@ -2486,8 +2538,8 @@ function AccountCapabilitiesCard({
|
|
|
2486
2538
|
children
|
|
2487
2539
|
}) {
|
|
2488
2540
|
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,
|
|
2541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "rounded-2xl bg-card/70 p-4 shadow-inner transition-all duration-300", children: [
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2491
2543
|
"div",
|
|
2492
2544
|
{
|
|
2493
2545
|
className: cn(
|
|
@@ -2496,15 +2548,15 @@ function AccountCapabilitiesCard({
|
|
|
2496
2548
|
),
|
|
2497
2549
|
onClick: collapsible ? onToggle : void 0,
|
|
2498
2550
|
children: [
|
|
2499
|
-
/* @__PURE__ */ (0,
|
|
2500
|
-
/* @__PURE__ */ (0,
|
|
2501
|
-
/* @__PURE__ */ (0,
|
|
2502
|
-
/* @__PURE__ */ (0,
|
|
2503
|
-
/* @__PURE__ */ (0,
|
|
2551
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
|
|
2552
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AccountHeaderIcons, { accountId }),
|
|
2553
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
2554
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-sm font-bold text-white group-hover:text-white/90", children: title }),
|
|
2555
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
|
|
2504
2556
|
] })
|
|
2505
2557
|
] }),
|
|
2506
|
-
/* @__PURE__ */ (0,
|
|
2507
|
-
/* @__PURE__ */ (0,
|
|
2558
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col items-end gap-2", children: [
|
|
2559
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2508
2560
|
"span",
|
|
2509
2561
|
{
|
|
2510
2562
|
className: cn(
|
|
@@ -2514,75 +2566,76 @@ function AccountCapabilitiesCard({
|
|
|
2514
2566
|
children: status
|
|
2515
2567
|
}
|
|
2516
2568
|
),
|
|
2517
|
-
collapsible && /* @__PURE__ */ (0,
|
|
2569
|
+
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
2570
|
] })
|
|
2519
2571
|
]
|
|
2520
2572
|
}
|
|
2521
2573
|
),
|
|
2522
|
-
isExpanded && /* @__PURE__ */ (0,
|
|
2523
|
-
/* @__PURE__ */ (0,
|
|
2524
|
-
/* @__PURE__ */ (0,
|
|
2525
|
-
capabilities.map((capability) => /* @__PURE__ */ (0,
|
|
2526
|
-
/* @__PURE__ */ (0,
|
|
2527
|
-
/* @__PURE__ */ (0,
|
|
2574
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mt-5 duration-200 animate-in fade-in slide-in-from-top-2", children: [
|
|
2575
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "mb-6 space-y-2", children: [
|
|
2576
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h4", { className: "mb-2 text-xxs font-bold uppercase tracking-wider text-muted-foreground", children: "Capabilities" }),
|
|
2577
|
+
capabilities.map((capability) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
2578
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "inline-block size-1.5 rounded-full bg-current opacity-80" }),
|
|
2579
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: capability })
|
|
2528
2580
|
] }, capability))
|
|
2529
2581
|
] }),
|
|
2530
|
-
/* @__PURE__ */ (0,
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pt-5", children })
|
|
2531
2583
|
] })
|
|
2532
2584
|
] });
|
|
2533
2585
|
}
|
|
2534
2586
|
|
|
2535
2587
|
// src/web/components/wallet-asset-list.tsx
|
|
2536
|
-
var
|
|
2588
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2537
2589
|
function AssetSkeleton({ index }) {
|
|
2538
|
-
return /* @__PURE__ */ (0,
|
|
2590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2539
2591
|
"div",
|
|
2540
2592
|
{
|
|
2541
2593
|
className: "flex items-center justify-between rounded-card bg-white/[0.03] p-3 animate-pulse",
|
|
2542
2594
|
style: { animationDelay: `${index * 100}ms` },
|
|
2543
2595
|
children: [
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
2546
|
-
/* @__PURE__ */ (0,
|
|
2547
|
-
/* @__PURE__ */ (0,
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2597
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative", children: [
|
|
2598
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "size-8 rounded-full bg-white/10" }),
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "absolute -bottom-1 -right-1 size-icon-md rounded-full bg-white/10" })
|
|
2548
2600
|
] }),
|
|
2549
|
-
/* @__PURE__ */ (0,
|
|
2550
|
-
/* @__PURE__ */ (0,
|
|
2551
|
-
/* @__PURE__ */ (0,
|
|
2601
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
2602
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-3.5 w-20 rounded bg-white/10" }),
|
|
2603
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-2.5 w-10 rounded bg-white/5" })
|
|
2552
2604
|
] })
|
|
2553
2605
|
] }),
|
|
2554
|
-
/* @__PURE__ */ (0,
|
|
2555
|
-
/* @__PURE__ */ (0,
|
|
2556
|
-
/* @__PURE__ */ (0,
|
|
2606
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col items-end gap-1.5", children: [
|
|
2607
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-3.5 w-16 rounded bg-white/10" }),
|
|
2608
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-2.5 w-8 rounded bg-white/5" })
|
|
2557
2609
|
] })
|
|
2558
2610
|
]
|
|
2559
2611
|
}
|
|
2560
2612
|
);
|
|
2561
2613
|
}
|
|
2562
2614
|
function EmptyState({ state }) {
|
|
2563
|
-
return /* @__PURE__ */ (0,
|
|
2564
|
-
state.icon && /* @__PURE__ */ (0,
|
|
2565
|
-
state.title && /* @__PURE__ */ (0,
|
|
2566
|
-
state.description && /* @__PURE__ */ (0,
|
|
2615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "py-8 text-center", children: [
|
|
2616
|
+
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 }),
|
|
2617
|
+
state.title && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "mb-1 text-sm font-medium text-muted-foreground", children: state.title }),
|
|
2618
|
+
state.description && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-muted-foreground/70", children: state.description })
|
|
2567
2619
|
] });
|
|
2568
2620
|
}
|
|
2569
2621
|
function WalletAssetList({
|
|
2570
2622
|
items,
|
|
2571
2623
|
title = "Your Assets",
|
|
2572
2624
|
amountLabel = "Amount",
|
|
2625
|
+
hideHeader = false,
|
|
2573
2626
|
isLoading = false,
|
|
2574
2627
|
loadingRows = 2,
|
|
2575
2628
|
emptyStates = [],
|
|
2576
2629
|
bottomSpacer = true,
|
|
2577
2630
|
className
|
|
2578
2631
|
}) {
|
|
2579
|
-
return /* @__PURE__ */ (0,
|
|
2580
|
-
/* @__PURE__ */ (0,
|
|
2581
|
-
/* @__PURE__ */ (0,
|
|
2582
|
-
/* @__PURE__ */ (0,
|
|
2632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
2633
|
+
!hideHeader && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "mb-1 mt-3 flex items-center justify-between px-2", children: [
|
|
2634
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs font-bold uppercase tracking-widest text-foreground/80", children: title }),
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs font-bold uppercase tracking-widest text-foreground/80", children: amountLabel })
|
|
2583
2636
|
] }),
|
|
2584
|
-
isLoading && /* @__PURE__ */ (0,
|
|
2585
|
-
!isLoading && items.map((item) => /* @__PURE__ */ (0,
|
|
2637
|
+
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)) }),
|
|
2638
|
+
!isLoading && items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2586
2639
|
AssetCard,
|
|
2587
2640
|
{
|
|
2588
2641
|
ticker: item.ticker,
|
|
@@ -2596,16 +2649,16 @@ function WalletAssetList({
|
|
|
2596
2649
|
},
|
|
2597
2650
|
item.id
|
|
2598
2651
|
)),
|
|
2599
|
-
!isLoading && emptyStates.map((state) => /* @__PURE__ */ (0,
|
|
2600
|
-
bottomSpacer && /* @__PURE__ */ (0,
|
|
2652
|
+
!isLoading && emptyStates.map((state) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(EmptyState, { state }, state.id)),
|
|
2653
|
+
bottomSpacer && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-32" })
|
|
2601
2654
|
] });
|
|
2602
2655
|
}
|
|
2603
2656
|
|
|
2604
2657
|
// src/web/components/balance-breakdown.tsx
|
|
2605
2658
|
var import_react10 = require("react");
|
|
2606
|
-
var
|
|
2659
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2607
2660
|
function OnchainIcon({ className = "" }) {
|
|
2608
|
-
return /* @__PURE__ */ (0,
|
|
2661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2609
2662
|
"span",
|
|
2610
2663
|
{
|
|
2611
2664
|
className: `material-symbols-outlined leading-none ${className}`,
|
|
@@ -2619,7 +2672,7 @@ function ImageIcon({
|
|
|
2619
2672
|
alt,
|
|
2620
2673
|
className = ""
|
|
2621
2674
|
}) {
|
|
2622
|
-
return /* @__PURE__ */ (0,
|
|
2675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { src, alt, className });
|
|
2623
2676
|
}
|
|
2624
2677
|
function numberOnly(formatted) {
|
|
2625
2678
|
return formatted.replace(/\u00a0(sats|BTC|mBTC)$/, "").replace(/^\u20bf/, "");
|
|
@@ -2651,47 +2704,51 @@ function BalanceBreakdown({
|
|
|
2651
2704
|
}) {
|
|
2652
2705
|
const [expanded, setExpanded] = (0, import_react10.useState)(false);
|
|
2653
2706
|
const fiatTotal = formatFiatValue(totalBTC);
|
|
2654
|
-
return /* @__PURE__ */ (0,
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
2707
|
+
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: [
|
|
2708
|
+
/* @__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]" }),
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative z-10 flex items-start justify-between gap-3", children: [
|
|
2710
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2658
2711
|
"button",
|
|
2659
2712
|
{
|
|
2660
2713
|
onClick: cycle,
|
|
2661
2714
|
className: "group flex min-w-0 flex-1 flex-col items-start text-left",
|
|
2662
2715
|
title: `Tap to switch unit (current: ${label})`,
|
|
2663
2716
|
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,
|
|
2717
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-1 text-xxs font-bold uppercase tracking-widest text-white/40", children: "Total Balance" }),
|
|
2718
|
+
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-1 space-y-2", children: [
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-9 w-36 animate-pulse rounded-lg bg-white/10" }),
|
|
2720
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-3 w-20 animate-pulse rounded bg-white/5" })
|
|
2721
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
2722
|
+
/* @__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: [
|
|
2723
|
+
/* @__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" }),
|
|
2724
|
+
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 }),
|
|
2725
|
+
isPartial && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2673
2726
|
"span",
|
|
2674
2727
|
{
|
|
2675
2728
|
className: "inline-flex size-4 items-center justify-center rounded-full border bg-white/[0.06]",
|
|
2676
2729
|
title: "Loading remaining balances",
|
|
2677
|
-
children: /* @__PURE__ */ (0,
|
|
2730
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "size-2 animate-spin rounded-full border border-primary/30 border-t-primary" })
|
|
2678
2731
|
}
|
|
2679
2732
|
)
|
|
2680
2733
|
] }),
|
|
2681
|
-
balanceVisible &&
|
|
2734
|
+
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 }),
|
|
2735
|
+
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: [
|
|
2736
|
+
(totalBTC / 1e8).toFixed(8).replace(/\.?0+$/, ""),
|
|
2737
|
+
"\xA0BTC"
|
|
2738
|
+
] })
|
|
2682
2739
|
] })
|
|
2683
2740
|
]
|
|
2684
2741
|
}
|
|
2685
2742
|
),
|
|
2686
|
-
/* @__PURE__ */ (0,
|
|
2687
|
-
onRefresh && /* @__PURE__ */ (0,
|
|
2743
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-1 flex shrink-0 items-center gap-1.5", children: [
|
|
2744
|
+
onRefresh && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2688
2745
|
"button",
|
|
2689
2746
|
{
|
|
2690
2747
|
onClick: onRefresh,
|
|
2691
2748
|
disabled: isRefreshing,
|
|
2692
2749
|
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
2750
|
title: "Refresh balances",
|
|
2694
|
-
children: /* @__PURE__ */ (0,
|
|
2751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2695
2752
|
"span",
|
|
2696
2753
|
{
|
|
2697
2754
|
className: `material-symbols-outlined text-icon-sm leading-none text-white/60${isRefreshing ? " animate-spin" : ""}`,
|
|
@@ -2700,12 +2757,12 @@ function BalanceBreakdown({
|
|
|
2700
2757
|
)
|
|
2701
2758
|
}
|
|
2702
2759
|
),
|
|
2703
|
-
/* @__PURE__ */ (0,
|
|
2760
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2704
2761
|
"button",
|
|
2705
2762
|
{
|
|
2706
2763
|
onClick: () => setExpanded(!expanded),
|
|
2707
2764
|
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,
|
|
2765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2709
2766
|
Icon2,
|
|
2710
2767
|
{
|
|
2711
2768
|
name: expanded ? "expand_less" : "expand_more",
|
|
@@ -2717,12 +2774,12 @@ function BalanceBreakdown({
|
|
|
2717
2774
|
)
|
|
2718
2775
|
] })
|
|
2719
2776
|
] }),
|
|
2720
|
-
expanded && /* @__PURE__ */ (0,
|
|
2721
|
-
/* @__PURE__ */ (0,
|
|
2722
|
-
/* @__PURE__ */ (0,
|
|
2777
|
+
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: [
|
|
2778
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "Bitcoin" }),
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2723
2780
|
NetworkRow,
|
|
2724
2781
|
{
|
|
2725
|
-
icon: /* @__PURE__ */ (0,
|
|
2782
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(OnchainIcon, { className: "text-icon-sm" }),
|
|
2726
2783
|
iconColor: "text-network-spark",
|
|
2727
2784
|
dotColor: "bg-network-spark",
|
|
2728
2785
|
label: "BTC on-chain",
|
|
@@ -2734,10 +2791,10 @@ function BalanceBreakdown({
|
|
|
2734
2791
|
formatFiat: formatFiatValue
|
|
2735
2792
|
}
|
|
2736
2793
|
),
|
|
2737
|
-
/* @__PURE__ */ (0,
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2738
2795
|
NetworkRow,
|
|
2739
2796
|
{
|
|
2740
|
-
icon: /* @__PURE__ */ (0,
|
|
2797
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2741
2798
|
ImageIcon,
|
|
2742
2799
|
{
|
|
2743
2800
|
src: "/icons/lightning/lightning.svg",
|
|
@@ -2756,10 +2813,10 @@ function BalanceBreakdown({
|
|
|
2756
2813
|
formatFiat: formatFiatValue
|
|
2757
2814
|
}
|
|
2758
2815
|
),
|
|
2759
|
-
/* @__PURE__ */ (0,
|
|
2816
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2760
2817
|
NetworkRow,
|
|
2761
2818
|
{
|
|
2762
|
-
icon: /* @__PURE__ */ (0,
|
|
2819
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2763
2820
|
ImageIcon,
|
|
2764
2821
|
{
|
|
2765
2822
|
src: "/icons/spark/Asterisk/Spark Asterisk White.svg",
|
|
@@ -2778,10 +2835,10 @@ function BalanceBreakdown({
|
|
|
2778
2835
|
formatFiat: formatFiatValue
|
|
2779
2836
|
}
|
|
2780
2837
|
),
|
|
2781
|
-
/* @__PURE__ */ (0,
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2782
2839
|
NetworkRow,
|
|
2783
2840
|
{
|
|
2784
|
-
icon: /* @__PURE__ */ (0,
|
|
2841
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2785
2842
|
ImageIcon,
|
|
2786
2843
|
{
|
|
2787
2844
|
src: "/icons/arkade/arkade-icon.svg",
|
|
@@ -2800,45 +2857,45 @@ function BalanceBreakdown({
|
|
|
2800
2857
|
formatFiat: formatFiatValue
|
|
2801
2858
|
}
|
|
2802
2859
|
),
|
|
2803
|
-
rgbAssets.length > 0 && /* @__PURE__ */ (0,
|
|
2804
|
-
accounts.RGB?.connected && nodeInfo?.pubkey && /* @__PURE__ */ (0,
|
|
2805
|
-
/* @__PURE__ */ (0,
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
2860
|
+
rgbAssets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RgbAssetsBreakdown, { assets: rgbAssets, balanceVisible }),
|
|
2861
|
+
accounts.RGB?.connected && nodeInfo?.pubkey && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
2862
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "RLN Details" }),
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "grid grid-cols-3 gap-2", children: [
|
|
2864
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2808
2865
|
StatusChip,
|
|
2809
2866
|
{
|
|
2810
2867
|
label: "Node",
|
|
2811
2868
|
value: `${nodeInfo.pubkey.slice(0, 8)}...${nodeInfo.pubkey.slice(-6)}`
|
|
2812
2869
|
}
|
|
2813
2870
|
),
|
|
2814
|
-
/* @__PURE__ */ (0,
|
|
2815
|
-
/* @__PURE__ */ (0,
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StatusChip, { label: "Peers", value: String(nodeInfo.num_peers ?? 0) }),
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(StatusChip, { label: "Channels", value: String(nodeInfo.num_channels ?? 0) })
|
|
2816
2873
|
] })
|
|
2817
2874
|
] })
|
|
2818
2875
|
] }),
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2876
|
+
/* @__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: [
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2821
2878
|
ActionTile,
|
|
2822
2879
|
{
|
|
2823
|
-
icon: /* @__PURE__ */ (0,
|
|
2880
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "material-symbols-outlined text-icon-lg leading-none", children: "call_received" }),
|
|
2824
2881
|
label: "Deposit",
|
|
2825
2882
|
onClick: () => onNavigate?.("deposit"),
|
|
2826
2883
|
"data-testid": "dashboard-action-deposit"
|
|
2827
2884
|
}
|
|
2828
2885
|
),
|
|
2829
|
-
/* @__PURE__ */ (0,
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2830
2887
|
ActionTile,
|
|
2831
2888
|
{
|
|
2832
|
-
icon: /* @__PURE__ */ (0,
|
|
2889
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "material-symbols-outlined text-icon-lg leading-none", children: "swap_horiz" }),
|
|
2833
2890
|
label: "Swap",
|
|
2834
2891
|
onClick: () => onNavigate?.("swap"),
|
|
2835
2892
|
"data-testid": "dashboard-action-swap"
|
|
2836
2893
|
}
|
|
2837
2894
|
),
|
|
2838
|
-
/* @__PURE__ */ (0,
|
|
2895
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2839
2896
|
ActionTile,
|
|
2840
2897
|
{
|
|
2841
|
-
icon: /* @__PURE__ */ (0,
|
|
2898
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "material-symbols-outlined text-icon-lg leading-none", children: "arrow_outward" }),
|
|
2842
2899
|
label: "Withdraw",
|
|
2843
2900
|
onClick: () => onNavigate?.("withdraw"),
|
|
2844
2901
|
"data-testid": "dashboard-action-withdraw"
|
|
@@ -2851,34 +2908,34 @@ function RgbAssetsBreakdown({
|
|
|
2851
2908
|
assets,
|
|
2852
2909
|
balanceVisible
|
|
2853
2910
|
}) {
|
|
2854
|
-
return /* @__PURE__ */ (0,
|
|
2855
|
-
/* @__PURE__ */ (0,
|
|
2856
|
-
/* @__PURE__ */ (0,
|
|
2911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "RGB Assets" }),
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "space-y-2", children: assets.map((asset) => {
|
|
2857
2914
|
const bal = asset.balance ?? {};
|
|
2858
2915
|
const onChain = Number(bal.future || 0);
|
|
2859
2916
|
const offChain = Number(bal.offchain_outbound || 0);
|
|
2860
2917
|
const total = onChain + offChain;
|
|
2861
2918
|
const precision = asset.precision || 0;
|
|
2862
2919
|
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,
|
|
2920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-start justify-between py-1", children: [
|
|
2921
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
2922
|
+
/* @__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" }) }),
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col", children: [
|
|
2924
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-semibold text-white/90", children: asset.ticker }),
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "max-w-[90px] truncate text-xxs text-white/40", children: asset.name })
|
|
2869
2926
|
] })
|
|
2870
2927
|
] }),
|
|
2871
|
-
/* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
balanceVisible && (onChain > 0 || offChain > 0) && /* @__PURE__ */ (0,
|
|
2874
|
-
onChain > 0 && /* @__PURE__ */ (0,
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-end text-right", children: [
|
|
2929
|
+
/* @__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" }),
|
|
2930
|
+
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: [
|
|
2931
|
+
onChain > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "text-network-spark/80", children: [
|
|
2875
2932
|
formatRgb(onChain),
|
|
2876
2933
|
" on-chain"
|
|
2877
2934
|
] }),
|
|
2878
|
-
onChain > 0 && offChain > 0 && /* @__PURE__ */ (0,
|
|
2879
|
-
offChain > 0 && /* @__PURE__ */ (0,
|
|
2935
|
+
onChain > 0 && offChain > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-white/20", children: "|" }),
|
|
2936
|
+
offChain > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1 text-network-lightning/80", children: [
|
|
2880
2937
|
formatRgb(offChain),
|
|
2881
|
-
/* @__PURE__ */ (0,
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2882
2939
|
ImageIcon,
|
|
2883
2940
|
{
|
|
2884
2941
|
src: "/icons/lightning/lightning.svg",
|
|
@@ -2894,9 +2951,9 @@ function RgbAssetsBreakdown({
|
|
|
2894
2951
|
] });
|
|
2895
2952
|
}
|
|
2896
2953
|
function StatusChip({ label, value }) {
|
|
2897
|
-
return /* @__PURE__ */ (0,
|
|
2898
|
-
/* @__PURE__ */ (0,
|
|
2899
|
-
/* @__PURE__ */ (0,
|
|
2954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "rounded-xl border border-white/[0.08] bg-white/5 px-3 py-2", children: [
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-xxs font-bold uppercase tracking-widest text-white/30", children: label }),
|
|
2956
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mt-1 truncate text-xs font-semibold text-white/80", children: value })
|
|
2900
2957
|
] });
|
|
2901
2958
|
}
|
|
2902
2959
|
function NetworkRow({
|
|
@@ -2913,31 +2970,31 @@ function NetworkRow({
|
|
|
2913
2970
|
}) {
|
|
2914
2971
|
const fiat = formatFiat(amount);
|
|
2915
2972
|
const isEmpty = amount === 0 && !isPending;
|
|
2916
|
-
return /* @__PURE__ */ (0,
|
|
2973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2917
2974
|
"div",
|
|
2918
2975
|
{
|
|
2919
2976
|
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
2977
|
children: [
|
|
2921
|
-
/* @__PURE__ */ (0,
|
|
2922
|
-
/* @__PURE__ */ (0,
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2979
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: `h-7 w-0.5 rounded-full ${dotColor} opacity-80` }),
|
|
2980
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2924
2981
|
"div",
|
|
2925
2982
|
{
|
|
2926
2983
|
className: `flex size-7 items-center justify-center rounded-lg bg-white/5 text-icon-sm ${iconColor}`,
|
|
2927
2984
|
children: icon
|
|
2928
2985
|
}
|
|
2929
2986
|
),
|
|
2930
|
-
/* @__PURE__ */ (0,
|
|
2931
|
-
/* @__PURE__ */ (0,
|
|
2932
|
-
/* @__PURE__ */ (0,
|
|
2987
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col", children: [
|
|
2988
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-semibold leading-tight text-white/80", children: label }),
|
|
2989
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mt-0.5 text-xxs font-medium leading-tight text-white/30", children: sublabel })
|
|
2933
2990
|
] })
|
|
2934
2991
|
] }),
|
|
2935
|
-
/* @__PURE__ */ (0,
|
|
2936
|
-
/* @__PURE__ */ (0,
|
|
2937
|
-
/* @__PURE__ */ (0,
|
|
2938
|
-
] }) : /* @__PURE__ */ (0,
|
|
2939
|
-
/* @__PURE__ */ (0,
|
|
2940
|
-
fiat && visible && !isEmpty && /* @__PURE__ */ (0,
|
|
2992
|
+
/* @__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: [
|
|
2993
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-3.5 w-12 animate-pulse rounded bg-white/10" }),
|
|
2994
|
+
/* @__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" }) })
|
|
2995
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
2996
|
+
/* @__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" }),
|
|
2997
|
+
fiat && visible && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mt-0.5 font-mono text-xxs text-white/35", children: fiat })
|
|
2941
2998
|
] }) })
|
|
2942
2999
|
]
|
|
2943
3000
|
}
|
|
@@ -2947,7 +3004,7 @@ function NetworkRow({
|
|
|
2947
3004
|
// src/web/components/asset-selector.tsx
|
|
2948
3005
|
var import_react11 = require("react");
|
|
2949
3006
|
var import_react_dom = require("react-dom");
|
|
2950
|
-
var
|
|
3007
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2951
3008
|
function AssetSelector({
|
|
2952
3009
|
label,
|
|
2953
3010
|
selectedTicker,
|
|
@@ -2977,7 +3034,7 @@ function AssetSelector({
|
|
|
2977
3034
|
});
|
|
2978
3035
|
const categoryLabelById = new Map(categories.map((category) => [category.id, category.label]));
|
|
2979
3036
|
const modalOverlay = open && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
|
|
2980
|
-
/* @__PURE__ */ (0,
|
|
3037
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2981
3038
|
"div",
|
|
2982
3039
|
{
|
|
2983
3040
|
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 +3042,33 @@ function AssetSelector({
|
|
|
2985
3042
|
setOpen(false);
|
|
2986
3043
|
setSearch("");
|
|
2987
3044
|
},
|
|
2988
|
-
children: /* @__PURE__ */ (0,
|
|
3045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2989
3046
|
"div",
|
|
2990
3047
|
{
|
|
2991
3048
|
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
3049
|
onClick: (event) => event.stopPropagation(),
|
|
2993
3050
|
children: [
|
|
2994
|
-
/* @__PURE__ */ (0,
|
|
2995
|
-
/* @__PURE__ */ (0,
|
|
2996
|
-
/* @__PURE__ */ (0,
|
|
3051
|
+
/* @__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: [
|
|
3052
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0", children: [
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "text-xxs font-bold uppercase tracking-eyebrow-wide text-text-dimmed", children: [
|
|
2997
3054
|
label,
|
|
2998
3055
|
" Asset"
|
|
2999
3056
|
] }),
|
|
3000
|
-
/* @__PURE__ */ (0,
|
|
3057
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "mt-1 text-sm font-semibold text-white/90", children: [
|
|
3001
3058
|
filtered.length,
|
|
3002
3059
|
" option",
|
|
3003
3060
|
filtered.length === 1 ? "" : "s",
|
|
3004
3061
|
" available"
|
|
3005
3062
|
] })
|
|
3006
3063
|
] }),
|
|
3007
|
-
selected && /* @__PURE__ */ (0,
|
|
3008
|
-
/* @__PURE__ */ (0,
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3064
|
+
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: [
|
|
3065
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3066
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-tiny font-semibold text-primary", children: selected.ticker })
|
|
3010
3067
|
] })
|
|
3011
3068
|
] }) }),
|
|
3012
|
-
/* @__PURE__ */ (0,
|
|
3013
|
-
/* @__PURE__ */ (0,
|
|
3014
|
-
/* @__PURE__ */ (0,
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-shrink-0 border-b border-white/[0.08] px-4 py-3", children: [
|
|
3070
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative", children: [
|
|
3071
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3015
3072
|
Icon2,
|
|
3016
3073
|
{
|
|
3017
3074
|
name: "search",
|
|
@@ -3019,7 +3076,7 @@ function AssetSelector({
|
|
|
3019
3076
|
className: "absolute left-3.5 top-1/2 -translate-y-1/2 text-white/35"
|
|
3020
3077
|
}
|
|
3021
3078
|
),
|
|
3022
|
-
/* @__PURE__ */ (0,
|
|
3079
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3023
3080
|
"input",
|
|
3024
3081
|
{
|
|
3025
3082
|
autoFocus: true,
|
|
@@ -3031,9 +3088,9 @@ function AssetSelector({
|
|
|
3031
3088
|
}
|
|
3032
3089
|
)
|
|
3033
3090
|
] }),
|
|
3034
|
-
hasCategoryFilters && /* @__PURE__ */ (0,
|
|
3091
|
+
hasCategoryFilters && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: categories.map((category) => {
|
|
3035
3092
|
const isActive = activeCategories.includes(category.id);
|
|
3036
|
-
return /* @__PURE__ */ (0,
|
|
3093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3037
3094
|
"button",
|
|
3038
3095
|
{
|
|
3039
3096
|
type: "button",
|
|
@@ -3050,9 +3107,9 @@ function AssetSelector({
|
|
|
3050
3107
|
);
|
|
3051
3108
|
}) })
|
|
3052
3109
|
] }),
|
|
3053
|
-
/* @__PURE__ */ (0,
|
|
3054
|
-
/* @__PURE__ */ (0,
|
|
3055
|
-
/* @__PURE__ */ (0,
|
|
3110
|
+
/* @__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: [
|
|
3111
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon2, { name: "search", size: "md", className: "opacity-40" }),
|
|
3112
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { children: [
|
|
3056
3113
|
"No results",
|
|
3057
3114
|
search ? ` for "${search}"` : ""
|
|
3058
3115
|
] })
|
|
@@ -3060,7 +3117,7 @@ function AssetSelector({
|
|
|
3060
3117
|
const isSelected = option.ticker === selectedTicker;
|
|
3061
3118
|
const isDisabled = option.ticker === disabledTicker;
|
|
3062
3119
|
const optionCategoryLabel = option.categoryLabel || (option.category ? categoryLabelById.get(option.category) : void 0);
|
|
3063
|
-
return /* @__PURE__ */ (0,
|
|
3120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3064
3121
|
"button",
|
|
3065
3122
|
{
|
|
3066
3123
|
type: "button",
|
|
@@ -3077,7 +3134,7 @@ function AssetSelector({
|
|
|
3077
3134
|
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
3135
|
),
|
|
3079
3136
|
children: [
|
|
3080
|
-
/* @__PURE__ */ (0,
|
|
3137
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3081
3138
|
AssetIcon,
|
|
3082
3139
|
{
|
|
3083
3140
|
ticker: option.ticker,
|
|
@@ -3089,11 +3146,11 @@ function AssetSelector({
|
|
|
3089
3146
|
)
|
|
3090
3147
|
}
|
|
3091
3148
|
),
|
|
3092
|
-
/* @__PURE__ */ (0,
|
|
3093
|
-
/* @__PURE__ */ (0,
|
|
3094
|
-
/* @__PURE__ */ (0,
|
|
3095
|
-
/* @__PURE__ */ (0,
|
|
3096
|
-
option.network && /* @__PURE__ */ (0,
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center justify-between gap-2 font-semibold text-white", children: [
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
3152
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: option.ticker }),
|
|
3153
|
+
option.network && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3097
3154
|
NetworkBadge,
|
|
3098
3155
|
{
|
|
3099
3156
|
network: option.network,
|
|
@@ -3102,13 +3159,13 @@ function AssetSelector({
|
|
|
3102
3159
|
}
|
|
3103
3160
|
)
|
|
3104
3161
|
] }),
|
|
3105
|
-
isSelected && /* @__PURE__ */ (0,
|
|
3162
|
+
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
3163
|
] }),
|
|
3107
|
-
/* @__PURE__ */ (0,
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3109
|
-
/* @__PURE__ */ (0,
|
|
3110
|
-
optionCategoryLabel && /* @__PURE__ */ (0,
|
|
3111
|
-
isDisabled && /* @__PURE__ */ (0,
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mt-0.5 flex items-center justify-between gap-3", children: [
|
|
3165
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "truncate text-xs text-white/35", children: option.name ?? option.ticker }),
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3167
|
+
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 }),
|
|
3168
|
+
isDisabled && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-xxs font-medium uppercase tracking-wide text-white/25", children: "In use" })
|
|
3112
3169
|
] })
|
|
3113
3170
|
] })
|
|
3114
3171
|
] })
|
|
@@ -3125,8 +3182,8 @@ function AssetSelector({
|
|
|
3125
3182
|
document.body
|
|
3126
3183
|
) : null;
|
|
3127
3184
|
if (compact) {
|
|
3128
|
-
return /* @__PURE__ */ (0,
|
|
3129
|
-
/* @__PURE__ */ (0,
|
|
3185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ref, className: "relative w-36 flex-shrink-0", children: [
|
|
3186
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3130
3187
|
"button",
|
|
3131
3188
|
{
|
|
3132
3189
|
type: "button",
|
|
@@ -3136,10 +3193,10 @@ function AssetSelector({
|
|
|
3136
3193
|
"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
3194
|
open ? "bg-primary/[0.12] shadow-md" : "bg-black/20 hover:bg-black/35"
|
|
3138
3195
|
),
|
|
3139
|
-
children: selected ? /* @__PURE__ */ (0,
|
|
3140
|
-
/* @__PURE__ */ (0,
|
|
3141
|
-
/* @__PURE__ */ (0,
|
|
3142
|
-
selected.network && /* @__PURE__ */ (0,
|
|
3196
|
+
children: selected ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
3197
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative shrink-0", children: [
|
|
3198
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 38 }),
|
|
3199
|
+
selected.network && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3143
3200
|
NetworkBadge,
|
|
3144
3201
|
{
|
|
3145
3202
|
network: selected.network,
|
|
@@ -3148,17 +3205,17 @@ function AssetSelector({
|
|
|
3148
3205
|
}
|
|
3149
3206
|
)
|
|
3150
3207
|
] }),
|
|
3151
|
-
/* @__PURE__ */ (0,
|
|
3152
|
-
] }) : /* @__PURE__ */ (0,
|
|
3208
|
+
/* @__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 }) })
|
|
3209
|
+
] }) : /* @__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
3210
|
}
|
|
3154
3211
|
),
|
|
3155
3212
|
modalOverlay
|
|
3156
3213
|
] });
|
|
3157
3214
|
}
|
|
3158
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
-
/* @__PURE__ */ (0,
|
|
3160
|
-
/* @__PURE__ */ (0,
|
|
3161
|
-
/* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1.5", ref, children: [
|
|
3216
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { className: "ml-1 text-xs font-semibold uppercase tracking-wider text-white/40", children: label }),
|
|
3217
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative", children: [
|
|
3218
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
3162
3219
|
"button",
|
|
3163
3220
|
{
|
|
3164
3221
|
type: "button",
|
|
@@ -3166,12 +3223,12 @@ function AssetSelector({
|
|
|
3166
3223
|
onClick: () => !disabled && setOpen((value) => !value),
|
|
3167
3224
|
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
3225
|
children: [
|
|
3169
|
-
/* @__PURE__ */ (0,
|
|
3170
|
-
/* @__PURE__ */ (0,
|
|
3171
|
-
/* @__PURE__ */ (0,
|
|
3172
|
-
/* @__PURE__ */ (0,
|
|
3226
|
+
/* @__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: [
|
|
3227
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 32 }),
|
|
3228
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
|
|
3229
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1.5 text-sm font-semibold text-white", children: [
|
|
3173
3230
|
selected.ticker,
|
|
3174
|
-
selected.network && /* @__PURE__ */ (0,
|
|
3231
|
+
selected.network && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3175
3232
|
NetworkBadge,
|
|
3176
3233
|
{
|
|
3177
3234
|
network: selected.network,
|
|
@@ -3180,10 +3237,10 @@ function AssetSelector({
|
|
|
3180
3237
|
}
|
|
3181
3238
|
)
|
|
3182
3239
|
] }),
|
|
3183
|
-
/* @__PURE__ */ (0,
|
|
3240
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-0.5 text-xs text-white/35", children: selected.name })
|
|
3184
3241
|
] })
|
|
3185
|
-
] }) : /* @__PURE__ */ (0,
|
|
3186
|
-
/* @__PURE__ */ (0,
|
|
3242
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-sm text-white/35", children: "Select asset..." }) }),
|
|
3243
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3187
3244
|
Icon2,
|
|
3188
3245
|
{
|
|
3189
3246
|
name: "expand_more",
|
|
@@ -3200,7 +3257,7 @@ function AssetSelector({
|
|
|
3200
3257
|
}
|
|
3201
3258
|
|
|
3202
3259
|
// src/web/components/swap-input-card.tsx
|
|
3203
|
-
var
|
|
3260
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3204
3261
|
var PERCENTAGES = [25, 50, 75, 100];
|
|
3205
3262
|
function SwapInputCard({
|
|
3206
3263
|
fromTicker,
|
|
@@ -3237,12 +3294,12 @@ function SwapInputCard({
|
|
|
3237
3294
|
onFlip,
|
|
3238
3295
|
onSubmit
|
|
3239
3296
|
}) {
|
|
3240
|
-
return /* @__PURE__ */ (0,
|
|
3241
|
-
/* @__PURE__ */ (0,
|
|
3242
|
-
/* @__PURE__ */ (0,
|
|
3243
|
-
/* @__PURE__ */ (0,
|
|
3244
|
-
/* @__PURE__ */ (0,
|
|
3245
|
-
/* @__PURE__ */ (0,
|
|
3297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3298
|
+
/* @__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: [
|
|
3299
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "p-3.5 pb-4", children: [
|
|
3300
|
+
/* @__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" }) }),
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3302
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3246
3303
|
AssetSelector,
|
|
3247
3304
|
{
|
|
3248
3305
|
compact: true,
|
|
@@ -3255,8 +3312,8 @@ function SwapInputCard({
|
|
|
3255
3312
|
onChange: onFromTickerChange
|
|
3256
3313
|
}
|
|
3257
3314
|
),
|
|
3258
|
-
/* @__PURE__ */ (0,
|
|
3259
|
-
/* @__PURE__ */ (0,
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0 flex-1 text-right", children: [
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3260
3317
|
"input",
|
|
3261
3318
|
{
|
|
3262
3319
|
type: "text",
|
|
@@ -3267,7 +3324,7 @@ function SwapInputCard({
|
|
|
3267
3324
|
className: "w-full border-none bg-transparent text-right text-2xl font-bold text-white placeholder:text-white/15 focus:outline-none"
|
|
3268
3325
|
}
|
|
3269
3326
|
),
|
|
3270
|
-
fromUnitIsToggle && onToggleFromUnit ? /* @__PURE__ */ (0,
|
|
3327
|
+
fromUnitIsToggle && onToggleFromUnit ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3271
3328
|
"button",
|
|
3272
3329
|
{
|
|
3273
3330
|
type: "button",
|
|
@@ -3276,12 +3333,12 @@ function SwapInputCard({
|
|
|
3276
3333
|
title: "Tap to switch unit",
|
|
3277
3334
|
children: fromUnitLabel
|
|
3278
3335
|
}
|
|
3279
|
-
) : /* @__PURE__ */ (0,
|
|
3336
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: fromUnitLabel })
|
|
3280
3337
|
] })
|
|
3281
3338
|
] }),
|
|
3282
|
-
/* @__PURE__ */ (0,
|
|
3283
|
-
/* @__PURE__ */ (0,
|
|
3284
|
-
/* @__PURE__ */ (0,
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mt-2 flex items-center justify-between gap-2", children: [
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xxs font-medium text-white/60", children: showMaxText && maxText ? `Max: ${maxText}` : `Available: ${availableText}` }),
|
|
3341
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center gap-1", children: PERCENTAGES.map((percent) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3285
3342
|
"button",
|
|
3286
3343
|
{
|
|
3287
3344
|
type: "button",
|
|
@@ -3300,20 +3357,20 @@ function SwapInputCard({
|
|
|
3300
3357
|
)) })
|
|
3301
3358
|
] })
|
|
3302
3359
|
] }),
|
|
3303
|
-
/* @__PURE__ */ (0,
|
|
3360
|
+
/* @__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
3361
|
"button",
|
|
3305
3362
|
{
|
|
3306
3363
|
type: "button",
|
|
3307
3364
|
onClick: onFlip,
|
|
3308
3365
|
title: "Flip assets",
|
|
3309
3366
|
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,
|
|
3367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { name: "swap_vert", size: "md" })
|
|
3311
3368
|
}
|
|
3312
3369
|
) }),
|
|
3313
|
-
/* @__PURE__ */ (0,
|
|
3314
|
-
/* @__PURE__ */ (0,
|
|
3315
|
-
/* @__PURE__ */ (0,
|
|
3316
|
-
/* @__PURE__ */ (0,
|
|
3370
|
+
/* @__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: [
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mb-2 text-xs font-bold uppercase tracking-widest text-primary/70", children: "You Receive" }),
|
|
3372
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3317
3374
|
AssetSelector,
|
|
3318
3375
|
{
|
|
3319
3376
|
compact: true,
|
|
@@ -3326,24 +3383,24 @@ function SwapInputCard({
|
|
|
3326
3383
|
onChange: onToTickerChange
|
|
3327
3384
|
}
|
|
3328
3385
|
),
|
|
3329
|
-
/* @__PURE__ */ (0,
|
|
3330
|
-
isLoadingQuote ? /* @__PURE__ */ (0,
|
|
3331
|
-
/* @__PURE__ */ (0,
|
|
3386
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0 flex-1 text-right", children: [
|
|
3387
|
+
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: "-" }),
|
|
3388
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: receiveUnitLabel || toTicker || "-" })
|
|
3332
3389
|
] })
|
|
3333
3390
|
] })
|
|
3334
3391
|
] })
|
|
3335
3392
|
] }),
|
|
3336
|
-
(quoteError || quoteRateText || quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0,
|
|
3337
|
-
quoteRateText && /* @__PURE__ */ (0,
|
|
3338
|
-
/* @__PURE__ */ (0,
|
|
3339
|
-
/* @__PURE__ */ (0,
|
|
3393
|
+
(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: [
|
|
3394
|
+
quoteRateText && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3395
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/40", children: "Rate" }),
|
|
3396
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-medium text-white/65", children: quoteRateText })
|
|
3340
3397
|
] }),
|
|
3341
|
-
(quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0,
|
|
3342
|
-
/* @__PURE__ */ (0,
|
|
3343
|
-
/* @__PURE__ */ (0,
|
|
3344
|
-
quoteFeeText && /* @__PURE__ */ (0,
|
|
3345
|
-
quoteFeeText && quoteExpiresText && /* @__PURE__ */ (0,
|
|
3346
|
-
quoteExpiresText && /* @__PURE__ */ (0,
|
|
3398
|
+
(quoteFeeText || quoteExpiresText) && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between text-xs", children: [
|
|
3399
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/40", children: "Fee" }),
|
|
3400
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3401
|
+
quoteFeeText && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/65", children: quoteFeeText }),
|
|
3402
|
+
quoteFeeText && quoteExpiresText && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-white/15", children: "\xB7" }),
|
|
3403
|
+
quoteExpiresText && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3347
3404
|
"span",
|
|
3348
3405
|
{
|
|
3349
3406
|
className: cn(
|
|
@@ -3356,11 +3413,11 @@ function SwapInputCard({
|
|
|
3356
3413
|
] })
|
|
3357
3414
|
] })
|
|
3358
3415
|
] }) }),
|
|
3359
|
-
warning && /* @__PURE__ */ (0,
|
|
3360
|
-
/* @__PURE__ */ (0,
|
|
3361
|
-
/* @__PURE__ */ (0,
|
|
3416
|
+
warning && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-start gap-2 rounded-xl bg-danger/10 p-3", children: [
|
|
3417
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { name: "warning", size: "sm", className: "mt-0.5 text-danger" }),
|
|
3418
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-xs leading-relaxed text-danger", children: warning })
|
|
3362
3419
|
] }),
|
|
3363
|
-
/* @__PURE__ */ (0,
|
|
3420
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3364
3421
|
Button,
|
|
3365
3422
|
{
|
|
3366
3423
|
variant: submitVariant,
|
|
@@ -3375,14 +3432,14 @@ function SwapInputCard({
|
|
|
3375
3432
|
}
|
|
3376
3433
|
|
|
3377
3434
|
// src/web/components/page-shell.tsx
|
|
3378
|
-
var
|
|
3435
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3379
3436
|
function PageShell({
|
|
3380
3437
|
children,
|
|
3381
3438
|
fullHeight = true,
|
|
3382
3439
|
centered = true,
|
|
3383
3440
|
className
|
|
3384
3441
|
}) {
|
|
3385
|
-
return /* @__PURE__ */ (0,
|
|
3442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3386
3443
|
"div",
|
|
3387
3444
|
{
|
|
3388
3445
|
className: cn(
|
|
@@ -3392,8 +3449,8 @@ function PageShell({
|
|
|
3392
3449
|
className
|
|
3393
3450
|
),
|
|
3394
3451
|
children: [
|
|
3395
|
-
/* @__PURE__ */ (0,
|
|
3396
|
-
/* @__PURE__ */ (0,
|
|
3452
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "aria-hidden": true, className: "absolute inset-0 bg-page-radial pointer-events-none" }),
|
|
3453
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("relative z-10 w-full", !centered && "h-full min-h-0"), children })
|
|
3397
3454
|
]
|
|
3398
3455
|
}
|
|
3399
3456
|
);
|
|
@@ -3403,7 +3460,7 @@ function HeadlineGradient({
|
|
|
3403
3460
|
as: Tag = "h1",
|
|
3404
3461
|
className
|
|
3405
3462
|
}) {
|
|
3406
|
-
return /* @__PURE__ */ (0,
|
|
3463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3407
3464
|
Tag,
|
|
3408
3465
|
{
|
|
3409
3466
|
className: cn(
|
|
@@ -3415,7 +3472,7 @@ function HeadlineGradient({
|
|
|
3415
3472
|
);
|
|
3416
3473
|
}
|
|
3417
3474
|
function LoadingCard({ message = "Loading...", className }) {
|
|
3418
|
-
return /* @__PURE__ */ (0,
|
|
3475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3419
3476
|
"div",
|
|
3420
3477
|
{
|
|
3421
3478
|
className: cn(
|
|
@@ -3423,8 +3480,8 @@ function LoadingCard({ message = "Loading...", className }) {
|
|
|
3423
3480
|
className
|
|
3424
3481
|
),
|
|
3425
3482
|
children: [
|
|
3426
|
-
/* @__PURE__ */ (0,
|
|
3427
|
-
/* @__PURE__ */ (0,
|
|
3483
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mb-4 size-12 animate-spin rounded-full border-2 border-primary/20 border-t-primary" }),
|
|
3484
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-sm", children: message })
|
|
3428
3485
|
]
|
|
3429
3486
|
}
|
|
3430
3487
|
);
|
|
@@ -3436,15 +3493,15 @@ function ErrorCard({
|
|
|
3436
3493
|
retryLabel = "Try Again",
|
|
3437
3494
|
className
|
|
3438
3495
|
}) {
|
|
3439
|
-
return /* @__PURE__ */ (0,
|
|
3496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3440
3497
|
"div",
|
|
3441
3498
|
{
|
|
3442
3499
|
className: cn("flex flex-col items-center justify-center py-16 text-center", className),
|
|
3443
3500
|
children: [
|
|
3444
|
-
/* @__PURE__ */ (0,
|
|
3445
|
-
/* @__PURE__ */ (0,
|
|
3446
|
-
/* @__PURE__ */ (0,
|
|
3447
|
-
onRetry && /* @__PURE__ */ (0,
|
|
3501
|
+
/* @__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" }) }),
|
|
3502
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h3", { className: "mb-1 text-base font-semibold", children: title }),
|
|
3503
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "mb-4 max-w-xs text-xs text-muted-foreground", children: description }),
|
|
3504
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3448
3505
|
"button",
|
|
3449
3506
|
{
|
|
3450
3507
|
type: "button",
|
|
@@ -3462,7 +3519,7 @@ function FadeOverlay({
|
|
|
3462
3519
|
heightClassName = "h-12",
|
|
3463
3520
|
className
|
|
3464
3521
|
}) {
|
|
3465
|
-
return /* @__PURE__ */ (0,
|
|
3522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3466
3523
|
"div",
|
|
3467
3524
|
{
|
|
3468
3525
|
"aria-hidden": true,
|
|
@@ -3477,9 +3534,9 @@ function FadeOverlay({
|
|
|
3477
3534
|
}
|
|
3478
3535
|
|
|
3479
3536
|
// src/web/components/activity-list.tsx
|
|
3480
|
-
var
|
|
3537
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3481
3538
|
function DefaultEmptyIcon({ name }) {
|
|
3482
|
-
return /* @__PURE__ */ (0,
|
|
3539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "material-symbols-outlined text-foreground/30", style: { fontSize: "32px" }, children: name });
|
|
3483
3540
|
}
|
|
3484
3541
|
function ActivityList({
|
|
3485
3542
|
items,
|
|
@@ -3499,28 +3556,28 @@ function ActivityList({
|
|
|
3499
3556
|
filteredEmptyDescription = "Try adjusting your search, status, or network filter."
|
|
3500
3557
|
}) {
|
|
3501
3558
|
if (isLoading) {
|
|
3502
|
-
return /* @__PURE__ */ (0,
|
|
3559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(LoadingCard, { message: "Loading activity..." });
|
|
3503
3560
|
}
|
|
3504
3561
|
if (error && items.length === 0) {
|
|
3505
|
-
return /* @__PURE__ */ (0,
|
|
3562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ErrorCard, { title: "Failed to load", description: error, onRetry });
|
|
3506
3563
|
}
|
|
3507
3564
|
if (items.length === 0) {
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3510
|
-
/* @__PURE__ */ (0,
|
|
3511
|
-
/* @__PURE__ */ (0,
|
|
3512
|
-
hasActiveFilters && onClearFilters ? /* @__PURE__ */ (0,
|
|
3565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col items-center justify-center py-16", children: [
|
|
3566
|
+
/* @__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" }) }),
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "mb-1 text-base font-semibold", children: hasActiveFilters ? filteredEmptyTitle : emptyTitle }),
|
|
3568
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "mb-4 max-w-[240px] text-center text-xs text-muted-foreground", children: hasActiveFilters ? filteredEmptyDescription : emptyDescription }),
|
|
3569
|
+
hasActiveFilters && onClearFilters ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Button, { variant: "surface", size: "sm", onClick: onClearFilters, children: "Clear Filters" }) : renderEmptyActions?.()
|
|
3513
3570
|
] });
|
|
3514
3571
|
}
|
|
3515
|
-
return /* @__PURE__ */ (0,
|
|
3572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-2.5", children: items.map((item) => {
|
|
3516
3573
|
const isExpanded = expandedId === item.id;
|
|
3517
3574
|
const details = renderDetails?.(item);
|
|
3518
|
-
return /* @__PURE__ */ (0,
|
|
3575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3519
3576
|
"div",
|
|
3520
3577
|
{
|
|
3521
3578
|
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
3579
|
children: [
|
|
3523
|
-
/* @__PURE__ */ (0,
|
|
3580
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3524
3581
|
TransactionCard,
|
|
3525
3582
|
{
|
|
3526
3583
|
direction: item.direction,
|
|
@@ -3531,12 +3588,12 @@ function ActivityList({
|
|
|
3531
3588
|
onClick: () => onExpandedChange?.(isExpanded ? null : item.id)
|
|
3532
3589
|
}
|
|
3533
3590
|
),
|
|
3534
|
-
isExpanded && /* @__PURE__ */ (0,
|
|
3535
|
-
(item.network || item.label) && /* @__PURE__ */ (0,
|
|
3536
|
-
item.network && /* @__PURE__ */ (0,
|
|
3537
|
-
item.label && /* @__PURE__ */ (0,
|
|
3591
|
+
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: [
|
|
3592
|
+
(item.network || item.label) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-1.5 px-3 py-2.5", children: [
|
|
3593
|
+
item.network && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NetworkBadge, { network: item.network, showLabel: true }),
|
|
3594
|
+
item.label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xxs font-medium text-muted-foreground", children: item.label })
|
|
3538
3595
|
] }),
|
|
3539
|
-
details && /* @__PURE__ */ (0,
|
|
3596
|
+
details && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-1.5 px-3 pb-3 pt-1", children: details })
|
|
3540
3597
|
] })
|
|
3541
3598
|
]
|
|
3542
3599
|
},
|
|
@@ -3546,7 +3603,7 @@ function ActivityList({
|
|
|
3546
3603
|
}
|
|
3547
3604
|
|
|
3548
3605
|
// src/web/components/activity-filter-bar.tsx
|
|
3549
|
-
var
|
|
3606
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3550
3607
|
function ActivityFilterBar({
|
|
3551
3608
|
searchTerm,
|
|
3552
3609
|
onSearchTermChange,
|
|
@@ -3557,16 +3614,16 @@ function ActivityFilterBar({
|
|
|
3557
3614
|
onClearFilters,
|
|
3558
3615
|
searchPlaceholder = "Search by txid, asset..."
|
|
3559
3616
|
}) {
|
|
3560
|
-
return /* @__PURE__ */ (0,
|
|
3561
|
-
/* @__PURE__ */ (0,
|
|
3562
|
-
/* @__PURE__ */ (0,
|
|
3617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex h-10 items-center gap-2", children: [
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative h-full flex-1", children: [
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3563
3620
|
AppIcon,
|
|
3564
3621
|
{
|
|
3565
3622
|
name: "search",
|
|
3566
3623
|
className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-white/40"
|
|
3567
3624
|
}
|
|
3568
3625
|
),
|
|
3569
|
-
/* @__PURE__ */ (0,
|
|
3626
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3570
3627
|
"input",
|
|
3571
3628
|
{
|
|
3572
3629
|
type: "text",
|
|
@@ -3576,45 +3633,45 @@ function ActivityFilterBar({
|
|
|
3576
3633
|
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
3634
|
}
|
|
3578
3635
|
),
|
|
3579
|
-
searchTerm && /* @__PURE__ */ (0,
|
|
3636
|
+
searchTerm && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3580
3637
|
"button",
|
|
3581
3638
|
{
|
|
3582
3639
|
type: "button",
|
|
3583
3640
|
onClick: () => onSearchTermChange(""),
|
|
3584
3641
|
className: "absolute right-2 top-1/2 -translate-y-1/2 text-white/40 transition-colors hover:text-white",
|
|
3585
|
-
children: /* @__PURE__ */ (0,
|
|
3642
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AppIcon, { name: "close", className: "size-icon-sm" })
|
|
3586
3643
|
}
|
|
3587
3644
|
)
|
|
3588
3645
|
] }),
|
|
3589
|
-
/* @__PURE__ */ (0,
|
|
3646
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-full w-28 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3590
3647
|
Select,
|
|
3591
3648
|
{
|
|
3592
3649
|
value: statusFilter,
|
|
3593
3650
|
onValueChange: (value) => onStatusFilterChange(value),
|
|
3594
3651
|
children: [
|
|
3595
|
-
/* @__PURE__ */ (0,
|
|
3596
|
-
/* @__PURE__ */ (0,
|
|
3652
|
+
/* @__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, {}) }),
|
|
3653
|
+
/* @__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
3654
|
]
|
|
3598
3655
|
}
|
|
3599
3656
|
) }),
|
|
3600
|
-
hasActiveFilters && onClearFilters && /* @__PURE__ */ (0,
|
|
3657
|
+
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
3658
|
] });
|
|
3602
3659
|
}
|
|
3603
3660
|
|
|
3604
3661
|
// src/web/components/activity-network-filters.tsx
|
|
3605
|
-
var
|
|
3662
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3606
3663
|
function getActivityNetworkFilterIcon(filter) {
|
|
3607
3664
|
switch (filter) {
|
|
3608
3665
|
case "onchain":
|
|
3609
|
-
return /* @__PURE__ */ (0,
|
|
3666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AppIcon, { name: "onchain", className: "size-icon-sm" });
|
|
3610
3667
|
case "lightning":
|
|
3611
|
-
return /* @__PURE__ */ (0,
|
|
3668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(LightningNetworkIcon, { className: "size-3.5", alt: "" });
|
|
3612
3669
|
case "spark":
|
|
3613
|
-
return /* @__PURE__ */ (0,
|
|
3670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SparkNetworkIcon, { className: "size-3.5", alt: "" });
|
|
3614
3671
|
case "arkade":
|
|
3615
|
-
return /* @__PURE__ */ (0,
|
|
3672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ArkadeNetworkIcon, { className: "size-3.5 rounded", alt: "" });
|
|
3616
3673
|
default:
|
|
3617
|
-
return /* @__PURE__ */ (0,
|
|
3674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(AppIcon, { name: "allNetworks", className: "size-icon-sm" });
|
|
3618
3675
|
}
|
|
3619
3676
|
}
|
|
3620
3677
|
function ActivityNetworkFilters({
|
|
@@ -3624,9 +3681,9 @@ function ActivityNetworkFilters({
|
|
|
3624
3681
|
className
|
|
3625
3682
|
}) {
|
|
3626
3683
|
if (filters.length <= 1) return null;
|
|
3627
|
-
return /* @__PURE__ */ (0,
|
|
3684
|
+
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
3685
|
const isActive = activeFilter === filter.value;
|
|
3629
|
-
return /* @__PURE__ */ (0,
|
|
3686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3630
3687
|
"button",
|
|
3631
3688
|
{
|
|
3632
3689
|
type: "button",
|
|
@@ -3636,7 +3693,7 @@ function ActivityNetworkFilters({
|
|
|
3636
3693
|
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
3694
|
),
|
|
3638
3695
|
children: [
|
|
3639
|
-
/* @__PURE__ */ (0,
|
|
3696
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3640
3697
|
"span",
|
|
3641
3698
|
{
|
|
3642
3699
|
className: cn(
|
|
@@ -3646,7 +3703,7 @@ function ActivityNetworkFilters({
|
|
|
3646
3703
|
children: filter.icon ?? getActivityNetworkFilterIcon(filter.value)
|
|
3647
3704
|
}
|
|
3648
3705
|
),
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
3706
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: filter.label })
|
|
3650
3707
|
]
|
|
3651
3708
|
},
|
|
3652
3709
|
filter.value
|
|
@@ -3655,17 +3712,17 @@ function ActivityNetworkFilters({
|
|
|
3655
3712
|
}
|
|
3656
3713
|
|
|
3657
3714
|
// src/web/components/activity-type-tabs.tsx
|
|
3658
|
-
var
|
|
3715
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3659
3716
|
function ActivityTypeTabs({ counts = {} }) {
|
|
3660
|
-
return /* @__PURE__ */ (0,
|
|
3661
|
-
/* @__PURE__ */ (0,
|
|
3717
|
+
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: [
|
|
3718
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3662
3719
|
TabsTrigger,
|
|
3663
3720
|
{
|
|
3664
3721
|
value: "all",
|
|
3665
3722
|
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
3723
|
children: [
|
|
3667
3724
|
"All",
|
|
3668
|
-
counts.all ? /* @__PURE__ */ (0,
|
|
3725
|
+
counts.all ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "ml-1 opacity-60", children: [
|
|
3669
3726
|
"(",
|
|
3670
3727
|
counts.all,
|
|
3671
3728
|
")"
|
|
@@ -3673,13 +3730,13 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3673
3730
|
]
|
|
3674
3731
|
}
|
|
3675
3732
|
),
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3733
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3677
3734
|
TabsTrigger,
|
|
3678
3735
|
{
|
|
3679
3736
|
value: "received",
|
|
3680
3737
|
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
3738
|
children: [
|
|
3682
|
-
/* @__PURE__ */ (0,
|
|
3739
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3683
3740
|
AppIcon,
|
|
3684
3741
|
{
|
|
3685
3742
|
name: "receive",
|
|
@@ -3687,17 +3744,17 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3687
3744
|
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
3745
|
}
|
|
3689
3746
|
),
|
|
3690
|
-
/* @__PURE__ */ (0,
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "In" })
|
|
3691
3748
|
]
|
|
3692
3749
|
}
|
|
3693
3750
|
),
|
|
3694
|
-
/* @__PURE__ */ (0,
|
|
3751
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3695
3752
|
TabsTrigger,
|
|
3696
3753
|
{
|
|
3697
3754
|
value: "sent",
|
|
3698
3755
|
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
3756
|
children: [
|
|
3700
|
-
/* @__PURE__ */ (0,
|
|
3757
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3701
3758
|
AppIcon,
|
|
3702
3759
|
{
|
|
3703
3760
|
name: "send",
|
|
@@ -3705,17 +3762,17 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3705
3762
|
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
3763
|
}
|
|
3707
3764
|
),
|
|
3708
|
-
/* @__PURE__ */ (0,
|
|
3765
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "Out" })
|
|
3709
3766
|
]
|
|
3710
3767
|
}
|
|
3711
3768
|
),
|
|
3712
|
-
/* @__PURE__ */ (0,
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3713
3770
|
TabsTrigger,
|
|
3714
3771
|
{
|
|
3715
3772
|
value: "swaps",
|
|
3716
3773
|
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
3774
|
children: [
|
|
3718
|
-
/* @__PURE__ */ (0,
|
|
3775
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3719
3776
|
AppIcon,
|
|
3720
3777
|
{
|
|
3721
3778
|
name: "swap",
|
|
@@ -3723,7 +3780,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3723
3780
|
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
3781
|
}
|
|
3725
3782
|
),
|
|
3726
|
-
/* @__PURE__ */ (0,
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { children: "Swaps" })
|
|
3727
3784
|
]
|
|
3728
3785
|
}
|
|
3729
3786
|
)
|
|
@@ -3731,7 +3788,7 @@ function ActivityTypeTabs({ counts = {} }) {
|
|
|
3731
3788
|
}
|
|
3732
3789
|
|
|
3733
3790
|
// src/web/components/activity-detail-row.tsx
|
|
3734
|
-
var
|
|
3791
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3735
3792
|
function ActivityDetailRow({
|
|
3736
3793
|
label,
|
|
3737
3794
|
value,
|
|
@@ -3739,11 +3796,11 @@ function ActivityDetailRow({
|
|
|
3739
3796
|
onCopy,
|
|
3740
3797
|
isCopied
|
|
3741
3798
|
}) {
|
|
3742
|
-
return /* @__PURE__ */ (0,
|
|
3743
|
-
/* @__PURE__ */ (0,
|
|
3744
|
-
/* @__PURE__ */ (0,
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3746
|
-
onCopy && /* @__PURE__ */ (0,
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center justify-between py-1 last:pb-0", children: [
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-muted-foreground", children: label }),
|
|
3801
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex max-w-[65%] items-center gap-2", children: [
|
|
3802
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate font-mono text-xs font-medium text-white/90", children: value }),
|
|
3803
|
+
onCopy && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3747
3804
|
"button",
|
|
3748
3805
|
{
|
|
3749
3806
|
type: "button",
|
|
@@ -3753,7 +3810,7 @@ function ActivityDetailRow({
|
|
|
3753
3810
|
},
|
|
3754
3811
|
className: "rounded-md p-1 text-white/30 transition-colors hover:bg-accent hover:text-primary active:scale-95",
|
|
3755
3812
|
title: fullValue ? `Copy: ${fullValue}` : "Copy",
|
|
3756
|
-
children: /* @__PURE__ */ (0,
|
|
3813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "material-symbols-outlined", style: { fontSize: "14px" }, children: isCopied ? "check" : "content_copy" })
|
|
3757
3814
|
}
|
|
3758
3815
|
)
|
|
3759
3816
|
] })
|
|
@@ -3761,7 +3818,7 @@ function ActivityDetailRow({
|
|
|
3761
3818
|
}
|
|
3762
3819
|
|
|
3763
3820
|
// src/web/components/withdraw-destination-input.tsx
|
|
3764
|
-
var
|
|
3821
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3765
3822
|
function WithdrawDestinationInput({
|
|
3766
3823
|
destination,
|
|
3767
3824
|
setDestination,
|
|
@@ -3772,10 +3829,10 @@ function WithdrawDestinationInput({
|
|
|
3772
3829
|
handlePaste,
|
|
3773
3830
|
handleReset
|
|
3774
3831
|
}) {
|
|
3775
|
-
return /* @__PURE__ */ (0,
|
|
3776
|
-
/* @__PURE__ */ (0,
|
|
3777
|
-
/* @__PURE__ */ (0,
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "space-y-2", children: [
|
|
3833
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Destination" }),
|
|
3834
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "relative", children: [
|
|
3835
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3779
3836
|
"input",
|
|
3780
3837
|
{
|
|
3781
3838
|
type: "text",
|
|
@@ -3786,8 +3843,8 @@ function WithdrawDestinationInput({
|
|
|
3786
3843
|
onChange: (event) => setDestination(event.target.value)
|
|
3787
3844
|
}
|
|
3788
3845
|
),
|
|
3789
|
-
/* @__PURE__ */ (0,
|
|
3790
|
-
destination && /* @__PURE__ */ (0,
|
|
3846
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "absolute right-4 top-1/2 flex -translate-y-1/2 items-center gap-2", children: [
|
|
3847
|
+
destination && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3791
3848
|
"button",
|
|
3792
3849
|
{
|
|
3793
3850
|
type: "button",
|
|
@@ -3796,10 +3853,10 @@ function WithdrawDestinationInput({
|
|
|
3796
3853
|
handleReset();
|
|
3797
3854
|
},
|
|
3798
3855
|
className: "text-xs text-muted-foreground transition-colors hover:text-white",
|
|
3799
|
-
children: /* @__PURE__ */ (0,
|
|
3856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "material-symbols-outlined text-icon-md", children: "close" })
|
|
3800
3857
|
}
|
|
3801
3858
|
),
|
|
3802
|
-
/* @__PURE__ */ (0,
|
|
3859
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3803
3860
|
"button",
|
|
3804
3861
|
{
|
|
3805
3862
|
type: "button",
|
|
@@ -3810,24 +3867,24 @@ function WithdrawDestinationInput({
|
|
|
3810
3867
|
)
|
|
3811
3868
|
] })
|
|
3812
3869
|
] }),
|
|
3813
|
-
destination && /* @__PURE__ */ (0,
|
|
3814
|
-
/* @__PURE__ */ (0,
|
|
3870
|
+
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: [
|
|
3871
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-sm", children: "progress_activity" }),
|
|
3815
3872
|
isResolvingLnurl ? "Resolving..." : "Decoding..."
|
|
3816
|
-
] }) : addressType !== "unknown" && addressType !== "invalid" ? /* @__PURE__ */ (0,
|
|
3817
|
-
/* @__PURE__ */ (0,
|
|
3818
|
-
/* @__PURE__ */ (0,
|
|
3873
|
+
] }) : addressType !== "unknown" && addressType !== "invalid" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3874
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-primary", children: "\u2713" }),
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { "data-testid": "withdraw-detected-network", className: "text-muted-foreground", children: [
|
|
3819
3876
|
"Detected: ",
|
|
3820
3877
|
detectedNetworkLabel ?? addressType
|
|
3821
3878
|
] })
|
|
3822
|
-
] }) : addressType === "invalid" ? /* @__PURE__ */ (0,
|
|
3823
|
-
/* @__PURE__ */ (0,
|
|
3824
|
-
/* @__PURE__ */ (0,
|
|
3879
|
+
] }) : addressType === "invalid" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3880
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-danger", children: "\u2717" }),
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { "data-testid": "withdraw-invalid-destination", className: "text-danger", children: "Invalid address format" })
|
|
3825
3882
|
] }) : null })
|
|
3826
3883
|
] });
|
|
3827
3884
|
}
|
|
3828
3885
|
|
|
3829
3886
|
// src/web/components/withdraw-amount-input.tsx
|
|
3830
|
-
var
|
|
3887
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3831
3888
|
function WithdrawAmountInput({
|
|
3832
3889
|
addressType,
|
|
3833
3890
|
amount,
|
|
@@ -3849,13 +3906,13 @@ function WithdrawAmountInput({
|
|
|
3849
3906
|
}) {
|
|
3850
3907
|
const unitLabel = selectedAssetId === "BTC" ? "sats" : selectedAssetTicker ?? "units";
|
|
3851
3908
|
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,
|
|
3909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
3910
|
+
showAmountInput && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-2", children: [
|
|
3911
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Amount" }),
|
|
3912
|
+
/* @__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: [
|
|
3913
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-b from-transparent to-primary/5" }),
|
|
3914
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "z-10 flex w-full items-baseline justify-center gap-2", children: [
|
|
3915
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3859
3916
|
"input",
|
|
3860
3917
|
{
|
|
3861
3918
|
type: "text",
|
|
@@ -3866,9 +3923,9 @@ function WithdrawAmountInput({
|
|
|
3866
3923
|
onChange: handleAmountChange
|
|
3867
3924
|
}
|
|
3868
3925
|
),
|
|
3869
|
-
/* @__PURE__ */ (0,
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-xl font-medium text-muted-foreground", children: unitLabel })
|
|
3870
3927
|
] }),
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
3928
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3872
3929
|
"button",
|
|
3873
3930
|
{
|
|
3874
3931
|
type: "button",
|
|
@@ -3878,26 +3935,26 @@ function WithdrawAmountInput({
|
|
|
3878
3935
|
}
|
|
3879
3936
|
)
|
|
3880
3937
|
] }),
|
|
3881
|
-
/* @__PURE__ */ (0,
|
|
3938
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "mt-1 px-1 text-right text-xs text-muted-foreground", children: [
|
|
3882
3939
|
"Available: ",
|
|
3883
3940
|
formattedBalance,
|
|
3884
3941
|
" ",
|
|
3885
3942
|
unitLabel
|
|
3886
3943
|
] }),
|
|
3887
|
-
lnurlPayData && /* @__PURE__ */ (0,
|
|
3888
|
-
/* @__PURE__ */ (0,
|
|
3944
|
+
lnurlPayData && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "mt-2 space-y-1 px-1", children: [
|
|
3945
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
3889
3946
|
Math.ceil(lnurlPayData.params.min).toLocaleString(),
|
|
3890
3947
|
" \u2013",
|
|
3891
3948
|
" ",
|
|
3892
3949
|
Math.floor(lnurlPayData.params.max).toLocaleString(),
|
|
3893
3950
|
" sats"
|
|
3894
3951
|
] }),
|
|
3895
|
-
lnurlPayData.params.description && /* @__PURE__ */ (0,
|
|
3952
|
+
lnurlPayData.params.description && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xs italic text-muted-foreground", children: lnurlPayData.params.description })
|
|
3896
3953
|
] })
|
|
3897
3954
|
] }),
|
|
3898
|
-
addressType === "rgb" && decodedRgbInvoice?.recipient_type === "Witness" && /* @__PURE__ */ (0,
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
3900
|
-
/* @__PURE__ */ (0,
|
|
3955
|
+
addressType === "rgb" && decodedRgbInvoice?.recipient_type === "Witness" && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-2", children: [
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: "ml-1 text-xs font-medium text-muted-foreground", children: "Witness Amount (sats) - min 512" }),
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3901
3958
|
"input",
|
|
3902
3959
|
{
|
|
3903
3960
|
type: "number",
|
|
@@ -3910,32 +3967,32 @@ function WithdrawAmountInput({
|
|
|
3910
3967
|
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
3968
|
}
|
|
3912
3969
|
),
|
|
3913
|
-
/* @__PURE__ */ (0,
|
|
3970
|
+
/* @__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
3971
|
] }),
|
|
3915
|
-
(addressType === "bitcoin" || addressType === "rgb") && /* @__PURE__ */ (0,
|
|
3916
|
-
/* @__PURE__ */ (0,
|
|
3917
|
-
/* @__PURE__ */ (0,
|
|
3972
|
+
(addressType === "bitcoin" || addressType === "rgb") && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "space-y-2", children: [
|
|
3973
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Fee Rate" }),
|
|
3974
|
+
/* @__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
3975
|
"button",
|
|
3919
3976
|
{
|
|
3920
3977
|
type: "button",
|
|
3921
3978
|
onClick: () => setFeeRate(rate),
|
|
3922
3979
|
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
3980
|
children: [
|
|
3924
|
-
/* @__PURE__ */ (0,
|
|
3981
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3925
3982
|
"div",
|
|
3926
3983
|
{
|
|
3927
3984
|
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
3985
|
}
|
|
3929
3986
|
),
|
|
3930
|
-
/* @__PURE__ */ (0,
|
|
3931
|
-
/* @__PURE__ */ (0,
|
|
3987
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative z-10 flex flex-col items-center", children: [
|
|
3988
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3932
3989
|
"div",
|
|
3933
3990
|
{
|
|
3934
3991
|
className: `text-sm font-bold capitalize transition-colors ${feeRate === rate ? "text-primary" : "text-muted-foreground group-hover:text-primary"}`,
|
|
3935
3992
|
children: rate
|
|
3936
3993
|
}
|
|
3937
3994
|
),
|
|
3938
|
-
/* @__PURE__ */ (0,
|
|
3995
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3939
3996
|
"div",
|
|
3940
3997
|
{
|
|
3941
3998
|
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 +4008,18 @@ function WithdrawAmountInput({
|
|
|
3951
4008
|
rate
|
|
3952
4009
|
)) })
|
|
3953
4010
|
] }),
|
|
3954
|
-
addressType === "rgb" && /* @__PURE__ */ (0,
|
|
3955
|
-
/* @__PURE__ */ (0,
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
3957
|
-
/* @__PURE__ */ (0,
|
|
4011
|
+
addressType === "rgb" && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between rounded-xl border bg-card p-3", children: [
|
|
4012
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
|
|
4013
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm font-medium text-white", children: "Gift / Donation" }),
|
|
4014
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-xs text-muted-foreground", children: "Skip amount checks for this transfer" })
|
|
3958
4015
|
] }),
|
|
3959
|
-
/* @__PURE__ */ (0,
|
|
4016
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3960
4017
|
"button",
|
|
3961
4018
|
{
|
|
3962
4019
|
type: "button",
|
|
3963
4020
|
className: `relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${donation ? "bg-primary" : "bg-secondary"}`,
|
|
3964
4021
|
onClick: () => setDonation(!donation),
|
|
3965
|
-
children: /* @__PURE__ */ (0,
|
|
4022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3966
4023
|
"span",
|
|
3967
4024
|
{
|
|
3968
4025
|
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 +4032,7 @@ function WithdrawAmountInput({
|
|
|
3975
4032
|
}
|
|
3976
4033
|
|
|
3977
4034
|
// src/web/components/withdraw-invoice-info.tsx
|
|
3978
|
-
var
|
|
4035
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3979
4036
|
function getAssetPrecisionForId(allAssets, assetId) {
|
|
3980
4037
|
return allAssets.find((asset) => asset.asset_id === assetId)?.precision ?? 0;
|
|
3981
4038
|
}
|
|
@@ -3996,31 +4053,31 @@ function WithdrawInvoiceInfo({
|
|
|
3996
4053
|
maxLightningCapacity
|
|
3997
4054
|
}) {
|
|
3998
4055
|
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,
|
|
4056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "space-y-3 rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-primary", children: "Lightning Invoice" }),
|
|
4058
|
+
decodedLnInvoice.amount != null && decodedLnInvoice.amount > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4059
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Amount" }),
|
|
4060
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "font-bold text-white", children: [
|
|
4004
4061
|
decodedLnInvoice.amount.toLocaleString(),
|
|
4005
4062
|
" ",
|
|
4006
4063
|
decodedLnInvoice.asset_id ? "units" : "sats"
|
|
4007
4064
|
] })
|
|
4008
4065
|
] }),
|
|
4009
|
-
decodedLnInvoice.asset_id && /* @__PURE__ */ (0,
|
|
4010
|
-
/* @__PURE__ */ (0,
|
|
4011
|
-
/* @__PURE__ */ (0,
|
|
4066
|
+
decodedLnInvoice.asset_id && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4067
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Asset" }),
|
|
4068
|
+
/* @__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
4069
|
] }),
|
|
4013
|
-
decodedLnInvoice.asset_amount != null && decodedLnInvoice.asset_amount > 0 && /* @__PURE__ */ (0,
|
|
4014
|
-
/* @__PURE__ */ (0,
|
|
4015
|
-
/* @__PURE__ */ (0,
|
|
4070
|
+
decodedLnInvoice.asset_amount != null && decodedLnInvoice.asset_amount > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4071
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Asset Amount" }),
|
|
4072
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-bold text-white", children: decodedLnInvoice.asset_amount.toLocaleString() })
|
|
4016
4073
|
] }),
|
|
4017
|
-
decodedLnInvoice.description && /* @__PURE__ */ (0,
|
|
4018
|
-
/* @__PURE__ */ (0,
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
4074
|
+
decodedLnInvoice.description && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Description" }),
|
|
4076
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "max-w-[180px] truncate text-right text-white", children: decodedLnInvoice.description })
|
|
4020
4077
|
] }),
|
|
4021
|
-
/* @__PURE__ */ (0,
|
|
4022
|
-
/* @__PURE__ */ (0,
|
|
4023
|
-
/* @__PURE__ */ (0,
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4079
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Channel Capacity" }),
|
|
4080
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "text-white", children: [
|
|
4024
4081
|
Math.floor(maxLightningCapacity / 1e3).toLocaleString(),
|
|
4025
4082
|
" sats"
|
|
4026
4083
|
] })
|
|
@@ -4028,26 +4085,26 @@ function WithdrawInvoiceInfo({
|
|
|
4028
4085
|
] });
|
|
4029
4086
|
}
|
|
4030
4087
|
if (decodedRgbInvoice && addressType === "rgb") {
|
|
4031
|
-
return /* @__PURE__ */ (0,
|
|
4032
|
-
/* @__PURE__ */ (0,
|
|
4033
|
-
decodedRgbInvoice.asset_id && /* @__PURE__ */ (0,
|
|
4034
|
-
/* @__PURE__ */ (0,
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "space-y-3 rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4089
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-primary", children: "RGB Invoice" }),
|
|
4090
|
+
decodedRgbInvoice.asset_id && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4091
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Asset" }),
|
|
4092
|
+
/* @__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
4093
|
] }),
|
|
4037
|
-
decodedRgbInvoice.assignment?.value != null && decodedRgbInvoice.assignment.value > 0 && /* @__PURE__ */ (0,
|
|
4038
|
-
/* @__PURE__ */ (0,
|
|
4039
|
-
/* @__PURE__ */ (0,
|
|
4094
|
+
decodedRgbInvoice.assignment?.value != null && decodedRgbInvoice.assignment.value > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4095
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Requested Amount" }),
|
|
4096
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-bold text-white", children: formatRawAmount(
|
|
4040
4097
|
decodedRgbInvoice.assignment.value,
|
|
4041
4098
|
getAssetPrecisionForId(allAssets, decodedRgbInvoice.asset_id ?? selectedAssetId)
|
|
4042
4099
|
) })
|
|
4043
4100
|
] }),
|
|
4044
|
-
decodedRgbInvoice.recipient_type && /* @__PURE__ */ (0,
|
|
4045
|
-
/* @__PURE__ */ (0,
|
|
4046
|
-
/* @__PURE__ */ (0,
|
|
4101
|
+
decodedRgbInvoice.recipient_type && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4102
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Recipient Type" }),
|
|
4103
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-white", children: decodedRgbInvoice.recipient_type })
|
|
4047
4104
|
] }),
|
|
4048
|
-
/* @__PURE__ */ (0,
|
|
4049
|
-
/* @__PURE__ */ (0,
|
|
4050
|
-
/* @__PURE__ */ (0,
|
|
4105
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between text-sm", children: [
|
|
4106
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: "Your Balance" }),
|
|
4107
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "text-white", children: [
|
|
4051
4108
|
formatRawAmount(assetBalance, getAssetPrecisionForId(allAssets, selectedAssetId)),
|
|
4052
4109
|
" ",
|
|
4053
4110
|
selectedAssetTicker ?? "units"
|
|
@@ -4056,9 +4113,9 @@ function WithdrawInvoiceInfo({
|
|
|
4056
4113
|
] });
|
|
4057
4114
|
}
|
|
4058
4115
|
if (addressType === "bitcoin" || addressType === "arkade") {
|
|
4059
|
-
return /* @__PURE__ */ (0,
|
|
4060
|
-
/* @__PURE__ */ (0,
|
|
4061
|
-
/* @__PURE__ */ (0,
|
|
4116
|
+
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: [
|
|
4117
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-muted-foreground", children: addressType === "arkade" ? "Available Arkade Balance" : "Available Balance" }),
|
|
4118
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "font-bold text-white", children: [
|
|
4062
4119
|
formatRawAmount(assetBalance, getAssetPrecisionForId(allAssets, selectedAssetId)),
|
|
4063
4120
|
" ",
|
|
4064
4121
|
selectedAssetTicker ?? "sats"
|
|
@@ -4069,14 +4126,14 @@ function WithdrawInvoiceInfo({
|
|
|
4069
4126
|
}
|
|
4070
4127
|
|
|
4071
4128
|
// src/web/components/withdraw-route-selector.tsx
|
|
4072
|
-
var
|
|
4129
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4073
4130
|
function RouteChoiceCard({
|
|
4074
4131
|
route,
|
|
4075
4132
|
selected,
|
|
4076
4133
|
recommended,
|
|
4077
4134
|
onClick
|
|
4078
4135
|
}) {
|
|
4079
|
-
return /* @__PURE__ */ (0,
|
|
4136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4080
4137
|
"button",
|
|
4081
4138
|
{
|
|
4082
4139
|
type: "button",
|
|
@@ -4087,17 +4144,17 @@ function RouteChoiceCard({
|
|
|
4087
4144
|
selected ? "border-primary/30 bg-primary/10" : "border-border bg-white/4 hover:border-white/20 hover:bg-white/6"
|
|
4088
4145
|
),
|
|
4089
4146
|
children: [
|
|
4090
|
-
/* @__PURE__ */ (0,
|
|
4091
|
-
/* @__PURE__ */ (0,
|
|
4092
|
-
/* @__PURE__ */ (0,
|
|
4093
|
-
/* @__PURE__ */ (0,
|
|
4094
|
-
recommended && /* @__PURE__ */ (0,
|
|
4147
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
4148
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
4149
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-bold text-white", children: route.accountTitle }),
|
|
4151
|
+
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
4152
|
] }),
|
|
4096
|
-
/* @__PURE__ */ (0,
|
|
4153
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-white/45", children: route.methodLabel })
|
|
4097
4154
|
] }),
|
|
4098
|
-
/* @__PURE__ */ (0,
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint })
|
|
4099
4156
|
] }),
|
|
4100
|
-
/* @__PURE__ */ (0,
|
|
4157
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-3 text-xs leading-relaxed text-muted-foreground", children: route.summary })
|
|
4101
4158
|
]
|
|
4102
4159
|
}
|
|
4103
4160
|
);
|
|
@@ -4110,12 +4167,12 @@ function WithdrawRouteSelector({
|
|
|
4110
4167
|
selectedAccountTitle,
|
|
4111
4168
|
onRouteChange
|
|
4112
4169
|
}) {
|
|
4113
|
-
return /* @__PURE__ */ (0,
|
|
4114
|
-
/* @__PURE__ */ (0,
|
|
4115
|
-
/* @__PURE__ */ (0,
|
|
4116
|
-
/* @__PURE__ */ (0,
|
|
4170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "space-y-3", children: [
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
|
|
4172
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Route" }),
|
|
4173
|
+
/* @__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
4174
|
] }),
|
|
4118
|
-
/* @__PURE__ */ (0,
|
|
4175
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "space-y-2", children: routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4119
4176
|
RouteChoiceCard,
|
|
4120
4177
|
{
|
|
4121
4178
|
route,
|
|
@@ -4125,19 +4182,19 @@ function WithdrawRouteSelector({
|
|
|
4125
4182
|
},
|
|
4126
4183
|
route.account
|
|
4127
4184
|
)) }),
|
|
4128
|
-
selectedRouteSummary && activeRouteAccount && /* @__PURE__ */ (0,
|
|
4129
|
-
/* @__PURE__ */ (0,
|
|
4130
|
-
/* @__PURE__ */ (0,
|
|
4131
|
-
/* @__PURE__ */ (0,
|
|
4185
|
+
selectedRouteSummary && activeRouteAccount && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "rounded-2xl border bg-white/4 p-4", children: [
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
4187
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xs uppercase tracking-wider text-white/35", children: "Selected path" }),
|
|
4188
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xs font-bold text-white", children: selectedAccountTitle })
|
|
4132
4189
|
] }),
|
|
4133
|
-
/* @__PURE__ */ (0,
|
|
4134
|
-
/* @__PURE__ */ (0,
|
|
4190
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-2 text-sm font-semibold text-white", children: selectedRouteSummary.methodLabel }),
|
|
4191
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: selectedRouteSummary.summary })
|
|
4135
4192
|
] })
|
|
4136
4193
|
] });
|
|
4137
4194
|
}
|
|
4138
4195
|
|
|
4139
4196
|
// src/web/components/withdraw-confirmation.tsx
|
|
4140
|
-
var
|
|
4197
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4141
4198
|
function WithdrawConfirmation({
|
|
4142
4199
|
isConfirming,
|
|
4143
4200
|
isPollingStatus,
|
|
@@ -4157,8 +4214,8 @@ function WithdrawConfirmation({
|
|
|
4157
4214
|
amount,
|
|
4158
4215
|
handleConfirmSend
|
|
4159
4216
|
}) {
|
|
4160
|
-
return /* @__PURE__ */ (0,
|
|
4161
|
-
/* @__PURE__ */ (0,
|
|
4217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-h-screen bg-background pb-6 font-display text-foreground", children: [
|
|
4218
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4162
4219
|
PageHeader,
|
|
4163
4220
|
{
|
|
4164
4221
|
title: "Confirm Payment",
|
|
@@ -4170,71 +4227,71 @@ function WithdrawConfirmation({
|
|
|
4170
4227
|
className: isConfirming || isPollingStatus ? "pointer-events-none opacity-70" : void 0
|
|
4171
4228
|
}
|
|
4172
4229
|
),
|
|
4173
|
-
/* @__PURE__ */ (0,
|
|
4174
|
-
/* @__PURE__ */ (0,
|
|
4175
|
-
/* @__PURE__ */ (0,
|
|
4176
|
-
/* @__PURE__ */ (0,
|
|
4177
|
-
/* @__PURE__ */ (0,
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("main", { className: "space-y-6 px-5", children: [
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-center py-6", children: [
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "mb-1 text-sm uppercase tracking-wide text-muted-foreground", children: "Sending" }),
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h1", { className: "mb-2 text-4xl font-bold", children: displayAmount.toLocaleString() }),
|
|
4234
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-base text-muted-foreground", children: selectedAssetId === "BTC" ? "sats" : selectedAsset?.ticker ?? "units" })
|
|
4178
4235
|
] }),
|
|
4179
|
-
/* @__PURE__ */ (0,
|
|
4180
|
-
/* @__PURE__ */ (0,
|
|
4181
|
-
/* @__PURE__ */ (0,
|
|
4182
|
-
/* @__PURE__ */ (0,
|
|
4236
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "overflow-hidden rounded-2xl border bg-card/90 shadow-inner backdrop-blur-2xl", children: [
|
|
4237
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4238
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "To" }),
|
|
4239
|
+
/* @__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
4240
|
] }),
|
|
4184
|
-
/* @__PURE__ */ (0,
|
|
4185
|
-
/* @__PURE__ */ (0,
|
|
4186
|
-
/* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4188
|
-
/* @__PURE__ */ (0,
|
|
4241
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4242
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Network" }),
|
|
4243
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
4244
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "size-1.5 rounded-full bg-primary" }),
|
|
4245
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: networkLabel })
|
|
4189
4246
|
] })
|
|
4190
4247
|
] }),
|
|
4191
|
-
routeAccount && /* @__PURE__ */ (0,
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4193
|
-
/* @__PURE__ */ (0,
|
|
4248
|
+
routeAccount && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4249
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "From Account" }),
|
|
4250
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: routeAccount })
|
|
4194
4251
|
] }),
|
|
4195
|
-
routeMethod && /* @__PURE__ */ (0,
|
|
4196
|
-
/* @__PURE__ */ (0,
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4252
|
+
routeMethod && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4253
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Route Method" }),
|
|
4254
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: routeMethod })
|
|
4198
4255
|
] }),
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4200
|
-
/* @__PURE__ */ (0,
|
|
4201
|
-
/* @__PURE__ */ (0,
|
|
4256
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-5", children: [
|
|
4257
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Asset" }),
|
|
4258
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold text-white", children: selectedAsset?.ticker ?? selectedAssetId })
|
|
4202
4259
|
] }),
|
|
4203
|
-
estimatedFee > 0 && /* @__PURE__ */ (0,
|
|
4204
|
-
/* @__PURE__ */ (0,
|
|
4205
|
-
/* @__PURE__ */ (0,
|
|
4206
|
-
/* @__PURE__ */ (0,
|
|
4260
|
+
estimatedFee > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between p-5", children: [
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Network Fee" }),
|
|
4262
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-end", children: [
|
|
4263
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "text-sm text-white", children: [
|
|
4207
4264
|
"~",
|
|
4208
4265
|
estimatedFee.toLocaleString(),
|
|
4209
4266
|
" sats"
|
|
4210
4267
|
] }),
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4268
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "mt-0.5 text-xxs font-bold capitalize tracking-wider text-primary", children: feeRate })
|
|
4212
4269
|
] })
|
|
4213
4270
|
] }),
|
|
4214
|
-
addressType === "rgb" && decodedRgbInvoice?.recipient_type === "Witness" && /* @__PURE__ */ (0,
|
|
4215
|
-
/* @__PURE__ */ (0,
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4271
|
+
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: [
|
|
4272
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm text-muted-foreground", children: "Witness Amount" }),
|
|
4273
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "text-sm text-white", children: [
|
|
4217
4274
|
witnessAmountSat,
|
|
4218
4275
|
" sats"
|
|
4219
4276
|
] })
|
|
4220
4277
|
] })
|
|
4221
4278
|
] }),
|
|
4222
|
-
selectedAssetId === "BTC" && estimatedFee > 0 && /* @__PURE__ */ (0,
|
|
4223
|
-
/* @__PURE__ */ (0,
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4279
|
+
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: [
|
|
4280
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-sm font-bold uppercase tracking-wider text-primary", children: "Total to deduct" }),
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "text-xl font-bold text-white", children: [
|
|
4225
4282
|
(Math.round(parseFloat(amount) || 0) + estimatedFee).toLocaleString(),
|
|
4226
4283
|
" ",
|
|
4227
|
-
/* @__PURE__ */ (0,
|
|
4284
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-lg text-primary/70", children: "sats" })
|
|
4228
4285
|
] })
|
|
4229
4286
|
] }),
|
|
4230
|
-
isPollingStatus && /* @__PURE__ */ (0,
|
|
4231
|
-
/* @__PURE__ */ (0,
|
|
4232
|
-
/* @__PURE__ */ (0,
|
|
4233
|
-
/* @__PURE__ */ (0,
|
|
4234
|
-
/* @__PURE__ */ (0,
|
|
4287
|
+
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: [
|
|
4288
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "material-symbols-outlined animate-spin text-primary", children: "progress_activity" }),
|
|
4289
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
4290
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm font-medium text-white", children: "Processing payment..." }),
|
|
4291
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xs text-muted-foreground", children: "Waiting for confirmation" })
|
|
4235
4292
|
] })
|
|
4236
4293
|
] }),
|
|
4237
|
-
/* @__PURE__ */ (0,
|
|
4294
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4238
4295
|
Button,
|
|
4239
4296
|
{
|
|
4240
4297
|
variant: "cta",
|
|
@@ -4242,11 +4299,11 @@ function WithdrawConfirmation({
|
|
|
4242
4299
|
onClick: handleConfirmSend,
|
|
4243
4300
|
disabled: isConfirming || isPollingStatus,
|
|
4244
4301
|
className: "mt-2 w-full",
|
|
4245
|
-
children: isConfirming || isPollingStatus ? /* @__PURE__ */ (0,
|
|
4246
|
-
/* @__PURE__ */ (0,
|
|
4302
|
+
children: isConfirming || isPollingStatus ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
4303
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-2xl", children: "progress_activity" }),
|
|
4247
4304
|
isPollingStatus ? "Waiting for confirmation..." : "Sending..."
|
|
4248
|
-
] }) : /* @__PURE__ */ (0,
|
|
4249
|
-
/* @__PURE__ */ (0,
|
|
4305
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
4306
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "material-symbols-outlined text-icon-2xl font-bold", children: "fingerprint" }),
|
|
4250
4307
|
"Confirm & Send"
|
|
4251
4308
|
] })
|
|
4252
4309
|
}
|
|
@@ -4256,7 +4313,7 @@ function WithdrawConfirmation({
|
|
|
4256
4313
|
}
|
|
4257
4314
|
|
|
4258
4315
|
// src/web/components/withdraw-success.tsx
|
|
4259
|
-
var
|
|
4316
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4260
4317
|
function WithdrawSuccess({
|
|
4261
4318
|
displayAmount,
|
|
4262
4319
|
selectedAssetId,
|
|
@@ -4265,35 +4322,35 @@ function WithdrawSuccess({
|
|
|
4265
4322
|
handleReset,
|
|
4266
4323
|
onDone
|
|
4267
4324
|
}) {
|
|
4268
|
-
return /* @__PURE__ */ (0,
|
|
4269
|
-
/* @__PURE__ */ (0,
|
|
4270
|
-
/* @__PURE__ */ (0,
|
|
4271
|
-
/* @__PURE__ */ (0,
|
|
4272
|
-
/* @__PURE__ */ (0,
|
|
4273
|
-
/* @__PURE__ */ (0,
|
|
4325
|
+
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: [
|
|
4326
|
+
/* @__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" }),
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "z-10 flex flex-1 flex-col items-center justify-center", children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative mb-8", children: [
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "absolute inset-0 animate-pulse rounded-full bg-primary/30 blur-2xl" }),
|
|
4330
|
+
/* @__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
4331
|
] }),
|
|
4275
|
-
/* @__PURE__ */ (0,
|
|
4276
|
-
/* @__PURE__ */ (0,
|
|
4277
|
-
/* @__PURE__ */ (0,
|
|
4278
|
-
/* @__PURE__ */ (0,
|
|
4279
|
-
/* @__PURE__ */ (0,
|
|
4280
|
-
/* @__PURE__ */ (0,
|
|
4332
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h1", { className: "mb-2 text-3xl font-bold", children: "Payment Sent!" }),
|
|
4333
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "max-w-xs text-center text-muted-foreground", children: "Your transaction has been successfully processed." }),
|
|
4334
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "mt-12 w-full max-w-xs space-y-4", children: [
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4336
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm text-muted-foreground", children: "Amount" }),
|
|
4337
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "text-xl font-bold", children: [
|
|
4281
4338
|
displayAmount.toLocaleString(),
|
|
4282
4339
|
" ",
|
|
4283
|
-
selectedAssetId === "BTC" ? /* @__PURE__ */ (0,
|
|
4340
|
+
selectedAssetId === "BTC" ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm text-primary/70", children: "sats" }) : selectedAsset?.ticker ?? "units"
|
|
4284
4341
|
] })
|
|
4285
4342
|
] }),
|
|
4286
|
-
(txResult?.paymentHash || txResult?.payment_hash) && /* @__PURE__ */ (0,
|
|
4287
|
-
/* @__PURE__ */ (0,
|
|
4288
|
-
/* @__PURE__ */ (0,
|
|
4343
|
+
(txResult?.paymentHash || txResult?.payment_hash) && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4344
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Payment Hash" }),
|
|
4345
|
+
/* @__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
4346
|
] }),
|
|
4290
|
-
txResult?.txid && /* @__PURE__ */ (0,
|
|
4291
|
-
/* @__PURE__ */ (0,
|
|
4292
|
-
/* @__PURE__ */ (0,
|
|
4347
|
+
txResult?.txid && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "rounded-2xl border bg-card p-5 shadow-inner", children: [
|
|
4348
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "mb-2 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Transaction ID" }),
|
|
4349
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "break-all font-mono text-xs leading-relaxed text-muted-foreground", children: txResult.txid })
|
|
4293
4350
|
] })
|
|
4294
4351
|
] })
|
|
4295
4352
|
] }),
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4353
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "z-10 space-y-3 py-6", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4297
4354
|
"button",
|
|
4298
4355
|
{
|
|
4299
4356
|
type: "button",
|
|
@@ -4309,7 +4366,7 @@ function WithdrawSuccess({
|
|
|
4309
4366
|
}
|
|
4310
4367
|
|
|
4311
4368
|
// src/web/components/setting-item.tsx
|
|
4312
|
-
var
|
|
4369
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4313
4370
|
function SettingItem({
|
|
4314
4371
|
icon,
|
|
4315
4372
|
iconSrc,
|
|
@@ -4323,7 +4380,7 @@ function SettingItem({
|
|
|
4323
4380
|
iconColor = "text-primary"
|
|
4324
4381
|
}) {
|
|
4325
4382
|
const isClickable = !!onClick;
|
|
4326
|
-
return /* @__PURE__ */ (0,
|
|
4383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4327
4384
|
"div",
|
|
4328
4385
|
{
|
|
4329
4386
|
className: cn(
|
|
@@ -4332,26 +4389,26 @@ function SettingItem({
|
|
|
4332
4389
|
className
|
|
4333
4390
|
),
|
|
4334
4391
|
onClick,
|
|
4335
|
-
children: /* @__PURE__ */ (0,
|
|
4336
|
-
/* @__PURE__ */ (0,
|
|
4337
|
-
(icon || iconSrc) && /* @__PURE__ */ (0,
|
|
4392
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
4393
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-3 flex-1 min-w-0", children: [
|
|
4394
|
+
(icon || iconSrc) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4338
4395
|
"div",
|
|
4339
4396
|
{
|
|
4340
4397
|
className: cn(
|
|
4341
4398
|
"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
4399
|
iconColor
|
|
4343
4400
|
),
|
|
4344
|
-
children: iconSrc ? /* @__PURE__ */ (0,
|
|
4401
|
+
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
4402
|
}
|
|
4346
4403
|
),
|
|
4347
|
-
/* @__PURE__ */ (0,
|
|
4348
|
-
/* @__PURE__ */ (0,
|
|
4349
|
-
description && /* @__PURE__ */ (0,
|
|
4404
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
4405
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-bold text-body text-foreground tracking-wide", children: title }),
|
|
4406
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm text-muted-foreground mt-0.5 font-medium", children: description })
|
|
4350
4407
|
] })
|
|
4351
4408
|
] }),
|
|
4352
|
-
/* @__PURE__ */ (0,
|
|
4353
|
-
value && /* @__PURE__ */ (0,
|
|
4354
|
-
showChevron && isClickable && /* @__PURE__ */ (0,
|
|
4409
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
4410
|
+
value && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs text-muted-foreground font-mono", children: value }),
|
|
4411
|
+
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
4412
|
] })
|
|
4356
4413
|
] })
|
|
4357
4414
|
}
|
|
@@ -4359,9 +4416,9 @@ function SettingItem({
|
|
|
4359
4416
|
}
|
|
4360
4417
|
|
|
4361
4418
|
// src/web/components/section-label.tsx
|
|
4362
|
-
var
|
|
4419
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4363
4420
|
function SectionLabel({ children, className }) {
|
|
4364
|
-
return /* @__PURE__ */ (0,
|
|
4421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4365
4422
|
"span",
|
|
4366
4423
|
{
|
|
4367
4424
|
className: cn("text-xxs font-black uppercase tracking-eyebrow-wide text-muted-foreground", className),
|
|
@@ -4371,7 +4428,7 @@ function SectionLabel({ children, className }) {
|
|
|
4371
4428
|
}
|
|
4372
4429
|
|
|
4373
4430
|
// src/web/components/alert-banner.tsx
|
|
4374
|
-
var
|
|
4431
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4375
4432
|
var variantStyles = {
|
|
4376
4433
|
error: { container: "bg-danger/40", icon: "text-danger", iconName: "error" },
|
|
4377
4434
|
warning: { container: "bg-warning/40", icon: "text-warning", iconName: "warning" },
|
|
@@ -4380,15 +4437,15 @@ var variantStyles = {
|
|
|
4380
4437
|
};
|
|
4381
4438
|
function AlertBanner({ variant = "info", icon, children, className }) {
|
|
4382
4439
|
const styles = variantStyles[variant];
|
|
4383
|
-
return /* @__PURE__ */ (0,
|
|
4384
|
-
/* @__PURE__ */ (0,
|
|
4385
|
-
/* @__PURE__ */ (0,
|
|
4440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("rounded-xl p-3 flex items-center gap-2", styles.container, className), children: [
|
|
4441
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Icon2, { name: icon ?? styles.iconName, size: "md", className: cn("shrink-0", styles.icon) }),
|
|
4442
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("text-sm", styles.icon), children })
|
|
4386
4443
|
] });
|
|
4387
4444
|
}
|
|
4388
4445
|
|
|
4389
4446
|
// src/web/components/error-boundary.tsx
|
|
4390
4447
|
var import_react12 = require("react");
|
|
4391
|
-
var
|
|
4448
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4392
4449
|
var ErrorBoundary = class extends import_react12.Component {
|
|
4393
4450
|
constructor(props) {
|
|
4394
4451
|
super(props);
|
|
@@ -4402,11 +4459,11 @@ var ErrorBoundary = class extends import_react12.Component {
|
|
|
4402
4459
|
}
|
|
4403
4460
|
render() {
|
|
4404
4461
|
if (this.state.hasError) {
|
|
4405
|
-
return this.props.fallback ?? /* @__PURE__ */ (0,
|
|
4406
|
-
/* @__PURE__ */ (0,
|
|
4407
|
-
/* @__PURE__ */ (0,
|
|
4408
|
-
/* @__PURE__ */ (0,
|
|
4409
|
-
/* @__PURE__ */ (0,
|
|
4462
|
+
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: [
|
|
4463
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "material-symbols-outlined text-danger text-icon-5xl", children: "error" }),
|
|
4464
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h2", { className: "text-lg font-bold", children: "Something went wrong" }),
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-sm text-muted-foreground text-center", children: this.state.error?.message ?? "An unexpected error occurred." }),
|
|
4466
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
4410
4467
|
"button",
|
|
4411
4468
|
{
|
|
4412
4469
|
onClick: () => {
|
|
@@ -4534,7 +4591,7 @@ var colors = {
|
|
|
4534
4591
|
};
|
|
4535
4592
|
|
|
4536
4593
|
// src/web/components/deposit-ui-shared.tsx
|
|
4537
|
-
var
|
|
4594
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
4538
4595
|
var GLOW_ALPHA = "26";
|
|
4539
4596
|
function qrGlowStyle(hex) {
|
|
4540
4597
|
return { boxShadow: `0 0 30px ${hex}${GLOW_ALPHA}` };
|
|
@@ -4548,7 +4605,7 @@ var NETWORK_CONFIG = {
|
|
|
4548
4605
|
border: "border-network-bitcoin/40",
|
|
4549
4606
|
qrBorder: "border-network-bitcoin/30",
|
|
4550
4607
|
qrGlow: qrGlowStyle(colors.network.bitcoin),
|
|
4551
|
-
icon: /* @__PURE__ */ (0,
|
|
4608
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined text-icon-xs leading-none", children: "link" })
|
|
4552
4609
|
},
|
|
4553
4610
|
lightning: {
|
|
4554
4611
|
label: "Lightning",
|
|
@@ -4558,7 +4615,7 @@ var NETWORK_CONFIG = {
|
|
|
4558
4615
|
border: "border-network-lightning/40",
|
|
4559
4616
|
qrBorder: "border-network-lightning/30",
|
|
4560
4617
|
qrGlow: qrGlowStyle(colors.network.lightning),
|
|
4561
|
-
icon: /* @__PURE__ */ (0,
|
|
4618
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/lightning/lightning.svg", className: "size-3", alt: "" })
|
|
4562
4619
|
},
|
|
4563
4620
|
spark: {
|
|
4564
4621
|
label: "Spark",
|
|
@@ -4568,7 +4625,7 @@ var NETWORK_CONFIG = {
|
|
|
4568
4625
|
border: "border-info/40",
|
|
4569
4626
|
qrBorder: "border-info/30",
|
|
4570
4627
|
qrGlow: qrGlowStyle(colors.info),
|
|
4571
|
-
icon: /* @__PURE__ */ (0,
|
|
4628
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/spark/Asterisk/Spark Asterisk White.svg", className: "h-3 w-3", alt: "" })
|
|
4572
4629
|
},
|
|
4573
4630
|
arkade: {
|
|
4574
4631
|
label: "Arkade",
|
|
@@ -4578,7 +4635,7 @@ var NETWORK_CONFIG = {
|
|
|
4578
4635
|
border: "border-network-arkade/40",
|
|
4579
4636
|
qrBorder: "border-network-arkade/30",
|
|
4580
4637
|
qrGlow: qrGlowStyle(colors.network.arkade),
|
|
4581
|
-
icon: /* @__PURE__ */ (0,
|
|
4638
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("img", { src: "/icons/arkade/arkade-icon.svg", className: "h-3 w-3 rounded-sm", alt: "" })
|
|
4582
4639
|
}
|
|
4583
4640
|
};
|
|
4584
4641
|
var ACCOUNT_META = {
|
|
@@ -4587,14 +4644,14 @@ var ACCOUNT_META = {
|
|
|
4587
4644
|
accentBg: "bg-primary/10",
|
|
4588
4645
|
accentText: "text-primary",
|
|
4589
4646
|
accentBorder: "border-primary/30",
|
|
4590
|
-
icon: /* @__PURE__ */ (0,
|
|
4647
|
+
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
4648
|
},
|
|
4592
4649
|
SPARK: {
|
|
4593
4650
|
shortLabel: "Spark",
|
|
4594
4651
|
accentBg: "bg-info/10",
|
|
4595
4652
|
accentText: "text-info",
|
|
4596
4653
|
accentBorder: "border-info/30",
|
|
4597
|
-
icon: /* @__PURE__ */ (0,
|
|
4654
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4598
4655
|
"img",
|
|
4599
4656
|
{
|
|
4600
4657
|
src: "/icons/spark/Asterisk/Spark Asterisk White.svg",
|
|
@@ -4608,7 +4665,7 @@ var ACCOUNT_META = {
|
|
|
4608
4665
|
accentBg: "bg-network-arkade/10",
|
|
4609
4666
|
accentText: "text-network-arkade",
|
|
4610
4667
|
accentBorder: "border-network-arkade/30",
|
|
4611
|
-
icon: /* @__PURE__ */ (0,
|
|
4668
|
+
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
4669
|
}
|
|
4613
4670
|
};
|
|
4614
4671
|
var METHOD_META = {
|
|
@@ -4625,7 +4682,7 @@ function InvoiceStatusBanner({
|
|
|
4625
4682
|
isInvoiceFailedOrExpired,
|
|
4626
4683
|
invoiceStatus
|
|
4627
4684
|
}) {
|
|
4628
|
-
return /* @__PURE__ */ (0,
|
|
4685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4629
4686
|
"div",
|
|
4630
4687
|
{
|
|
4631
4688
|
className: cn(
|
|
@@ -4633,17 +4690,17 @@ function InvoiceStatusBanner({
|
|
|
4633
4690
|
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
4691
|
),
|
|
4635
4692
|
children: [
|
|
4636
|
-
isInvoicePending && /* @__PURE__ */ (0,
|
|
4637
|
-
/* @__PURE__ */ (0,
|
|
4638
|
-
/* @__PURE__ */ (0,
|
|
4693
|
+
isInvoicePending && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
4694
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-sm", children: "progress_activity" }),
|
|
4695
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: "Waiting for payment..." })
|
|
4639
4696
|
] }),
|
|
4640
|
-
isInvoicePaid && /* @__PURE__ */ (0,
|
|
4641
|
-
/* @__PURE__ */ (0,
|
|
4642
|
-
/* @__PURE__ */ (0,
|
|
4697
|
+
isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
4698
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "check_circle" }),
|
|
4699
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: "Payment received!" })
|
|
4643
4700
|
] }),
|
|
4644
|
-
isInvoiceFailedOrExpired && /* @__PURE__ */ (0,
|
|
4645
|
-
/* @__PURE__ */ (0,
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4701
|
+
isInvoiceFailedOrExpired && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
4702
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "cancel" }),
|
|
4703
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { children: [
|
|
4647
4704
|
"Invoice ",
|
|
4648
4705
|
invoiceStatus?.toLowerCase() === "expired" ? "expired" : "failed"
|
|
4649
4706
|
] })
|
|
@@ -4653,20 +4710,20 @@ function InvoiceStatusBanner({
|
|
|
4653
4710
|
);
|
|
4654
4711
|
}
|
|
4655
4712
|
function PaidOverlay() {
|
|
4656
|
-
return /* @__PURE__ */ (0,
|
|
4657
|
-
/* @__PURE__ */ (0,
|
|
4658
|
-
/* @__PURE__ */ (0,
|
|
4713
|
+
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: [
|
|
4714
|
+
/* @__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" }) }),
|
|
4715
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-sm font-bold text-primary", children: "Received!" })
|
|
4659
4716
|
] }) });
|
|
4660
4717
|
}
|
|
4661
4718
|
function CopyIcon({ copied }) {
|
|
4662
|
-
return /* @__PURE__ */ (0,
|
|
4719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
4663
4720
|
"div",
|
|
4664
4721
|
{
|
|
4665
4722
|
className: cn(
|
|
4666
4723
|
"flex-shrink-0 rounded-lg p-2 transition-all",
|
|
4667
4724
|
copied ? "bg-primary/15 text-primary" : "bg-white/5 text-white/40 group-hover:bg-primary/10 group-hover:text-primary"
|
|
4668
4725
|
),
|
|
4669
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
4726
|
+
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
4727
|
}
|
|
4671
4728
|
);
|
|
4672
4729
|
}
|
|
@@ -4676,7 +4733,7 @@ function AccountChoiceChip({
|
|
|
4676
4733
|
onClick
|
|
4677
4734
|
}) {
|
|
4678
4735
|
const meta = ACCOUNT_META[account];
|
|
4679
|
-
return /* @__PURE__ */ (0,
|
|
4736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4680
4737
|
"button",
|
|
4681
4738
|
{
|
|
4682
4739
|
type: "button",
|
|
@@ -4688,7 +4745,7 @@ function AccountChoiceChip({
|
|
|
4688
4745
|
),
|
|
4689
4746
|
children: [
|
|
4690
4747
|
meta.icon,
|
|
4691
|
-
/* @__PURE__ */ (0,
|
|
4748
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: meta.shortLabel })
|
|
4692
4749
|
]
|
|
4693
4750
|
}
|
|
4694
4751
|
);
|
|
@@ -4737,8 +4794,8 @@ function NetworkInfoDisclosure({
|
|
|
4737
4794
|
}) {
|
|
4738
4795
|
const [open, setOpen] = (0, import_react13.useState)(false);
|
|
4739
4796
|
if (networks.length === 0) return null;
|
|
4740
|
-
return /* @__PURE__ */ (0,
|
|
4741
|
-
/* @__PURE__ */ (0,
|
|
4797
|
+
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: [
|
|
4798
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4742
4799
|
"button",
|
|
4743
4800
|
{
|
|
4744
4801
|
type: "button",
|
|
@@ -4746,24 +4803,24 @@ function NetworkInfoDisclosure({
|
|
|
4746
4803
|
"aria-expanded": open,
|
|
4747
4804
|
className: "flex w-full items-center gap-2 px-2.5 py-1.5 text-left transition-colors hover:bg-white/4",
|
|
4748
4805
|
children: [
|
|
4749
|
-
/* @__PURE__ */ (0,
|
|
4750
|
-
/* @__PURE__ */ (0,
|
|
4751
|
-
/* @__PURE__ */ (0,
|
|
4806
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon2, { name: "info", size: "xs", className: "text-white/40" }),
|
|
4807
|
+
/* @__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?" }),
|
|
4808
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Icon2, { name: open ? "expand_less" : "expand_more", size: "xs", className: "text-white/40" })
|
|
4752
4809
|
]
|
|
4753
4810
|
}
|
|
4754
4811
|
),
|
|
4755
|
-
open && /* @__PURE__ */ (0,
|
|
4812
|
+
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
4813
|
const info = NETWORK_INFO[network];
|
|
4757
4814
|
const cfg = NETWORK_CONFIG[network];
|
|
4758
|
-
return /* @__PURE__ */ (0,
|
|
4759
|
-
/* @__PURE__ */ (0,
|
|
4760
|
-
/* @__PURE__ */ (0,
|
|
4761
|
-
/* @__PURE__ */ (0,
|
|
4815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-1", children: [
|
|
4816
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
4817
|
+
/* @__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 }),
|
|
4818
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: cn("text-xxs font-bold uppercase tracking-widest", cfg.text), children: info.title })
|
|
4762
4819
|
] }),
|
|
4763
|
-
/* @__PURE__ */ (0,
|
|
4764
|
-
/* @__PURE__ */ (0,
|
|
4765
|
-
/* @__PURE__ */ (0,
|
|
4766
|
-
/* @__PURE__ */ (0,
|
|
4820
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "pl-5 text-tiny leading-snug text-muted-foreground", children: info.detail }),
|
|
4821
|
+
/* @__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: [
|
|
4822
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "mt-[1px] text-white/30", children: "-" }),
|
|
4823
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: bullet })
|
|
4767
4824
|
] }, bullet)) })
|
|
4768
4825
|
] }, network);
|
|
4769
4826
|
}) })
|
|
@@ -4777,7 +4834,7 @@ function MethodChoiceChip({
|
|
|
4777
4834
|
onClick
|
|
4778
4835
|
}) {
|
|
4779
4836
|
const meta = METHOD_META[method];
|
|
4780
|
-
return /* @__PURE__ */ (0,
|
|
4837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
4781
4838
|
"button",
|
|
4782
4839
|
{
|
|
4783
4840
|
type: "button",
|
|
@@ -4790,14 +4847,14 @@ function MethodChoiceChip({
|
|
|
4790
4847
|
),
|
|
4791
4848
|
children: [
|
|
4792
4849
|
meta.label,
|
|
4793
|
-
!enabled && disabledReason && /* @__PURE__ */ (0,
|
|
4850
|
+
!enabled && disabledReason && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xxs font-normal opacity-60", children: disabledReason })
|
|
4794
4851
|
]
|
|
4795
4852
|
}
|
|
4796
4853
|
);
|
|
4797
4854
|
}
|
|
4798
4855
|
|
|
4799
4856
|
// src/web/components/deposit-success-screen.tsx
|
|
4800
|
-
var
|
|
4857
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
4801
4858
|
function DepositSuccessScreen({
|
|
4802
4859
|
handleDone,
|
|
4803
4860
|
displayTicker,
|
|
@@ -4810,20 +4867,20 @@ function DepositSuccessScreen({
|
|
|
4810
4867
|
const isInstant = network === "lightning" || network === "spark";
|
|
4811
4868
|
const title = isInstant ? "Payment Received!" : "Deposit Detected!";
|
|
4812
4869
|
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,
|
|
4870
|
+
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: [
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative mb-8", children: [
|
|
4872
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "absolute inset-0 scale-150 animate-pulse rounded-full bg-primary/20 blur-2xl" }),
|
|
4873
|
+
/* @__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
4874
|
] }),
|
|
4818
|
-
/* @__PURE__ */ (0,
|
|
4819
|
-
/* @__PURE__ */ (0,
|
|
4820
|
-
/* @__PURE__ */ (0,
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4822
|
-
/* @__PURE__ */ (0,
|
|
4823
|
-
/* @__PURE__ */ (0,
|
|
4824
|
-
/* @__PURE__ */ (0,
|
|
4875
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h1", { className: "mb-2 text-2xl font-bold text-white", children: title }),
|
|
4876
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "mb-8 max-w-[260px] text-sm leading-relaxed text-muted-foreground", children: subtitle }),
|
|
4877
|
+
/* @__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: [
|
|
4878
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(AssetIcon, { ticker: displayTicker, size: 36 }),
|
|
4879
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-left", children: [
|
|
4880
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm font-bold text-white", children: displayTicker }),
|
|
4881
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-xs text-white/40", children: selectedAsset?.name ?? displayTicker })
|
|
4825
4882
|
] }),
|
|
4826
|
-
/* @__PURE__ */ (0,
|
|
4883
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
4827
4884
|
"div",
|
|
4828
4885
|
{
|
|
4829
4886
|
className: cn(
|
|
@@ -4834,27 +4891,27 @@ function DepositSuccessScreen({
|
|
|
4834
4891
|
),
|
|
4835
4892
|
children: [
|
|
4836
4893
|
net.icon,
|
|
4837
|
-
/* @__PURE__ */ (0,
|
|
4894
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: networkLabel })
|
|
4838
4895
|
]
|
|
4839
4896
|
}
|
|
4840
4897
|
)
|
|
4841
4898
|
] }),
|
|
4842
|
-
/* @__PURE__ */ (0,
|
|
4843
|
-
/* @__PURE__ */ (0,
|
|
4899
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Button, { variant: "cta", size: "cta", onClick: handleDone, children: [
|
|
4900
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "material-symbols-outlined text-icon-lg", children: "home" }),
|
|
4844
4901
|
"Back to Dashboard"
|
|
4845
4902
|
] })
|
|
4846
4903
|
] }) });
|
|
4847
4904
|
}
|
|
4848
4905
|
|
|
4849
4906
|
// src/web/components/deposit-network-default-modal.tsx
|
|
4850
|
-
var
|
|
4907
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
4851
4908
|
var NETWORK_OPTIONS = {
|
|
4852
4909
|
RGB: {
|
|
4853
4910
|
network: "onchain",
|
|
4854
4911
|
account: "RGB",
|
|
4855
4912
|
label: "On-chain / Lightning",
|
|
4856
4913
|
description: "Classic Bitcoin address or Lightning invoice via the RLN node.",
|
|
4857
|
-
icon: /* @__PURE__ */ (0,
|
|
4914
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "material-symbols-outlined text-icon-lg", children: "link" }),
|
|
4858
4915
|
accentBg: "bg-network-bitcoin/10",
|
|
4859
4916
|
accentBorder: "border-network-bitcoin/30",
|
|
4860
4917
|
accentText: "text-network-bitcoin"
|
|
@@ -4864,7 +4921,7 @@ var NETWORK_OPTIONS = {
|
|
|
4864
4921
|
account: "SPARK",
|
|
4865
4922
|
label: "Spark",
|
|
4866
4923
|
description: "Receive directly into your Spark account. Fast and free.",
|
|
4867
|
-
icon: /* @__PURE__ */ (0,
|
|
4924
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src: "/icons/spark/Asterisk/Spark Asterisk White.svg", alt: "", className: "h-[18px]" }),
|
|
4868
4925
|
accentBg: "bg-info/10",
|
|
4869
4926
|
accentBorder: "border-info/30",
|
|
4870
4927
|
accentText: "text-info"
|
|
@@ -4874,7 +4931,7 @@ var NETWORK_OPTIONS = {
|
|
|
4874
4931
|
account: "ARKADE",
|
|
4875
4932
|
label: "Arkade",
|
|
4876
4933
|
description: "Receive directly into your Arkade account. Low fees, near-instant settlement.",
|
|
4877
|
-
icon: /* @__PURE__ */ (0,
|
|
4934
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("img", { src: "/icons/arkade/arkade-icon.svg", alt: "", className: "h-[18px]" }),
|
|
4878
4935
|
accentBg: "bg-network-arkade/10",
|
|
4879
4936
|
accentBorder: "border-network-arkade/30",
|
|
4880
4937
|
accentText: "text-network-arkade"
|
|
@@ -4889,20 +4946,20 @@ function DepositNetworkDefaultModal({
|
|
|
4889
4946
|
}) {
|
|
4890
4947
|
if (!open) return null;
|
|
4891
4948
|
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,
|
|
4949
|
+
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: [
|
|
4950
|
+
/* @__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" }) }),
|
|
4951
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { children: [
|
|
4952
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm font-bold text-white", children: "Choose your default network" }),
|
|
4953
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "mt-0.5 text-tiny text-white/45", children: [
|
|
4897
4954
|
"Pick how you would like to receive",
|
|
4898
4955
|
" ",
|
|
4899
|
-
/* @__PURE__ */ (0,
|
|
4956
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "font-semibold text-muted-foreground", children: assetTicker }),
|
|
4900
4957
|
" by default. You can always switch in the deposit screen."
|
|
4901
4958
|
] })
|
|
4902
4959
|
] }),
|
|
4903
|
-
/* @__PURE__ */ (0,
|
|
4960
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "space-y-2", children: options.map((option) => {
|
|
4904
4961
|
const isSuggested = option.account === suggestedAccount;
|
|
4905
|
-
return /* @__PURE__ */ (0,
|
|
4962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
4906
4963
|
"button",
|
|
4907
4964
|
{
|
|
4908
4965
|
type: "button",
|
|
@@ -4912,7 +4969,7 @@ function DepositNetworkDefaultModal({
|
|
|
4912
4969
|
isSuggested ? cn("border-2", option.accentBorder, option.accentBg) : "border border-white/8 bg-white/4 hover:bg-white/8"
|
|
4913
4970
|
),
|
|
4914
4971
|
children: [
|
|
4915
|
-
/* @__PURE__ */ (0,
|
|
4972
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4916
4973
|
"div",
|
|
4917
4974
|
{
|
|
4918
4975
|
className: cn(
|
|
@@ -4923,10 +4980,10 @@ function DepositNetworkDefaultModal({
|
|
|
4923
4980
|
children: option.icon
|
|
4924
4981
|
}
|
|
4925
4982
|
),
|
|
4926
|
-
/* @__PURE__ */ (0,
|
|
4927
|
-
/* @__PURE__ */ (0,
|
|
4928
|
-
/* @__PURE__ */ (0,
|
|
4929
|
-
isSuggested && /* @__PURE__ */ (0,
|
|
4983
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
4984
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4985
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-xs font-bold", isSuggested ? option.accentText : "text-white"), children: option.label }),
|
|
4986
|
+
isSuggested && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4930
4987
|
"span",
|
|
4931
4988
|
{
|
|
4932
4989
|
className: cn(
|
|
@@ -4938,9 +4995,9 @@ function DepositNetworkDefaultModal({
|
|
|
4938
4995
|
}
|
|
4939
4996
|
)
|
|
4940
4997
|
] }),
|
|
4941
|
-
/* @__PURE__ */ (0,
|
|
4998
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "mt-0.5 text-xxs leading-snug text-white/45", children: option.description })
|
|
4942
4999
|
] }),
|
|
4943
|
-
/* @__PURE__ */ (0,
|
|
5000
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
4944
5001
|
"span",
|
|
4945
5002
|
{
|
|
4946
5003
|
className: cn(
|
|
@@ -4959,7 +5016,7 @@ function DepositNetworkDefaultModal({
|
|
|
4959
5016
|
}
|
|
4960
5017
|
|
|
4961
5018
|
// src/web/components/btc-unified-receive.tsx
|
|
4962
|
-
var
|
|
5019
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4963
5020
|
function BtcUnifiedReceive({
|
|
4964
5021
|
btcSelectedAccount,
|
|
4965
5022
|
accountReceiveResult,
|
|
@@ -4980,10 +5037,10 @@ function BtcUnifiedReceive({
|
|
|
4980
5037
|
}) {
|
|
4981
5038
|
const accountNetwork = btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain";
|
|
4982
5039
|
const qrNetwork = NETWORK_CONFIG[accountNetwork];
|
|
4983
|
-
return /* @__PURE__ */ (0,
|
|
4984
|
-
/* @__PURE__ */ (0,
|
|
4985
|
-
/* @__PURE__ */ (0,
|
|
4986
|
-
/* @__PURE__ */ (0,
|
|
5040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
|
|
5041
|
+
/* @__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: [
|
|
5042
|
+
/* @__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)" }) }),
|
|
5043
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4987
5044
|
"input",
|
|
4988
5045
|
{
|
|
4989
5046
|
type: "text",
|
|
@@ -4994,13 +5051,13 @@ function BtcUnifiedReceive({
|
|
|
4994
5051
|
inputMode: "decimal"
|
|
4995
5052
|
}
|
|
4996
5053
|
),
|
|
4997
|
-
amount && loading && /* @__PURE__ */ (0,
|
|
4998
|
-
/* @__PURE__ */ (0,
|
|
5054
|
+
amount && loading && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("p", { className: "flex items-center gap-1 text-xxs text-warning/70", children: [
|
|
5055
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
|
|
4999
5056
|
"Updating invoice..."
|
|
5000
5057
|
] })
|
|
5001
5058
|
] }),
|
|
5002
|
-
/* @__PURE__ */ (0,
|
|
5003
|
-
/* @__PURE__ */ (0,
|
|
5059
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
5060
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5004
5061
|
"div",
|
|
5005
5062
|
{
|
|
5006
5063
|
className: cn(
|
|
@@ -5009,12 +5066,12 @@ function BtcUnifiedReceive({
|
|
|
5009
5066
|
),
|
|
5010
5067
|
style: qrNetwork.qrGlow,
|
|
5011
5068
|
children: [
|
|
5012
|
-
/* @__PURE__ */ (0,
|
|
5013
|
-
isInvoicePaid && /* @__PURE__ */ (0,
|
|
5069
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QrCode, { value: accountReceiveResult.qrValue, size: 200 }),
|
|
5070
|
+
isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PaidOverlay, {})
|
|
5014
5071
|
]
|
|
5015
5072
|
}
|
|
5016
5073
|
),
|
|
5017
|
-
/* @__PURE__ */ (0,
|
|
5074
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5018
5075
|
"button",
|
|
5019
5076
|
{
|
|
5020
5077
|
type: "button",
|
|
@@ -5027,13 +5084,13 @@ function BtcUnifiedReceive({
|
|
|
5027
5084
|
void copyToClipboard(accountReceiveResult.qrValue);
|
|
5028
5085
|
},
|
|
5029
5086
|
children: [
|
|
5030
|
-
/* @__PURE__ */ (0,
|
|
5087
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon2, { name: copied ? "check" : "content_copy", size: "xs" }),
|
|
5031
5088
|
copied ? "Copied" : `Copy ${accountReceiveResult.qrLabel}`
|
|
5032
5089
|
]
|
|
5033
5090
|
}
|
|
5034
5091
|
)
|
|
5035
5092
|
] }),
|
|
5036
|
-
invoiceStatus && /* @__PURE__ */ (0,
|
|
5093
|
+
invoiceStatus && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5037
5094
|
InvoiceStatusBanner,
|
|
5038
5095
|
{
|
|
5039
5096
|
isInvoicePending,
|
|
@@ -5042,11 +5099,11 @@ function BtcUnifiedReceive({
|
|
|
5042
5099
|
invoiceStatus
|
|
5043
5100
|
}
|
|
5044
5101
|
),
|
|
5045
|
-
/* @__PURE__ */ (0,
|
|
5046
|
-
/* @__PURE__ */ (0,
|
|
5102
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "space-y-1.5", children: [
|
|
5103
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/30", children: "Available Addresses" }),
|
|
5047
5104
|
accountReceiveResult.addresses.map((address) => {
|
|
5048
5105
|
const network = NETWORK_CONFIG[address.network];
|
|
5049
|
-
return /* @__PURE__ */ (0,
|
|
5106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5050
5107
|
"div",
|
|
5051
5108
|
{
|
|
5052
5109
|
className: cn(
|
|
@@ -5057,19 +5114,19 @@ function BtcUnifiedReceive({
|
|
|
5057
5114
|
style: { borderLeftWidth: 3, borderLeftColor: network.color },
|
|
5058
5115
|
onClick: () => void copyToClipboard(address.value),
|
|
5059
5116
|
children: [
|
|
5060
|
-
/* @__PURE__ */ (0,
|
|
5061
|
-
/* @__PURE__ */ (0,
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5063
|
-
/* @__PURE__ */ (0,
|
|
5117
|
+
/* @__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 }),
|
|
5118
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5119
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: cn("text-xxs font-bold uppercase tracking-widest", network.text), children: address.label }),
|
|
5120
|
+
/* @__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
5121
|
] }),
|
|
5065
|
-
/* @__PURE__ */ (0,
|
|
5122
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CopyIcon, { copied })
|
|
5066
5123
|
]
|
|
5067
5124
|
},
|
|
5068
5125
|
address.network
|
|
5069
5126
|
);
|
|
5070
5127
|
})
|
|
5071
5128
|
] }),
|
|
5072
|
-
/* @__PURE__ */ (0,
|
|
5129
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
5073
5130
|
NetworkInfoDisclosure,
|
|
5074
5131
|
{
|
|
5075
5132
|
networks: Array.from(
|
|
@@ -5077,8 +5134,8 @@ function BtcUnifiedReceive({
|
|
|
5077
5134
|
)
|
|
5078
5135
|
}
|
|
5079
5136
|
),
|
|
5080
|
-
/* @__PURE__ */ (0,
|
|
5081
|
-
/* @__PURE__ */ (0,
|
|
5137
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex gap-2.5 pt-1", children: [
|
|
5138
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
5082
5139
|
"button",
|
|
5083
5140
|
{
|
|
5084
5141
|
type: "button",
|
|
@@ -5090,13 +5147,13 @@ function BtcUnifiedReceive({
|
|
|
5090
5147
|
},
|
|
5091
5148
|
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
5149
|
children: [
|
|
5093
|
-
/* @__PURE__ */ (0,
|
|
5150
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "refresh" }),
|
|
5094
5151
|
"New Address"
|
|
5095
5152
|
]
|
|
5096
5153
|
}
|
|
5097
5154
|
),
|
|
5098
|
-
/* @__PURE__ */ (0,
|
|
5099
|
-
/* @__PURE__ */ (0,
|
|
5155
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Button, { variant: "cta", onClick: handleDone, children: [
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "check" }),
|
|
5100
5157
|
"Done"
|
|
5101
5158
|
] })
|
|
5102
5159
|
] })
|
|
@@ -5104,7 +5161,7 @@ function BtcUnifiedReceive({
|
|
|
5104
5161
|
}
|
|
5105
5162
|
|
|
5106
5163
|
// src/web/components/deposit-generated-view.tsx
|
|
5107
|
-
var
|
|
5164
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5108
5165
|
function parseAssetAmount(amountString, asset) {
|
|
5109
5166
|
const value = Number(amountString);
|
|
5110
5167
|
if (!Number.isFinite(value)) return 0;
|
|
@@ -5143,10 +5200,10 @@ function DepositGeneratedView({
|
|
|
5143
5200
|
setInvoiceStatus,
|
|
5144
5201
|
handleDone
|
|
5145
5202
|
}) {
|
|
5146
|
-
return /* @__PURE__ */ (0,
|
|
5147
|
-
(network === "lightning" || network === "arkade" && arkSubMode === "ark") && isBtc && /* @__PURE__ */ (0,
|
|
5148
|
-
/* @__PURE__ */ (0,
|
|
5149
|
-
/* @__PURE__ */ (0,
|
|
5203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-3 animate-in fade-in zoom-in-95 duration-300", children: [
|
|
5204
|
+
(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: [
|
|
5205
|
+
/* @__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)" }) }),
|
|
5206
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5150
5207
|
"input",
|
|
5151
5208
|
{
|
|
5152
5209
|
type: "text",
|
|
@@ -5157,16 +5214,16 @@ function DepositGeneratedView({
|
|
|
5157
5214
|
inputMode: "decimal"
|
|
5158
5215
|
}
|
|
5159
5216
|
),
|
|
5160
|
-
amount && /* @__PURE__ */ (0,
|
|
5161
|
-
/* @__PURE__ */ (0,
|
|
5217
|
+
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: [
|
|
5218
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
|
|
5162
5219
|
"Updating ",
|
|
5163
5220
|
network === "arkade" ? "URI" : "invoice",
|
|
5164
5221
|
"..."
|
|
5165
5222
|
] }) : network === "arkade" ? `Unified URI for ${amount} ${getUnitLabel()}` : `Invoice for ${amount} ${getUnitLabel()}` })
|
|
5166
5223
|
] }),
|
|
5167
|
-
network === "lightning" && !isBtc && /* @__PURE__ */ (0,
|
|
5168
|
-
/* @__PURE__ */ (0,
|
|
5169
|
-
/* @__PURE__ */ (0,
|
|
5224
|
+
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: [
|
|
5225
|
+
/* @__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)" }) }),
|
|
5226
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5170
5227
|
"input",
|
|
5171
5228
|
{
|
|
5172
5229
|
type: "text",
|
|
@@ -5177,19 +5234,19 @@ function DepositGeneratedView({
|
|
|
5177
5234
|
inputMode: "decimal"
|
|
5178
5235
|
}
|
|
5179
5236
|
),
|
|
5180
|
-
amount && /* @__PURE__ */ (0,
|
|
5181
|
-
/* @__PURE__ */ (0,
|
|
5237
|
+
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: [
|
|
5238
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-xxs", children: "progress_activity" }),
|
|
5182
5239
|
"Updating invoice..."
|
|
5183
5240
|
] }) : `Invoice for ${amount} ${getUnitLabel()}` }),
|
|
5184
|
-
amount && maxDepositAmount > 0 && parseAssetAmount(amount, selectedAsset) > maxDepositAmount && /* @__PURE__ */ (0,
|
|
5241
|
+
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
5242
|
"Exceeds max: ",
|
|
5186
5243
|
formatAssetAmount(maxDepositAmount, selectedAsset),
|
|
5187
5244
|
" ",
|
|
5188
5245
|
getUnitLabel()
|
|
5189
5246
|
] })
|
|
5190
5247
|
] }),
|
|
5191
|
-
/* @__PURE__ */ (0,
|
|
5192
|
-
/* @__PURE__ */ (0,
|
|
5248
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col items-center gap-3", children: [
|
|
5249
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5193
5250
|
"div",
|
|
5194
5251
|
{
|
|
5195
5252
|
className: cn(
|
|
@@ -5198,7 +5255,7 @@ function DepositGeneratedView({
|
|
|
5198
5255
|
),
|
|
5199
5256
|
style: net.qrGlow,
|
|
5200
5257
|
children: [
|
|
5201
|
-
network !== "spark" && network !== "arkade" && /* @__PURE__ */ (0,
|
|
5258
|
+
network !== "spark" && network !== "arkade" && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5202
5259
|
"div",
|
|
5203
5260
|
{
|
|
5204
5261
|
className: cn(
|
|
@@ -5208,16 +5265,16 @@ function DepositGeneratedView({
|
|
|
5208
5265
|
),
|
|
5209
5266
|
children: [
|
|
5210
5267
|
net.icon,
|
|
5211
|
-
/* @__PURE__ */ (0,
|
|
5268
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: net.label })
|
|
5212
5269
|
]
|
|
5213
5270
|
}
|
|
5214
5271
|
),
|
|
5215
|
-
/* @__PURE__ */ (0,
|
|
5216
|
-
isInvoicePaid && /* @__PURE__ */ (0,
|
|
5272
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(QrCode, { value: address, size: 188 }),
|
|
5273
|
+
isInvoicePaid && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(PaidOverlay, {})
|
|
5217
5274
|
]
|
|
5218
5275
|
}
|
|
5219
5276
|
),
|
|
5220
|
-
/* @__PURE__ */ (0,
|
|
5277
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5221
5278
|
"button",
|
|
5222
5279
|
{
|
|
5223
5280
|
type: "button",
|
|
@@ -5230,13 +5287,13 @@ function DepositGeneratedView({
|
|
|
5230
5287
|
void copyToClipboard(address);
|
|
5231
5288
|
},
|
|
5232
5289
|
children: [
|
|
5233
|
-
/* @__PURE__ */ (0,
|
|
5290
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon2, { name: copied ? "check" : "content_copy", size: "xs" }),
|
|
5234
5291
|
copied ? "Copied" : network === "lightning" ? "Copy Invoice" : "Copy Address"
|
|
5235
5292
|
]
|
|
5236
5293
|
}
|
|
5237
5294
|
)
|
|
5238
5295
|
] }),
|
|
5239
|
-
network === "lightning" && invoiceStatus && /* @__PURE__ */ (0,
|
|
5296
|
+
network === "lightning" && invoiceStatus && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5240
5297
|
InvoiceStatusBanner,
|
|
5241
5298
|
{
|
|
5242
5299
|
isInvoicePending,
|
|
@@ -5245,7 +5302,7 @@ function DepositGeneratedView({
|
|
|
5245
5302
|
invoiceStatus
|
|
5246
5303
|
}
|
|
5247
5304
|
),
|
|
5248
|
-
/* @__PURE__ */ (0,
|
|
5305
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5249
5306
|
"div",
|
|
5250
5307
|
{
|
|
5251
5308
|
"data-testid": "deposit-generated-address",
|
|
@@ -5258,16 +5315,16 @@ function DepositGeneratedView({
|
|
|
5258
5315
|
style: { borderLeftWidth: 3, borderLeftColor: net.color },
|
|
5259
5316
|
onClick: () => void copyToClipboard(address),
|
|
5260
5317
|
children: [
|
|
5261
|
-
/* @__PURE__ */ (0,
|
|
5262
|
-
/* @__PURE__ */ (0,
|
|
5263
|
-
/* @__PURE__ */ (0,
|
|
5264
|
-
/* @__PURE__ */ (0,
|
|
5318
|
+
/* @__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 }),
|
|
5319
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5320
|
+
/* @__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 }) }),
|
|
5321
|
+
/* @__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
5322
|
] }),
|
|
5266
|
-
/* @__PURE__ */ (0,
|
|
5323
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CopyIcon, { copied })
|
|
5267
5324
|
]
|
|
5268
5325
|
}
|
|
5269
5326
|
),
|
|
5270
|
-
recipientId && /* @__PURE__ */ (0,
|
|
5327
|
+
recipientId && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5271
5328
|
"div",
|
|
5272
5329
|
{
|
|
5273
5330
|
className: cn(
|
|
@@ -5277,23 +5334,23 @@ function DepositGeneratedView({
|
|
|
5277
5334
|
style: { borderLeftWidth: 3, borderLeftColor: "var(--primary)" },
|
|
5278
5335
|
onClick: () => void copyToClipboard(recipientId),
|
|
5279
5336
|
children: [
|
|
5280
|
-
/* @__PURE__ */ (0,
|
|
5281
|
-
/* @__PURE__ */ (0,
|
|
5282
|
-
/* @__PURE__ */ (0,
|
|
5283
|
-
/* @__PURE__ */ (0,
|
|
5337
|
+
/* @__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" }) }),
|
|
5338
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5339
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-primary", children: "Recipient ID" }),
|
|
5340
|
+
/* @__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
5341
|
] }),
|
|
5285
|
-
/* @__PURE__ */ (0,
|
|
5342
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CopyIcon, { copied })
|
|
5286
5343
|
]
|
|
5287
5344
|
}
|
|
5288
5345
|
),
|
|
5289
|
-
/* @__PURE__ */ (0,
|
|
5346
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
5290
5347
|
NetworkInfoDisclosure,
|
|
5291
5348
|
{
|
|
5292
5349
|
networks: network === "arkade" ? arkSubMode === "boarding" ? ["onchain", "arkade"] : ["arkade"] : [network]
|
|
5293
5350
|
}
|
|
5294
5351
|
),
|
|
5295
|
-
/* @__PURE__ */ (0,
|
|
5296
|
-
/* @__PURE__ */ (0,
|
|
5352
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex gap-2.5 pt-1", children: [
|
|
5353
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5297
5354
|
"button",
|
|
5298
5355
|
{
|
|
5299
5356
|
type: "button",
|
|
@@ -5305,14 +5362,14 @@ function DepositGeneratedView({
|
|
|
5305
5362
|
},
|
|
5306
5363
|
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
5364
|
children: [
|
|
5308
|
-
/* @__PURE__ */ (0,
|
|
5365
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "refresh" }),
|
|
5309
5366
|
"New ",
|
|
5310
5367
|
network === "lightning" ? "Invoice" : "Address"
|
|
5311
5368
|
]
|
|
5312
5369
|
}
|
|
5313
5370
|
),
|
|
5314
|
-
/* @__PURE__ */ (0,
|
|
5315
|
-
/* @__PURE__ */ (0,
|
|
5371
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Button, { variant: "cta", onClick: handleDone, children: [
|
|
5372
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "material-symbols-outlined text-icon-sm", children: "check" }),
|
|
5316
5373
|
"Done"
|
|
5317
5374
|
] })
|
|
5318
5375
|
] })
|
|
@@ -5320,7 +5377,7 @@ function DepositGeneratedView({
|
|
|
5320
5377
|
}
|
|
5321
5378
|
|
|
5322
5379
|
// src/web/components/deposit-pre-generation.tsx
|
|
5323
|
-
var
|
|
5380
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5324
5381
|
var ACCOUNT_TITLES = {
|
|
5325
5382
|
RGB: "RGB & Lightning",
|
|
5326
5383
|
SPARK: "Spark",
|
|
@@ -5357,62 +5414,62 @@ function DepositPreGeneration({
|
|
|
5357
5414
|
generateInvoice
|
|
5358
5415
|
}) {
|
|
5359
5416
|
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,
|
|
5417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-3", children: [
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "rounded-2xl border border-white/8 bg-white/4 p-3", children: [
|
|
5419
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Receive Summary" }),
|
|
5420
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mt-2 grid grid-cols-1 gap-2 text-xs", children: [
|
|
5421
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5422
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-white/45", children: "Asset" }),
|
|
5423
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "font-bold text-white", children: selectedAsset?.ticker ?? (isBtc ? "BTC" : "Asset") })
|
|
5367
5424
|
] }),
|
|
5368
|
-
/* @__PURE__ */ (0,
|
|
5369
|
-
/* @__PURE__ */ (0,
|
|
5370
|
-
/* @__PURE__ */ (0,
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-white/45", children: "Destination account" }),
|
|
5427
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "font-bold text-white", children: ACCOUNT_TITLES[selectedAccount] })
|
|
5371
5428
|
] }),
|
|
5372
|
-
/* @__PURE__ */ (0,
|
|
5373
|
-
/* @__PURE__ */ (0,
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5429
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5430
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-white/45", children: "Transfer method" }),
|
|
5431
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "font-bold text-white", children: method.label })
|
|
5375
5432
|
] }),
|
|
5376
|
-
/* @__PURE__ */ (0,
|
|
5433
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-tiny text-white/35", children: method.summary })
|
|
5377
5434
|
] })
|
|
5378
5435
|
] }),
|
|
5379
|
-
channelsLoading && selectedAccount === "RGB" && currentMethod === "lightning" && !isBtc && /* @__PURE__ */ (0,
|
|
5380
|
-
/* @__PURE__ */ (0,
|
|
5381
|
-
/* @__PURE__ */ (0,
|
|
5436
|
+
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: [
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-lg text-primary", children: "progress_activity" }),
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-xs font-medium text-white/60", children: "Checking channel availability..." })
|
|
5382
5439
|
] }),
|
|
5383
|
-
showChannelWarning && /* @__PURE__ */ (0,
|
|
5384
|
-
/* @__PURE__ */ (0,
|
|
5385
|
-
/* @__PURE__ */ (0,
|
|
5440
|
+
showChannelWarning && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(AlertBanner, { variant: "warning", children: [
|
|
5441
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "No Lightning Channels" }),
|
|
5442
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-tiny text-warning/70", children: "Only on-chain deposits are available." })
|
|
5386
5443
|
] }),
|
|
5387
|
-
showLiquidityWarning && /* @__PURE__ */ (0,
|
|
5388
|
-
/* @__PURE__ */ (0,
|
|
5389
|
-
/* @__PURE__ */ (0,
|
|
5444
|
+
showLiquidityWarning && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(AlertBanner, { variant: "warning", children: [
|
|
5445
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "mb-0.5 text-xs font-bold text-warning", children: "No Inbound Liquidity" }),
|
|
5446
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-tiny text-warning/70", children: [
|
|
5390
5447
|
"No channels with inbound capacity for ",
|
|
5391
5448
|
selectedAsset?.ticker ?? "this asset",
|
|
5392
5449
|
"."
|
|
5393
5450
|
] })
|
|
5394
5451
|
] }),
|
|
5395
|
-
isAutoGenerate && loading && /* @__PURE__ */ (0,
|
|
5396
|
-
/* @__PURE__ */ (0,
|
|
5397
|
-
/* @__PURE__ */ (0,
|
|
5398
|
-
/* @__PURE__ */ (0,
|
|
5452
|
+
isAutoGenerate && loading && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col items-center gap-4 py-10", children: [
|
|
5453
|
+
/* @__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" }) }),
|
|
5454
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-1 text-center", children: [
|
|
5455
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-sm font-bold text-muted-foreground", children: [
|
|
5399
5456
|
"Generating ",
|
|
5400
5457
|
network === "lightning" ? "invoice" : "address",
|
|
5401
5458
|
"..."
|
|
5402
5459
|
] }),
|
|
5403
|
-
/* @__PURE__ */ (0,
|
|
5460
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("p", { className: "text-xs text-white/30", children: [
|
|
5404
5461
|
net.label,
|
|
5405
5462
|
" network"
|
|
5406
5463
|
] })
|
|
5407
5464
|
] })
|
|
5408
5465
|
] }),
|
|
5409
|
-
network === "onchain" && !isBtc && /* @__PURE__ */ (0,
|
|
5410
|
-
/* @__PURE__ */ (0,
|
|
5411
|
-
/* @__PURE__ */ (0,
|
|
5412
|
-
/* @__PURE__ */ (0,
|
|
5413
|
-
/* @__PURE__ */ (0,
|
|
5466
|
+
network === "onchain" && !isBtc && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-2 rounded-xl border bg-card p-3", children: [
|
|
5467
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5468
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5469
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h4", { className: "text-xs font-bold text-white", children: "Receive with Privacy" }),
|
|
5470
|
+
/* @__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
5471
|
] }),
|
|
5415
|
-
/* @__PURE__ */ (0,
|
|
5472
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5416
5473
|
"button",
|
|
5417
5474
|
{
|
|
5418
5475
|
type: "button",
|
|
@@ -5421,7 +5478,7 @@ function DepositPreGeneration({
|
|
|
5421
5478
|
usePrivacy ? "bg-primary" : "bg-white/10"
|
|
5422
5479
|
),
|
|
5423
5480
|
onClick: () => setUsePrivacy(!usePrivacy),
|
|
5424
|
-
children: /* @__PURE__ */ (0,
|
|
5481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5425
5482
|
"span",
|
|
5426
5483
|
{
|
|
5427
5484
|
className: cn(
|
|
@@ -5433,21 +5490,21 @@ function DepositPreGeneration({
|
|
|
5433
5490
|
}
|
|
5434
5491
|
)
|
|
5435
5492
|
] }),
|
|
5436
|
-
!usePrivacy && /* @__PURE__ */ (0,
|
|
5493
|
+
!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
5494
|
] }),
|
|
5438
|
-
network === "onchain" && !isBtc && /* @__PURE__ */ (0,
|
|
5439
|
-
/* @__PURE__ */ (0,
|
|
5440
|
-
/* @__PURE__ */ (0,
|
|
5495
|
+
network === "onchain" && !isBtc && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "space-y-1.5", children: [
|
|
5496
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
5497
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("label", { className: "text-xxs font-bold uppercase tracking-widest text-white/40", children: [
|
|
5441
5498
|
"Amount (",
|
|
5442
5499
|
getUnitLabel(),
|
|
5443
5500
|
") - Optional"
|
|
5444
5501
|
] }),
|
|
5445
|
-
selectedAsset && /* @__PURE__ */ (0,
|
|
5502
|
+
selectedAsset && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "text-xxs text-white/30", children: [
|
|
5446
5503
|
selectedAsset.precision ?? 0,
|
|
5447
5504
|
" decimals"
|
|
5448
5505
|
] })
|
|
5449
5506
|
] }),
|
|
5450
|
-
/* @__PURE__ */ (0,
|
|
5507
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
5451
5508
|
"input",
|
|
5452
5509
|
{
|
|
5453
5510
|
type: "text",
|
|
@@ -5459,20 +5516,20 @@ function DepositPreGeneration({
|
|
|
5459
5516
|
}
|
|
5460
5517
|
)
|
|
5461
5518
|
] }),
|
|
5462
|
-
!isAutoGenerate && /* @__PURE__ */ (0,
|
|
5463
|
-
/* @__PURE__ */ (0,
|
|
5519
|
+
!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: [
|
|
5520
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined animate-spin text-icon-md", children: "progress_activity" }),
|
|
5464
5521
|
"Generating..."
|
|
5465
|
-
] }) : /* @__PURE__ */ (0,
|
|
5466
|
-
/* @__PURE__ */ (0,
|
|
5522
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex items-center justify-center gap-2", children: [
|
|
5523
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "material-symbols-outlined text-icon-md", children: "qr_code_2" }),
|
|
5467
5524
|
"Generate Address"
|
|
5468
5525
|
] }) })
|
|
5469
5526
|
] });
|
|
5470
5527
|
}
|
|
5471
5528
|
|
|
5472
5529
|
// src/web/components/deposit-asset-selection.tsx
|
|
5473
|
-
var
|
|
5530
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5474
5531
|
function NetBadge({ icon, className }) {
|
|
5475
|
-
return /* @__PURE__ */ (0,
|
|
5532
|
+
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
5533
|
}
|
|
5477
5534
|
function DepositAssetSelection({
|
|
5478
5535
|
setCurrentView,
|
|
@@ -5513,24 +5570,24 @@ function DepositAssetSelection({
|
|
|
5513
5570
|
enabled: isArkadeConnected
|
|
5514
5571
|
}
|
|
5515
5572
|
].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,
|
|
5573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex h-screen flex-col overflow-hidden bg-background font-display text-foreground", children: [
|
|
5574
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PageHeader, { title: "Deposit", onBack: () => setCurrentView("dashboard") }),
|
|
5575
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-shrink-0 space-y-2 px-5 pb-3 pt-4", children: [
|
|
5576
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5577
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5578
|
+
/* @__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" }) }),
|
|
5579
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-xs font-bold tracking-wide text-primary", children: "Select Asset" })
|
|
5523
5580
|
] }),
|
|
5524
|
-
/* @__PURE__ */ (0,
|
|
5525
|
-
/* @__PURE__ */ (0,
|
|
5526
|
-
/* @__PURE__ */ (0,
|
|
5527
|
-
/* @__PURE__ */ (0,
|
|
5581
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mx-1 h-px flex-1 bg-white/10" }),
|
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
5583
|
+
/* @__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" }) }),
|
|
5584
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "text-xs font-bold tracking-wide text-white/30", children: "Receive" })
|
|
5528
5585
|
] })
|
|
5529
5586
|
] }),
|
|
5530
|
-
/* @__PURE__ */ (0,
|
|
5587
|
+
/* @__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
5588
|
] }),
|
|
5532
|
-
/* @__PURE__ */ (0,
|
|
5533
|
-
/* @__PURE__ */ (0,
|
|
5589
|
+
/* @__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: [
|
|
5590
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5534
5591
|
Icon2,
|
|
5535
5592
|
{
|
|
5536
5593
|
name: "search",
|
|
@@ -5538,7 +5595,7 @@ function DepositAssetSelection({
|
|
|
5538
5595
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-white/30"
|
|
5539
5596
|
}
|
|
5540
5597
|
),
|
|
5541
|
-
/* @__PURE__ */ (0,
|
|
5598
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5542
5599
|
"input",
|
|
5543
5600
|
{
|
|
5544
5601
|
autoFocus: true,
|
|
@@ -5551,8 +5608,8 @@ function DepositAssetSelection({
|
|
|
5551
5608
|
}
|
|
5552
5609
|
)
|
|
5553
5610
|
] }) }),
|
|
5554
|
-
/* @__PURE__ */ (0,
|
|
5555
|
-
btcAsset && /* @__PURE__ */ (0,
|
|
5611
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ScrollArea, { className: "min-h-0 flex-1", viewportClassName: "space-y-1.5 px-5 pb-3", children: [
|
|
5612
|
+
btcAsset && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5556
5613
|
"button",
|
|
5557
5614
|
{
|
|
5558
5615
|
type: "button",
|
|
@@ -5560,104 +5617,104 @@ function DepositAssetSelection({
|
|
|
5560
5617
|
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
5618
|
onClick: () => onSelectAsset(btcAsset),
|
|
5562
5619
|
children: [
|
|
5563
|
-
/* @__PURE__ */ (0,
|
|
5564
|
-
/* @__PURE__ */ (0,
|
|
5565
|
-
/* @__PURE__ */ (0,
|
|
5566
|
-
/* @__PURE__ */ (0,
|
|
5620
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssetIcon, { ticker: "BTC", size: 40 }),
|
|
5621
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
5622
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: "Bitcoin" }),
|
|
5623
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-0.5 text-xs text-white/40", children: "Choose destination account next" })
|
|
5567
5624
|
] }),
|
|
5568
|
-
/* @__PURE__ */ (0,
|
|
5569
|
-
/* @__PURE__ */ (0,
|
|
5625
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-shrink-0 gap-1", children: [
|
|
5626
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5570
5627
|
NetBadge,
|
|
5571
5628
|
{
|
|
5572
5629
|
className: "border-network-bitcoin/20 bg-network-bitcoin/15",
|
|
5573
|
-
icon: /* @__PURE__ */ (0,
|
|
5630
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined leading-none text-network-bitcoin", style: { fontSize: 10 }, children: "link" })
|
|
5574
5631
|
}
|
|
5575
5632
|
),
|
|
5576
|
-
/* @__PURE__ */ (0,
|
|
5633
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5577
5634
|
NetBadge,
|
|
5578
5635
|
{
|
|
5579
5636
|
className: "border-warning/20 bg-warning/15",
|
|
5580
|
-
icon: /* @__PURE__ */ (0,
|
|
5637
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: "/icons/lightning/lightning.svg", className: "h-2.5 w-2.5", alt: "" })
|
|
5581
5638
|
}
|
|
5582
5639
|
),
|
|
5583
|
-
isSparkConnected && /* @__PURE__ */ (0,
|
|
5640
|
+
isSparkConnected && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5584
5641
|
NetBadge,
|
|
5585
5642
|
{
|
|
5586
5643
|
className: "border-info/20 bg-info/15",
|
|
5587
|
-
icon: /* @__PURE__ */ (0,
|
|
5644
|
+
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
5645
|
}
|
|
5589
5646
|
),
|
|
5590
|
-
isArkadeConnected && /* @__PURE__ */ (0,
|
|
5647
|
+
isArkadeConnected && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5591
5648
|
NetBadge,
|
|
5592
5649
|
{
|
|
5593
5650
|
className: "border-network-arkade/20 bg-network-arkade/15",
|
|
5594
|
-
icon: /* @__PURE__ */ (0,
|
|
5651
|
+
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
5652
|
}
|
|
5596
5653
|
)
|
|
5597
5654
|
] }),
|
|
5598
|
-
/* @__PURE__ */ (0,
|
|
5655
|
+
/* @__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
5656
|
]
|
|
5600
5657
|
}
|
|
5601
5658
|
),
|
|
5602
|
-
noResults ? /* @__PURE__ */ (0,
|
|
5659
|
+
noResults ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "py-8 text-center text-sm text-white/30", children: [
|
|
5603
5660
|
'No assets match "',
|
|
5604
5661
|
searchQuery,
|
|
5605
5662
|
'"'
|
|
5606
|
-
] }) : rgbAssets.map((asset) => /* @__PURE__ */ (0,
|
|
5663
|
+
] }) : rgbAssets.map((asset) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5607
5664
|
"button",
|
|
5608
5665
|
{
|
|
5609
5666
|
type: "button",
|
|
5610
5667
|
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
5668
|
onClick: () => onSelectAsset(asset),
|
|
5612
5669
|
children: [
|
|
5613
|
-
/* @__PURE__ */ (0,
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5615
|
-
/* @__PURE__ */ (0,
|
|
5670
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative flex-shrink-0", children: [
|
|
5671
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssetIcon, { ticker: asset.ticker, size: 40 }),
|
|
5672
|
+
/* @__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
5673
|
] }),
|
|
5617
|
-
/* @__PURE__ */ (0,
|
|
5618
|
-
/* @__PURE__ */ (0,
|
|
5619
|
-
/* @__PURE__ */ (0,
|
|
5674
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
5675
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: asset.ticker }),
|
|
5676
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-0.5 truncate text-xs text-white/40", children: asset.name ?? "RGB Asset" })
|
|
5620
5677
|
] }),
|
|
5621
|
-
/* @__PURE__ */ (0,
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5678
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-shrink-0 gap-1", children: [
|
|
5679
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5623
5680
|
NetBadge,
|
|
5624
5681
|
{
|
|
5625
5682
|
className: "border-network-bitcoin/20 bg-network-bitcoin/15",
|
|
5626
|
-
icon: /* @__PURE__ */ (0,
|
|
5683
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined leading-none text-network-bitcoin", style: { fontSize: 10 }, children: "link" })
|
|
5627
5684
|
}
|
|
5628
5685
|
),
|
|
5629
|
-
/* @__PURE__ */ (0,
|
|
5686
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5630
5687
|
NetBadge,
|
|
5631
5688
|
{
|
|
5632
5689
|
className: "border-warning/20 bg-warning/15",
|
|
5633
|
-
icon: /* @__PURE__ */ (0,
|
|
5690
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("img", { src: "/icons/lightning/lightning.svg", className: "h-2.5 w-2.5", alt: "" })
|
|
5634
5691
|
}
|
|
5635
5692
|
)
|
|
5636
5693
|
] }),
|
|
5637
|
-
/* @__PURE__ */ (0,
|
|
5694
|
+
/* @__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
5695
|
]
|
|
5639
5696
|
},
|
|
5640
5697
|
asset.asset_id
|
|
5641
5698
|
)),
|
|
5642
|
-
!searchQuery && /* @__PURE__ */ (0,
|
|
5699
|
+
!searchQuery && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "pb-1 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5643
5700
|
"button",
|
|
5644
5701
|
{
|
|
5645
5702
|
type: "button",
|
|
5646
5703
|
onClick: () => setCurrentView("bridge"),
|
|
5647
5704
|
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
5705
|
children: [
|
|
5649
|
-
/* @__PURE__ */ (0,
|
|
5650
|
-
/* @__PURE__ */ (0,
|
|
5651
|
-
/* @__PURE__ */ (0,
|
|
5652
|
-
/* @__PURE__ */ (0,
|
|
5706
|
+
/* @__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" }) }),
|
|
5707
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex-1 text-left", children: [
|
|
5708
|
+
/* @__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" }),
|
|
5709
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xxs leading-tight text-white/40", children: "USDC, USDT, ETH, SOL via Flashnet" })
|
|
5653
5710
|
] }),
|
|
5654
|
-
/* @__PURE__ */ (0,
|
|
5711
|
+
/* @__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
5712
|
]
|
|
5656
5713
|
}
|
|
5657
5714
|
) }),
|
|
5658
|
-
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */ (0,
|
|
5659
|
-
/* @__PURE__ */ (0,
|
|
5660
|
-
/* @__PURE__ */ (0,
|
|
5715
|
+
!searchQuery && newAssetOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "space-y-2 pt-2", children: [
|
|
5716
|
+
/* @__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" }) }),
|
|
5717
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5661
5718
|
"div",
|
|
5662
5719
|
{
|
|
5663
5720
|
className: cn(
|
|
@@ -5666,7 +5723,7 @@ function DepositAssetSelection({
|
|
|
5666
5723
|
),
|
|
5667
5724
|
children: newAssetOptions.map((option) => {
|
|
5668
5725
|
const active = isNewAsset && newAssetAccount === option.account;
|
|
5669
|
-
return /* @__PURE__ */ (0,
|
|
5726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
5670
5727
|
"button",
|
|
5671
5728
|
{
|
|
5672
5729
|
type: "button",
|
|
@@ -5677,21 +5734,21 @@ function DepositAssetSelection({
|
|
|
5677
5734
|
),
|
|
5678
5735
|
onClick: () => handleAddNewAsset(option.account),
|
|
5679
5736
|
children: [
|
|
5680
|
-
/* @__PURE__ */ (0,
|
|
5681
|
-
/* @__PURE__ */ (0,
|
|
5682
|
-
/* @__PURE__ */ (0,
|
|
5737
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "relative", children: [
|
|
5738
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssetIcon, { ticker: option.ticker, size: 40 }),
|
|
5739
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5683
5740
|
"div",
|
|
5684
5741
|
{
|
|
5685
5742
|
className: cn(
|
|
5686
5743
|
"absolute -bottom-1 -right-1 flex size-4 items-center justify-center rounded-full border",
|
|
5687
5744
|
active ? "border-network-arkade/40 bg-network-arkade" : "border-border bg-card"
|
|
5688
5745
|
),
|
|
5689
|
-
children: active ? /* @__PURE__ */ (0,
|
|
5746
|
+
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
5747
|
}
|
|
5691
5748
|
)
|
|
5692
5749
|
] }),
|
|
5693
|
-
/* @__PURE__ */ (0,
|
|
5694
|
-
/* @__PURE__ */ (0,
|
|
5750
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "mt-2 min-w-0", children: [
|
|
5751
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5695
5752
|
"div",
|
|
5696
5753
|
{
|
|
5697
5754
|
className: cn(
|
|
@@ -5701,7 +5758,7 @@ function DepositAssetSelection({
|
|
|
5701
5758
|
children: option.account
|
|
5702
5759
|
}
|
|
5703
5760
|
),
|
|
5704
|
-
/* @__PURE__ */ (0,
|
|
5761
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-1 text-xxs leading-tight text-white/40", children: option.title })
|
|
5705
5762
|
] })
|
|
5706
5763
|
]
|
|
5707
5764
|
},
|
|
@@ -5712,10 +5769,10 @@ function DepositAssetSelection({
|
|
|
5712
5769
|
)
|
|
5713
5770
|
] })
|
|
5714
5771
|
] }),
|
|
5715
|
-
isNewAsset && newAssetAccount === "RGB" && /* @__PURE__ */ (0,
|
|
5716
|
-
/* @__PURE__ */ (0,
|
|
5717
|
-
/* @__PURE__ */ (0,
|
|
5718
|
-
/* @__PURE__ */ (0,
|
|
5772
|
+
isNewAsset && newAssetAccount === "RGB" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
5773
|
+
/* @__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: [
|
|
5774
|
+
/* @__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." }),
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
5719
5776
|
"input",
|
|
5720
5777
|
{
|
|
5721
5778
|
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 +5783,16 @@ function DepositAssetSelection({
|
|
|
5726
5783
|
}
|
|
5727
5784
|
)
|
|
5728
5785
|
] }) }),
|
|
5729
|
-
/* @__PURE__ */ (0,
|
|
5786
|
+
/* @__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
5787
|
"Continue with New Asset",
|
|
5731
|
-
/* @__PURE__ */ (0,
|
|
5788
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "material-symbols-outlined text-icon-xl font-bold", children: "arrow_forward" })
|
|
5732
5789
|
] }) })
|
|
5733
5790
|
] })
|
|
5734
5791
|
] });
|
|
5735
5792
|
}
|
|
5736
5793
|
|
|
5737
5794
|
// src/web/components/deposit-invoice-generation.tsx
|
|
5738
|
-
var
|
|
5795
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5739
5796
|
var ACCOUNT_TITLES2 = {
|
|
5740
5797
|
RGB: "RGB & Lightning",
|
|
5741
5798
|
SPARK: "Spark",
|
|
@@ -5888,7 +5945,7 @@ function DepositInvoiceGeneration({
|
|
|
5888
5945
|
if (nextMethod) applyMethodSelection(account, nextMethod);
|
|
5889
5946
|
};
|
|
5890
5947
|
if (depositDetected) {
|
|
5891
|
-
return /* @__PURE__ */ (0,
|
|
5948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5892
5949
|
DepositSuccessScreen,
|
|
5893
5950
|
{
|
|
5894
5951
|
handleDone,
|
|
@@ -5904,26 +5961,26 @@ function DepositInvoiceGeneration({
|
|
|
5904
5961
|
const addressLabel = network === "spark" ? "Spark Address" : network === "arkade" ? arkSubMode === "boarding" ? "Boarding Address" : "Arkade Address" : network === "lightning" ? "Lightning Invoice" : "Deposit Address";
|
|
5905
5962
|
const showChannelWarning = selectedAccount === "RGB" && network === "lightning" && !channelsLoading && channels.length === 0 && !isSparkConnected;
|
|
5906
5963
|
const showLiquidityWarning = !isSparkLightning && network === "lightning" && maxDepositAmount === 0 && !channelsLoading && !isBtc;
|
|
5907
|
-
return /* @__PURE__ */ (0,
|
|
5908
|
-
/* @__PURE__ */ (0,
|
|
5964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex h-screen flex-col overflow-hidden bg-background font-display text-foreground", children: [
|
|
5965
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5909
5966
|
PageHeader,
|
|
5910
5967
|
{
|
|
5911
5968
|
title: `Receive ${selectedAsset?.ticker ?? (isNewAsset ? "RGB" : "Asset")}`,
|
|
5912
5969
|
subtitle: selectedAsset?.name,
|
|
5913
5970
|
titleAlign: "start",
|
|
5914
5971
|
onBack: handleBack,
|
|
5915
|
-
left: /* @__PURE__ */ (0,
|
|
5916
|
-
right: /* @__PURE__ */ (0,
|
|
5917
|
-
/* @__PURE__ */ (0,
|
|
5918
|
-
/* @__PURE__ */ (0,
|
|
5919
|
-
/* @__PURE__ */ (0,
|
|
5972
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AssetIcon, { ticker: displayTicker, size: 28 }),
|
|
5973
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
5974
|
+
/* @__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" }) }),
|
|
5975
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-px w-3 bg-white/10" }),
|
|
5976
|
+
/* @__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
5977
|
] })
|
|
5921
5978
|
}
|
|
5922
5979
|
),
|
|
5923
|
-
/* @__PURE__ */ (0,
|
|
5924
|
-
/* @__PURE__ */ (0,
|
|
5925
|
-
/* @__PURE__ */ (0,
|
|
5926
|
-
/* @__PURE__ */ (0,
|
|
5980
|
+
/* @__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: [
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Destination Account" }),
|
|
5983
|
+
/* @__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
5984
|
AccountChoiceChip,
|
|
5928
5985
|
{
|
|
5929
5986
|
account,
|
|
@@ -5948,9 +6005,9 @@ function DepositInvoiceGeneration({
|
|
|
5948
6005
|
account
|
|
5949
6006
|
)) })
|
|
5950
6007
|
] }),
|
|
5951
|
-
!isBtc && !(isNewAsset && (network === "spark" || network === "arkade")) && /* @__PURE__ */ (0,
|
|
5952
|
-
/* @__PURE__ */ (0,
|
|
5953
|
-
/* @__PURE__ */ (0,
|
|
6008
|
+
!isBtc && !(isNewAsset && (network === "spark" || network === "arkade")) && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xxs font-bold uppercase tracking-widest text-white/35", children: "Transfer Method" }),
|
|
6010
|
+
/* @__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
6011
|
MethodChoiceChip,
|
|
5955
6012
|
{
|
|
5956
6013
|
method,
|
|
@@ -5963,7 +6020,7 @@ function DepositInvoiceGeneration({
|
|
|
5963
6020
|
)) })
|
|
5964
6021
|
] })
|
|
5965
6022
|
] }) }),
|
|
5966
|
-
/* @__PURE__ */ (0,
|
|
6023
|
+
/* @__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
6024
|
BtcUnifiedReceive,
|
|
5968
6025
|
{
|
|
5969
6026
|
btcSelectedAccount,
|
|
@@ -5983,8 +6040,8 @@ function DepositInvoiceGeneration({
|
|
|
5983
6040
|
setAccountReceiveResult,
|
|
5984
6041
|
handleDone
|
|
5985
6042
|
}
|
|
5986
|
-
) : isBtc && !accountReceiveResult && loading ? /* @__PURE__ */ (0,
|
|
5987
|
-
/* @__PURE__ */ (0,
|
|
6043
|
+
) : isBtc && !accountReceiveResult && loading ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col items-center gap-4 py-10", children: [
|
|
6044
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5988
6045
|
"div",
|
|
5989
6046
|
{
|
|
5990
6047
|
className: cn(
|
|
@@ -5992,7 +6049,7 @@ function DepositInvoiceGeneration({
|
|
|
5992
6049
|
NETWORK_CONFIG[btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain"].bg,
|
|
5993
6050
|
NETWORK_CONFIG[btcSelectedAccount === "SPARK" ? "spark" : btcSelectedAccount === "ARKADE" ? "arkade" : "onchain"].border
|
|
5994
6051
|
),
|
|
5995
|
-
children: /* @__PURE__ */ (0,
|
|
6052
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5996
6053
|
"span",
|
|
5997
6054
|
{
|
|
5998
6055
|
className: cn(
|
|
@@ -6004,11 +6061,11 @@ function DepositInvoiceGeneration({
|
|
|
6004
6061
|
)
|
|
6005
6062
|
}
|
|
6006
6063
|
),
|
|
6007
|
-
/* @__PURE__ */ (0,
|
|
6008
|
-
/* @__PURE__ */ (0,
|
|
6009
|
-
/* @__PURE__ */ (0,
|
|
6064
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-1 text-center", children: [
|
|
6065
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm font-bold text-muted-foreground", children: "Generating addresses..." }),
|
|
6066
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-xs text-white/30", children: ACCOUNT_TITLES2[btcSelectedAccount] })
|
|
6010
6067
|
] })
|
|
6011
|
-
] }) : !address ? /* @__PURE__ */ (0,
|
|
6068
|
+
] }) : !address ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6012
6069
|
DepositPreGeneration,
|
|
6013
6070
|
{
|
|
6014
6071
|
selectedAsset,
|
|
@@ -6029,7 +6086,7 @@ function DepositInvoiceGeneration({
|
|
|
6029
6086
|
getUnitLabel,
|
|
6030
6087
|
generateInvoice
|
|
6031
6088
|
}
|
|
6032
|
-
) : /* @__PURE__ */ (0,
|
|
6089
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6033
6090
|
DepositGeneratedView,
|
|
6034
6091
|
{
|
|
6035
6092
|
network,
|
|
@@ -6113,6 +6170,7 @@ function DepositInvoiceGeneration({
|
|
|
6113
6170
|
DialogPortal,
|
|
6114
6171
|
DialogTitle,
|
|
6115
6172
|
DialogTrigger,
|
|
6173
|
+
DotPagination,
|
|
6116
6174
|
ErrorBoundary,
|
|
6117
6175
|
ErrorCard,
|
|
6118
6176
|
ExpandIcon,
|