@rhinestone/deposit-modal 0.4.3 → 0.5.1

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.
@@ -1395,31 +1395,57 @@ function formatUserError(raw) {
1395
1395
  return cleaned;
1396
1396
  }
1397
1397
 
1398
+ // src/core/rpc.ts
1399
+
1400
+ function rpcUrlFor(rpcUrls, chain) {
1401
+ const url = _optionalChain([rpcUrls, 'optionalAccess', _50 => _50[chain], 'optionalAccess', _51 => _51.trim, 'call', _52 => _52()]);
1402
+ return url ? url : void 0;
1403
+ }
1404
+ var RpcUrlsContext = _react.createContext.call(void 0, void 0);
1405
+ var RpcUrlsProvider = RpcUrlsContext.Provider;
1406
+ function useRpcUrls() {
1407
+ return _react.useContext.call(void 0, RpcUrlsContext);
1408
+ }
1409
+ function rpcUrlsKey(rpcUrls) {
1410
+ if (!rpcUrls) return "";
1411
+ return Object.entries(rpcUrls).map(([chain, url]) => [chain, _nullishCoalesce(_optionalChain([url, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()]), () => ( ""))]).filter(([, url]) => url !== "").map(([chain, url]) => `${chain}=${url}`).sort().join("|");
1412
+ }
1413
+ function useStableRpcUrls(rpcUrls) {
1414
+ const key = rpcUrlsKey(rpcUrls);
1415
+ return _react.useMemo.call(void 0, () => rpcUrls, [key]);
1416
+ }
1417
+
1398
1418
  // src/core/public-client.ts
1399
1419
  var _viem = require('viem');
1400
1420
  var _chains = require('viem/chains');
1401
1421
  var clientCache = /* @__PURE__ */ new Map();
1402
- function getPublicClient(chainId) {
1403
- let client = clientCache.get(chainId);
1422
+ function getPublicClient(chainId, rpcUrls) {
1423
+ const url = rpcUrlFor(rpcUrls, chainId);
1424
+ const cacheKey = `${chainId}|${_nullishCoalesce(url, () => ( ""))}`;
1425
+ let client = clientCache.get(cacheKey);
1404
1426
  if (!client) {
1405
1427
  const chain = _chunkABVRVW3Pcjs.CHAIN_BY_ID[chainId];
1406
1428
  client = _viem.createPublicClient.call(void 0, {
1407
1429
  chain,
1408
- transport: _viem.http.call(void 0, )
1430
+ transport: _viem.http.call(void 0, url)
1409
1431
  });
1410
- clientCache.set(chainId, client);
1432
+ clientCache.set(cacheKey, client);
1411
1433
  }
1412
1434
  return client;
1413
1435
  }
1414
- var hyperEvmClient;
1415
- function getHyperEvmReadClient() {
1416
- if (!hyperEvmClient) {
1417
- hyperEvmClient = _viem.createPublicClient.call(void 0, {
1436
+ var hyperEvmClientCache = /* @__PURE__ */ new Map();
1437
+ function getHyperEvmReadClient(rpcUrls) {
1438
+ const url = rpcUrlFor(rpcUrls, _chains.hyperliquid.id);
1439
+ const cacheKey = _nullishCoalesce(url, () => ( ""));
1440
+ let client = hyperEvmClientCache.get(cacheKey);
1441
+ if (!client) {
1442
+ client = _viem.createPublicClient.call(void 0, {
1418
1443
  chain: _chains.hyperliquid,
1419
- transport: _viem.http.call(void 0, )
1444
+ transport: _viem.http.call(void 0, url)
1420
1445
  });
1446
+ hyperEvmClientCache.set(cacheKey, client);
1421
1447
  }
1422
- return hyperEvmClient;
1448
+ return client;
1423
1449
  }
1424
1450
 
1425
1451
  // src/core/theme.ts
@@ -1524,19 +1550,19 @@ var CUSTOM_PRIMARY_VARS = [
1524
1550
  function applyTheme(element, theme) {
1525
1551
  if (!element) return;
1526
1552
  const parent = element.parentElement;
1527
- const targets = _optionalChain([parent, 'optionalAccess', _50 => _50.classList, 'access', _51 => _51.contains, 'call', _52 => _52("rs-modal-content")]) ? [element, parent] : [element];
1528
- if (_optionalChain([theme, 'optionalAccess', _53 => _53.mode])) {
1553
+ const targets = _optionalChain([parent, 'optionalAccess', _55 => _55.classList, 'access', _56 => _56.contains, 'call', _57 => _57("rs-modal-content")]) ? [element, parent] : [element];
1554
+ if (_optionalChain([theme, 'optionalAccess', _58 => _58.mode])) {
1529
1555
  for (const t of targets) t.setAttribute("data-theme", theme.mode);
1530
1556
  } else {
1531
1557
  for (const t of targets) t.removeAttribute("data-theme");
1532
1558
  }
1533
- if (_optionalChain([theme, 'optionalAccess', _54 => _54.fontColor])) {
1559
+ if (_optionalChain([theme, 'optionalAccess', _59 => _59.fontColor])) {
1534
1560
  setVar(targets, "--rs-foreground", theme.fontColor);
1535
1561
  }
1536
- if (_optionalChain([theme, 'optionalAccess', _55 => _55.iconColor])) {
1562
+ if (_optionalChain([theme, 'optionalAccess', _60 => _60.iconColor])) {
1537
1563
  setVar(targets, "--rs-icon", theme.iconColor);
1538
1564
  }
1539
- if (_optionalChain([theme, 'optionalAccess', _56 => _56.ctaColor])) {
1565
+ if (_optionalChain([theme, 'optionalAccess', _61 => _61.ctaColor])) {
1540
1566
  const derived = deriveCustomPrimary(theme.ctaColor);
1541
1567
  if (derived) {
1542
1568
  setVar(targets, "--rs-primary", derived.base);
@@ -1561,18 +1587,18 @@ function applyTheme(element, theme) {
1561
1587
  }
1562
1588
  } else {
1563
1589
  for (const v of CUSTOM_PRIMARY_VARS) clearVar(targets, v);
1564
- if (_optionalChain([theme, 'optionalAccess', _57 => _57.ctaHoverColor])) {
1590
+ if (_optionalChain([theme, 'optionalAccess', _62 => _62.ctaHoverColor])) {
1565
1591
  setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
1566
1592
  }
1567
1593
  }
1568
- if (_optionalChain([theme, 'optionalAccess', _58 => _58.borderColor])) {
1594
+ if (_optionalChain([theme, 'optionalAccess', _63 => _63.borderColor])) {
1569
1595
  setVar(targets, "--rs-border", theme.borderColor);
1570
1596
  setVar(targets, "--rs-border-surface", theme.borderColor);
1571
1597
  }
1572
- if (_optionalChain([theme, 'optionalAccess', _59 => _59.backgroundColor])) {
1598
+ if (_optionalChain([theme, 'optionalAccess', _64 => _64.backgroundColor])) {
1573
1599
  setVar(targets, "--rs-background", theme.backgroundColor);
1574
1600
  }
1575
- if (_optionalChain([theme, 'optionalAccess', _60 => _60.radius])) {
1601
+ if (_optionalChain([theme, 'optionalAccess', _65 => _65.radius])) {
1576
1602
  const scale = RADIUS_SCALE[theme.radius];
1577
1603
  setVar(targets, "--rs-radius-sm", scale.sm);
1578
1604
  setVar(targets, "--rs-radius-md", scale.md);
@@ -1755,7 +1781,7 @@ function ListRow({
1755
1781
  if (disabled) return;
1756
1782
  if (e.key === "Enter" || e.key === " ") {
1757
1783
  e.preventDefault();
1758
- _optionalChain([onClick, 'optionalCall', _61 => _61(e)]);
1784
+ _optionalChain([onClick, 'optionalCall', _66 => _66(e)]);
1759
1785
  }
1760
1786
  };
1761
1787
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1765,7 +1791,7 @@ function ListRow({
1765
1791
  role: "button",
1766
1792
  tabIndex: disabled ? -1 : 0,
1767
1793
  "aria-disabled": disabled || void 0,
1768
- onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _62 => _62(e)]),
1794
+ onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _67 => _67(e)]),
1769
1795
  onKeyDown: handleKey,
1770
1796
  children: inner
1771
1797
  }
@@ -2386,7 +2412,7 @@ function ConnectStep({
2386
2412
  const hasReownWallet = rows.some(
2387
2413
  (row) => row.kind === "external" || row.kind === "solana"
2388
2414
  );
2389
- const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _63 => _63.length]), () => ( 0))) > 0;
2415
+ const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _68 => _68.length]), () => ( 0))) > 0;
2390
2416
  const defaultSubtitle = onSelectTransferCrypto ? "Add money to your balance" : "Choose a wallet to continue";
2391
2417
  const cryptoRows = [];
2392
2418
  if (onSelectTransferCrypto) {
@@ -2414,7 +2440,7 @@ function ConnectStep({
2414
2440
  leading: renderWalletLeading(row),
2415
2441
  title: collapseToExternal ? "External wallet" : row.label,
2416
2442
  subtitle: subtitleText,
2417
- onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _64 => _64(row.id)]),
2443
+ onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _69 => _69(row.id)]),
2418
2444
  disabled: row.state === "loading",
2419
2445
  trailing: renderRowTrailing(row.state)
2420
2446
  },
@@ -2494,7 +2520,7 @@ function ConnectStep({
2494
2520
  leading: row.icon,
2495
2521
  title: row.label,
2496
2522
  subtitle: formatBalanceUsd(row.status.balanceUsd),
2497
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _65 => _65(row.id)])
2523
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _70 => _70(row.id)])
2498
2524
  },
2499
2525
  row.id
2500
2526
  )
@@ -2509,7 +2535,7 @@ function ConnectStep({
2509
2535
  leading: row.icon,
2510
2536
  title: row.label,
2511
2537
  subtitle: row.status.reason,
2512
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _66 => _66(row.id)])
2538
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _71 => _71(row.id)])
2513
2539
  },
2514
2540
  row.id
2515
2541
  )
@@ -2678,8 +2704,8 @@ function Tooltip({ content, children, className }) {
2678
2704
  function handleOutside(event) {
2679
2705
  const target = event.target;
2680
2706
  if (!target) return;
2681
- if (_optionalChain([triggerRef, 'access', _67 => _67.current, 'optionalAccess', _68 => _68.contains, 'call', _69 => _69(target)])) return;
2682
- if (_optionalChain([bubbleRef, 'access', _70 => _70.current, 'optionalAccess', _71 => _71.contains, 'call', _72 => _72(target)])) return;
2707
+ if (_optionalChain([triggerRef, 'access', _72 => _72.current, 'optionalAccess', _73 => _73.contains, 'call', _74 => _74(target)])) return;
2708
+ if (_optionalChain([bubbleRef, 'access', _75 => _75.current, 'optionalAccess', _76 => _76.contains, 'call', _77 => _77(target)])) return;
2683
2709
  setOpen(false);
2684
2710
  }
2685
2711
  function handleKey(event) {
@@ -2789,6 +2815,7 @@ FeesAccordion.displayName = "FeesAccordion";
2789
2815
 
2790
2816
  function SwappedReceipt({
2791
2817
  onrampMethod,
2818
+ onrampMethodIcon,
2792
2819
  amountPaid,
2793
2820
  depositedAmount,
2794
2821
  depositedIcon,
@@ -2804,14 +2831,17 @@ function SwappedReceipt({
2804
2831
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
2805
2832
  onrampMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
2806
2833
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Onramp method" }),
2807
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: onrampMethod })
2834
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
2835
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: onrampMethod }),
2836
+ onrampMethodIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon rs-review-detail-icon--square", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: onrampMethodIcon, alt: "" }) })
2837
+ ] })
2808
2838
  ] }),
2809
2839
  amountPaid && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
2810
2840
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Amount paid" }),
2811
2841
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: amountPaid })
2812
2842
  ] }),
2813
2843
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
2814
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
2844
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
2815
2845
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
2816
2846
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
2817
2847
  depositedIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: depositedIcon, alt: "" }) })
@@ -2842,7 +2872,7 @@ function asNumber(value) {
2842
2872
  const trimmed = value.trim();
2843
2873
  if (!trimmed) return void 0;
2844
2874
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
2845
- if (_optionalChain([caipMatch, 'optionalAccess', _73 => _73[1]])) {
2875
+ if (_optionalChain([caipMatch, 'optionalAccess', _78 => _78[1]])) {
2846
2876
  const parsed2 = Number(caipMatch[1]);
2847
2877
  return Number.isFinite(parsed2) ? parsed2 : void 0;
2848
2878
  }
@@ -2861,28 +2891,28 @@ function asAddress(value) {
2861
2891
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
2862
2892
  }
2863
2893
  function getEventTxHash(event) {
2864
- if (!_optionalChain([event, 'optionalAccess', _74 => _74.type])) return void 0;
2894
+ if (!_optionalChain([event, 'optionalAccess', _79 => _79.type])) return void 0;
2865
2895
  if (event.type === "deposit-received") {
2866
- return asString(_optionalChain([event, 'access', _75 => _75.data, 'optionalAccess', _76 => _76.transactionHash]));
2896
+ return asString(_optionalChain([event, 'access', _80 => _80.data, 'optionalAccess', _81 => _81.transactionHash]));
2867
2897
  }
2868
2898
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
2869
- const deposit = isRecord(_optionalChain([event, 'access', _77 => _77.data, 'optionalAccess', _78 => _78.deposit])) ? event.data.deposit : void 0;
2870
- const source = isRecord(_optionalChain([event, 'access', _79 => _79.data, 'optionalAccess', _80 => _80.source])) ? event.data.source : void 0;
2871
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _81 => _81.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _82 => _82.transactionHash]))));
2899
+ const deposit = isRecord(_optionalChain([event, 'access', _82 => _82.data, 'optionalAccess', _83 => _83.deposit])) ? event.data.deposit : void 0;
2900
+ const source = isRecord(_optionalChain([event, 'access', _84 => _84.data, 'optionalAccess', _85 => _85.source])) ? event.data.source : void 0;
2901
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _86 => _86.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _87 => _87.transactionHash]))));
2872
2902
  }
2873
2903
  if (event.type === "bridge-failed" || event.type === "error") {
2874
- const deposit = isRecord(_optionalChain([event, 'access', _83 => _83.data, 'optionalAccess', _84 => _84.deposit])) ? event.data.deposit : void 0;
2875
- const source = isRecord(_optionalChain([event, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.source])) ? event.data.source : void 0;
2876
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _87 => _87.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _88 => _88.transactionHash]))));
2904
+ const deposit = isRecord(_optionalChain([event, 'access', _88 => _88.data, 'optionalAccess', _89 => _89.deposit])) ? event.data.deposit : void 0;
2905
+ const source = isRecord(_optionalChain([event, 'access', _90 => _90.data, 'optionalAccess', _91 => _91.source])) ? event.data.source : void 0;
2906
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _92 => _92.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _93 => _93.transactionHash]))));
2877
2907
  }
2878
2908
  if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
2879
- const deposit = isRecord(_optionalChain([event, 'access', _89 => _89.data, 'optionalAccess', _90 => _90.deposit])) ? event.data.deposit : void 0;
2880
- return asString(_optionalChain([deposit, 'optionalAccess', _91 => _91.transactionHash]));
2909
+ const deposit = isRecord(_optionalChain([event, 'access', _94 => _94.data, 'optionalAccess', _95 => _95.deposit])) ? event.data.deposit : void 0;
2910
+ return asString(_optionalChain([deposit, 'optionalAccess', _96 => _96.transactionHash]));
2881
2911
  }
2882
2912
  return void 0;
2883
2913
  }
2884
2914
  function getEventSourceDetails(event) {
2885
- if (!_optionalChain([event, 'optionalAccess', _92 => _92.type]) || !isRecord(event.data)) return {};
2915
+ if (!_optionalChain([event, 'optionalAccess', _97 => _97.type]) || !isRecord(event.data)) return {};
2886
2916
  if (event.type === "deposit-received") {
2887
2917
  return {
2888
2918
  chainId: asNumber(event.data.chain),
@@ -2894,9 +2924,9 @@ function getEventSourceDetails(event) {
2894
2924
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
2895
2925
  if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
2896
2926
  return {
2897
- chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _93 => _93.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _94 => _94.chain])))),
2898
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _95 => _95.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _96 => _96.amount])))),
2899
- token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _97 => _97.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _98 => _98.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _99 => _99.token]))))
2927
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _98 => _98.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _99 => _99.chain])))),
2928
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _100 => _100.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _101 => _101.amount])))),
2929
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _102 => _102.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _103 => _103.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _104 => _104.token]))))
2900
2930
  };
2901
2931
  }
2902
2932
  return {};
@@ -2908,7 +2938,7 @@ function asChain(value) {
2908
2938
  return asNumber(value);
2909
2939
  }
2910
2940
  function getEventDestinationDetails(event) {
2911
- if (!_optionalChain([event, 'optionalAccess', _100 => _100.type]) || !isRecord(event.data)) return {};
2941
+ if (!_optionalChain([event, 'optionalAccess', _105 => _105.type]) || !isRecord(event.data)) return {};
2912
2942
  if (event.type !== "bridge-started" && event.type !== "bridge-complete" && event.type !== "post-bridge-swap-complete") {
2913
2943
  return {};
2914
2944
  }
@@ -2918,14 +2948,14 @@ function getEventDestinationDetails(event) {
2918
2948
  return {
2919
2949
  chainId: asChain(destination.chain),
2920
2950
  amount: asAmount(destination.amount),
2921
- token: _optionalChain([token, 'optionalAccess', _101 => _101.trim, 'call', _102 => _102()]) || void 0
2951
+ token: _optionalChain([token, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()]) || void 0
2922
2952
  };
2923
2953
  }
2924
2954
  function isDepositEvent(event) {
2925
- return _optionalChain([event, 'optionalAccess', _103 => _103.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _104 => _104.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _105 => _105.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _106 => _106.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _107 => _107.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _108 => _108.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "error";
2955
+ return _optionalChain([event, 'optionalAccess', _108 => _108.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _113 => _113.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _114 => _114.type]) === "error";
2926
2956
  }
2927
2957
  function isFailedEvent(event) {
2928
- return _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "error";
2958
+ return _optionalChain([event, 'optionalAccess', _115 => _115.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _116 => _116.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _117 => _117.type]) === "error";
2929
2959
  }
2930
2960
  function isHexString(value) {
2931
2961
  return value.startsWith("0x") || value.startsWith("0X");
@@ -2937,7 +2967,7 @@ function txRefsMatch(a, b) {
2937
2967
  return a === b;
2938
2968
  }
2939
2969
  function formatBridgeFailedMessage(event) {
2940
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _113 => _113.data]), () => ( {}));
2970
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _118 => _118.data]), () => ( {}));
2941
2971
  const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
2942
2972
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
2943
2973
  function toUserFacingFailure(raw) {
@@ -2965,7 +2995,7 @@ function formatBridgeFailedMessage(event) {
2965
2995
  return { message: "Bridge failed" };
2966
2996
  }
2967
2997
  function failureMessageForEvent(event) {
2968
- if (_optionalChain([event, 'optionalAccess', _114 => _114.type]) === "error") {
2998
+ if (_optionalChain([event, 'optionalAccess', _119 => _119.type]) === "error") {
2969
2999
  const message = isRecord(event.data) ? asString(event.data.message) : void 0;
2970
3000
  return _nullishCoalesce(message, () => ( "Unknown error"));
2971
3001
  }
@@ -3002,15 +3032,15 @@ function resolveTokenDisplay(token, chain, fallback) {
3002
3032
  const decimals = _chunkABVRVW3Pcjs.findTokenDecimals.call(void 0, token, chain);
3003
3033
  if (symbol !== "Token" || decimals !== void 0) {
3004
3034
  return {
3005
- symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _115 => _115.symbol]), () => ( symbol)),
3006
- decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _116 => _116.decimals])))
3035
+ symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _120 => _120.symbol]), () => ( symbol)),
3036
+ decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _121 => _121.decimals])))
3007
3037
  };
3008
3038
  }
3009
3039
  }
3010
3040
  }
3011
3041
  return {
3012
- symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _117 => _117.symbol]), () => ( "Token")),
3013
- decimals: _optionalChain([fallback, 'optionalAccess', _118 => _118.decimals])
3042
+ symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _122 => _122.symbol]), () => ( "Token")),
3043
+ decimals: _optionalChain([fallback, 'optionalAccess', _123 => _123.decimals])
3014
3044
  };
3015
3045
  }
3016
3046
  function maxFractionDigitsFor(symbol) {
@@ -3233,12 +3263,12 @@ function isEventForTx(event, txHash) {
3233
3263
  return txRefsMatch(eventTxHash, txHash);
3234
3264
  }
3235
3265
  function parseWebhookTimestamp(event) {
3236
- if (typeof _optionalChain([event, 'optionalAccess', _119 => _119.time]) !== "string") return void 0;
3266
+ if (typeof _optionalChain([event, 'optionalAccess', _124 => _124.time]) !== "string") return void 0;
3237
3267
  const timestamp = Date.parse(event.time);
3238
3268
  return Number.isFinite(timestamp) ? timestamp : void 0;
3239
3269
  }
3240
3270
  function syncPhaseTimings(previous, event) {
3241
- if (!_optionalChain([event, 'optionalAccess', _120 => _120.type])) return previous;
3271
+ if (!_optionalChain([event, 'optionalAccess', _125 => _125.type])) return previous;
3242
3272
  const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
3243
3273
  const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed" || event.type === "error") && previous.receivedAt === void 0;
3244
3274
  const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
@@ -3300,9 +3330,9 @@ function getCurrentPhaseId(state, phaseTimings) {
3300
3330
  if (state.type === "complete") {
3301
3331
  return void 0;
3302
3332
  }
3303
- if (_optionalChain([state, 'access', _121 => _121.lastEvent, 'optionalAccess', _122 => _122.type]) === "bridge-started" || _optionalChain([state, 'access', _123 => _123.lastEvent, 'optionalAccess', _124 => _124.type]) === "bridge-complete")
3333
+ if (_optionalChain([state, 'access', _126 => _126.lastEvent, 'optionalAccess', _127 => _127.type]) === "bridge-started" || _optionalChain([state, 'access', _128 => _128.lastEvent, 'optionalAccess', _129 => _129.type]) === "bridge-complete")
3304
3334
  return "bridging";
3305
- if (_optionalChain([state, 'access', _125 => _125.lastEvent, 'optionalAccess', _126 => _126.type]) === "deposit-received") return "received";
3335
+ if (_optionalChain([state, 'access', _130 => _130.lastEvent, 'optionalAccess', _131 => _131.type]) === "deposit-received") return "received";
3306
3336
  return "confirming";
3307
3337
  }
3308
3338
  function ProcessingStep({
@@ -3327,6 +3357,7 @@ function ProcessingStep({
3327
3357
  quotedFeeSymbol,
3328
3358
  balanceAfterUsd,
3329
3359
  isSwappedOrder,
3360
+ swappedContext,
3330
3361
  onClose,
3331
3362
  onNewDeposit,
3332
3363
  onRetry,
@@ -3387,7 +3418,7 @@ function ProcessingStep({
3387
3418
  flowLabel
3388
3419
  });
3389
3420
  const context = processingContextRef.current;
3390
- _optionalChain([onDepositCompleteRef, 'access', _127 => _127.current, 'optionalCall', _128 => _128(txHash, void 0, {
3421
+ _optionalChain([onDepositCompleteRef, 'access', _132 => _132.current, 'optionalCall', _133 => _133(txHash, void 0, {
3391
3422
  amount: context.amount,
3392
3423
  sourceChain: context.sourceChain,
3393
3424
  sourceToken: context.sourceToken,
@@ -3429,7 +3460,7 @@ function ProcessingStep({
3429
3460
  updatePhaseTimings(
3430
3461
  (previous) => syncPhaseTimings(previous, state.lastEvent)
3431
3462
  );
3432
- }, [_optionalChain([state, 'access', _129 => _129.lastEvent, 'optionalAccess', _130 => _130.time]), _optionalChain([state, 'access', _131 => _131.lastEvent, 'optionalAccess', _132 => _132.type]), updatePhaseTimings]);
3463
+ }, [_optionalChain([state, 'access', _134 => _134.lastEvent, 'optionalAccess', _135 => _135.time]), _optionalChain([state, 'access', _136 => _136.lastEvent, 'optionalAccess', _137 => _137.type]), updatePhaseTimings]);
3433
3464
  const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
3434
3465
  _react.useEffect.call(void 0, () => {
3435
3466
  let cancelled = false;
@@ -3437,10 +3468,12 @@ function ProcessingStep({
3437
3468
  if (cancelled || !res) return;
3438
3469
  if (res.transactionId != null) {
3439
3470
  if (res.transactionId.toLowerCase() !== txHash.toLowerCase()) return;
3440
- } else if (!isSwappedOrder) {
3471
+ } else if (!isSwappedOrder || _optionalChain([swappedContext, 'optionalAccess', _138 => _138.variant]) === "connect") {
3441
3472
  return;
3442
3473
  }
3443
3474
  setSwappedFiatContext({
3475
+ orderCrypto: res.orderCrypto,
3476
+ orderCryptoAmount: res.orderCryptoAmount,
3444
3477
  paidAmountUsd: res.paidAmountUsd,
3445
3478
  paidAmountEur: res.paidAmountEur,
3446
3479
  onrampFeeUsd: res.onrampFeeUsd,
@@ -3451,7 +3484,7 @@ function ProcessingStep({
3451
3484
  return () => {
3452
3485
  cancelled = true;
3453
3486
  };
3454
- }, [service, smartAccount, txHash, isSwappedOrder]);
3487
+ }, [service, smartAccount, txHash, isSwappedOrder, _optionalChain([swappedContext, 'optionalAccess', _139 => _139.variant])]);
3455
3488
  _react.useEffect.call(void 0, () => {
3456
3489
  if (directTransfer) return;
3457
3490
  if (state.type !== "processing") {
@@ -3476,21 +3509,21 @@ function ProcessingStep({
3476
3509
  debugLog(debug, "processing", "poll:event", {
3477
3510
  type: lastEvent2.type,
3478
3511
  matchesTx: eventMatchesTx,
3479
- intentId: _optionalChain([eventData, 'optionalAccess', _133 => _133.intentId])
3512
+ intentId: _optionalChain([eventData, 'optionalAccess', _140 => _140.intentId])
3480
3513
  });
3481
3514
  }
3482
3515
  if (!isMounted) return;
3483
3516
  const awaitingPostBridgeSwap = processingContextRef.current.hasPostBridgeActions;
3484
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _134 => _134.type]) === "post-bridge-swap-complete") {
3517
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _141 => _141.type]) === "post-bridge-swap-complete") {
3485
3518
  setState({ type: "complete", lastEvent: eventForCurrentTx });
3486
- const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _135 => _135.data, 'optionalAccess', _136 => _136.swap, 'optionalAccess', _137 => _137.transactionHash]);
3519
+ const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _142 => _142.data, 'optionalAccess', _143 => _143.swap, 'optionalAccess', _144 => _144.transactionHash]);
3487
3520
  debugLog(debug, "processing", "state:complete", {
3488
3521
  txHash,
3489
3522
  destinationTxHash: swapTxHash,
3490
3523
  event: eventForCurrentTx.type
3491
3524
  });
3492
3525
  const context = processingContextRef.current;
3493
- _optionalChain([onDepositCompleteRef, 'access', _138 => _138.current, 'optionalCall', _139 => _139(txHash, swapTxHash, {
3526
+ _optionalChain([onDepositCompleteRef, 'access', _145 => _145.current, 'optionalCall', _146 => _146(txHash, swapTxHash, {
3494
3527
  amount: context.amount,
3495
3528
  sourceChain: context.sourceChain,
3496
3529
  sourceToken: context.sourceToken,
@@ -3501,7 +3534,7 @@ function ProcessingStep({
3501
3534
  })]);
3502
3535
  return;
3503
3536
  }
3504
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _140 => _140.type]) === "post-bridge-swap-failed") {
3537
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _147 => _147.type]) === "post-bridge-swap-failed") {
3505
3538
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
3506
3539
  setState({
3507
3540
  type: "failed",
@@ -3513,19 +3546,19 @@ function ProcessingStep({
3513
3546
  message: formatted.message,
3514
3547
  code: formatted.code
3515
3548
  });
3516
- _optionalChain([onDepositFailedRef, 'access', _141 => _141.current, 'optionalCall', _142 => _142(txHash, formatted.message)]);
3549
+ _optionalChain([onDepositFailedRef, 'access', _148 => _148.current, 'optionalCall', _149 => _149(txHash, formatted.message)]);
3517
3550
  return;
3518
3551
  }
3519
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _143 => _143.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
3552
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _150 => _150.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
3520
3553
  setState({ type: "complete", lastEvent: eventForCurrentTx });
3521
- const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _144 => _144.data, 'optionalAccess', _145 => _145.destination, 'optionalAccess', _146 => _146.transactionHash]);
3554
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _151 => _151.data, 'optionalAccess', _152 => _152.destination, 'optionalAccess', _153 => _153.transactionHash]);
3522
3555
  debugLog(debug, "processing", "state:complete", {
3523
3556
  txHash,
3524
3557
  destinationTxHash: destinationTxHash2,
3525
3558
  event: eventForCurrentTx.type
3526
3559
  });
3527
3560
  const context = processingContextRef.current;
3528
- _optionalChain([onDepositCompleteRef, 'access', _147 => _147.current, 'optionalCall', _148 => _148(txHash, destinationTxHash2, {
3561
+ _optionalChain([onDepositCompleteRef, 'access', _154 => _154.current, 'optionalCall', _155 => _155(txHash, destinationTxHash2, {
3529
3562
  amount: context.amount,
3530
3563
  sourceChain: context.sourceChain,
3531
3564
  sourceToken: context.sourceToken,
@@ -3536,7 +3569,7 @@ function ProcessingStep({
3536
3569
  })]);
3537
3570
  return;
3538
3571
  }
3539
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _149 => _149.type]) === "bridge-failed") {
3572
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _156 => _156.type]) === "bridge-failed") {
3540
3573
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
3541
3574
  setState({
3542
3575
  type: "failed",
@@ -3548,11 +3581,11 @@ function ProcessingStep({
3548
3581
  message: formatted.message,
3549
3582
  code: formatted.code
3550
3583
  });
3551
- _optionalChain([onDepositFailedRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(txHash, formatted.message)]);
3584
+ _optionalChain([onDepositFailedRef, 'access', _157 => _157.current, 'optionalCall', _158 => _158(txHash, formatted.message)]);
3552
3585
  return;
3553
3586
  }
3554
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _152 => _152.type]) === "error") {
3555
- const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _153 => _153.data, 'optionalAccess', _154 => _154.message]), () => ( "Unknown error"));
3587
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _159 => _159.type]) === "error") {
3588
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _160 => _160.data, 'optionalAccess', _161 => _161.message]), () => ( "Unknown error"));
3556
3589
  setState({
3557
3590
  type: "failed",
3558
3591
  message: errorMessage,
@@ -3562,7 +3595,7 @@ function ProcessingStep({
3562
3595
  txHash,
3563
3596
  message: errorMessage
3564
3597
  });
3565
- _optionalChain([onDepositFailedRef, 'access', _155 => _155.current, 'optionalCall', _156 => _156(txHash, errorMessage)]);
3598
+ _optionalChain([onDepositFailedRef, 'access', _162 => _162.current, 'optionalCall', _163 => _163(txHash, errorMessage)]);
3566
3599
  return;
3567
3600
  }
3568
3601
  setState((previous) => ({
@@ -3623,7 +3656,7 @@ function ProcessingStep({
3623
3656
  txHash,
3624
3657
  timeoutMs: ESCALATED_DELAY_MS
3625
3658
  });
3626
- _optionalChain([onErrorRef, 'access', _157 => _157.current, 'optionalCall', _158 => _158(message, "PROCESS_TIMEOUT")]);
3659
+ _optionalChain([onErrorRef, 'access', _164 => _164.current, 'optionalCall', _165 => _165(message, "PROCESS_TIMEOUT")]);
3627
3660
  }, ESCALATED_DELAY_MS);
3628
3661
  return () => clearTimeout(timeoutId);
3629
3662
  }, [debug, directTransfer, onErrorRef, state.type, txHash]);
@@ -3635,8 +3668,8 @@ function ProcessingStep({
3635
3668
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
3636
3669
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
3637
3670
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
3638
- const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _159 => _159.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _160 => _160.type]) === "post-bridge-swap-failed";
3639
- const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _161 => _161.data, 'optionalAccess', _162 => _162.swap, 'optionalAccess', _163 => _163.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _164 => _164.data, 'optionalAccess', _165 => _165.destination, 'optionalAccess', _166 => _166.transactionHash]) || null;
3671
+ const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _166 => _166.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _167 => _167.type]) === "post-bridge-swap-failed";
3672
+ const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _168 => _168.data, 'optionalAccess', _169 => _169.swap, 'optionalAccess', _170 => _170.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _171 => _171.data, 'optionalAccess', _172 => _172.destination, 'optionalAccess', _173 => _173.transactionHash]) || null;
3640
3673
  const sourceDetails = getEventSourceDetails(lastEvent);
3641
3674
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
3642
3675
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
@@ -3656,7 +3689,7 @@ function ProcessingStep({
3656
3689
  const sourceSymbol = sourceDisplay.symbol;
3657
3690
  const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(formatRawTokenAmount(displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
3658
3691
  formatTokenAmount(Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
3659
- const isBridgeHopDestination = hasPostBridgeActions && (_optionalChain([lastEvent, 'optionalAccess', _167 => _167.type]) === "bridge-started" || _optionalChain([lastEvent, 'optionalAccess', _168 => _168.type]) === "bridge-complete");
3692
+ const isBridgeHopDestination = hasPostBridgeActions && (_optionalChain([lastEvent, 'optionalAccess', _174 => _174.type]) === "bridge-started" || _optionalChain([lastEvent, 'optionalAccess', _175 => _175.type]) === "bridge-complete");
3660
3693
  const eventDestination = isBridgeHopDestination ? {} : getEventDestinationDetails(lastEvent);
3661
3694
  const targetDisplay = resolveTokenDisplay(
3662
3695
  _nullishCoalesce(eventDestination.token, () => ( targetToken)),
@@ -3715,8 +3748,8 @@ function ProcessingStep({
3715
3748
  const sourceChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, displaySourceChain);
3716
3749
  const targetChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
3717
3750
  const timerText = formatTimer(elapsedSeconds);
3718
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _169 => _169.feeSponsored]), () => ( false));
3719
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _170 => _170.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3751
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _176 => _176.feeSponsored]), () => ( false));
3752
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _177 => _177.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3720
3753
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
3721
3754
  const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
3722
3755
  const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
@@ -3727,10 +3760,16 @@ function ProcessingStep({
3727
3760
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
3728
3761
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
3729
3762
  if (isComplete && isSwappedOrder) {
3730
- const onrampMethod = _optionalChain([swappedFiatContext, 'optionalAccess', _171 => _171.paymentMethod]) ? formatPaymentMethod(swappedFiatContext.paymentMethod) : null;
3731
- const amountPaid = _optionalChain([swappedFiatContext, 'optionalAccess', _172 => _172.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null;
3763
+ const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _178 => _178.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _179 => _179.paymentMethod]))), () => ( null));
3764
+ const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
3765
+ const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _180 => _180.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
3766
+ _nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
3767
+ effectivePaymentMethod
3768
+ ) : null;
3769
+ const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _181 => _181.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
3770
+ const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _182 => _182.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
3732
3771
  const depositedAmount = receiveDisplay;
