@rhinestone/deposit-modal 0.5.0 → 0.6.0

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.
@@ -414,15 +414,12 @@ function depositRowToEvent(row) {
414
414
  const time = _nullishCoalesce(_nullishCoalesce(row.completedAt, () => ( row.createdAt)), () => ( void 0));
415
415
  if (status === "completed") {
416
416
  return {
417
- type: "post-bridge-swap-complete",
417
+ type: "bridge-complete",
418
418
  time: _nullishCoalesce(time, () => ( void 0)),
419
419
  data: {
420
420
  deposit,
421
421
  source,
422
- ...destination && { destination },
423
- ...destination && {
424
- swap: { transactionHash: destination.transactionHash }
425
- }
422
+ ...destination && { destination }
426
423
  }
427
424
  };
428
425
  }
@@ -541,15 +538,18 @@ function createDepositService(baseUrl, options) {
541
538
  }
542
539
  const PORTFOLIO_CACHE_TTL_MS = 3e4;
543
540
  const portfolioCache = /* @__PURE__ */ new Map();
544
- function cachedPortfolio(key, fetcher) {
541
+ function cachedPortfolio(key, fetcher, forceRefresh = false) {
545
542
  const now = Date.now();
546
543
  const entry = portfolioCache.get(key);
547
- if (entry && entry.expiresAt > now) {
544
+ if (!forceRefresh && entry && entry.expiresAt > now) {
548
545
  debugLog(debug, scope, "portfolio:cache-hit", { key });
549
546
  return entry.promise;
550
547
  }
551
- const promise = fetcher().catch((err) => {
552
- portfolioCache.delete(key);
548
+ let promise;
549
+ promise = fetcher().catch((err) => {
550
+ if (_optionalChain([portfolioCache, 'access', _3 => _3.get, 'call', _4 => _4(key), 'optionalAccess', _5 => _5.promise]) === promise) {
551
+ portfolioCache.delete(key);
552
+ }
553
553
  throw err;
554
554
  });
555
555
  portfolioCache.set(key, {
@@ -567,7 +567,6 @@ function createDepositService(baseUrl, options) {
567
567
  targetChain: params.targetChain,
568
568
  targetToken: params.targetToken,
569
569
  recipient: params.recipient ? shortRef(params.recipient) : void 0,
570
- postBridgeActionCount: _nullishCoalesce(_optionalChain([params, 'access', _3 => _3.postBridgeActions, 'optionalAccess', _4 => _4.length]), () => ( 0)),
571
570
  forceRegister: params.forceRegister
572
571
  });
573
572
  const response = await fetch(url, {
@@ -584,7 +583,7 @@ function createDepositService(baseUrl, options) {
584
583
  error,
585
584
  { status: response.status, ownerAddress: params.ownerAddress }
586
585
  );
587
- const detail = Array.isArray(error.details) ? error.details.map((d) => _optionalChain([d, 'optionalAccess', _5 => _5.message])).filter(Boolean).join("; ") : void 0;
586
+ const detail = Array.isArray(error.details) ? error.details.map((d) => _optionalChain([d, 'optionalAccess', _6 => _6.message])).filter(Boolean).join("; ") : void 0;
588
587
  const base = error.error || `Setup account failed: ${response.status}`;
589
588
  throw new Error(detail ? `${base}: ${detail}` : base);
590
589
  }
@@ -636,12 +635,12 @@ function createDepositService(baseUrl, options) {
636
635
  const result = await response.json();
637
636
  debugLog(debug, scope, "registerAccount:success", {
638
637
  address: params.address,
639
- evmDepositAddress: _optionalChain([result, 'optionalAccess', _6 => _6.evmDepositAddress]),
640
- hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _7 => _7.solanaDepositAddress]))
638
+ evmDepositAddress: _optionalChain([result, 'optionalAccess', _7 => _7.evmDepositAddress]),
639
+ hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _8 => _8.solanaDepositAddress]))
641
640
  });
642
641
  return result;
643
642
  },
644
- async fetchPortfolio(address) {
643
+ async fetchPortfolio(address, options2) {
645
644
  return cachedPortfolio(`evm:${address.toLowerCase()}`, async () => {
646
645
  const url = apiUrl(`/portfolio/${address}`);
647
646
  debugLog(debug, scope, "fetchPortfolio:request", { url, address });
@@ -686,9 +685,9 @@ function createDepositService(baseUrl, options) {
686
685
  }
687
686
  debugLog(debug, scope, "fetchPortfolio:empty", { address });
688
687
  return { tokens: [], totalUsd: 0 };
689
- });
688
+ }, _optionalChain([options2, 'optionalAccess', _9 => _9.forceRefresh]));
690
689
  },
691
- async fetchSolanaPortfolio(address) {
690
+ async fetchSolanaPortfolio(address, options2) {
692
691
  return cachedPortfolio(`sol:${address}`, async () => {
693
692
  const url = apiUrl(`/portfolio/solana/${address}`);
694
693
  debugLog(debug, scope, "fetchSolanaPortfolio:request", { url, address });
@@ -717,7 +716,7 @@ function createDepositService(baseUrl, options) {
717
716
  totalUsd: normalized.totalUsd
718
717
  });
719
718
  return normalized;
720
- });
719
+ }, _optionalChain([options2, 'optionalAccess', _10 => _10.forceRefresh]));
721
720
  },
722
721
  async checkAccount(address) {
723
722
  const url = apiUrl(`/check/${address}`);
@@ -739,9 +738,9 @@ function createDepositService(baseUrl, options) {
739
738
  }
740
739
  const data = await response.json();
741
740
  const result = {
742
- isRegistered: _optionalChain([data, 'optionalAccess', _8 => _8.isRegistered]) === true,
743
- targetChain: _optionalChain([data, 'optionalAccess', _9 => _9.targetChain]),
744
- targetToken: _optionalChain([data, 'optionalAccess', _10 => _10.targetToken])
741
+ isRegistered: _optionalChain([data, 'optionalAccess', _11 => _11.isRegistered]) === true,
742
+ targetChain: _optionalChain([data, 'optionalAccess', _12 => _12.targetChain]),
743
+ targetToken: _optionalChain([data, 'optionalAccess', _13 => _13.targetToken])
745
744
  };
746
745
  debugLog(debug, scope, "checkAccount:success", {
747
746
  address,
@@ -771,12 +770,12 @@ function createDepositService(baseUrl, options) {
771
770
  return { lastEvent: void 0 };
772
771
  }
773
772
  const body = await response.json();
774
- const row = _optionalChain([body, 'access', _11 => _11.deposits, 'optionalAccess', _12 => _12[0]]);
773
+ const row = _optionalChain([body, 'access', _14 => _14.deposits, 'optionalAccess', _15 => _15[0]]);
775
774
  const lastEvent = row ? depositRowToEvent(row) : void 0;
776
775
  debugLog(debug, scope, "fetchStatus:success", {
777
776
  address,
778
777
  txHash: shortRef(normalized),
779
- eventType: _optionalChain([lastEvent, 'optionalAccess', _13 => _13.type])
778
+ eventType: _optionalChain([lastEvent, 'optionalAccess', _16 => _16.type])
780
779
  });
781
780
  return { lastEvent };
782
781
  },
@@ -797,11 +796,11 @@ function createDepositService(baseUrl, options) {
797
796
  return { lastEvent: void 0 };
798
797
  }
799
798
  const body = await response.json();
800
- const row = _optionalChain([body, 'access', _14 => _14.deposits, 'optionalAccess', _15 => _15[0]]);
799
+ const row = _optionalChain([body, 'access', _17 => _17.deposits, 'optionalAccess', _18 => _18[0]]);
801
800
  const lastEvent = row ? depositRowToEvent(row) : void 0;
802
801
  debugLog(debug, scope, "fetchLatestStatus:success", {
803
802
  address,
804
- eventType: _optionalChain([lastEvent, 'optionalAccess', _16 => _16.type])
803
+ eventType: _optionalChain([lastEvent, 'optionalAccess', _19 => _19.type])
805
804
  });
806
805
  return { lastEvent };
807
806
  },
@@ -863,7 +862,7 @@ function createDepositService(baseUrl, options) {
863
862
  smartAccount,
864
863
  chainId,
865
864
  safeAddress,
866
- txHash: _optionalChain([result, 'optionalAccess', _17 => _17.txHash]) ? shortRef(result.txHash) : void 0
865
+ txHash: _optionalChain([result, 'optionalAccess', _20 => _20.txHash]) ? shortRef(result.txHash) : void 0
867
866
  });
868
867
  return result;
869
868
  },
@@ -903,7 +902,7 @@ function createDepositService(baseUrl, options) {
903
902
  const result = await response.json();
904
903
  debugLog(debug, scope, "submitPolymarketWithdraw:success", {
905
904
  depositWallet,
906
- txHash: _optionalChain([result, 'optionalAccess', _18 => _18.txHash]) ? shortRef(result.txHash) : void 0
905
+ txHash: _optionalChain([result, 'optionalAccess', _21 => _21.txHash]) ? shortRef(result.txHash) : void 0
907
906
  });
908
907
  return result;
909
908
  },
@@ -938,8 +937,8 @@ function createDepositService(baseUrl, options) {
938
937
  );
939
938
  }
940
939
  const data = await response.json();
941
- const deposits = Array.isArray(_optionalChain([data, 'optionalAccess', _19 => _19.deposits])) ? data.deposits : [];
942
- const nextCursor = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _20 => _20.nextCursor]), () => ( _optionalChain([data, 'optionalAccess', _21 => _21.next_cursor]))), () => ( null));
940
+ const deposits = Array.isArray(_optionalChain([data, 'optionalAccess', _22 => _22.deposits])) ? data.deposits : [];
941
+ const nextCursor = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _23 => _23.nextCursor]), () => ( _optionalChain([data, 'optionalAccess', _24 => _24.next_cursor]))), () => ( null));
943
942
  debugLog(debug, scope, "fetchDepositHistory:success", {
944
943
  recipient: shortRef(params.recipient),
945
944
  count: deposits.length,
@@ -952,8 +951,8 @@ function createDepositService(baseUrl, options) {
952
951
  const token = _chunkABVRVW3Pcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
953
952
  return {
954
953
  hasLiquidity: true,
955
- symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _22 => _22.symbol]), () => ( "Token")),
956
- decimals: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _23 => _23.decimals]), () => ( 9)),
954
+ symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _25 => _25.symbol]), () => ( "Token")),
955
+ decimals: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _26 => _26.decimals]), () => ( 9)),
957
956
  unlimited: true,
958
957
  maxAmount: null
959
958
  };
@@ -1031,7 +1030,7 @@ function createDepositService(baseUrl, options) {
1031
1030
  const quote = await response.json();
1032
1031
  debugLog(debug, scope, "getQuotePreview:success", {
1033
1032
  settlementLayer: quote.settlementLayer,
1034
- totalUsd: _optionalChain([quote, 'access', _24 => _24.fees, 'optionalAccess', _25 => _25.totalUsd])
1033
+ totalUsd: _optionalChain([quote, 'access', _27 => _27.fees, 'optionalAccess', _28 => _28.totalUsd])
1035
1034
  });
1036
1035
  return quote;
1037
1036
  } catch (error) {
@@ -1217,16 +1216,16 @@ function createDepositService(baseUrl, options) {
1217
1216
  }
1218
1217
  function normalizeDirectPortfolio(data) {
1219
1218
  const rawTokens = _nullishCoalesce(_nullishCoalesce(extractArray(data, "tokens"), () => ( extractArray(
1220
- _optionalChain([data, 'optionalAccess', _26 => _26.data]),
1219
+ _optionalChain([data, 'optionalAccess', _29 => _29.data]),
1221
1220
  "tokens"
1222
1221
  ))), () => ( []));
1223
- const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _27 => _27.data]), "totalUsd"))), () => ( 0));
1222
+ const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _30 => _30.data]), "totalUsd"))), () => ( 0));
1224
1223
  const tokens = rawTokens.map((token) => normalizeDirectToken(token)).filter((token) => Boolean(token));
1225
1224
  return { tokens, totalUsd };
1226
1225
  }
1227
1226
  function extractOrchestratorPortfolio(data) {
1228
1227
  const portfolio = _nullishCoalesce(extractArray(data, "portfolio"), () => ( extractArray(
1229
- _optionalChain([data, 'optionalAccess', _28 => _28.data]),
1228
+ _optionalChain([data, 'optionalAccess', _31 => _31.data]),
1230
1229
  "portfolio"
1231
1230
  )));
1232
1231
  if (!portfolio || !Array.isArray(portfolio)) return null;
@@ -1237,7 +1236,7 @@ function normalizeOrchestratorPortfolio(data) {
1237
1236
  for (const tokenData of data.portfolio || []) {
1238
1237
  const chainBalances = _nullishCoalesce(_nullishCoalesce(tokenData.tokenChainBalance, () => ( tokenData.chainBalances)), () => ( []));
1239
1238
  for (const chainBalance of chainBalances) {
1240
- const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _29 => _29.balance, 'optionalAccess', _30 => _30.unlocked]), () => ( "0"));
1239
+ const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _32 => _32.balance, 'optionalAccess', _33 => _33.unlocked]), () => ( "0"));
1241
1240
  const normalizedName = tokenData.tokenName.trim();
1242
1241
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
1243
1242
  const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkABVRVW3Pcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
@@ -1271,7 +1270,7 @@ function normalizeDirectToken(token) {
1271
1270
  if (chainId === null) return null;
1272
1271
  const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
1273
1272
  if (!symbol) return null;
1274
- const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _31 => _31(token, "balance"), 'optionalAccess', _32 => _32.toString, 'call', _33 => _33()]))), () => ( _optionalChain([extractNumber, 'call', _34 => _34(token, "amount"), 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]))), () => ( _optionalChain([extractNumber, 'call', _37 => _37(token, "value"), 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]))), () => ( _optionalChain([extractNumber, 'call', _40 => _40(token, "rawBalance"), 'optionalAccess', _41 => _41.toString, 'call', _42 => _42()])));
1273
+ const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _34 => _34(token, "balance"), 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]))), () => ( _optionalChain([extractNumber, 'call', _37 => _37(token, "amount"), 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]))), () => ( _optionalChain([extractNumber, 'call', _40 => _40(token, "value"), 'optionalAccess', _41 => _41.toString, 'call', _42 => _42()]))), () => ( _optionalChain([extractNumber, 'call', _43 => _43(token, "rawBalance"), 'optionalAccess', _44 => _44.toString, 'call', _45 => _45()])));
1275
1274
  if (!balanceValue) return null;
1276
1275
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
1277
1276
  token.token,
@@ -1296,7 +1295,7 @@ function normalizeDirectToken(token) {
1296
1295
  }
1297
1296
  function extractTokenAddress(tokenData, chainId) {
1298
1297
  const token = tokenData;
1299
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _43 => _43.addresses, 'optionalAccess', _44 => _44[chainId]]))), () => ( _optionalChain([token, 'access', _45 => _45.token, 'optionalAccess', _46 => _46.address]))), () => ( _optionalChain([token, 'access', _47 => _47.token, 'optionalAccess', _48 => _48.addresses, 'optionalAccess', _49 => _49[chainId]])));
1298
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _46 => _46.addresses, 'optionalAccess', _47 => _47[chainId]]))), () => ( _optionalChain([token, 'access', _48 => _48.token, 'optionalAccess', _49 => _49.address]))), () => ( _optionalChain([token, 'access', _50 => _50.token, 'optionalAccess', _51 => _51.addresses, 'optionalAccess', _52 => _52[chainId]])));
1300
1299
  }
1301
1300
  function extractArray(data, key) {
1302
1301
  if (!data || typeof data !== "object") return null;
@@ -1398,7 +1397,7 @@ function formatUserError(raw) {
1398
1397
  // src/core/rpc.ts
1399
1398
 
1400
1399
  function rpcUrlFor(rpcUrls, chain) {
1401
- const url = _optionalChain([rpcUrls, 'optionalAccess', _50 => _50[chain], 'optionalAccess', _51 => _51.trim, 'call', _52 => _52()]);
1400
+ const url = _optionalChain([rpcUrls, 'optionalAccess', _53 => _53[chain], 'optionalAccess', _54 => _54.trim, 'call', _55 => _55()]);
1402
1401
  return url ? url : void 0;
1403
1402
  }
1404
1403
  var RpcUrlsContext = _react.createContext.call(void 0, void 0);
@@ -1406,6 +1405,14 @@ var RpcUrlsProvider = RpcUrlsContext.Provider;
1406
1405
  function useRpcUrls() {
1407
1406
  return _react.useContext.call(void 0, RpcUrlsContext);
1408
1407
  }
1408
+ function rpcUrlsKey(rpcUrls) {
1409
+ if (!rpcUrls) return "";
1410
+ return Object.entries(rpcUrls).map(([chain, url]) => [chain, _nullishCoalesce(_optionalChain([url, 'optionalAccess', _56 => _56.trim, 'call', _57 => _57()]), () => ( ""))]).filter(([, url]) => url !== "").map(([chain, url]) => `${chain}=${url}`).sort().join("|");
1411
+ }
1412
+ function useStableRpcUrls(rpcUrls) {
1413
+ const key = rpcUrlsKey(rpcUrls);
1414
+ return _react.useMemo.call(void 0, () => rpcUrls, [key]);
1415
+ }
1409
1416
 
1410
1417
  // src/core/public-client.ts
1411
1418
  var _viem = require('viem');
@@ -1542,19 +1549,19 @@ var CUSTOM_PRIMARY_VARS = [
1542
1549
  function applyTheme(element, theme) {
1543
1550
  if (!element) return;
1544
1551
  const parent = element.parentElement;
1545
- const targets = _optionalChain([parent, 'optionalAccess', _53 => _53.classList, 'access', _54 => _54.contains, 'call', _55 => _55("rs-modal-content")]) ? [element, parent] : [element];
1546
- if (_optionalChain([theme, 'optionalAccess', _56 => _56.mode])) {
1552
+ const targets = _optionalChain([parent, 'optionalAccess', _58 => _58.classList, 'access', _59 => _59.contains, 'call', _60 => _60("rs-modal-content")]) ? [element, parent] : [element];
1553
+ if (_optionalChain([theme, 'optionalAccess', _61 => _61.mode])) {
1547
1554
  for (const t of targets) t.setAttribute("data-theme", theme.mode);
1548
1555
  } else {
1549
1556
  for (const t of targets) t.removeAttribute("data-theme");
1550
1557
  }
1551
- if (_optionalChain([theme, 'optionalAccess', _57 => _57.fontColor])) {
1558
+ if (_optionalChain([theme, 'optionalAccess', _62 => _62.fontColor])) {
1552
1559
  setVar(targets, "--rs-foreground", theme.fontColor);
1553
1560
  }
1554
- if (_optionalChain([theme, 'optionalAccess', _58 => _58.iconColor])) {
1561
+ if (_optionalChain([theme, 'optionalAccess', _63 => _63.iconColor])) {
1555
1562
  setVar(targets, "--rs-icon", theme.iconColor);
1556
1563
  }
1557
- if (_optionalChain([theme, 'optionalAccess', _59 => _59.ctaColor])) {
1564
+ if (_optionalChain([theme, 'optionalAccess', _64 => _64.ctaColor])) {
1558
1565
  const derived = deriveCustomPrimary(theme.ctaColor);
1559
1566
  if (derived) {
1560
1567
  setVar(targets, "--rs-primary", derived.base);
@@ -1579,18 +1586,18 @@ function applyTheme(element, theme) {
1579
1586
  }
1580
1587
  } else {
1581
1588
  for (const v of CUSTOM_PRIMARY_VARS) clearVar(targets, v);
1582
- if (_optionalChain([theme, 'optionalAccess', _60 => _60.ctaHoverColor])) {
1589
+ if (_optionalChain([theme, 'optionalAccess', _65 => _65.ctaHoverColor])) {
1583
1590
  setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
1584
1591
  }
1585
1592
  }
1586
- if (_optionalChain([theme, 'optionalAccess', _61 => _61.borderColor])) {
1593
+ if (_optionalChain([theme, 'optionalAccess', _66 => _66.borderColor])) {
1587
1594
  setVar(targets, "--rs-border", theme.borderColor);
1588
1595
  setVar(targets, "--rs-border-surface", theme.borderColor);
1589
1596
  }
1590
- if (_optionalChain([theme, 'optionalAccess', _62 => _62.backgroundColor])) {
1597
+ if (_optionalChain([theme, 'optionalAccess', _67 => _67.backgroundColor])) {
1591
1598
  setVar(targets, "--rs-background", theme.backgroundColor);
1592
1599
  }
1593
- if (_optionalChain([theme, 'optionalAccess', _63 => _63.radius])) {
1600
+ if (_optionalChain([theme, 'optionalAccess', _68 => _68.radius])) {
1594
1601
  const scale = RADIUS_SCALE[theme.radius];
1595
1602
  setVar(targets, "--rs-radius-sm", scale.sm);
1596
1603
  setVar(targets, "--rs-radius-md", scale.md);
@@ -1773,7 +1780,7 @@ function ListRow({
1773
1780
  if (disabled) return;
1774
1781
  if (e.key === "Enter" || e.key === " ") {
1775
1782
  e.preventDefault();
1776
- _optionalChain([onClick, 'optionalCall', _64 => _64(e)]);
1783
+ _optionalChain([onClick, 'optionalCall', _69 => _69(e)]);
1777
1784
  }
1778
1785
  };
1779
1786
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1783,7 +1790,7 @@ function ListRow({
1783
1790
  role: "button",
1784
1791
  tabIndex: disabled ? -1 : 0,
1785
1792
  "aria-disabled": disabled || void 0,
1786
- onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _65 => _65(e)]),
1793
+ onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _70 => _70(e)]),
1787
1794
  onKeyDown: handleKey,
1788
1795
  children: inner
1789
1796
  }
@@ -2332,6 +2339,24 @@ function formatBalanceUsd(value) {
2332
2339
  if (!Number.isFinite(value) || value <= 0) return "$0.00";
2333
2340
  return `$${value.toFixed(2)}`;
2334
2341
  }
2342
+ function rankUsd(value) {
2343
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
2344
+ }
2345
+ function rankCryptoRows(descriptors) {
2346
+ return descriptors.map((descriptor, index) => ({ descriptor, index })).sort((a, b) => {
2347
+ const first = a.descriptor;
2348
+ const second = b.descriptor;
2349
+ if (first.isBalanceSource !== second.isBalanceSource) {
2350
+ return first.isBalanceSource ? -1 : 1;
2351
+ }
2352
+ if (!first.isBalanceSource) return a.index - b.index;
2353
+ if (first.resolved !== second.resolved) return first.resolved ? -1 : 1;
2354
+ if (first.resolved && first.balanceUsd !== second.balanceUsd) {
2355
+ return second.balanceUsd - first.balanceUsd;
2356
+ }
2357
+ return a.index - b.index;
2358
+ }).map(({ descriptor }) => descriptor.node);
2359
+ }
2335
2360
  function fiatIcon(name) {
2336
2361
  if (name === "apple") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AppleIcon, {});
2337
2362
  if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BankIcon, {});
@@ -2389,6 +2414,7 @@ function ConnectStep({
2389
2414
  onSelectPayWithCard,
2390
2415
  fiatPaymentMethods,
2391
2416
  onSelectFiatMethod,
2417
+ onPrefetchFiatMethod,
2392
2418
  onSelectFundFromExchange,
2393
2419
  onRequestConnect,
2394
2420
  onConnect,
@@ -2404,11 +2430,23 @@ function ConnectStep({
2404
2430
  const hasReownWallet = rows.some(
2405
2431
  (row) => row.kind === "external" || row.kind === "solana"
2406
2432
  );
2407
- const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _66 => _66.length]), () => ( 0))) > 0;
2433
+ const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _71 => _71.length]), () => ( 0))) > 0;
2408
2434
  const defaultSubtitle = onSelectTransferCrypto ? "Add money to your balance" : "Choose a wallet to continue";
2409
- const cryptoRows = [];
2435
+ const cryptoDescriptors = [];
2436
+ const pushAction = (node) => cryptoDescriptors.push({
2437
+ node,
2438
+ isBalanceSource: false,
2439
+ resolved: false,
2440
+ balanceUsd: 0
2441
+ });
2442
+ const pushBalanceSource = (node, resolved, balanceUsd) => cryptoDescriptors.push({
2443
+ node,
2444
+ isBalanceSource: true,
2445
+ resolved,
2446
+ balanceUsd: rankUsd(balanceUsd)
2447
+ });
2410
2448
  if (onSelectTransferCrypto) {
2411
- cryptoRows.push(
2449
+ pushAction(
2412
2450
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2413
2451
  ListRow,
2414
2452
  {
@@ -2424,24 +2462,26 @@ function ConnectStep({
2424
2462
  }
2425
2463
  for (const row of rows) {
2426
2464
  const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
2427
- const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? _nullishCoalesce(row.errorReason, () => ( "Couldn't prepare wallet \u2014 tap to retry")) : shorten(row.address);
2428
- cryptoRows.push(
2465
+ const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? _nullishCoalesce(row.errorReason, () => ( "Couldn't prepare wallet \u2014 tap to retry")) : row.balanceStatus === "ready" && row.balanceUsd != null ? formatBalanceUsd(row.balanceUsd) : row.balanceStatus === "loading" ? "Checking balance\u2026" : shorten(row.address);
2466
+ pushBalanceSource(
2429
2467
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2430
2468
  ListRow,
2431
2469
  {
2432
2470
  leading: renderWalletLeading(row),
2433
2471
  title: collapseToExternal ? "External wallet" : row.label,
2434
2472
  subtitle: subtitleText,
2435
- onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _67 => _67(row.id)]),
2473
+ onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _72 => _72(row.id)]),
2436
2474
  disabled: row.state === "loading",
2437
2475
  trailing: renderRowTrailing(row.state)
2438
2476
  },
2439
2477
  row.id
2440
- )
2478
+ ),
2479
+ row.balanceStatus === "ready",
2480
+ _nullishCoalesce(row.balanceUsd, () => ( 0))
2441
2481
  );
2442
2482
  }
2443
2483
  if (!hasReownWallet && handleConnect) {
2444
- cryptoRows.push(
2484
+ pushAction(
2445
2485
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2446
2486
  ListRow,
2447
2487
  {
@@ -2456,7 +2496,7 @@ function ConnectStep({
2456
2496
  );
2457
2497
  }
2458
2498
  if (onSelectFundFromExchange) {
2459
- cryptoRows.push(
2499
+ pushAction(
2460
2500
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2461
2501
  ListRow,
2462
2502
  {
@@ -2473,7 +2513,7 @@ function ConnectStep({
2473
2513
  if (showDappImports) {
2474
2514
  for (const row of _nullishCoalesce(dappImports, () => ( []))) {
2475
2515
  if (!hasReownWallet) {
2476
- cryptoRows.push(
2516
+ pushBalanceSource(
2477
2517
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2478
2518
  ListRow,
2479
2519
  {
@@ -2484,12 +2524,14 @@ function ConnectStep({
2484
2524
  disabled: !handleConnect
2485
2525
  },
2486
2526
  row.id
2487
- )
2527
+ ),
2528
+ false,
2529
+ 0
2488
2530
  );
2489
2531
  continue;
2490
2532
  }
2491
2533
  if (row.status === "loading" || row.status === "needs-connect") {
2492
- cryptoRows.push(
2534
+ pushBalanceSource(
2493
2535
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2494
2536
  ListRow,
2495
2537
  {
@@ -2500,41 +2542,47 @@ function ConnectStep({
2500
2542
  trailing: SMALL_SPINNER
2501
2543
  },
2502
2544
  row.id
2503
- )
2545
+ ),
2546
+ false,
2547
+ 0
2504
2548
  );
2505
2549
  continue;
2506
2550
  }
2507
2551
  if (row.status.enabled) {
2508
- cryptoRows.push(
2552
+ pushBalanceSource(
2509
2553
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2510
2554
  ListRow,
2511
2555
  {
2512
2556
  leading: row.icon,
2513
2557
  title: row.label,
2514
2558
  subtitle: formatBalanceUsd(row.status.balanceUsd),
2515
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _68 => _68(row.id)])
2559
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _73 => _73(row.id)])
2516
2560
  },
2517
2561
  row.id
2518
- )
2562
+ ),
2563
+ true,
2564
+ row.status.balanceUsd
2519
2565
  );
2520
2566
  continue;
2521
2567
  }
2522
2568
  if (row.status.retryable) {
2523
- cryptoRows.push(
2569
+ pushBalanceSource(
2524
2570
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2525
2571
  ListRow,
2526
2572
  {
2527
2573
  leading: row.icon,
2528
2574
  title: row.label,
2529
2575
  subtitle: row.status.reason,
2530
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _69 => _69(row.id)])
2576
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _74 => _74(row.id)])
2531
2577
  },
2532
2578
  row.id
2533
- )
2579
+ ),
2580
+ false,
2581
+ 0
2534
2582
  );
2535
2583
  continue;
2536
2584
  }
2537
- cryptoRows.push(
2585
+ pushBalanceSource(
2538
2586
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2539
2587
  ListRow,
2540
2588
  {
@@ -2544,10 +2592,13 @@ function ConnectStep({
2544
2592
  disabled: true
2545
2593
  },
2546
2594
  row.id
2547
- )
2595
+ ),
2596
+ false,
2597
+ 0
2548
2598
  );
2549
2599
  }
2550
2600
  }
2601
+ const cryptoRows = rankCryptoRows(cryptoDescriptors);
2551
2602
  const cashRows = [];
2552
2603
  if (fiatPaymentMethods && fiatPaymentMethods.length > 0 && onSelectFiatMethod) {
2553
2604
  for (const opt of fiatPaymentMethods) {
@@ -2586,6 +2637,14 @@ function ConnectStep({
2586
2637
  const [tab, setTab] = _react.useState.call(void 0, defaultMethodTab);
2587
2638
  const activeTab = showToggle ? tab : hasCash && !hasCrypto ? "cash" : "crypto";
2588
2639
  const activeRows = activeTab === "cash" ? cashRows : cryptoRows;
2640
+ _react.useEffect.call(void 0, () => {
2641
+ if (activeTab !== "cash" || !onPrefetchFiatMethod || !fiatPaymentMethods) {
2642
+ return;
2643
+ }
2644
+ for (const opt of fiatPaymentMethods) {
2645
+ onPrefetchFiatMethod(opt.method);
2646
+ }
2647
+ }, [activeTab, onPrefetchFiatMethod, fiatPaymentMethods]);
2589
2648
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
2590
2649
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
2591
2650
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2696,8 +2755,8 @@ function Tooltip({ content, children, className }) {
2696
2755
  function handleOutside(event) {
2697
2756
  const target = event.target;
2698
2757
  if (!target) return;
2699
- if (_optionalChain([triggerRef, 'access', _70 => _70.current, 'optionalAccess', _71 => _71.contains, 'call', _72 => _72(target)])) return;
2700
- if (_optionalChain([bubbleRef, 'access', _73 => _73.current, 'optionalAccess', _74 => _74.contains, 'call', _75 => _75(target)])) return;
2758
+ if (_optionalChain([triggerRef, 'access', _75 => _75.current, 'optionalAccess', _76 => _76.contains, 'call', _77 => _77(target)])) return;
2759
+ if (_optionalChain([bubbleRef, 'access', _78 => _78.current, 'optionalAccess', _79 => _79.contains, 'call', _80 => _80(target)])) return;
2701
2760
  setOpen(false);
2702
2761
  }
2703
2762
  function handleKey(event) {
@@ -2864,7 +2923,7 @@ function asNumber(value) {
2864
2923
  const trimmed = value.trim();
2865
2924
  if (!trimmed) return void 0;
2866
2925
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
2867
- if (_optionalChain([caipMatch, 'optionalAccess', _76 => _76[1]])) {
2926
+ if (_optionalChain([caipMatch, 'optionalAccess', _81 => _81[1]])) {
2868
2927
  const parsed2 = Number(caipMatch[1]);
2869
2928
  return Number.isFinite(parsed2) ? parsed2 : void 0;
2870
2929
  }
@@ -2883,28 +2942,24 @@ function asAddress(value) {
2883
2942
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
2884
2943
  }
2885
2944
  function getEventTxHash(event) {
2886
- if (!_optionalChain([event, 'optionalAccess', _77 => _77.type])) return void 0;
2945
+ if (!_optionalChain([event, 'optionalAccess', _82 => _82.type])) return void 0;
2887
2946
  if (event.type === "deposit-received") {
2888
- return asString(_optionalChain([event, 'access', _78 => _78.data, 'optionalAccess', _79 => _79.transactionHash]));
2947
+ return asString(_optionalChain([event, 'access', _83 => _83.data, 'optionalAccess', _84 => _84.transactionHash]));
2889
2948
  }
2890
2949
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
2891
- const deposit = isRecord(_optionalChain([event, 'access', _80 => _80.data, 'optionalAccess', _81 => _81.deposit])) ? event.data.deposit : void 0;
2892
- const source = isRecord(_optionalChain([event, 'access', _82 => _82.data, 'optionalAccess', _83 => _83.source])) ? event.data.source : void 0;
2893
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _84 => _84.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _85 => _85.transactionHash]))));
2950
+ const deposit = isRecord(_optionalChain([event, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.deposit])) ? event.data.deposit : void 0;
2951
+ const source = isRecord(_optionalChain([event, 'access', _87 => _87.data, 'optionalAccess', _88 => _88.source])) ? event.data.source : void 0;
2952
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _89 => _89.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _90 => _90.transactionHash]))));
2894
2953
  }
2895
2954
  if (event.type === "bridge-failed" || event.type === "error") {
2896
- const deposit = isRecord(_optionalChain([event, 'access', _86 => _86.data, 'optionalAccess', _87 => _87.deposit])) ? event.data.deposit : void 0;
2897
- const source = isRecord(_optionalChain([event, 'access', _88 => _88.data, 'optionalAccess', _89 => _89.source])) ? event.data.source : void 0;
2898
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _90 => _90.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _91 => _91.transactionHash]))));
2899
- }
2900
- if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
2901
- const deposit = isRecord(_optionalChain([event, 'access', _92 => _92.data, 'optionalAccess', _93 => _93.deposit])) ? event.data.deposit : void 0;
2902
- return asString(_optionalChain([deposit, 'optionalAccess', _94 => _94.transactionHash]));
2955
+ const deposit = isRecord(_optionalChain([event, 'access', _91 => _91.data, 'optionalAccess', _92 => _92.deposit])) ? event.data.deposit : void 0;
2956
+ const source = isRecord(_optionalChain([event, 'access', _93 => _93.data, 'optionalAccess', _94 => _94.source])) ? event.data.source : void 0;
2957
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _95 => _95.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _96 => _96.transactionHash]))));
2903
2958
  }
2904
2959
  return void 0;
2905
2960
  }
2906
2961
  function getEventSourceDetails(event) {
2907
- if (!_optionalChain([event, 'optionalAccess', _95 => _95.type]) || !isRecord(event.data)) return {};
2962
+ if (!_optionalChain([event, 'optionalAccess', _97 => _97.type]) || !isRecord(event.data)) return {};
2908
2963
  if (event.type === "deposit-received") {
2909
2964
  return {
2910
2965
  chainId: asNumber(event.data.chain),
@@ -2914,11 +2969,11 @@ function getEventSourceDetails(event) {
2914
2969
  }
2915
2970
  const source = isRecord(event.data.source) ? event.data.source : void 0;
2916
2971
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
2917
- 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") {
2972
+ if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") {
2918
2973
  return {
2919
- chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _96 => _96.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _97 => _97.chain])))),
2920
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _98 => _98.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _99 => _99.amount])))),
2921
- token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _100 => _100.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _101 => _101.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _102 => _102.token]))))
2974
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _98 => _98.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _99 => _99.chain])))),
2975
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _100 => _100.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _101 => _101.amount])))),
2976
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _102 => _102.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _103 => _103.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _104 => _104.token]))))
2922
2977
  };
2923
2978
  }
2924
2979
  return {};
@@ -2930,8 +2985,8 @@ function asChain(value) {
2930
2985
  return asNumber(value);
2931
2986
  }
2932
2987
  function getEventDestinationDetails(event) {
2933
- if (!_optionalChain([event, 'optionalAccess', _103 => _103.type]) || !isRecord(event.data)) return {};
2934
- if (event.type !== "bridge-started" && event.type !== "bridge-complete" && event.type !== "post-bridge-swap-complete") {
2988
+ if (!_optionalChain([event, 'optionalAccess', _105 => _105.type]) || !isRecord(event.data)) return {};
2989
+ if (event.type !== "bridge-started" && event.type !== "bridge-complete") {
2935
2990
  return {};
2936
2991
  }
2937
2992
  const destination = isRecord(event.data.destination) ? event.data.destination : void 0;
@@ -2940,14 +2995,14 @@ function getEventDestinationDetails(event) {
2940
2995
  return {
2941
2996
  chainId: asChain(destination.chain),
2942
2997
  amount: asAmount(destination.amount),
2943
- token: _optionalChain([token, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()]) || void 0
2998
+ token: _optionalChain([token, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()]) || void 0
2944
2999
  };
2945
3000
  }
2946
3001
  function isDepositEvent(event) {
2947
- return _optionalChain([event, 'optionalAccess', _106 => _106.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _107 => _107.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _108 => _108.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "error";
3002
+ 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]) === "error";
2948
3003
  }
2949
3004
  function isFailedEvent(event) {
2950
- return _optionalChain([event, 'optionalAccess', _113 => _113.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _114 => _114.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _115 => _115.type]) === "error";
3005
+ return _optionalChain([event, 'optionalAccess', _113 => _113.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _114 => _114.type]) === "error";
2951
3006
  }
2952
3007
  function isHexString(value) {
2953
3008
  return value.startsWith("0x") || value.startsWith("0X");
@@ -2959,7 +3014,7 @@ function txRefsMatch(a, b) {
2959
3014
  return a === b;
2960
3015
  }
2961
3016
  function formatBridgeFailedMessage(event) {
2962
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _116 => _116.data]), () => ( {}));
3017
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _115 => _115.data]), () => ( {}));
2963
3018
  const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
2964
3019
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
2965
3020
  function toUserFacingFailure(raw) {
@@ -2987,7 +3042,7 @@ function formatBridgeFailedMessage(event) {
2987
3042
  return { message: "Bridge failed" };
2988
3043
  }
2989
3044
  function failureMessageForEvent(event) {
2990
- if (_optionalChain([event, 'optionalAccess', _117 => _117.type]) === "error") {
3045
+ if (_optionalChain([event, 'optionalAccess', _116 => _116.type]) === "error") {
2991
3046
  const message = isRecord(event.data) ? asString(event.data.message) : void 0;
2992
3047
  return _nullishCoalesce(message, () => ( "Unknown error"));
2993
3048
  }
@@ -3024,15 +3079,15 @@ function resolveTokenDisplay(token, chain, fallback) {
3024
3079
  const decimals = _chunkABVRVW3Pcjs.findTokenDecimals.call(void 0, token, chain);
3025
3080
  if (symbol !== "Token" || decimals !== void 0) {
3026
3081
  return {
3027
- symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _118 => _118.symbol]), () => ( symbol)),
3028
- decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _119 => _119.decimals])))
3082
+ symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _117 => _117.symbol]), () => ( symbol)),
3083
+ decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _118 => _118.decimals])))
3029
3084
  };
3030
3085
  }
3031
3086
  }
3032
3087
  }
3033
3088
  return {
3034
- symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _120 => _120.symbol]), () => ( "Token")),
3035
- decimals: _optionalChain([fallback, 'optionalAccess', _121 => _121.decimals])
3089
+ symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _119 => _119.symbol]), () => ( "Token")),
3090
+ decimals: _optionalChain([fallback, 'optionalAccess', _120 => _120.decimals])
3036
3091
  };
3037
3092
  }
