@rhinestone/deposit-modal 0.1.67 → 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.
@@ -1226,6 +1226,103 @@ function QRCode({ value, size = 200, iconSrc, className }) {
1226
1226
  }
1227
1227
  QRCode.displayName = "QRCode";
1228
1228
 
1229
+ // src/components/ui/Tooltip.tsx
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+ var _reactdom = require('react-dom');
1237
+
1238
+ function Tooltip({ content, children, className }) {
1239
+ const [open, setOpen] = _react.useState.call(void 0, false);
1240
+ const [position, setPosition] = _react.useState.call(void 0, null);
1241
+ const triggerRef = _react.useRef.call(void 0, null);
1242
+ const bubbleRef = _react.useRef.call(void 0, null);
1243
+ const updatePosition = _react.useCallback.call(void 0, () => {
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
1250
+ });
1251
+ }, []);
1252
+ _react.useEffect.call(void 0, () => {
1253
+ if (!open) return;
1254
+ updatePosition();
1255
+ function handleOutside(event) {
1256
+ const target = event.target;
1257
+ if (!target) return;
1258
+ if (_optionalChain([triggerRef, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.contains, 'call', _29 => _29(target)])) return;
1259
+ if (_optionalChain([bubbleRef, 'access', _30 => _30.current, 'optionalAccess', _31 => _31.contains, 'call', _32 => _32(target)])) return;
1260
+ setOpen(false);
1261
+ }
1262
+ function handleKey(event) {
1263
+ if (event.key === "Escape") setOpen(false);
1264
+ }
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]);
1278
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1279
+ "span",
1280
+ {
1281
+ ref: triggerRef,
1282
+ className: `rs-tooltip ${_nullishCoalesce(className, () => ( ""))}`,
1283
+ onMouseEnter: () => setOpen(true),
1284
+ onMouseLeave: () => setOpen(false),
1285
+ children: [
1286
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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" && _reactdom.createPortal.call(void 0,
1308
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1309
+ "span",
1310
+ {
1311
+ ref: bubbleRef,
1312
+ className: "rs-tooltip-bubble",
1313
+ role: "tooltip",
1314
+ style: { top: position.top, left: position.left },
1315
+ children: content
1316
+ }
1317
+ ),
1318
+ document.body
1319
+ )
1320
+ ]
1321
+ }
1322
+ );
1323
+ }
1324
+ Tooltip.displayName = "Tooltip";
1325
+
1229
1326
  // src/components/ui/DepositNotification.tsx
1230
1327
 
1231
1328
 
@@ -1265,7 +1362,7 @@ function formatTimestamp(ms) {
1265
1362
  return `${month} ${day}${suffix} \xB7 ${hours}:${minutes}:${seconds}`;
1266
1363
  }
