@unifold/connect-react 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1222,6 +1222,158 @@ function useUnifold() {
1222
1222
 
1223
1223
  // ../ui-react/dist/index.mjs
1224
1224
  import { useState as useState52, useEffect as useEffect52 } from "react";
1225
+
1226
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1227
+ import { forwardRef, createElement } from "react";
1228
+
1229
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
1230
+ var defaultAttributes = {
1231
+ xmlns: "http://www.w3.org/2000/svg",
1232
+ width: 24,
1233
+ height: 24,
1234
+ viewBox: "0 0 24 24",
1235
+ fill: "none",
1236
+ stroke: "currentColor",
1237
+ strokeWidth: 2,
1238
+ strokeLinecap: "round",
1239
+ strokeLinejoin: "round"
1240
+ };
1241
+
1242
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
1243
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
1244
+ var createLucideIcon = (iconName, iconNode) => {
1245
+ const Component = forwardRef(
1246
+ ({ color = "currentColor", size: size4 = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children, ...rest }, ref) => createElement(
1247
+ "svg",
1248
+ {
1249
+ ref,
1250
+ ...defaultAttributes,
1251
+ width: size4,
1252
+ height: size4,
1253
+ stroke: color,
1254
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
1255
+ className: ["lucide", `lucide-${toKebabCase(iconName)}`, className].join(" "),
1256
+ ...rest
1257
+ },
1258
+ [
1259
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
1260
+ ...Array.isArray(children) ? children : [children]
1261
+ ]
1262
+ )
1263
+ );
1264
+ Component.displayName = `${iconName}`;
1265
+ return Component;
1266
+ };
1267
+
1268
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-down-circle.js
1269
+ var ArrowDownCircle = createLucideIcon("ArrowDownCircle", [
1270
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1271
+ ["path", { d: "M12 8v8", key: "napkw2" }],
1272
+ ["path", { d: "m8 12 4 4 4-4", key: "k98ssh" }]
1273
+ ]);
1274
+
1275
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
1276
+ var ArrowLeft = createLucideIcon("ArrowLeft", [
1277
+ ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
1278
+ ["path", { d: "M19 12H5", key: "x3x0zl" }]
1279
+ ]);
1280
+
1281
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check-circle.js
1282
+ var CheckCircle = createLucideIcon("CheckCircle", [
1283
+ ["path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14", key: "g774vq" }],
1284
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
1285
+ ]);
1286
+
1287
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
1288
+ var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
1289
+
1290
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
1291
+ var ChevronDown = createLucideIcon("ChevronDown", [
1292
+ ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
1293
+ ]);
1294
+
1295
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
1296
+ var ChevronRight = createLucideIcon("ChevronRight", [
1297
+ ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
1298
+ ]);
1299
+
1300
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
1301
+ var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
1302
+
1303
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js
1304
+ var Clock = createLucideIcon("Clock", [
1305
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1306
+ ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
1307
+ ]);
1308
+
1309
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js
1310
+ var Copy = createLucideIcon("Copy", [
1311
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
1312
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
1313
+ ]);
1314
+
1315
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
1316
+ var CreditCard = createLucideIcon("CreditCard", [
1317
+ ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
1318
+ ["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
1319
+ ]);
1320
+
1321
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
1322
+ var DollarSign = createLucideIcon("DollarSign", [
1323
+ ["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
1324
+ ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
1325
+ ]);
1326
+
1327
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/external-link.js
1328
+ var ExternalLink = createLucideIcon("ExternalLink", [
1329
+ ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }],
1330
+ ["polyline", { points: "15 3 21 3 21 9", key: "mznyad" }],
1331
+ ["line", { x1: "10", x2: "21", y1: "14", y2: "3", key: "18c3s4" }]
1332
+ ]);
1333
+
1334
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js
1335
+ var FileText = createLucideIcon("FileText", [
1336
+ [
1337
+ "path",
1338
+ { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z", key: "1nnpy2" }
1339
+ ],
1340
+ ["polyline", { points: "14 2 14 8 20 8", key: "1ew0cm" }],
1341
+ ["line", { x1: "16", x2: "8", y1: "13", y2: "13", key: "14keom" }],
1342
+ ["line", { x1: "16", x2: "8", y1: "17", y2: "17", key: "17nazh" }],
1343
+ ["line", { x1: "10", x2: "8", y1: "9", y2: "9", key: "1a5vjj" }]
1344
+ ]);
1345
+
1346
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/info.js
1347
+ var Info = createLucideIcon("Info", [
1348
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1349
+ ["path", { d: "M12 16v-4", key: "1dtifu" }],
1350
+ ["path", { d: "M12 8h.01", key: "e9boi3" }]
1351
+ ]);
1352
+
1353
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search.js
1354
+ var Search = createLucideIcon("Search", [
1355
+ ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
1356
+ ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
1357
+ ]);
1358
+
1359
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js
1360
+ var ShieldCheck = createLucideIcon("ShieldCheck", [
1361
+ ["path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10", key: "1irkt0" }],
1362
+ ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
1363
+ ]);
1364
+
1365
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
1366
+ var X = createLucideIcon("X", [
1367
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
1368
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
1369
+ ]);
1370
+
1371
+ // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/zap.js
1372
+ var Zap = createLucideIcon("Zap", [
1373
+ ["polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2", key: "45s27k" }]
1374
+ ]);
1375
+
1376
+ // ../ui-react/dist/index.mjs
1225
1377
  import * as React210 from "react";
1226
1378
 
1227
1379
  // ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3_bwdzsrsjkenptt5ry5km67dkui/node_modules/@radix-ui/react-dialog/dist/index.mjs
@@ -3326,202 +3478,65 @@ var Title = DialogTitle;
3326
3478
  var Description = DialogDescription;
3327
3479
  var Close = DialogClose;
3328
3480
 
3329
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3330
- import { forwardRef as forwardRef9, createElement as createElement6 } from "react";
3481
+ // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
3482
+ function r(e) {
3483
+ var t4, f, n = "";
3484
+ if ("string" == typeof e || "number" == typeof e) n += e;
3485
+ else if ("object" == typeof e) if (Array.isArray(e)) {
3486
+ var o = e.length;
3487
+ for (t4 = 0; t4 < o; t4++) e[t4] && (f = r(e[t4])) && (n && (n += " "), n += f);
3488
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
3489
+ return n;
3490
+ }
3491
+ function clsx() {
3492
+ for (var e, t4, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t4 = r(e)) && (n && (n += " "), n += t4);
3493
+ return n;
3494
+ }
3331
3495
 
3332
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
3333
- var defaultAttributes = {
3334
- xmlns: "http://www.w3.org/2000/svg",
3335
- width: 24,
3336
- height: 24,
3337
- viewBox: "0 0 24 24",
3338
- fill: "none",
3339
- stroke: "currentColor",
3340
- strokeWidth: 2,
3341
- strokeLinecap: "round",
3342
- strokeLinejoin: "round"
3496
+ // ../../node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
3497
+ var CLASS_PART_SEPARATOR = "-";
3498
+ var createClassGroupUtils = (config) => {
3499
+ const classMap = createClassMap(config);
3500
+ const {
3501
+ conflictingClassGroups,
3502
+ conflictingClassGroupModifiers
3503
+ } = config;
3504
+ const getClassGroupId = (className) => {
3505
+ const classParts = className.split(CLASS_PART_SEPARATOR);
3506
+ if (classParts[0] === "" && classParts.length !== 1) {
3507
+ classParts.shift();
3508
+ }
3509
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
3510
+ };
3511
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
3512
+ const conflicts = conflictingClassGroups[classGroupId] || [];
3513
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
3514
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
3515
+ }
3516
+ return conflicts;
3517
+ };
3518
+ return {
3519
+ getClassGroupId,
3520
+ getConflictingClassGroupIds
3521
+ };
3343
3522
  };