3038
3093
  function maxFractionDigitsFor(symbol) {
@@ -3255,16 +3310,16 @@ function isEventForTx(event, txHash) {
3255
3310
  return txRefsMatch(eventTxHash, txHash);
3256
3311
  }
3257
3312
  function parseWebhookTimestamp(event) {
3258
- if (typeof _optionalChain([event, 'optionalAccess', _122 => _122.time]) !== "string") return void 0;
3313
+ if (typeof _optionalChain([event, 'optionalAccess', _121 => _121.time]) !== "string") return void 0;
3259
3314
  const timestamp = Date.parse(event.time);
3260
3315
  return Number.isFinite(timestamp) ? timestamp : void 0;
3261
3316
  }
3262
3317
  function syncPhaseTimings(previous, event) {
3263
- if (!_optionalChain([event, 'optionalAccess', _123 => _123.type])) return previous;
3318
+ if (!_optionalChain([event, 'optionalAccess', _122 => _122.type])) return previous;
3264
3319
  const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
3265
- 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;
3266
- const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
3267
- const setCompleted = (event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.completedAt === void 0;
3320
+ const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") && previous.receivedAt === void 0;
3321
+ const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete") && previous.bridgingAt === void 0;
3322
+ const setCompleted = event.type === "bridge-complete" && previous.completedAt === void 0;
3268
3323
  if (!setReceived && !setBridging && !setCompleted) return previous;
3269
3324
  return {
3270
3325
  ...previous,
@@ -3322,9 +3377,9 @@ function getCurrentPhaseId(state, phaseTimings) {
3322
3377
  if (state.type === "complete") {
3323
3378
  return void 0;
3324
3379
  }
3325
- if (_optionalChain([state, 'access', _124 => _124.lastEvent, 'optionalAccess', _125 => _125.type]) === "bridge-started" || _optionalChain([state, 'access', _126 => _126.lastEvent, 'optionalAccess', _127 => _127.type]) === "bridge-complete")
3380
+ if (_optionalChain([state, 'access', _123 => _123.lastEvent, 'optionalAccess', _124 => _124.type]) === "bridge-started" || _optionalChain([state, 'access', _125 => _125.lastEvent, 'optionalAccess', _126 => _126.type]) === "bridge-complete")
3326
3381
  return "bridging";
3327
- if (_optionalChain([state, 'access', _128 => _128.lastEvent, 'optionalAccess', _129 => _129.type]) === "deposit-received") return "received";
3382
+ if (_optionalChain([state, 'access', _127 => _127.lastEvent, 'optionalAccess', _128 => _128.type]) === "deposit-received") return "received";
3328
3383
  return "confirming";
3329
3384
  }
3330
3385
  function ProcessingStep({
@@ -3338,7 +3393,6 @@ function ProcessingStep({
3338
3393
  sourceSymbol: providedSourceSymbol,
3339
3394
  sourceDecimals: providedSourceDecimals,
3340
3395
  amountUsd,
3341
- hasPostBridgeActions,
3342
3396
  service,
3343
3397
  directTransfer,
3344
3398
  flowLabel = "deposit",
@@ -3368,8 +3422,7 @@ function ProcessingStep({
3368
3422
  sourceDecimals: providedSourceDecimals,
3369
3423
  amountUsd,
3370
3424
  targetChain,
3371
- targetToken,
3372
- hasPostBridgeActions
3425
+ targetToken
3373
3426
  });
3374
3427
  const onDepositCompleteRef = useLatestRef(onDepositComplete);
3375
3428
  const onDepositFailedRef = useLatestRef(onDepositFailed);
@@ -3410,7 +3463,7 @@ function ProcessingStep({
3410
3463
  flowLabel
3411
3464
  });
3412
3465
  const context = processingContextRef.current;
3413
- _optionalChain([onDepositCompleteRef, 'access', _130 => _130.current, 'optionalCall', _131 => _131(txHash, void 0, {
3466
+ _optionalChain([onDepositCompleteRef, 'access', _129 => _129.current, 'optionalCall', _130 => _130(txHash, void 0, {
3414
3467
  amount: context.amount,
3415
3468
  sourceChain: context.sourceChain,
3416
3469
  sourceToken: context.sourceToken,
@@ -3452,7 +3505,7 @@ function ProcessingStep({
3452
3505
  updatePhaseTimings(
3453
3506
  (previous) => syncPhaseTimings(previous, state.lastEvent)
3454
3507
  );
3455
- }, [_optionalChain([state, 'access', _132 => _132.lastEvent, 'optionalAccess', _133 => _133.time]), _optionalChain([state, 'access', _134 => _134.lastEvent, 'optionalAccess', _135 => _135.type]), updatePhaseTimings]);
3508
+ }, [_optionalChain([state, 'access', _131 => _131.lastEvent, 'optionalAccess', _132 => _132.time]), _optionalChain([state, 'access', _133 => _133.lastEvent, 'optionalAccess', _134 => _134.type]), updatePhaseTimings]);
3456
3509
  const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
3457
3510
  _react.useEffect.call(void 0, () => {
3458
3511
  let cancelled = false;
@@ -3460,7 +3513,7 @@ function ProcessingStep({
3460
3513
  if (cancelled || !res) return;
3461
3514
  if (res.transactionId != null) {
3462
3515
  if (res.transactionId.toLowerCase() !== txHash.toLowerCase()) return;
3463
- } else if (!isSwappedOrder || _optionalChain([swappedContext, 'optionalAccess', _136 => _136.variant]) === "connect") {
3516
+ } else if (!isSwappedOrder || _optionalChain([swappedContext, 'optionalAccess', _135 => _135.variant]) === "connect") {
3464
3517
  return;
3465
3518
  }
3466
3519
  setSwappedFiatContext({
@@ -3476,7 +3529,7 @@ function ProcessingStep({
3476
3529
  return () => {
3477
3530
  cancelled = true;
3478
3531
  };
3479
- }, [service, smartAccount, txHash, isSwappedOrder, _optionalChain([swappedContext, 'optionalAccess', _137 => _137.variant])]);
3532
+ }, [service, smartAccount, txHash, isSwappedOrder, _optionalChain([swappedContext, 'optionalAccess', _136 => _136.variant])]);
3480
3533
  _react.useEffect.call(void 0, () => {
3481
3534
  if (directTransfer) return;
3482
3535
  if (state.type !== "processing") {
@@ -3501,56 +3554,20 @@ function ProcessingStep({
3501
3554
  debugLog(debug, "processing", "poll:event", {
3502
3555
  type: lastEvent2.type,
3503
3556
  matchesTx: eventMatchesTx,
3504
- intentId: _optionalChain([eventData, 'optionalAccess', _138 => _138.intentId])
3557
+ intentId: _optionalChain([eventData, 'optionalAccess', _137 => _137.intentId])
3505
3558
  });
3506
3559
  }
3507
3560
  if (!isMounted) return;
3508
- const awaitingPostBridgeSwap = processingContextRef.current.hasPostBridgeActions;
3509
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _139 => _139.type]) === "post-bridge-swap-complete") {
3561
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _138 => _138.type]) === "bridge-complete") {
3510
3562
  setState({ type: "complete", lastEvent: eventForCurrentTx });
3511
- const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _140 => _140.data, 'optionalAccess', _141 => _141.swap, 'optionalAccess', _142 => _142.transactionHash]);
3512
- debugLog(debug, "processing", "state:complete", {
3513
- txHash,
3514
- destinationTxHash: swapTxHash,
3515
- event: eventForCurrentTx.type
3516
- });
3517
- const context = processingContextRef.current;
3518
- _optionalChain([onDepositCompleteRef, 'access', _143 => _143.current, 'optionalCall', _144 => _144(txHash, swapTxHash, {
3519
- amount: context.amount,
3520
- sourceChain: context.sourceChain,
3521
- sourceToken: context.sourceToken,
3522
- sourceDecimals: context.sourceDecimals,
3523
- amountUsd: context.amountUsd,
3524
- targetChain: context.targetChain,
3525
- targetToken: context.targetToken
3526
- })]);
3527
- return;
3528
- }
3529
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _145 => _145.type]) === "post-bridge-swap-failed") {
3530
- const formatted = formatBridgeFailedMessage(eventForCurrentTx);
3531
- setState({
3532
- type: "failed",
3533
- message: formatted.message,
3534
- lastEvent: eventForCurrentTx
3535
- });
3536
- debugLog(debug, "processing", "state:failed", {
3537
- txHash,
3538
- message: formatted.message,
3539
- code: formatted.code
3540
- });
3541
- _optionalChain([onDepositFailedRef, 'access', _146 => _146.current, 'optionalCall', _147 => _147(txHash, formatted.message)]);
3542
- return;
3543
- }
3544
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _148 => _148.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
3545
- setState({ type: "complete", lastEvent: eventForCurrentTx });
3546
- const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _149 => _149.data, 'optionalAccess', _150 => _150.destination, 'optionalAccess', _151 => _151.transactionHash]);
3563
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _139 => _139.data, 'optionalAccess', _140 => _140.destination, 'optionalAccess', _141 => _141.transactionHash]);
3547
3564
  debugLog(debug, "processing", "state:complete", {
3548
3565
  txHash,
3549
3566
  destinationTxHash: destinationTxHash2,
3550
3567
  event: eventForCurrentTx.type
3551
3568
  });
3552
3569
  const context = processingContextRef.current;
3553
- _optionalChain([onDepositCompleteRef, 'access', _152 => _152.current, 'optionalCall', _153 => _153(txHash, destinationTxHash2, {
3570
+ _optionalChain([onDepositCompleteRef, 'access', _142 => _142.current, 'optionalCall', _143 => _143(txHash, destinationTxHash2, {
3554
3571
  amount: context.amount,
3555
3572
  sourceChain: context.sourceChain,
3556
3573
  sourceToken: context.sourceToken,
@@ -3561,7 +3578,7 @@ function ProcessingStep({
3561
3578
  })]);
3562
3579
  return;
3563
3580
  }
3564
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _154 => _154.type]) === "bridge-failed") {
3581
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _144 => _144.type]) === "bridge-failed") {
3565
3582
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
3566
3583
  setState({
3567
3584
  type: "failed",
@@ -3573,11 +3590,11 @@ function ProcessingStep({
3573
3590
  message: formatted.message,
3574
3591
  code: formatted.code
3575
3592
  });
3576
- _optionalChain([onDepositFailedRef, 'access', _155 => _155.current, 'optionalCall', _156 => _156(txHash, formatted.message)]);
3593
+ _optionalChain([onDepositFailedRef, 'access', _145 => _145.current, 'optionalCall', _146 => _146(txHash, formatted.message)]);
3577
3594
  return;
3578
3595
  }
3579
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _157 => _157.type]) === "error") {
3580
- const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _158 => _158.data, 'optionalAccess', _159 => _159.message]), () => ( "Unknown error"));
3596
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _147 => _147.type]) === "error") {
3597
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _148 => _148.data, 'optionalAccess', _149 => _149.message]), () => ( "Unknown error"));
3581
3598
  setState({
3582
3599
  type: "failed",
3583
3600
  message: errorMessage,
@@ -3587,7 +3604,7 @@ function ProcessingStep({
3587
3604
  txHash,
3588
3605
  message: errorMessage
3589
3606
  });
3590
- _optionalChain([onDepositFailedRef, 'access', _160 => _160.current, 'optionalCall', _161 => _161(txHash, errorMessage)]);
3607
+ _optionalChain([onDepositFailedRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(txHash, errorMessage)]);
3591
3608
  return;
3592
3609
  }
3593
3610
  setState((previous) => ({
@@ -3648,7 +3665,7 @@ function ProcessingStep({
3648
3665
  txHash,
3649
3666
  timeoutMs: ESCALATED_DELAY_MS
3650
3667
  });
3651
- _optionalChain([onErrorRef, 'access', _162 => _162.current, 'optionalCall', _163 => _163(message, "PROCESS_TIMEOUT")]);
3668
+ _optionalChain([onErrorRef, 'access', _152 => _152.current, 'optionalCall', _153 => _153(message, "PROCESS_TIMEOUT")]);
3652
3669
  }, ESCALATED_DELAY_MS);
3653
3670
  return () => clearTimeout(timeoutId);
3654
3671
  }, [debug, directTransfer, onErrorRef, state.type, txHash]);
@@ -3660,8 +3677,7 @@ function ProcessingStep({
3660
3677
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
3661
3678
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
3662
3679
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
3663
- const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _164 => _164.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _165 => _165.type]) === "post-bridge-swap-failed";
3664
- const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _166 => _166.data, 'optionalAccess', _167 => _167.swap, 'optionalAccess', _168 => _168.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _169 => _169.data, 'optionalAccess', _170 => _170.destination, 'optionalAccess', _171 => _171.transactionHash]) || null;
3680
+ const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _154 => _154.data, 'optionalAccess', _155 => _155.destination, 'optionalAccess', _156 => _156.transactionHash]) || null;
3665
3681
  const sourceDetails = getEventSourceDetails(lastEvent);
3666
3682
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
3667
3683
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
@@ -3681,8 +3697,7 @@ function ProcessingStep({
3681
3697
  const sourceSymbol = sourceDisplay.symbol;
3682
3698
  const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(formatRawTokenAmount(displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
3683
3699
  formatTokenAmount(Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
3684
- const isBridgeHopDestination = hasPostBridgeActions && (_optionalChain([lastEvent, 'optionalAccess', _172 => _172.type]) === "bridge-started" || _optionalChain([lastEvent, 'optionalAccess', _173 => _173.type]) === "bridge-complete");
3685
- const eventDestination = isBridgeHopDestination ? {} : getEventDestinationDetails(lastEvent);
3700
+ const eventDestination = getEventDestinationDetails(lastEvent);
3686
3701
  const targetDisplay = resolveTokenDisplay(
3687
3702
  _nullishCoalesce(eventDestination.token, () => ( targetToken)),
3688
3703
  _nullishCoalesce(eventDestination.chainId, () => ( targetChain)),
@@ -3740,8 +3755,8 @@ function ProcessingStep({
3740
3755
  const sourceChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, displaySourceChain);
3741
3756
  const targetChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
3742
3757
  const timerText = formatTimer(elapsedSeconds);
3743
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _174 => _174.feeSponsored]), () => ( false));
3744
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _175 => _175.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3758
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _157 => _157.feeSponsored]), () => ( false));
3759
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _158 => _158.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3745
3760
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
3746
3761
  const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
3747
3762
  const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
@@ -3752,16 +3767,16 @@ function ProcessingStep({
3752
3767
  /* @__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 }) })
3753
3768
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
3754
3769
  if (isComplete && isSwappedOrder) {
3755
- const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _176 => _176.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _177 => _177.paymentMethod]))), () => ( null));
3770
+ const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _159 => _159.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _160 => _160.paymentMethod]))), () => ( null));
3756
3771
  const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
3757
- const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _178 => _178.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
3772
+ const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _161 => _161.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
3758
3773
  _nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
3759
3774
  effectivePaymentMethod
3760
3775
  ) : null;
3761
- const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _179 => _179.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
3762
- const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _180 => _180.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
3776
+ const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _162 => _162.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
3777
+ const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _163 => _163.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
3763
3778
  const depositedAmount = receiveDisplay;
3764
- const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _181 => _181.onrampFeeUsd]), () => ( null));
3779
+ const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _164 => _164.onrampFeeUsd]), () => ( null));
3765
3780
  const networkFeeUsd = quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount)) ? Number(quotedFeeAmount) : null;
3766
3781
  const feeRows = [];
3767
3782
  if (onrampFeeUsd != null) {
@@ -3838,7 +3853,7 @@ function ProcessingStep({
3838
3853
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
3839
3854
  ] }),
3840
3855
  isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3841
- _optionalChain([swappedFiatContext, 'optionalAccess', _182 => _182.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3856
+ _optionalChain([swappedFiatContext, 'optionalAccess', _165 => _165.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3842
3857
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
3843
3858
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3844
3859
  "$",
@@ -3850,7 +3865,7 @@ function ProcessingStep({
3850
3865
  ] })
3851
3866
  ] })
3852
3867
  ] }),
3853
- _optionalChain([swappedFiatContext, 'optionalAccess', _183 => _183.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3868
+ _optionalChain([swappedFiatContext, 'optionalAccess', _166 => _166.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3854
3869
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
3855
3870
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3856
3871
  "$",
@@ -4083,4 +4098,5 @@ function accountFromPrivateKey(privateKey) {
4083
4098
 
4084
4099
 
4085
4100
 
4086
- 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.getPublicClient = getPublicClient; exports.getHyperEvmReadClient = getHyperEvmReadClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
4101
+
4102
+ 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;