1267
1364
  function formatBridgeFailedMessage(event) {
1268
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _27 => _27.data]), () => ( {}));
1365
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _33 => _33.data]), () => ( {}));
1269
1366
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
1270
1367
  if (backendMessage.length > 0) {
1271
1368
  const lower = backendMessage.toLowerCase();
@@ -1348,7 +1445,7 @@ function DepositNotification({
1348
1445
  setCompletedAt(Date.now());
1349
1446
  setStatus("complete");
1350
1447
  const context = depositContextRef.current;
1351
- _optionalChain([onCompleteRef, 'access', _28 => _28.current, 'optionalCall', _29 => _29(txHash, destTxHash, {
1448
+ _optionalChain([onCompleteRef, 'access', _34 => _34.current, 'optionalCall', _35 => _35(txHash, destTxHash, {
1352
1449
  amount: context.amount,
1353
1450
  sourceChain: context.sourceChain,
1354
1451
  sourceToken: context.sourceToken,
@@ -1363,7 +1460,7 @@ function DepositNotification({
1363
1460
  if (completedRef.current) return;
1364
1461
  completedRef.current = true;
1365
1462
  setStatus("failed");
1366
- _optionalChain([onFailedRef, 'access', _30 => _30.current, 'optionalCall', _31 => _31(txHash, error)]);
1463
+ _optionalChain([onFailedRef, 'access', _36 => _36.current, 'optionalCall', _37 => _37(txHash, error)]);
1367
1464
  },
1368
1465
  [onFailedRef, txHash]
1369
1466
  );
@@ -1381,30 +1478,30 @@ function DepositNotification({
1381
1478
  const lastEvent = data.lastEvent;
1382
1479
  const eventForTx = isEventForTx(lastEvent, txHash) ? lastEvent : void 0;
1383
1480
  const awaitingPostBridgeSwap = depositContextRef.current.waitForFinalTx && depositContextRef.current.hasPostBridgeActions;
1384
- if (_optionalChain([eventForTx, 'optionalAccess', _32 => _32.type]) === "post-bridge-swap-complete") {
1385
- const swapTxHash = _optionalChain([eventForTx, 'access', _33 => _33.data, 'optionalAccess', _34 => _34.swap, 'optionalAccess', _35 => _35.transactionHash]);
1481
+ if (_optionalChain([eventForTx, 'optionalAccess', _38 => _38.type]) === "post-bridge-swap-complete") {
1482
+ const swapTxHash = _optionalChain([eventForTx, 'access', _39 => _39.data, 'optionalAccess', _40 => _40.swap, 'optionalAccess', _41 => _41.transactionHash]);
1386
1483
  handleComplete(swapTxHash);
1387
1484
  return;
1388
1485
  }
1389
- if (_optionalChain([eventForTx, 'optionalAccess', _36 => _36.type]) === "post-bridge-swap-failed") {
1486
+ if (_optionalChain([eventForTx, 'optionalAccess', _42 => _42.type]) === "post-bridge-swap-failed") {
1390
1487
  handleFailed(formatBridgeFailedMessage(eventForTx));
1391
1488
  return;
1392
1489
  }
1393
- if (_optionalChain([eventForTx, 'optionalAccess', _37 => _37.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
1394
- const destTx = _optionalChain([eventForTx, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.destination, 'optionalAccess', _40 => _40.transactionHash]);
1490
+ if (_optionalChain([eventForTx, 'optionalAccess', _43 => _43.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
1491
+ const destTx = _optionalChain([eventForTx, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.destination, 'optionalAccess', _46 => _46.transactionHash]);
1395
1492
  handleComplete(destTx);
1396
1493
  return;
1397
1494
  }
1398
- if (!waitForFinalTx && _optionalChain([eventForTx, 'optionalAccess', _41 => _41.type]) === "bridge-started") {
1495
+ if (!waitForFinalTx && _optionalChain([eventForTx, 'optionalAccess', _47 => _47.type]) === "bridge-started") {
1399
1496
  handleComplete(void 0);
1400
1497
  return;
1401
1498
  }
1402
- if (_optionalChain([eventForTx, 'optionalAccess', _42 => _42.type]) === "bridge-failed") {
1499
+ if (_optionalChain([eventForTx, 'optionalAccess', _48 => _48.type]) === "bridge-failed") {
1403
1500
  handleFailed(formatBridgeFailedMessage(eventForTx));
1404
1501
  return;
1405
1502
  }
1406
- if (_optionalChain([eventForTx, 'optionalAccess', _43 => _43.type]) === "error") {
1407
- const errorMessage = _nullishCoalesce(_optionalChain([eventForTx, 'access', _44 => _44.data, 'optionalAccess', _45 => _45.message]), () => ( "Unknown error"));
1503
+ if (_optionalChain([eventForTx, 'optionalAccess', _49 => _49.type]) === "error") {
1504
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForTx, 'access', _50 => _50.data, 'optionalAccess', _51 => _51.message]), () => ( "Unknown error"));
1408
1505
  handleFailed(errorMessage);
1409
1506
  return;
1410
1507
  }
@@ -1600,7 +1697,7 @@ var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
1600
1697
  var configuredSolanaRpcUrl = null;
1601
1698
  var cachedConnections = /* @__PURE__ */ new Map();
1602
1699
  function configureSolanaRpcUrl(rpcUrl) {
1603
- const normalized = _optionalChain([rpcUrl, 'optionalAccess', _46 => _46.trim, 'call', _47 => _47()]);
1700
+ const normalized = _optionalChain([rpcUrl, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()]);
1604
1701
  configuredSolanaRpcUrl = normalized ? normalized : null;
1605
1702
  cachedConnections.clear();
1606
1703
  }
@@ -1735,7 +1832,7 @@ function resolveSolanaTokenMeta(token) {
1735
1832
  return {};
1736
1833
  }
1737
1834
  function getDepositEventDetails(event) {
1738
- if (!_optionalChain([event, 'optionalAccess', _48 => _48.type]) || !isRecord(event.data)) return {};
1835
+ if (!_optionalChain([event, 'optionalAccess', _54 => _54.type]) || !isRecord(event.data)) return {};
1739
1836
  if (event.type === "deposit-received") {
1740
1837
  const chainId = asChainId(event.data.chain);
1741
1838
  const token = asString(event.data.token);
@@ -1749,12 +1846,12 @@ function getDepositEventDetails(event) {
1749
1846
  }
1750
1847
  if (event.type === "bridge-started") {
1751
1848
  const source = isRecord(event.data.source) ? event.data.source : void 0;
1752
- const chainId = asChainId(_optionalChain([source, 'optionalAccess', _49 => _49.chain]));
1753
- const token = asString(_optionalChain([source, 'optionalAccess', _50 => _50.asset]));
1849
+ const chainId = asChainId(_optionalChain([source, 'optionalAccess', _55 => _55.chain]));
1850
+ const token = asString(_optionalChain([source, 'optionalAccess', _56 => _56.asset]));
1754
1851
  const solanaMeta = chainId === "solana" ? resolveSolanaTokenMeta(token) : {};
1755
1852
  return {
1756
1853
  chainId,
1757
- amount: asAmount(_optionalChain([source, 'optionalAccess', _51 => _51.amount])),
1854
+ amount: asAmount(_optionalChain([source, 'optionalAccess', _57 => _57.amount])),
1758
1855
  token,
1759
1856
  ...solanaMeta
1760
1857
  };
@@ -1773,6 +1870,7 @@ function DepositAddressStep({
1773
1870
  targetToken,
1774
1871
  waitForFinalTx,
1775
1872
  hasPostBridgeActions,
1873
+ uiConfig,
1776
1874
  onDepositSubmitted,
1777
1875
  onDepositComplete,
1778
1876
  onDepositFailed,
@@ -1781,12 +1879,12 @@ function DepositAddressStep({
1781
1879
  }) {
1782
1880
  const hasSolana = Boolean(solanaDepositAddress);
1783
1881
  const allowedChainSet = _react.useMemo.call(void 0,
1784
- () => _optionalChain([allowedRoutes, 'optionalAccess', _52 => _52.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
1785
- [_optionalChain([allowedRoutes, 'optionalAccess', _53 => _53.sourceChains])]
1882
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _58 => _58.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
1883
+ [_optionalChain([allowedRoutes, 'optionalAccess', _59 => _59.sourceChains])]
1786
1884
  );
1787
1885
  const allowedTokenSet = _react.useMemo.call(void 0,
1788
- () => _optionalChain([allowedRoutes, 'optionalAccess', _54 => _54.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
1789
- [_optionalChain([allowedRoutes, 'optionalAccess', _55 => _55.sourceTokens])]
1886
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _60 => _60.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
1887
+ [_optionalChain([allowedRoutes, 'optionalAccess', _61 => _61.sourceTokens])]
1790
1888
  );
1791
1889
  const evmChainIds = _react.useMemo.call(void 0, () => {
1792
1890
  const all = _chunkMUWVDVY4cjs.getSupportedChainIds.call(void 0, );
@@ -1818,6 +1916,7 @@ function DepositAddressStep({
1818
1916
  const [pollingError, setPollingError] = _react.useState.call(void 0, null);
1819
1917
  const [chainDropdownOpen, setChainDropdownOpen] = _react.useState.call(void 0, false);
1820
1918
  const [tokenDropdownOpen, setTokenDropdownOpen] = _react.useState.call(void 0, false);
1919
+ const [priceImpactExpanded, setPriceImpactExpanded] = _react.useState.call(void 0, false);
1821
1920
  const chainDropdownRef = _react.useRef.call(void 0, null);
1822
1921
  const tokenDropdownRef = _react.useRef.call(void 0, null);
1823
1922
  const [notifications, setNotifications] = _react.useState.call(void 0, []);
@@ -1834,9 +1933,9 @@ function DepositAddressStep({
1834
1933
  const matched = _nullishCoalesce(SOLANA_TOKENS.find((t) => t.symbol === sourceTokenSymbol), () => ( SOLANA_TOKENS[0]));
1835
1934
  sourceSelectionRef.current = {
1836
1935
  chainId: "solana",
1837
- token: _optionalChain([matched, 'optionalAccess', _56 => _56.mint]),
1838
- sourceSymbol: _optionalChain([matched, 'optionalAccess', _57 => _57.symbol]),
1839
- sourceDecimals: _optionalChain([matched, 'optionalAccess', _58 => _58.decimals])
1936
+ token: _optionalChain([matched, 'optionalAccess', _62 => _62.mint]),
1937
+ sourceSymbol: _optionalChain([matched, 'optionalAccess', _63 => _63.symbol]),
1938
+ sourceDecimals: _optionalChain([matched, 'optionalAccess', _64 => _64.decimals])
1840
1939
  };
1841
1940
  return;
1842
1941
  }
@@ -1852,8 +1951,8 @@ function DepositAddressStep({
1852
1951
  function handlePointerDown(event) {
1853
1952
  const target = event.target;
1854
1953
  if (!target) return;
1855
- const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _59 => _59.current, 'optionalAccess', _60 => _60.contains, 'call', _61 => _61(target)]);
1856
- const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _62 => _62.current, 'optionalAccess', _63 => _63.contains, 'call', _64 => _64(target)]);
1954
+ const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _65 => _65.current, 'optionalAccess', _66 => _66.contains, 'call', _67 => _67(target)]);
1955
+ const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _68 => _68.current, 'optionalAccess', _69 => _69.contains, 'call', _70 => _70(target)]);
1857
1956
  if (clickedChainDropdown || clickedTokenDropdown) return;
1858
1957
  setChainDropdownOpen(false);
1859
1958
  setTokenDropdownOpen(false);
@@ -1866,7 +1965,7 @@ function DepositAddressStep({
1866
1965
  };
1867
1966
  }, [chainDropdownOpen, tokenDropdownOpen]);
1868
1967
  const handleCopy = _react.useCallback.call(void 0, async () => {
1869
- _optionalChain([onCopyAddress, 'optionalCall', _65 => _65()]);
1968
+ _optionalChain([onCopyAddress, 'optionalCall', _71 => _71()]);
1870
1969
  try {
1871
1970
  await navigator.clipboard.writeText(displayAddress);
1872
1971
  setCopied(true);
@@ -1959,7 +2058,7 @@ function DepositAddressStep({
1959
2058
  directTransfer
1960
2059
  };
1961
2060
  setNotifications((prev) => [notification, ...prev]);
1962
- _optionalChain([onDepositSubmittedRef, 'access', _66 => _66.current, 'optionalCall', _67 => _67({
2061
+ _optionalChain([onDepositSubmittedRef, 'access', _72 => _72.current, 'optionalCall', _73 => _73({
1963
2062
  txHash: eventTxHash,
1964
2063
  sourceChain: chainId,
1965
2064
  amount
@@ -1971,7 +2070,7 @@ function DepositAddressStep({
1971
2070
  if (!cancelled) {
1972
2071
  const msg = err instanceof Error ? err.message : "Failed to check status";
1973
2072
  setPollingError(msg);
1974
- _optionalChain([onErrorRef, 'access', _68 => _68.current, 'optionalCall', _69 => _69(msg, "STATUS_POLL_ERROR")]);
2073
+ _optionalChain([onErrorRef, 'access', _74 => _74.current, 'optionalCall', _75 => _75(msg, "STATUS_POLL_ERROR")]);
1975
2074
  }
1976
2075
  }
1977
2076
  if (!cancelled) {
@@ -1987,14 +2086,14 @@ function DepositAddressStep({
1987
2086
  const handleNotificationComplete = _react.useCallback.call(void 0,
1988
2087
  (txHash, destinationTxHash, context) => {
1989
2088
  isTrackingRef.current = false;
1990
- _optionalChain([onDepositCompleteRef, 'access', _70 => _70.current, 'optionalCall', _71 => _71(txHash, destinationTxHash, context)]);
2089
+ _optionalChain([onDepositCompleteRef, 'access', _76 => _76.current, 'optionalCall', _77 => _77(txHash, destinationTxHash, context)]);
1991
2090
  },
1992
2091
  []
1993
2092
  );
1994
2093
  const handleNotificationFailed = _react.useCallback.call(void 0,
1995
2094
  (txHash, error) => {
1996
2095
  isTrackingRef.current = false;
1997
- _optionalChain([onDepositFailedRef, 'access', _72 => _72.current, 'optionalCall', _73 => _73(txHash, error)]);
2096
+ _optionalChain([onDepositFailedRef, 'access', _78 => _78.current, 'optionalCall', _79 => _79(txHash, error)]);
1998
2097
  },
1999
2098
  []
2000
2099
  );
@@ -2072,7 +2171,28 @@ function DepositAddressStep({
2072
2171
  )) })
2073
2172
  ] }),
2074
2173
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: tokenDropdownRef, children: [
2075
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported token" }),
2174
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
2175
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
2176
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
2177
+ "Min $",
2178
+ _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _80 => _80.minDepositUsd]), () => ( 0.1)),
2179
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
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__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "9" }),
2190
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 8h.01M11 12h1v4h1" })
2191
+ ]
2192
+ }
2193
+ ) })
2194
+ ] })
2195
+ ] }),
2076
2196
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2077
2197
  "button",
2078
2198
  {
@@ -2183,6 +2303,103 @@ function DepositAddressStep({
2183
2303
  }
2184
2304
  )
2185
2305
  ] }),
2306
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2307
+ "div",
2308
+ {
2309
+ className: `rs-price-impact ${priceImpactExpanded ? "rs-price-impact--open" : ""}`,
2310
+ children: [
2311
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
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__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [
2320
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "9" }),
2321
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
2331
+ "Price impact: ",
2332
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" })
2333
+ ] }),
2334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsxs.call(void 0, "svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: [
2340
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "9" }),
2341
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 8h.01M11 12h1v4h1" })
2342
+ ] })
2343
+ }
2344
+ ),
2345
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsx.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-panel-inner", children: [
2361
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
2362
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [
2363
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "9" }),
2364
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
2374
+ "Max slippage: ",
2375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "Auto \u2022 0.1%" })
2376
+ ] }),
2377
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsxs.call(void 0, "svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: [
2383
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "9" }),
2384
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 8h.01M11 12h1v4h1" })
2385
+ ] })
2386
+ }
2387
+ )
2388
+ ] }),
2389
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
2390
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [
2391
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "9" }),
2392
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 7.5V12l2.5 2" })
2393
+ ] }) }),
2394
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
2395
+ "Processing time: ",
2396
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "< 1 min" })
2397
+ ] })
2398
+ ] })
2399
+ ] }) })
2400
+ ]
2401
+ }
2402
+ ),
2186
2403
  pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
2187
2404
  ] }) }),
2188
2405
  notifications.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notifications", children: notifications.map((deposit) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2285,7 +2502,7 @@ function SolanaTokenSelectStep({
2285
2502
  setTokenBalances(results);
2286
2503
  setLoading(false);
2287
2504
  const totalUsd = results.reduce((sum, r) => sum + r.balanceUsd, 0);
2288
- _optionalChain([onTotalBalanceComputed, 'optionalCall', _74 => _74(totalUsd)]);
2505
+ _optionalChain([onTotalBalanceComputed, 'optionalCall', _81 => _81(totalUsd)]);
2289
2506
  }
2290
2507
  void loadBalances();
2291
2508
  return () => {
@@ -2532,13 +2749,13 @@ function SolanaAmountStep({
2532
2749
  const sourceAmount = isSourceStablecoin || !hasPricing ? numericAmount : numericAmount / tokenPriceUsd;
2533
2750
  if (hasPricing) {
2534
2751
  const usdValue = numericAmount;
2535
- if (_optionalChain([uiConfig, 'optionalAccess', _75 => _75.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
2752
+ if (_optionalChain([uiConfig, 'optionalAccess', _82 => _82.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
2536
2753
  setError(
2537
2754
  `Maximum deposit is ${_chunkFLVSQDP4cjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
2538
2755
  );
2539
2756
  return;
2540
2757
  }
2541
- if (_optionalChain([uiConfig, 'optionalAccess', _76 => _76.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
2758
+ if (_optionalChain([uiConfig, 'optionalAccess', _83 => _83.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
2542
2759
  setAmount(uiConfig.minDepositUsd.toString());
2543
2760
  setError(null);
2544
2761
  return;
@@ -2639,7 +2856,7 @@ function SolanaAmountStep({
2639
2856
  }
2640
2857
  )
2641
2858
  ] }),
2642
- _optionalChain([uiConfig, 'optionalAccess', _77 => _77.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
2859
+ _optionalChain([uiConfig, 'optionalAccess', _84 => _84.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
2643
2860
  _chunkFLVSQDP4cjs.currencyFormatter.format(uiConfig.minDepositUsd),
2644
2861
  " minimum deposit"
2645
2862
  ] }),
@@ -2671,7 +2888,7 @@ function SolanaAmountStep({
2671
2888
  onClick: handleContinue,
2672
2889
  fullWidth: true,
2673
2890
  disabled: !amount,
2674
- children: _optionalChain([uiConfig, 'optionalAccess', _78 => _78.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
2891
+ children: _optionalChain([uiConfig, 'optionalAccess', _85 => _85.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
2675
2892
  }
2676
2893
  ) }),
2677
2894
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFLVSQDP4cjs.PoweredBy, {})
@@ -2778,7 +2995,7 @@ function SolanaConfirmStep({
2778
2995
  _chunkFLVSQDP4cjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
2779
2996
  token: token.symbol,
2780
2997
  instructionCount: transaction.instructions.length,
2781
- feePayer: _optionalChain([transaction, 'access', _79 => _79.feePayer, 'optionalAccess', _80 => _80.toBase58, 'call', _81 => _81()]),
2998
+ feePayer: _optionalChain([transaction, 'access', _86 => _86.feePayer, 'optionalAccess', _87 => _87.toBase58, 'call', _88 => _88()]),
2782
2999
  recentBlockhash: transaction.recentBlockhash
2783
3000
  });
2784
3001
  const txHash = await sendSolanaTransaction(
@@ -2800,7 +3017,7 @@ function SolanaConfirmStep({
2800
3017
  sourceAmount
2801
3018
  });
2802
3019
  setError(message);
2803
- _optionalChain([onError, 'optionalCall', _82 => _82(message, "SOLANA_TRANSFER_ERROR")]);
3020
+ _optionalChain([onError, 'optionalCall', _89 => _89(message, "SOLANA_TRANSFER_ERROR")]);
2804
3021
  } finally {
2805
3022
  setIsSubmitting(false);
2806
3023
  }
@@ -2997,7 +3214,7 @@ function DepositFlow({
2997
3214
  const onDepositFailedRef = _chunkFLVSQDP4cjs.useLatestRef.call(void 0, onDepositFailed);
2998
3215
  const onErrorRef = _chunkFLVSQDP4cjs.useLatestRef.call(void 0, onError);
2999
3216
  const hasInitialReownSession = Boolean(
3000
- enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _83 => _83.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _84 => _84.address]) : _optionalChain([reownWallet, 'optionalAccess', _85 => _85.address])
3217
+ enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _90 => _90.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _91 => _91.address]) : _optionalChain([reownWallet, 'optionalAccess', _92 => _92.address])
3001
3218
  );
3002
3219
  const hasInitialWalletHydrationPending = Boolean(
3003
3220
  dappAddress && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasInitialReownSession && !reownWallet.isReady)
@@ -3044,12 +3261,12 @@ function DepositFlow({
3044
3261
  return null;
3045
3262
  }, []);
3046
3263
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
3047
- if (!_optionalChain([dappWalletClient, 'optionalAccess', _86 => _86.switchChain])) return void 0;
3264
+ if (!_optionalChain([dappWalletClient, 'optionalAccess', _93 => _93.switchChain])) return void 0;
3048
3265
  return async (chainId) => {
3049
- await _optionalChain([dappWalletClient, 'access', _87 => _87.switchChain, 'optionalCall', _88 => _88({ id: chainId })]);
3266
+ await _optionalChain([dappWalletClient, 'access', _94 => _94.switchChain, 'optionalCall', _95 => _95({ id: chainId })]);
3050
3267
  };
3051
3268
  }, [dappWalletClient]);
3052
- const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _89 => _89.account, 'optionalAccess', _90 => _90.address]), () => ( null));
3269
+ const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _96 => _96.account, 'optionalAccess', _97 => _97.address]), () => ( null));
3053
3270
  const walletOptions = _react.useMemo.call(void 0, () => {
3054
3271
  const options = [];
3055
3272
  const seen = /* @__PURE__ */ new Set();
@@ -3063,7 +3280,7 @@ function DepositFlow({
3063
3280
  });
3064
3281
  seen.add(id);
3065
3282
  }
3066
- if (enableSolana && _optionalChain([reownWallet, 'optionalAccess', _91 => _91.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
3283
+ if (enableSolana && _optionalChain([reownWallet, 'optionalAccess', _98 => _98.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
3067
3284
  const id = _nullishCoalesce(reownWallet.caipAddress, () => ( `solana:${reownWallet.solanaAddress}`));
3068
3285
  if (!seen.has(id)) {
3069
3286
  options.push({
@@ -3075,7 +3292,7 @@ function DepositFlow({
3075
3292
  });
3076
3293
  seen.add(id);
3077
3294
  }
3078
- } else if (_optionalChain([reownWallet, 'optionalAccess', _92 => _92.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
3295
+ } else if (_optionalChain([reownWallet, 'optionalAccess', _99 => _99.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
3079
3296
  const id = `evm:${reownWallet.address.toLowerCase()}`;
3080
3297
  if (!seen.has(id)) {
3081
3298
  options.push({
@@ -3092,20 +3309,20 @@ function DepositFlow({
3092
3309
  }, [
3093
3310
  connectedWalletAddress,
3094
3311
  dappAddress,
3095
- _optionalChain([reownWallet, 'optionalAccess', _93 => _93.address]),
3096
- _optionalChain([reownWallet, 'optionalAccess', _94 => _94.isConnected]),
3097
- _optionalChain([reownWallet, 'optionalAccess', _95 => _95.walletClient]),
3098
- _optionalChain([reownWallet, 'optionalAccess', _96 => _96.publicClient]),
3099
- _optionalChain([reownWallet, 'optionalAccess', _97 => _97.icon]),
3312
+ _optionalChain([reownWallet, 'optionalAccess', _100 => _100.address]),
3313
+ _optionalChain([reownWallet, 'optionalAccess', _101 => _101.isConnected]),
3314
+ _optionalChain([reownWallet, 'optionalAccess', _102 => _102.walletClient]),
3315
+ _optionalChain([reownWallet, 'optionalAccess', _103 => _103.publicClient]),
3316
+ _optionalChain([reownWallet, 'optionalAccess', _104 => _104.icon]),
3100
3317
  enableSolana,
3101
- _optionalChain([reownWallet, 'optionalAccess', _98 => _98.isSolana]),
3102
- _optionalChain([reownWallet, 'optionalAccess', _99 => _99.solanaAddress]),
3103
- _optionalChain([reownWallet, 'optionalAccess', _100 => _100.caipAddress])
3318
+ _optionalChain([reownWallet, 'optionalAccess', _105 => _105.isSolana]),
3319
+ _optionalChain([reownWallet, 'optionalAccess', _106 => _106.solanaAddress]),
3320
+ _optionalChain([reownWallet, 'optionalAccess', _107 => _107.caipAddress])
3104
3321
  ]);
3105
- const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _101 => _101.account]) && dappAddress && !reownWallet;
3322
+ const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _108 => _108.account]) && dappAddress && !reownWallet;
3106
3323
  const hasWalletOptions = walletOptions.length > 0;
3107
3324
  const hasReownSession = Boolean(
3108
- enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _102 => _102.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _103 => _103.address]) : _optionalChain([reownWallet, 'optionalAccess', _104 => _104.address])
3325
+ enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _109 => _109.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _110 => _110.address]) : _optionalChain([reownWallet, 'optionalAccess', _111 => _111.address])
3109
3326
  );
3110
3327
  const isWalletHydrationPending = Boolean(
3111
3328
  dappAddress && !hasWalletOptions && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady)
@@ -3150,7 +3367,7 @@ function DepositFlow({
3150
3367
  };
3151
3368
  }
3152
3369
  if (canAutoLock) {
3153
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _105 => _105.chain, 'optionalAccess', _106 => _106.id]), () => ( targetChain));
3370
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _112 => _112.chain, 'optionalAccess', _113 => _113.id]), () => ( targetChain));
3154
3371
  return {
3155
3372
  ownerAddress: dappWalletClient.account.address,
3156
3373
  walletClient: dappWalletClient,
@@ -3172,8 +3389,8 @@ function DepositFlow({
3172
3389
  switchChain: void 0
3173
3390
  };
3174
3391
  }
3175
- if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _107 => _107.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
3176
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _108 => _108.chain, 'optionalAccess', _109 => _109.id]), () => ( targetChain));
3392
+ if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _114 => _114.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
3393
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _115 => _115.chain, 'optionalAccess', _116 => _116.id]), () => ( targetChain));
3177
3394
  return {
3178
3395
  ownerAddress: dappWalletClient.account.address,
3179
3396
  walletClient: dappWalletClient,
@@ -3181,7 +3398,7 @@ function DepositFlow({
3181
3398
  switchChain: dappSwitchChain
3182
3399
  };
3183
3400
  }
3184
- if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _110 => _110.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
3401
+ if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _117 => _117.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
3185
3402
  return {
3186
3403
  ownerAddress: reownWallet.address,
3187
3404
  walletClient: reownWallet.walletClient,
@@ -3245,7 +3462,7 @@ function DepositFlow({
3245
3462
  walletSignerContext,
3246
3463
  walletSelectionKey
3247
3464
  ]);
3248
- const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _111 => _111.ownerAddress]))), () => ( null));
3465
+ const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _118 => _118.ownerAddress]))), () => ( null));
3249
3466
  const lastTargetRef = _react.useRef.call(void 0, null);
3250
3467
  _react.useEffect.call(void 0, () => {
3251
3468
  const prev = lastTargetRef.current;
@@ -3322,7 +3539,7 @@ function DepositFlow({
3322
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;
3323
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;
3324
3541
  _react.useEffect.call(void 0, () => {
3325
- _optionalChain([onStepChangeRef, 'access', _112 => _112.current, 'optionalCall', _113 => _113(stepIndex, currentBackHandler)]);
3542
+ _optionalChain([onStepChangeRef, 'access', _119 => _119.current, 'optionalCall', _120 => _120(stepIndex, currentBackHandler)]);
3326
3543
  }, [stepIndex, currentBackHandler, onStepChangeRef]);
3327
3544
  const stepSendToken = step.type === "amount" ? step.asset.symbol : null;
3328
3545
  const stepOpenEventKey = step.type === "select-asset" ? "select-asset" : step.type === "deposit-address" ? "deposit-address" : step.type === "amount" && stepSendToken ? `amount:${stepSendToken.toLowerCase()}` : null;
@@ -3337,7 +3554,7 @@ function DepositFlow({
3337
3554
  }
3338
3555
  lastStepOpenEventKeyRef.current = stepOpenEventKey;
3339
3556
  if (step.type === "select-asset") {
3340
- _optionalChain([onEventRef, 'access', _114 => _114.current, 'optionalCall', _115 => _115({
3557
+ _optionalChain([onEventRef, 'access', _121 => _121.current, 'optionalCall', _122 => _122({
3341
3558
  type: "deposit_modal_connected_wallet_select_source_open",
3342
3559
  total_balance_in_external_wallet: totalBalanceUsd,
3343
3560
  pred_balance: totalBalanceUsd
@@ -3345,7 +3562,7 @@ function DepositFlow({
3345
3562
  } else if (step.type === "deposit-address") {
3346
3563
  const chainName = _chunkMUWVDVY4cjs.getChainName.call(void 0, targetChain);
3347
3564
  const tokenSymbol = _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
3348
- _optionalChain([onEventRef, 'access', _116 => _116.current, 'optionalCall', _117 => _117({
3565
+ _optionalChain([onEventRef, 'access', _123 => _123.current, 'optionalCall', _124 => _124({
3349
3566
  type: "deposit_modal_transfer_crypto_open",
3350
3567
  default_chain: chainName,
3351
3568
  default_token: tokenSymbol,
@@ -3353,7 +3570,7 @@ function DepositFlow({
3353
3570
  })]);
3354
3571
  } else if (step.type === "amount" && stepSendToken) {
3355
3572
  const receiveSymbol = _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
3356
- _optionalChain([onEventRef, 'access', _118 => _118.current, 'optionalCall', _119 => _119({
3573
+ _optionalChain([onEventRef, 'access', _125 => _125.current, 'optionalCall', _126 => _126({
3357
3574
  type: "deposit_modal_connected_wallet_enter_value_open",
3358
3575
  send_token: stepSendToken,
3359
3576
  receive_token: receiveSymbol,
@@ -3386,7 +3603,7 @@ function DepositFlow({
3386
3603
  targetToken
3387
3604
  ]);
3388
3605
  _react.useEffect.call(void 0, () => {
3389
- _optionalChain([onTotalBalanceChangeRef, 'access', _120 => _120.current, 'optionalCall', _121 => _121(totalBalanceUsd)]);
3606
+ _optionalChain([onTotalBalanceChangeRef, 'access', _127 => _127.current, 'optionalCall', _128 => _128(totalBalanceUsd)]);
3390
3607
  }, [totalBalanceUsd, onTotalBalanceChangeRef]);
3391
3608
  const isDepositAddressMode = flowMode === "deposit-address";
3392
3609
  const isSolanaWalletMode = flowMode === "solana-wallet";
@@ -3401,7 +3618,7 @@ function DepositFlow({
3401
3618
  setStep({ type: "setup" });
3402
3619
  }, []);
3403
3620
  const handleNewDeposit = _react.useCallback.call(void 0, () => {
3404
- _optionalChain([onSmartAccountChangeRef, 'access', _122 => _122.current, 'optionalCall', _123 => _123(null)]);
3621
+ _optionalChain([onSmartAccountChangeRef, 'access', _129 => _129.current, 'optionalCall', _130 => _130(null)]);
3405
3622
  setFlowMode(null);
3406
3623
  setStep({ type: "setup" });
3407
3624
  setIsConnectSelectionConfirmed(false);
@@ -3415,7 +3632,7 @@ function DepositFlow({
3415
3632
  hasSolanaDepositAddress: Boolean(solanaDepositAddress),
3416
3633
  flowMode: isDepositAddressMode ? "deposit-address" : isSolanaWalletMode ? "solana-wallet" : "wallet"
3417
3634
  });
3418
- _optionalChain([onSmartAccountChangeRef, 'access', _124 => _124.current, 'optionalCall', _125 => _125(smartAccount)]);
3635
+ _optionalChain([onSmartAccountChangeRef, 'access', _131 => _131.current, 'optionalCall', _132 => _132(smartAccount)]);
3419
3636
  if (isDepositAddressMode) {
3420
3637
  setStep({
3421
3638
  type: "deposit-address",
@@ -3430,7 +3647,7 @@ function DepositFlow({
3430
3647
  solanaDepositAddress
3431
3648
  });
3432
3649
  } else {
3433
- _optionalChain([onError, 'optionalCall', _126 => _126({
3650
+ _optionalChain([onError, 'optionalCall', _133 => _133({
3434
3651
  message: "Solana deposit address not available. Please try again.",
3435
3652
  code: "SOLANA_SETUP_FAILED"
3436
3653
  })]);
@@ -3448,7 +3665,7 @@ function DepositFlow({
3448
3665
  sourceChain: data.sourceChain,
3449
3666
  amount: data.amount
3450
3667
  });
3451
- _optionalChain([onDepositSubmittedRef, 'access', _127 => _127.current, 'optionalCall', _128 => _128(data)]);
3668
+ _optionalChain([onDepositSubmittedRef, 'access', _134 => _134.current, 'optionalCall', _135 => _135(data)]);
3452
3669
  },
3453
3670
  [logFlow, onDepositSubmittedRef]
3454
3671
  );
@@ -3520,7 +3737,7 @@ function DepositFlow({
3520
3737
  sourceDecimals: prev.token.decimals
3521
3738
  };
3522
3739
  });
3523
- _optionalChain([onDepositSubmitted, 'optionalCall', _129 => _129({
3740
+ _optionalChain([onDepositSubmitted, 'optionalCall', _136 => _136({
3524
3741
  txHash,
3525
3742
  sourceChain: "solana",
3526
3743
  amount: amountUnits
@@ -3530,13 +3747,13 @@ function DepositFlow({
3530
3747
  );
3531
3748
  const handleConnected = _react.useCallback.call(void 0,
3532
3749
  (addr, smartAccount) => {
3533
- _optionalChain([onConnected, 'optionalCall', _130 => _130({ address: addr, smartAccount })]);
3750
+ _optionalChain([onConnected, 'optionalCall', _137 => _137({ address: addr, smartAccount })]);
3534
3751
  },
3535
3752
  [onConnected]
3536
3753
  );
3537
3754
  const handleAssetContinue = _react.useCallback.call(void 0,
3538
3755
  (asset) => {
3539
- _optionalChain([onEvent, 'optionalCall', _131 => _131({
3756
+ _optionalChain([onEvent, 'optionalCall', _138 => _138({
3540
3757
  type: "deposit_modal_connected_wallet_select_source_cta_click",
3541
3758
  total_balance_in_external_wallet: totalBalanceUsd,
3542
3759
  pred_balance: totalBalanceUsd,
@@ -3601,28 +3818,28 @@ function DepositFlow({
3601
3818
  );
3602
3819
  const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
3603
3820
  (txHash, sourceChain, amount) => {
3604
- _optionalChain([onDepositSubmittedRef, 'access', _132 => _132.current, 'optionalCall', _133 => _133({ txHash, sourceChain, amount })]);
3821
+ _optionalChain([onDepositSubmittedRef, 'access', _139 => _139.current, 'optionalCall', _140 => _140({ txHash, sourceChain, amount })]);
3605
3822
  },
3606
3823
  [onDepositSubmittedRef]
3607
3824
  );
3608
3825
  const handleDepositComplete = _react.useCallback.call(void 0,
3609
3826
  (txHash, destinationTxHash, context) => {
3610
3827
  logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
3611
- _optionalChain([onDepositCompleteRef, 'access', _134 => _134.current, 'optionalCall', _135 => _135({ txHash, destinationTxHash, ...context })]);
3828
+ _optionalChain([onDepositCompleteRef, 'access', _141 => _141.current, 'optionalCall', _142 => _142({ txHash, destinationTxHash, ...context })]);
3612
3829
  },
3613
3830
  [logFlow, onDepositCompleteRef]
3614
3831
  );
3615
3832
  const handleDepositFailed = _react.useCallback.call(void 0,
3616
3833
  (txHash, error) => {
3617
3834
  logFlowError("deposit:failed", error, { txHash });
3618
- _optionalChain([onDepositFailedRef, 'access', _136 => _136.current, 'optionalCall', _137 => _137({ txHash, error })]);
3835
+ _optionalChain([onDepositFailedRef, 'access', _143 => _143.current, 'optionalCall', _144 => _144({ txHash, error })]);
3619
3836
  },
3620
3837
  [logFlowError, onDepositFailedRef]
3621
3838
  );
3622
3839
  const handleError = _react.useCallback.call(void 0,
3623
3840
  (message, code) => {
3624
3841
  logFlowError("flow:error", message, { code });
3625
- _optionalChain([onErrorRef, 'access', _138 => _138.current, 'optionalCall', _139 => _139({ message, code })]);
3842
+ _optionalChain([onErrorRef, 'access', _145 => _145.current, 'optionalCall', _146 => _146({ message, code })]);
3626
3843
  },
3627
3844
  [logFlowError, onErrorRef]
3628
3845
  );
@@ -3679,7 +3896,7 @@ function DepositFlow({
3679
3896
  if (walletId) {
3680
3897
  const selectedOption = walletOptions.find((o) => o.id === walletId);
3681
3898
  setSelectedWalletId(walletId);
3682
- if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _140 => _140.kind]) === "solana") {
3899
+ if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _147 => _147.kind]) === "solana") {
3683
3900
  handleSelectSolanaWallet();
3684
3901
  } else {
3685
3902
  handleSelectProvider();
@@ -3728,7 +3945,7 @@ function DepositFlow({
3728
3945
  const selectedOption = walletOptions.find(
3729
3946
  (o) => o.id === selectedWalletIdEffective
3730
3947
  );
3731
- if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _141 => _141.kind]) === "solana") {
3948
+ if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _148 => _148.kind]) === "solana") {
3732
3949
  handleSelectSolanaWallet();
3733
3950
  } else {
3734
3951
  handleSelectProvider();
@@ -3772,14 +3989,15 @@ function DepositFlow({
3772
3989
  targetChain,
3773
3990
  targetToken,
3774
3991
  waitForFinalTx,
3775
- hasPostBridgeActions: Boolean(_optionalChain([postBridgeActions, 'optionalAccess', _142 => _142.length])),
3992
+ hasPostBridgeActions: Boolean(_optionalChain([postBridgeActions, 'optionalAccess', _149 => _149.length])),
3993
+ uiConfig,
3776
3994
  onDepositSubmitted: handleDepositAddressSubmitted,
3777
3995
  onDepositComplete: handleDepositComplete,
3778
3996
  onDepositFailed: handleDepositFailed,
3779
3997
  onCopyAddress: () => {
3780
3998
  const chainName = _chunkMUWVDVY4cjs.getChainName.call(void 0, targetChain);
3781
3999
  const tokenSymbol = _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
3782
- _optionalChain([onEvent, 'optionalCall', _143 => _143({
4000
+ _optionalChain([onEvent, 'optionalCall', _150 => _150({
3783
4001
  type: "deposit_modal_transfer_crypto_cta_click",
3784
4002
  default_chain: chainName,
3785
4003
  default_token: tokenSymbol,
@@ -3795,8 +4013,8 @@ function DepositFlow({
3795
4013
  }
3796
4014
  if (isSolanaWalletMode) {
3797
4015
  if (!sessionKeyAddress) return null;
3798
- const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _144 => _144.solanaAddress]);
3799
- const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _145 => _145.solanaProvider]);
4016
+ const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _151 => _151.solanaAddress]);
4017
+ const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _152 => _152.solanaProvider]);
3800
4018
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
3801
4019
  step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3802
4020
  SetupStep,
@@ -3906,7 +4124,7 @@ function DepositFlow({
3906
4124
  sourceSymbol: step.sourceSymbol,
3907
4125
  sourceDecimals: step.sourceDecimals,
3908
4126
  waitForFinalTx,
3909
- hasPostBridgeActions: Boolean(_optionalChain([postBridgeActions, 'optionalAccess', _146 => _146.length])),
4127
+ hasPostBridgeActions: Boolean(_optionalChain([postBridgeActions, 'optionalAccess', _153 => _153.length])),
3910
4128
  service,
3911
4129
  directTransfer: step.directTransfer,
3912
4130
  onClose,
@@ -3919,13 +4137,13 @@ function DepositFlow({
3919
4137
  )
3920
4138
  ] });
3921
4139
  }
3922
- if (!_optionalChain([signerContext, 'optionalAccess', _147 => _147.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _148 => _148.publicClient])) {
4140
+ if (!_optionalChain([signerContext, 'optionalAccess', _154 => _154.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _155 => _155.publicClient])) {
3923
4141
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-state", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Connecting wallet..." }) }) }) }) });
3924
4142
  }
3925
4143
  const ownerAddress = signerContext.ownerAddress;
3926
- const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _149 => _149.walletClient, 'optionalAccess', _150 => _150.chain, 'optionalAccess', _151 => _151.id]), () => ( _optionalChain([signerContext, 'access', _152 => _152.publicClient, 'access', _153 => _153.chain, 'optionalAccess', _154 => _154.id]))), () => ( targetChain));
4144
+ const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _156 => _156.walletClient, 'optionalAccess', _157 => _157.chain, 'optionalAccess', _158 => _158.id]), () => ( _optionalChain([signerContext, 'access', _159 => _159.publicClient, 'access', _160 => _160.chain, 'optionalAccess', _161 => _161.id]))), () => ( targetChain));
3927
4145
  const getReadClientForChain = (chainId) => {
3928
- if (_optionalChain([signerContext, 'access', _155 => _155.publicClient, 'access', _156 => _156.chain, 'optionalAccess', _157 => _157.id]) === chainId) {
4146
+ if (_optionalChain([signerContext, 'access', _162 => _162.publicClient, 'access', _163 => _163.chain, 'optionalAccess', _164 => _164.id]) === chainId) {
3929
4147
  return signerContext.publicClient;
3930
4148
  }
3931
4149
  return _chunkFLVSQDP4cjs.getPublicClient.call(void 0, chainId);
@@ -3985,7 +4203,7 @@ function DepositFlow({
3985
4203
  onContinue: handleAmountContinue,
3986
4204
  onCtaClick: (ctaName) => {
3987
4205
  const receiveSymbol = _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
3988
- _optionalChain([onEvent, 'optionalCall', _158 => _158({
4206
+ _optionalChain([onEvent, 'optionalCall', _165 => _165({
3989
4207
  type: "deposit_modal_connected_wallet_enter_value_cta_click",
3990
4208
  send_token: step.asset.symbol,
3991
4209
  receive_token: receiveSymbol,
@@ -4028,7 +4246,7 @@ function DepositFlow({
4028
4246
  sourceSymbol: step.sourceSymbol,
4029
4247
  sourceDecimals: step.sourceDecimals,
4030
4248
  waitForFinalTx,
4031
- hasPostBridgeActions: Boolean(_optionalChain([postBridgeActions, 'optionalAccess', _159 => _159.length])),
4249
+ hasPostBridgeActions: Boolean(_optionalChain([postBridgeActions, 'optionalAccess', _166 => _166.length])),
4032
4250
  service,
4033
4251
  directTransfer: step.directTransfer,
4034
4252
  onClose,
@@ -4308,7 +4526,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
4308
4526
  // src/DepositModal.tsx
4309
4527
 
4310
4528
  var ReownDepositInner = _react.lazy.call(void 0,
4311
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-UPYZN2XA.cjs"))).then((m) => ({ default: m.DepositModalReown }))
4529
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-WXFTSZSK.cjs"))).then((m) => ({ default: m.DepositModalReown }))
4312
4530
  );
4313
4531
  function DepositModal(props) {
4314
4532
  const needsReown = !!props.reownAppId;
@@ -4383,7 +4601,7 @@ function DepositModalInner({
4383
4601
  const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
4384
4602
  const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
4385
4603
  const backHandlerRef = _react.useRef.call(void 0, void 0);
4386
- const showHistoryButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _160 => _160.showHistoryButton]), () => ( false));
4604
+ const showHistoryButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _167 => _167.showHistoryButton]), () => ( false));
4387
4605
  const [activeSmartAccount, setActiveSmartAccount] = _react.useState.call(void 0, null);
4388
4606
  const [historyOpen, setHistoryOpen] = _react.useState.call(void 0, false);
4389
4607
  const [historyDeposits, setHistoryDeposits] = _react.useState.call(void 0, []);
@@ -4412,7 +4630,7 @@ function DepositModalInner({
4412
4630
  }, [solanaRpcUrl]);
4413
4631
  _react.useEffect.call(void 0, () => {
4414
4632
  if (isOpen) {
4415
- _optionalChain([onReadyRef, 'access', _161 => _161.current, 'optionalCall', _162 => _162()]);
4633
+ _optionalChain([onReadyRef, 'access', _168 => _168.current, 'optionalCall', _169 => _169()]);
4416
4634
  }
4417
4635
  }, [isOpen, onReadyRef]);
4418
4636
  _react.useEffect.call(void 0, () => {
@@ -4431,7 +4649,7 @@ function DepositModalInner({
4431
4649
  setTotalBalanceUsd(balance2);
4432
4650
  }, []);
4433
4651
  const handleBack = _react.useCallback.call(void 0, () => {
4434
- _optionalChain([backHandlerRef, 'access', _163 => _163.current, 'optionalCall', _164 => _164()]);
4652
+ _optionalChain([backHandlerRef, 'access', _170 => _170.current, 'optionalCall', _171 => _171()]);
4435
4653
  }, []);
4436
4654
  const handleSmartAccountChange = _react.useCallback.call(void 0,
4437
4655
  (account) => {
@@ -4505,21 +4723,21 @@ function DepositModalInner({
4505
4723
  const onDepositFailedRef = _chunkFLVSQDP4cjs.useLatestRef.call(void 0, onDepositFailed);
4506
4724
  const handleDepositSubmitted = _react.useCallback.call(void 0,
4507
4725
  (data) => {
4508
- _optionalChain([onDepositSubmittedRef, 'access', _165 => _165.current, 'optionalCall', _166 => _166(data)]);
4726
+ _optionalChain([onDepositSubmittedRef, 'access', _172 => _172.current, 'optionalCall', _173 => _173(data)]);
4509
4727
  if (showHistoryButton) markHistoryStale();
4510
4728
  },
4511
4729
  [onDepositSubmittedRef, showHistoryButton, markHistoryStale]
4512
4730
  );
4513
4731
  const handleDepositComplete = _react.useCallback.call(void 0,
4514
4732
  (data) => {
4515
- _optionalChain([onDepositCompleteRef, 'access', _167 => _167.current, 'optionalCall', _168 => _168(data)]);
4733
+ _optionalChain([onDepositCompleteRef, 'access', _174 => _174.current, 'optionalCall', _175 => _175(data)]);
4516
4734
  if (showHistoryButton) markHistoryStale();
4517
4735
  },
4518
4736
  [onDepositCompleteRef, showHistoryButton, markHistoryStale]
4519
4737
  );
4520
4738
  const handleDepositFailed = _react.useCallback.call(void 0,
4521
4739
  (data) => {
4522
- _optionalChain([onDepositFailedRef, 'access', _169 => _169.current, 'optionalCall', _170 => _170(data)]);
4740
+ _optionalChain([onDepositFailedRef, 'access', _176 => _176.current, 'optionalCall', _177 => _177(data)]);
4523
4741
  if (showHistoryButton) markHistoryStale();
4524
4742
  },
4525
4743
  [onDepositFailedRef, showHistoryButton, markHistoryStale]
@@ -4535,12 +4753,12 @@ function DepositModalInner({
4535
4753
  historyLoadedRef.current = false;
4536
4754
  }
4537
4755
  }, [isOpen]);
4538
- const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _171 => _171.showLogo]), () => ( false));
4539
- const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _172 => _172.showStepper]), () => ( false));
4540
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _173 => _173.showBackButton]), () => ( true));
4541
- const balance = _optionalChain([uiConfig, 'optionalAccess', _174 => _174.balance]);
4542
- const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _175 => _175.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
4543
- const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _176 => _176.title]), () => ( "Deposit"));
4756
+ const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _178 => _178.showLogo]), () => ( false));
4757
+ const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _179 => _179.showStepper]), () => ( false));
4758
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _180 => _180.showBackButton]), () => ( true));
4759
+ const balance = _optionalChain([uiConfig, 'optionalAccess', _181 => _181.balance]);
4760
+ const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _182 => _182.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
4761
+ const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _183 => _183.title]), () => ( "Deposit"));
4544
4762
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
4545
4763
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4546
4764
  _chunkFLVSQDP4cjs.Modal,