3344
-
3345
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
3346
- var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().trim();
3347
- var createLucideIcon = (iconName, iconNode) => {
3348
- const Component = forwardRef9(
3349
- ({ color = "currentColor", size: size4 = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children, ...rest }, ref) => createElement6(
3350
- "svg",
3351
- {
3352
- ref,
3353
- ...defaultAttributes,
3354
- width: size4,
3355
- height: size4,
3356
- stroke: color,
3357
- strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size4) : strokeWidth,
3358
- className: ["lucide", `lucide-${toKebabCase(iconName)}`, className].join(" "),
3359
- ...rest
3360
- },
3361
- [
3362
- ...iconNode.map(([tag, attrs]) => createElement6(tag, attrs)),
3363
- ...Array.isArray(children) ? children : [children]
3364
- ]
3365
- )
3366
- );
3367
- Component.displayName = `${iconName}`;
3368
- return Component;
3369
- };
3370
-
3371
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/arrow-left.js
3372
- var ArrowLeft = createLucideIcon("ArrowLeft", [
3373
- ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
3374
- ["path", { d: "M19 12H5", key: "x3x0zl" }]
3375
- ]);
3376
-
3377
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/check.js
3378
- var Check = createLucideIcon("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
3379
-
3380
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-down.js
3381
- var ChevronDown = createLucideIcon("ChevronDown", [
3382
- ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]
3383
- ]);
3384
-
3385
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js
3386
- var ChevronRight = createLucideIcon("ChevronRight", [
3387
- ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
3388
- ]);
3389
-
3390
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-up.js
3391
- var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
3392
-
3393
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/clock.js
3394
- var Clock = createLucideIcon("Clock", [
3395
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
3396
- ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
3397
- ]);
3398
-
3399
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js
3400
- var Copy = createLucideIcon("Copy", [
3401
- ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
3402
- ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
3403
- ]);
3404
-
3405
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/credit-card.js
3406
- var CreditCard = createLucideIcon("CreditCard", [
3407
- ["rect", { width: "20", height: "14", x: "2", y: "5", rx: "2", key: "ynyp8z" }],
3408
- ["line", { x1: "2", x2: "22", y1: "10", y2: "10", key: "1b3vmo" }]
3409
- ]);
3410
-
3411
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dollar-sign.js
3412
- var DollarSign = createLucideIcon("DollarSign", [
3413
- ["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
3414
- ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
3415
- ]);
3416
-
3417
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/external-link.js
3418
- var ExternalLink = createLucideIcon("ExternalLink", [
3419
- ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }],
3420
- ["polyline", { points: "15 3 21 3 21 9", key: "mznyad" }],
3421
- ["line", { x1: "10", x2: "21", y1: "14", y2: "3", key: "18c3s4" }]
3422
- ]);
3423
-
3424
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/file-text.js
3425
- var FileText = createLucideIcon("FileText", [
3426
- [
3427
- "path",
3428
- { d: "M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z", key: "1nnpy2" }
3429
- ],
3430
- ["polyline", { points: "14 2 14 8 20 8", key: "1ew0cm" }],
3431
- ["line", { x1: "16", x2: "8", y1: "13", y2: "13", key: "14keom" }],
3432
- ["line", { x1: "16", x2: "8", y1: "17", y2: "17", key: "17nazh" }],
3433
- ["line", { x1: "10", x2: "8", y1: "9", y2: "9", key: "1a5vjj" }]
3434
- ]);
3435
-
3436
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/info.js
3437
- var Info = createLucideIcon("Info", [
3438
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
3439
- ["path", { d: "M12 16v-4", key: "1dtifu" }],
3440
- ["path", { d: "M12 8h.01", key: "e9boi3" }]
3441
- ]);
3442
-
3443
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/search.js
3444
- var Search = createLucideIcon("Search", [
3445
- ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
3446
- ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
3447
- ]);
3448
-
3449
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/shield-check.js
3450
- var ShieldCheck = createLucideIcon("ShieldCheck", [
3451
- ["path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10", key: "1irkt0" }],
3452
- ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
3453
- ]);
3454
-
3455
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js
3456
- var X = createLucideIcon("X", [
3457
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
3458
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
3459
- ]);
3460
-
3461
- // ../../node_modules/.pnpm/lucide-react@0.294.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/zap.js
3462
- var Zap = createLucideIcon("Zap", [
3463
- ["polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2", key: "45s27k" }]
3464
- ]);
3465
-
3466
- // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
3467
- function r(e) {
3468
- var t4, f, n = "";
3469
- if ("string" == typeof e || "number" == typeof e) n += e;
3470
- else if ("object" == typeof e) if (Array.isArray(e)) {
3471
- var o = e.length;
3472
- for (t4 = 0; t4 < o; t4++) e[t4] && (f = r(e[t4])) && (n && (n += " "), n += f);
3473
- } else for (f in e) e[f] && (n && (n += " "), n += f);
3474
- return n;
3475
- }
3476
- function clsx() {
3477
- for (var e, t4, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t4 = r(e)) && (n && (n += " "), n += t4);
3478
- return n;
3479
- }
3480
-
3481
- // ../../node_modules/.pnpm/tailwind-merge@2.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
3482
- var CLASS_PART_SEPARATOR = "-";
3483
- var createClassGroupUtils = (config) => {
3484
- const classMap = createClassMap(config);
3485
- const {
3486
- conflictingClassGroups,
3487
- conflictingClassGroupModifiers
3488
- } = config;
3489
- const getClassGroupId = (className) => {
3490
- const classParts = className.split(CLASS_PART_SEPARATOR);
3491
- if (classParts[0] === "" && classParts.length !== 1) {
3492
- classParts.shift();
3493
- }
3494
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
3495
- };
3496
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
3497
- const conflicts = conflictingClassGroups[classGroupId] || [];
3498
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
3499
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
3500
- }
3501
- return conflicts;
3502
- };
3503
- return {
3504
- getClassGroupId,
3505
- getConflictingClassGroupIds
3506
- };
3507
- };
3508
- var getGroupRecursive = (classParts, classPartObject) => {
3509
- if (classParts.length === 0) {
3510
- return classPartObject.classGroupId;
3511
- }
3512
- const currentClassPart = classParts[0];
3513
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
3514
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
3515
- if (classGroupFromNextClassPart) {
3516
- return classGroupFromNextClassPart;
3517
- }
3518
- if (classPartObject.validators.length === 0) {
3519
- return void 0;
3520
- }
3521
- const classRest = classParts.join(CLASS_PART_SEPARATOR);
3522
- return classPartObject.validators.find(({
3523
- validator
3524
- }) => validator(classRest))?.classGroupId;
3523
+ var getGroupRecursive = (classParts, classPartObject) => {
3524
+ if (classParts.length === 0) {
3525
+ return classPartObject.classGroupId;
3526
+ }
3527
+ const currentClassPart = classParts[0];
3528
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
3529
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
3530
+ if (classGroupFromNextClassPart) {
3531
+ return classGroupFromNextClassPart;
3532
+ }
3533
+ if (classPartObject.validators.length === 0) {
3534
+ return void 0;
3535
+ }
3536
+ const classRest = classParts.join(CLASS_PART_SEPARATOR);
3537
+ return classPartObject.validators.find(({
3538
+ validator
3539
+ }) => validator(classRest))?.classGroupId;
3525
3540
  };
3526
3541
  var arbitraryPropertyRegex = /^\[(.+)\]$/;
3527
3542
  var getGroupIdForArbitraryProperty = (className) => {
@@ -5949,8 +5964,9 @@ import { jsx as jsx32 } from "react/jsx-runtime";
5949
5964
  import { useEffect as useEffect22, useState as useState16 } from "react";
5950
5965
  import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
5951
5966
  import { jsx as jsx52, jsxs as jsxs32 } from "react/jsx-runtime";
5952
- import { Fragment as Fragment8, jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
5953
- import { jsx as jsx72 } from "react/jsx-runtime";
5967
+ import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
5968
+ import { Fragment as Fragment8, jsx as jsx72, jsxs as jsxs5 } from "react/jsx-runtime";
5969
+ import { jsx as jsx82, jsxs as jsxs6 } from "react/jsx-runtime";
5954
5970
  import * as React38 from "react";
5955
5971
 
5956
5972
  // ../../node_modules/.pnpm/@radix-ui+react-select@2.2.6_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3._paqmzknjxz7bmndehagaq3tw4m/node_modules/@radix-ui/react-select/dist/index.mjs
@@ -9442,7 +9458,7 @@ var ScrollDownButton = SelectScrollDownButton;
9442
9458
  var Separator = SelectSeparator;
9443
9459
 
9444
9460
  // ../ui-react/dist/index.mjs
9445
- import { jsx as jsx82, jsxs as jsxs5 } from "react/jsx-runtime";
9461
+ import { jsx as jsx92, jsxs as jsxs7 } from "react/jsx-runtime";
9446
9462
  import * as React42 from "react";
9447
9463
 
9448
9464
  // ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@18.3.27_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
@@ -9589,7 +9605,7 @@ var cva = (base, config) => (props) => {
9589
9605
  };
9590
9606
 
9591
9607
  // ../ui-react/dist/index.mjs
9592
- import { jsx as jsx92 } from "react/jsx-runtime";
9608
+ import { jsx as jsx102 } from "react/jsx-runtime";
9593
9609
  import * as React52 from "react";
9594
9610
 
9595
9611
  // ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@18.3.7_@types+react@18.3.27__@types+react@18.3_hd4qp76o7ebwsrfrhqb6isuuvy/node_modules/@radix-ui/react-tooltip/dist/index.mjs
@@ -10070,21 +10086,21 @@ var Portal4 = TooltipPortal;
10070
10086
  var Content23 = TooltipContent;
10071
10087
 
10072
10088
  // ../ui-react/dist/index.mjs
10073
- import { jsx as jsx102 } from "react/jsx-runtime";
10074
- import { Fragment as Fragment23, jsx as jsx112, jsxs as jsxs6 } from "react/jsx-runtime";
10075
- import { jsx as jsx122 } from "react/jsx-runtime";
10089
+ import { jsx as jsx112 } from "react/jsx-runtime";
10090
+ import { Fragment as Fragment23, jsx as jsx122, jsxs as jsxs8 } from "react/jsx-runtime";
10091
+ import { jsx as jsx132 } from "react/jsx-runtime";
10076
10092
  import { useState as useState42, useEffect as useEffect42 } from "react";
10077
10093
  import { useState as useState32 } from "react";
10078
- import { jsx as jsx132, jsxs as jsxs7 } from "react/jsx-runtime";
10079
- import { Fragment as Fragment32, jsx as jsx142, jsxs as jsxs8 } from "react/jsx-runtime";
10080
- import { jsx as jsx152, jsxs as jsxs9 } from "react/jsx-runtime";
10094
+ import { jsx as jsx142, jsxs as jsxs9 } from "react/jsx-runtime";
10095
+ import { Fragment as Fragment32, jsx as jsx152, jsxs as jsxs10 } from "react/jsx-runtime";
10096
+ import { jsx as jsx162, jsxs as jsxs11 } from "react/jsx-runtime";
10081
10097
  import { useQuery } from "@tanstack/react-query";
10082
- import { jsx as jsx162, jsxs as jsxs10 } from "react/jsx-runtime";
10083
- import { jsx as jsx172, jsxs as jsxs11 } from "react/jsx-runtime";
10084
- import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
10085
- import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
10086
- import { Fragment as Fragment42, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
10087
- import { jsx as jsx21 } from "react/jsx-runtime";
10098
+ import { jsx as jsx172, jsxs as jsxs12 } from "react/jsx-runtime";
10099
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
10100
+ import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
10101
+ import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
10102
+ import { Fragment as Fragment42, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
10103
+ import { jsx as jsx222 } from "react/jsx-runtime";
10088
10104
  function cn(...inputs) {
10089
10105
  return twMerge(clsx(inputs));
10090
10106
  }
@@ -10330,6 +10346,14 @@ function getIconUrl(iconPath) {
10330
10346
  const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
10331
10347
  return `${API_BASE_URL}/api/public${normalizedPath}`;
10332
10348
  }
10349
+ function getIconUrlWithCdn(iconPath, assetCdnUrl) {
10350
+ if (!assetCdnUrl) {
10351
+ return getIconUrl(iconPath);
10352
+ }
10353
+ const normalizedPath = iconPath.startsWith("/") ? iconPath : `/${iconPath}`;
10354
+ const baseUrl = assetCdnUrl.endsWith("/") ? assetCdnUrl.slice(0, -1) : assetCdnUrl;
10355
+ return `${baseUrl}/api/public${normalizedPath}`;
10356
+ }
10333
10357
  async function createEOA(overrides, publishableKey) {
10334
10358
  if (!overrides?.user_id) {
10335
10359
  throw new Error("user_id is required");
@@ -10438,6 +10462,16 @@ async function createMeldSession(request, publishableKey) {
10438
10462
  }
10439
10463
  return response.json();
10440
10464
  }
10465
+ function getPreferredIconUrl(iconUrls, preferredFormat = "svg") {
10466
+ if (!iconUrls || iconUrls.length === 0) {
10467
+ return void 0;
10468
+ }
10469
+ const preferred = iconUrls.find((icon) => icon.format === preferredFormat);
10470
+ if (preferred) {
10471
+ return preferred.url;
10472
+ }
10473
+ return iconUrls[0]?.url;
10474
+ }
10441
10475
  async function getFiatCurrencies(publishableKey) {
10442
10476
  const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10443
10477
  const response = await fetch(
@@ -10455,51 +10489,81 @@ async function getFiatCurrencies(publishableKey) {
10455
10489
  }
10456
10490
  return response.json();
10457
10491
  }
10492
+ async function getProjectConfig(publishableKey) {
10493
+ const pk = publishableKey || DEFAULT_PUBLISHABLE_KEY;
10494
+ const response = await fetch(`${API_BASE_URL}/v1/public/projects/config`, {
10495
+ method: "GET",
10496
+ headers: {
10497
+ accept: "application/json",
10498
+ "x-publishable-key": pk
10499
+ }
10500
+ });
10501
+ if (!response.ok) {
10502
+ throw new Error(`Failed to fetch project config: ${response.statusText}`);
10503
+ }
10504
+ return response.json();
10505
+ }
10458
10506
  function DepositExecutionItem({
10459
10507
  execution,
10460
- showCloseButton = false,
10461
- onClose
10508
+ onClick
10462
10509
  }) {
10463
10510
  const isPending = execution.status === "pending" || execution.status === "waiting" || execution.status === "delayed";
10464
- const formatTxHash = (hash) => {
10465
- if (hash.length <= 12) return hash;
10466
- return `${hash.slice(0, 10)}...${hash.slice(-8)}`;
10467
- };
10468
10511
  const formatDateTime = (timestamp) => {
10469
10512
  try {
10470
10513
  const date = new Date(timestamp);
10471
- return date.toLocaleDateString("en-US", { month: "short", day: "numeric" }) + " \xB7 " + date.toLocaleTimeString("en-US", {
10514
+ const monthDay = date.toLocaleDateString("en-US", {
10515
+ month: "short",
10516
+ day: "numeric",
10517
+ year: "numeric"
10518
+ });
10519
+ const time = date.toLocaleTimeString("en-US", {
10472
10520
  hour: "numeric",
10473
10521
  minute: "2-digit",
10474
- second: "2-digit",
10475
- hour12: false
10476
- });
10522
+ hour12: true
10523
+ }).toLowerCase();
10524
+ return `${monthDay} at ${time}`;
10477
10525
  } catch {
10478
10526
  return timestamp;
10479
10527
  }
10480
10528
  };
10481
- return /* @__PURE__ */ jsxs32("div", { className: "uf-bg-card uf-border uf-border-border uf-rounded-xl uf-overflow-hidden uf-p-3", children: [
10482
- /* @__PURE__ */ jsxs32("div", { className: "uf-flex uf-items-start uf-justify-between", children: [
10483
- /* @__PURE__ */ jsxs32("div", { className: "uf-flex uf-items-center uf-gap-2.5 uf-flex-1", children: [
10484
- /* @__PURE__ */ jsxs32("div", { className: "uf-relative uf-flex-shrink-0", children: [
10529
+ const formatUsdAmount = (baseUnitAmount) => {
10530
+ try {
10531
+ const amount = Number(baseUnitAmount) / 1e6;
10532
+ return new Intl.NumberFormat("en-US", {
10533
+ style: "currency",
10534
+ currency: "USD",
10535
+ minimumFractionDigits: 2,
10536
+ maximumFractionDigits: 2
10537
+ }).format(amount);
10538
+ } catch {
10539
+ return "$0.00";
10540
+ }
10541
+ };
10542
+ return /* @__PURE__ */ jsxs32(
10543
+ "button",
10544
+ {
10545
+ onClick,
10546
+ className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-gap-3 hover:uf-bg-secondary/80 uf-transition-colors uf-text-left",
10547
+ children: [
10548
+ /* @__PURE__ */ jsxs32("div", { className: "uf-relative uf-flex-shrink-0 uf-w-9 uf-h-9", children: [
10485
10549
  /* @__PURE__ */ jsx52(
10486
10550
  "img",
10487
10551
  {
10488
10552
  src: execution.source_token_metadata?.icon_url || getIconUrl("/icons/tokens/usdc.svg"),
10489
10553
  alt: "Token",
10490
- width: 32,
10491
- height: 32,
10492
- className: "uf-rounded-full"
10554
+ width: 36,
10555
+ height: 36,
10556
+ className: "uf-rounded-full uf-w-9 uf-h-9"
10493
10557
  }
10494
10558
  ),
10495
- isPending ? /* @__PURE__ */ jsx52("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-yellow-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52(
10559
+ isPending ? /* @__PURE__ */ jsx52("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-yellow-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52(
10496
10560
  "svg",
10497
10561
  {
10498
10562
  width: "10",
10499
10563
  height: "10",
10500
10564
  viewBox: "0 0 12 12",
10501
10565
  fill: "none",
10502
- className: "uf-animate-spin",
10566
+ className: "uf-animate-spin uf-block",
10503
10567
  children: /* @__PURE__ */ jsx52(
10504
10568
  "path",
10505
10569
  {
@@ -10510,7 +10574,7 @@ function DepositExecutionItem({
10510
10574
  }
10511
10575
  )
10512
10576
  }
10513
- ) }) : /* @__PURE__ */ jsx52("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx52(
10577
+ ) }) : /* @__PURE__ */ jsx52("div", { className: "uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-bg-blue-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx52("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", className: "uf-block", children: /* @__PURE__ */ jsx52(
10514
10578
  "path",
10515
10579
  {
10516
10580
  d: "M10 3L4.5 8.5L2 6",
@@ -10522,55 +10586,241 @@ function DepositExecutionItem({
10522
10586
  ) }) })
10523
10587
  ] }),
10524
10588
  /* @__PURE__ */ jsxs32("div", { className: "uf-flex-1 uf-min-w-0", children: [
10525
- /* @__PURE__ */ jsxs32("div", { className: "uf-flex uf-items-center uf-justify-between uf-mb-0.5", children: [
10526
- /* @__PURE__ */ jsx52("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm", children: isPending ? "Deposit received" : "Deposit completed" }),
10527
- /* @__PURE__ */ jsx52("span", { className: "uf-text-muted-foreground uf-text-xs uf-whitespace-nowrap uf-ml-2", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
10589
+ /* @__PURE__ */ jsx52("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-leading-tight", children: isPending ? "Deposit received" : "Deposit completed" }),
10590
+ /* @__PURE__ */ jsx52("p", { className: "uf-text-muted-foreground uf-text-xs uf-leading-tight", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
10591
+ ] }),
10592
+ /* @__PURE__ */ jsx52("span", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(execution.source_amount_base_unit) }),
10593
+ /* @__PURE__ */ jsx52(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground uf-flex-shrink-0" })
10594
+ ]
10595
+ }
10596
+ );
10597
+ }
10598
+ var CHAIN_NAMES = {
10599
+ solana: "Solana",
10600
+ ethereum: "Ethereum",
10601
+ "1": "Ethereum",
10602
+ "137": "Polygon",
10603
+ "42161": "Arbitrum",
10604
+ "10": "Optimism",
10605
+ "8453": "Base",
10606
+ "43114": "Avalanche",
10607
+ "56": "BSC",
10608
+ bitcoin: "Bitcoin",
10609
+ mainnet: "Mainnet"
10610
+ };
10611
+ function DepositDetailModal({
10612
+ open,
10613
+ onOpenChange,
10614
+ execution,
10615
+ themeClass = ""
10616
+ }) {
10617
+ if (!execution) return null;
10618
+ const isPending = execution.status === "pending" || execution.status === "waiting" || execution.status === "delayed";
10619
+ const formatDateTime = (timestamp) => {
10620
+ try {
10621
+ const date = new Date(timestamp);
10622
+ const monthDay = date.toLocaleDateString("en-US", {
10623
+ month: "short",
10624
+ day: "numeric",
10625
+ year: "numeric"
10626
+ });
10627
+ const time = date.toLocaleTimeString("en-US", {
10628
+ hour: "numeric",
10629
+ minute: "2-digit",
10630
+ hour12: true
10631
+ });
10632
+ return `${monthDay} at ${time}`;
10633
+ } catch {
10634
+ return timestamp;
10635
+ }
10636
+ };
10637
+ const formatAmount = (baseUnitAmount, decimals = 6) => {
10638
+ try {
10639
+ const amount = Number(baseUnitAmount) / Math.pow(10, decimals);
10640
+ return amount.toFixed(2);
10641
+ } catch {
10642
+ return "0.00";
10643
+ }
10644
+ };
10645
+ const formatUsdAmount = (usdAmount, baseUnitAmount) => {
10646
+ if (usdAmount) {
10647
+ try {
10648
+ const amount = Number(usdAmount);
10649
+ return new Intl.NumberFormat("en-US", {
10650
+ style: "currency",
10651
+ currency: "USD",
10652
+ minimumFractionDigits: 2,
10653
+ maximumFractionDigits: 2
10654
+ }).format(amount);
10655
+ } catch {
10656
+ }
10657
+ }
10658
+ if (baseUnitAmount) {
10659
+ try {
10660
+ const amount = Number(baseUnitAmount) / 1e6;
10661
+ return new Intl.NumberFormat("en-US", {
10662
+ style: "currency",
10663
+ currency: "USD",
10664
+ minimumFractionDigits: 2,
10665
+ maximumFractionDigits: 2
10666
+ }).format(amount);
10667
+ } catch {
10668
+ }
10669
+ }
10670
+ return "$0.00";
10671
+ };
10672
+ const getNetworkName = (chainType, chainId) => {
10673
+ return CHAIN_NAMES[chainId] || CHAIN_NAMES[chainType] || chainType;
10674
+ };
10675
+ const getSourceTokenSymbol = () => {
10676
+ return "USDC";
10677
+ };
10678
+ const getDestinationTokenSymbol = () => {
10679
+ return "USDC";
10680
+ };
10681
+ const handleClose = () => {
10682
+ onOpenChange(false);
10683
+ };
10684
+ return /* @__PURE__ */ jsx62(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs42(
10685
+ DialogContent2,
10686
+ {
10687
+ className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`,
10688
+ children: [
10689
+ /* @__PURE__ */ jsx62(DepositHeader, { title: "Deposit Details", onClose: handleClose }),
10690
+ /* @__PURE__ */ jsxs42("div", { className: "uf-px-4 uf-pb-4", children: [
10691
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-flex-col uf-items-center uf-py-6", children: [
10692
+ /* @__PURE__ */ jsxs42("div", { className: "uf-relative uf-mb-3", children: [
10693
+ /* @__PURE__ */ jsx62(
10694
+ "img",
10695
+ {
10696
+ src: execution.source_token_metadata?.icon_url || getIconUrl("/icons/tokens/usdc.svg"),
10697
+ alt: "Token",
10698
+ width: 64,
10699
+ height: 64,
10700
+ className: "uf-rounded-full"
10701
+ }
10702
+ ),
10703
+ isPending ? /* @__PURE__ */ jsx62("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-yellow-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx62(
10704
+ "svg",
10705
+ {
10706
+ width: "16",
10707
+ height: "16",
10708
+ viewBox: "0 0 12 12",
10709
+ fill: "none",
10710
+ className: "uf-animate-spin uf-block",
10711
+ children: /* @__PURE__ */ jsx62(
10712
+ "path",
10713
+ {
10714
+ d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
10715
+ stroke: "white",
10716
+ strokeWidth: "2",
10717
+ strokeLinecap: "round"
10718
+ }
10719
+ )
10720
+ }
10721
+ ) }) : /* @__PURE__ */ jsx62("div", { className: "uf-absolute -uf-bottom-1 -uf-right-1 uf-bg-blue-500 uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx62(
10722
+ "svg",
10723
+ {
10724
+ width: "16",
10725
+ height: "16",
10726
+ viewBox: "0 0 12 12",
10727
+ fill: "none",
10728
+ className: "uf-block",
10729
+ children: /* @__PURE__ */ jsx62(
10730
+ "path",
10731
+ {
10732
+ d: "M10 3L4.5 8.5L2 6",
10733
+ stroke: "white",
10734
+ strokeWidth: "2",
10735
+ strokeLinecap: "round",
10736
+ strokeLinejoin: "round"
10737
+ }
10738
+ )
10739
+ }
10740
+ ) })
10741
+ ] }),
10742
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mb-1", children: [
10743
+ /* @__PURE__ */ jsx62(
10744
+ "div",
10745
+ {
10746
+ className: `uf-w-2 uf-h-2 uf-rounded-full ${isPending ? "uf-bg-yellow-500" : "uf-bg-green-500"}`
10747
+ }
10748
+ ),
10749
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: isPending ? "Pending" : "Completed" })
10750
+ ] }),
10751
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: formatDateTime(execution.created_at || (/* @__PURE__ */ new Date()).toISOString()) })
10752
+ ] }),
10753
+ /* @__PURE__ */ jsxs42("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-3", children: [
10754
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10755
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Sent" }),
10756
+ /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
10757
+ formatAmount(execution.source_amount_base_unit),
10758
+ " ",
10759
+ getSourceTokenSymbol()
10760
+ ] })
10761
+ ] }),
10762
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10763
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Amount Received" }),
10764
+ /* @__PURE__ */ jsxs42("span", { className: "uf-text-foreground uf-font-medium", children: [
10765
+ formatAmount(execution.destination_amount_base_unit),
10766
+ " ",
10767
+ getDestinationTokenSymbol()
10768
+ ] })
10769
+ ] }),
10770
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
10771
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "USD Value" }),
10772
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: formatUsdAmount(execution.source_amount_usd, execution.source_amount_base_unit) })
10773
+ ] })
10774
+ ] }),
10775
+ /* @__PURE__ */ jsxs42("div", { className: "uf-bg-secondary uf-rounded-xl uf-overflow-hidden uf-mb-4", children: [
10776
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3 uf-border-b uf-border-border/50", children: [
10777
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Source Network" }),
10778
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.source_chain_type, execution.source_chain_id) })
10779
+ ] }),
10780
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-justify-between uf-items-center uf-px-4 uf-py-3", children: [
10781
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-muted-foreground uf-text-sm", children: "Destination Network" }),
10782
+ /* @__PURE__ */ jsx62("span", { className: "uf-text-foreground uf-font-medium", children: getNetworkName(execution.destination_chain_type, execution.destination_chain_id) })
10783
+ ] })
10528
10784
  ] }),
10529
- /* @__PURE__ */ jsx52("p", { className: "uf-text-muted-foreground uf-text-xs", children: isPending ? "Your account will be credited shortly." : "Your account has been credited successfully." })
10785
+ /* @__PURE__ */ jsxs42("div", { className: "uf-space-y-2", children: [
10786
+ execution.explorer_url && /* @__PURE__ */ jsxs42(
10787
+ "a",
10788
+ {
10789
+ href: execution.explorer_url,
10790
+ target: "_blank",
10791
+ rel: "noopener noreferrer",
10792
+ className: "uf-flex uf-items-center uf-justify-between uf-w-full uf-bg-blue-400 hover:uf-bg-blue-500 uf-text-white uf-rounded-xl uf-px-4 uf-py-3 uf-transition-colors",
10793
+ children: [
10794
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
10795
+ /* @__PURE__ */ jsx62(ArrowDownCircle, { className: "uf-w-5 uf-h-5" }),
10796
+ /* @__PURE__ */ jsx62("span", { className: "uf-font-medium", children: "View Deposit Transaction" })
10797
+ ] }),
10798
+ /* @__PURE__ */ jsx62(ExternalLink, { className: "uf-w-4 uf-h-4" })
10799
+ ]
10800
+ }
10801
+ ),
10802
+ !isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ jsxs42(
10803
+ "a",
10804
+ {
10805
+ href: execution.destination_explorer_url,
10806
+ target: "_blank",
10807
+ rel: "noopener noreferrer",
10808
+ className: "uf-flex uf-items-center uf-justify-between uf-w-full uf-bg-blue-600 hover:uf-bg-blue-700 uf-text-white uf-rounded-xl uf-px-4 uf-py-3 uf-transition-colors",
10809
+ children: [
10810
+ /* @__PURE__ */ jsxs42("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
10811
+ /* @__PURE__ */ jsx62(CheckCircle, { className: "uf-w-5 uf-h-5" }),
10812
+ /* @__PURE__ */ jsx62("span", { className: "uf-font-medium", children: "View Completion Transaction" })
10813
+ ] }),
10814
+ /* @__PURE__ */ jsx62(ExternalLink, { className: "uf-w-4 uf-h-4" })
10815
+ ]
10816
+ }
10817
+ )
10818
+ ] }),
10819
+ /* @__PURE__ */ jsx62("p", { className: "uf-text-center uf-text-muted-foreground uf-text-xs uf-mt-4", children: "Links open in external browser" })
10530
10820
  ] })
10531
- ] }),
10532
- showCloseButton && onClose && /* @__PURE__ */ jsx52(
10533
- "button",
10534
- {
10535
- onClick: onClose,
10536
- className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0 uf-ml-2",
10537
- children: /* @__PURE__ */ jsx52(X, { className: "uf-w-4 uf-h-4" })
10538
- }
10539
- )
10540
- ] }),
10541
- !isPending && execution.explorer_url && /* @__PURE__ */ jsxs32("div", { className: "uf-flex uf-justify-between uf-items-center uf-gap-1.5 uf-mt-2 uf-pt-2 uf-border-t uf-border-secondary uf-text-xs uf-ml-[42px]", children: [
10542
- /* @__PURE__ */ jsx52("span", { className: "uf-text-muted-foreground", children: "Deposit tx:" }),
10543
- /* @__PURE__ */ jsxs32(
10544
- "a",
10545
- {
10546
- href: execution.explorer_url,
10547
- target: "_blank",
10548
- rel: "noopener noreferrer",
10549
- className: "uf-flex uf-items-center uf-gap-1 uf-text-blue-400 hover:uf-text-blue-300 uf-transition-colors uf-font-mono",
10550
- children: [
10551
- formatTxHash(execution.transaction_hash),
10552
- /* @__PURE__ */ jsx52(ExternalLink, { className: "uf-w-3 uf-h-3" })
10553
- ]
10554
- }
10555
- )
10556
- ] }),
10557
- !isPending && execution.destination_transaction_hashes?.length > 0 && execution.destination_explorer_url && /* @__PURE__ */ jsxs32("div", { className: "uf-flex uf-justify-between uf-items-center uf-gap-1.5 uf-mt-1 uf-text-xs uf-ml-[42px]", children: [
10558
- /* @__PURE__ */ jsx52("span", { className: "uf-text-muted-foreground", children: "Completion tx:" }),
10559
- /* @__PURE__ */ jsxs32(
10560
- "a",
10561
- {
10562
- href: execution.destination_explorer_url,
10563
- target: "_blank",
10564
- rel: "noopener noreferrer",
10565
- className: "uf-flex uf-items-center uf-gap-1 uf-text-blue-400 hover:uf-text-blue-300 uf-transition-colors uf-font-mono",
10566
- children: [
10567
- formatTxHash(execution.destination_transaction_hashes[execution.destination_transaction_hashes.length - 1]),
10568
- /* @__PURE__ */ jsx52(ExternalLink, { className: "uf-w-3 uf-h-3" })
10569
- ]
10570
- }
10571
- )
10572
- ] })
10573
- ] });
10821
+ ]
10822
+ }
10823
+ ) });
10574
10824
  }
10575
10825
  function DepositsModal({
10576
10826
  open,
@@ -10581,6 +10831,8 @@ function DepositsModal({
10581
10831
  themeClass = ""
10582
10832
  }) {
10583
10833
  const [allExecutions, setAllExecutions] = useState16(sessionExecutions);
10834
+ const [selectedExecution, setSelectedExecution] = useState16(null);
10835
+ const [detailModalOpen, setDetailModalOpen] = useState16(false);
10584
10836
  useEffect22(() => {
10585
10837
  if (!open || !userId) return;
10586
10838
  const fetchExecutions = async () => {
@@ -10606,44 +10858,132 @@ function DepositsModal({
10606
10858
  const handleClose = () => {
10607
10859
  onOpenChange(false);
10608
10860
  };
10609
- return /* @__PURE__ */ jsx62(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs42(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
10610
- /* @__PURE__ */ jsx62(DepositHeader, { title: "Deposit Tracker", onClose: handleClose }),
10611
- /* @__PURE__ */ jsx62("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsx62("div", { className: "uf-space-y-3", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx62("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx62("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx62(Fragment8, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx62(DepositExecutionItem, { execution }, execution.id)) }) }) })
10612
- ] }) });
10861
+ const handleExecutionClick = (execution) => {
10862
+ setSelectedExecution(execution);
10863
+ setDetailModalOpen(true);
10864
+ };
10865
+ return /* @__PURE__ */ jsxs5(Fragment8, { children: [
10866
+ /* @__PURE__ */ jsx72(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs5(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
10867
+ /* @__PURE__ */ jsx72(DepositHeader, { title: "Deposit Tracker", onClose: handleClose }),
10868
+ /* @__PURE__ */ jsx72("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden uf-pb-4", children: /* @__PURE__ */ jsx72("div", { className: "uf-space-y-2", children: allExecutions.length === 0 ? /* @__PURE__ */ jsx72("div", { className: "uf-py-8 uf-px-4 uf-text-center", children: /* @__PURE__ */ jsx72("div", { className: "uf-text-muted-foreground uf-text-sm", children: "No deposits yet" }) }) : /* @__PURE__ */ jsx72(Fragment8, { children: allExecutions.map((execution) => /* @__PURE__ */ jsx72(
10869
+ DepositExecutionItem,
10870
+ {
10871
+ execution,
10872
+ onClick: () => handleExecutionClick(execution)
10873
+ },
10874
+ execution.id
10875
+ )) }) }) })
10876
+ ] }) }),
10877
+ /* @__PURE__ */ jsx72(
10878
+ DepositDetailModal,
10879
+ {
10880
+ open: detailModalOpen,
10881
+ onOpenChange: setDetailModalOpen,
10882
+ execution: selectedExecution,
10883
+ themeClass
10884
+ }
10885
+ )
10886
+ ] });
10613
10887
  }
10614
10888
  function DepositSuccessToast({
10615
10889
  depositTx,
10616
- completionTx,
10617
10890
  orderSubmittedAt,
10618
- orderFilledAt,
10619
- explorerUrl,
10620
- completionExplorerUrl,
10621
10891
  status,
10622
10892
  tokenIconUrl,
10893
+ sourceAmountBaseUnit = "0",
10623
10894
  onClose
10624
10895
  }) {
10625
- const execution = {
10626
- id: depositTx,
10627
- transaction_hash: depositTx,
10628
- explorer_url: explorerUrl,
10629
- destination_transaction_hashes: completionTx ? [completionTx] : void 0,
10630
- status,
10631
- created_at: orderSubmittedAt,
10632
- updated_at: orderFilledAt,
10633
- source_token_metadata: tokenIconUrl ? { icon_url: tokenIconUrl } : void 0
10896
+ const isPending = status === "pending" || status === "waiting" || status === "delayed";
10897
+ const formatDateTime = (timestamp) => {
10898
+ try {
10899
+ const date = new Date(timestamp);
10900
+ const monthDay = date.toLocaleDateString("en-US", {
10901
+ month: "short",
10902
+ day: "numeric",
10903
+ year: "numeric"
10904
+ });
10905
+ const time = date.toLocaleTimeString("en-US", {
10906
+ hour: "numeric",
10907
+ minute: "2-digit",
10908
+ hour12: true
10909
+ }).toLowerCase();
10910
+ return `${monthDay} at ${time}`;
10911
+ } catch {
10912
+ return timestamp;
10913
+ }
10634
10914
  };
10635
- return /* @__PURE__ */ jsx72("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ jsx72(
10636
- DepositExecutionItem,
10637
- {
10638
- execution,
10639
- showCloseButton: true,
10640
- onClose
10915
+ const formatUsdAmount = (baseUnitAmount) => {
10916
+ try {
10917
+ const amount = Number(baseUnitAmount) / 1e6;
10918
+ return new Intl.NumberFormat("en-US", {
10919
+ style: "currency",
10920
+ currency: "USD",
10921
+ minimumFractionDigits: 2,
10922
+ maximumFractionDigits: 2
10923
+ }).format(amount);
10924
+ } catch {
10925
+ return "$0.00";
10641
10926
  }
10642
- ) });
10927
+ };
10928
+ return /* @__PURE__ */ jsx82("div", { className: "uf-w-full uf-animate-in uf-slide-in-from-bottom-2 uf-duration-300", children: /* @__PURE__ */ jsxs6("div", { className: "uf-bg-card uf-border uf-border-border uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-gap-3", children: [
10929
+ /* @__PURE__ */ jsxs6("div", { className: "uf-relative uf-flex-shrink-0", children: [
10930
+ /* @__PURE__ */ jsx82(
10931
+ "img",
10932
+ {
10933
+ src: tokenIconUrl || getIconUrl("/icons/tokens/usdc.svg"),
10934
+ alt: "Token",
10935
+ width: 36,
10936
+ height: 36,
10937
+ className: "uf-rounded-full"
10938
+ }
10939
+ ),
10940
+ isPending ? /* @__PURE__ */ jsx82("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-yellow-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx82(
10941
+ "svg",
10942
+ {
10943
+ width: "10",
10944
+ height: "10",
10945
+ viewBox: "0 0 12 12",
10946
+ fill: "none",
10947
+ className: "uf-animate-spin",
10948
+ children: /* @__PURE__ */ jsx82(
10949
+ "path",
10950
+ {
10951
+ d: "M6 1V3M6 9V11M1 6H3M9 6H11M2.5 2.5L4 4M8 8L9.5 9.5M2.5 9.5L4 8M8 4L9.5 2.5",
10952
+ stroke: "white",
10953
+ strokeWidth: "2",
10954
+ strokeLinecap: "round"
10955
+ }
10956
+ )
10957
+ }
10958
+ ) }) : /* @__PURE__ */ jsx82("div", { className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-bg-green-500 uf-rounded-full uf-p-0.5", children: /* @__PURE__ */ jsx82("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx82(
10959
+ "path",
10960
+ {
10961
+ d: "M10 3L4.5 8.5L2 6",
10962
+ stroke: "white",
10963
+ strokeWidth: "2",
10964
+ strokeLinecap: "round",
10965
+ strokeLinejoin: "round"
10966
+ }
10967
+ ) }) })
10968
+ ] }),
10969
+ /* @__PURE__ */ jsxs6("div", { className: "uf-flex-1 uf-min-w-0", children: [
10970
+ /* @__PURE__ */ jsx82("h3", { className: "uf-text-foreground uf-font-medium uf-text-sm", children: isPending ? "Deposit received" : "Deposit completed" }),
10971
+ /* @__PURE__ */ jsx82("p", { className: "uf-text-muted-foreground uf-text-xs", children: formatDateTime(orderSubmittedAt) })
10972
+ ] }),
10973
+ /* @__PURE__ */ jsx82("div", { className: "uf-text-foreground uf-font-medium uf-text-sm uf-flex-shrink-0", children: formatUsdAmount(sourceAmountBaseUnit) }),
10974
+ /* @__PURE__ */ jsx82(
10975
+ "button",
10976
+ {
10977
+ onClick: onClose,
10978
+ className: "uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-p-0.5 uf-flex-shrink-0",
10979
+ children: /* @__PURE__ */ jsx82(X, { className: "uf-w-4 uf-h-4" })
10980
+ }
10981
+ )
10982
+ ] }) });
10643
10983
  }
10644
10984
  var Select2 = Root23;
10645
10985
  var SelectValue2 = Value;
10646
- var SelectTrigger2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(
10986
+ var SelectTrigger2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
10647
10987
  Trigger,
10648
10988
  {
10649
10989
  ref,
@@ -10654,12 +10994,12 @@ var SelectTrigger2 = React38.forwardRef(({ className, children, ...props }, ref)
10654
10994
  ...props,
10655
10995
  children: [
10656
10996
  children,
10657
- /* @__PURE__ */ jsx82(Icon, { asChild: true, children: /* @__PURE__ */ jsx82(ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
10997
+ /* @__PURE__ */ jsx92(Icon, { asChild: true, children: /* @__PURE__ */ jsx92(ChevronDown, { className: "uf-h-4 uf-w-4 uf-opacity-50" }) })
10658
10998
  ]
10659
10999
  }
10660
11000
  ));
10661
11001
  SelectTrigger2.displayName = Trigger.displayName;
10662
- var SelectScrollUpButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx82(
11002
+ var SelectScrollUpButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx92(
10663
11003
  ScrollUpButton,
10664
11004
  {
10665
11005
  ref,
@@ -10668,11 +11008,11 @@ var SelectScrollUpButton2 = React38.forwardRef(({ className, ...props }, ref) =>
10668
11008
  className
10669
11009
  ),
10670
11010
  ...props,
10671
- children: /* @__PURE__ */ jsx82(ChevronUp, { className: "uf-h-4 uf-w-4" })
11011
+ children: /* @__PURE__ */ jsx92(ChevronUp, { className: "uf-h-4 uf-w-4" })
10672
11012
  }
10673
11013
  ));
10674
11014
  SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
10675
- var SelectScrollDownButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx82(
11015
+ var SelectScrollDownButton2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx92(
10676
11016
  ScrollDownButton,
10677
11017
  {
10678
11018
  ref,
@@ -10681,13 +11021,13 @@ var SelectScrollDownButton2 = React38.forwardRef(({ className, ...props }, ref)
10681
11021
  className
10682
11022
  ),
10683
11023
  ...props,
10684
- children: /* @__PURE__ */ jsx82(ChevronDown, { className: "uf-h-4 uf-w-4" })
11024
+ children: /* @__PURE__ */ jsx92(ChevronDown, { className: "uf-h-4 uf-w-4" })
10685
11025
  }
10686
11026
  ));
10687
11027
  SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
10688
11028
  var SelectContent2 = React38.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
10689
11029
  const { themeClass } = useTheme();
10690
- return /* @__PURE__ */ jsx82(Portal3, { children: /* @__PURE__ */ jsxs5(
11030
+ return /* @__PURE__ */ jsx92(Portal3, { children: /* @__PURE__ */ jsxs7(
10691
11031
  Content22,
10692
11032
  {
10693
11033
  ref,
@@ -10700,8 +11040,8 @@ var SelectContent2 = React38.forwardRef(({ className, children, position = "popp
10700
11040
  position,
10701
11041
  ...props,
10702
11042
  children: [
10703
- /* @__PURE__ */ jsx82(SelectScrollUpButton2, {}),
10704
- /* @__PURE__ */ jsx82(
11043
+ /* @__PURE__ */ jsx92(SelectScrollUpButton2, {}),
11044
+ /* @__PURE__ */ jsx92(
10705
11045
  Viewport,
10706
11046
  {
10707
11047
  className: cn(
@@ -10711,13 +11051,13 @@ var SelectContent2 = React38.forwardRef(({ className, children, position = "popp
10711
11051
  children
10712
11052
  }
10713
11053
  ),
10714
- /* @__PURE__ */ jsx82(SelectScrollDownButton2, {})
11054
+ /* @__PURE__ */ jsx92(SelectScrollDownButton2, {})
10715
11055
  ]
10716
11056
  }
10717
11057
  ) });
10718
11058
  });
10719
11059
  SelectContent2.displayName = Content22.displayName;
10720
- var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx82(
11060
+ var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx92(
10721
11061
  Label,
10722
11062
  {
10723
11063
  ref,
@@ -10726,7 +11066,7 @@ var SelectLabel2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PU
10726
11066
  }
10727
11067
  ));
10728
11068
  SelectLabel2.displayName = Label.displayName;
10729
- var SelectItem2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(
11069
+ var SelectItem2 = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
10730
11070
  Item,
10731
11071
  {
10732
11072
  ref,
@@ -10736,13 +11076,13 @@ var SelectItem2 = React38.forwardRef(({ className, children, ...props }, ref) =>
10736
11076
  ),
10737
11077
  ...props,
10738
11078
  children: [
10739
- /* @__PURE__ */ jsx82("span", { className: "uf-absolute uf-left-2 uf-flex uf-h-3.5 uf-w-3.5 uf-items-center uf-justify-center", children: /* @__PURE__ */ jsx82(ItemIndicator, { children: /* @__PURE__ */ jsx82(Check, { className: "uf-h-4 uf-w-4" }) }) }),
10740
- /* @__PURE__ */ jsx82(ItemText, { children })
11079
+ /* @__PURE__ */ jsx92("span", { className: "uf-absolute uf-left-2 uf-flex uf-h-3.5 uf-w-3.5 uf-items-center uf-justify-center", children: /* @__PURE__ */ jsx92(ItemIndicator, { children: /* @__PURE__ */ jsx92(Check, { className: "uf-h-4 uf-w-4" }) }) }),
11080
+ /* @__PURE__ */ jsx92(ItemText, { children })
10741
11081
  ]
10742
11082
  }
10743
11083
  ));
10744
11084
  SelectItem2.displayName = Item.displayName;
10745
- var SelectSeparator2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx82(
11085
+ var SelectSeparator2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx92(
10746
11086
  Separator,
10747
11087
  {
10748
11088
  ref,
@@ -10779,7 +11119,7 @@ var buttonVariants = cva(
10779
11119
  var Button = React42.forwardRef(
10780
11120
  ({ className, variant, size: size4, asChild = false, ...props }, ref) => {
10781
11121
  const Comp = asChild ? Slot3 : "button";
10782
- return /* @__PURE__ */ jsx92(
11122
+ return /* @__PURE__ */ jsx102(
10783
11123
  Comp,
10784
11124
  {
10785
11125
  className: cn(buttonVariants({ variant, size: size4, className })),
@@ -10795,7 +11135,7 @@ var Tooltip2 = Root32;
10795
11135
  var TooltipTrigger2 = Trigger2;
10796
11136
  var TooltipContent2 = React52.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
10797
11137
  const { themeClass } = useTheme();
10798
- return /* @__PURE__ */ jsx102(Portal4, { children: /* @__PURE__ */ jsx102(
11138
+ return /* @__PURE__ */ jsx112(Portal4, { children: /* @__PURE__ */ jsx112(
10799
11139
  Content23,
10800
11140
  {
10801
11141
  ref,
@@ -10895,15 +11235,17 @@ function TransferCryptoBase({
10895
11235
  showDetailedDropdowns = false,
10896
11236
  onExecutionsChange,
10897
11237
  onDepositSuccess,
10898
- onDepositError
11238
+ onDepositError,
11239
+ wallets: externalWallets
10899
11240
  }) {
10900
11241
  const { themeClass } = useTheme();
10901
11242
  const isDarkMode = themeClass.includes("uf-dark");
10902
11243
  const [token, setToken] = useState22("USDC");
10903
11244
  const [chain, setChain] = useState22("solana:mainnet");
10904
11245
  const [copied, setCopied] = useState22(false);
10905
- const [wallets, setWallets] = useState22([]);
10906
- const [loading, setLoading] = useState22(true);
11246
+ const [internalWallets, setInternalWallets] = useState22([]);
11247
+ const [loading, setLoading] = useState22(!externalWallets?.length);
11248
+ const wallets = externalWallets?.length ? externalWallets : internalWallets;
10907
11249
  const [error, setError] = useState22(null);
10908
11250
  const [depositExecutions, setDepositExecutions] = useState22([]);
10909
11251
  const [trackedExecutions, setTrackedExecutions] = useState22(/* @__PURE__ */ new Map());
@@ -10967,9 +11309,16 @@ function TransferCryptoBase({
10967
11309
  }
10968
11310
  }, [depositExecutions, onExecutionsChange]);
10969
11311
  useEffect32(() => {
10970
- async function fetchWallets() {
11312
+ if (externalWallets?.length) {
11313
+ setLoading(false);
11314
+ return;
11315
+ }
11316
+ let retryTimeout = null;
11317
+ let isCancelled = false;
11318
+ const fetchWallets = async () => {
11319
+ if (isCancelled) return;
11320
+ setLoading(true);
10971
11321
  try {
10972
- setLoading(true);
10973
11322
  const response = await createEOA(
10974
11323
  {
10975
11324
  user_id: userId,
@@ -10980,23 +11329,35 @@ function TransferCryptoBase({
10980
11329
  },
10981
11330
  publishableKey
10982
11331
  );
10983
- setWallets(response.data);
10984
- setError(null);
11332
+ if (!isCancelled) {
11333
+ setInternalWallets(response.data);
11334
+ setError(null);
11335
+ setLoading(false);
11336
+ }
10985
11337
  } catch (err) {
10986
- setError(err instanceof Error ? err.message : "Failed to load wallets");
10987
- console.error("Error fetching wallets:", err);
10988
- } finally {
10989
- setLoading(false);
11338
+ console.error("Error fetching wallets, retrying in 5s:", err);
11339
+ if (!isCancelled) {
11340
+ setError(err instanceof Error ? err.message : "Failed to load wallets");
11341
+ setLoading(false);
11342
+ retryTimeout = setTimeout(fetchWallets, 5e3);
11343
+ }
10990
11344
  }
10991
- }
11345
+ };
10992
11346
  fetchWallets();
11347
+ return () => {
11348
+ isCancelled = true;
11349
+ if (retryTimeout) {
11350
+ clearTimeout(retryTimeout);
11351
+ }
11352
+ };
10993
11353
  }, [
10994
11354
  userId,
10995
11355
  recipientAddress,
10996
11356
  destinationChainType,
10997
11357
  destinationChainId,
10998
11358
  destinationTokenAddress,
10999
- publishableKey
11359
+ publishableKey,
11360
+ externalWallets
11000
11361
  ]);
11001
11362
  useEffect32(() => {
11002
11363
  if (!supportedTokens.length) return;
@@ -11120,8 +11481,8 @@ function TransferCryptoBase({
11120
11481
  const processingTime = currentChainFromBackend?.estimated_processing_time ?? null;
11121
11482
  const minDepositUsd = currentChainFromBackend?.minimum_deposit_amount_usd ?? 3;
11122
11483
  const renderTokenItem = (tokenData) => {
11123
- return /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11124
- /* @__PURE__ */ jsx112(
11484
+ return /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11485
+ /* @__PURE__ */ jsx122(
11125
11486
  "img",
11126
11487
  {
11127
11488
  src: tokenData.icon_url,
@@ -11131,13 +11492,13 @@ function TransferCryptoBase({
11131
11492
  className: "uf-rounded-full uf-flex-shrink-0"
11132
11493
  }
11133
11494
  ),
11134
- /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
11135
- showDetailedDropdowns && /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
11495
+ /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: tokenData.symbol }),
11496
+ showDetailedDropdowns && /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-text-muted-foreground", children: tokenData.name })
11136
11497
  ] });
11137
11498
  };
11138
11499
  const renderChainItem = (chainData) => {
11139
- return /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11140
- /* @__PURE__ */ jsx112(
11500
+ return /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11501
+ /* @__PURE__ */ jsx122(
11141
11502
  "img",
11142
11503
  {
11143
11504
  src: chainData.icon_url,
@@ -11147,24 +11508,24 @@ function TransferCryptoBase({
11147
11508
  className: "uf-rounded-full uf-flex-shrink-0"
11148
11509
  }
11149
11510
  ),
11150
- /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
11151
- showDetailedDropdowns && /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
11511
+ /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: chainData.chain_name }),
11512
+ showDetailedDropdowns && /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-text-muted-foreground uf-capitalize", children: chainData.chain_type })
11152
11513
  ] });
11153
11514
  };
11154
11515
  const selectContainerClass = layoutVariant === "horizontal" ? "uf-grid uf-grid-cols-2 uf-gap-2.5" : "uf-space-y-3";
11155
- return /* @__PURE__ */ jsx112(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs6("div", { className: "uf-space-y-3", children: [
11156
- /* @__PURE__ */ jsxs6("div", { className: selectContainerClass, children: [
11157
- /* @__PURE__ */ jsxs6("div", { children: [
11158
- /* @__PURE__ */ jsx112("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
11159
- /* @__PURE__ */ jsxs6(
11516
+ return /* @__PURE__ */ jsx122(TooltipProvider2, { delayDuration: 0, skipDelayDuration: 0, children: /* @__PURE__ */ jsxs8("div", { className: "uf-space-y-3", children: [
11517
+ /* @__PURE__ */ jsxs8("div", { className: selectContainerClass, children: [
11518
+ /* @__PURE__ */ jsxs8("div", { children: [
11519
+ /* @__PURE__ */ jsx122("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: t.supportedToken }),
11520
+ /* @__PURE__ */ jsxs8(
11160
11521
  Select2,
11161
11522
  {
11162
11523
  value: token,
11163
11524
  onValueChange: setToken,
11164
11525
  disabled: tokensLoading || supportedTokens.length === 0,
11165
11526
  children: [
11166
- /* @__PURE__ */ jsx112(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx112(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
11167
- /* @__PURE__ */ jsx112(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx112(
11527
+ /* @__PURE__ */ jsx122(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx122(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : selectedToken ? renderTokenItem(selectedToken) : /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: token }) }) }) }),
11528
+ /* @__PURE__ */ jsx122(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: supportedTokens.map((tokenData) => /* @__PURE__ */ jsx122(
11168
11529
  SelectItem2,
11169
11530
  {
11170
11531
  value: tokenData.symbol,
@@ -11177,51 +11538,51 @@ function TransferCryptoBase({
11177
11538
  }
11178
11539
  )
11179
11540
  ] }),
11180
- /* @__PURE__ */ jsxs6("div", { children: [
11181
- /* @__PURE__ */ jsxs6("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
11541
+ /* @__PURE__ */ jsxs8("div", { children: [
11542
+ /* @__PURE__ */ jsxs8("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-gap-1", children: [
11182
11543
  t.supportedChain,
11183
- /* @__PURE__ */ jsxs6("span", { className: "uf-text-[10px]", children: [
11544
+ /* @__PURE__ */ jsxs8("span", { className: "uf-text-[10px]", children: [
11184
11545
  "$",
11185
11546
  minDepositUsd,
11186
11547
  " ",
11187
11548
  t.minDeposit.label
11188
11549
  ] }),
11189
- /* @__PURE__ */ jsxs6(Tooltip2, { children: [
11190
- /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11550
+ /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11551
+ /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11191
11552
  "span",
11192
11553
  {
11193
11554
  className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
11194
11555
  tabIndex: 0,
11195
11556
  role: "button",
11196
11557
  "aria-label": "Minimum deposit information",
11197
- children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11558
+ children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11198
11559
  }
11199
11560
  ) }),
11200
- /* @__PURE__ */ jsx112(
11561
+ /* @__PURE__ */ jsx122(
11201
11562
  TooltipContent2,
11202
11563
  {
11203
11564
  side: "left",
11204
11565
  align: "center",
11205
11566
  className: "uf-max-w-[200px]",
11206
- children: /* @__PURE__ */ jsx112("p", { children: t.minDeposit.tooltip })
11567
+ children: /* @__PURE__ */ jsx122("p", { children: t.minDeposit.tooltip })
11207
11568
  }
11208
11569
  )
11209
11570
  ] })
11210
11571
  ] }),
11211
- /* @__PURE__ */ jsxs6(
11572
+ /* @__PURE__ */ jsxs8(
11212
11573
  Select2,
11213
11574
  {
11214
11575
  value: chain,
11215
11576
  onValueChange: setChain,
11216
11577
  disabled: tokensLoading || availableChainsForToken.length === 0,
11217
11578
  children: [
11218
- /* @__PURE__ */ jsx112(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx112(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx112("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
11219
- /* @__PURE__ */ jsx112(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx112("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
11579
+ /* @__PURE__ */ jsx122(SelectTrigger2, { className: "uf-bg-secondary uf-border-none uf-rounded-lg uf-h-10 hover:uf-bg-accent uf-text-foreground focus:uf-ring-1 focus:uf-ring-ring disabled:uf-opacity-50", children: /* @__PURE__ */ jsx122(SelectValue2, { children: tokensLoading ? /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: t.loading }) }) : currentChainFromBackend ? renderChainItem(currentChainFromBackend) : currentChainData ? renderChainItem(currentChainData) : /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-items-center uf-gap-2", children: /* @__PURE__ */ jsx122("span", { className: "uf-text-xs uf-font-normal", children: chain }) }) }) }),
11580
+ /* @__PURE__ */ jsx122(SelectContent2, { className: "uf-bg-secondary uf-border uf-text-foreground uf-max-h-[300px]", children: availableChainsForToken.length === 0 ? /* @__PURE__ */ jsx122("div", { className: "uf-px-2 uf-py-3 uf-text-xs uf-text-muted-foreground uf-text-center", children: t.noChainsAvailable }) : availableChainsForToken.map((chainData) => {
11220
11581
  const chainKey = getChainKey(
11221
11582
  chainData.chain_id,
11222
11583
  chainData.chain_type
11223
11584
  );
11224
- return /* @__PURE__ */ jsx112(
11585
+ return /* @__PURE__ */ jsx122(
11225
11586
  SelectItem2,
11226
11587
  {
11227
11588
  value: chainKey,
@@ -11236,110 +11597,110 @@ function TransferCryptoBase({
11236
11597
  )
11237
11598
  ] })
11238
11599
  ] }),
11239
- /* @__PURE__ */ jsx112("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx112("div", { className: "uf-bg-card uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx112(
11600
+ /* @__PURE__ */ jsx122("div", { className: "uf-flex uf-justify-center uf-py-2", children: /* @__PURE__ */ jsx122("div", { className: "uf-bg-card uf-p-4 uf-rounded-2xl uf-shadow-lg uf-border uf-border-border", children: loading ? /* @__PURE__ */ jsx122(
11240
11601
  "div",
11241
11602
  {
11242
11603
  className: "uf-flex uf-items-center uf-justify-center",
11243
11604
  style: { width: 180, height: 180 },
11244
- children: /* @__PURE__ */ jsx112("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
11605
+ children: /* @__PURE__ */ jsx122("div", { className: "uf-text-foreground uf-text-sm", children: t.loadingQRCode })
11245
11606
  }
11246
- ) : depositAddress ? /* @__PURE__ */ jsx112(
11607
+ ) : depositAddress ? /* @__PURE__ */ jsx122(
11247
11608
  StyledQRCode,
11248
11609
  {
11249
11610
  value: depositAddress,
11250
11611
  size: 180,
11251
- imageUrl: currentChainData?.icon_url || currentChainFromBackend?.icon_url || getIconUrl("/icons/networks/ethereum.svg"),
11612
+ imageUrl: currentChainData?.icon_url || currentChainFromBackend?.icon_url,
11252
11613
  imageSize: 45,
11253
11614
  darkMode: isDarkMode
11254
11615
  },
11255
11616
  `qr-${depositAddress}-${chain}`
11256
- ) : /* @__PURE__ */ jsx112(
11617
+ ) : /* @__PURE__ */ jsx122(
11257
11618
  "div",
11258
11619
  {
11259
11620
  className: "uf-flex uf-items-center uf-justify-center",
11260
11621
  style: { width: 180, height: 180 },
11261
- children: /* @__PURE__ */ jsx112("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
11622
+ children: /* @__PURE__ */ jsx122("div", { className: "uf-text-red-400 uf-text-sm", children: t.noAddressAvailable })
11262
11623
  }
11263
11624
  ) }) }),
11264
- /* @__PURE__ */ jsxs6("div", { children: [
11265
- /* @__PURE__ */ jsxs6("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-justify-between", children: [
11266
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-gap-1", children: [
11625
+ /* @__PURE__ */ jsxs8("div", { children: [
11626
+ /* @__PURE__ */ jsxs8("div", { className: "uf-text-xs uf-text-muted-foreground uf-mb-2 uf-flex uf-items-center uf-justify-between", children: [
11627
+ /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-1", children: [
11267
11628
  t.depositAddress.label,
11268
- /* @__PURE__ */ jsxs6(Tooltip2, { children: [
11269
- /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11629
+ /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11630
+ /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11270
11631
  "span",
11271
11632
  {
11272
11633
  className: "uf-inline-flex uf-cursor-pointer uf-transition-colors hover:uf-text-foreground",
11273
11634
  tabIndex: 0,
11274
11635
  role: "button",
11275
11636
  "aria-label": "Deposit address information",
11276
- children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11637
+ children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11277
11638
  }
11278
11639
  ) }),
11279
- /* @__PURE__ */ jsx112(
11640
+ /* @__PURE__ */ jsx122(
11280
11641
  TooltipContent2,
11281
11642
  {
11282
11643
  side: "top",
11283
11644
  align: "center",
11284
11645
  className: "uf-max-w-[240px]",
11285
- children: /* @__PURE__ */ jsx112("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
11646
+ children: /* @__PURE__ */ jsx122("p", { children: t.depositAddress.tooltip.replace("{{token}}", token) })
11286
11647
  }
11287
11648
  )
11288
11649
  ] })
11289
11650
  ] }),
11290
- copyButtonMode === "compact" && /* @__PURE__ */ jsx112(
11651
+ copyButtonMode === "compact" && /* @__PURE__ */ jsx122(
11291
11652
  "button",
11292
11653
  {
11293
11654
  onClick: handleCopyAddress,
11294
11655
  disabled: loading || !depositAddress,
11295
11656
  className: "uf-flex uf-items-center uf-gap-1 uf-text-xs uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
11296
- children: copied ? /* @__PURE__ */ jsxs6(Fragment23, { children: [
11297
- /* @__PURE__ */ jsx112(Check, { className: "uf-w-3 uf-h-3" }),
11298
- /* @__PURE__ */ jsx112("span", { children: t.copied })
11299
- ] }) : /* @__PURE__ */ jsxs6(Fragment23, { children: [
11300
- /* @__PURE__ */ jsx112(Copy, { className: "uf-w-3 uf-h-3" }),
11301
- /* @__PURE__ */ jsx112("span", { children: t.copyAddress })
11657
+ children: copied ? /* @__PURE__ */ jsxs8(Fragment23, { children: [
11658
+ /* @__PURE__ */ jsx122(Check, { className: "uf-w-3 uf-h-3" }),
11659
+ /* @__PURE__ */ jsx122("span", { children: t.copied })
11660
+ ] }) : /* @__PURE__ */ jsxs8(Fragment23, { children: [
11661
+ /* @__PURE__ */ jsx122(Copy, { className: "uf-w-3 uf-h-3" }),
11662
+ /* @__PURE__ */ jsx122("span", { children: t.copyAddress })
11302
11663
  ] })
11303
11664
  }
11304
11665
  )
11305
11666
  ] }),
11306
- loading ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all", children: depositAddress || t.noAddressAvailable })
11667
+ loading ? /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-muted-foreground uf-animate-pulse", children: t.loading }) : error ? /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-text-red-400", children: error }) : /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-lg uf-px-3 uf-py-2.5 uf-text-xs uf-font-mono uf-break-all", children: depositAddress || t.noAddressAvailable })
11307
11668
  ] }),
11308
- copyButtonMode === "fullWidth" && /* @__PURE__ */ jsx112(
11669
+ copyButtonMode === "fullWidth" && /* @__PURE__ */ jsx122(
11309
11670
  Button,
11310
11671
  {
11311
11672
  onClick: handleCopyAddress,
11312
11673
  disabled: loading || !depositAddress,
11313
11674
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-text-foreground uf-rounded-lg uf-h-9 uf-text-sm uf-font-medium disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
11314
- children: copied ? /* @__PURE__ */ jsxs6(Fragment23, { children: [
11315
- /* @__PURE__ */ jsx112(Check, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
11675
+ children: copied ? /* @__PURE__ */ jsxs8(Fragment23, { children: [
11676
+ /* @__PURE__ */ jsx122(Check, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
11316
11677
  t.copied
11317
- ] }) : /* @__PURE__ */ jsxs6(Fragment23, { children: [
11318
- /* @__PURE__ */ jsx112(Copy, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
11678
+ ] }) : /* @__PURE__ */ jsxs8(Fragment23, { children: [
11679
+ /* @__PURE__ */ jsx122(Copy, { className: "uf-w-4 uf-h-4 uf-mr-2" }),
11319
11680
  t.copyAddress
11320
11681
  ] })
11321
11682
  }
11322
11683
  ),
11323
- /* @__PURE__ */ jsxs6("div", { className: "uf-border-t uf-border-border", children: [
11324
- /* @__PURE__ */ jsxs6(
11684
+ /* @__PURE__ */ jsxs8("div", { className: "uf-border-t uf-border-border", children: [
11685
+ /* @__PURE__ */ jsxs8(
11325
11686
  "button",
11326
11687
  {
11327
11688
  onClick: () => setDetailsExpanded(!detailsExpanded),
11328
11689
  className: "uf-w-full uf-flex uf-items-center uf-justify-between uf-py-2.5",
11329
11690
  children: [
11330
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11331
- /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
11332
- /* @__PURE__ */ jsxs6("span", { className: "uf-text-xs", children: [
11691
+ /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11692
+ /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(DollarSign, { className: "uf-w-3 uf-h-3" }) }),
11693
+ /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11333
11694
  t.priceImpact.label,
11334
11695
  ":",
11335
11696
  " ",
11336
- /* @__PURE__ */ jsxs6("span", { className: "uf-text-foreground", children: [
11697
+ /* @__PURE__ */ jsxs8("span", { className: "uf-text-foreground", children: [
11337
11698
  priceImpact.toFixed(2),
11338
11699
  "%"
11339
11700
  ] })
11340
11701
  ] }),
11341
- /* @__PURE__ */ jsxs6(Tooltip2, { children: [
11342
- /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11702
+ /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11703
+ /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11343
11704
  "span",
11344
11705
  {
11345
11706
  className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
@@ -11352,75 +11713,75 @@ function TransferCryptoBase({
11352
11713
  tabIndex: 0,
11353
11714
  role: "button",
11354
11715
  "aria-label": "Price impact information",
11355
- children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11716
+ children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11356
11717
  }
11357
11718
  ) }),
11358
- /* @__PURE__ */ jsx112(
11719
+ /* @__PURE__ */ jsx122(
11359
11720
  TooltipContent2,
11360
11721
  {
11361
11722
  side: "top",
11362
11723
  align: "center",
11363
11724
  className: "uf-max-w-[240px]",
11364
- children: /* @__PURE__ */ jsx112("p", { children: t.priceImpact.tooltip })
11725
+ children: /* @__PURE__ */ jsx122("p", { children: t.priceImpact.tooltip })
11365
11726
  }
11366
11727
  )
11367
11728
  ] })
11368
11729
  ] }),
11369
- detailsExpanded ? /* @__PURE__ */ jsx112(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx112(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
11730
+ detailsExpanded ? /* @__PURE__ */ jsx122(ChevronUp, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" }) : /* @__PURE__ */ jsx122(ChevronDown, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground" })
11370
11731
  ]
11371
11732
  }
11372
11733
  ),
11373
- detailsExpanded && /* @__PURE__ */ jsxs6("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
11374
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11375
- /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
11376
- /* @__PURE__ */ jsxs6("span", { className: "uf-text-xs", children: [
11734
+ detailsExpanded && /* @__PURE__ */ jsxs8("div", { className: "uf-pb-3 uf-space-y-2.5", children: [
11735
+ /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11736
+ /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(ShieldCheck, { className: "uf-w-3 uf-h-3" }) }),
11737
+ /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11377
11738
  t.slippage.label,
11378
11739
  ":",
11379
11740
  " ",
11380
- /* @__PURE__ */ jsxs6("span", { className: "uf-text-foreground", children: [
11741
+ /* @__PURE__ */ jsxs8("span", { className: "uf-text-foreground", children: [
11381
11742
  t.slippage.auto,
11382
11743
  " \u2022 ",
11383
11744
  maxSlippage.toFixed(2),
11384
11745
  "%"
11385
11746
  ] })
11386
11747
  ] }),
11387
- /* @__PURE__ */ jsxs6(Tooltip2, { children: [
11388
- /* @__PURE__ */ jsx112(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx112(
11748
+ /* @__PURE__ */ jsxs8(Tooltip2, { children: [
11749
+ /* @__PURE__ */ jsx122(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx122(
11389
11750
  "span",
11390
11751
  {
11391
11752
  className: "uf-inline-flex uf-cursor-pointer uf-text-muted-foreground uf-transition-colors hover:uf-text-foreground",
11392
11753
  tabIndex: 0,
11393
11754
  role: "button",
11394
11755
  "aria-label": "Slippage information",
11395
- children: /* @__PURE__ */ jsx112(Info, { className: "uf-w-3 uf-h-3" })
11756
+ children: /* @__PURE__ */ jsx122(Info, { className: "uf-w-3 uf-h-3" })
11396
11757
  }
11397
11758
  ) }),
11398
- /* @__PURE__ */ jsx112(
11759
+ /* @__PURE__ */ jsx122(
11399
11760
  TooltipContent2,
11400
11761
  {
11401
11762
  side: "top",
11402
11763
  align: "center",
11403
11764
  className: "uf-max-w-[240px]",
11404
- children: /* @__PURE__ */ jsx112("p", { children: t.slippage.tooltip })
11765
+ children: /* @__PURE__ */ jsx122("p", { children: t.slippage.tooltip })
11405
11766
  }
11406
11767
  )
11407
11768
  ] })
11408
11769
  ] }),
11409
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11410
- /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(Clock, { className: "uf-w-3 uf-h-3" }) }),
11411
- /* @__PURE__ */ jsxs6("span", { className: "uf-text-xs", children: [
11770
+ /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11771
+ /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(Clock, { className: "uf-w-3 uf-h-3" }) }),
11772
+ /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11412
11773
  t.processingTime.label,
11413
11774
  ":",
11414
11775
  " ",
11415
- /* @__PURE__ */ jsx112("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
11776
+ /* @__PURE__ */ jsx122("span", { className: "uf-text-foreground", children: formatProcessingTime(processingTime) })
11416
11777
  ] })
11417
11778
  ] }),
11418
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11419
- /* @__PURE__ */ jsx112("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx112(FileText, { className: "uf-w-3 uf-h-3" }) }),
11420
- /* @__PURE__ */ jsxs6("span", { className: "uf-text-xs", children: [
11779
+ /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
11780
+ /* @__PURE__ */ jsx122("div", { className: "uf-bg-secondary uf-rounded-full uf-p-1", children: /* @__PURE__ */ jsx122(FileText, { className: "uf-w-3 uf-h-3" }) }),
11781
+ /* @__PURE__ */ jsxs8("span", { className: "uf-text-xs", children: [
11421
11782
  t.help.needHelp,
11422
11783
  " ",
11423
- /* @__PURE__ */ jsx112(
11784
+ /* @__PURE__ */ jsx122(
11424
11785
  "a",
11425
11786
  {
11426
11787
  href: "#",
@@ -11431,8 +11792,8 @@ function TransferCryptoBase({
11431
11792
  ] })
11432
11793
  ] })
11433
11794
  ] }),
11434
- /* @__PURE__ */ jsxs6("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
11435
- /* @__PURE__ */ jsx112(
11795
+ /* @__PURE__ */ jsxs8("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-pt-2", children: [
11796
+ /* @__PURE__ */ jsx122(
11436
11797
  "a",
11437
11798
  {
11438
11799
  href: "https://unifold.io/terms",
@@ -11441,38 +11802,37 @@ function TransferCryptoBase({
11441
11802
  children: t.terms.termsApply
11442
11803
  }
11443
11804
  ),
11444
- depositExecutions.length > 1 && /* @__PURE__ */ jsxs6(
11805
+ depositExecutions.length > 1 && /* @__PURE__ */ jsxs8(
11445
11806
  "button",
11446
11807
  {
11447
11808
  onClick: () => setDepositsModalOpen(true),
11448
11809
  className: "uf-flex uf-items-center uf-gap-1 uf-text-muted-foreground hover:uf-text-foreground uf-transition-colors uf-animate-in uf-fade-in uf-slide-in-from-right-8 uf-duration-1000",
11449
11810
  children: [
11450
- /* @__PURE__ */ jsx112(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
11811
+ /* @__PURE__ */ jsx122(Clock, { className: "uf-w-3.5 uf-h-3.5" }),
11451
11812
  "Track deposits (",
11452
11813
  depositExecutions.length,
11453
11814
  ")",
11454
- /* @__PURE__ */ jsx112(ChevronRight, { className: "uf-w-3 uf-h-3" })
11815
+ /* @__PURE__ */ jsx122(ChevronRight, { className: "uf-w-3 uf-h-3" })
11455
11816
  ]
11456
11817
  }
11457
11818
  )
11458
11819
  ] })
11459
11820
  ] }),
11460
- depositExecutions.length === 1 && /* @__PURE__ */ jsx112("div", { className: "uf-fixed uf-bottom-4 uf-left-1/2 uf--translate-x-1/2 uf-w-[360px] uf-max-w-[calc(100vw-2rem)] uf-z-[100]", children: /* @__PURE__ */ jsx112(
11821
+ depositExecutions.length === 1 && /* @__PURE__ */ jsx122("div", { className: "uf-fixed uf-bottom-4 uf-left-1/2 uf--translate-x-1/2 uf-w-[360px] uf-max-w-[calc(100vw-2rem)] uf-z-[100]", children: /* @__PURE__ */ jsx122(
11461
11822
  DepositSuccessToast,
11462
11823
  {
11463
11824
  depositTx: depositExecutions[0].transaction_hash,
11464
- completionTx: depositExecutions[0].destination_transaction_hashes?.[0] || (depositExecutions[0].status === "succeeded" ? depositExecutions[0].transaction_hash : void 0),
11465
11825
  orderSubmittedAt: depositExecutions[0].created_at || (/* @__PURE__ */ new Date()).toISOString(),
11466
11826
  orderFilledAt: depositExecutions[0].updated_at || (/* @__PURE__ */ new Date()).toISOString(),
11467
11827
  explorerUrl: depositExecutions[0].explorer_url,
11468
- completionExplorerUrl: depositExecutions[0].destination_transaction_hashes?.[0] ? `https://polygonscan.com/tx/${depositExecutions[0].destination_transaction_hashes[0]}` : depositExecutions[0].status === "succeeded" ? depositExecutions[0].explorer_url : void 0,
11469
11828
  status: depositExecutions[0].status,
11470
11829
  tokenIconUrl: depositExecutions[0].source_token_metadata?.icon_url,
11830
+ sourceAmountBaseUnit: depositExecutions[0].source_amount_base_unit,
11471
11831
  onClose: () => setDepositExecutions([])
11472
11832
  },
11473
11833
  depositExecutions[0].id
11474
11834
  ) }),
11475
- /* @__PURE__ */ jsx112(
11835
+ /* @__PURE__ */ jsx122(
11476
11836
  DepositsModal,
11477
11837
  {
11478
11838
  open: depositsModalOpen,
@@ -11486,7 +11846,7 @@ function TransferCryptoBase({
11486
11846
  ] }) });
11487
11847
  }
11488
11848
  function TransferCrypto(props) {
11489
- return /* @__PURE__ */ jsx122(
11849
+ return /* @__PURE__ */ jsx132(
11490
11850
  TransferCryptoBase,
11491
11851
  {
11492
11852
  ...props,
@@ -11500,29 +11860,28 @@ function CurrencyListItem({
11500
11860
  isSelected,
11501
11861
  onSelect
11502
11862
  }) {
11503
- return /* @__PURE__ */ jsxs7(
11863
+ const iconUrl = getPreferredIconUrl(currency.icon_urls, "png") || currency.icon_url;
11864
+ return /* @__PURE__ */ jsxs9(
11504
11865
  "button",
11505
11866
  {
11506
11867
  onClick: () => onSelect(currency.currency_code),
11507
11868
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
11508
11869
  children: [
11509
- /* @__PURE__ */ jsxs7("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
11510
- /* @__PURE__ */ jsx132("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0 uf-rounded-full uf-overflow-hidden uf-bg-card", children: /* @__PURE__ */ jsx132(
11870
+ /* @__PURE__ */ jsxs9("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
11871
+ /* @__PURE__ */ jsx142(
11511
11872
  "img",
11512
11873
  {
11513
- src: currency.icon_url,
11874
+ src: iconUrl,
11514
11875
  alt: currency.name,
11515
- width: 40,
11516
- height: 40,
11517
- className: "uf-w-full uf-h-full uf-object-cover uf-rounded-full"
11876
+ className: "uf-w-10 uf-h-10 uf-flex-shrink-0"
11518
11877
  }
11519
- ) }),
11520
- /* @__PURE__ */ jsxs7("div", { className: "uf-text-left", children: [
11521
- /* @__PURE__ */ jsx132("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
11522
- /* @__PURE__ */ jsx132("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
11878
+ ),
11879
+ /* @__PURE__ */ jsxs9("div", { className: "uf-text-left", children: [
11880
+ /* @__PURE__ */ jsx142("div", { className: "uf-text-sm uf-font-normal uf-text-foreground", children: currency.name }),
11881
+ /* @__PURE__ */ jsx142("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-light", children: currency.currency_code.toUpperCase() })
11523
11882
  ] })
11524
11883
  ] }),
11525
- isSelected && /* @__PURE__ */ jsx132(Check, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
11884
+ isSelected && /* @__PURE__ */ jsx142(Check, { className: "uf-w-4 uf-h-4 uf-text-foreground" })
11526
11885
  ]
11527
11886
  }
11528
11887
  );
@@ -11534,9 +11893,9 @@ function CurrencyListSection({
11534
11893
  onSelect
11535
11894
  }) {
11536
11895
  if (currencies.length === 0) return null;
11537
- return /* @__PURE__ */ jsxs8(Fragment32, { children: [
11538
- /* @__PURE__ */ jsx142("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ jsx142("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
11539
- currencies.map((currency) => /* @__PURE__ */ jsx142(
11896
+ return /* @__PURE__ */ jsxs10(Fragment32, { children: [
11897
+ /* @__PURE__ */ jsx152("div", { className: "uf-px-1 uf-pb-2", children: /* @__PURE__ */ jsx152("h3", { className: "uf-text-xs uf-font-light uf-text-muted-foreground", children: title }) }),
11898
+ currencies.map((currency) => /* @__PURE__ */ jsx152(
11540
11899
  CurrencyListItem,
11541
11900
  {
11542
11901
  currency,
@@ -11583,8 +11942,8 @@ function CurrencyModal({
11583
11942
  onOpenChange(false);
11584
11943
  setSearchQuery("");
11585
11944
  };
11586
- return /* @__PURE__ */ jsx152(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs9(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
11587
- /* @__PURE__ */ jsx152(
11945
+ return /* @__PURE__ */ jsx162(Dialog2, { open, onOpenChange, children: /* @__PURE__ */ jsxs11(DialogContent2, { className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 [&>button]:uf-hidden ${themeClass}`, children: [
11946
+ /* @__PURE__ */ jsx162(
11588
11947
  DepositHeader,
11589
11948
  {
11590
11949
  title: "Currency",
@@ -11593,9 +11952,9 @@ function CurrencyModal({
11593
11952
  onClose: handleClose
11594
11953
  }
11595
11954
  ),
11596
- /* @__PURE__ */ jsx152("div", { children: /* @__PURE__ */ jsxs9("div", { className: "uf-relative", children: [
11597
- /* @__PURE__ */ jsx152(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
11598
- /* @__PURE__ */ jsx152(
11955
+ /* @__PURE__ */ jsx162("div", { children: /* @__PURE__ */ jsxs11("div", { className: "uf-relative", children: [
11956
+ /* @__PURE__ */ jsx162(Search, { className: "uf-absolute uf-left-4 uf-top-1/2 uf--translate-y-1/2 uf-w-4 uf-h-4 uf-text-muted-foreground" }),
11957
+ /* @__PURE__ */ jsx162(
11599
11958
  "input",
11600
11959
  {
11601
11960
  type: "text",
@@ -11606,8 +11965,8 @@ function CurrencyModal({
11606
11965
  }
11607
11966
  )
11608
11967
  ] }) }),
11609
- /* @__PURE__ */ jsx152("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs9("div", { className: "uf-space-y-2", children: [
11610
- /* @__PURE__ */ jsx152(
11968
+ /* @__PURE__ */ jsx162("div", { className: "uf-max-h-[500px] uf-overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:uf-hidden", children: /* @__PURE__ */ jsxs11("div", { className: "uf-space-y-2", children: [
11969
+ /* @__PURE__ */ jsx162(
11611
11970
  CurrencyListSection,
11612
11971
  {
11613
11972
  title: "Popular currencies",
@@ -11616,8 +11975,8 @@ function CurrencyModal({
11616
11975
  onSelect: handleSelect
11617
11976
  }
11618
11977
  ),
11619
- filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx152("div", { className: "uf-h-2" }),
11620
- /* @__PURE__ */ jsx152(
11978
+ filteredPreferred.length > 0 && filteredOther.length > 0 && /* @__PURE__ */ jsx162("div", { className: "uf-h-2" }),
11979
+ /* @__PURE__ */ jsx162(
11621
11980
  CurrencyListSection,
11622
11981
  {
11623
11982
  title: "All currencies",
@@ -11626,22 +11985,10 @@ function CurrencyModal({
11626
11985
  onSelect: handleSelect
11627
11986
  }
11628
11987
  ),
11629
- filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx152("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
11988
+ filteredPreferred.length === 0 && filteredOther.length === 0 && /* @__PURE__ */ jsx162("div", { className: "uf-text-center uf-py-8 uf-text-muted-foreground uf-text-sm", children: "No currencies found" })
11630
11989
  ] }) })
11631
11990
  ] }) });
11632
11991
  }
11633
- async function getIpViaMoonpay(moonpayApiKey) {
11634
- const url = `https://api.moonpay.com/v3/ip_address?apiKey=${moonpayApiKey}`;
11635
- const response = await fetch(url);
11636
- if (!response.ok) {
11637
- throw new Error(`Moonpay IP API failed: ${response.statusText}`);
11638
- }
11639
- const data = await response.json();
11640
- return {
11641
- alpha2: data.alpha2.toLowerCase(),
11642
- state: data.state?.toLowerCase()
11643
- };
11644
- }
11645
11992
  async function getIpViaIpApi() {
11646
11993
  const url = "https://ipapi.co/json";
11647
11994
  const response = await fetch(url);
@@ -11654,7 +12001,7 @@ async function getIpViaIpApi() {
11654
12001
  state: data.region_code?.toLowerCase()
11655
12002
  };
11656
12003
  }
11657
- function useUserIp(moonpayApiKey) {
12004
+ function useUserIp() {
11658
12005
  const {
11659
12006
  data: userIpInfo,
11660
12007
  isLoading,
@@ -11662,21 +12009,12 @@ function useUserIp(moonpayApiKey) {
11662
12009
  } = useQuery({
11663
12010
  queryKey: ["getUserIpInfo"],
11664
12011
  queryFn: async () => {
11665
- if (moonpayApiKey) {
11666
- try {
11667
- const moonpayIpData = await getIpViaMoonpay(moonpayApiKey);
11668
- console.log("IP detected via Moonpay:", moonpayIpData);
11669
- return moonpayIpData;
11670
- } catch (error2) {
11671
- console.warn("Moonpay IP API failed, trying fallback:", error2);
11672
- }
11673
- }
11674
12012
  try {
11675
12013
  const ipApiData = await getIpViaIpApi();
11676
12014
  console.log("IP detected via ipapi.co:", ipApiData);
11677
12015
  return ipApiData;
11678
12016
  } catch (ipApiError) {
11679
- console.error("All IP detection methods failed:", ipApiError);
12017
+ console.error("IP detection failed:", ipApiError);
11680
12018
  throw ipApiError;
11681
12019
  }
11682
12020
  },
@@ -11722,7 +12060,9 @@ function BuyWithCard({
11722
12060
  destinationChainType,
11723
12061
  destinationChainId,
11724
12062
  destinationTokenAddress,
11725
- themeClass = ""
12063
+ themeClass = "",
12064
+ wallets: externalWallets,
12065
+ assetCdnUrl
11726
12066
  }) {
11727
12067
  const [amount, setAmount] = useState42("500.00");
11728
12068
  const [currency, setCurrency] = useState42("usd");
@@ -11757,8 +12097,9 @@ function BuyWithCard({
11757
12097
  const [isAutoSelected, setIsAutoSelected] = useState42(true);
11758
12098
  const [autoSelectedProvider, setAutoSelectedProvider] = useState42(null);
11759
12099
  const [hasManualSelection, setHasManualSelection] = useState42(false);
11760
- const [wallets, setWallets] = useState42([]);
11761
- const [walletsLoading, setWalletsLoading] = useState42(true);
12100
+ const [internalWallets, setInternalWallets] = useState42([]);
12101
+ const [walletsLoading, setWalletsLoading] = useState42(!externalWallets?.length);
12102
+ const wallets = externalWallets?.length ? externalWallets : internalWallets;
11762
12103
  const [countdown, setCountdown] = useState42(60);
11763
12104
  const [fiatCurrencies, setFiatCurrencies] = useState42([]);
11764
12105
  const [preferredCurrencyCodes, setPreferredCurrencyCodes] = useState42([]);
@@ -11787,7 +12128,15 @@ function BuyWithCard({
11787
12128
  fetchFiatCurrencies();
11788
12129
  }, [publishableKey]);
11789
12130
  useEffect42(() => {
11790
- async function fetchWallets() {
12131
+ if (externalWallets?.length) {
12132
+ setWalletsLoading(false);
12133
+ return;
12134
+ }
12135
+ let retryTimeout = null;
12136
+ let isCancelled = false;
12137
+ const fetchWallets = async () => {
12138
+ if (isCancelled) return;
12139
+ setWalletsLoading(true);
11791
12140
  try {
11792
12141
  const response = await createEOA(
11793
12142
  {
@@ -11799,16 +12148,26 @@ function BuyWithCard({
11799
12148
  },
11800
12149
  publishableKey
11801
12150
  );
11802
- setWallets(response.data);
12151
+ if (!isCancelled) {
12152
+ setInternalWallets(response.data);
12153
+ setWalletsLoading(false);
12154
+ }
11803
12155
  } catch (err) {
11804
- console.error("Error fetching wallets:", err);
11805
- setQuotesError("Failed to load wallet addresses");
11806
- } finally {
11807
- setWalletsLoading(false);
12156
+ console.error("Error fetching wallets, retrying in 5s:", err);
12157
+ if (!isCancelled) {
12158
+ setWalletsLoading(false);
12159
+ retryTimeout = setTimeout(fetchWallets, 5e3);
12160
+ }
11808
12161
  }
11809
- }
12162
+ };
11810
12163
  fetchWallets();
11811
- }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
12164
+ return () => {
12165
+ isCancelled = true;
12166
+ if (retryTimeout) {
12167
+ clearTimeout(retryTimeout);
12168
+ }
12169
+ };
12170
+ }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey, externalWallets]);
11812
12171
  useEffect42(() => {
11813
12172
  async function fetchSupportedTokens() {
11814
12173
  try {
@@ -11975,38 +12334,36 @@ function BuyWithCard({
11975
12334
  (a, b) => b.destination_amount - a.destination_amount
11976
12335
  );
11977
12336
  const currencySymbol = getCurrencySymbol(currency);
11978
- return /* @__PURE__ */ jsxs10("div", { className: "uf-pb-1 uf-relative uf-overflow-hidden", children: [
11979
- /* @__PURE__ */ jsxs10(
12337
+ return /* @__PURE__ */ jsxs12("div", { className: "uf-pb-1 uf-relative uf-overflow-hidden", children: [
12338
+ /* @__PURE__ */ jsxs12(
11980
12339
  "div",
11981
12340
  {
11982
12341
  className: `uf-transition-all uf-duration-300 ${showQuotesView || showOnrampView ? "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0" : "uf-opacity-100"}`,
11983
12342
  children: [
11984
- /* @__PURE__ */ jsxs10("div", { className: "uf-mb-6 uf-pt-4", children: [
11985
- /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsxs10(
12343
+ /* @__PURE__ */ jsxs12("div", { className: "uf-mb-6 uf-pt-4", children: [
12344
+ /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-justify-center uf-mb-4", children: /* @__PURE__ */ jsxs12(
11986
12345
  "button",
11987
12346
  {
11988
12347
  onClick: () => setShowCurrencyModal(true),
11989
12348
  disabled: currenciesLoading,
11990
12349
  className: "uf-flex uf-items-center uf-gap-1.5 uf-px-3 uf-py-1.5 uf-rounded-lg uf-bg-secondary hover:uf-bg-accent uf-transition-colors disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
11991
12350
  children: [
11992
- selectedCurrencyData && /* @__PURE__ */ jsx162("div", { className: "uf-w-4 uf-h-4 uf-rounded-full uf-overflow-hidden uf-flex uf-items-center uf-justify-center", children: /* @__PURE__ */ jsx162(
12351
+ selectedCurrencyData && /* @__PURE__ */ jsx172(
11993
12352
  "img",
11994
12353
  {
11995
- src: selectedCurrencyData.icon_url,
12354
+ src: getPreferredIconUrl(selectedCurrencyData.icon_urls, "png") || selectedCurrencyData.icon_url,
11996
12355
  alt: selectedCurrencyData.name,
11997
- width: 16,
11998
- height: 16,
11999
- className: "uf-w-full uf-h-full uf-object-cover uf-rounded-full"
12356
+ className: "uf-w-4 uf-h-4"
12000
12357
  }
12001
- ) }),
12002
- /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
12003
- /* @__PURE__ */ jsx162(ChevronDown, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
12358
+ ),
12359
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: currency.toUpperCase() }),
12360
+ /* @__PURE__ */ jsx172(ChevronDown, { className: "uf-w-3.5 uf-h-3.5 uf-text-muted-foreground" })
12004
12361
  ]
12005
12362
  }
12006
12363
  ) }),
12007
- /* @__PURE__ */ jsxs10("div", { className: "uf-text-center uf-mb-4", children: [
12008
- /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
12009
- /* @__PURE__ */ jsx162(
12364
+ /* @__PURE__ */ jsxs12("div", { className: "uf-text-center uf-mb-4", children: [
12365
+ /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-items-center uf-justify-center uf-mb-2 uf-px-8", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-max-w-full", children: [
12366
+ /* @__PURE__ */ jsx172(
12010
12367
  "span",
12011
12368
  {
12012
12369
  className: "uf-font-normal uf-text-foreground uf-flex-shrink-0 uf-mr-1",
@@ -12016,7 +12373,7 @@ function BuyWithCard({
12016
12373
  children: currencySymbol
12017
12374
  }
12018
12375
  ),
12019
- /* @__PURE__ */ jsx162(
12376
+ /* @__PURE__ */ jsx172(
12020
12377
  "input",
12021
12378
  {
12022
12379
  type: "text",
@@ -12032,12 +12389,12 @@ function BuyWithCard({
12032
12389
  }
12033
12390
  )
12034
12391
  ] }) }),
12035
- quotesLoading ? /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ jsx162("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ jsxs10("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
12392
+ quotesLoading ? /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-justify-center", children: /* @__PURE__ */ jsx172("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-40 uf-animate-pulse" }) }) : /* @__PURE__ */ jsxs12("div", { className: "uf-text-sm uf-text-muted-foreground uf-font-normal", children: [
12036
12393
  calculateUSDC(),
12037
12394
  " USDC (Perps)"
12038
12395
  ] })
12039
12396
  ] }),
12040
- /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ jsxs10(
12397
+ /* @__PURE__ */ jsx172("div", { className: "uf-flex uf-gap-3 uf-justify-center", children: QUICK_AMOUNTS.map((quickAmount) => /* @__PURE__ */ jsxs12(
12041
12398
  "button",
12042
12399
  {
12043
12400
  onClick: () => handleQuickAmount(quickAmount),
@@ -12050,31 +12407,31 @@ function BuyWithCard({
12050
12407
  quickAmount
12051
12408
  )) })
12052
12409
  ] }),
12053
- /* @__PURE__ */ jsxs10("div", { className: "uf-mb-6", children: [
12054
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-font-medium uf-mb-2 uf-px-1", children: [
12055
- /* @__PURE__ */ jsx162("span", { className: "uf-text-foreground", children: "Provider" }),
12056
- quotes.length > 0 && !quotesLoading && /* @__PURE__ */ jsxs10("span", { className: "uf-text-[10px] uf-text-foreground uf-font-normal", children: [
12410
+ /* @__PURE__ */ jsxs12("div", { className: "uf-mb-6", children: [
12411
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-between uf-text-xs uf-font-medium uf-mb-2 uf-px-1", children: [
12412
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-foreground", children: "Provider" }),
12413
+ quotes.length > 0 && !quotesLoading && /* @__PURE__ */ jsxs12("span", { className: "uf-text-[10px] uf-text-foreground uf-font-normal", children: [
12057
12414
  "Refreshing in ",
12058
12415
  countdown,
12059
12416
  "s"
12060
12417
  ] })
12061
12418
  ] }),
12062
- /* @__PURE__ */ jsx162(
12419
+ /* @__PURE__ */ jsx172(
12063
12420
  "button",
12064
12421
  {
12065
12422
  onClick: () => handleViewChange("quotes"),
12066
12423
  disabled: quotesLoading || quotes.length === 0,
12067
12424
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-4 uf-group disabled:uf-opacity-50 disabled:uf-cursor-not-allowed",
12068
- children: quotesLoading ? /* @__PURE__ */ jsxs10("div", { className: "uf-text-left uf-w-full uf-animate-pulse", children: [
12069
- /* @__PURE__ */ jsx162("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
12070
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12071
- /* @__PURE__ */ jsx162("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
12072
- /* @__PURE__ */ jsx162("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
12425
+ children: quotesLoading ? /* @__PURE__ */ jsxs12("div", { className: "uf-text-left uf-w-full uf-animate-pulse", children: [
12426
+ /* @__PURE__ */ jsx172("div", { className: "uf-h-3 uf-bg-muted uf-rounded uf-w-28 uf-mb-3" }),
12427
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12428
+ /* @__PURE__ */ jsx172("div", { className: "uf-w-8 uf-h-8 uf-bg-muted uf-rounded-full" }),
12429
+ /* @__PURE__ */ jsx172("div", { className: "uf-h-4 uf-bg-muted uf-rounded uf-w-32" })
12073
12430
  ] })
12074
- ] }) : /* @__PURE__ */ jsxs10("div", { className: "uf-w-full uf-text-left", children: [
12075
- isAutoSelected && /* @__PURE__ */ jsx162("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
12076
- selectedProvider && /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12077
- /* @__PURE__ */ jsx162(
12431
+ ] }) : /* @__PURE__ */ jsxs12("div", { className: "uf-w-full uf-text-left", children: [
12432
+ isAutoSelected && /* @__PURE__ */ jsx172("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal uf-mb-2", children: "Auto-picked for you" }),
12433
+ selectedProvider && /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12434
+ /* @__PURE__ */ jsx172(
12078
12435
  "img",
12079
12436
  {
12080
12437
  src: selectedProvider.icon_url,
@@ -12084,22 +12441,22 @@ function BuyWithCard({
12084
12441
  className: "uf-rounded-full uf-flex-shrink-0"
12085
12442
  }
12086
12443
  ),
12087
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex-1 uf-min-w-0", children: [
12088
- /* @__PURE__ */ jsx162("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
12089
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
12090
- isAutoSelected && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
12091
- isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12092
- selectedProvider.low_kyc === false && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12444
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex-1 uf-min-w-0", children: [
12445
+ /* @__PURE__ */ jsx172("div", { className: "uf-text-sm uf-text-foreground uf-font-medium", children: selectedProvider.service_provider_display_name }),
12446
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
12447
+ isAutoSelected && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-green-400 uf-font-normal", children: "Best price" }),
12448
+ isAutoSelected && selectedProvider.low_kyc === false && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12449
+ selectedProvider.low_kyc === false && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12093
12450
  ] })
12094
12451
  ] }),
12095
- quotes.length > 0 && /* @__PURE__ */ jsx162(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
12452
+ quotes.length > 0 && /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors uf-flex-shrink-0" })
12096
12453
  ] })
12097
12454
  ] })
12098
12455
  }
12099
12456
  ),
12100
- quotesError && /* @__PURE__ */ jsx162("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
12457
+ quotesError && /* @__PURE__ */ jsx172("div", { className: "uf-text-xs uf-text-red-400 uf-mt-2 uf-px-1", children: quotesError })
12101
12458
  ] }),
12102
- /* @__PURE__ */ jsx162(
12459
+ /* @__PURE__ */ jsx172(
12103
12460
  "button",
12104
12461
  {
12105
12462
  onClick: handleContinue,
@@ -12114,15 +12471,15 @@ function BuyWithCard({
12114
12471
  ]
12115
12472
  }
12116
12473
  ),
12117
- /* @__PURE__ */ jsx162(
12474
+ /* @__PURE__ */ jsx172(
12118
12475
  "div",
12119
12476
  {
12120
12477
  className: `uf-transition-all uf-duration-300 ${showQuotesView && !showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
12121
- children: /* @__PURE__ */ jsx162("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index2) => {
12478
+ children: /* @__PURE__ */ jsx172("div", { className: "uf-space-y-2 uf-pt-2", children: sortedQuotes.map((quote, index2) => {
12122
12479
  const badges = getProviderBadges(quote, sortedQuotes);
12123
12480
  const displayName = quote.service_provider_display_name;
12124
12481
  const isSelected = selectedProvider?.service_provider === quote.service_provider;
12125
- return /* @__PURE__ */ jsxs10(
12482
+ return /* @__PURE__ */ jsxs12(
12126
12483
  "button",
12127
12484
  {
12128
12485
  onClick: () => {
@@ -12135,8 +12492,8 @@ function BuyWithCard({
12135
12492
  },
12136
12493
  className: `uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group ${isSelected ? "uf-ring-2 uf-ring-inset uf-ring-primary" : ""}`,
12137
12494
  children: [
12138
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12139
- /* @__PURE__ */ jsx162("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0", children: /* @__PURE__ */ jsx162(
12495
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12496
+ /* @__PURE__ */ jsx172("div", { className: "uf-w-10 uf-h-10 uf-flex uf-items-center uf-justify-center uf-flex-shrink-0", children: /* @__PURE__ */ jsx172(
12140
12497
  "img",
12141
12498
  {
12142
12499
  src: quote.icon_url,
@@ -12146,10 +12503,10 @@ function BuyWithCard({
12146
12503
  className: "uf-rounded-full"
12147
12504
  }
12148
12505
  ) }),
12149
- /* @__PURE__ */ jsxs10("div", { className: "uf-text-left", children: [
12150
- /* @__PURE__ */ jsx162("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
12151
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
12152
- badges.map((badge, i) => /* @__PURE__ */ jsxs10(
12506
+ /* @__PURE__ */ jsxs12("div", { className: "uf-text-left", children: [
12507
+ /* @__PURE__ */ jsx172("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayName }),
12508
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-1.5 uf-mt-0.5", children: [
12509
+ badges.map((badge, i) => /* @__PURE__ */ jsxs12(
12153
12510
  "span",
12154
12511
  {
12155
12512
  className: "uf-text-[10px] uf-text-green-400 uf-font-normal",
@@ -12160,17 +12517,17 @@ function BuyWithCard({
12160
12517
  },
12161
12518
  i
12162
12519
  )),
12163
- quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12164
- quote.low_kyc === false && /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12520
+ quote.low_kyc === false && badges.length > 0 && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: "\u2022" }),
12521
+ quote.low_kyc === false && /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-font-normal", children: "No document upload" })
12165
12522
  ] })
12166
12523
  ] })
12167
12524
  ] }),
12168
- /* @__PURE__ */ jsxs10("div", { className: "uf-text-right", children: [
12169
- /* @__PURE__ */ jsxs10("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: [
12525
+ /* @__PURE__ */ jsxs12("div", { className: "uf-text-right", children: [
12526
+ /* @__PURE__ */ jsxs12("div", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: [
12170
12527
  quote.destination_amount.toFixed(2),
12171
12528
  " USDC"
12172
12529
  ] }),
12173
- /* @__PURE__ */ jsxs10("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal", children: [
12530
+ /* @__PURE__ */ jsxs12("div", { className: "uf-text-xs uf-text-muted-foreground uf-font-normal", children: [
12174
12531
  currencySymbol,
12175
12532
  " ",
12176
12533
  amount
@@ -12183,12 +12540,12 @@ function BuyWithCard({
12183
12540
  }) })
12184
12541
  }
12185
12542
  ),
12186
- /* @__PURE__ */ jsx162(
12543
+ /* @__PURE__ */ jsx172(
12187
12544
  "div",
12188
12545
  {
12189
12546
  className: `uf-transition-all uf-duration-300 ${showOnrampView ? "uf-opacity-100" : "uf-opacity-0 uf-pointer-events-none uf-absolute uf-inset-0"}`,
12190
- children: onrampSession && /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-6 uf-pb-4 uf-px-2", children: [
12191
- /* @__PURE__ */ jsx162("div", { className: "uf-mb-6", children: /* @__PURE__ */ jsx162(
12547
+ children: onrampSession && /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-pt-6 uf-pb-4 uf-px-2", children: [
12548
+ /* @__PURE__ */ jsx172("div", { className: "uf-mb-6", children: /* @__PURE__ */ jsx172(
12192
12549
  "img",
12193
12550
  {
12194
12551
  src: onrampSession.provider.icon_url,
@@ -12198,88 +12555,79 @@ function BuyWithCard({
12198
12555
  className: "uf-rounded-2xl"
12199
12556
  }
12200
12557
  ) }),
12201
- /* @__PURE__ */ jsx162("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
12558
+ /* @__PURE__ */ jsx172("h2", { className: "uf-text-xl uf-font-medium uf-text-foreground uf-mb-2", children: t2.onramp.completeTransaction.replace(
12202
12559
  "{{provider}}",
12203
12560
  onrampSession.provider.service_provider_display_name
12204
12561
  ) }),
12205
- /* @__PURE__ */ jsx162("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
12206
- /* @__PURE__ */ jsx162("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ jsxs10("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12207
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex-1 uf-flex uf-flex-col uf-items-center", children: [
12208
- /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-items-center uf-gap-2 uf-mb-1", children: /* @__PURE__ */ jsx162(
12562
+ /* @__PURE__ */ jsx172("p", { className: "uf-text-sm uf-text-muted-foreground uf-mb-8", children: t2.onramp.canCloseModal }),
12563
+ /* @__PURE__ */ jsx172("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4 uf-mb-4", children: /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-justify-center", children: [
12564
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
12565
+ /* @__PURE__ */ jsx172("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsx172(
12209
12566
  "img",
12210
12567
  {
12211
- src: getIconUrl(
12212
- `/icons/currencies/${onrampSession.sourceCurrency.toLowerCase()}.svg`
12568
+ src: getIconUrlWithCdn(
12569
+ `/icons/currencies/svg/${onrampSession.sourceCurrency.toLowerCase()}.svg`,
12570
+ assetCdnUrl
12213
12571
  ),
12214
12572
  alt: onrampSession.sourceCurrency.toUpperCase(),
12215
- width: 28,
12216
- height: 28,
12217
- className: "uf-rounded-full"
12573
+ className: "uf-w-7 uf-h-7 uf-rounded-full"
12218
12574
  }
12219
12575
  ) }),
12220
- /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: t2.onramp.youUse }),
12221
- /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: onrampSession.sourceCurrency.toUpperCase() })
12576
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youUse }),
12577
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: onrampSession.sourceCurrency.toUpperCase() })
12222
12578
  ] }),
12223
- /* @__PURE__ */ jsx162("div", { className: "uf-text-muted-foreground uf-flex-shrink-0", children: /* @__PURE__ */ jsx162(ChevronRight, { className: "uf-w-5 uf-h-5" }) }),
12224
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex-1 uf-flex uf-flex-col uf-items-center", children: [
12225
- /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-items-center uf-gap-2 uf-mb-1", children: /* @__PURE__ */ jsxs10("div", { className: "uf-relative", children: [
12226
- /* @__PURE__ */ jsx162(
12579
+ /* @__PURE__ */ jsx172("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
12580
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
12581
+ /* @__PURE__ */ jsx172("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
12582
+ /* @__PURE__ */ jsx172(
12227
12583
  "img",
12228
12584
  {
12229
- src: getIconUrl("/icons/tokens/usdc.svg"),
12585
+ src: getIconUrlWithCdn("/icons/tokens/svg/usdc.svg", assetCdnUrl),
12230
12586
  alt: "USDC",
12231
- width: 28,
12232
- height: 28,
12233
- className: "uf-rounded-full"
12587
+ className: "uf-w-7 uf-h-7 uf-rounded-full"
12234
12588
  }
12235
12589
  ),
12236
- /* @__PURE__ */ jsx162(
12590
+ /* @__PURE__ */ jsx172(
12237
12591
  "img",
12238
12592
  {
12239
- src: getIconUrl("/icons/networks/polygon.svg"),
12593
+ src: getIconUrlWithCdn("/icons/networks/svg/polygon.svg", assetCdnUrl),
12240
12594
  alt: "Polygon",
12241
- width: 14,
12242
- height: 14,
12243
- className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-rounded-full"
12595
+ className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
12244
12596
  }
12245
12597
  )
12246
12598
  ] }) }),
12247
- /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: t2.onramp.youBuy }),
12248
- /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: "USDC" })
12599
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youBuy }),
12600
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: "USDC" })
12249
12601
  ] }),
12250
- /* @__PURE__ */ jsx162("div", { className: "uf-text-muted-foreground uf-flex-shrink-0", children: /* @__PURE__ */ jsx162(ChevronRight, { className: "uf-w-5 uf-h-5" }) }),
12251
- /* @__PURE__ */ jsxs10("div", { className: "uf-flex-1 uf-flex uf-flex-col uf-items-center", children: [
12252
- /* @__PURE__ */ jsx162("div", { className: "uf-flex uf-items-center uf-gap-2 uf-mb-1", children: /* @__PURE__ */ jsxs10("div", { className: "uf-relative", children: [
12253
- /* @__PURE__ */ jsx162(
12602
+ /* @__PURE__ */ jsx172("div", { className: "uf-text-muted-foreground uf-px-1 uf-self-start uf-pt-2", children: /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4" }) }),
12603
+ /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-flex-col uf-items-center uf-min-w-[72px]", children: [
12604
+ /* @__PURE__ */ jsx172("div", { className: "uf-h-8 uf-flex uf-items-center uf-justify-center uf-mb-1.5", children: /* @__PURE__ */ jsxs12("div", { className: "uf-relative", children: [
12605
+ /* @__PURE__ */ jsx172(
12254
12606
  "img",
12255
12607
  {
12256
- src: destinationToken?.icon_url || getIconUrl("/icons/tokens/usdc.svg"),
12608
+ src: destinationToken?.icon_url || getIconUrlWithCdn("/icons/tokens/svg/usdc.svg", assetCdnUrl),
12257
12609
  alt: displayTokenSymbol,
12258
- width: 28,
12259
- height: 28,
12260
- className: "uf-rounded-full"
12610
+ className: "uf-w-7 uf-h-7 uf-rounded-full"
12261
12611
  }
12262
12612
  ),
12263
- destinationChain?.icon_url && /* @__PURE__ */ jsx162(
12613
+ destinationChain?.icon_url && /* @__PURE__ */ jsx172(
12264
12614
  "img",
12265
12615
  {
12266
12616
  src: destinationChain.icon_url,
12267
12617
  alt: destinationChain.chain_name,
12268
- width: 14,
12269
- height: 14,
12270
- className: "uf-absolute uf--bottom-0.5 uf--right-0.5 uf-rounded-full"
12618
+ className: "uf-w-3.5 uf-h-3.5 uf-absolute -uf-bottom-0.5 -uf-right-0.5 uf-rounded-full"
12271
12619
  }
12272
12620
  )
12273
12621
  ] }) }),
12274
- /* @__PURE__ */ jsx162("span", { className: "uf-text-[10px] uf-text-muted-foreground", children: t2.onramp.youReceive }),
12275
- /* @__PURE__ */ jsx162("span", { className: "uf-text-sm uf-font-medium uf-text-foreground", children: displayTokenSymbol })
12622
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-[10px] uf-text-muted-foreground uf-text-center", children: t2.onramp.youReceive }),
12623
+ /* @__PURE__ */ jsx172("span", { className: "uf-text-sm uf-font-medium uf-text-foreground uf-text-center", children: displayTokenSymbol })
12276
12624
  ] })
12277
12625
  ] }) }),
12278
- /* @__PURE__ */ jsx162("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ jsx162("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
12626
+ /* @__PURE__ */ jsx172("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-4", children: /* @__PURE__ */ jsx172("p", { className: "uf-text-xs uf-text-muted-foreground uf-leading-relaxed", children: t2.onramp.intentAddressNote }) })
12279
12627
  ] })
12280
12628
  }
12281
12629
  ),
12282
- /* @__PURE__ */ jsx162(
12630
+ /* @__PURE__ */ jsx172(
12283
12631
  CurrencyModal,
12284
12632
  {
12285
12633
  open: showCurrencyModal,
@@ -12298,105 +12646,39 @@ function BuyWithCard({
12298
12646
  function TransferCryptoButton({
12299
12647
  onClick,
12300
12648
  title,
12301
- subtitle
12649
+ subtitle,
12650
+ featuredTokens
12302
12651
  }) {
12303
- return /* @__PURE__ */ jsxs11(
12652
+ const sortedTokens = featuredTokens ? [...featuredTokens].sort((a, b) => a.position - b.position) : [];
12653
+ return /* @__PURE__ */ jsxs13(
12304
12654
  "button",
12305
12655
  {
12306
12656
  onClick,
12307
12657
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
12308
12658
  children: [
12309
- /* @__PURE__ */ jsxs11("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12310
- /* @__PURE__ */ jsx172("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx172(Zap, { className: "uf-w-5 uf-h-5" }) }),
12311
- /* @__PURE__ */ jsxs11("div", { className: "uf-text-left", children: [
12312
- /* @__PURE__ */ jsx172("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12313
- /* @__PURE__ */ jsx172("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12659
+ /* @__PURE__ */ jsxs13("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12660
+ /* @__PURE__ */ jsx18("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx18(Zap, { className: "uf-w-5 uf-h-5" }) }),
12661
+ /* @__PURE__ */ jsxs13("div", { className: "uf-text-left", children: [
12662
+ /* @__PURE__ */ jsx18("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12663
+ /* @__PURE__ */ jsx18("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12314
12664
  ] })
12315
12665
  ] }),
12316
- /* @__PURE__ */ jsxs11("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12317
- /* @__PURE__ */ jsxs11("div", { className: "uf-flex uf--space-x-1", children: [
12318
- /* @__PURE__ */ jsx172(
12319
- "img",
12320
- {
12321
- src: getIconUrl("/icons/networks/ethereum.svg"),
12322
- alt: "ETH",
12323
- width: 20,
12324
- height: 20,
12325
- className: "uf-rounded-full uf-border-2 uf-border-secondary"
12326
- }
12327
- ),
12328
- /* @__PURE__ */ jsx172(
12329
- "img",
12330
- {
12331
- src: getIconUrl("/icons/networks/optimism.svg"),
12332
- alt: "OP",
12333
- width: 20,
12334
- height: 20,
12335
- className: "uf-rounded-full uf-border-2 uf-border-secondary"
12336
- }
12337
- ),
12338
- /* @__PURE__ */ jsx172(
12339
- "img",
12340
- {
12341
- src: getIconUrl("/icons/networks/polygon.svg"),
12342
- alt: "MATIC",
12343
- width: 20,
12344
- height: 20,
12345
- className: "uf-rounded-full uf-border-2 uf-border-secondary"
12346
- }
12347
- ),
12348
- /* @__PURE__ */ jsx172(
12349
- "img",
12350
- {
12351
- src: getIconUrl("/icons/networks/arbitrum.svg"),
12352
- alt: "ARB",
12353
- width: 20,
12354
- height: 20,
12355
- className: "uf-rounded-full uf-border-2 uf-border-secondary"
12356
- }
12357
- ),
12358
- /* @__PURE__ */ jsx172(
12359
- "img",
12360
- {
12361
- src: getIconUrl("/icons/tokens/usdc.svg"),
12362
- alt: "USDC",
12363
- width: 20,
12364
- height: 20,
12365
- className: "uf-rounded-full uf-border-2 uf-border-secondary"
12366
- }
12367
- ),
12368
- /* @__PURE__ */ jsx172(
12369
- "img",
12370
- {
12371
- src: getIconUrl("/icons/networks/solana.svg"),
12372
- alt: "SOL",
12373
- width: 20,
12374
- height: 20,
12375
- className: "uf-rounded-full uf-border-2 uf-border-secondary"
12376
- }
12377
- ),
12378
- /* @__PURE__ */ jsx172(
12666
+ /* @__PURE__ */ jsxs13("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12667
+ /* @__PURE__ */ jsx18("div", { className: "uf-flex uf--space-x-2", children: sortedTokens.map((token) => {
12668
+ const iconUrl = token.icon_urls.find((u) => u.format === "svg")?.url || token.icon_urls.find((u) => u.format === "png")?.url;
12669
+ return /* @__PURE__ */ jsx18(
12379
12670
  "img",
12380
12671
  {
12381
- src: getIconUrl("/icons/tokens/avax.svg"),
12382
- alt: "AVAX",
12672
+ src: iconUrl,
12673
+ alt: token.name,
12383
12674
  width: 20,
12384
12675
  height: 20,
12385
12676
  className: "uf-rounded-full uf-border-2 uf-border-secondary"
12386
- }
12387
- ),
12388
- /* @__PURE__ */ jsx172(
12389
- "img",
12390
- {
12391
- src: getIconUrl("/icons/networks/bitcoin.svg"),
12392
- alt: "BTC",
12393
- width: 20,
12394
- height: 20,
12395
- className: "uf-rounded-full uf-border-2 uf-border-secondary"
12396
- }
12397
- )
12398
- ] }),
12399
- /* @__PURE__ */ jsx172(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12677
+ },
12678
+ token.name
12679
+ );
12680
+ }) }),
12681
+ /* @__PURE__ */ jsx18(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12400
12682
  ] })
12401
12683
  ]
12402
12684
  }
@@ -12405,45 +12687,38 @@ function TransferCryptoButton({
12405
12687
  function DepositWithCardButton({
12406
12688
  onClick,
12407
12689
  title,
12408
- subtitle
12690
+ subtitle,
12691
+ paymentNetworks
12409
12692
  }) {
12410
- return /* @__PURE__ */ jsxs12(
12693
+ return /* @__PURE__ */ jsxs14(
12411
12694
  "button",
12412
12695
  {
12413
12696
  onClick,
12414
12697
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
12415
12698
  children: [
12416
- /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12417
- /* @__PURE__ */ jsx18("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx18(CreditCard, { className: "uf-w-5 uf-h-5" }) }),
12418
- /* @__PURE__ */ jsxs12("div", { className: "uf-text-left", children: [
12419
- /* @__PURE__ */ jsx18("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12420
- /* @__PURE__ */ jsx18("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12699
+ /* @__PURE__ */ jsxs14("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12700
+ /* @__PURE__ */ jsx19("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2", children: /* @__PURE__ */ jsx19(CreditCard, { className: "uf-w-5 uf-h-5" }) }),
12701
+ /* @__PURE__ */ jsxs14("div", { className: "uf-text-left", children: [
12702
+ /* @__PURE__ */ jsx19("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12703
+ /* @__PURE__ */ jsx19("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12421
12704
  ] })
12422
12705
  ] }),
12423
- /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12424
- /* @__PURE__ */ jsxs12("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: [
12425
- /* @__PURE__ */ jsx18(
12426
- "img",
12427
- {
12428
- src: getIconUrl("/icons/networks/mastercard.svg"),
12429
- alt: "Mastercard",
12430
- width: 32,
12431
- height: 32,
12432
- className: "uf-rounded"
12433
- }
12434
- ),
12435
- /* @__PURE__ */ jsx18(
12706
+ /* @__PURE__ */ jsxs14("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12707
+ /* @__PURE__ */ jsx19("div", { className: "uf-flex uf-items-center uf-gap-1.5", children: paymentNetworks?.map((network) => {
12708
+ const iconUrl = network.icon_urls.find((u) => u.format === "svg")?.url || network.icon_urls.find((u) => u.format === "png")?.url;
12709
+ return /* @__PURE__ */ jsx19(
12436
12710
  "img",
12437
12711
  {
12438
- src: getIconUrl("/icons/networks/visa.svg"),
12439
- alt: "Visa",
12712
+ src: iconUrl,
12713
+ alt: network.name,
12440
12714
  width: 32,
12441
12715
  height: 32,
12442
12716
  className: "uf-rounded"
12443
- }
12444
- )
12445
- ] }),
12446
- /* @__PURE__ */ jsx18(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12717
+ },
12718
+ network.name
12719
+ );
12720
+ }) }),
12721
+ /* @__PURE__ */ jsx19(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12447
12722
  ] })
12448
12723
  ]
12449
12724
  }
@@ -12455,27 +12730,42 @@ function DepositTrackerButton({
12455
12730
  subtitle,
12456
12731
  badge
12457
12732
  }) {
12458
- return /* @__PURE__ */ jsxs13(
12733
+ return /* @__PURE__ */ jsxs15(
12459
12734
  "button",
12460
12735
  {
12461
12736
  onClick,
12462
12737
  className: "uf-w-full uf-bg-secondary hover:uf-bg-accent uf-transition-colors uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-group",
12463
12738
  children: [
12464
- /* @__PURE__ */ jsxs13("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12465
- /* @__PURE__ */ jsxs13("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2 uf-relative", children: [
12466
- /* @__PURE__ */ jsx19(Clock, { className: "uf-w-5 uf-h-5" }),
12467
- badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx19("div", { className: "uf-absolute -uf-top-1 -uf-right-1 uf-bg-blue-500 uf-text-primary-foreground uf-text-[10px] uf-font-semibold uf-rounded-full uf-min-w-[18px] uf-h-[18px] uf-flex uf-items-center uf-justify-center uf-px-1", children: badge > 99 ? "99+" : badge })
12739
+ /* @__PURE__ */ jsxs15("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12740
+ /* @__PURE__ */ jsxs15("div", { className: "uf-bg-muted uf-rounded-lg uf-p-2 uf-relative", children: [
12741
+ /* @__PURE__ */ jsx20(Clock, { className: "uf-w-5 uf-h-5" }),
12742
+ badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx20("div", { className: "uf-absolute -uf-top-1 -uf-right-1 uf-bg-blue-500 uf-text-primary-foreground uf-text-[10px] uf-font-semibold uf-rounded-full uf-min-w-[18px] uf-h-[18px] uf-flex uf-items-center uf-justify-center uf-px-1", children: badge > 99 ? "99+" : badge })
12468
12743
  ] }),
12469
- /* @__PURE__ */ jsxs13("div", { className: "uf-text-left", children: [
12470
- /* @__PURE__ */ jsx19("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12471
- /* @__PURE__ */ jsx19("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12744
+ /* @__PURE__ */ jsxs15("div", { className: "uf-text-left", children: [
12745
+ /* @__PURE__ */ jsx20("div", { className: "uf-text-sm uf-font-light uf-mb-0.5 uf-text-foreground", children: title }),
12746
+ /* @__PURE__ */ jsx20("div", { className: "uf-text-muted-foreground uf-text-xs uf-font-light", children: subtitle })
12472
12747
  ] })
12473
12748
  ] }),
12474
- /* @__PURE__ */ jsx19(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12749
+ /* @__PURE__ */ jsx20(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted-foreground group-hover:uf-text-foreground uf-transition-colors" })
12475
12750
  ]
12476
12751
  }
12477
12752
  );
12478
12753
  }
12754
+ function SkeletonButton({ variant = "default" }) {
12755
+ return /* @__PURE__ */ jsxs16("div", { className: "uf-w-full uf-bg-secondary uf-rounded-xl uf-p-3 uf-flex uf-items-center uf-justify-between uf-animate-pulse", children: [
12756
+ /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-3", children: [
12757
+ /* @__PURE__ */ jsx21("div", { className: "uf-bg-muted uf-rounded-lg uf-w-9 uf-h-9" }),
12758
+ /* @__PURE__ */ jsxs16("div", { className: "uf-space-y-1.5", children: [
12759
+ /* @__PURE__ */ jsx21("div", { className: "uf-h-3.5 uf-w-24 uf-bg-muted uf-rounded" }),
12760
+ /* @__PURE__ */ jsx21("div", { className: "uf-h-3 uf-w-32 uf-bg-muted uf-rounded" })
12761
+ ] })
12762
+ ] }),
12763
+ /* @__PURE__ */ jsxs16("div", { className: "uf-flex uf-items-center uf-gap-2", children: [
12764
+ variant === "with-icons" && /* @__PURE__ */ jsx21("div", { className: "uf-flex uf--space-x-1", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsx21("div", { className: "uf-w-5 uf-h-5 uf-rounded-full uf-bg-muted uf-border-2 uf-border-secondary" }, i)) }),
12765
+ /* @__PURE__ */ jsx21(ChevronRight, { className: "uf-w-4 uf-h-4 uf-text-muted" })
12766
+ ] })
12767
+ ] });
12768
+ }
12479
12769
  var t3 = i18n.depositModal;
12480
12770
  function DepositModal({
12481
12771
  open,
@@ -12500,6 +12790,15 @@ function DepositModal({
12500
12790
  const [quotesCount, setQuotesCount] = useState52(0);
12501
12791
  const [depositsModalOpen, setDepositsModalOpen] = useState52(false);
12502
12792
  const [depositExecutions, setDepositExecutions] = useState52([]);
12793
+ const [projectConfig, setProjectConfig] = useState52(null);
12794
+ const [wallets, setWallets] = useState52([]);
12795
+ const [walletsLoading, setWalletsLoading] = useState52(false);
12796
+ useEffect52(() => {
12797
+ setProjectConfig(null);
12798
+ }, [publishableKey]);
12799
+ useEffect52(() => {
12800
+ setWallets([]);
12801
+ }, [userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey]);
12503
12802
  const [resolvedTheme, setResolvedTheme] = useState52(theme === "auto" ? "dark" : theme);
12504
12803
  useEffect52(() => {
12505
12804
  if (theme === "auto") {
@@ -12514,6 +12813,49 @@ function DepositModal({
12514
12813
  setResolvedTheme(theme);
12515
12814
  }
12516
12815
  }, [theme]);
12816
+ useEffect52(() => {
12817
+ if (open && !projectConfig) {
12818
+ getProjectConfig(publishableKey).then(setProjectConfig).catch(console.error);
12819
+ }
12820
+ }, [open, publishableKey, projectConfig]);
12821
+ useEffect52(() => {
12822
+ if (!open || wallets.length > 0) return;
12823
+ let retryTimeout = null;
12824
+ let isCancelled = false;
12825
+ const fetchWallets = async () => {
12826
+ if (isCancelled) return;
12827
+ setWalletsLoading(true);
12828
+ try {
12829
+ const response = await createEOA(
12830
+ {
12831
+ user_id: userId,
12832
+ recipient_address: recipientAddress,
12833
+ destination_chain_type: destinationChainType,
12834
+ destination_chain_id: destinationChainId,
12835
+ destination_token_address: destinationTokenAddress
12836
+ },
12837
+ publishableKey
12838
+ );
12839
+ if (!isCancelled) {
12840
+ setWallets(response.data);
12841
+ setWalletsLoading(false);
12842
+ }
12843
+ } catch (error) {
12844
+ console.error("Error fetching wallets, retrying in 5s:", error);
12845
+ if (!isCancelled) {
12846
+ setWalletsLoading(false);
12847
+ retryTimeout = setTimeout(fetchWallets, 5e3);
12848
+ }
12849
+ }
12850
+ };
12851
+ fetchWallets();
12852
+ return () => {
12853
+ isCancelled = true;
12854
+ if (retryTimeout) {
12855
+ clearTimeout(retryTimeout);
12856
+ }
12857
+ };
12858
+ }, [open, userId, recipientAddress, destinationChainType, destinationChainId, destinationTokenAddress, publishableKey, wallets.length]);
12517
12859
  const themeClass = resolvedTheme === "dark" ? "uf-dark" : "";
12518
12860
  const handleClose = () => {
12519
12861
  onOpenChange(false);
@@ -12538,39 +12880,45 @@ function DepositModal({
12538
12880
  setQuotesCount(count3);
12539
12881
  }
12540
12882
  };
12541
- return /* @__PURE__ */ jsx20(ThemeProvider, { themeClass, children: /* @__PURE__ */ jsxs14(Dialog2, { open, onOpenChange: handleClose, children: [
12542
- /* @__PURE__ */ jsx20(
12883
+ return /* @__PURE__ */ jsx21(ThemeProvider, { themeClass, children: /* @__PURE__ */ jsxs16(Dialog2, { open, onOpenChange: handleClose, children: [
12884
+ /* @__PURE__ */ jsx21(
12543
12885
  DialogContent2,
12544
12886
  {
12545
12887
  className: `sm:uf-max-w-[400px] !uf-bg-card uf-border-secondary uf-text-foreground uf-p-0 uf-gap-0 uf-overflow-visible [&>button]:uf-hidden ${themeClass}`,
12546
12888
  onPointerDownOutside: (e) => e.preventDefault(),
12547
12889
  onInteractOutside: (e) => e.preventDefault(),
12548
- children: view === "main" ? /* @__PURE__ */ jsxs14(Fragment42, { children: [
12549
- /* @__PURE__ */ jsx20(
12890
+ children: view === "main" ? /* @__PURE__ */ jsxs16(Fragment42, { children: [
12891
+ /* @__PURE__ */ jsx21(
12550
12892
  DepositHeader,
12551
12893
  {
12552
12894
  title: modalTitle || "Deposit",
12553
12895
  onClose: handleClose
12554
12896
  }
12555
12897
  ),
12556
- /* @__PURE__ */ jsxs14("div", { className: "uf-pb-4 uf-space-y-3", children: [
12557
- /* @__PURE__ */ jsx20(
12898
+ /* @__PURE__ */ jsx21("div", { className: "uf-pb-4 uf-space-y-3", children: !projectConfig ? /* @__PURE__ */ jsxs16(Fragment42, { children: [
12899
+ /* @__PURE__ */ jsx21(SkeletonButton, { variant: "with-icons" }),
12900
+ /* @__PURE__ */ jsx21(SkeletonButton, { variant: "with-icons" }),
12901
+ !hideDepositTracker && /* @__PURE__ */ jsx21(SkeletonButton, {})
12902
+ ] }) : /* @__PURE__ */ jsxs16(Fragment42, { children: [
12903
+ /* @__PURE__ */ jsx21(
12558
12904
  TransferCryptoButton,
12559
12905
  {
12560
12906
  onClick: () => setView("transfer"),
12561
12907
  title: t3.transferCrypto.title,
12562
- subtitle: t3.transferCrypto.subtitle
12908
+ subtitle: t3.transferCrypto.subtitle,
12909
+ featuredTokens: projectConfig.transfer_crypto.networks
12563
12910
  }
12564
12911
  ),
12565
- /* @__PURE__ */ jsx20(
12912
+ /* @__PURE__ */ jsx21(
12566
12913
  DepositWithCardButton,
12567
12914
  {
12568
12915
  onClick: () => setView("card"),
12569
12916
  title: t3.depositWithCard.title,
12570
- subtitle: t3.depositWithCard.subtitle
12917
+ subtitle: t3.depositWithCard.subtitle,
12918
+ paymentNetworks: projectConfig.payment_networks.networks
12571
12919
  }
12572
12920
  ),
12573
- !hideDepositTracker && /* @__PURE__ */ jsx20(
12921
+ !hideDepositTracker && /* @__PURE__ */ jsx21(
12574
12922
  DepositTrackerButton,
12575
12923
  {
12576
12924
  onClick: () => setDepositsModalOpen(true),
@@ -12579,9 +12927,9 @@ function DepositModal({
12579
12927
  badge: depositExecutions.length > 0 ? depositExecutions.length : void 0
12580
12928
  }
12581
12929
  )
12582
- ] })
12583
- ] }) : view === "transfer" ? /* @__PURE__ */ jsxs14(Fragment42, { children: [
12584
- /* @__PURE__ */ jsx20(
12930
+ ] }) })
12931
+ ] }) : view === "transfer" ? /* @__PURE__ */ jsxs16(Fragment42, { children: [
12932
+ /* @__PURE__ */ jsx21(
12585
12933
  DepositHeader,
12586
12934
  {
12587
12935
  title: t3.transferCrypto.title,
@@ -12590,7 +12938,7 @@ function DepositModal({
12590
12938
  onClose: handleClose
12591
12939
  }
12592
12940
  ),
12593
- /* @__PURE__ */ jsx20(
12941
+ /* @__PURE__ */ jsx21(
12594
12942
  TransferCrypto,
12595
12943
  {
12596
12944
  userId,
@@ -12601,11 +12949,12 @@ function DepositModal({
12601
12949
  destinationTokenAddress,
12602
12950
  onExecutionsChange: setDepositExecutions,
12603
12951
  onDepositSuccess,
12604
- onDepositError
12952
+ onDepositError,
12953
+ wallets
12605
12954
  }
12606
12955
  )
12607
- ] }) : /* @__PURE__ */ jsxs14(Fragment42, { children: [
12608
- /* @__PURE__ */ jsx20(
12956
+ ] }) : /* @__PURE__ */ jsxs16(Fragment42, { children: [
12957
+ /* @__PURE__ */ jsx21(
12609
12958
  DepositHeader,
12610
12959
  {
12611
12960
  title: cardView === "quotes" ? t3.quotes : modalTitle || "Deposit",
@@ -12615,7 +12964,7 @@ function DepositModal({
12615
12964
  badge: cardView === "quotes" ? { count: quotesCount } : void 0
12616
12965
  }
12617
12966
  ),
12618
- /* @__PURE__ */ jsx20(
12967
+ /* @__PURE__ */ jsx21(
12619
12968
  BuyWithCard,
12620
12969
  {
12621
12970
  userId,
@@ -12629,13 +12978,15 @@ function DepositModal({
12629
12978
  destinationTokenAddress,
12630
12979
  onDepositSuccess,
12631
12980
  onDepositError,
12632
- themeClass
12981
+ themeClass,
12982
+ wallets,
12983
+ assetCdnUrl: projectConfig?.asset_cdn_url
12633
12984
  }
12634
12985
  )
12635
12986
  ] })
12636
12987
  }
12637
12988
  ),
12638
- /* @__PURE__ */ jsx20(
12989
+ /* @__PURE__ */ jsx21(
12639
12990
  DepositsModal,
12640
12991
  {
12641
12992
  open: depositsModalOpen,
@@ -12650,7 +13001,7 @@ function DepositModal({
12650
13001
  }
12651
13002
 
12652
13003
  // src/provider.tsx
12653
- import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
13004
+ import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
12654
13005
  function UnifoldProvider2({
12655
13006
  children,
12656
13007
  publishableKey,
@@ -12742,7 +13093,7 @@ function UnifoldProvider2({
12742
13093
  }),
12743
13094
  [beginDeposit, closeDeposit, handleDepositSuccess, handleDepositError]
12744
13095
  );
12745
- return /* @__PURE__ */ jsx24(UnifoldProvider, { publishableKey, children: /* @__PURE__ */ jsxs15(ConnectContext.Provider, { value: contextValue, children: [
13096
+ return /* @__PURE__ */ jsx24(UnifoldProvider, { publishableKey, children: /* @__PURE__ */ jsxs17(ConnectContext.Provider, { value: contextValue, children: [
12746
13097
  children,
12747
13098
  depositConfig && /* @__PURE__ */ jsx24(
12748
13099
  DepositModal,
@@ -12795,7 +13146,9 @@ export {
12795
13146
 
12796
13147
  lucide-react/dist/esm/defaultAttributes.js:
12797
13148
  lucide-react/dist/esm/createLucideIcon.js:
13149
+ lucide-react/dist/esm/icons/arrow-down-circle.js:
12798
13150
  lucide-react/dist/esm/icons/arrow-left.js:
13151
+ lucide-react/dist/esm/icons/check-circle.js:
12799
13152
  lucide-react/dist/esm/icons/check.js:
12800
13153
  lucide-react/dist/esm/icons/chevron-down.js:
12801
13154
  lucide-react/dist/esm/icons/chevron-right.js: