@rhinestone/deposit-modal 0.1.66 → 0.1.68

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.
Files changed (34) hide show
  1. package/dist/{DepositModalReown-RXIVPSEE.mjs → DepositModalReown-RYCOXWMH.mjs} +3 -3
  2. package/dist/{DepositModalReown-WFXQKZDH.cjs → DepositModalReown-WXFTSZSK.cjs} +4 -4
  3. package/dist/{WithdrawModalReown-MME7VSKX.mjs → WithdrawModalReown-6VYKKKJN.mjs} +3 -3
  4. package/dist/{WithdrawModalReown-PXS44GZO.cjs → WithdrawModalReown-WHPQDJJJ.cjs} +4 -4
  5. package/dist/{chunk-CULXRW6U.mjs → chunk-5FDIQNJJ.mjs} +22 -19
  6. package/dist/{chunk-JZWCK7C3.cjs → chunk-FLVSQDP4.cjs} +98 -91
  7. package/dist/{chunk-FWGLRTWF.mjs → chunk-IUW3SJQT.mjs} +61 -54
  8. package/dist/{chunk-5GN4QU67.cjs → chunk-J7ILKS5N.cjs} +1059 -447
  9. package/dist/{chunk-75LRORPO.cjs → chunk-LTLFJPHO.cjs} +106 -103
  10. package/dist/{chunk-R6U6BHCV.cjs → chunk-MUWVDVY4.cjs} +13 -1
  11. package/dist/{chunk-JDO7QPPH.mjs → chunk-OEB25YZ4.mjs} +1132 -520
  12. package/dist/{chunk-CIXHTOO3.mjs → chunk-SDZKKUCJ.mjs} +13 -1
  13. package/dist/constants.cjs +2 -2
  14. package/dist/constants.mjs +1 -1
  15. package/dist/deposit.cjs +4 -4
  16. package/dist/deposit.d.cts +2 -2
  17. package/dist/deposit.d.ts +2 -2
  18. package/dist/deposit.mjs +3 -3
  19. package/dist/index.cjs +5 -5
  20. package/dist/index.d.cts +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.mjs +4 -4
  23. package/dist/reown.cjs +5 -5
  24. package/dist/reown.d.cts +1 -1
  25. package/dist/reown.d.ts +1 -1
  26. package/dist/reown.mjs +4 -4
  27. package/dist/styles.css +456 -32
  28. package/dist/{types-ymKENnUK.d.ts → types-DGQzvl6v.d.ts} +11 -1
  29. package/dist/{types-DjaZ9sa8.d.cts → types-DJ1fzNC7.d.cts} +11 -1
  30. package/dist/withdraw.cjs +4 -4
  31. package/dist/withdraw.d.cts +2 -2
  32. package/dist/withdraw.d.ts +2 -2
  33. package/dist/withdraw.mjs +3 -3
  34. package/package.json +5 -5
@@ -28,7 +28,7 @@ import {
28
28
  tokenFormatter,
29
29
  txRefsMatch,
30
30
  useLatestRef
31
- } from "./chunk-FWGLRTWF.mjs";
31
+ } from "./chunk-IUW3SJQT.mjs";
32
32
  import {
33
33
  DEFAULT_BACKEND_URL,
34
34
  DEFAULT_SIGNER_ADDRESS,
@@ -38,6 +38,7 @@ import {
38
38
  getChainIcon,
39
39
  getChainId,
40
40
  getChainName,
41
+ getExplorerTxUrl,
41
42
  getExplorerUrl,
42
43
  getSupportedChainIds,
43
44
  getTargetTokenSymbolsForChain,
@@ -46,21 +47,22 @@ import {
46
47
  getTokenIcon,
47
48
  getTokenSymbol,
48
49
  isStablecoinSymbol
49
- } from "./chunk-CIXHTOO3.mjs";
50
+ } from "./chunk-SDZKKUCJ.mjs";
50
51
 
51
52
  // src/DepositModal.tsx
52
53
  import {
53
- useMemo as useMemo8,
54
- useEffect as useEffect10,
55
- useRef as useRef6,
56
- useState as useState11,
57
- useCallback as useCallback5,
54
+ useMemo as useMemo7,
55
+ useEffect as useEffect11,
56
+ useRef as useRef8,
57
+ useState as useState12,
58
+ useCallback as useCallback7,
58
59
  lazy,
59
60
  Suspense
60
61
  } from "react";
61
62
 
62
63
  // src/DepositFlow.tsx
63
- import { useState as useState10, useCallback as useCallback3, useMemo as useMemo7, useEffect as useEffect9, useRef as useRef5 } from "react";
64
+ import { useState as useState11, useCallback as useCallback5, useMemo as useMemo6, useEffect as useEffect10, useRef as useRef7 } from "react";
65
+ import { formatUnits as formatUnits5 } from "viem";
64
66
 
65
67
  // src/components/steps/SetupStep.tsx
66
68
  import { useState, useEffect, useRef, useCallback } from "react";
@@ -89,6 +91,8 @@ function SetupStep({
89
91
  sessionChainIds,
90
92
  recipient,
91
93
  postBridgeActions,
94
+ outputTokenRules,
95
+ rejectUnmapped,
92
96
  forceRegister,
93
97
  enableSolana = true,
94
98
  service,
@@ -158,7 +162,9 @@ function SetupStep({
158
162
  chain: toEvmCaip2(targetChain),
159
163
  token: targetToken,
160
164
  ...recipient && { recipient },
161
- ...postBridgeActions?.length && { postBridgeActions }
165
+ ...postBridgeActions?.length && { postBridgeActions },
166
+ ...outputTokenRules?.length && { outputTokenRules },
167
+ ...rejectUnmapped != null && { rejectUnmapped }
162
168
  }
163
169
  });
164
170
  setState({ type: "ready", smartAccount });
@@ -274,7 +280,8 @@ function AssetSelectStep({
274
280
  service,
275
281
  onContinue,
276
282
  onTotalBalanceComputed,
277
- onAssetsLoaded
283
+ onAssetsLoaded,
284
+ onDisconnect
278
285
  }) {
279
286
  const [assets, setAssets] = useState2([]);
280
287
  const [selectedAssetId, setSelectedAssetId] = useState2(null);
@@ -422,7 +429,16 @@ function AssetSelectStep({
422
429
  address.slice(0, 6),
423
430
  "...",
424
431
  address.slice(-4)
425
- ] })
432
+ ] }),
433
+ onDisconnect && /* @__PURE__ */ jsx2(
434
+ "button",
435
+ {
436
+ type: "button",
437
+ className: "rs-empty-disconnect",
438
+ onClick: onDisconnect,
439
+ children: "Disconnect wallet"
440
+ }
441
+ )
426
442
  ] }),
427
443
  !loading && !error && rows.length > 0 && /* @__PURE__ */ jsx2("div", { className: "rs-asset-list", children: rows.map((asset) => {
428
444
  const isSelected = selectedAssetId === asset.id;
@@ -1182,96 +1198,475 @@ function ConfirmStep({
1182
1198
  }
1183
1199
 
1184
1200
  // src/components/steps/DepositAddressStep.tsx
1185
- import { useState as useState6, useEffect as useEffect6, useCallback as useCallback2, useRef as useRef4, useMemo as useMemo4 } from "react";
1201
+ import { useState as useState7, useEffect as useEffect7, useCallback as useCallback4, useRef as useRef6, useMemo as useMemo3 } from "react";
1186
1202
 
1187
1203
  // src/components/ui/QRCode.tsx
1188
- import { useEffect as useEffect5, useMemo as useMemo3, useState as useState5 } from "react";
1189
- import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1204
+ import { QRCode as QRCodeCanvas } from "react-qrcode-logo";
1205
+ import { jsx as jsx5 } from "react/jsx-runtime";
1190
1206
  function QRCode({ value, size = 200, iconSrc, className }) {
1191
- const [createQrCode, setCreateQrCode] = useState5(null);
1192
- useEffect5(() => {
1193
- let mounted = true;
1194
- void import("qrcode-generator").then((mod) => {
1195
- if (mounted) {
1196
- setCreateQrCode(() => mod.default);
1197
- }
1198
- }).catch(() => {
1199
- if (mounted) {
1200
- setCreateQrCode(null);
1201
- }
1207
+ return /* @__PURE__ */ jsx5("div", { className, role: "img", "aria-label": "QR Code", children: /* @__PURE__ */ jsx5(
1208
+ QRCodeCanvas,
1209
+ {
1210
+ value,
1211
+ size,
1212
+ qrStyle: "dots",
1213
+ eyeRadius: [10, 10, 10],
1214
+ ecLevel: "H",
1215
+ logoImage: iconSrc,
1216
+ logoWidth: size * 0.22,
1217
+ logoHeight: size * 0.22,
1218
+ logoPaddingStyle: "circle",
1219
+ logoPadding: 5,
1220
+ removeQrCodeBehindLogo: true,
1221
+ quietZone: 10,
1222
+ bgColor: "#ffffff",
1223
+ fgColor: "#000000"
1224
+ }
1225
+ ) });
1226
+ }
1227
+ QRCode.displayName = "QRCode";
1228
+
1229
+ // src/components/ui/Tooltip.tsx
1230
+ import {
1231
+ useState as useState5,
1232
+ useRef as useRef4,
1233
+ useEffect as useEffect5,
1234
+ useCallback as useCallback2
1235
+ } from "react";
1236
+ import { createPortal } from "react-dom";
1237
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1238
+ function Tooltip({ content, children, className }) {
1239
+ const [open, setOpen] = useState5(false);
1240
+ const [position, setPosition] = useState5(null);
1241
+ const triggerRef = useRef4(null);
1242
+ const bubbleRef = useRef4(null);
1243
+ const updatePosition = useCallback2(() => {
1244
+ const trigger = triggerRef.current;
1245
+ if (!trigger) return;
1246
+ const rect = trigger.getBoundingClientRect();
1247
+ setPosition({
1248
+ top: rect.top,
1249
+ left: rect.left + rect.width / 2
1202
1250
  });
1203
- return () => {
1204
- mounted = false;
1205
- };
1206
1251
  }, []);
1207
- const svgContent = useMemo3(() => {
1208
- if (!createQrCode) {
1209
- return null;
1252
+ useEffect5(() => {
1253
+ if (!open) return;
1254
+ updatePosition();
1255
+ function handleOutside(event) {
1256
+ const target = event.target;
1257
+ if (!target) return;
1258
+ if (triggerRef.current?.contains(target)) return;
1259
+ if (bubbleRef.current?.contains(target)) return;
1260
+ setOpen(false);
1210
1261
  }
1211
- const qr = createQrCode(0, "M");
1212
- qr.addData(value);
1213
- qr.make();
1214
- const moduleCount = qr.getModuleCount();
1215
- const cellSize = size / moduleCount;
1216
- const paths = [];
1217
- const iconCenterSize = iconSrc ? moduleCount * 0.22 : 0;
1218
- const iconStart = (moduleCount - iconCenterSize) / 2;
1219
- const iconEnd = (moduleCount + iconCenterSize) / 2;
1220
- for (let row = 0; row < moduleCount; row++) {
1221
- for (let col = 0; col < moduleCount; col++) {
1222
- if (!qr.isDark(row, col)) continue;
1223
- if (iconSrc && row >= iconStart && row < iconEnd && col >= iconStart && col < iconEnd) {
1224
- continue;
1225
- }
1226
- const x = col * cellSize;
1227
- const y = row * cellSize;
1228
- paths.push(`M${x},${y}h${cellSize}v${cellSize}h${-cellSize}z`);
1229
- }
1262
+ function handleKey(event) {
1263
+ if (event.key === "Escape") setOpen(false);
1230
1264
  }
1231
- return { paths: paths.join(""), moduleCount, cellSize };
1232
- }, [createQrCode, value, size, iconSrc]);
1233
- const iconSize = size * 0.22;
1234
- const iconOffset = (size - iconSize) / 2;
1265
+ document.addEventListener("mousedown", handleOutside);
1266
+ document.addEventListener("touchstart", handleOutside);
1267
+ document.addEventListener("keydown", handleKey);
1268
+ window.addEventListener("scroll", updatePosition, true);
1269
+ window.addEventListener("resize", updatePosition);
1270
+ return () => {
1271
+ document.removeEventListener("mousedown", handleOutside);
1272
+ document.removeEventListener("touchstart", handleOutside);
1273
+ document.removeEventListener("keydown", handleKey);
1274
+ window.removeEventListener("scroll", updatePosition, true);
1275
+ window.removeEventListener("resize", updatePosition);
1276
+ };
1277
+ }, [open, updatePosition]);
1235
1278
  return /* @__PURE__ */ jsxs5(
1236
- "svg",
1279
+ "span",
1237
1280
  {
1238
- viewBox: `0 0 ${size} ${size}`,
1239
- width: size,
1240
- height: size,
1241
- className,
1242
- role: "img",
1243
- "aria-label": "QR Code",
1281
+ ref: triggerRef,
1282
+ className: `rs-tooltip ${className ?? ""}`,
1283
+ onMouseEnter: () => setOpen(true),
1284
+ onMouseLeave: () => setOpen(false),
1244
1285
  children: [
1245
- /* @__PURE__ */ jsx5("rect", { width: size, height: size, fill: "white", rx: 4 }),
1246
- svgContent ? /* @__PURE__ */ jsx5("path", { d: svgContent.paths, fill: "black" }) : /* @__PURE__ */ jsx5("rect", { x: 8, y: 8, width: size - 16, height: size - 16, fill: "#f1f5f9" }),
1247
- iconSrc && /* @__PURE__ */ jsxs5(Fragment2, { children: [
1248
- /* @__PURE__ */ jsx5(
1249
- "rect",
1286
+ /* @__PURE__ */ jsx6(
1287
+ "span",
1288
+ {
1289
+ className: "rs-tooltip-trigger",
1290
+ role: "button",
1291
+ tabIndex: 0,
1292
+ "aria-label": content,
1293
+ onClick: (event) => {
1294
+ event.stopPropagation();
1295
+ event.preventDefault();
1296
+ setOpen((value) => !value);
1297
+ },
1298
+ onKeyDown: (event) => {
1299
+ if (event.key === "Enter" || event.key === " ") {
1300
+ event.preventDefault();
1301
+ setOpen((value) => !value);
1302
+ }
1303
+ },
1304
+ children
1305
+ }
1306
+ ),
1307
+ open && position && typeof document !== "undefined" && createPortal(
1308
+ /* @__PURE__ */ jsx6(
1309
+ "span",
1250
1310
  {
1251
- x: iconOffset - 4,
1252
- y: iconOffset - 4,
1253
- width: iconSize + 8,
1254
- height: iconSize + 8,
1255
- fill: "white",
1256
- rx: 8
1311
+ ref: bubbleRef,
1312
+ className: "rs-tooltip-bubble",
1313
+ role: "tooltip",
1314
+ style: { top: position.top, left: position.left },
1315
+ children: content
1257
1316
  }
1258
1317
  ),
1259
- /* @__PURE__ */ jsx5(
1260
- "image",
1318
+ document.body
1319
+ )
1320
+ ]
1321
+ }
1322
+ );
1323
+ }
1324
+ Tooltip.displayName = "Tooltip";
1325
+
1326
+ // src/components/ui/DepositNotification.tsx
1327
+ import { useState as useState6, useEffect as useEffect6, useRef as useRef5, useCallback as useCallback3 } from "react";
1328
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
1329
+ var INITIAL_POLL_INTERVAL = 3e3;
1330
+ var MAX_POLL_INTERVAL = 3e4;
1331
+ var BACKOFF_MULTIPLIER = 1.5;
1332
+ function isEventForTx(event, txHash) {
1333
+ const eventTxHash = getEventTxHash(event);
1334
+ if (!eventTxHash) return false;
1335
+ return txRefsMatch(eventTxHash, txHash);
1336
+ }
1337
+ function truncateHash(hash) {
1338
+ return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
1339
+ }
1340
+ function formatTimestamp(ms) {
1341
+ const date = new Date(ms);
1342
+ const months = [
1343
+ "Jan",
1344
+ "Feb",
1345
+ "Mar",
1346
+ "Apr",
1347
+ "May",
1348
+ "Jun",
1349
+ "Jul",
1350
+ "Aug",
1351
+ "Sep",
1352
+ "Oct",
1353
+ "Nov",
1354
+ "Dec"
1355
+ ];
1356
+ const month = months[date.getMonth()];
1357
+ const day = date.getDate();
1358
+ const suffix = day % 10 === 1 && day !== 11 ? "st" : day % 10 === 2 && day !== 12 ? "nd" : day % 10 === 3 && day !== 13 ? "rd" : "th";
1359
+ const hours = String(date.getHours()).padStart(2, "0");
1360
+ const minutes = String(date.getMinutes()).padStart(2, "0");
1361
+ const seconds = String(date.getSeconds()).padStart(2, "0");
1362
+ return `${month} ${day}${suffix} \xB7 ${hours}:${minutes}:${seconds}`;
1363
+ }
1364
+ function formatBridgeFailedMessage(event) {
1365
+ const eventData = event?.data ?? {};
1366
+ const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
1367
+ if (backendMessage.length > 0) {
1368
+ const lower = backendMessage.toLowerCase();
1369
+ if (lower.includes("insufficient funds")) {
1370
+ return "Deposit was received, but processing could not continue due to insufficient funds.";
1371
+ }
1372
+ if (lower.includes("no valid quote available")) {
1373
+ return "No bridge route is currently available for this transfer.";
1374
+ }
1375
+ if (lower.includes("simulation failed")) {
1376
+ return "Transfer processing failed during simulation.";
1377
+ }
1378
+ if (backendMessage.length > 220) {
1379
+ return "Transfer processing failed.";
1380
+ }
1381
+ return backendMessage;
1382
+ }
1383
+ return "Bridge failed";
1384
+ }
1385
+ var txLinkIcon = /* @__PURE__ */ jsx7(
1386
+ "svg",
1387
+ {
1388
+ viewBox: "0 0 24 24",
1389
+ fill: "none",
1390
+ stroke: "currentColor",
1391
+ strokeWidth: "2.5",
1392
+ className: "rs-deposit-notification-link-icon",
1393
+ children: /* @__PURE__ */ jsx7(
1394
+ "path",
1395
+ {
1396
+ strokeLinecap: "round",
1397
+ strokeLinejoin: "round",
1398
+ d: "M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"
1399
+ }
1400
+ )
1401
+ }
1402
+ );
1403
+ function DepositNotification({
1404
+ deposit,
1405
+ smartAccount,
1406
+ targetChain,
1407
+ targetToken,
1408
+ waitForFinalTx,
1409
+ hasPostBridgeActions,
1410
+ service,
1411
+ onComplete,
1412
+ onFailed,
1413
+ onDismiss
1414
+ }) {
1415
+ const { txHash, sourceChain, amount, token, detectedAt, directTransfer } = deposit;
1416
+ const [status, setStatus] = useState6(
1417
+ directTransfer ? "complete" : "processing"
1418
+ );
1419
+ const [expanded, setExpanded] = useState6(false);
1420
+ const [completedAt, setCompletedAt] = useState6(
1421
+ directTransfer ? detectedAt : null
1422
+ );
1423
+ const [destinationTxHash, setDestinationTxHash] = useState6(
1424
+ null
1425
+ );
1426
+ const pollIntervalRef = useRef5(INITIAL_POLL_INTERVAL);
1427
+ const pollTimeoutRef = useRef5(null);
1428
+ const completedRef = useRef5(directTransfer ?? false);
1429
+ const depositContextRef = useLatestRef({
1430
+ amount,
1431
+ sourceChain,
1432
+ sourceToken: token,
1433
+ targetChain,
1434
+ targetToken,
1435
+ waitForFinalTx,
1436
+ hasPostBridgeActions
1437
+ });
1438
+ const onCompleteRef = useLatestRef(onComplete);
1439
+ const onFailedRef = useLatestRef(onFailed);
1440
+ const handleComplete = useCallback3(
1441
+ (destTxHash) => {
1442
+ if (completedRef.current) return;
1443
+ completedRef.current = true;
1444
+ setDestinationTxHash(destTxHash ?? null);
1445
+ setCompletedAt(Date.now());
1446
+ setStatus("complete");
1447
+ const context = depositContextRef.current;
1448
+ onCompleteRef.current?.(txHash, destTxHash, {
1449
+ amount: context.amount,
1450
+ sourceChain: context.sourceChain,
1451
+ sourceToken: context.sourceToken,
1452
+ targetChain: context.targetChain,
1453
+ targetToken: context.targetToken
1454
+ });
1455
+ },
1456
+ [depositContextRef, onCompleteRef, txHash]
1457
+ );
1458
+ const handleFailed = useCallback3(
1459
+ (error) => {
1460
+ if (completedRef.current) return;
1461
+ completedRef.current = true;
1462
+ setStatus("failed");
1463
+ onFailedRef.current?.(txHash, error);
1464
+ },
1465
+ [onFailedRef, txHash]
1466
+ );
1467
+ useEffect6(() => {
1468
+ if (directTransfer) {
1469
+ handleComplete(void 0);
1470
+ return;
1471
+ }
1472
+ if (status !== "processing") return;
1473
+ let isMounted = true;
1474
+ async function pollStatus() {
1475
+ try {
1476
+ const data = await service.fetchStatus(smartAccount, txHash);
1477
+ if (!isMounted) return;
1478
+ const lastEvent = data.lastEvent;
1479
+ const eventForTx = isEventForTx(lastEvent, txHash) ? lastEvent : void 0;
1480
+ const awaitingPostBridgeSwap = depositContextRef.current.waitForFinalTx && depositContextRef.current.hasPostBridgeActions;
1481
+ if (eventForTx?.type === "post-bridge-swap-complete") {
1482
+ const swapTxHash = eventForTx.data?.swap?.transactionHash;
1483
+ handleComplete(swapTxHash);
1484
+ return;
1485
+ }
1486
+ if (eventForTx?.type === "post-bridge-swap-failed") {
1487
+ handleFailed(formatBridgeFailedMessage(eventForTx));
1488
+ return;
1489
+ }
1490
+ if (eventForTx?.type === "bridge-complete" && !awaitingPostBridgeSwap) {
1491
+ const destTx = eventForTx.data?.destination?.transactionHash;
1492
+ handleComplete(destTx);
1493
+ return;
1494
+ }
1495
+ if (!waitForFinalTx && eventForTx?.type === "bridge-started") {
1496
+ handleComplete(void 0);
1497
+ return;
1498
+ }
1499
+ if (eventForTx?.type === "bridge-failed") {
1500
+ handleFailed(formatBridgeFailedMessage(eventForTx));
1501
+ return;
1502
+ }
1503
+ if (eventForTx?.type === "error") {
1504
+ const errorMessage = eventForTx.data?.message ?? "Unknown error";
1505
+ handleFailed(errorMessage);
1506
+ return;
1507
+ }
1508
+ scheduleNextPoll();
1509
+ } catch {
1510
+ scheduleNextPoll();
1511
+ }
1512
+ }
1513
+ function scheduleNextPoll() {
1514
+ if (!isMounted) return;
1515
+ pollTimeoutRef.current = setTimeout(() => {
1516
+ pollIntervalRef.current = Math.min(
1517
+ pollIntervalRef.current * BACKOFF_MULTIPLIER,
1518
+ MAX_POLL_INTERVAL
1519
+ );
1520
+ pollStatus();
1521
+ }, pollIntervalRef.current);
1522
+ }
1523
+ pollStatus();
1524
+ return () => {
1525
+ isMounted = false;
1526
+ if (pollTimeoutRef.current) {
1527
+ clearTimeout(pollTimeoutRef.current);
1528
+ }
1529
+ };
1530
+ }, [
1531
+ directTransfer,
1532
+ depositContextRef,
1533
+ handleComplete,
1534
+ handleFailed,
1535
+ service,
1536
+ smartAccount,
1537
+ status,
1538
+ txHash
1539
+ ]);
1540
+ const sourceExplorerUrl = getExplorerTxUrl(sourceChain, txHash);
1541
+ const destExplorerUrl = destinationTxHash ? getExplorerTxUrl(targetChain, destinationTxHash) : null;
1542
+ const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
1543
+ const subtitle = status === "complete" ? "Your deposit has been credited to your account." : status === "failed" ? "Your deposit could not be processed." : "Your deposit will be credited to your account shortly.";
1544
+ const statusIcon = status === "complete" ? /* @__PURE__ */ jsx7("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ jsx7(
1545
+ "svg",
1546
+ {
1547
+ viewBox: "0 0 24 24",
1548
+ fill: "none",
1549
+ stroke: "currentColor",
1550
+ strokeWidth: "3",
1551
+ children: /* @__PURE__ */ jsx7(
1552
+ "path",
1553
+ {
1554
+ strokeLinecap: "round",
1555
+ strokeLinejoin: "round",
1556
+ d: "M5 12l5 5L20 7"
1557
+ }
1558
+ )
1559
+ }
1560
+ ) }) : status === "failed" ? /* @__PURE__ */ jsx7("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ jsx7(
1561
+ "svg",
1562
+ {
1563
+ viewBox: "0 0 24 24",
1564
+ fill: "none",
1565
+ stroke: "currentColor",
1566
+ strokeWidth: "3",
1567
+ children: /* @__PURE__ */ jsx7(
1568
+ "path",
1569
+ {
1570
+ strokeLinecap: "round",
1571
+ strokeLinejoin: "round",
1572
+ d: "M6 18L18 6M6 6l12 12"
1573
+ }
1574
+ )
1575
+ }
1576
+ ) }) : /* @__PURE__ */ jsx7("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ jsx7(Spinner, {}) });
1577
+ return /* @__PURE__ */ jsxs6(
1578
+ "div",
1579
+ {
1580
+ className: `rs-deposit-notification rs-deposit-notification--${status}`,
1581
+ children: [
1582
+ /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-notification-header", children: [
1583
+ /* @__PURE__ */ jsx7("div", { className: "rs-deposit-notification-icon", children: statusIcon }),
1584
+ /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-notification-content", children: [
1585
+ /* @__PURE__ */ jsx7("div", { className: "rs-deposit-notification-title", children: title }),
1586
+ /* @__PURE__ */ jsx7("div", { className: "rs-deposit-notification-subtitle", children: subtitle })
1587
+ ] }),
1588
+ /* @__PURE__ */ jsx7(
1589
+ "button",
1261
1590
  {
1262
- href: iconSrc,
1263
- x: iconOffset,
1264
- y: iconOffset,
1265
- width: iconSize,
1266
- height: iconSize
1591
+ type: "button",
1592
+ className: "rs-deposit-notification-close",
1593
+ onClick: () => onDismiss(deposit.id),
1594
+ "aria-label": "Dismiss",
1595
+ children: /* @__PURE__ */ jsx7(
1596
+ "svg",
1597
+ {
1598
+ viewBox: "0 0 24 24",
1599
+ fill: "none",
1600
+ stroke: "currentColor",
1601
+ strokeWidth: "2",
1602
+ children: /* @__PURE__ */ jsx7(
1603
+ "path",
1604
+ {
1605
+ strokeLinecap: "round",
1606
+ strokeLinejoin: "round",
1607
+ d: "M6 18L18 6M6 6l12 12"
1608
+ }
1609
+ )
1610
+ }
1611
+ )
1267
1612
  }
1268
1613
  )
1269
- ] })
1614
+ ] }),
1615
+ expanded && /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-notification-details", children: [
1616
+ /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-notification-row", children: [
1617
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-label", children: "Deposit tx" }),
1618
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-value", children: sourceExplorerUrl ? /* @__PURE__ */ jsxs6(
1619
+ "a",
1620
+ {
1621
+ href: sourceExplorerUrl,
1622
+ target: "_blank",
1623
+ rel: "noopener noreferrer",
1624
+ className: "rs-deposit-notification-link",
1625
+ children: [
1626
+ truncateHash(txHash),
1627
+ txLinkIcon
1628
+ ]
1629
+ }
1630
+ ) : truncateHash(txHash) })
1631
+ ] }),
1632
+ destinationTxHash && /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-notification-row", children: [
1633
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-label", children: "Completion tx" }),
1634
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-value", children: destExplorerUrl ? /* @__PURE__ */ jsxs6(
1635
+ "a",
1636
+ {
1637
+ href: destExplorerUrl,
1638
+ target: "_blank",
1639
+ rel: "noopener noreferrer",
1640
+ className: "rs-deposit-notification-link",
1641
+ children: [
1642
+ truncateHash(destinationTxHash),
1643
+ txLinkIcon
1644
+ ]
1645
+ }
1646
+ ) : truncateHash(destinationTxHash) })
1647
+ ] }),
1648
+ /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-notification-row", children: [
1649
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-label", children: "Order submitted" }),
1650
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-value", children: formatTimestamp(detectedAt) })
1651
+ ] }),
1652
+ completedAt && /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-notification-row", children: [
1653
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-label", children: "Order filled" }),
1654
+ /* @__PURE__ */ jsx7("span", { className: "rs-deposit-notification-value", children: formatTimestamp(completedAt) })
1655
+ ] })
1656
+ ] }),
1657
+ /* @__PURE__ */ jsx7(
1658
+ "button",
1659
+ {
1660
+ type: "button",
1661
+ className: "rs-deposit-notification-toggle",
1662
+ onClick: () => setExpanded(!expanded),
1663
+ children: expanded ? "See less" : "See more"
1664
+ }
1665
+ )
1270
1666
  ]
1271
1667
  }
1272
1668
  );
1273
1669
  }
1274
- QRCode.displayName = "QRCode";
1275
1670
 
1276
1671
  // src/core/solana.ts
1277
1672
  import {
@@ -1391,7 +1786,7 @@ async function sendSolanaTransaction(provider, _connection, transaction) {
1391
1786
  }
1392
1787
 
1393
1788
  // src/components/steps/DepositAddressStep.tsx
1394
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1789
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1395
1790
  var POLL_INTERVAL_MS = 4e3;
1396
1791
  function isRecord(value) {
1397
1792
  return typeof value === "object" && value !== null;
@@ -1463,61 +1858,77 @@ function getDepositEventDetails(event) {
1463
1858
  }
1464
1859
  return {};
1465
1860
  }
1861
+ function isSameRoute(sourceChain, sourceToken, targetChain, targetToken) {
1862
+ return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
1863
+ }
1466
1864
  function DepositAddressStep({
1467
1865
  smartAccount,
1468
1866
  solanaDepositAddress,
1469
1867
  service,
1470
1868
  allowedRoutes,
1471
- onDepositDetected,
1869
+ targetChain,
1870
+ targetToken,
1871
+ waitForFinalTx,
1872
+ hasPostBridgeActions,
1873
+ uiConfig,
1874
+ onDepositSubmitted,
1875
+ onDepositComplete,
1876
+ onDepositFailed,
1472
1877
  onCopyAddress,
1473
1878
  onError
1474
1879
  }) {
1475
1880
  const hasSolana = Boolean(solanaDepositAddress);
1476
- const allowedChainSet = useMemo4(
1881
+ const allowedChainSet = useMemo3(
1477
1882
  () => allowedRoutes?.sourceChains ? new Set(allowedRoutes.sourceChains) : null,
1478
1883
  [allowedRoutes?.sourceChains]
1479
1884
  );
1480
- const allowedTokenSet = useMemo4(
1885
+ const allowedTokenSet = useMemo3(
1481
1886
  () => allowedRoutes?.sourceTokens ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
1482
1887
  [allowedRoutes?.sourceTokens]
1483
1888
  );
1484
- const evmChainIds = useMemo4(() => {
1889
+ const evmChainIds = useMemo3(() => {
1485
1890
  const all = getSupportedChainIds();
1486
1891
  return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
1487
1892
  }, [allowedChainSet]);
1488
- const chainOptions = useMemo4(
1489
- () => hasSolana ? [...evmChainIds, "solana"] : evmChainIds,
1490
- [evmChainIds, hasSolana]
1491
- );
1893
+ const chainOptions = useMemo3(() => {
1894
+ if (!hasSolana) return evmChainIds;
1895
+ const options = [...evmChainIds];
1896
+ options.splice(1, 0, "solana");
1897
+ return options;
1898
+ }, [evmChainIds, hasSolana]);
1492
1899
  const BASE_CHAIN_ID = 8453;
1493
1900
  const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
1494
- const [sourceChainId, setSourceChainId] = useState6(defaultChainId);
1901
+ const [sourceChainId, setSourceChainId] = useState7(defaultChainId);
1495
1902
  const isSolana = sourceChainId === "solana";
1496
- const tokensForChain = useMemo4(() => {
1903
+ const tokensForChain = useMemo3(() => {
1497
1904
  const all = isSolana ? SOLANA_TOKENS.map((t) => t.symbol) : getTargetTokenSymbolsForChain(sourceChainId);
1498
1905
  return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
1499
1906
  }, [sourceChainId, isSolana, allowedTokenSet]);
1500
1907
  const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
1501
- const [sourceTokenSymbol, setSourceTokenSymbol] = useState6(defaultToken);
1502
- useEffect6(() => {
1908
+ const [sourceTokenSymbol, setSourceTokenSymbol] = useState7(defaultToken);
1909
+ useEffect7(() => {
1503
1910
  if (!tokensForChain.includes(sourceTokenSymbol)) {
1504
1911
  const fallback = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
1505
1912
  setSourceTokenSymbol(fallback);
1506
1913
  }
1507
1914
  }, [tokensForChain, sourceTokenSymbol]);
1508
- const [copied, setCopied] = useState6(false);
1509
- const [pollingError, setPollingError] = useState6(null);
1510
- const [chainDropdownOpen, setChainDropdownOpen] = useState6(false);
1511
- const [tokenDropdownOpen, setTokenDropdownOpen] = useState6(false);
1512
- const chainDropdownRef = useRef4(null);
1513
- const tokenDropdownRef = useRef4(null);
1514
- const depositHandledRef = useRef4(false);
1515
- const sourceSelectionRef = useRef4({
1915
+ const [copied, setCopied] = useState7(false);
1916
+ const [pollingError, setPollingError] = useState7(null);
1917
+ const [chainDropdownOpen, setChainDropdownOpen] = useState7(false);
1918
+ const [tokenDropdownOpen, setTokenDropdownOpen] = useState7(false);
1919
+ const [priceImpactExpanded, setPriceImpactExpanded] = useState7(false);
1920
+ const chainDropdownRef = useRef6(null);
1921
+ const tokenDropdownRef = useRef6(null);
1922
+ const [notifications, setNotifications] = useState7([]);
1923
+ const isTrackingRef = useRef6(false);
1924
+ const baselineTxHashRef = useRef6(void 0);
1925
+ const notificationIdRef = useRef6(0);
1926
+ const sourceSelectionRef = useRef6({
1516
1927
  chainId: defaultChainId,
1517
1928
  token: typeof defaultChainId === "number" ? getTokenAddress(defaultToken, defaultChainId) : void 0,
1518
1929
  sourceSymbol: defaultToken
1519
1930
  });
1520
- useEffect6(() => {
1931
+ useEffect7(() => {
1521
1932
  if (isSolana) {
1522
1933
  const matched = SOLANA_TOKENS.find((t) => t.symbol === sourceTokenSymbol) ?? SOLANA_TOKENS[0];
1523
1934
  sourceSelectionRef.current = {
@@ -1535,7 +1946,7 @@ function DepositAddressStep({
1535
1946
  };
1536
1947
  }, [sourceChainId, sourceTokenSymbol, isSolana]);
1537
1948
  const displayAddress = isSolana && solanaDepositAddress ? solanaDepositAddress : smartAccount;
1538
- useEffect6(() => {
1949
+ useEffect7(() => {
1539
1950
  if (!chainDropdownOpen && !tokenDropdownOpen) return;
1540
1951
  function handlePointerDown(event) {
1541
1952
  const target = event.target;
@@ -1553,7 +1964,7 @@ function DepositAddressStep({
1553
1964
  document.removeEventListener("touchstart", handlePointerDown);
1554
1965
  };
1555
1966
  }, [chainDropdownOpen, tokenDropdownOpen]);
1556
- const handleCopy = useCallback2(async () => {
1967
+ const handleCopy = useCallback4(async () => {
1557
1968
  onCopyAddress?.();
1558
1969
  try {
1559
1970
  await navigator.clipboard.writeText(displayAddress);
@@ -1572,27 +1983,51 @@ function DepositAddressStep({
1572
1983
  setTimeout(() => setCopied(false), 2e3);
1573
1984
  }
1574
1985
  }, [displayAddress, onCopyAddress]);
1575
- useEffect6(() => {
1986
+ useEffect7(() => {
1576
1987
  setCopied(false);
1577
1988
  setChainDropdownOpen(false);
1578
1989
  setTokenDropdownOpen(false);
1579
1990
  }, [sourceChainId]);
1580
- useEffect6(() => {
1581
- depositHandledRef.current = false;
1991
+ const onDepositSubmittedRef = useRef6(onDepositSubmitted);
1992
+ onDepositSubmittedRef.current = onDepositSubmitted;
1993
+ const onDepositCompleteRef = useRef6(onDepositComplete);
1994
+ onDepositCompleteRef.current = onDepositComplete;
1995
+ const onDepositFailedRef = useRef6(onDepositFailed);
1996
+ onDepositFailedRef.current = onDepositFailed;
1997
+ const onErrorRef = useRef6(onError);
1998
+ onErrorRef.current = onError;
1999
+ const targetChainRef = useRef6(targetChain);
2000
+ targetChainRef.current = targetChain;
2001
+ const targetTokenRef = useRef6(targetToken);
2002
+ targetTokenRef.current = targetToken;
2003
+ useEffect7(() => {
2004
+ baselineTxHashRef.current = void 0;
2005
+ isTrackingRef.current = false;
1582
2006
  setPollingError(null);
1583
2007
  let timeoutId;
1584
2008
  let cancelled = false;
1585
- let baselineTxHash = void 0;
1586
2009
  async function poll() {
1587
- if (cancelled || depositHandledRef.current) return;
2010
+ if (cancelled) return;
2011
+ if (isTrackingRef.current) {
2012
+ if (!cancelled) {
2013
+ timeoutId = setTimeout(poll, POLL_INTERVAL_MS);
2014
+ }
2015
+ return;
2016
+ }
1588
2017
  try {
1589
2018
  const status = await service.fetchLatestStatus(smartAccount);
1590
- if (cancelled || depositHandledRef.current) return;
2019
+ if (cancelled) return;
2020
+ if (isTrackingRef.current) {
2021
+ if (!cancelled) {
2022
+ timeoutId = setTimeout(poll, POLL_INTERVAL_MS);
2023
+ }
2024
+ return;
2025
+ }
1591
2026
  const event = status.lastEvent;
1592
2027
  const eventTxHash = isDepositEvent(event) ? getEventTxHash(event) ?? null : null;
1593
- if (baselineTxHash === void 0) {
1594
- baselineTxHash = eventTxHash;
1595
- } else if (eventTxHash && (!baselineTxHash || !txRefsMatch(eventTxHash, baselineTxHash))) {
2028
+ if (baselineTxHashRef.current === void 0) {
2029
+ baselineTxHashRef.current = eventTxHash;
2030
+ } else if (eventTxHash && (!baselineTxHashRef.current || !txRefsMatch(eventTxHash, baselineTxHashRef.current))) {
1596
2031
  const details = getDepositEventDetails(event);
1597
2032
  const fallback = sourceSelectionRef.current;
1598
2033
  const chainId = details.chainId ?? fallback.chainId;
@@ -1601,16 +2036,33 @@ function DepositAddressStep({
1601
2036
  const sourceSymbol = details.sourceSymbol ?? fallback.sourceSymbol;
1602
2037
  const sourceDecimals = details.sourceDecimals ?? fallback.sourceDecimals;
1603
2038
  if (token) {
1604
- depositHandledRef.current = true;
1605
- onDepositDetected(
1606
- eventTxHash,
2039
+ baselineTxHashRef.current = eventTxHash;
2040
+ isTrackingRef.current = true;
2041
+ const isEvmToken = /^0x[a-fA-F0-9]{40}$/.test(token);
2042
+ const directTransfer = typeof chainId === "number" && isEvmToken && isSameRoute(
1607
2043
  chainId,
2044
+ token,
2045
+ targetChainRef.current,
2046
+ targetTokenRef.current
2047
+ );
2048
+ const id = String(++notificationIdRef.current);
2049
+ const notification = {
2050
+ id,
2051
+ txHash: eventTxHash,
2052
+ sourceChain: chainId,
1608
2053
  amount,
1609
2054
  token,
1610
2055
  sourceSymbol,
1611
- sourceDecimals
1612
- );
1613
- return;
2056
+ sourceDecimals,
2057
+ detectedAt: Date.now(),
2058
+ directTransfer
2059
+ };
2060
+ setNotifications((prev) => [notification, ...prev]);
2061
+ onDepositSubmittedRef.current?.({
2062
+ txHash: eventTxHash,
2063
+ sourceChain: chainId,
2064
+ amount
2065
+ });
1614
2066
  }
1615
2067
  }
1616
2068
  setPollingError(null);
@@ -1618,10 +2070,10 @@ function DepositAddressStep({
1618
2070
  if (!cancelled) {
1619
2071
  const msg = err instanceof Error ? err.message : "Failed to check status";
1620
2072
  setPollingError(msg);
1621
- onError?.(msg, "STATUS_POLL_ERROR");
2073
+ onErrorRef.current?.(msg, "STATUS_POLL_ERROR");
1622
2074
  }
1623
2075
  }
1624
- if (!cancelled && !depositHandledRef.current) {
2076
+ if (!cancelled) {
1625
2077
  timeoutId = setTimeout(poll, POLL_INTERVAL_MS);
1626
2078
  }
1627
2079
  }
@@ -1630,14 +2082,31 @@ function DepositAddressStep({
1630
2082
  cancelled = true;
1631
2083
  clearTimeout(timeoutId);
1632
2084
  };
1633
- }, [smartAccount, service, onDepositDetected, onError]);
2085
+ }, [smartAccount, service]);
2086
+ const handleNotificationComplete = useCallback4(
2087
+ (txHash, destinationTxHash, context) => {
2088
+ isTrackingRef.current = false;
2089
+ onDepositCompleteRef.current?.(txHash, destinationTxHash, context);
2090
+ },
2091
+ []
2092
+ );
2093
+ const handleNotificationFailed = useCallback4(
2094
+ (txHash, error) => {
2095
+ isTrackingRef.current = false;
2096
+ onDepositFailedRef.current?.(txHash, error);
2097
+ },
2098
+ []
2099
+ );
2100
+ const handleNotificationDismiss = useCallback4((id) => {
2101
+ setNotifications((prev) => prev.filter((n) => n.id !== id));
2102
+ }, []);
1634
2103
  const qrIconSrc = getChainIcon(sourceChainId);
1635
- return /* @__PURE__ */ jsxs6("div", { className: "rs-step", children: [
1636
- /* @__PURE__ */ jsx6("div", { className: "rs-step-body", children: /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-address", children: [
1637
- /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-address-selectors", children: [
1638
- /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
1639
- /* @__PURE__ */ jsx6("div", { className: "rs-deposit-address-dropdown-label", children: "Chain" }),
1640
- /* @__PURE__ */ jsxs6(
2104
+ return /* @__PURE__ */ jsxs7("div", { className: "rs-step rs-step--with-notifications", children: [
2105
+ /* @__PURE__ */ jsx8("div", { className: "rs-step-body", children: /* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address", children: [
2106
+ /* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-selectors", children: [
2107
+ /* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
2108
+ /* @__PURE__ */ jsx8("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
2109
+ /* @__PURE__ */ jsxs7(
1641
2110
  "button",
1642
2111
  {
1643
2112
  type: "button",
@@ -1647,7 +2116,7 @@ function DepositAddressStep({
1647
2116
  setTokenDropdownOpen(false);
1648
2117
  },
1649
2118
  children: [
1650
- getChainIcon(sourceChainId) && /* @__PURE__ */ jsx6(
2119
+ getChainIcon(sourceChainId) && /* @__PURE__ */ jsx8(
1651
2120
  "img",
1652
2121
  {
1653
2122
  src: getChainIcon(sourceChainId),
@@ -1655,8 +2124,8 @@ function DepositAddressStep({
1655
2124
  className: "rs-deposit-address-dropdown-icon"
1656
2125
  }
1657
2126
  ),
1658
- /* @__PURE__ */ jsx6("span", { children: getChainName(sourceChainId) }),
1659
- /* @__PURE__ */ jsx6(
2127
+ /* @__PURE__ */ jsx8("span", { children: getChainName(sourceChainId) }),
2128
+ /* @__PURE__ */ jsx8(
1660
2129
  "svg",
1661
2130
  {
1662
2131
  className: "rs-deposit-address-dropdown-chevron",
@@ -1664,7 +2133,7 @@ function DepositAddressStep({
1664
2133
  fill: "none",
1665
2134
  stroke: "currentColor",
1666
2135
  strokeWidth: "2",
1667
- children: /* @__PURE__ */ jsx6(
2136
+ children: /* @__PURE__ */ jsx8(
1668
2137
  "path",
1669
2138
  {
1670
2139
  strokeLinecap: "round",
@@ -1677,7 +2146,7 @@ function DepositAddressStep({
1677
2146
  ]
1678
2147
  }
1679
2148
  ),
1680
- chainDropdownOpen && /* @__PURE__ */ jsx6("div", { className: "rs-deposit-address-dropdown-menu", children: chainOptions.map((chainId) => /* @__PURE__ */ jsxs6(
2149
+ chainDropdownOpen && /* @__PURE__ */ jsx8("div", { className: "rs-deposit-address-dropdown-menu", children: chainOptions.map((chainId) => /* @__PURE__ */ jsxs7(
1681
2150
  "button",
1682
2151
  {
1683
2152
  type: "button",
@@ -1687,7 +2156,7 @@ function DepositAddressStep({
1687
2156
  setChainDropdownOpen(false);
1688
2157
  },
1689
2158
  children: [
1690
- getChainIcon(chainId) && /* @__PURE__ */ jsx6(
2159
+ getChainIcon(chainId) && /* @__PURE__ */ jsx8(
1691
2160
  "img",
1692
2161
  {
1693
2162
  src: getChainIcon(chainId),
@@ -1695,15 +2164,36 @@ function DepositAddressStep({
1695
2164
  className: "rs-deposit-address-dropdown-icon"
1696
2165
  }
1697
2166
  ),
1698
- /* @__PURE__ */ jsx6("span", { children: getChainName(chainId) })
2167
+ /* @__PURE__ */ jsx8("span", { children: getChainName(chainId) })
1699
2168
  ]
1700
2169
  },
1701
2170
  String(chainId)
1702
2171
  )) })
1703
2172
  ] }),
1704
- /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-address-dropdown", ref: tokenDropdownRef, children: [
1705
- /* @__PURE__ */ jsx6("div", { className: "rs-deposit-address-dropdown-label", children: "Token" }),
1706
- /* @__PURE__ */ jsxs6(
2173
+ /* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown", ref: tokenDropdownRef, children: [
2174
+ /* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
2175
+ /* @__PURE__ */ jsx8("span", { children: "Supported token" }),
2176
+ /* @__PURE__ */ jsxs7("span", { className: "rs-deposit-address-min", children: [
2177
+ "Min $",
2178
+ uiConfig?.minDepositUsd ?? 0.1,
2179
+ /* @__PURE__ */ jsx8(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsxs7(
2180
+ "svg",
2181
+ {
2182
+ className: "rs-deposit-address-min-icon",
2183
+ viewBox: "0 0 24 24",
2184
+ fill: "none",
2185
+ stroke: "currentColor",
2186
+ strokeWidth: "2",
2187
+ "aria-hidden": "true",
2188
+ children: [
2189
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "9" }),
2190
+ /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 8h.01M11 12h1v4h1" })
2191
+ ]
2192
+ }
2193
+ ) })
2194
+ ] })
2195
+ ] }),
2196
+ /* @__PURE__ */ jsxs7(
1707
2197
  "button",
1708
2198
  {
1709
2199
  type: "button",
@@ -1713,7 +2203,7 @@ function DepositAddressStep({
1713
2203
  setChainDropdownOpen(false);
1714
2204
  },
1715
2205
  children: [
1716
- getTokenIcon(sourceTokenSymbol) && /* @__PURE__ */ jsx6(
2206
+ getTokenIcon(sourceTokenSymbol) && /* @__PURE__ */ jsx8(
1717
2207
  "img",
1718
2208
  {
1719
2209
  src: getTokenIcon(sourceTokenSymbol),
@@ -1721,8 +2211,8 @@ function DepositAddressStep({
1721
2211
  className: "rs-deposit-address-dropdown-icon"
1722
2212
  }
1723
2213
  ),
1724
- /* @__PURE__ */ jsx6("span", { children: sourceTokenSymbol }),
1725
- /* @__PURE__ */ jsx6(
2214
+ /* @__PURE__ */ jsx8("span", { children: sourceTokenSymbol }),
2215
+ /* @__PURE__ */ jsx8(
1726
2216
  "svg",
1727
2217
  {
1728
2218
  className: "rs-deposit-address-dropdown-chevron",
@@ -1730,7 +2220,7 @@ function DepositAddressStep({
1730
2220
  fill: "none",
1731
2221
  stroke: "currentColor",
1732
2222
  strokeWidth: "2",
1733
- children: /* @__PURE__ */ jsx6(
2223
+ children: /* @__PURE__ */ jsx8(
1734
2224
  "path",
1735
2225
  {
1736
2226
  strokeLinecap: "round",
@@ -1743,7 +2233,7 @@ function DepositAddressStep({
1743
2233
  ]
1744
2234
  }
1745
2235
  ),
1746
- tokenDropdownOpen && /* @__PURE__ */ jsx6("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */ jsxs6(
2236
+ tokenDropdownOpen && /* @__PURE__ */ jsx8("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */ jsxs7(
1747
2237
  "button",
1748
2238
  {
1749
2239
  type: "button",
@@ -1753,7 +2243,7 @@ function DepositAddressStep({
1753
2243
  setTokenDropdownOpen(false);
1754
2244
  },
1755
2245
  children: [
1756
- getTokenIcon(symbol) && /* @__PURE__ */ jsx6(
2246
+ getTokenIcon(symbol) && /* @__PURE__ */ jsx8(
1757
2247
  "img",
1758
2248
  {
1759
2249
  src: getTokenIcon(symbol),
@@ -1761,29 +2251,29 @@ function DepositAddressStep({
1761
2251
  className: "rs-deposit-address-dropdown-icon"
1762
2252
  }
1763
2253
  ),
1764
- /* @__PURE__ */ jsx6("span", { children: symbol })
2254
+ /* @__PURE__ */ jsx8("span", { children: symbol })
1765
2255
  ]
1766
2256
  },
1767
2257
  symbol
1768
2258
  )) })
1769
2259
  ] })
1770
2260
  ] }),
1771
- /* @__PURE__ */ jsx6("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx6(QRCode, { value: displayAddress, size: 200, iconSrc: qrIconSrc }) }),
1772
- /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-address-info", children: [
1773
- /* @__PURE__ */ jsxs6("div", { className: "rs-deposit-address-label", children: [
2261
+ /* @__PURE__ */ jsx8("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx8(QRCode, { value: displayAddress, size: 150, iconSrc: qrIconSrc }) }),
2262
+ /* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-info", children: [
2263
+ /* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-label", children: [
1774
2264
  "Your ",
1775
2265
  isSolana ? "Solana" : "EVM",
1776
2266
  " deposit address"
1777
2267
  ] }),
1778
- /* @__PURE__ */ jsx6("div", { className: "rs-deposit-address-value", children: displayAddress }),
1779
- /* @__PURE__ */ jsxs6(
2268
+ /* @__PURE__ */ jsx8("div", { className: "rs-deposit-address-value", children: displayAddress }),
2269
+ /* @__PURE__ */ jsxs7(
1780
2270
  "button",
1781
2271
  {
1782
2272
  type: "button",
1783
2273
  className: "rs-deposit-address-copy",
1784
2274
  onClick: handleCopy,
1785
2275
  children: [
1786
- /* @__PURE__ */ jsx6(
2276
+ /* @__PURE__ */ jsx8(
1787
2277
  "svg",
1788
2278
  {
1789
2279
  viewBox: "0 0 24 24",
@@ -1791,14 +2281,14 @@ function DepositAddressStep({
1791
2281
  stroke: "currentColor",
1792
2282
  strokeWidth: "2",
1793
2283
  style: { width: 14, height: 14 },
1794
- children: copied ? /* @__PURE__ */ jsx6(
2284
+ children: copied ? /* @__PURE__ */ jsx8(
1795
2285
  "path",
1796
2286
  {
1797
2287
  strokeLinecap: "round",
1798
2288
  strokeLinejoin: "round",
1799
2289
  d: "M5 12l5 5L20 7"
1800
2290
  }
1801
- ) : /* @__PURE__ */ jsx6(
2291
+ ) : /* @__PURE__ */ jsx8(
1802
2292
  "path",
1803
2293
  {
1804
2294
  strokeLinecap: "round",
@@ -1813,17 +2303,130 @@ function DepositAddressStep({
1813
2303
  }
1814
2304
  )
1815
2305
  ] }),
1816
- pollingError && /* @__PURE__ */ jsx6("div", { className: "rs-deposit-address-error", children: pollingError })
2306
+ /* @__PURE__ */ jsxs7(
2307
+ "div",
2308
+ {
2309
+ className: `rs-price-impact ${priceImpactExpanded ? "rs-price-impact--open" : ""}`,
2310
+ children: [
2311
+ /* @__PURE__ */ jsxs7(
2312
+ "button",
2313
+ {
2314
+ type: "button",
2315
+ className: "rs-price-impact-header",
2316
+ onClick: () => setPriceImpactExpanded((v) => !v),
2317
+ "aria-expanded": priceImpactExpanded,
2318
+ children: [
2319
+ /* @__PURE__ */ jsx8("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxs7("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [
2320
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "9" }),
2321
+ /* @__PURE__ */ jsx8(
2322
+ "path",
2323
+ {
2324
+ strokeLinecap: "round",
2325
+ strokeLinejoin: "round",
2326
+ d: "M15 9.5a2.5 2.5 0 00-2.5-2h-1A2 2 0 0011 11.5h2a2 2 0 010 4h-1a2.5 2.5 0 01-2.5-2M12 7v1m0 8v1"
2327
+ }
2328
+ )
2329
+ ] }) }),
2330
+ /* @__PURE__ */ jsxs7("span", { className: "rs-price-impact-label", children: [
2331
+ "Price impact: ",
2332
+ /* @__PURE__ */ jsx8("strong", { children: "0.00%" })
2333
+ ] }),
2334
+ /* @__PURE__ */ jsx8(
2335
+ Tooltip,
2336
+ {
2337
+ className: "rs-price-impact-info",
2338
+ content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
2339
+ children: /* @__PURE__ */ jsxs7("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: [
2340
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "9" }),
2341
+ /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 8h.01M11 12h1v4h1" })
2342
+ ] })
2343
+ }
2344
+ ),
2345
+ /* @__PURE__ */ jsx8(
2346
+ "svg",
2347
+ {
2348
+ className: "rs-price-impact-chevron",
2349
+ viewBox: "0 0 24 24",
2350
+ fill: "none",
2351
+ stroke: "currentColor",
2352
+ strokeWidth: "2",
2353
+ "aria-hidden": "true",
2354
+ children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" })
2355
+ }
2356
+ )
2357
+ ]
2358
+ }
2359
+ ),
2360
+ /* @__PURE__ */ jsx8("div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ jsxs7("div", { className: "rs-price-impact-panel-inner", children: [
2361
+ /* @__PURE__ */ jsxs7("div", { className: "rs-price-impact-row", children: [
2362
+ /* @__PURE__ */ jsx8("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxs7("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [
2363
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "9" }),
2364
+ /* @__PURE__ */ jsx8(
2365
+ "path",
2366
+ {
2367
+ strokeLinecap: "round",
2368
+ strokeLinejoin: "round",
2369
+ d: "M8.5 15.5l7-7M9.5 9.5h.01M14.5 14.5h.01"
2370
+ }
2371
+ )
2372
+ ] }) }),
2373
+ /* @__PURE__ */ jsxs7("span", { className: "rs-price-impact-label", children: [
2374
+ "Max slippage: ",
2375
+ /* @__PURE__ */ jsx8("strong", { children: "Auto \u2022 0.1%" })
2376
+ ] }),
2377
+ /* @__PURE__ */ jsx8(
2378
+ Tooltip,
2379
+ {
2380
+ className: "rs-price-impact-info",
2381
+ content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
2382
+ children: /* @__PURE__ */ jsxs7("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: [
2383
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "9" }),
2384
+ /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 8h.01M11 12h1v4h1" })
2385
+ ] })
2386
+ }
2387
+ )
2388
+ ] }),
2389
+ /* @__PURE__ */ jsxs7("div", { className: "rs-price-impact-row", children: [
2390
+ /* @__PURE__ */ jsx8("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsxs7("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [
2391
+ /* @__PURE__ */ jsx8("circle", { cx: "12", cy: "12", r: "9" }),
2392
+ /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 7.5V12l2.5 2" })
2393
+ ] }) }),
2394
+ /* @__PURE__ */ jsxs7("span", { className: "rs-price-impact-label", children: [
2395
+ "Processing time: ",
2396
+ /* @__PURE__ */ jsx8("strong", { children: "< 1 min" })
2397
+ ] })
2398
+ ] })
2399
+ ] }) })
2400
+ ]
2401
+ }
2402
+ ),
2403
+ pollingError && /* @__PURE__ */ jsx8("div", { className: "rs-deposit-address-error", children: pollingError })
1817
2404
  ] }) }),
1818
- /* @__PURE__ */ jsx6(PoweredBy, {})
2405
+ notifications.length > 0 && /* @__PURE__ */ jsx8("div", { className: "rs-deposit-notifications", children: notifications.map((deposit) => /* @__PURE__ */ jsx8(
2406
+ DepositNotification,
2407
+ {
2408
+ deposit,
2409
+ smartAccount,
2410
+ targetChain,
2411
+ targetToken,
2412
+ waitForFinalTx,
2413
+ hasPostBridgeActions,
2414
+ service,
2415
+ onComplete: handleNotificationComplete,
2416
+ onFailed: handleNotificationFailed,
2417
+ onDismiss: handleNotificationDismiss
2418
+ },
2419
+ deposit.id
2420
+ )) }),
2421
+ /* @__PURE__ */ jsx8(PoweredBy, {})
1819
2422
  ] });
1820
2423
  }
1821
2424
  DepositAddressStep.displayName = "DepositAddressStep";
1822
2425
 
1823
2426
  // src/components/steps/SolanaTokenSelectStep.tsx
1824
- import { useState as useState7, useEffect as useEffect7, useMemo as useMemo5 } from "react";
2427
+ import { useState as useState8, useEffect as useEffect8, useMemo as useMemo4 } from "react";
1825
2428
  import { formatUnits as formatUnits3 } from "viem";
1826
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
2429
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1827
2430
  function SolanaTokenSelectStep({
1828
2431
  solanaAddress,
1829
2432
  service,
@@ -1831,11 +2434,11 @@ function SolanaTokenSelectStep({
1831
2434
  onTotalBalanceComputed,
1832
2435
  debug
1833
2436
  }) {
1834
- const [tokenBalances, setTokenBalances] = useState7([]);
1835
- const [selectedSymbol, setSelectedSymbol] = useState7(null);
1836
- const [loading, setLoading] = useState7(true);
1837
- const [error, setError] = useState7(null);
1838
- useEffect7(() => {
2437
+ const [tokenBalances, setTokenBalances] = useState8([]);
2438
+ const [selectedSymbol, setSelectedSymbol] = useState8(null);
2439
+ const [loading, setLoading] = useState8(true);
2440
+ const [error, setError] = useState8(null);
2441
+ useEffect8(() => {
1839
2442
  let active = true;
1840
2443
  async function loadBalances() {
1841
2444
  if (!solanaAddress) {
@@ -1906,7 +2509,7 @@ function SolanaTokenSelectStep({
1906
2509
  active = false;
1907
2510
  };
1908
2511
  }, [debug, solanaAddress, service, onTotalBalanceComputed]);
1909
- const rows = useMemo5(
2512
+ const rows = useMemo4(
1910
2513
  () => [...tokenBalances].sort((a, b) => {
1911
2514
  if (a.balanceUsd !== b.balanceUsd) return b.balanceUsd - a.balanceUsd;
1912
2515
  if (b.balance > a.balance) return 1;
@@ -1917,22 +2520,22 @@ function SolanaTokenSelectStep({
1917
2520
  );
1918
2521
  const selectedEntry = selectedSymbol ? rows.find((r) => r.token.symbol === selectedSymbol) : null;
1919
2522
  if (error) {
1920
- return /* @__PURE__ */ jsx7("div", { className: "rs-step", children: /* @__PURE__ */ jsx7("div", { className: "rs-step-body", children: /* @__PURE__ */ jsx7("div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ jsx7("span", { className: "rs-alert-text", children: error }) }) }) });
2523
+ return /* @__PURE__ */ jsx9("div", { className: "rs-step", children: /* @__PURE__ */ jsx9("div", { className: "rs-step-body", children: /* @__PURE__ */ jsx9("div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ jsx9("span", { className: "rs-alert-text", children: error }) }) }) });
1921
2524
  }
1922
- return /* @__PURE__ */ jsxs7("div", { className: "rs-step", children: [
1923
- /* @__PURE__ */ jsx7("div", { style: { padding: "12px 12px 4px" }, children: /* @__PURE__ */ jsx7("div", { className: "rs-step-title", children: "Select source asset" }) }),
1924
- /* @__PURE__ */ jsxs7(
2525
+ return /* @__PURE__ */ jsxs8("div", { className: "rs-step", children: [
2526
+ /* @__PURE__ */ jsx9("div", { style: { padding: "12px 12px 4px" }, children: /* @__PURE__ */ jsx9("div", { className: "rs-step-title", children: "Select source asset" }) }),
2527
+ /* @__PURE__ */ jsxs8(
1925
2528
  "div",
1926
2529
  {
1927
2530
  className: "rs-step-body",
1928
2531
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
1929
2532
  children: [
1930
- loading && /* @__PURE__ */ jsxs7("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
1931
- /* @__PURE__ */ jsx7(Spinner, { className: "rs-text-tertiary" }),
1932
- /* @__PURE__ */ jsx7("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
2533
+ loading && /* @__PURE__ */ jsxs8("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
2534
+ /* @__PURE__ */ jsx9(Spinner, { className: "rs-text-tertiary" }),
2535
+ /* @__PURE__ */ jsx9("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
1933
2536
  ] }),
1934
- !loading && rows.length === 0 && /* @__PURE__ */ jsxs7("div", { className: "rs-empty-state", children: [
1935
- /* @__PURE__ */ jsx7(
2537
+ !loading && rows.length === 0 && /* @__PURE__ */ jsxs8("div", { className: "rs-empty-state", children: [
2538
+ /* @__PURE__ */ jsx9(
1936
2539
  "svg",
1937
2540
  {
1938
2541
  className: "rs-empty-icon",
@@ -1940,7 +2543,7 @@ function SolanaTokenSelectStep({
1940
2543
  fill: "none",
1941
2544
  stroke: "currentColor",
1942
2545
  strokeWidth: "1.5",
1943
- children: /* @__PURE__ */ jsx7(
2546
+ children: /* @__PURE__ */ jsx9(
1944
2547
  "path",
1945
2548
  {
1946
2549
  strokeLinecap: "round",
@@ -1950,14 +2553,14 @@ function SolanaTokenSelectStep({
1950
2553
  )
1951
2554
  }
1952
2555
  ),
1953
- /* @__PURE__ */ jsx7("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
1954
- /* @__PURE__ */ jsxs7("div", { className: "rs-empty-address", children: [
2556
+ /* @__PURE__ */ jsx9("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
2557
+ /* @__PURE__ */ jsxs8("div", { className: "rs-empty-address", children: [
1955
2558
  solanaAddress.slice(0, 6),
1956
2559
  "...",
1957
2560
  solanaAddress.slice(-4)
1958
2561
  ] })
1959
2562
  ] }),
1960
- !loading && rows.length > 0 && /* @__PURE__ */ jsx7("div", { className: "rs-asset-list", children: rows.map((entry) => {
2563
+ !loading && rows.length > 0 && /* @__PURE__ */ jsx9("div", { className: "rs-asset-list", children: rows.map((entry) => {
1961
2564
  const isSelected = selectedSymbol === entry.token.symbol;
1962
2565
  const tokenIcon = getTokenIcon(entry.token.symbol);
1963
2566
  const chainIcon = getChainIcon("solana");
@@ -1969,7 +2572,7 @@ function SolanaTokenSelectStep({
1969
2572
  } catch {
1970
2573
  formattedBalance = "...";
1971
2574
  }
1972
- return /* @__PURE__ */ jsxs7(
2575
+ return /* @__PURE__ */ jsxs8(
1973
2576
  "button",
1974
2577
  {
1975
2578
  type: "button",
@@ -1977,9 +2580,9 @@ function SolanaTokenSelectStep({
1977
2580
  className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
1978
2581
  style: { textAlign: "left" },
1979
2582
  children: [
1980
- /* @__PURE__ */ jsxs7("div", { className: "rs-asset-info", children: [
1981
- /* @__PURE__ */ jsxs7("div", { className: "rs-asset-icon-wrapper", children: [
1982
- tokenIcon ? /* @__PURE__ */ jsx7(
2583
+ /* @__PURE__ */ jsxs8("div", { className: "rs-asset-info", children: [
2584
+ /* @__PURE__ */ jsxs8("div", { className: "rs-asset-icon-wrapper", children: [
2585
+ tokenIcon ? /* @__PURE__ */ jsx9(
1983
2586
  "img",
1984
2587
  {
1985
2588
  src: tokenIcon,
@@ -1987,8 +2590,8 @@ function SolanaTokenSelectStep({
1987
2590
  className: "rs-asset-icon",
1988
2591
  style: { background: "transparent" }
1989
2592
  }
1990
- ) : /* @__PURE__ */ jsx7("div", { className: "rs-asset-icon", children: entry.token.symbol.slice(0, 4) }),
1991
- chainIcon && /* @__PURE__ */ jsx7(
2593
+ ) : /* @__PURE__ */ jsx9("div", { className: "rs-asset-icon", children: entry.token.symbol.slice(0, 4) }),
2594
+ chainIcon && /* @__PURE__ */ jsx9(
1992
2595
  "img",
1993
2596
  {
1994
2597
  src: chainIcon,
@@ -1997,19 +2600,19 @@ function SolanaTokenSelectStep({
1997
2600
  }
1998
2601
  )
1999
2602
  ] }),
2000
- /* @__PURE__ */ jsxs7("div", { children: [
2001
- /* @__PURE__ */ jsxs7("div", { className: "rs-asset-name", children: [
2603
+ /* @__PURE__ */ jsxs8("div", { children: [
2604
+ /* @__PURE__ */ jsxs8("div", { className: "rs-asset-name", children: [
2002
2605
  entry.token.symbol,
2003
- /* @__PURE__ */ jsx7("span", { className: "rs-asset-chain", children: " on Solana" })
2606
+ /* @__PURE__ */ jsx9("span", { className: "rs-asset-chain", children: " on Solana" })
2004
2607
  ] }),
2005
- /* @__PURE__ */ jsxs7("div", { className: "rs-asset-balance-small", children: [
2608
+ /* @__PURE__ */ jsxs8("div", { className: "rs-asset-balance-small", children: [
2006
2609
  formattedBalance,
2007
2610
  " ",
2008
2611
  entry.token.symbol
2009
2612
  ] })
2010
2613
  ] })
2011
2614
  ] }),
2012
- /* @__PURE__ */ jsx7("div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
2615
+ /* @__PURE__ */ jsx9("div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
2013
2616
  ]
2014
2617
  },
2015
2618
  entry.token.symbol
@@ -2018,7 +2621,7 @@ function SolanaTokenSelectStep({
2018
2621
  ]
2019
2622
  }
2020
2623
  ),
2021
- /* @__PURE__ */ jsx7("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx7(
2624
+ /* @__PURE__ */ jsx9("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx9(
2022
2625
  Button,
2023
2626
  {
2024
2627
  onClick: () => selectedEntry && onContinue(
@@ -2031,14 +2634,14 @@ function SolanaTokenSelectStep({
2031
2634
  children: "Continue"
2032
2635
  }
2033
2636
  ) }),
2034
- /* @__PURE__ */ jsx7(PoweredBy, {})
2637
+ /* @__PURE__ */ jsx9(PoweredBy, {})
2035
2638
  ] });
2036
2639
  }
2037
2640
 
2038
2641
  // src/components/steps/SolanaAmountStep.tsx
2039
- import { useEffect as useEffect8, useMemo as useMemo6, useState as useState8 } from "react";
2642
+ import { useEffect as useEffect9, useMemo as useMemo5, useState as useState9 } from "react";
2040
2643
  import { formatUnits as formatUnits4, parseUnits as parseUnits3 } from "viem";
2041
- import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
2644
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2042
2645
  var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
2043
2646
  function SolanaAmountStep({
2044
2647
  token,
@@ -2049,10 +2652,10 @@ function SolanaAmountStep({
2049
2652
  onContinue,
2050
2653
  debug
2051
2654
  }) {
2052
- const [amount, setAmount] = useState8("");
2053
- const [error, setError] = useState8(null);
2655
+ const [amount, setAmount] = useState9("");
2656
+ const [error, setError] = useState9(null);
2054
2657
  const isSourceStablecoin = isStablecoinSymbol(token.symbol);
2055
- const tokenPriceUsd = useMemo6(() => {
2658
+ const tokenPriceUsd = useMemo5(() => {
2056
2659
  if (isSourceStablecoin) return 1;
2057
2660
  try {
2058
2661
  const balanceUnits = Number(formatUnits4(balance, token.decimals));
@@ -2066,7 +2669,7 @@ function SolanaAmountStep({
2066
2669
  }
2067
2670
  }, [isSourceStablecoin, balance, token.decimals, balanceUsd]);
2068
2671
  const hasPricing = tokenPriceUsd !== null;
2069
- useEffect8(() => {
2672
+ useEffect9(() => {
2070
2673
  if (defaultAmount && !amount) {
2071
2674
  const parsed = Number(defaultAmount);
2072
2675
  if (Number.isFinite(parsed) && parsed > 0) {
@@ -2074,7 +2677,7 @@ function SolanaAmountStep({
2074
2677
  }
2075
2678
  }
2076
2679
  }, [defaultAmount, amount]);
2077
- const formattedBalance = useMemo6(() => {
2680
+ const formattedBalance = useMemo5(() => {
2078
2681
  try {
2079
2682
  const raw = formatUnits4(balance, token.decimals);
2080
2683
  const numeric = Number(raw);
@@ -2084,7 +2687,7 @@ function SolanaAmountStep({
2084
2687
  return "...";
2085
2688
  }
2086
2689
  }, [balance, token.decimals]);
2087
- const computedBalanceUsd = useMemo6(() => {
2690
+ const computedBalanceUsd = useMemo5(() => {
2088
2691
  try {
2089
2692
  const balanceUnits = Number(formatUnits4(balance, token.decimals));
2090
2693
  if (!Number.isFinite(balanceUnits) || balanceUnits < 0) return null;
@@ -2095,15 +2698,15 @@ function SolanaAmountStep({
2095
2698
  return null;
2096
2699
  }
2097
2700
  }, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
2098
- const formattedBalanceUsd = useMemo6(() => {
2701
+ const formattedBalanceUsd = useMemo5(() => {
2099
2702
  if (computedBalanceUsd === null || computedBalanceUsd <= 0) return null;
2100
2703
  return currencyFormatter.format(computedBalanceUsd);
2101
2704
  }, [computedBalanceUsd]);
2102
- const spendableBalance = useMemo6(() => {
2705
+ const spendableBalance = useMemo5(() => {
2103
2706
  if (!isNativeSol(token)) return balance;
2104
2707
  return balance > SOL_FEE_RESERVE_LAMPORTS ? balance - SOL_FEE_RESERVE_LAMPORTS : 0n;
2105
2708
  }, [balance, token]);
2106
- const spendableBalanceUsd = useMemo6(() => {
2709
+ const spendableBalanceUsd = useMemo5(() => {
2107
2710
  try {
2108
2711
  const spendableUnits = Number(formatUnits4(spendableBalance, token.decimals));
2109
2712
  if (!Number.isFinite(spendableUnits) || spendableUnits < 0) return null;
@@ -2194,11 +2797,11 @@ function SolanaAmountStep({
2194
2797
  setError(null);
2195
2798
  onContinue(token, sourceAmountStr, amount);
2196
2799
  };
2197
- return /* @__PURE__ */ jsxs8("div", { className: "rs-step", children: [
2198
- /* @__PURE__ */ jsx8("div", { style: { padding: "12px 12px 4px" }, children: /* @__PURE__ */ jsx8("div", { className: "rs-step-title", children: "Enter amount" }) }),
2199
- /* @__PURE__ */ jsxs8("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: [
2200
- /* @__PURE__ */ jsxs8("div", { className: "rs-amount-display", children: [
2201
- /* @__PURE__ */ jsx8("div", { className: "rs-amount-input-wrapper", children: /* @__PURE__ */ jsx8(
2800
+ return /* @__PURE__ */ jsxs9("div", { className: "rs-step", children: [
2801
+ /* @__PURE__ */ jsx10("div", { style: { padding: "12px 12px 4px" }, children: /* @__PURE__ */ jsx10("div", { className: "rs-step-title", children: "Enter amount" }) }),
2802
+ /* @__PURE__ */ jsxs9("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: [
2803
+ /* @__PURE__ */ jsxs9("div", { className: "rs-amount-display", children: [
2804
+ /* @__PURE__ */ jsx10("div", { className: "rs-amount-input-wrapper", children: /* @__PURE__ */ jsx10(
2202
2805
  "input",
2203
2806
  {
2204
2807
  type: "text",
@@ -2216,12 +2819,12 @@ function SolanaAmountStep({
2216
2819
  autoFocus: true
2217
2820
  }
2218
2821
  ) }),
2219
- !isSourceStablecoin && /* @__PURE__ */ jsx8("div", { className: "rs-amount-available", children: /* @__PURE__ */ jsxs8("span", { className: "rs-amount-available-value", children: [
2822
+ !isSourceStablecoin && /* @__PURE__ */ jsx10("div", { className: "rs-amount-available", children: /* @__PURE__ */ jsxs9("span", { className: "rs-amount-available-value", children: [
2220
2823
  formattedBalance,
2221
2824
  " ",
2222
2825
  token.symbol,
2223
2826
  " available",
2224
- formattedBalanceUsd && /* @__PURE__ */ jsxs8("span", { style: { color: "var(--rs-muted-foreground)" }, children: [
2827
+ formattedBalanceUsd && /* @__PURE__ */ jsxs9("span", { style: { color: "var(--rs-muted-foreground)" }, children: [
2225
2828
  " ",
2226
2829
  "(",
2227
2830
  formattedBalanceUsd,
@@ -2229,8 +2832,8 @@ function SolanaAmountStep({
2229
2832
  ] })
2230
2833
  ] }) })
2231
2834
  ] }),
2232
- /* @__PURE__ */ jsxs8("div", { className: "rs-amount-presets", children: [
2233
- [25, 50, 75].map((pct) => /* @__PURE__ */ jsxs8(
2835
+ /* @__PURE__ */ jsxs9("div", { className: "rs-amount-presets", children: [
2836
+ [25, 50, 75].map((pct) => /* @__PURE__ */ jsxs9(
2234
2837
  "button",
2235
2838
  {
2236
2839
  type: "button",
@@ -2243,7 +2846,7 @@ function SolanaAmountStep({
2243
2846
  },
2244
2847
  pct
2245
2848
  )),
2246
- /* @__PURE__ */ jsx8(
2849
+ /* @__PURE__ */ jsx10(
2247
2850
  "button",
2248
2851
  {
2249
2852
  type: "button",
@@ -2253,12 +2856,12 @@ function SolanaAmountStep({
2253
2856
  }
2254
2857
  )
2255
2858
  ] }),
2256
- uiConfig?.minDepositUsd && /* @__PURE__ */ jsxs8("div", { className: "rs-amount-minimum", children: [
2859
+ uiConfig?.minDepositUsd && /* @__PURE__ */ jsxs9("div", { className: "rs-amount-minimum", children: [
2257
2860
  currencyFormatter.format(uiConfig.minDepositUsd),
2258
2861
  " minimum deposit"
2259
2862
  ] }),
2260
- error && /* @__PURE__ */ jsxs8("div", { className: "rs-amount-error", children: [
2261
- /* @__PURE__ */ jsx8(
2863
+ error && /* @__PURE__ */ jsxs9("div", { className: "rs-amount-error", children: [
2864
+ /* @__PURE__ */ jsx10(
2262
2865
  "svg",
2263
2866
  {
2264
2867
  viewBox: "0 0 24 24",
@@ -2266,7 +2869,7 @@ function SolanaAmountStep({
2266
2869
  stroke: "currentColor",
2267
2870
  strokeWidth: "2",
2268
2871
  style: { width: 16, height: 16, flexShrink: 0 },
2269
- children: /* @__PURE__ */ jsx8(
2872
+ children: /* @__PURE__ */ jsx10(
2270
2873
  "path",
2271
2874
  {
2272
2875
  strokeLinecap: "round",
@@ -2276,10 +2879,10 @@ function SolanaAmountStep({
2276
2879
  )
2277
2880
  }
2278
2881
  ),
2279
- /* @__PURE__ */ jsx8("span", { children: error })
2882
+ /* @__PURE__ */ jsx10("span", { children: error })
2280
2883
  ] })
2281
2884
  ] }),
2282
- /* @__PURE__ */ jsx8("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx8(
2885
+ /* @__PURE__ */ jsx10("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx10(
2283
2886
  Button,
2284
2887
  {
2285
2888
  onClick: handleContinue,
@@ -2288,14 +2891,14 @@ function SolanaAmountStep({
2288
2891
  children: uiConfig?.minDepositUsd && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
2289
2892
  }
2290
2893
  ) }),
2291
- /* @__PURE__ */ jsx8(PoweredBy, {})
2894
+ /* @__PURE__ */ jsx10(PoweredBy, {})
2292
2895
  ] });
2293
2896
  }
2294
2897
 
2295
2898
  // src/components/steps/SolanaConfirmStep.tsx
2296
- import { useState as useState9 } from "react";
2899
+ import { useState as useState10 } from "react";
2297
2900
  import { parseUnits as parseUnits4 } from "viem";
2298
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
2901
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
2299
2902
  function SolanaConfirmStep({
2300
2903
  smartAccount,
2301
2904
  solanaAddress,
@@ -2313,8 +2916,8 @@ function SolanaConfirmStep({
2313
2916
  onError,
2314
2917
  debug
2315
2918
  }) {
2316
- const [isSubmitting, setIsSubmitting] = useState9(false);
2317
- const [error, setError] = useState9(null);
2919
+ const [isSubmitting, setIsSubmitting] = useState10(false);
2920
+ const [error, setError] = useState10(null);
2318
2921
  const targetSymbol = getTokenSymbol(targetToken, targetChain);
2319
2922
  const isSameToken = token.symbol.toUpperCase() === targetSymbol.toUpperCase();
2320
2923
  const formattedAmount = sourceAmount && !Number.isNaN(Number(sourceAmount)) ? Number(sourceAmount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
@@ -2419,19 +3022,19 @@ function SolanaConfirmStep({
2419
3022
  setIsSubmitting(false);
2420
3023
  }
2421
3024
  };
2422
- return /* @__PURE__ */ jsxs9("div", { className: "rs-step", children: [
2423
- /* @__PURE__ */ jsx9("div", { style: { padding: "12px 12px 10px" }, children: /* @__PURE__ */ jsx9("div", { className: "rs-step-title", children: "Review order" }) }),
2424
- /* @__PURE__ */ jsxs9("div", { className: "rs-step-body rs-space-y-3", style: { paddingTop: 0 }, children: [
2425
- /* @__PURE__ */ jsxs9("div", { className: "rs-card", children: [
2426
- /* @__PURE__ */ jsxs9("div", { className: "rs-card-row", children: [
2427
- /* @__PURE__ */ jsx9("span", { className: "rs-card-label", children: "Source" }),
2428
- /* @__PURE__ */ jsxs9(
3025
+ return /* @__PURE__ */ jsxs10("div", { className: "rs-step", children: [
3026
+ /* @__PURE__ */ jsx11("div", { style: { padding: "12px 12px 10px" }, children: /* @__PURE__ */ jsx11("div", { className: "rs-step-title", children: "Review order" }) }),
3027
+ /* @__PURE__ */ jsxs10("div", { className: "rs-step-body rs-space-y-3", style: { paddingTop: 0 }, children: [
3028
+ /* @__PURE__ */ jsxs10("div", { className: "rs-card", children: [
3029
+ /* @__PURE__ */ jsxs10("div", { className: "rs-card-row", children: [
3030
+ /* @__PURE__ */ jsx11("span", { className: "rs-card-label", children: "Source" }),
3031
+ /* @__PURE__ */ jsxs10(
2429
3032
  "span",
2430
3033
  {
2431
3034
  className: "rs-card-value",
2432
3035
  style: { display: "flex", alignItems: "center", gap: 8 },
2433
3036
  children: [
2434
- getChainIcon("solana") && /* @__PURE__ */ jsx9(
3037
+ getChainIcon("solana") && /* @__PURE__ */ jsx11(
2435
3038
  "img",
2436
3039
  {
2437
3040
  src: getChainIcon("solana"),
@@ -2444,15 +3047,15 @@ function SolanaConfirmStep({
2444
3047
  }
2445
3048
  )
2446
3049
  ] }),
2447
- /* @__PURE__ */ jsxs9("div", { className: "rs-card-row", children: [
2448
- /* @__PURE__ */ jsx9("span", { className: "rs-card-label", children: "Destination" }),
2449
- /* @__PURE__ */ jsxs9(
3050
+ /* @__PURE__ */ jsxs10("div", { className: "rs-card-row", children: [
3051
+ /* @__PURE__ */ jsx11("span", { className: "rs-card-label", children: "Destination" }),
3052
+ /* @__PURE__ */ jsxs10(
2450
3053
  "span",
2451
3054
  {
2452
3055
  className: "rs-card-value",
2453
3056
  style: { display: "flex", alignItems: "center", gap: 8 },
2454
3057
  children: [
2455
- getChainIcon(targetChain) && /* @__PURE__ */ jsx9(
3058
+ getChainIcon(targetChain) && /* @__PURE__ */ jsx11(
2456
3059
  "img",
2457
3060
  {
2458
3061
  src: getChainIcon(targetChain),
@@ -2465,21 +3068,21 @@ function SolanaConfirmStep({
2465
3068
  }
2466
3069
  )
2467
3070
  ] }),
2468
- /* @__PURE__ */ jsxs9("div", { className: "rs-card-row", children: [
2469
- /* @__PURE__ */ jsx9("span", { className: "rs-card-label", children: "Estimated time" }),
2470
- /* @__PURE__ */ jsx9("span", { className: "rs-card-value", children: "< 1 min" })
3071
+ /* @__PURE__ */ jsxs10("div", { className: "rs-card-row", children: [
3072
+ /* @__PURE__ */ jsx11("span", { className: "rs-card-label", children: "Estimated time" }),
3073
+ /* @__PURE__ */ jsx11("span", { className: "rs-card-value", children: "< 1 min" })
2471
3074
  ] })
2472
3075
  ] }),
2473
- /* @__PURE__ */ jsxs9("div", { className: "rs-card", children: [
2474
- /* @__PURE__ */ jsxs9("div", { className: "rs-card-row", children: [
2475
- /* @__PURE__ */ jsx9("span", { className: "rs-card-label", children: "You send" }),
2476
- /* @__PURE__ */ jsxs9(
3076
+ /* @__PURE__ */ jsxs10("div", { className: "rs-card", children: [
3077
+ /* @__PURE__ */ jsxs10("div", { className: "rs-card-row", children: [
3078
+ /* @__PURE__ */ jsx11("span", { className: "rs-card-label", children: "You send" }),
3079
+ /* @__PURE__ */ jsxs10(
2477
3080
  "span",
2478
3081
  {
2479
3082
  className: "rs-card-value",
2480
3083
  style: { display: "flex", alignItems: "center", gap: 6 },
2481
3084
  children: [
2482
- getTokenIcon(token.symbol) && /* @__PURE__ */ jsx9(
3085
+ getTokenIcon(token.symbol) && /* @__PURE__ */ jsx11(
2483
3086
  "img",
2484
3087
  {
2485
3088
  src: getTokenIcon(token.symbol),
@@ -2494,15 +3097,15 @@ function SolanaConfirmStep({
2494
3097
  }
2495
3098
  )
2496
3099
  ] }),
2497
- /* @__PURE__ */ jsxs9("div", { className: "rs-card-row", children: [
2498
- /* @__PURE__ */ jsx9("span", { className: "rs-card-label", children: "You receive" }),
2499
- /* @__PURE__ */ jsxs9(
3100
+ /* @__PURE__ */ jsxs10("div", { className: "rs-card-row", children: [
3101
+ /* @__PURE__ */ jsx11("span", { className: "rs-card-label", children: "You receive" }),
3102
+ /* @__PURE__ */ jsxs10(
2500
3103
  "span",
2501
3104
  {
2502
3105
  className: "rs-card-value",
2503
3106
  style: { display: "flex", alignItems: "center", gap: 6 },
2504
3107
  children: [
2505
- getTokenIcon(targetSymbol) && /* @__PURE__ */ jsx9(
3108
+ getTokenIcon(targetSymbol) && /* @__PURE__ */ jsx11(
2506
3109
  "img",
2507
3110
  {
2508
3111
  src: getTokenIcon(targetSymbol),
@@ -2518,8 +3121,8 @@ function SolanaConfirmStep({
2518
3121
  )
2519
3122
  ] })
2520
3123
  ] }),
2521
- error && /* @__PURE__ */ jsxs9("div", { className: "rs-alert rs-alert--error", children: [
2522
- /* @__PURE__ */ jsx9(
3124
+ error && /* @__PURE__ */ jsxs10("div", { className: "rs-alert rs-alert--error", children: [
3125
+ /* @__PURE__ */ jsx11(
2523
3126
  "svg",
2524
3127
  {
2525
3128
  className: "rs-alert-icon",
@@ -2527,7 +3130,7 @@ function SolanaConfirmStep({
2527
3130
  fill: "none",
2528
3131
  stroke: "currentColor",
2529
3132
  strokeWidth: "2",
2530
- children: /* @__PURE__ */ jsx9(
3133
+ children: /* @__PURE__ */ jsx11(
2531
3134
  "path",
2532
3135
  {
2533
3136
  strokeLinecap: "round",
@@ -2537,10 +3140,10 @@ function SolanaConfirmStep({
2537
3140
  )
2538
3141
  }
2539
3142
  ),
2540
- /* @__PURE__ */ jsx9("span", { className: "rs-alert-text", children: error })
3143
+ /* @__PURE__ */ jsx11("span", { className: "rs-alert-text", children: error })
2541
3144
  ] })
2542
3145
  ] }),
2543
- /* @__PURE__ */ jsx9("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx9(
3146
+ /* @__PURE__ */ jsx11("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx11(
2544
3147
  Button,
2545
3148
  {
2546
3149
  onClick: handleConfirm,
@@ -2550,14 +3153,14 @@ function SolanaConfirmStep({
2550
3153
  children: "Confirm Order"
2551
3154
  }
2552
3155
  ) }),
2553
- /* @__PURE__ */ jsx9(PoweredBy, {})
3156
+ /* @__PURE__ */ jsx11(PoweredBy, {})
2554
3157
  ] });
2555
3158
  }
2556
3159
 
2557
3160
  // src/DepositFlow.tsx
2558
- import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
3161
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
2559
3162
  var QR_AUTO_ADVANCE_HYDRATION_GRACE_MS = 1e3;
2560
- function isSameRoute(sourceChain, sourceToken, targetChain, targetToken) {
3163
+ function isSameRoute2(sourceChain, sourceToken, targetChain, targetToken) {
2561
3164
  return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
2562
3165
  }
2563
3166
  function getAddressKey(address) {
@@ -2576,6 +3179,8 @@ function DepositFlow({
2576
3179
  amount: defaultAmount,
2577
3180
  recipient,
2578
3181
  postBridgeActions,
3182
+ outputTokenRules,
3183
+ rejectUnmapped,
2579
3184
  signerAddress = DEFAULT_SIGNER_ADDRESS,
2580
3185
  sessionChainIds,
2581
3186
  forceRegister = false,
@@ -2604,44 +3209,50 @@ function DepositFlow({
2604
3209
  const onTotalBalanceChangeRef = useLatestRef(onTotalBalanceChange);
2605
3210
  const onSmartAccountChangeRef = useLatestRef(onSmartAccountChange);
2606
3211
  const onEventRef = useLatestRef(onEvent);
3212
+ const onDepositSubmittedRef = useLatestRef(onDepositSubmitted);
3213
+ const onDepositCompleteRef = useLatestRef(onDepositComplete);
3214
+ const onDepositFailedRef = useLatestRef(onDepositFailed);
3215
+ const onErrorRef = useLatestRef(onError);
2607
3216
  const hasInitialReownSession = Boolean(
2608
3217
  enableSolana ? reownWallet?.isConnected || reownWallet?.address : reownWallet?.address
2609
3218
  );
2610
3219
  const hasInitialWalletHydrationPending = Boolean(
2611
3220
  dappAddress && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasInitialReownSession && !reownWallet.isReady)
2612
3221
  );
2613
- const [step, setStep] = useState10({ type: "setup" });
2614
- const [flowMode, setFlowMode] = useState10(null);
2615
- const [totalBalanceUsd, setTotalBalanceUsd] = useState10(0);
2616
- const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = useState10(false);
2617
- const [selectedWalletId, setSelectedWalletId] = useState10(null);
2618
- const [hasQrAutoAdvanceGraceElapsed, setHasQrAutoAdvanceGraceElapsed] = useState10(() => !hasInitialWalletHydrationPending);
2619
- const flowModeRef = useRef5(null);
2620
- const portfolioAssetsRef = useRef5([]);
2621
- const stableWalletSignerRef = useRef5(null);
2622
- const stableWalletSelectionKeyRef = useRef5(null);
3222
+ const [step, setStep] = useState11({ type: "setup" });
3223
+ const [flowMode, setFlowMode] = useState11(null);
3224
+ const [totalBalanceUsd, setTotalBalanceUsd] = useState11(0);
3225
+ const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = useState11(false);
3226
+ const [selectedWalletId, setSelectedWalletId] = useState11(null);
3227
+ const [hasQrAutoAdvanceGraceElapsed, setHasQrAutoAdvanceGraceElapsed] = useState11(() => !hasInitialWalletHydrationPending);
3228
+ const flowModeRef = useRef7(null);
3229
+ const portfolioAssetsRef = useRef7([]);
3230
+ const stableWalletSignerRef = useRef7(null);
3231
+ const stableWalletSelectionKeyRef = useRef7(null);
2623
3232
  flowModeRef.current = flowMode;
2624
- const logFlow = useCallback3(
3233
+ const logFlow = useCallback5(
2625
3234
  (message, data) => {
2626
3235
  debugLog(debug, "deposit-flow", message, data);
2627
3236
  },
2628
3237
  [debug]
2629
3238
  );
2630
- const logFlowError = useCallback3(
3239
+ const logFlowError = useCallback5(
2631
3240
  (message, error, data) => {
2632
3241
  debugError(debug, "deposit-flow", message, error, data);
2633
3242
  },
2634
3243
  [debug]
2635
3244
  );
2636
- const handleAssetsLoaded = useCallback3((assets) => {
3245
+ const handleAssetsLoaded = useCallback5((assets) => {
2637
3246
  portfolioAssetsRef.current = assets;
2638
3247
  }, []);
2639
- const getTokenPriceUsd = useCallback3((symbol) => {
3248
+ const getTokenPriceUsd = useCallback5((symbol) => {
2640
3249
  const sym = symbol.toLowerCase();
2641
3250
  for (const asset of portfolioAssetsRef.current) {
2642
3251
  if (asset.symbol.toLowerCase() === sym && asset.balanceUsd && asset.balance) {
2643
3252
  try {
2644
- const balanceUnits = Number(asset.balance) / 10 ** asset.decimals;
3253
+ const balanceUnits = Number(
3254
+ formatUnits5(BigInt(asset.balance), asset.decimals)
3255
+ );
2645
3256
  if (balanceUnits > 0) return asset.balanceUsd / balanceUnits;
2646
3257
  } catch {
2647
3258
  }
@@ -2649,14 +3260,14 @@ function DepositFlow({
2649
3260
  }
2650
3261
  return null;
2651
3262
  }, []);
2652
- const dappSwitchChain = useMemo7(() => {
3263
+ const dappSwitchChain = useMemo6(() => {
2653
3264
  if (!dappWalletClient?.switchChain) return void 0;
2654
3265
  return async (chainId) => {
2655
3266
  await dappWalletClient.switchChain?.({ id: chainId });
2656
3267
  };
2657
3268
  }, [dappWalletClient]);
2658
3269
  const connectedWalletAddress = dappWalletClient?.account?.address ?? null;
2659
- const walletOptions = useMemo7(() => {
3270
+ const walletOptions = useMemo6(() => {
2660
3271
  const options = [];
2661
3272
  const seen = /* @__PURE__ */ new Set();
2662
3273
  if (connectedWalletAddress && dappAddress) {
@@ -2717,7 +3328,7 @@ function DepositFlow({
2717
3328
  dappAddress && !hasWalletOptions && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady)
2718
3329
  );
2719
3330
  const showConnectStep = flowMode === null && !canAutoLock && !isConnectSelectionConfirmed;
2720
- useEffect9(() => {
3331
+ useEffect10(() => {
2721
3332
  if (!isWalletHydrationPending) {
2722
3333
  setHasQrAutoAdvanceGraceElapsed(true);
2723
3334
  return;
@@ -2728,7 +3339,7 @@ function DepositFlow({
2728
3339
  }, QR_AUTO_ADVANCE_HYDRATION_GRACE_MS);
2729
3340
  return () => window.clearTimeout(timeout);
2730
3341
  }, [isWalletHydrationPending]);
2731
- const walletSelectionKey = useMemo7(() => {
3342
+ const walletSelectionKey = useMemo6(() => {
2732
3343
  if (flowMode !== "wallet") return null;
2733
3344
  if (canAutoLock) {
2734
3345
  return getAddressKey(connectedWalletAddress);
@@ -2742,7 +3353,7 @@ function DepositFlow({
2742
3353
  isConnectSelectionConfirmed,
2743
3354
  selectedWalletId
2744
3355
  ]);
2745
- const walletSignerContext = useMemo7(() => {
3356
+ const walletSignerContext = useMemo6(() => {
2746
3357
  if (flowMode === "deposit-address") {
2747
3358
  return null;
2748
3359
  }
@@ -2808,7 +3419,7 @@ function DepositFlow({
2808
3419
  reownWallet,
2809
3420
  targetChain
2810
3421
  ]);
2811
- useEffect9(() => {
3422
+ useEffect10(() => {
2812
3423
  if (flowMode !== "wallet") {
2813
3424
  stableWalletSelectionKeyRef.current = null;
2814
3425
  stableWalletSignerRef.current = null;
@@ -2823,7 +3434,7 @@ function DepositFlow({
2823
3434
  stableWalletSignerRef.current = walletSignerContext;
2824
3435
  }
2825
3436
  }, [flowMode, walletSelectionKey, walletSignerContext]);
2826
- const signerContext = useMemo7(() => {
3437
+ const signerContext = useMemo6(() => {
2827
3438
  if (flowMode === "deposit-address") {
2828
3439
  if (!dappAddress) return null;
2829
3440
  return {
@@ -2852,8 +3463,8 @@ function DepositFlow({
2852
3463
  walletSelectionKey
2853
3464
  ]);
2854
3465
  const sessionKeyAddress = dappAddress ?? signerContext?.ownerAddress ?? null;
2855
- const lastTargetRef = useRef5(null);
2856
- useEffect9(() => {
3466
+ const lastTargetRef = useRef7(null);
3467
+ useEffect10(() => {
2857
3468
  const prev = lastTargetRef.current;
2858
3469
  if (prev && (prev.chain !== targetChain || prev.token.toLowerCase() !== targetToken.toLowerCase())) {
2859
3470
  if (step.type !== "processing") {
@@ -2862,20 +3473,20 @@ function DepositFlow({
2862
3473
  }
2863
3474
  lastTargetRef.current = { chain: targetChain, token: targetToken };
2864
3475
  }, [targetChain, targetToken, step.type]);
2865
- const handleBackFromAmount = useCallback3(() => {
3476
+ const handleBackFromAmount = useCallback5(() => {
2866
3477
  setStep((prev) => {
2867
3478
  if (prev.type !== "amount") return prev;
2868
3479
  return { type: "select-asset", smartAccount: prev.smartAccount };
2869
3480
  });
2870
3481
  }, []);
2871
- const handleBackFromSelectAsset = useCallback3(() => {
3482
+ const handleBackFromSelectAsset = useCallback5(() => {
2872
3483
  if (hasWalletOptions || reownWallet) {
2873
3484
  hasNavigatedBackRef.current = true;
2874
3485
  setFlowMode(null);
2875
3486
  setIsConnectSelectionConfirmed(false);
2876
3487
  }
2877
3488
  }, [hasWalletOptions, reownWallet]);
2878
- const handleBackFromDepositAddress = useCallback3(() => {
3489
+ const handleBackFromDepositAddress = useCallback5(() => {
2879
3490
  setFlowMode(null);
2880
3491
  setStep({ type: "setup" });
2881
3492
  if (hasWalletOptions || reownWallet) {
@@ -2883,7 +3494,7 @@ function DepositFlow({
2883
3494
  setIsConnectSelectionConfirmed(false);
2884
3495
  }
2885
3496
  }, [hasWalletOptions, reownWallet]);
2886
- const handleBackFromSolanaTokenSelect = useCallback3(() => {
3497
+ const handleBackFromSolanaTokenSelect = useCallback5(() => {
2887
3498
  setFlowMode(null);
2888
3499
  setStep({ type: "setup" });
2889
3500
  if (hasWalletOptions || reownWallet) {
@@ -2891,7 +3502,7 @@ function DepositFlow({
2891
3502
  setIsConnectSelectionConfirmed(false);
2892
3503
  }
2893
3504
  }, [hasWalletOptions, reownWallet]);
2894
- const handleBackFromSolanaAmount = useCallback3(() => {
3505
+ const handleBackFromSolanaAmount = useCallback5(() => {
2895
3506
  setStep((prev) => {
2896
3507
  if (prev.type !== "solana-amount") return prev;
2897
3508
  return {
@@ -2901,7 +3512,7 @@ function DepositFlow({
2901
3512
  };
2902
3513
  });
2903
3514
  }, []);
2904
- const handleBackFromSolanaConfirm = useCallback3(() => {
3515
+ const handleBackFromSolanaConfirm = useCallback5(() => {
2905
3516
  setStep((prev) => {
2906
3517
  if (prev.type !== "solana-confirm") return prev;
2907
3518
  return {
@@ -2915,7 +3526,7 @@ function DepositFlow({
2915
3526
  };
2916
3527
  });
2917
3528
  }, []);
2918
- const handleBackFromConfirm = useCallback3(() => {
3529
+ const handleBackFromConfirm = useCallback5(() => {
2919
3530
  setStep((prev) => {
2920
3531
  if (prev.type !== "confirm") return prev;
2921
3532
  return {
@@ -2927,13 +3538,13 @@ function DepositFlow({
2927
3538
  }, []);
2928
3539
  const stepIndex = step.type === "setup" ? 0 : step.type === "deposit-address" ? 1 : step.type === "select-asset" ? 1 : step.type === "solana-token-select" ? 1 : step.type === "solana-amount" ? 2 : step.type === "amount" ? 2 : step.type === "confirm" ? 3 : step.type === "solana-confirm" ? 3 : 4;
2929
3540
  const currentBackHandler = step.type === "deposit-address" ? handleBackFromDepositAddress : step.type === "select-asset" && signerContext && !canAutoLock ? handleBackFromSelectAsset : step.type === "solana-token-select" ? handleBackFromSolanaTokenSelect : step.type === "solana-amount" ? handleBackFromSolanaAmount : step.type === "solana-confirm" ? handleBackFromSolanaConfirm : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
2930
- useEffect9(() => {
3541
+ useEffect10(() => {
2931
3542
  onStepChangeRef.current?.(stepIndex, currentBackHandler);
2932
3543
  }, [stepIndex, currentBackHandler, onStepChangeRef]);
2933
3544
  const stepSendToken = step.type === "amount" ? step.asset.symbol : null;
2934
3545
  const stepOpenEventKey = step.type === "select-asset" ? "select-asset" : step.type === "deposit-address" ? "deposit-address" : step.type === "amount" && stepSendToken ? `amount:${stepSendToken.toLowerCase()}` : null;
2935
- const lastStepOpenEventKeyRef = useRef5(null);
2936
- useEffect9(() => {
3546
+ const lastStepOpenEventKeyRef = useRef7(null);
3547
+ useEffect10(() => {
2937
3548
  if (!stepOpenEventKey) {
2938
3549
  lastStepOpenEventKeyRef.current = null;
2939
3550
  return;
@@ -2975,7 +3586,7 @@ function DepositFlow({
2975
3586
  totalBalanceUsd,
2976
3587
  onEventRef
2977
3588
  ]);
2978
- useEffect9(() => {
3589
+ useEffect10(() => {
2979
3590
  logFlow("state:changed", {
2980
3591
  step: step.type,
2981
3592
  flowMode,
@@ -2991,22 +3602,22 @@ function DepositFlow({
2991
3602
  targetChain,
2992
3603
  targetToken
2993
3604
  ]);
2994
- useEffect9(() => {
3605
+ useEffect10(() => {
2995
3606
  onTotalBalanceChangeRef.current?.(totalBalanceUsd);
2996
3607
  }, [totalBalanceUsd, onTotalBalanceChangeRef]);
2997
3608
  const isDepositAddressMode = flowMode === "deposit-address";
2998
3609
  const isSolanaWalletMode = flowMode === "solana-wallet";
2999
- const handleSelectProvider = useCallback3(() => {
3610
+ const handleSelectProvider = useCallback5(() => {
3000
3611
  setFlowMode("wallet");
3001
3612
  }, []);
3002
- const handleSelectSolanaWallet = useCallback3(() => {
3613
+ const handleSelectSolanaWallet = useCallback5(() => {
3003
3614
  setFlowMode("solana-wallet");
3004
3615
  }, []);
3005
- const handleSelectTransferCrypto = useCallback3(() => {
3616
+ const handleSelectTransferCrypto = useCallback5(() => {
3006
3617
  setFlowMode("deposit-address");
3007
3618
  setStep({ type: "setup" });
3008
3619
  }, []);
3009
- const handleNewDeposit = useCallback3(() => {
3620
+ const handleNewDeposit = useCallback5(() => {
3010
3621
  onSmartAccountChangeRef.current?.(null);
3011
3622
  setFlowMode(null);
3012
3623
  setStep({ type: "setup" });
@@ -3014,7 +3625,7 @@ function DepositFlow({
3014
3625
  setSelectedWalletId(null);
3015
3626
  hasNavigatedBackRef.current = false;
3016
3627
  }, [onSmartAccountChangeRef]);
3017
- const handleSetupComplete = useCallback3(
3628
+ const handleSetupComplete = useCallback5(
3018
3629
  (smartAccount, solanaDepositAddress) => {
3019
3630
  logFlow("setup:complete", {
3020
3631
  smartAccount,
@@ -3047,35 +3658,18 @@ function DepositFlow({
3047
3658
  },
3048
3659
  [isDepositAddressMode, isSolanaWalletMode, logFlow, onSmartAccountChangeRef]
3049
3660
  );
3050
- const handleDepositAddressDetected = useCallback3(
3051
- (txHash, chainId, amount, token, sourceSymbol, sourceDecimals) => {
3661
+ const handleDepositAddressSubmitted = useCallback5(
3662
+ (data) => {
3052
3663
  logFlow("deposit-address:detected", {
3053
- txHash,
3054
- sourceChain: chainId,
3055
- sourceToken: token,
3056
- amount
3057
- });
3058
- setStep((prev) => {
3059
- if (prev.type !== "deposit-address") return prev;
3060
- const isEvmToken = /^0x[a-fA-F0-9]{40}$/.test(token);
3061
- const directTransfer = typeof chainId === "number" && isEvmToken && isSameRoute(chainId, token, targetChain, targetToken);
3062
- return {
3063
- type: "processing",
3064
- smartAccount: prev.smartAccount,
3065
- txHash,
3066
- sourceChain: chainId,
3067
- sourceToken: token,
3068
- amount,
3069
- sourceSymbol,
3070
- sourceDecimals,
3071
- directTransfer
3072
- };
3664
+ txHash: data.txHash,
3665
+ sourceChain: data.sourceChain,
3666
+ amount: data.amount
3073
3667
  });
3074
- onDepositSubmitted?.({ txHash, sourceChain: chainId, amount });
3668
+ onDepositSubmittedRef.current?.(data);
3075
3669
  },
3076
- [onDepositSubmitted, targetChain, targetToken]
3670
+ [logFlow, onDepositSubmittedRef]
3077
3671
  );
3078
- const handleSolanaTokenContinue = useCallback3(
3672
+ const handleSolanaTokenContinue = useCallback5(
3079
3673
  (token, balance, balanceUsd) => {
3080
3674
  logFlow("solana:token:continue", { token: token.symbol });
3081
3675
  setStep((prev) => {
@@ -3093,7 +3687,7 @@ function DepositFlow({
3093
3687
  },
3094
3688
  [defaultAmount, logFlow]
3095
3689
  );
3096
- const handleSolanaAmountContinue = useCallback3(
3690
+ const handleSolanaAmountContinue = useCallback5(
3097
3691
  (token, sourceAmount, inputAmountUsd) => {
3098
3692
  const targetSym = getTokenSymbol(targetToken, targetChain);
3099
3693
  const isTargetStable = isStablecoinSymbol(targetSym);
@@ -3123,7 +3717,7 @@ function DepositFlow({
3123
3717
  },
3124
3718
  [targetToken, targetChain, getTokenPriceUsd, logFlow]
3125
3719
  );
3126
- const handleSolanaConfirmed = useCallback3(
3720
+ const handleSolanaConfirmed = useCallback5(
3127
3721
  (txHash, amountUnits) => {
3128
3722
  setStep((prev) => {
3129
3723
  if (prev.type !== "solana-confirm") return prev;
@@ -3151,13 +3745,13 @@ function DepositFlow({
3151
3745
  },
3152
3746
  [logFlow, onDepositSubmitted]
3153
3747
  );
3154
- const handleConnected = useCallback3(
3748
+ const handleConnected = useCallback5(
3155
3749
  (addr, smartAccount) => {
3156
3750
  onConnected?.({ address: addr, smartAccount });
3157
3751
  },
3158
3752
  [onConnected]
3159
3753
  );
3160
- const handleAssetContinue = useCallback3(
3754
+ const handleAssetContinue = useCallback5(
3161
3755
  (asset) => {
3162
3756
  onEvent?.({
3163
3757
  type: "deposit_modal_connected_wallet_select_source_cta_click",
@@ -3179,7 +3773,7 @@ function DepositFlow({
3179
3773
  },
3180
3774
  [defaultAmount, onEvent, totalBalanceUsd]
3181
3775
  );
3182
- const handleAmountContinue = useCallback3(
3776
+ const handleAmountContinue = useCallback5(
3183
3777
  (amount, targetAmount, balance) => {
3184
3778
  const targetSym = getTokenSymbol(targetToken, targetChain);
3185
3779
  const isTargetStable = isStablecoinSymbol(targetSym);
@@ -3199,7 +3793,7 @@ function DepositFlow({
3199
3793
  },
3200
3794
  [targetToken, targetChain, getTokenPriceUsd]
3201
3795
  );
3202
- const handleDepositSubmitted = useCallback3(
3796
+ const handleDepositSubmitted = useCallback5(
3203
3797
  (txHash, chainId, amount, token) => {
3204
3798
  logFlow("evm:submitted", {
3205
3799
  txHash,
@@ -3216,55 +3810,55 @@ function DepositFlow({
3216
3810
  sourceChain: chainId,
3217
3811
  sourceToken: token,
3218
3812
  amount,
3219
- directTransfer: isSameRoute(chainId, token, targetChain, targetToken)
3813
+ directTransfer: isSameRoute2(chainId, token, targetChain, targetToken)
3220
3814
  };
3221
3815
  });
3222
3816
  },
3223
3817
  [targetChain, targetToken]
3224
3818
  );
3225
- const handleDepositSubmittedCallback = useCallback3(
3819
+ const handleDepositSubmittedCallback = useCallback5(
3226
3820
  (txHash, sourceChain, amount) => {
3227
- onDepositSubmitted?.({ txHash, sourceChain, amount });
3821
+ onDepositSubmittedRef.current?.({ txHash, sourceChain, amount });
3228
3822
  },
3229
- [onDepositSubmitted]
3823
+ [onDepositSubmittedRef]
3230
3824
  );
3231
- const handleDepositComplete = useCallback3(
3825
+ const handleDepositComplete = useCallback5(
3232
3826
  (txHash, destinationTxHash, context) => {
3233
3827
  logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
3234
- onDepositComplete?.({ txHash, destinationTxHash, ...context });
3828
+ onDepositCompleteRef.current?.({ txHash, destinationTxHash, ...context });
3235
3829
  },
3236
- [logFlow, onDepositComplete]
3830
+ [logFlow, onDepositCompleteRef]
3237
3831
  );
3238
- const handleDepositFailed = useCallback3(
3832
+ const handleDepositFailed = useCallback5(
3239
3833
  (txHash, error) => {
3240
3834
  logFlowError("deposit:failed", error, { txHash });
3241
- onDepositFailed?.({ txHash, error });
3835
+ onDepositFailedRef.current?.({ txHash, error });
3242
3836
  },
3243
- [logFlowError, onDepositFailed]
3837
+ [logFlowError, onDepositFailedRef]
3244
3838
  );
3245
- const handleError = useCallback3(
3839
+ const handleError = useCallback5(
3246
3840
  (message, code) => {
3247
3841
  logFlowError("flow:error", message, { code });
3248
- onError?.({ message, code });
3842
+ onErrorRef.current?.({ message, code });
3249
3843
  },
3250
- [logFlowError, onError]
3844
+ [logFlowError, onErrorRef]
3251
3845
  );
3252
- const handleTotalBalanceComputed = useCallback3((total) => {
3846
+ const handleTotalBalanceComputed = useCallback5((total) => {
3253
3847
  setTotalBalanceUsd(total);
3254
3848
  }, []);
3255
- const selectedWalletIdEffective = useMemo7(() => {
3849
+ const selectedWalletIdEffective = useMemo6(() => {
3256
3850
  if (selectedWalletId) return selectedWalletId;
3257
3851
  if (walletOptions.length === 1) {
3258
3852
  return walletOptions[0].id;
3259
3853
  }
3260
3854
  return null;
3261
3855
  }, [selectedWalletId, walletOptions]);
3262
- const walletOptionsKey = useMemo7(
3856
+ const walletOptionsKey = useMemo6(
3263
3857
  () => walletOptions.map((option) => option.id).join(","),
3264
3858
  [walletOptions]
3265
3859
  );
3266
- const hasNavigatedBackRef = useRef5(false);
3267
- useEffect9(() => {
3860
+ const hasNavigatedBackRef = useRef7(false);
3861
+ useEffect10(() => {
3268
3862
  if (flowModeRef.current) {
3269
3863
  return;
3270
3864
  }
@@ -3275,14 +3869,14 @@ function DepositFlow({
3275
3869
  setStep({ type: "setup" });
3276
3870
  }
3277
3871
  }, [walletOptionsKey]);
3278
- useEffect9(() => {
3872
+ useEffect10(() => {
3279
3873
  if (!showConnectStep && isConnectSelectionConfirmed && flowMode === "wallet" && !signerContext) {
3280
3874
  setSelectedWalletId(null);
3281
3875
  setIsConnectSelectionConfirmed(false);
3282
3876
  setFlowMode(null);
3283
3877
  }
3284
3878
  }, [showConnectStep, isConnectSelectionConfirmed, flowMode, signerContext]);
3285
- useEffect9(() => {
3879
+ useEffect10(() => {
3286
3880
  if (enableSolana || flowMode !== "solana-wallet") {
3287
3881
  return;
3288
3882
  }
@@ -3293,7 +3887,7 @@ function DepositFlow({
3293
3887
  setStep({ type: "setup" });
3294
3888
  }
3295
3889
  }, [enableSolana, flowMode, step.type]);
3296
- useEffect9(() => {
3890
+ useEffect10(() => {
3297
3891
  if (hasNavigatedBackRef.current || isConnectSelectionConfirmed || flowMode) {
3298
3892
  return;
3299
3893
  }
@@ -3331,7 +3925,7 @@ function DepositFlow({
3331
3925
  handleSelectTransferCrypto
3332
3926
  ]);
3333
3927
  if (showConnectStep) {
3334
- return /* @__PURE__ */ jsx10("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx10(
3928
+ return /* @__PURE__ */ jsx12("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx12(
3335
3929
  ConnectStep,
3336
3930
  {
3337
3931
  walletOptions,
@@ -3364,8 +3958,8 @@ function DepositFlow({
3364
3958
  }
3365
3959
  if (isDepositAddressMode) {
3366
3960
  if (!dappAddress || !sessionKeyAddress) return null;
3367
- return /* @__PURE__ */ jsxs10("div", { className: "rs-modal-body", children: [
3368
- step.type === "setup" && /* @__PURE__ */ jsx10(
3961
+ return /* @__PURE__ */ jsxs11("div", { className: "rs-modal-body", children: [
3962
+ step.type === "setup" && /* @__PURE__ */ jsx12(
3369
3963
  SetupStep,
3370
3964
  {
3371
3965
  address: sessionKeyAddress,
@@ -3375,6 +3969,8 @@ function DepositFlow({
3375
3969
  sessionChainIds,
3376
3970
  recipient,
3377
3971
  postBridgeActions,
3972
+ outputTokenRules,
3973
+ rejectUnmapped,
3378
3974
  forceRegister,
3379
3975
  enableSolana,
3380
3976
  service,
@@ -3383,14 +3979,21 @@ function DepositFlow({
3383
3979
  onError: handleError
3384
3980
  }
3385
3981
  ),
3386
- step.type === "deposit-address" && /* @__PURE__ */ jsx10(
3982
+ step.type === "deposit-address" && /* @__PURE__ */ jsx12(
3387
3983
  DepositAddressStep,
3388
3984
  {
3389
3985
  smartAccount: step.smartAccount,
3390
3986
  solanaDepositAddress: enableSolana ? step.solanaDepositAddress : void 0,
3391
3987
  service,
3392
3988
  allowedRoutes,
3393
- onDepositDetected: handleDepositAddressDetected,
3989
+ targetChain,
3990
+ targetToken,
3991
+ waitForFinalTx,
3992
+ hasPostBridgeActions: Boolean(postBridgeActions?.length),
3993
+ uiConfig,
3994
+ onDepositSubmitted: handleDepositAddressSubmitted,
3995
+ onDepositComplete: handleDepositComplete,
3996
+ onDepositFailed: handleDepositFailed,
3394
3997
  onCopyAddress: () => {
3395
3998
  const chainName = getChainName(targetChain);
3396
3999
  const tokenSymbol = getTokenSymbol(targetToken, targetChain);
@@ -3402,29 +4005,6 @@ function DepositFlow({
3402
4005
  cta_name: "copy"
3403
4006
  });
3404
4007
  },
3405
- onError: handleError
3406
- }
3407
- ),
3408
- step.type === "processing" && /* @__PURE__ */ jsx10(
3409
- ProcessingStep,
3410
- {
3411
- smartAccount: step.smartAccount,
3412
- txHash: step.txHash,
3413
- sourceChain: step.sourceChain,
3414
- sourceToken: step.sourceToken,
3415
- targetChain,
3416
- targetToken,
3417
- amount: step.amount,
3418
- sourceSymbol: step.sourceSymbol,
3419
- sourceDecimals: step.sourceDecimals,
3420
- waitForFinalTx,
3421
- hasPostBridgeActions: Boolean(postBridgeActions?.length),
3422
- service,
3423
- directTransfer: step.directTransfer,
3424
- onClose,
3425
- onNewDeposit: handleNewDeposit,
3426
- onDepositComplete: handleDepositComplete,
3427
- onDepositFailed: handleDepositFailed,
3428
4008
  onError: handleError,
3429
4009
  debug
3430
4010
  }
@@ -3435,8 +4015,8 @@ function DepositFlow({
3435
4015
  if (!sessionKeyAddress) return null;
3436
4016
  const solanaAddr = reownWallet?.solanaAddress;
3437
4017
  const solanaProvider = reownWallet?.solanaProvider;
3438
- return /* @__PURE__ */ jsxs10("div", { className: "rs-modal-body", children: [
3439
- step.type === "setup" && /* @__PURE__ */ jsx10(
4018
+ return /* @__PURE__ */ jsxs11("div", { className: "rs-modal-body", children: [
4019
+ step.type === "setup" && /* @__PURE__ */ jsx12(
3440
4020
  SetupStep,
3441
4021
  {
3442
4022
  address: sessionKeyAddress,
@@ -3446,6 +4026,8 @@ function DepositFlow({
3446
4026
  sessionChainIds,
3447
4027
  recipient,
3448
4028
  postBridgeActions,
4029
+ outputTokenRules,
4030
+ rejectUnmapped,
3449
4031
  forceRegister,
3450
4032
  enableSolana,
3451
4033
  service,
@@ -3454,7 +4036,7 @@ function DepositFlow({
3454
4036
  onError: handleError
3455
4037
  }
3456
4038
  ),
3457
- step.type === "solana-token-select" && solanaAddr && /* @__PURE__ */ jsx10(
4039
+ step.type === "solana-token-select" && solanaAddr && /* @__PURE__ */ jsx12(
3458
4040
  SolanaTokenSelectStep,
3459
4041
  {
3460
4042
  solanaAddress: solanaAddr,
@@ -3464,7 +4046,7 @@ function DepositFlow({
3464
4046
  debug
3465
4047
  }
3466
4048
  ),
3467
- step.type === "solana-amount" && /* @__PURE__ */ jsx10(
4049
+ step.type === "solana-amount" && /* @__PURE__ */ jsx12(
3468
4050
  SolanaAmountStep,
3469
4051
  {
3470
4052
  token: step.token,
@@ -3476,7 +4058,7 @@ function DepositFlow({
3476
4058
  debug
3477
4059
  }
3478
4060
  ),
3479
- step.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */ jsx10(
4061
+ step.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */ jsx12(
3480
4062
  SolanaConfirmStep,
3481
4063
  {
3482
4064
  smartAccount: step.smartAccount,
@@ -3495,16 +4077,16 @@ function DepositFlow({
3495
4077
  onError: handleError,
3496
4078
  debug
3497
4079
  }
3498
- ) : step.type === "solana-confirm" ? /* @__PURE__ */ jsxs10("div", { className: "rs-step", children: [
3499
- /* @__PURE__ */ jsxs10("div", { className: "rs-loading-state", children: [
3500
- /* @__PURE__ */ jsx10("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx10(
4080
+ ) : step.type === "solana-confirm" ? /* @__PURE__ */ jsxs11("div", { className: "rs-step", children: [
4081
+ /* @__PURE__ */ jsxs11("div", { className: "rs-loading-state", children: [
4082
+ /* @__PURE__ */ jsx12("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx12(
3501
4083
  "svg",
3502
4084
  {
3503
4085
  viewBox: "0 0 24 24",
3504
4086
  fill: "none",
3505
4087
  stroke: "currentColor",
3506
4088
  strokeWidth: "2",
3507
- children: /* @__PURE__ */ jsx10(
4089
+ children: /* @__PURE__ */ jsx12(
3508
4090
  "path",
3509
4091
  {
3510
4092
  strokeLinecap: "round",
@@ -3514,22 +4096,22 @@ function DepositFlow({
3514
4096
  )
3515
4097
  }
3516
4098
  ) }),
3517
- /* @__PURE__ */ jsxs10("div", { className: "rs-loading-text", children: [
3518
- /* @__PURE__ */ jsx10("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
3519
- /* @__PURE__ */ jsx10("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
4099
+ /* @__PURE__ */ jsxs11("div", { className: "rs-loading-text", children: [
4100
+ /* @__PURE__ */ jsx12("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
4101
+ /* @__PURE__ */ jsx12("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
3520
4102
  ] })
3521
4103
  ] }),
3522
- /* @__PURE__ */ jsx10("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx10(
4104
+ /* @__PURE__ */ jsx12("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx12(
3523
4105
  "button",
3524
4106
  {
3525
4107
  type: "button",
3526
4108
  className: "rs-button rs-button--default rs-button--full-width",
3527
4109
  onClick: handleBackFromSolanaConfirm,
3528
- children: /* @__PURE__ */ jsx10("span", { children: "Go Back" })
4110
+ children: /* @__PURE__ */ jsx12("span", { children: "Go Back" })
3529
4111
  }
3530
4112
  ) })
3531
4113
  ] }) : null,
3532
- step.type === "processing" && /* @__PURE__ */ jsx10(
4114
+ step.type === "processing" && /* @__PURE__ */ jsx12(
3533
4115
  ProcessingStep,
3534
4116
  {
3535
4117
  smartAccount: step.smartAccount,
@@ -3556,7 +4138,7 @@ function DepositFlow({
3556
4138
  ] });
3557
4139
  }
3558
4140
  if (!signerContext?.walletClient || !signerContext?.publicClient) {
3559
- return /* @__PURE__ */ jsx10("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx10("div", { className: "rs-step", children: /* @__PURE__ */ jsx10("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx10("div", { className: "rs-loading-text", children: /* @__PURE__ */ jsx10("div", { className: "rs-loading-title", children: "Connecting wallet..." }) }) }) }) });
4141
+ return /* @__PURE__ */ jsx12("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx12("div", { className: "rs-step", children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-text", children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-title", children: "Connecting wallet..." }) }) }) }) });
3560
4142
  }
3561
4143
  const ownerAddress = signerContext.ownerAddress;
3562
4144
  const ownerChainId = signerContext.walletClient?.chain?.id ?? signerContext.publicClient.chain?.id ?? targetChain;
@@ -3566,8 +4148,8 @@ function DepositFlow({
3566
4148
  }
3567
4149
  return getPublicClient(chainId);
3568
4150
  };
3569
- return /* @__PURE__ */ jsxs10("div", { className: "rs-modal-body", children: [
3570
- step.type === "setup" && /* @__PURE__ */ jsx10(
4151
+ return /* @__PURE__ */ jsxs11("div", { className: "rs-modal-body", children: [
4152
+ step.type === "setup" && /* @__PURE__ */ jsx12(
3571
4153
  SetupStep,
3572
4154
  {
3573
4155
  walletClient: signerContext.walletClient,
@@ -3578,6 +4160,8 @@ function DepositFlow({
3578
4160
  sessionChainIds,
3579
4161
  recipient,
3580
4162
  postBridgeActions,
4163
+ outputTokenRules,
4164
+ rejectUnmapped,
3581
4165
  forceRegister,
3582
4166
  enableSolana,
3583
4167
  service,
@@ -3586,7 +4170,7 @@ function DepositFlow({
3586
4170
  onError: handleError
3587
4171
  }
3588
4172
  ),
3589
- step.type === "select-asset" && /* @__PURE__ */ jsx10(
4173
+ step.type === "select-asset" && /* @__PURE__ */ jsx12(
3590
4174
  AssetSelectStep,
3591
4175
  {
3592
4176
  address: ownerAddress,
@@ -3597,10 +4181,14 @@ function DepositFlow({
3597
4181
  service,
3598
4182
  onContinue: handleAssetContinue,
3599
4183
  onTotalBalanceComputed: handleTotalBalanceComputed,
3600
- onAssetsLoaded: handleAssetsLoaded
4184
+ onAssetsLoaded: handleAssetsLoaded,
4185
+ onDisconnect: onDisconnect ? () => {
4186
+ onDisconnect();
4187
+ handleBackFromSelectAsset();
4188
+ } : void 0
3601
4189
  }
3602
4190
  ),
3603
- step.type === "amount" && /* @__PURE__ */ jsx10(
4191
+ step.type === "amount" && /* @__PURE__ */ jsx12(
3604
4192
  AmountStep,
3605
4193
  {
3606
4194
  walletClient: signerContext.walletClient,
@@ -3625,7 +4213,7 @@ function DepositFlow({
3625
4213
  }
3626
4214
  }
3627
4215
  ),
3628
- step.type === "confirm" && /* @__PURE__ */ jsx10(
4216
+ step.type === "confirm" && /* @__PURE__ */ jsx12(
3629
4217
  ConfirmStep,
3630
4218
  {
3631
4219
  walletClient: signerContext.walletClient,
@@ -3645,7 +4233,7 @@ function DepositFlow({
3645
4233
  onError: handleError
3646
4234
  }
3647
4235
  ),
3648
- step.type === "processing" && /* @__PURE__ */ jsx10(
4236
+ step.type === "processing" && /* @__PURE__ */ jsx12(
3649
4237
  ProcessingStep,
3650
4238
  {
3651
4239
  smartAccount: step.smartAccount,
@@ -3673,13 +4261,13 @@ function DepositFlow({
3673
4261
  }
3674
4262
 
3675
4263
  // src/components/history/DepositHistoryPanel.tsx
3676
- import { useCallback as useCallback4 } from "react";
3677
- import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
4264
+ import { useCallback as useCallback6 } from "react";
4265
+ import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
3678
4266
  function shortenHash(hash) {
3679
4267
  if (hash.length <= 14) return hash;
3680
4268
  return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
3681
4269
  }
3682
- function formatTimestamp(iso) {
4270
+ function formatTimestamp2(iso) {
3683
4271
  try {
3684
4272
  const date = new Date(iso);
3685
4273
  if (Number.isNaN(date.getTime())) return iso;
@@ -3711,6 +4299,16 @@ function resolveChainId(value) {
3711
4299
  }
3712
4300
  function resolveTokenSymbol(token, chainId) {
3713
4301
  if (!token) return "";
4302
+ if (chainId === "solana") {
4303
+ const normalized = token.toLowerCase();
4304
+ const matched = SOLANA_TOKENS.find(
4305
+ (entry) => entry.mint.toLowerCase() === normalized
4306
+ );
4307
+ if (matched) return matched.symbol;
4308
+ if (normalized === "native" || normalized === "11111111111111111111111111111111" || normalized === "so11111111111111111111111111111111111111112") {
4309
+ return "SOL";
4310
+ }
4311
+ }
3714
4312
  if (chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
3715
4313
  const sym = getTokenSymbol(token, chainId);
3716
4314
  if (sym !== "Token") return sym;
@@ -3720,12 +4318,24 @@ function resolveTokenSymbol(token, chainId) {
3720
4318
  function formatAmount(rawAmount, token, chainId) {
3721
4319
  if (!rawAmount) return "";
3722
4320
  let decimals = 18;
3723
- if (token && chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
3724
- decimals = getTokenDecimalsByAddress(token, chainId);
4321
+ if (token && chainId !== null && chainId !== void 0) {
4322
+ if (chainId === "solana") {
4323
+ const normalized = token.toLowerCase();
4324
+ const matched = SOLANA_TOKENS.find(
4325
+ (entry) => entry.mint.toLowerCase() === normalized
4326
+ );
4327
+ if (matched) {
4328
+ decimals = matched.decimals;
4329
+ } else if (normalized === "native" || normalized === "11111111111111111111111111111111" || normalized === "so11111111111111111111111111111111111111112") {
4330
+ decimals = 9;
4331
+ }
4332
+ } else if (/^0x[a-fA-F0-9]{40}$/.test(token)) {
4333
+ decimals = getTokenDecimalsByAddress(token, chainId);
4334
+ }
3725
4335
  }
3726
4336
  try {
3727
4337
  const raw = BigInt(rawAmount);
3728
- const divisor = BigInt(10 ** decimals);
4338
+ const divisor = 10n ** BigInt(decimals);
3729
4339
  const whole = raw / divisor;
3730
4340
  const remainder = raw % divisor;
3731
4341
  if (remainder === 0n) return whole.toString();
@@ -3757,7 +4367,7 @@ var STATUS_LABEL = {
3757
4367
  failed: "Failed"
3758
4368
  };
3759
4369
  function ExternalLinkIcon() {
3760
- return /* @__PURE__ */ jsx11("svg", { className: "rs-history-ext-icon", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 1.5H2.25A.75.75 0 0 0 1.5 2.25v7.5c0 .414.336.75.75.75h7.5a.75.75 0 0 0 .75-.75V7.5m-3-6h3m0 0v3m0-3L6 6" }) });
4370
+ return /* @__PURE__ */ jsx13("svg", { className: "rs-history-ext-icon", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 1.5H2.25A.75.75 0 0 0 1.5 2.25v7.5c0 .414.336.75.75.75h7.5a.75.75 0 0 0 .75-.75V7.5m-3-6h3m0 0v3m0-3L6 6" }) });
3761
4371
  }
3762
4372
  function DepositHistoryPanel({
3763
4373
  deposits,
@@ -3768,7 +4378,7 @@ function DepositHistoryPanel({
3768
4378
  onLoadMore,
3769
4379
  onClose
3770
4380
  }) {
3771
- const handleKeyDown = useCallback4(
4381
+ const handleKeyDown = useCallback6(
3772
4382
  (e) => {
3773
4383
  if (e.key === "Escape") {
3774
4384
  e.stopPropagation();
@@ -3777,7 +4387,7 @@ function DepositHistoryPanel({
3777
4387
  },
3778
4388
  [onClose]
3779
4389
  );
3780
- return /* @__PURE__ */ jsxs11(
4390
+ return /* @__PURE__ */ jsxs12(
3781
4391
  "div",
3782
4392
  {
3783
4393
  className: "rs-history-panel",
@@ -3785,40 +4395,40 @@ function DepositHistoryPanel({
3785
4395
  "aria-label": "Deposit history",
3786
4396
  onKeyDown: handleKeyDown,
3787
4397
  children: [
3788
- /* @__PURE__ */ jsxs11("div", { className: "rs-history-header", children: [
3789
- /* @__PURE__ */ jsx11(
4398
+ /* @__PURE__ */ jsxs12("div", { className: "rs-history-header", children: [
4399
+ /* @__PURE__ */ jsx13(
3790
4400
  "button",
3791
4401
  {
3792
4402
  type: "button",
3793
4403
  className: "rs-history-back",
3794
4404
  "aria-label": "Close history",
3795
4405
  onClick: onClose,
3796
- children: /* @__PURE__ */ jsx11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }) })
4406
+ children: /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 19.5L8.25 12l7.5-7.5" }) })
3797
4407
  }
3798
4408
  ),
3799
- /* @__PURE__ */ jsx11("span", { className: "rs-history-header-title", children: "History" }),
3800
- /* @__PURE__ */ jsx11("div", { className: "rs-history-header-spacer" })
4409
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-header-title", children: "History" }),
4410
+ /* @__PURE__ */ jsx13("div", { className: "rs-history-header-spacer" })
3801
4411
  ] }),
3802
- /* @__PURE__ */ jsxs11("div", { className: "rs-history-body", children: [
3803
- isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs11("div", { className: "rs-history-state", children: [
3804
- /* @__PURE__ */ jsx11("div", { className: "rs-history-spinner", children: /* @__PURE__ */ jsx11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx11("path", { d: "M12 2v4m0 12v4m-7.07-3.93l2.83-2.83m8.48-8.48l2.83-2.83M2 12h4m12 0h4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83", strokeLinecap: "round" }) }) }),
3805
- /* @__PURE__ */ jsx11("span", { className: "rs-history-state-text", children: "Loading history..." })
4412
+ /* @__PURE__ */ jsxs12("div", { className: "rs-history-body", children: [
4413
+ isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs12("div", { className: "rs-history-state", children: [
4414
+ /* @__PURE__ */ jsx13("div", { className: "rs-history-spinner", children: /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx13("path", { d: "M12 2v4m0 12v4m-7.07-3.93l2.83-2.83m8.48-8.48l2.83-2.83M2 12h4m12 0h4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83", strokeLinecap: "round" }) }) }),
4415
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-state-text", children: "Loading history..." })
3806
4416
  ] }),
3807
- error && !isLoading && /* @__PURE__ */ jsxs11("div", { className: "rs-history-state", children: [
3808
- /* @__PURE__ */ jsx11("div", { className: "rs-history-state-icon rs-history-state-icon--error", children: /* @__PURE__ */ jsxs11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3809
- /* @__PURE__ */ jsx11("circle", { cx: "12", cy: "12", r: "10" }),
3810
- /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", d: "M12 8v4m0 4h.01" })
4417
+ error && !isLoading && /* @__PURE__ */ jsxs12("div", { className: "rs-history-state", children: [
4418
+ /* @__PURE__ */ jsx13("div", { className: "rs-history-state-icon rs-history-state-icon--error", children: /* @__PURE__ */ jsxs12("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
4419
+ /* @__PURE__ */ jsx13("circle", { cx: "12", cy: "12", r: "10" }),
4420
+ /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", d: "M12 8v4m0 4h.01" })
3811
4421
  ] }) }),
3812
- /* @__PURE__ */ jsx11("span", { className: "rs-history-state-text", children: error })
4422
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-state-text", children: error })
3813
4423
  ] }),
3814
- !isLoading && !error && deposits.length === 0 && /* @__PURE__ */ jsxs11("div", { className: "rs-history-state", children: [
3815
- /* @__PURE__ */ jsx11("div", { className: "rs-history-state-icon", children: /* @__PURE__ */ jsx11("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }) }),
3816
- /* @__PURE__ */ jsx11("span", { className: "rs-history-state-text", children: "No deposits yet" }),
3817
- /* @__PURE__ */ jsx11("span", { className: "rs-history-state-hint", children: "Your deposit history will appear here" })
4424
+ !isLoading && !error && deposits.length === 0 && /* @__PURE__ */ jsxs12("div", { className: "rs-history-state", children: [
4425
+ /* @__PURE__ */ jsx13("div", { className: "rs-history-state-icon", children: /* @__PURE__ */ jsx13("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }) }),
4426
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-state-text", children: "No deposits yet" }),
4427
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-state-hint", children: "Your deposit history will appear here" })
3818
4428
  ] }),
3819
- deposits.length > 0 && /* @__PURE__ */ jsxs11("div", { className: "rs-history-list", children: [
3820
- deposits.map((deposit, i) => /* @__PURE__ */ jsx11(HistoryRow, { deposit }, deposit.txHash || i)),
3821
- hasMore && /* @__PURE__ */ jsx11(
4429
+ deposits.length > 0 && /* @__PURE__ */ jsxs12("div", { className: "rs-history-list", children: [
4430
+ deposits.map((deposit, i) => /* @__PURE__ */ jsx13(HistoryRow, { deposit }, deposit.txHash || i)),
4431
+ hasMore && /* @__PURE__ */ jsx13(
3822
4432
  "button",
3823
4433
  {
3824
4434
  type: "button",
@@ -3846,41 +4456,41 @@ function HistoryRow({ deposit }) {
3846
4456
  const targetSymbol = resolveTokenSymbol(deposit.targetToken, targetChainId);
3847
4457
  const rawAmount = deposit.sourceAmount ?? deposit.amount;
3848
4458
  const formattedAmount = rawAmount ? formatAmount(rawAmount, deposit.token, sourceChainId) : null;
3849
- const timestamp = deposit.createdAt ? formatTimestamp(deposit.createdAt) : null;
4459
+ const timestamp = deposit.createdAt ? formatTimestamp2(deposit.createdAt) : null;
3850
4460
  const srcTxUrl = deposit.sourceTxHash ? getTxExplorerUrl(deposit.sourceTxHash, sourceChainId) : null;
3851
4461
  const dstTxUrl = deposit.destinationTxHash ? getTxExplorerUrl(deposit.destinationTxHash, targetChainId) : null;
3852
- return /* @__PURE__ */ jsxs11("div", { className: "rs-history-row", children: [
3853
- /* @__PURE__ */ jsxs11("div", { className: "rs-history-row-primary", children: [
3854
- /* @__PURE__ */ jsxs11("div", { className: "rs-history-route", children: [
3855
- /* @__PURE__ */ jsxs11("span", { className: "rs-history-chain", children: [
3856
- sourceChainIcon && /* @__PURE__ */ jsx11("img", { src: sourceChainIcon, alt: "", className: "rs-history-chain-icon" }),
3857
- /* @__PURE__ */ jsx11("span", { className: "rs-history-chain-name", children: sourceChainName ?? "Unknown" })
4462
+ return /* @__PURE__ */ jsxs12("div", { className: "rs-history-row", children: [
4463
+ /* @__PURE__ */ jsxs12("div", { className: "rs-history-row-primary", children: [
4464
+ /* @__PURE__ */ jsxs12("div", { className: "rs-history-route", children: [
4465
+ /* @__PURE__ */ jsxs12("span", { className: "rs-history-chain", children: [
4466
+ sourceChainIcon && /* @__PURE__ */ jsx13("img", { src: sourceChainIcon, alt: "", className: "rs-history-chain-icon" }),
4467
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-chain-name", children: sourceChainName ?? "Unknown" })
3858
4468
  ] }),
3859
- /* @__PURE__ */ jsx11("svg", { className: "rs-history-route-arrow", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.5 6h7m0 0L7 3.5M9.5 6 7 8.5" }) }),
3860
- /* @__PURE__ */ jsxs11("span", { className: "rs-history-chain", children: [
3861
- targetChainIcon && /* @__PURE__ */ jsx11("img", { src: targetChainIcon, alt: "", className: "rs-history-chain-icon" }),
3862
- /* @__PURE__ */ jsx11("span", { className: "rs-history-chain-name", children: targetChainName ?? "Unknown" })
4469
+ /* @__PURE__ */ jsx13("svg", { className: "rs-history-route-arrow", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.5 6h7m0 0L7 3.5M9.5 6 7 8.5" }) }),
4470
+ /* @__PURE__ */ jsxs12("span", { className: "rs-history-chain", children: [
4471
+ targetChainIcon && /* @__PURE__ */ jsx13("img", { src: targetChainIcon, alt: "", className: "rs-history-chain-icon" }),
4472
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-chain-name", children: targetChainName ?? "Unknown" })
3863
4473
  ] })
3864
4474
  ] }),
3865
- /* @__PURE__ */ jsxs11("span", { className: `rs-history-status rs-history-status--${status}`, children: [
3866
- /* @__PURE__ */ jsx11("span", { className: `rs-history-dot rs-history-dot--${status}` }),
4475
+ /* @__PURE__ */ jsxs12("span", { className: `rs-history-status rs-history-status--${status}`, children: [
4476
+ /* @__PURE__ */ jsx13("span", { className: `rs-history-dot rs-history-dot--${status}` }),
3867
4477
  STATUS_LABEL[status]
3868
4478
  ] })
3869
4479
  ] }),
3870
- /* @__PURE__ */ jsxs11("div", { className: "rs-history-row-secondary", children: [
3871
- /* @__PURE__ */ jsx11("span", { className: "rs-history-amount", children: formattedAmount ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
4480
+ /* @__PURE__ */ jsxs12("div", { className: "rs-history-row-secondary", children: [
4481
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-amount", children: formattedAmount ? /* @__PURE__ */ jsxs12(Fragment2, { children: [
3872
4482
  formattedAmount,
3873
4483
  " ",
3874
- /* @__PURE__ */ jsx11("span", { className: "rs-history-token", children: sourceSymbol }),
3875
- targetSymbol && sourceSymbol !== targetSymbol && /* @__PURE__ */ jsxs11("span", { className: "rs-history-token-target", children: [
4484
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-token", children: sourceSymbol }),
4485
+ targetSymbol && sourceSymbol !== targetSymbol && /* @__PURE__ */ jsxs12("span", { className: "rs-history-token-target", children: [
3876
4486
  " \u2192 ",
3877
4487
  targetSymbol
3878
4488
  ] })
3879
- ] }) : /* @__PURE__ */ jsx11("span", { className: "rs-history-no-amount", children: "\u2014" }) }),
3880
- timestamp && /* @__PURE__ */ jsx11("span", { className: "rs-history-time", children: timestamp })
4489
+ ] }) : /* @__PURE__ */ jsx13("span", { className: "rs-history-no-amount", children: "\u2014" }) }),
4490
+ timestamp && /* @__PURE__ */ jsx13("span", { className: "rs-history-time", children: timestamp })
3881
4491
  ] }),
3882
- (srcTxUrl || dstTxUrl) && /* @__PURE__ */ jsxs11("div", { className: "rs-history-row-links", children: [
3883
- srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */ jsxs11(
4492
+ (srcTxUrl || dstTxUrl) && /* @__PURE__ */ jsxs12("div", { className: "rs-history-row-links", children: [
4493
+ srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */ jsxs12(
3884
4494
  "a",
3885
4495
  {
3886
4496
  href: srcTxUrl,
@@ -3889,12 +4499,12 @@ function HistoryRow({ deposit }) {
3889
4499
  className: "rs-history-tx-link",
3890
4500
  title: deposit.sourceTxHash,
3891
4501
  children: [
3892
- /* @__PURE__ */ jsx11("span", { className: "rs-history-tx-hash", children: shortenHash(deposit.sourceTxHash) }),
3893
- /* @__PURE__ */ jsx11(ExternalLinkIcon, {})
4502
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-tx-hash", children: shortenHash(deposit.sourceTxHash) }),
4503
+ /* @__PURE__ */ jsx13(ExternalLinkIcon, {})
3894
4504
  ]
3895
4505
  }
3896
4506
  ),
3897
- dstTxUrl && deposit.destinationTxHash && /* @__PURE__ */ jsxs11(
4507
+ dstTxUrl && deposit.destinationTxHash && /* @__PURE__ */ jsxs12(
3898
4508
  "a",
3899
4509
  {
3900
4510
  href: dstTxUrl,
@@ -3903,8 +4513,8 @@ function HistoryRow({ deposit }) {
3903
4513
  className: "rs-history-tx-link",
3904
4514
  title: deposit.destinationTxHash,
3905
4515
  children: [
3906
- /* @__PURE__ */ jsx11("span", { className: "rs-history-tx-hash", children: shortenHash(deposit.destinationTxHash) }),
3907
- /* @__PURE__ */ jsx11(ExternalLinkIcon, {})
4516
+ /* @__PURE__ */ jsx13("span", { className: "rs-history-tx-hash", children: shortenHash(deposit.destinationTxHash) }),
4517
+ /* @__PURE__ */ jsx13(ExternalLinkIcon, {})
3908
4518
  ]
3909
4519
  }
3910
4520
  )
@@ -3914,9 +4524,9 @@ function HistoryRow({ deposit }) {
3914
4524
  DepositHistoryPanel.displayName = "DepositHistoryPanel";
3915
4525
 
3916
4526
  // src/DepositModal.tsx
3917
- import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
4527
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
3918
4528
  var ReownDepositInner = lazy(
3919
- () => import("./DepositModalReown-RXIVPSEE.mjs").then((m) => ({ default: m.DepositModalReown }))
4529
+ () => import("./DepositModalReown-RYCOXWMH.mjs").then((m) => ({ default: m.DepositModalReown }))
3920
4530
  );
3921
4531
  function DepositModal(props) {
3922
4532
  const needsReown = !!props.reownAppId;
@@ -3925,7 +4535,7 @@ function DepositModal(props) {
3925
4535
  "dappWalletClient"
3926
4536
  );
3927
4537
  if (needsReown) {
3928
- return /* @__PURE__ */ jsx12(Suspense, { fallback: null, children: /* @__PURE__ */ jsx12(
4538
+ return /* @__PURE__ */ jsx14(Suspense, { fallback: null, children: /* @__PURE__ */ jsx14(
3929
4539
  ReownDepositInner,
3930
4540
  {
3931
4541
  ...props,
@@ -3933,7 +4543,7 @@ function DepositModal(props) {
3933
4543
  }
3934
4544
  ) });
3935
4545
  }
3936
- return /* @__PURE__ */ jsx12(
4546
+ return /* @__PURE__ */ jsx14(
3937
4547
  DepositModalInner,
3938
4548
  {
3939
4549
  ...props,
@@ -3965,6 +4575,8 @@ function DepositModalInner({
3965
4575
  waitForFinalTx = true,
3966
4576
  enableSolana = true,
3967
4577
  postBridgeActions,
4578
+ outputTokenRules,
4579
+ rejectUnmapped,
3968
4580
  reownWallet,
3969
4581
  onConnect,
3970
4582
  onDisconnect,
@@ -3984,64 +4596,62 @@ function DepositModalInner({
3984
4596
  onError,
3985
4597
  debug
3986
4598
  }) {
3987
- const modalRef = useRef6(null);
4599
+ const modalRef = useRef8(null);
3988
4600
  const onReadyRef = useLatestRef(onReady);
3989
- const [currentStepIndex, setCurrentStepIndex] = useState11(0);
3990
- const [totalBalanceUsd, setTotalBalanceUsd] = useState11(null);
3991
- const backHandlerRef = useRef6(void 0);
4601
+ const [currentStepIndex, setCurrentStepIndex] = useState12(0);
4602
+ const [totalBalanceUsd, setTotalBalanceUsd] = useState12(null);
4603
+ const backHandlerRef = useRef8(void 0);
3992
4604
  const showHistoryButton = uiConfig?.showHistoryButton ?? false;
3993
- const [activeSmartAccount, setActiveSmartAccount] = useState11(null);
3994
- const [historyOpen, setHistoryOpen] = useState11(false);
3995
- const [historyDeposits, setHistoryDeposits] = useState11([]);
3996
- const [historyNextCursor, setHistoryNextCursor] = useState11(null);
3997
- const [historyLoading, setHistoryLoading] = useState11(false);
3998
- const [historyLoadingMore, setHistoryLoadingMore] = useState11(false);
3999
- const [historyError, setHistoryError] = useState11(null);
4000
- const historyStaleRef = useRef6(false);
4001
- const historyLoadedRef = useRef6(false);
4605
+ const [activeSmartAccount, setActiveSmartAccount] = useState12(null);
4606
+ const [historyOpen, setHistoryOpen] = useState12(false);
4607
+ const [historyDeposits, setHistoryDeposits] = useState12([]);
4608
+ const [historyNextCursor, setHistoryNextCursor] = useState12(null);
4609
+ const [historyLoading, setHistoryLoading] = useState12(false);
4610
+ const [historyLoadingMore, setHistoryLoadingMore] = useState12(false);
4611
+ const [historyError, setHistoryError] = useState12(null);
4612
+ const historyStaleRef = useRef8(false);
4613
+ const historyLoadedRef = useRef8(false);
4002
4614
  const targetChain = getChainId(targetChainProp);
4003
4615
  const sourceChain = sourceChainProp ? getChainId(sourceChainProp) : void 0;
4004
- const service = useMemo8(
4616
+ const service = useMemo7(
4005
4617
  () => createDepositService(backendUrl, {
4006
4618
  debug,
4007
4619
  debugScope: "service:deposit"
4008
4620
  }),
4009
4621
  [backendUrl, debug]
4010
4622
  );
4011
- useEffect10(() => {
4623
+ useEffect11(() => {
4012
4624
  if (isOpen && modalRef.current) {
4013
4625
  applyTheme(modalRef.current, theme);
4014
4626
  }
4015
4627
  }, [isOpen, theme]);
4016
- useEffect10(() => {
4628
+ useEffect11(() => {
4017
4629
  configureSolanaRpcUrl(solanaRpcUrl);
4018
4630
  }, [solanaRpcUrl]);
4019
- const hasCalledReady = useRef6(false);
4020
- useEffect10(() => {
4021
- if (isOpen && !hasCalledReady.current) {
4022
- hasCalledReady.current = true;
4631
+ useEffect11(() => {
4632
+ if (isOpen) {
4023
4633
  onReadyRef.current?.();
4024
4634
  }
4025
4635
  }, [isOpen, onReadyRef]);
4026
- useEffect10(() => {
4636
+ useEffect11(() => {
4027
4637
  if (!isOpen) {
4028
4638
  setCurrentStepIndex(0);
4029
4639
  }
4030
4640
  }, [isOpen]);
4031
- const handleStepChange = useCallback5(
4641
+ const handleStepChange = useCallback7(
4032
4642
  (stepIndex, onBack) => {
4033
4643
  setCurrentStepIndex(stepIndex);
4034
4644
  backHandlerRef.current = onBack;
4035
4645
  },
4036
4646
  []
4037
4647
  );
4038
- const handleTotalBalanceChange = useCallback5((balance2) => {
4648
+ const handleTotalBalanceChange = useCallback7((balance2) => {
4039
4649
  setTotalBalanceUsd(balance2);
4040
4650
  }, []);
4041
- const handleBack = useCallback5(() => {
4651
+ const handleBack = useCallback7(() => {
4042
4652
  backHandlerRef.current?.();
4043
4653
  }, []);
4044
- const handleSmartAccountChange = useCallback5(
4654
+ const handleSmartAccountChange = useCallback7(
4045
4655
  (account) => {
4046
4656
  setActiveSmartAccount(account);
4047
4657
  if (!account) {
@@ -4050,7 +4660,7 @@ function DepositModalInner({
4050
4660
  },
4051
4661
  []
4052
4662
  );
4053
- const fetchHistory = useCallback5(
4663
+ const fetchHistory = useCallback7(
4054
4664
  async (cursor) => {
4055
4665
  if (!activeSmartAccount) return;
4056
4666
  const isInitial = !cursor;
@@ -4088,21 +4698,21 @@ function DepositModalInner({
4088
4698
  },
4089
4699
  [activeSmartAccount, service]
4090
4700
  );
4091
- const handleHistoryOpen = useCallback5(() => {
4701
+ const handleHistoryOpen = useCallback7(() => {
4092
4702
  setHistoryOpen(true);
4093
4703
  if (!historyLoadedRef.current || historyStaleRef.current) {
4094
4704
  fetchHistory();
4095
4705
  }
4096
4706
  }, [fetchHistory]);
4097
- const handleHistoryClose = useCallback5(() => {
4707
+ const handleHistoryClose = useCallback7(() => {
4098
4708
  setHistoryOpen(false);
4099
4709
  }, []);
4100
- const handleHistoryLoadMore = useCallback5(() => {
4710
+ const handleHistoryLoadMore = useCallback7(() => {
4101
4711
  if (historyNextCursor) {
4102
4712
  fetchHistory(historyNextCursor);
4103
4713
  }
4104
4714
  }, [fetchHistory, historyNextCursor]);
4105
- const markHistoryStale = useCallback5(() => {
4715
+ const markHistoryStale = useCallback7(() => {
4106
4716
  historyStaleRef.current = true;
4107
4717
  if (historyOpen) {
4108
4718
  fetchHistory();
@@ -4111,28 +4721,28 @@ function DepositModalInner({
4111
4721
  const onDepositSubmittedRef = useLatestRef(onDepositSubmitted);
4112
4722
  const onDepositCompleteRef = useLatestRef(onDepositComplete);
4113
4723
  const onDepositFailedRef = useLatestRef(onDepositFailed);
4114
- const handleDepositSubmitted = useCallback5(
4724
+ const handleDepositSubmitted = useCallback7(
4115
4725
  (data) => {
4116
4726
  onDepositSubmittedRef.current?.(data);
4117
4727
  if (showHistoryButton) markHistoryStale();
4118
4728
  },
4119
4729
  [onDepositSubmittedRef, showHistoryButton, markHistoryStale]
4120
4730
  );
4121
- const handleDepositComplete = useCallback5(
4731
+ const handleDepositComplete = useCallback7(
4122
4732
  (data) => {
4123
4733
  onDepositCompleteRef.current?.(data);
4124
4734
  if (showHistoryButton) markHistoryStale();
4125
4735
  },
4126
4736
  [onDepositCompleteRef, showHistoryButton, markHistoryStale]
4127
4737
  );
4128
- const handleDepositFailed = useCallback5(
4738
+ const handleDepositFailed = useCallback7(
4129
4739
  (data) => {
4130
4740
  onDepositFailedRef.current?.(data);
4131
4741
  if (showHistoryButton) markHistoryStale();
4132
4742
  },
4133
4743
  [onDepositFailedRef, showHistoryButton, markHistoryStale]
4134
4744
  );
4135
- useEffect10(() => {
4745
+ useEffect11(() => {
4136
4746
  if (!isOpen) {
4137
4747
  setHistoryOpen(false);
4138
4748
  setHistoryDeposits([]);
@@ -4150,7 +4760,7 @@ function DepositModalInner({
4150
4760
  const logoUrl = branding?.logoUrl ?? "https://github.com/rhinestonewtf.png";
4151
4761
  const title = branding?.title ?? "Deposit";
4152
4762
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
4153
- return /* @__PURE__ */ jsx12(
4763
+ return /* @__PURE__ */ jsx14(
4154
4764
  Modal,
4155
4765
  {
4156
4766
  isOpen,
@@ -4158,23 +4768,23 @@ function DepositModalInner({
4158
4768
  className,
4159
4769
  inline,
4160
4770
  closeOnOverlayClick,
4161
- children: /* @__PURE__ */ jsxs12("div", { ref: modalRef, className: "rs-modal", children: [
4162
- /* @__PURE__ */ jsxs12("div", { className: "rs-modal-header--redesigned", children: [
4163
- /* @__PURE__ */ jsx12("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && /* @__PURE__ */ jsx12(
4771
+ children: /* @__PURE__ */ jsxs13("div", { ref: modalRef, className: "rs-modal", children: [
4772
+ /* @__PURE__ */ jsxs13("div", { className: "rs-modal-header--redesigned", children: [
4773
+ /* @__PURE__ */ jsx14("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && /* @__PURE__ */ jsx14(
4164
4774
  "button",
4165
4775
  {
4166
4776
  type: "button",
4167
4777
  className: "rs-modal-header-back",
4168
4778
  "aria-label": "Go back",
4169
4779
  onClick: handleBack,
4170
- children: /* @__PURE__ */ jsx12(
4780
+ children: /* @__PURE__ */ jsx14(
4171
4781
  "svg",
4172
4782
  {
4173
4783
  viewBox: "0 0 24 24",
4174
4784
  fill: "none",
4175
4785
  stroke: "currentColor",
4176
4786
  strokeWidth: "2",
4177
- children: /* @__PURE__ */ jsx12(
4787
+ children: /* @__PURE__ */ jsx14(
4178
4788
  "path",
4179
4789
  {
4180
4790
  strokeLinecap: "round",
@@ -4186,9 +4796,9 @@ function DepositModalInner({
4186
4796
  )
4187
4797
  }
4188
4798
  ) }),
4189
- /* @__PURE__ */ jsxs12("div", { className: "rs-modal-header-nav-center", children: [
4190
- /* @__PURE__ */ jsxs12("div", { className: "rs-modal-header-title-row", children: [
4191
- showLogo && logoUrl && /* @__PURE__ */ jsx12(
4799
+ /* @__PURE__ */ jsxs13("div", { className: "rs-modal-header-nav-center", children: [
4800
+ /* @__PURE__ */ jsxs13("div", { className: "rs-modal-header-title-row", children: [
4801
+ showLogo && logoUrl && /* @__PURE__ */ jsx14(
4192
4802
  "img",
4193
4803
  {
4194
4804
  src: logoUrl,
@@ -4199,20 +4809,20 @@ function DepositModalInner({
4199
4809
  }
4200
4810
  }
4201
4811
  ),
4202
- /* @__PURE__ */ jsx12("span", { className: "rs-modal-header-title", children: title }),
4203
- showStepper && currentStepIndex >= 2 && /* @__PURE__ */ jsxs12("div", { className: "rs-step-indicator", style: { marginLeft: 8 }, children: [
4204
- /* @__PURE__ */ jsx12(
4812
+ /* @__PURE__ */ jsx14("span", { className: "rs-modal-header-title", children: title }),
4813
+ showStepper && currentStepIndex >= 2 && /* @__PURE__ */ jsxs13("div", { className: "rs-step-indicator", style: { marginLeft: 8 }, children: [
4814
+ /* @__PURE__ */ jsx14(
4205
4815
  "div",
4206
4816
  {
4207
4817
  className: `rs-step-indicator-node ${currentStepIndex >= 4 ? "rs-step-indicator-node--complete" : "rs-step-indicator-node--active"}`,
4208
- children: currentStepIndex >= 4 ? /* @__PURE__ */ jsx12(
4818
+ children: currentStepIndex >= 4 ? /* @__PURE__ */ jsx14(
4209
4819
  "svg",
4210
4820
  {
4211
4821
  viewBox: "0 0 24 24",
4212
4822
  fill: "none",
4213
4823
  stroke: "currentColor",
4214
4824
  strokeWidth: "3",
4215
- children: /* @__PURE__ */ jsx12(
4825
+ children: /* @__PURE__ */ jsx14(
4216
4826
  "path",
4217
4827
  {
4218
4828
  strokeLinecap: "round",
@@ -4224,13 +4834,13 @@ function DepositModalInner({
4224
4834
  ) : "1"
4225
4835
  }
4226
4836
  ),
4227
- /* @__PURE__ */ jsx12(
4837
+ /* @__PURE__ */ jsx14(
4228
4838
  "div",
4229
4839
  {
4230
4840
  className: `rs-step-indicator-line ${currentStepIndex >= 4 ? "rs-step-indicator-line--active" : ""}`
4231
4841
  }
4232
4842
  ),
4233
- /* @__PURE__ */ jsx12(
4843
+ /* @__PURE__ */ jsx14(
4234
4844
  "div",
4235
4845
  {
4236
4846
  className: `rs-step-indicator-node ${currentStepIndex >= 4 ? "rs-step-indicator-node--active" : "rs-step-indicator-node--inactive"}`,
@@ -4239,16 +4849,16 @@ function DepositModalInner({
4239
4849
  )
4240
4850
  ] })
4241
4851
  ] }),
4242
- balance && /* @__PURE__ */ jsxs12("div", { className: "rs-modal-header-balance", children: [
4243
- /* @__PURE__ */ jsxs12("span", { children: [
4852
+ balance && /* @__PURE__ */ jsxs13("div", { className: "rs-modal-header-balance", children: [
4853
+ /* @__PURE__ */ jsxs13("span", { children: [
4244
4854
  balance.title,
4245
4855
  ":"
4246
4856
  ] }),
4247
- /* @__PURE__ */ jsx12("span", { className: "rs-modal-header-balance-value", children: balance.amount ?? (totalBalanceUsd !== null ? currencyFormatter.format(totalBalanceUsd) : null) })
4857
+ /* @__PURE__ */ jsx14("span", { className: "rs-modal-header-balance-value", children: balance.amount ?? (totalBalanceUsd !== null ? currencyFormatter.format(totalBalanceUsd) : null) })
4248
4858
  ] })
4249
4859
  ] }),
4250
- /* @__PURE__ */ jsxs12("div", { className: "rs-modal-header-nav-right", children: [
4251
- showHistoryButton && /* @__PURE__ */ jsx12(
4860
+ /* @__PURE__ */ jsxs13("div", { className: "rs-modal-header-nav-right", children: [
4861
+ showHistoryButton && /* @__PURE__ */ jsx14(
4252
4862
  "button",
4253
4863
  {
4254
4864
  type: "button",
@@ -4256,14 +4866,14 @@ function DepositModalInner({
4256
4866
  "aria-label": "Deposit history",
4257
4867
  onClick: handleHistoryOpen,
4258
4868
  disabled: !activeSmartAccount,
4259
- children: /* @__PURE__ */ jsx12(
4869
+ children: /* @__PURE__ */ jsx14(
4260
4870
  "svg",
4261
4871
  {
4262
4872
  viewBox: "0 0 24 24",
4263
4873
  fill: "none",
4264
4874
  stroke: "currentColor",
4265
4875
  strokeWidth: "1.75",
4266
- children: /* @__PURE__ */ jsx12(
4876
+ children: /* @__PURE__ */ jsx14(
4267
4877
  "path",
4268
4878
  {
4269
4879
  strokeLinecap: "round",
@@ -4275,21 +4885,21 @@ function DepositModalInner({
4275
4885
  )
4276
4886
  }
4277
4887
  ),
4278
- /* @__PURE__ */ jsx12(
4888
+ /* @__PURE__ */ jsx14(
4279
4889
  "button",
4280
4890
  {
4281
4891
  type: "button",
4282
4892
  onClick: onClose,
4283
4893
  className: "rs-modal-close",
4284
4894
  "aria-label": "Close",
4285
- children: /* @__PURE__ */ jsx12(
4895
+ children: /* @__PURE__ */ jsx14(
4286
4896
  "svg",
4287
4897
  {
4288
4898
  viewBox: "0 0 24 24",
4289
4899
  fill: "none",
4290
4900
  stroke: "currentColor",
4291
4901
  strokeWidth: "2",
4292
- children: /* @__PURE__ */ jsx12(
4902
+ children: /* @__PURE__ */ jsx14(
4293
4903
  "path",
4294
4904
  {
4295
4905
  strokeLinecap: "round",
@@ -4303,7 +4913,7 @@ function DepositModalInner({
4303
4913
  )
4304
4914
  ] })
4305
4915
  ] }),
4306
- /* @__PURE__ */ jsx12(
4916
+ /* @__PURE__ */ jsx14(
4307
4917
  DepositFlow,
4308
4918
  {
4309
4919
  dappWalletClient,
@@ -4318,6 +4928,8 @@ function DepositModalInner({
4318
4928
  amount: defaultAmount,
4319
4929
  recipient,
4320
4930
  postBridgeActions,
4931
+ outputTokenRules,
4932
+ rejectUnmapped,
4321
4933
  signerAddress,
4322
4934
  sessionChainIds,
4323
4935
  forceRegister,
@@ -4343,7 +4955,7 @@ function DepositModalInner({
4343
4955
  debug
4344
4956
  }
4345
4957
  ),
4346
- showHistoryButton && historyOpen && /* @__PURE__ */ jsx12(
4958
+ showHistoryButton && historyOpen && /* @__PURE__ */ jsx14(
4347
4959
  DepositHistoryPanel,
4348
4960
  {
4349
4961
  deposits: historyDeposits,