3733
- const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _173 => _173.onrampFeeUsd]), () => ( null));
3772
+ const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _183 => _183.onrampFeeUsd]), () => ( null));
3734
3773
  const networkFeeUsd = quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount)) ? Number(quotedFeeAmount) : null;
3735
3774
  const feeRows = [];
3736
3775
  if (onrampFeeUsd != null) {
@@ -3750,6 +3789,7 @@ function ProcessingStep({
3750
3789
  SwappedReceipt,
3751
3790
  {
3752
3791
  onrampMethod,
3792
+ onrampMethodIcon,
3753
3793
  amountPaid,
3754
3794
  depositedAmount,
3755
3795
  depositedIcon: targetTokenIcon,
@@ -3806,7 +3846,7 @@ function ProcessingStep({
3806
3846
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
3807
3847
  ] }),
3808
3848
  isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3809
- _optionalChain([swappedFiatContext, 'optionalAccess', _174 => _174.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3849
+ _optionalChain([swappedFiatContext, 'optionalAccess', _184 => _184.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3810
3850
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
3811
3851
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3812
3852
  "$",
@@ -3818,7 +3858,7 @@ function ProcessingStep({
3818
3858
  ] })
3819
3859
  ] })
3820
3860
  ] }),
3821
- _optionalChain([swappedFiatContext, 'optionalAccess', _175 => _175.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3861
+ _optionalChain([swappedFiatContext, 'optionalAccess', _185 => _185.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3822
3862
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
3823
3863
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3824
3864
  "$",
@@ -4048,4 +4088,8 @@ function accountFromPrivateKey(privateKey) {
4048
4088
 
4049
4089
 
4050
4090
 
4051
- exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.Callout = Callout; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.getExchangeLogo = getExchangeLogo; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.formatTokenAmount = formatTokenAmount; exports.formatQuotedReceive = formatQuotedReceive; exports.formatReceiveEstimate = formatReceiveEstimate; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.useTokenPrices = useTokenPrices; exports.ProcessingStep = ProcessingStep; exports.getPublicClient = getPublicClient; exports.getHyperEvmReadClient = getHyperEvmReadClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
4091
+
4092
+
4093
+
4094
+
4095
+ exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.Callout = Callout; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.getExchangeLogo = getExchangeLogo; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.formatTokenAmount = formatTokenAmount; exports.formatQuotedReceive = formatQuotedReceive; exports.formatReceiveEstimate = formatReceiveEstimate; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.useTokenPrices = useTokenPrices; exports.ProcessingStep = ProcessingStep; exports.rpcUrlFor = rpcUrlFor; exports.RpcUrlsProvider = RpcUrlsProvider; exports.useRpcUrls = useRpcUrls; exports.useStableRpcUrls = useStableRpcUrls; exports.getPublicClient = getPublicClient; exports.getHyperEvmReadClient = getHyperEvmReadClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;