@rhinestone/deposit-modal 0.1.46 → 0.1.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{DepositModalReown-23JR6Q4C.mjs → DepositModalReown-3V2EFXH5.mjs} +3 -3
  2. package/dist/{DepositModalReown-QSRCNLSN.cjs → DepositModalReown-SV6QIUTL.cjs} +4 -4
  3. package/dist/{WithdrawModalReown-FM2TJFOV.mjs → WithdrawModalReown-FODH7PY5.mjs} +3 -3
  4. package/dist/{WithdrawModalReown-CT6E2F2J.cjs → WithdrawModalReown-ZSR3RP44.cjs} +4 -4
  5. package/dist/{chunk-55QIUUIS.cjs → chunk-7HJ7IBRH.cjs} +68 -52
  6. package/dist/{chunk-U6KOKXWY.mjs → chunk-FKNYONM2.mjs} +44 -28
  7. package/dist/{chunk-4MKJ5R6Q.mjs → chunk-HCZNF6CR.mjs} +3 -3
  8. package/dist/{chunk-ZNHU72LI.cjs → chunk-NELAYNA3.cjs} +7 -5
  9. package/dist/{chunk-2EGNK737.cjs → chunk-PW55TOFK.cjs} +60 -60
  10. package/dist/{chunk-B2VXZW4V.mjs → chunk-ZAQISJAP.mjs} +22 -5
  11. package/dist/{chunk-AVASFOLP.mjs → chunk-ZJQZEIHA.mjs} +7 -5
  12. package/dist/{chunk-2XGN65KA.cjs → chunk-ZK6VAHSB.cjs} +237 -220
  13. package/dist/constants.cjs +2 -2
  14. package/dist/constants.mjs +1 -1
  15. package/dist/deposit.cjs +4 -4
  16. package/dist/deposit.d.cts +2 -2
  17. package/dist/deposit.d.ts +2 -2
  18. package/dist/deposit.mjs +3 -3
  19. package/dist/index.cjs +5 -5
  20. package/dist/index.d.cts +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.mjs +4 -4
  23. package/dist/reown.cjs +5 -5
  24. package/dist/reown.d.cts +1 -1
  25. package/dist/reown.d.ts +1 -1
  26. package/dist/reown.mjs +4 -4
  27. package/dist/{types-DQG7NEBI.d.ts → types-B0FLVdXb.d.ts} +6 -1
  28. package/dist/{types-CyUiKQ4H.d.cts → types-dY70pF2y.d.cts} +6 -1
  29. package/dist/withdraw.cjs +4 -4
  30. package/dist/withdraw.d.cts +2 -2
  31. package/dist/withdraw.d.ts +2 -2
  32. package/dist/withdraw.mjs +3 -3
  33. package/package.json +1 -1
@@ -25,7 +25,7 @@
25
25
 
26
26
 
27
27
 
28
- var _chunk55QIUUIScjs = require('./chunk-55QIUUIS.cjs');
28
+ var _chunk7HJ7IBRHcjs = require('./chunk-7HJ7IBRH.cjs');
29
29
 
30
30
 
31
31
 
@@ -41,7 +41,7 @@ var _chunk55QIUUIScjs = require('./chunk-55QIUUIS.cjs');
41
41
 
42
42
 
43
43
 
44
- var _chunkZNHU72LIcjs = require('./chunk-ZNHU72LI.cjs');
44
+ var _chunkNELAYNA3cjs = require('./chunk-NELAYNA3.cjs');
45
45
 
46
46
  // src/DepositModal.tsx
47
47
 
@@ -62,15 +62,15 @@ var _viem = require('viem');
62
62
 
63
63
  var _jsxruntime = require('react/jsx-runtime');
64
64
  async function resolveSessionOwner(eoaAddress) {
65
- const localOwner = _chunk55QIUUIScjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
65
+ const localOwner = _chunk7HJ7IBRHcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
66
66
  if (localOwner) {
67
67
  return {
68
- account: _chunk55QIUUIScjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
68
+ account: _chunk7HJ7IBRHcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
69
69
  address: localOwner.address
70
70
  };
71
71
  }
72
- const created = _chunk55QIUUIScjs.createSessionOwnerKey.call(void 0, );
73
- _chunk55QIUUIScjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
72
+ const created = _chunk7HJ7IBRHcjs.createSessionOwnerKey.call(void 0, );
73
+ _chunk7HJ7IBRHcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
74
74
  return {
75
75
  account: created.account,
76
76
  address: created.address
@@ -105,7 +105,7 @@ function SetupStep({
105
105
  const setup = await service.setupAccount({
106
106
  ownerAddress: address,
107
107
  sessionOwnerAddress: sessionOwner.address,
108
- targetChain: _chunk55QIUUIScjs.toEvmCaip2.call(void 0, targetChain),
108
+ targetChain: _chunk7HJ7IBRHcjs.toEvmCaip2.call(void 0, targetChain),
109
109
  targetToken,
110
110
  signerAddress,
111
111
  sessionChainIds,
@@ -132,7 +132,7 @@ function SetupStep({
132
132
  primaryType: typedData.primaryType,
133
133
  message: typedData.message
134
134
  });
135
- const sessionDetails = _chunk55QIUUIScjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
135
+ const sessionDetails = _chunk7HJ7IBRHcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
136
136
  setState({ type: "registering" });
137
137
  const registerResult = await service.registerAccount({
138
138
  address: smartAccount,
@@ -144,7 +144,7 @@ function SetupStep({
144
144
  eoaAddress: address,
145
145
  sessionOwner: sessionOwner.address,
146
146
  target: {
147
- chain: _chunk55QIUUIScjs.toEvmCaip2.call(void 0, targetChain),
147
+ chain: _chunk7HJ7IBRHcjs.toEvmCaip2.call(void 0, targetChain),
148
148
  token: targetToken,
149
149
  ...recipient && { recipient }
150
150
  }
@@ -203,7 +203,7 @@ function SetupStep({
203
203
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
204
204
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
205
205
  isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
206
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
206
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
207
207
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
208
208
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
209
209
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
@@ -240,7 +240,7 @@ function SetupStep({
240
240
  ] })
241
241
  ] })
242
242
  ] }),
243
- isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
243
+ isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
244
244
  ] });
245
245
  }
246
246
 
@@ -253,6 +253,7 @@ function AssetSelectStep({
253
253
  publicClient,
254
254
  defaultSourceChain,
255
255
  defaultSourceToken,
256
+ allowedRoutes,
256
257
  service,
257
258
  onContinue,
258
259
  onTotalBalanceComputed,
@@ -264,7 +265,7 @@ function AssetSelectStep({
264
265
  const [error, setError] = _react.useState.call(void 0, null);
265
266
  const defaultAssetId = _react.useMemo.call(void 0, () => {
266
267
  if (!defaultSourceChain || !defaultSourceToken) return null;
267
- return _chunk55QIUUIScjs.getAssetId.call(void 0, {
268
+ return _chunk7HJ7IBRHcjs.getAssetId.call(void 0, {
268
269
  chainId: defaultSourceChain,
269
270
  token: defaultSourceToken
270
271
  });
@@ -281,10 +282,10 @@ function AssetSelectStep({
281
282
  try {
282
283
  const portfolio = await service.fetchPortfolio(address);
283
284
  if (!active) return;
284
- const portfolioAssets = _chunk55QIUUIScjs.portfolioToAssets.call(void 0, portfolio.tokens);
285
+ const portfolioAssets = _chunk7HJ7IBRHcjs.portfolioToAssets.call(void 0, portfolio.tokens);
285
286
  setAssets(portfolioAssets);
286
287
  const hasNative = portfolioAssets.some(
287
- (asset) => asset.token.toLowerCase() === _chunkZNHU72LIcjs.NATIVE_TOKEN_ADDRESS
288
+ (asset) => asset.token.toLowerCase() === _chunkNELAYNA3cjs.NATIVE_TOKEN_ADDRESS
288
289
  );
289
290
  if (!hasNative) {
290
291
  const nativeAssets = await fetchNativeAssets(
@@ -325,13 +326,25 @@ function AssetSelectStep({
325
326
  _optionalChain([onTotalBalanceComputed, 'optionalCall', _4 => _4(total)]);
326
327
  if (assets.length > 0) _optionalChain([onAssetsLoaded, 'optionalCall', _5 => _5(assets)]);
327
328
  }, [assets, onTotalBalanceComputed, onAssetsLoaded]);
329
+ const allowedChainSet = _react.useMemo.call(void 0,
330
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _6 => _6.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
331
+ [_optionalChain([allowedRoutes, 'optionalAccess', _7 => _7.sourceChains])]
332
+ );
333
+ const allowedTokenSet = _react.useMemo.call(void 0,
334
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _8 => _8.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
335
+ [_optionalChain([allowedRoutes, 'optionalAccess', _9 => _9.sourceTokens])]
336
+ );
328
337
  const rows = _react.useMemo.call(void 0, () => {
329
338
  return assets.filter((a) => {
330
339
  try {
331
- return BigInt(_nullishCoalesce(a.balance, () => ( "0"))) > BigInt(0);
340
+ if (BigInt(_nullishCoalesce(a.balance, () => ( "0"))) <= BigInt(0)) return false;
332
341
  } catch (e2) {
333
342
  return false;
334
343
  }
344
+ if (allowedChainSet && !allowedChainSet.has(a.chainId)) return false;
345
+ if (allowedTokenSet && !allowedTokenSet.has(a.symbol.toUpperCase()))
346
+ return false;
347
+ return true;
335
348
  }).sort((a, b) => {
336
349
  const usdA = _nullishCoalesce(a.balanceUsd, () => ( 0));
337
350
  const usdB = _nullishCoalesce(b.balanceUsd, () => ( 0));
@@ -342,7 +355,7 @@ function AssetSelectStep({
342
355
  if (balB < balA) return -1;
343
356
  return 0;
344
357
  });
345
- }, [assets]);
358
+ }, [assets, allowedChainSet, allowedTokenSet]);
346
359
  const selectedAsset = selectedAssetId && assets.find((asset) => asset.id === selectedAssetId);
347
360
  const formatBalance = (asset) => {
348
361
  if (!asset.balance) return "--";
@@ -350,7 +363,7 @@ function AssetSelectStep({
350
363
  const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
351
364
  const numeric = Number(raw);
352
365
  if (!Number.isFinite(numeric)) return raw;
353
- return _chunk55QIUUIScjs.tokenFormatter.format(numeric);
366
+ return _chunk7HJ7IBRHcjs.tokenFormatter.format(numeric);
354
367
  } catch (e3) {
355
368
  return asset.balance;
356
369
  }
@@ -364,7 +377,7 @@ function AssetSelectStep({
364
377
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
365
378
  children: [
366
379
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
367
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.Spinner, { className: "rs-text-tertiary" }),
380
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.Spinner, { className: "rs-text-tertiary" }),
368
381
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
369
382
  ] }),
370
383
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-alert-text", children: error }) }),
@@ -397,9 +410,9 @@ function AssetSelectStep({
397
410
  !loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((asset) => {
398
411
  const isSelected = selectedAssetId === asset.id;
399
412
  const tokenAmount = formatBalance(asset);
400
- const badge = _chunkZNHU72LIcjs.getChainBadge.call(void 0, asset.chainId);
401
- const tokenIcon = _chunkZNHU72LIcjs.getTokenIcon.call(void 0, asset.symbol);
402
- const chainIcon = _chunkZNHU72LIcjs.getChainIcon.call(void 0, asset.chainId);
413
+ const badge = _chunkNELAYNA3cjs.getChainBadge.call(void 0, asset.chainId);
414
+ const tokenIcon = _chunkNELAYNA3cjs.getTokenIcon.call(void 0, asset.symbol);
415
+ const chainIcon = _chunkNELAYNA3cjs.getChainIcon.call(void 0, asset.chainId);
403
416
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
404
417
  "button",
405
418
  {
@@ -423,7 +436,7 @@ function AssetSelectStep({
423
436
  "img",
424
437
  {
425
438
  src: chainIcon,
426
- alt: _chunkZNHU72LIcjs.getChainName.call(void 0, asset.chainId),
439
+ alt: _chunkNELAYNA3cjs.getChainName.call(void 0, asset.chainId),
427
440
  className: "rs-asset-chain-badge"
428
441
  }
429
442
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -444,7 +457,7 @@ function AssetSelectStep({
444
457
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-asset-chain", children: [
445
458
  " ",
446
459
  "on ",
447
- _chunkZNHU72LIcjs.getChainName.call(void 0, asset.chainId)
460
+ _chunkNELAYNA3cjs.getChainName.call(void 0, asset.chainId)
448
461
  ] })
449
462
  ] }),
450
463
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-balance-small", children: [
@@ -454,7 +467,7 @@ function AssetSelectStep({
454
467
  ] })
455
468
  ] })
456
469
  ] }),
457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunk55QIUUIScjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
470
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunk7HJ7IBRHcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
458
471
  ]
459
472
  },
460
473
  asset.id
@@ -464,7 +477,7 @@ function AssetSelectStep({
464
477
  }
465
478
  ),
466
479
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
467
- _chunk55QIUUIScjs.Button,
480
+ _chunk7HJ7IBRHcjs.Button,
468
481
  {
469
482
  onClick: () => selectedAsset && onContinue(selectedAsset),
470
483
  disabled: !selectedAsset,
@@ -472,17 +485,17 @@ function AssetSelectStep({
472
485
  children: "Continue"
473
486
  }
474
487
  ) }),
475
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.PoweredBy, {})
488
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
476
489
  ] });
477
490
  }
478
491
  async function fetchNativeAssets(address, publicClient, existing) {
479
492
  const existingIds = new Set(existing.map((asset) => asset.id));
480
- const connectedChainId = _optionalChain([publicClient, 'access', _6 => _6.chain, 'optionalAccess', _7 => _7.id]);
493
+ const connectedChainId = _optionalChain([publicClient, 'access', _10 => _10.chain, 'optionalAccess', _11 => _11.id]);
481
494
  if (!connectedChainId) return [];
482
- if (!_chunkZNHU72LIcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
483
- const id = _chunk55QIUUIScjs.getAssetId.call(void 0, {
495
+ if (!_chunkNELAYNA3cjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
496
+ const id = _chunk7HJ7IBRHcjs.getAssetId.call(void 0, {
484
497
  chainId: connectedChainId,
485
- token: _chunkZNHU72LIcjs.NATIVE_TOKEN_ADDRESS
498
+ token: _chunkNELAYNA3cjs.NATIVE_TOKEN_ADDRESS
486
499
  });
487
500
  if (existingIds.has(id)) return [];
488
501
  try {
@@ -491,7 +504,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
491
504
  {
492
505
  id,
493
506
  chainId: connectedChainId,
494
- token: _chunkZNHU72LIcjs.NATIVE_TOKEN_ADDRESS,
507
+ token: _chunkNELAYNA3cjs.NATIVE_TOKEN_ADDRESS,
495
508
  symbol: "ETH",
496
509
  name: "Ethereum",
497
510
  decimals: 18,
@@ -539,10 +552,10 @@ function AmountStep({
539
552
  const [isSwitching, setIsSwitching] = _react.useState.call(void 0, false);
540
553
  const hasAttemptedSwitch = _react.useRef.call(void 0, false);
541
554
  const chainMismatch = Boolean(
542
- _optionalChain([walletClient, 'optionalAccess', _8 => _8.chain, 'optionalAccess', _9 => _9.id]) && walletClient.chain.id !== asset.chainId
555
+ _optionalChain([walletClient, 'optionalAccess', _12 => _12.chain, 'optionalAccess', _13 => _13.id]) && walletClient.chain.id !== asset.chainId
543
556
  );
544
- const targetSymbol = _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
545
- const isSourceStablecoin = _chunkZNHU72LIcjs.isStablecoinSymbol.call(void 0, asset.symbol);
557
+ const targetSymbol = _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
558
+ const isSourceStablecoin = _chunkNELAYNA3cjs.isStablecoinSymbol.call(void 0, asset.symbol);
546
559
  const tokenPriceUsd = _react.useMemo.call(void 0, () => {
547
560
  if (tokenPriceUsdOverride !== void 0 && tokenPriceUsdOverride > 0)
548
561
  return tokenPriceUsdOverride;
@@ -566,7 +579,7 @@ function AmountStep({
566
579
  const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
567
580
  if (!balanceTarget || !publicClient) return;
568
581
  try {
569
- const bal = _chunk55QIUUIScjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
582
+ const bal = _chunk7HJ7IBRHcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
570
583
  address: asset.token,
571
584
  abi: _viem.erc20Abi,
572
585
  functionName: "balanceOf",
@@ -592,7 +605,7 @@ function AmountStep({
592
605
  setIsSwitching(true);
593
606
  switchChain(asset.chainId).catch((err) => {
594
607
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
595
- setError(_chunk55QIUUIScjs.formatUserError.call(void 0, raw));
608
+ setError(_chunk7HJ7IBRHcjs.formatUserError.call(void 0, raw));
596
609
  }).finally(() => {
597
610
  setIsSwitching(false);
598
611
  });
@@ -620,7 +633,7 @@ function AmountStep({
620
633
  }
621
634
  }, [balance, tokenPriceUsd, asset.decimals]);
622
635
  _react.useEffect.call(void 0, () => {
623
- _optionalChain([onBalanceUsdChange, 'optionalCall', _10 => _10(_nullishCoalesce(balanceUsd, () => ( 0)))]);
636
+ _optionalChain([onBalanceUsdChange, 'optionalCall', _14 => _14(_nullishCoalesce(balanceUsd, () => ( 0)))]);
624
637
  }, [balanceUsd, onBalanceUsdChange]);
625
638
  const formattedBalance = _react.useMemo.call(void 0, () => {
626
639
  if (balance === null) return "...";
@@ -628,7 +641,7 @@ function AmountStep({
628
641
  const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
629
642
  const numeric = Number(raw);
630
643
  if (!Number.isFinite(numeric)) return raw;
631
- return _chunk55QIUUIScjs.tokenFormatter.format(numeric);
644
+ return _chunk7HJ7IBRHcjs.tokenFormatter.format(numeric);
632
645
  } catch (e8) {
633
646
  return "...";
634
647
  }
@@ -668,15 +681,15 @@ function AmountStep({
668
681
  }
669
682
  if (hasPricing) {
670
683
  const usdValue = numericAmount;
671
- if (_optionalChain([uiConfig, 'optionalAccess', _11 => _11.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
684
+ if (_optionalChain([uiConfig, 'optionalAccess', _15 => _15.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
672
685
  setError(
673
- `Maximum deposit is ${_chunk55QIUUIScjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
686
+ `Maximum deposit is ${_chunk7HJ7IBRHcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
674
687
  );
675
688
  return;
676
689
  }
677
- if (_optionalChain([uiConfig, 'optionalAccess', _12 => _12.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
690
+ if (_optionalChain([uiConfig, 'optionalAccess', _16 => _16.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
678
691
  setError(
679
- `Minimum deposit is ${_chunk55QIUUIScjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
692
+ `Minimum deposit is ${_chunk7HJ7IBRHcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
680
693
  );
681
694
  return;
682
695
  }
@@ -725,7 +738,7 @@ function AmountStep({
725
738
  hasPricing && balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
726
739
  " ",
727
740
  "(",
728
- _chunk55QIUUIScjs.currencyFormatter.format(balanceUsd),
741
+ _chunk7HJ7IBRHcjs.currencyFormatter.format(balanceUsd),
729
742
  ")"
730
743
  ] })
731
744
  ] }) })
@@ -739,26 +752,26 @@ function AmountStep({
739
752
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-flow-pill-label", children: "You send" }),
740
753
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token", children: [
741
754
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token-icon-wrapper", children: [
742
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, asset.symbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
755
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, asset.symbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
743
756
  "img",
744
757
  {
745
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, asset.symbol),
758
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, asset.symbol),
746
759
  alt: asset.symbol
747
760
  }
748
761
  ) : asset.symbol.slice(0, 2) }),
749
762
  (() => {
750
- const chainIcon = _chunkZNHU72LIcjs.getChainIcon.call(void 0, asset.chainId);
763
+ const chainIcon = _chunkNELAYNA3cjs.getChainIcon.call(void 0, asset.chainId);
751
764
  if (chainIcon) {
752
765
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
753
766
  "img",
754
767
  {
755
768
  src: chainIcon,
756
- alt: _chunkZNHU72LIcjs.getChainName.call(void 0, asset.chainId),
769
+ alt: _chunkNELAYNA3cjs.getChainName.call(void 0, asset.chainId),
757
770
  className: "rs-flow-pill-chain-badge"
758
771
  }
759
772
  );
760
773
  }
761
- const badge = _chunkZNHU72LIcjs.getChainBadge.call(void 0, asset.chainId);
774
+ const badge = _chunkNELAYNA3cjs.getChainBadge.call(void 0, asset.chainId);
762
775
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
763
776
  "div",
764
777
  {
@@ -796,26 +809,26 @@ function AmountStep({
796
809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-flow-pill-label", children: "You receive" }),
797
810
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token", children: [
798
811
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token-icon-wrapper", children: [
799
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, targetSymbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
812
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, targetSymbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
800
813
  "img",
801
814
  {
802
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, targetSymbol),
815
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, targetSymbol),
803
816
  alt: targetSymbol
804
817
  }
805
818
  ) : targetSymbol.slice(0, 2) }),
806
819
  (() => {
807
- const chainIcon = _chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain);
820
+ const chainIcon = _chunkNELAYNA3cjs.getChainIcon.call(void 0, targetChain);
808
821
  if (chainIcon) {
809
822
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
810
823
  "img",
811
824
  {
812
825
  src: chainIcon,
813
- alt: _chunkZNHU72LIcjs.getChainName.call(void 0, targetChain),
826
+ alt: _chunkNELAYNA3cjs.getChainName.call(void 0, targetChain),
814
827
  className: "rs-flow-pill-chain-badge"
815
828
  }
816
829
  );
817
830
  }
818
- const badge = _chunkZNHU72LIcjs.getChainBadge.call(void 0, targetChain);
831
+ const badge = _chunkNELAYNA3cjs.getChainBadge.call(void 0, targetChain);
819
832
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
820
833
  "div",
821
834
  {
@@ -884,7 +897,7 @@ function AmountStep({
884
897
  ] })
885
898
  ] }),
886
899
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
887
- _chunk55QIUUIScjs.Button,
900
+ _chunk7HJ7IBRHcjs.Button,
888
901
  {
889
902
  onClick: handleContinue,
890
903
  fullWidth: true,
@@ -892,7 +905,7 @@ function AmountStep({
892
905
  children: "Continue"
893
906
  }
894
907
  ) }),
895
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.PoweredBy, {})
908
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
896
909
  ] });
897
910
  }
898
911
 
@@ -921,9 +934,9 @@ function ConfirmStep({
921
934
  const [error, setError] = _react.useState.call(void 0, null);
922
935
  const [isSwitching, setIsSwitching] = _react.useState.call(void 0, false);
923
936
  const hasAttemptedSwitch = _react.useRef.call(void 0, false);
924
- const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _13 => _13.chain, 'optionalAccess', _14 => _14.id]) && walletClient.chain.id !== asset.chainId;
937
+ const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _17 => _17.chain, 'optionalAccess', _18 => _18.id]) && walletClient.chain.id !== asset.chainId;
925
938
  const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
926
- const targetSymbol = sameRoute ? asset.symbol : _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
939
+ const targetSymbol = sameRoute ? asset.symbol : _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
927
940
  const formattedSendAmount = amount && !Number.isNaN(Number(amount)) ? Number(amount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
928
941
  const formattedReceiveAmount = (() => {
929
942
  if (sameRoute) return formattedSendAmount;
@@ -942,7 +955,7 @@ function ConfirmStep({
942
955
  setIsSwitching(true);
943
956
  switchChain(asset.chainId).catch((err) => {
944
957
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
945
- setError(_chunk55QIUUIScjs.formatUserError.call(void 0, raw));
958
+ setError(_chunk7HJ7IBRHcjs.formatUserError.call(void 0, raw));
946
959
  }).finally(() => {
947
960
  setIsSwitching(false);
948
961
  });
@@ -957,7 +970,7 @@ function ConfirmStep({
957
970
  return;
958
971
  }
959
972
  if (chainMismatch) {
960
- setError(`Switch to ${_chunkZNHU72LIcjs.getChainName.call(void 0, asset.chainId)} to sign`);
973
+ setError(`Switch to ${_chunkNELAYNA3cjs.getChainName.call(void 0, asset.chainId)} to sign`);
961
974
  return;
962
975
  }
963
976
  const parsedAmount = parseFloat(amount);
@@ -985,7 +998,7 @@ function ConfirmStep({
985
998
  throw new Error("Wallet not properly connected");
986
999
  }
987
1000
  const transferTo = sameRoute ? recipient : smartAccount;
988
- const hash = _chunk55QIUUIScjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1001
+ const hash = _chunk7HJ7IBRHcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
989
1002
  account,
990
1003
  chain,
991
1004
  to: transferTo,
@@ -998,13 +1011,13 @@ function ConfirmStep({
998
1011
  functionName: "transfer",
999
1012
  args: [transferTo, amountUnits]
1000
1013
  });
1001
- _optionalChain([onDepositSubmitted, 'optionalCall', _15 => _15(hash, asset.chainId, amountUnits.toString())]);
1014
+ _optionalChain([onDepositSubmitted, 'optionalCall', _19 => _19(hash, asset.chainId, amountUnits.toString())]);
1002
1015
  onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
1003
1016
  } catch (err) {
1004
1017
  const raw = err instanceof Error ? err.message : "Transfer failed";
1005
- const message = _chunk55QIUUIScjs.formatUserError.call(void 0, raw);
1018
+ const message = _chunk7HJ7IBRHcjs.formatUserError.call(void 0, raw);
1006
1019
  setError(message);
1007
- _optionalChain([onError, 'optionalCall', _16 => _16(message, "TRANSFER_ERROR")]);
1020
+ _optionalChain([onError, 'optionalCall', _20 => _20(message, "TRANSFER_ERROR")]);
1008
1021
  } finally {
1009
1022
  setIsSubmitting(false);
1010
1023
  }
@@ -1021,15 +1034,15 @@ function ConfirmStep({
1021
1034
  className: "rs-card-value",
1022
1035
  style: { display: "flex", alignItems: "center", gap: 8 },
1023
1036
  children: [
1024
- _chunkZNHU72LIcjs.getChainIcon.call(void 0, asset.chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1037
+ _chunkNELAYNA3cjs.getChainIcon.call(void 0, asset.chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1025
1038
  "img",
1026
1039
  {
1027
- src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, asset.chainId),
1040
+ src: _chunkNELAYNA3cjs.getChainIcon.call(void 0, asset.chainId),
1028
1041
  alt: "",
1029
1042
  style: { width: 16, height: 16, borderRadius: 3 }
1030
1043
  }
1031
1044
  ),
1032
- _chunkZNHU72LIcjs.getChainName.call(void 0, asset.chainId)
1045
+ _chunkNELAYNA3cjs.getChainName.call(void 0, asset.chainId)
1033
1046
  ]
1034
1047
  }
1035
1048
  )
@@ -1042,15 +1055,15 @@ function ConfirmStep({
1042
1055
  className: "rs-card-value",
1043
1056
  style: { display: "flex", alignItems: "center", gap: 8 },
1044
1057
  children: [
1045
- _chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1058
+ _chunkNELAYNA3cjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1046
1059
  "img",
1047
1060
  {
1048
- src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain),
1061
+ src: _chunkNELAYNA3cjs.getChainIcon.call(void 0, targetChain),
1049
1062
  alt: "",
1050
1063
  style: { width: 16, height: 16, borderRadius: 3 }
1051
1064
  }
1052
1065
  ),
1053
- _chunkZNHU72LIcjs.getChainName.call(void 0, targetChain)
1066
+ _chunkNELAYNA3cjs.getChainName.call(void 0, targetChain)
1054
1067
  ]
1055
1068
  }
1056
1069
  )
@@ -1069,10 +1082,10 @@ function ConfirmStep({
1069
1082
  className: "rs-card-value",
1070
1083
  style: { display: "flex", alignItems: "center", gap: 6 },
1071
1084
  children: [
1072
- _chunkZNHU72LIcjs.getTokenIcon.call(void 0, asset.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1085
+ _chunkNELAYNA3cjs.getTokenIcon.call(void 0, asset.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1073
1086
  "img",
1074
1087
  {
1075
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, asset.symbol),
1088
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, asset.symbol),
1076
1089
  alt: "",
1077
1090
  style: { width: 16, height: 16, borderRadius: "50%" }
1078
1091
  }
@@ -1092,10 +1105,10 @@ function ConfirmStep({
1092
1105
  className: "rs-card-value",
1093
1106
  style: { display: "flex", alignItems: "center", gap: 6 },
1094
1107
  children: [
1095
- _chunkZNHU72LIcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1108
+ _chunkNELAYNA3cjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1096
1109
  "img",
1097
1110
  {
1098
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, targetSymbol),
1111
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, targetSymbol),
1099
1112
  alt: "",
1100
1113
  style: { width: 16, height: 16, borderRadius: "50%" }
1101
1114
  }
@@ -1131,7 +1144,7 @@ function ConfirmStep({
1131
1144
  ] })
1132
1145
  ] }),
1133
1146
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1134
- _chunk55QIUUIScjs.Button,
1147
+ _chunk7HJ7IBRHcjs.Button,
1135
1148
  {
1136
1149
  onClick: handleConfirm,
1137
1150
  loading: isSubmitting,
@@ -1140,7 +1153,7 @@ function ConfirmStep({
1140
1153
  children: "Confirm Order"
1141
1154
  }
1142
1155
  ) }),
1143
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.PoweredBy, {})
1156
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
1144
1157
  ] });
1145
1158
  }
1146
1159
 
@@ -1265,7 +1278,7 @@ var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
1265
1278
  var configuredSolanaRpcUrl = null;
1266
1279
  var cachedConnections = /* @__PURE__ */ new Map();
1267
1280
  function configureSolanaRpcUrl(rpcUrl) {
1268
- const normalized = _optionalChain([rpcUrl, 'optionalAccess', _17 => _17.trim, 'call', _18 => _18()]);
1281
+ const normalized = _optionalChain([rpcUrl, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]);
1269
1282
  configuredSolanaRpcUrl = normalized ? normalized : null;
1270
1283
  cachedConnections.clear();
1271
1284
  }
@@ -1400,7 +1413,7 @@ function resolveSolanaTokenMeta(token) {
1400
1413
  return {};
1401
1414
  }
1402
1415
  function getDepositEventDetails(event) {
1403
- if (!_optionalChain([event, 'optionalAccess', _19 => _19.type]) || !isRecord(event.data)) return {};
1416
+ if (!_optionalChain([event, 'optionalAccess', _23 => _23.type]) || !isRecord(event.data)) return {};
1404
1417
  if (event.type === "deposit-received") {
1405
1418
  const chainId = asChainId(event.data.chain);
1406
1419
  const token = asString(event.data.token);
@@ -1414,12 +1427,12 @@ function getDepositEventDetails(event) {
1414
1427
  }
1415
1428
  if (event.type === "bridge-started") {
1416
1429
  const source = isRecord(event.data.source) ? event.data.source : void 0;
1417
- const chainId = asChainId(_optionalChain([source, 'optionalAccess', _20 => _20.chain]));
1418
- const token = asString(_optionalChain([source, 'optionalAccess', _21 => _21.asset]));
1430
+ const chainId = asChainId(_optionalChain([source, 'optionalAccess', _24 => _24.chain]));
1431
+ const token = asString(_optionalChain([source, 'optionalAccess', _25 => _25.asset]));
1419
1432
  const solanaMeta = chainId === "solana" ? resolveSolanaTokenMeta(token) : {};
1420
1433
  return {
1421
1434
  chainId,
1422
- amount: asAmount(_optionalChain([source, 'optionalAccess', _22 => _22.amount])),
1435
+ amount: asAmount(_optionalChain([source, 'optionalAccess', _26 => _26.amount])),
1423
1436
  token,
1424
1437
  ...solanaMeta
1425
1438
  };
@@ -1434,7 +1447,7 @@ function DepositAddressStep({
1434
1447
  onError
1435
1448
  }) {
1436
1449
  const hasSolana = Boolean(solanaDepositAddress);
1437
- const evmChainIds = _react.useMemo.call(void 0, () => _chunkZNHU72LIcjs.getSupportedChainIds.call(void 0, ), []);
1450
+ const evmChainIds = _react.useMemo.call(void 0, () => _chunkNELAYNA3cjs.getSupportedChainIds.call(void 0, ), []);
1438
1451
  const chainOptions = _react.useMemo.call(void 0,
1439
1452
  () => hasSolana ? [...evmChainIds, "solana"] : evmChainIds,
1440
1453
  [evmChainIds, hasSolana]
@@ -1444,7 +1457,7 @@ function DepositAddressStep({
1444
1457
  const [sourceChainId, setSourceChainId] = _react.useState.call(void 0, defaultChainId);
1445
1458
  const isSolana = sourceChainId === "solana";
1446
1459
  const tokensForChain = _react.useMemo.call(void 0,
1447
- () => isSolana ? SOLANA_TOKENS.map((t) => t.symbol) : _chunkZNHU72LIcjs.getTargetTokenSymbolsForChain.call(void 0, sourceChainId),
1460
+ () => isSolana ? SOLANA_TOKENS.map((t) => t.symbol) : _chunkNELAYNA3cjs.getTargetTokenSymbolsForChain.call(void 0, sourceChainId),
1448
1461
  [sourceChainId, isSolana]
1449
1462
  );
1450
1463
  const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
@@ -1464,7 +1477,7 @@ function DepositAddressStep({
1464
1477
  const depositHandledRef = _react.useRef.call(void 0, false);
1465
1478
  const sourceSelectionRef = _react.useRef.call(void 0, {
1466
1479
  chainId: defaultChainId,
1467
- token: typeof defaultChainId === "number" ? _chunkZNHU72LIcjs.getTokenAddress.call(void 0, defaultToken, defaultChainId) : void 0,
1480
+ token: typeof defaultChainId === "number" ? _chunkNELAYNA3cjs.getTokenAddress.call(void 0, defaultToken, defaultChainId) : void 0,
1468
1481
  sourceSymbol: defaultToken
1469
1482
  });
1470
1483
  _react.useEffect.call(void 0, () => {
@@ -1472,15 +1485,15 @@ function DepositAddressStep({
1472
1485
  const matched = _nullishCoalesce(SOLANA_TOKENS.find((t) => t.symbol === sourceTokenSymbol), () => ( SOLANA_TOKENS[0]));
1473
1486
  sourceSelectionRef.current = {
1474
1487
  chainId: "solana",
1475
- token: _optionalChain([matched, 'optionalAccess', _23 => _23.mint]),
1476
- sourceSymbol: _optionalChain([matched, 'optionalAccess', _24 => _24.symbol]),
1477
- sourceDecimals: _optionalChain([matched, 'optionalAccess', _25 => _25.decimals])
1488
+ token: _optionalChain([matched, 'optionalAccess', _27 => _27.mint]),
1489
+ sourceSymbol: _optionalChain([matched, 'optionalAccess', _28 => _28.symbol]),
1490
+ sourceDecimals: _optionalChain([matched, 'optionalAccess', _29 => _29.decimals])
1478
1491
  };
1479
1492
  return;
1480
1493
  }
1481
1494
  sourceSelectionRef.current = {
1482
1495
  chainId: sourceChainId,
1483
- token: _chunkZNHU72LIcjs.getTokenAddress.call(void 0, sourceTokenSymbol, sourceChainId),
1496
+ token: _chunkNELAYNA3cjs.getTokenAddress.call(void 0, sourceTokenSymbol, sourceChainId),
1484
1497
  sourceSymbol: sourceTokenSymbol
1485
1498
  };
1486
1499
  }, [sourceChainId, sourceTokenSymbol, isSolana]);
@@ -1490,8 +1503,8 @@ function DepositAddressStep({
1490
1503
  function handlePointerDown(event) {
1491
1504
  const target = event.target;
1492
1505
  if (!target) return;
1493
- const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _26 => _26.current, 'optionalAccess', _27 => _27.contains, 'call', _28 => _28(target)]);
1494
- const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _29 => _29.current, 'optionalAccess', _30 => _30.contains, 'call', _31 => _31(target)]);
1506
+ const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _30 => _30.current, 'optionalAccess', _31 => _31.contains, 'call', _32 => _32(target)]);
1507
+ const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _33 => _33.current, 'optionalAccess', _34 => _34.contains, 'call', _35 => _35(target)]);
1495
1508
  if (clickedChainDropdown || clickedTokenDropdown) return;
1496
1509
  setChainDropdownOpen(false);
1497
1510
  setTokenDropdownOpen(false);
@@ -1538,10 +1551,10 @@ function DepositAddressStep({
1538
1551
  const status = await service.fetchLatestStatus(smartAccount);
1539
1552
  if (cancelled || depositHandledRef.current) return;
1540
1553
  const event = status.lastEvent;
1541
- const eventTxHash = _chunk55QIUUIScjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunk55QIUUIScjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
1554
+ const eventTxHash = _chunk7HJ7IBRHcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunk7HJ7IBRHcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
1542
1555
  if (baselineTxHash === void 0) {
1543
1556
  baselineTxHash = eventTxHash;
1544
- } else if (eventTxHash && (!baselineTxHash || !_chunk55QIUUIScjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHash))) {
1557
+ } else if (eventTxHash && (!baselineTxHash || !_chunk7HJ7IBRHcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHash))) {
1545
1558
  const details = getDepositEventDetails(event);
1546
1559
  const fallback = sourceSelectionRef.current;
1547
1560
  const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
@@ -1567,7 +1580,7 @@ function DepositAddressStep({
1567
1580
  if (!cancelled) {
1568
1581
  const msg = err instanceof Error ? err.message : "Failed to check status";
1569
1582
  setPollingError(msg);
1570
- _optionalChain([onError, 'optionalCall', _32 => _32(msg, "STATUS_POLL_ERROR")]);
1583
+ _optionalChain([onError, 'optionalCall', _36 => _36(msg, "STATUS_POLL_ERROR")]);
1571
1584
  }
1572
1585
  }
1573
1586
  if (!cancelled && !depositHandledRef.current) {
@@ -1580,7 +1593,7 @@ function DepositAddressStep({
1580
1593
  clearTimeout(timeoutId);
1581
1594
  };
1582
1595
  }, [smartAccount, service, onDepositDetected, onError]);
1583
- const qrIconSrc = _chunkZNHU72LIcjs.getChainIcon.call(void 0, sourceChainId);
1596
+ const qrIconSrc = _chunkNELAYNA3cjs.getChainIcon.call(void 0, sourceChainId);
1584
1597
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
1585
1598
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-body", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address", children: [
1586
1599
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
@@ -1596,15 +1609,15 @@ function DepositAddressStep({
1596
1609
  setTokenDropdownOpen(false);
1597
1610
  },
1598
1611
  children: [
1599
- _chunkZNHU72LIcjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1612
+ _chunkNELAYNA3cjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1600
1613
  "img",
1601
1614
  {
1602
- src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, sourceChainId),
1615
+ src: _chunkNELAYNA3cjs.getChainIcon.call(void 0, sourceChainId),
1603
1616
  alt: "",
1604
1617
  className: "rs-deposit-address-dropdown-icon"
1605
1618
  }
1606
1619
  ),
1607
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkZNHU72LIcjs.getChainName.call(void 0, sourceChainId) }),
1620
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkNELAYNA3cjs.getChainName.call(void 0, sourceChainId) }),
1608
1621
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1609
1622
  "svg",
1610
1623
  {
@@ -1636,15 +1649,15 @@ function DepositAddressStep({
1636
1649
  setChainDropdownOpen(false);
1637
1650
  },
1638
1651
  children: [
1639
- _chunkZNHU72LIcjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1652
+ _chunkNELAYNA3cjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1640
1653
  "img",
1641
1654
  {
1642
- src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, chainId),
1655
+ src: _chunkNELAYNA3cjs.getChainIcon.call(void 0, chainId),
1643
1656
  alt: "",
1644
1657
  className: "rs-deposit-address-dropdown-icon"
1645
1658
  }
1646
1659
  ),
1647
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkZNHU72LIcjs.getChainName.call(void 0, chainId) })
1660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkNELAYNA3cjs.getChainName.call(void 0, chainId) })
1648
1661
  ]
1649
1662
  },
1650
1663
  String(chainId)
@@ -1662,10 +1675,10 @@ function DepositAddressStep({
1662
1675
  setChainDropdownOpen(false);
1663
1676
  },
1664
1677
  children: [
1665
- _chunkZNHU72LIcjs.getTokenIcon.call(void 0, sourceTokenSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1678
+ _chunkNELAYNA3cjs.getTokenIcon.call(void 0, sourceTokenSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1666
1679
  "img",
1667
1680
  {
1668
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, sourceTokenSymbol),
1681
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, sourceTokenSymbol),
1669
1682
  alt: "",
1670
1683
  className: "rs-deposit-address-dropdown-icon"
1671
1684
  }
@@ -1702,10 +1715,10 @@ function DepositAddressStep({
1702
1715
  setTokenDropdownOpen(false);
1703
1716
  },
1704
1717
  children: [
1705
- _chunkZNHU72LIcjs.getTokenIcon.call(void 0, symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1718
+ _chunkNELAYNA3cjs.getTokenIcon.call(void 0, symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1706
1719
  "img",
1707
1720
  {
1708
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, symbol),
1721
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, symbol),
1709
1722
  alt: "",
1710
1723
  className: "rs-deposit-address-dropdown-icon"
1711
1724
  }
@@ -1764,7 +1777,7 @@ function DepositAddressStep({
1764
1777
  ] }),
1765
1778
  pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
1766
1779
  ] }) }),
1767
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.PoweredBy, {})
1780
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
1768
1781
  ] });
1769
1782
  }
1770
1783
  DepositAddressStep.displayName = "DepositAddressStep";
@@ -1795,7 +1808,7 @@ function SolanaTokenSelectStep({
1795
1808
  setError(null);
1796
1809
  const portfolioBySymbol = {};
1797
1810
  try {
1798
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
1811
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
1799
1812
  solanaAddress
1800
1813
  });
1801
1814
  const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
@@ -1818,12 +1831,12 @@ function SolanaTokenSelectStep({
1818
1831
  };
1819
1832
  }
1820
1833
  }
1821
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
1834
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
1822
1835
  symbols: Object.keys(portfolioBySymbol)
1823
1836
  });
1824
1837
  } catch (err) {
1825
1838
  if (!active) return;
1826
- _chunk55QIUUIScjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
1839
+ _chunk7HJ7IBRHcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
1827
1840
  solanaAddress
1828
1841
  });
1829
1842
  setError(
@@ -1848,7 +1861,7 @@ function SolanaTokenSelectStep({
1848
1861
  setTokenBalances(results);
1849
1862
  setLoading(false);
1850
1863
  const totalUsd = results.reduce((sum, r) => sum + r.balanceUsd, 0);
1851
- _optionalChain([onTotalBalanceComputed, 'optionalCall', _33 => _33(totalUsd)]);
1864
+ _optionalChain([onTotalBalanceComputed, 'optionalCall', _37 => _37(totalUsd)]);
1852
1865
  }
1853
1866
  void loadBalances();
1854
1867
  return () => {
@@ -1877,7 +1890,7 @@ function SolanaTokenSelectStep({
1877
1890
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
1878
1891
  children: [
1879
1892
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
1880
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.Spinner, { className: "rs-text-tertiary" }),
1893
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.Spinner, { className: "rs-text-tertiary" }),
1881
1894
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
1882
1895
  ] }),
1883
1896
  !loading && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
@@ -1908,13 +1921,13 @@ function SolanaTokenSelectStep({
1908
1921
  ] }),
1909
1922
  !loading && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((entry) => {
1910
1923
  const isSelected = selectedSymbol === entry.token.symbol;
1911
- const tokenIcon = _chunkZNHU72LIcjs.getTokenIcon.call(void 0, entry.token.symbol);
1912
- const chainIcon = _chunkZNHU72LIcjs.getChainIcon.call(void 0, "solana");
1924
+ const tokenIcon = _chunkNELAYNA3cjs.getTokenIcon.call(void 0, entry.token.symbol);
1925
+ const chainIcon = _chunkNELAYNA3cjs.getChainIcon.call(void 0, "solana");
1913
1926
  let formattedBalance;
1914
1927
  try {
1915
1928
  const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
1916
1929
  const numeric = Number(raw);
1917
- formattedBalance = Number.isFinite(numeric) ? _chunk55QIUUIScjs.tokenFormatter.format(numeric) : raw;
1930
+ formattedBalance = Number.isFinite(numeric) ? _chunk7HJ7IBRHcjs.tokenFormatter.format(numeric) : raw;
1918
1931
  } catch (e14) {
1919
1932
  formattedBalance = "...";
1920
1933
  }
@@ -1958,7 +1971,7 @@ function SolanaTokenSelectStep({
1958
1971
  ] })
1959
1972
  ] })
1960
1973
  ] }),
1961
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunk55QIUUIScjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
1974
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunk7HJ7IBRHcjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
1962
1975
  ]
1963
1976
  },
1964
1977
  entry.token.symbol
@@ -1968,7 +1981,7 @@ function SolanaTokenSelectStep({
1968
1981
  }
1969
1982
  ),
1970
1983
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1971
- _chunk55QIUUIScjs.Button,
1984
+ _chunk7HJ7IBRHcjs.Button,
1972
1985
  {
1973
1986
  onClick: () => selectedEntry && onContinue(
1974
1987
  selectedEntry.token,
@@ -1980,7 +1993,7 @@ function SolanaTokenSelectStep({
1980
1993
  children: "Continue"
1981
1994
  }
1982
1995
  ) }),
1983
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.PoweredBy, {})
1996
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
1984
1997
  ] });
1985
1998
  }
1986
1999
 
@@ -2003,14 +2016,14 @@ function SolanaAmountStep({
2003
2016
  const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
2004
2017
  const numeric = Number(raw);
2005
2018
  if (!Number.isFinite(numeric)) return raw;
2006
- return _chunk55QIUUIScjs.tokenFormatter.format(numeric);
2019
+ return _chunk7HJ7IBRHcjs.tokenFormatter.format(numeric);
2007
2020
  } catch (e15) {
2008
2021
  return "...";
2009
2022
  }
2010
2023
  }, [balance, token.decimals]);
2011
2024
  const formattedBalanceUsd = _react.useMemo.call(void 0, () => {
2012
2025
  if (!Number.isFinite(balanceUsd) || balanceUsd <= 0) return null;
2013
- return _chunk55QIUUIScjs.currencyFormatter.format(balanceUsd);
2026
+ return _chunk7HJ7IBRHcjs.currencyFormatter.format(balanceUsd);
2014
2027
  }, [balanceUsd]);
2015
2028
  const spendableBalance = _react.useMemo.call(void 0, () => {
2016
2029
  if (!isNativeSol(token)) return balance;
@@ -2025,7 +2038,7 @@ function SolanaAmountStep({
2025
2038
  const factor = 10 ** maxDecimals;
2026
2039
  const truncated = Math.floor(value * factor) / factor;
2027
2040
  const formatted = truncated.toFixed(maxDecimals).replace(/\.?0+$/, "");
2028
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
2041
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
2029
2042
  percentage,
2030
2043
  symbol: token.symbol,
2031
2044
  formatted
@@ -2039,7 +2052,7 @@ function SolanaAmountStep({
2039
2052
  const handleContinue = () => {
2040
2053
  const numericAmount = parseFloat(amount);
2041
2054
  if (isNaN(numericAmount) || numericAmount <= 0) {
2042
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2055
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2043
2056
  amount,
2044
2057
  reason: "nan-or-non-positive"
2045
2058
  });
@@ -2050,7 +2063,7 @@ function SolanaAmountStep({
2050
2063
  try {
2051
2064
  amountInUnits = _viem.parseUnits.call(void 0, amount, token.decimals);
2052
2065
  } catch (e17) {
2053
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2066
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2054
2067
  amount,
2055
2068
  reason: "parse-units-failed"
2056
2069
  });
@@ -2059,7 +2072,7 @@ function SolanaAmountStep({
2059
2072
  }
2060
2073
  if (amountInUnits > spendableBalance) {
2061
2074
  const isReserveIssue = isNativeSol(token) && amountInUnits <= balance;
2062
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2075
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2063
2076
  amount,
2064
2077
  balance: balance.toString(),
2065
2078
  spendableBalance: spendableBalance.toString(),
@@ -2071,7 +2084,7 @@ function SolanaAmountStep({
2071
2084
  );
2072
2085
  return;
2073
2086
  }
2074
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
2087
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
2075
2088
  symbol: token.symbol,
2076
2089
  amount,
2077
2090
  amountInUnits: amountInUnits.toString()
@@ -2161,7 +2174,7 @@ function SolanaAmountStep({
2161
2174
  ] })
2162
2175
  ] }),
2163
2176
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2164
- _chunk55QIUUIScjs.Button,
2177
+ _chunk7HJ7IBRHcjs.Button,
2165
2178
  {
2166
2179
  onClick: handleContinue,
2167
2180
  fullWidth: true,
@@ -2169,7 +2182,7 @@ function SolanaAmountStep({
2169
2182
  children: "Continue"
2170
2183
  }
2171
2184
  ) }),
2172
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.PoweredBy, {})
2185
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
2173
2186
  ] });
2174
2187
  }
2175
2188
 
@@ -2195,7 +2208,7 @@ function SolanaConfirmStep({
2195
2208
  }) {
2196
2209
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
2197
2210
  const [error, setError] = _react.useState.call(void 0, null);
2198
- const targetSymbol = _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
2211
+ const targetSymbol = _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
2199
2212
  const isSameToken = token.symbol.toUpperCase() === targetSymbol.toUpperCase();
2200
2213
  const formattedAmount = amount && !Number.isNaN(Number(amount)) ? Number(amount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
2201
2214
  const formattedReceiveAmount = (() => {
@@ -2212,7 +2225,7 @@ function SolanaConfirmStep({
2212
2225
  const receiveAmount = isSameToken ? formattedReceiveAmount : `~ ${formattedReceiveAmount}`;
2213
2226
  const handleConfirm = async () => {
2214
2227
  if (!solanaProvider) {
2215
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2228
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2216
2229
  reason: "missing-provider"
2217
2230
  });
2218
2231
  setError("Solana wallet not connected");
@@ -2220,7 +2233,7 @@ function SolanaConfirmStep({
2220
2233
  }
2221
2234
  const parsedAmount = parseFloat(amount);
2222
2235
  if (isNaN(parsedAmount) || parsedAmount <= 0) {
2223
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2236
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2224
2237
  reason: "invalid-amount",
2225
2238
  amount
2226
2239
  });
@@ -2229,7 +2242,7 @@ function SolanaConfirmStep({
2229
2242
  }
2230
2243
  setError(null);
2231
2244
  setIsSubmitting(true);
2232
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
2245
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
2233
2246
  smartAccount,
2234
2247
  solanaAddress,
2235
2248
  solanaDepositAddress,
@@ -2238,7 +2251,7 @@ function SolanaConfirmStep({
2238
2251
  });
2239
2252
  try {
2240
2253
  const check = await service.checkAccount(smartAccount);
2241
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
2254
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
2242
2255
  smartAccount,
2243
2256
  isRegistered: check.isRegistered,
2244
2257
  targetChain: check.targetChain,
@@ -2251,7 +2264,7 @@ function SolanaConfirmStep({
2251
2264
  }
2252
2265
  const connection = getSolanaConnection();
2253
2266
  const amountUnits = _viem.parseUnits.call(void 0, amount, token.decimals);
2254
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
2267
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
2255
2268
  token: token.symbol,
2256
2269
  amount,
2257
2270
  amountUnits: amountUnits.toString()
@@ -2268,10 +2281,10 @@ function SolanaConfirmStep({
2268
2281
  token.mint,
2269
2282
  amountUnits
2270
2283
  );
2271
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
2284
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
2272
2285
  token: token.symbol,
2273
2286
  instructionCount: transaction.instructions.length,
2274
- feePayer: _optionalChain([transaction, 'access', _34 => _34.feePayer, 'optionalAccess', _35 => _35.toBase58, 'call', _36 => _36()]),
2287
+ feePayer: _optionalChain([transaction, 'access', _38 => _38.feePayer, 'optionalAccess', _39 => _39.toBase58, 'call', _40 => _40()]),
2275
2288
  recentBlockhash: transaction.recentBlockhash
2276
2289
  });
2277
2290
  const txHash = await sendSolanaTransaction(
@@ -2279,21 +2292,21 @@ function SolanaConfirmStep({
2279
2292
  connection,
2280
2293
  transaction
2281
2294
  );
2282
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
2295
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
2283
2296
  txHash,
2284
2297
  amountUnits: amountUnits.toString()
2285
2298
  });
2286
2299
  onConfirm(txHash, amountUnits.toString());
2287
2300
  } catch (err) {
2288
2301
  const raw = err instanceof Error ? err.message : "Transfer failed";
2289
- const message = _chunk55QIUUIScjs.formatUserError.call(void 0, raw);
2290
- _chunk55QIUUIScjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
2302
+ const message = _chunk7HJ7IBRHcjs.formatUserError.call(void 0, raw);
2303
+ _chunk7HJ7IBRHcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
2291
2304
  smartAccount,
2292
2305
  token: token.symbol,
2293
2306
  amount
2294
2307
  });
2295
2308
  setError(message);
2296
- _optionalChain([onError, 'optionalCall', _37 => _37(message, "SOLANA_TRANSFER_ERROR")]);
2309
+ _optionalChain([onError, 'optionalCall', _41 => _41(message, "SOLANA_TRANSFER_ERROR")]);
2297
2310
  } finally {
2298
2311
  setIsSubmitting(false);
2299
2312
  }
@@ -2310,15 +2323,15 @@ function SolanaConfirmStep({
2310
2323
  className: "rs-card-value",
2311
2324
  style: { display: "flex", alignItems: "center", gap: 8 },
2312
2325
  children: [
2313
- _chunkZNHU72LIcjs.getChainIcon.call(void 0, "solana") && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2326
+ _chunkNELAYNA3cjs.getChainIcon.call(void 0, "solana") && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2314
2327
  "img",
2315
2328
  {
2316
- src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, "solana"),
2329
+ src: _chunkNELAYNA3cjs.getChainIcon.call(void 0, "solana"),
2317
2330
  alt: "",
2318
2331
  style: { width: 16, height: 16, borderRadius: 3 }
2319
2332
  }
2320
2333
  ),
2321
- _chunkZNHU72LIcjs.getChainName.call(void 0, "solana")
2334
+ _chunkNELAYNA3cjs.getChainName.call(void 0, "solana")
2322
2335
  ]
2323
2336
  }
2324
2337
  )
@@ -2331,15 +2344,15 @@ function SolanaConfirmStep({
2331
2344
  className: "rs-card-value",
2332
2345
  style: { display: "flex", alignItems: "center", gap: 8 },
2333
2346
  children: [
2334
- _chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2347
+ _chunkNELAYNA3cjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2335
2348
  "img",
2336
2349
  {
2337
- src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain),
2350
+ src: _chunkNELAYNA3cjs.getChainIcon.call(void 0, targetChain),
2338
2351
  alt: "",
2339
2352
  style: { width: 16, height: 16, borderRadius: 3 }
2340
2353
  }
2341
2354
  ),
2342
- _chunkZNHU72LIcjs.getChainName.call(void 0, targetChain)
2355
+ _chunkNELAYNA3cjs.getChainName.call(void 0, targetChain)
2343
2356
  ]
2344
2357
  }
2345
2358
  )
@@ -2358,10 +2371,10 @@ function SolanaConfirmStep({
2358
2371
  className: "rs-card-value",
2359
2372
  style: { display: "flex", alignItems: "center", gap: 6 },
2360
2373
  children: [
2361
- _chunkZNHU72LIcjs.getTokenIcon.call(void 0, token.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2374
+ _chunkNELAYNA3cjs.getTokenIcon.call(void 0, token.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2362
2375
  "img",
2363
2376
  {
2364
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, token.symbol),
2377
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, token.symbol),
2365
2378
  alt: "",
2366
2379
  style: { width: 16, height: 16, borderRadius: "50%" }
2367
2380
  }
@@ -2381,10 +2394,10 @@ function SolanaConfirmStep({
2381
2394
  className: "rs-card-value",
2382
2395
  style: { display: "flex", alignItems: "center", gap: 6 },
2383
2396
  children: [
2384
- _chunkZNHU72LIcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2397
+ _chunkNELAYNA3cjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2385
2398
  "img",
2386
2399
  {
2387
- src: _chunkZNHU72LIcjs.getTokenIcon.call(void 0, targetSymbol),
2400
+ src: _chunkNELAYNA3cjs.getTokenIcon.call(void 0, targetSymbol),
2388
2401
  alt: "",
2389
2402
  style: { width: 16, height: 16, borderRadius: "50%" }
2390
2403
  }
@@ -2420,7 +2433,7 @@ function SolanaConfirmStep({
2420
2433
  ] })
2421
2434
  ] }),
2422
2435
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2423
- _chunk55QIUUIScjs.Button,
2436
+ _chunk7HJ7IBRHcjs.Button,
2424
2437
  {
2425
2438
  onClick: handleConfirm,
2426
2439
  loading: isSubmitting,
@@ -2429,7 +2442,7 @@ function SolanaConfirmStep({
2429
2442
  children: "Confirm Order"
2430
2443
  }
2431
2444
  ) }),
2432
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk55QIUUIScjs.PoweredBy, {})
2445
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HJ7IBRHcjs.PoweredBy, {})
2433
2446
  ] });
2434
2447
  }
2435
2448
 
@@ -2452,7 +2465,7 @@ function DepositFlow({
2452
2465
  sourceToken: defaultSourceToken,
2453
2466
  amount: defaultAmount,
2454
2467
  recipient,
2455
- signerAddress = _chunkZNHU72LIcjs.DEFAULT_SIGNER_ADDRESS,
2468
+ signerAddress = _chunkNELAYNA3cjs.DEFAULT_SIGNER_ADDRESS,
2456
2469
  sessionChainIds,
2457
2470
  forceRegister = false,
2458
2471
  waitForFinalTx = true,
@@ -2462,6 +2475,7 @@ function DepositFlow({
2462
2475
  onRequestConnect,
2463
2476
  connectButtonLabel,
2464
2477
  uiConfig,
2478
+ allowedRoutes,
2465
2479
  onStepChange,
2466
2480
  onTotalBalanceChange,
2467
2481
  onClose,
@@ -2484,13 +2498,13 @@ function DepositFlow({
2484
2498
  flowModeRef.current = flowMode;
2485
2499
  const logFlow = _react.useCallback.call(void 0,
2486
2500
  (message, data) => {
2487
- _chunk55QIUUIScjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
2501
+ _chunk7HJ7IBRHcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
2488
2502
  },
2489
2503
  [debug]
2490
2504
  );
2491
2505
  const logFlowError = _react.useCallback.call(void 0,
2492
2506
  (message, error, data) => {
2493
- _chunk55QIUUIScjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
2507
+ _chunk7HJ7IBRHcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
2494
2508
  },
2495
2509
  [debug]
2496
2510
  );
@@ -2511,12 +2525,12 @@ function DepositFlow({
2511
2525
  return null;
2512
2526
  }, []);
2513
2527
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
2514
- if (!_optionalChain([dappWalletClient, 'optionalAccess', _38 => _38.switchChain])) return void 0;
2528
+ if (!_optionalChain([dappWalletClient, 'optionalAccess', _42 => _42.switchChain])) return void 0;
2515
2529
  return async (chainId) => {
2516
- await _optionalChain([dappWalletClient, 'access', _39 => _39.switchChain, 'optionalCall', _40 => _40({ id: chainId })]);
2530
+ await _optionalChain([dappWalletClient, 'access', _43 => _43.switchChain, 'optionalCall', _44 => _44({ id: chainId })]);
2517
2531
  };
2518
2532
  }, [dappWalletClient]);
2519
- const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _41 => _41.account, 'optionalAccess', _42 => _42.address]), () => ( null));
2533
+ const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _45 => _45.account, 'optionalAccess', _46 => _46.address]), () => ( null));
2520
2534
  const walletOptions = _react.useMemo.call(void 0, () => {
2521
2535
  const options = [];
2522
2536
  const seen = /* @__PURE__ */ new Set();
@@ -2530,7 +2544,7 @@ function DepositFlow({
2530
2544
  });
2531
2545
  seen.add(id);
2532
2546
  }
2533
- if (_optionalChain([reownWallet, 'optionalAccess', _43 => _43.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
2547
+ if (_optionalChain([reownWallet, 'optionalAccess', _47 => _47.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
2534
2548
  const id = _nullishCoalesce(reownWallet.caipAddress, () => ( `solana:${reownWallet.solanaAddress}`));
2535
2549
  if (!seen.has(id)) {
2536
2550
  options.push({
@@ -2542,7 +2556,7 @@ function DepositFlow({
2542
2556
  });
2543
2557
  seen.add(id);
2544
2558
  }
2545
- } else if (_optionalChain([reownWallet, 'optionalAccess', _44 => _44.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
2559
+ } else if (_optionalChain([reownWallet, 'optionalAccess', _48 => _48.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
2546
2560
  const id = `evm:${reownWallet.address.toLowerCase()}`;
2547
2561
  if (!seen.has(id)) {
2548
2562
  options.push({
@@ -2559,19 +2573,19 @@ function DepositFlow({
2559
2573
  }, [
2560
2574
  connectedWalletAddress,
2561
2575
  dappAddress,
2562
- _optionalChain([reownWallet, 'optionalAccess', _45 => _45.address]),
2563
- _optionalChain([reownWallet, 'optionalAccess', _46 => _46.isConnected]),
2564
- _optionalChain([reownWallet, 'optionalAccess', _47 => _47.walletClient]),
2565
- _optionalChain([reownWallet, 'optionalAccess', _48 => _48.publicClient]),
2566
- _optionalChain([reownWallet, 'optionalAccess', _49 => _49.icon]),
2567
- _optionalChain([reownWallet, 'optionalAccess', _50 => _50.isSolana]),
2568
- _optionalChain([reownWallet, 'optionalAccess', _51 => _51.solanaAddress]),
2569
- _optionalChain([reownWallet, 'optionalAccess', _52 => _52.caipAddress])
2576
+ _optionalChain([reownWallet, 'optionalAccess', _49 => _49.address]),
2577
+ _optionalChain([reownWallet, 'optionalAccess', _50 => _50.isConnected]),
2578
+ _optionalChain([reownWallet, 'optionalAccess', _51 => _51.walletClient]),
2579
+ _optionalChain([reownWallet, 'optionalAccess', _52 => _52.publicClient]),
2580
+ _optionalChain([reownWallet, 'optionalAccess', _53 => _53.icon]),
2581
+ _optionalChain([reownWallet, 'optionalAccess', _54 => _54.isSolana]),
2582
+ _optionalChain([reownWallet, 'optionalAccess', _55 => _55.solanaAddress]),
2583
+ _optionalChain([reownWallet, 'optionalAccess', _56 => _56.caipAddress])
2570
2584
  ]);
2571
- const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _53 => _53.account]) && dappAddress && !reownWallet;
2585
+ const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _57 => _57.account]) && dappAddress && !reownWallet;
2572
2586
  const hasWalletOptions = walletOptions.length > 0;
2573
2587
  const hasReownSession = Boolean(
2574
- _optionalChain([reownWallet, 'optionalAccess', _54 => _54.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _55 => _55.address])
2588
+ _optionalChain([reownWallet, 'optionalAccess', _58 => _58.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _59 => _59.address])
2575
2589
  );
2576
2590
  const showConnectStep = flowMode === null && !canAutoLock && !isConnectSelectionConfirmed;
2577
2591
  const walletSelectionKey = _react.useMemo.call(void 0, () => {
@@ -2597,16 +2611,16 @@ function DepositFlow({
2597
2611
  return {
2598
2612
  ownerAddress: dappAddress,
2599
2613
  walletClient: void 0,
2600
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk55QIUUIScjs.getPublicClient.call(void 0, targetChain))),
2614
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, targetChain))),
2601
2615
  switchChain: void 0
2602
2616
  };
2603
2617
  }
2604
2618
  if (canAutoLock) {
2605
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _56 => _56.chain, 'optionalAccess', _57 => _57.id]), () => ( targetChain));
2619
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _60 => _60.chain, 'optionalAccess', _61 => _61.id]), () => ( targetChain));
2606
2620
  return {
2607
2621
  ownerAddress: dappWalletClient.account.address,
2608
2622
  walletClient: dappWalletClient,
2609
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk55QIUUIScjs.getPublicClient.call(void 0, fallbackChainId))),
2623
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, fallbackChainId))),
2610
2624
  switchChain: dappSwitchChain
2611
2625
  };
2612
2626
  }
@@ -2620,24 +2634,24 @@ function DepositFlow({
2620
2634
  return {
2621
2635
  ownerAddress: dappAddress,
2622
2636
  walletClient: void 0,
2623
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk55QIUUIScjs.getPublicClient.call(void 0, targetChain))),
2637
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, targetChain))),
2624
2638
  switchChain: void 0
2625
2639
  };
2626
2640
  }
2627
- if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _58 => _58.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2628
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _59 => _59.chain, 'optionalAccess', _60 => _60.id]), () => ( targetChain));
2641
+ if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _62 => _62.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2642
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _63 => _63.chain, 'optionalAccess', _64 => _64.id]), () => ( targetChain));
2629
2643
  return {
2630
2644
  ownerAddress: dappWalletClient.account.address,
2631
2645
  walletClient: dappWalletClient,
2632
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk55QIUUIScjs.getPublicClient.call(void 0, fallbackChainId))),
2646
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, fallbackChainId))),
2633
2647
  switchChain: dappSwitchChain
2634
2648
  };
2635
2649
  }
2636
- if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _61 => _61.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2650
+ if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _65 => _65.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2637
2651
  return {
2638
2652
  ownerAddress: reownWallet.address,
2639
2653
  walletClient: reownWallet.walletClient,
2640
- publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunk55QIUUIScjs.getPublicClient.call(void 0, targetChain))),
2654
+ publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, targetChain))),
2641
2655
  switchChain: reownWallet.switchChain
2642
2656
  };
2643
2657
  }
@@ -2675,7 +2689,7 @@ function DepositFlow({
2675
2689
  return {
2676
2690
  ownerAddress: dappAddress,
2677
2691
  walletClient: void 0,
2678
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk55QIUUIScjs.getPublicClient.call(void 0, targetChain))),
2692
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, targetChain))),
2679
2693
  switchChain: void 0
2680
2694
  };
2681
2695
  }
@@ -2697,7 +2711,7 @@ function DepositFlow({
2697
2711
  walletSignerContext,
2698
2712
  walletSelectionKey
2699
2713
  ]);
2700
- const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _62 => _62.ownerAddress]))), () => ( null));
2714
+ const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _66 => _66.ownerAddress]))), () => ( null));
2701
2715
  const lastTargetRef = _react.useRef.call(void 0, null);
2702
2716
  _react.useEffect.call(void 0, () => {
2703
2717
  const prev = lastTargetRef.current;
@@ -2773,7 +2787,7 @@ function DepositFlow({
2773
2787
  const stepIndex = step.type === "setup" ? 0 : step.type === "deposit-address" ? 1 : step.type === "select-asset" ? 1 : step.type === "solana-token-select" ? 1 : step.type === "solana-amount" ? 2 : step.type === "amount" ? 2 : step.type === "confirm" ? 3 : step.type === "solana-confirm" ? 3 : 4;
2774
2788
  const currentBackHandler = step.type === "deposit-address" ? handleBackFromDepositAddress : step.type === "select-asset" && signerContext && !canAutoLock ? handleBackFromSelectAsset : step.type === "solana-token-select" ? handleBackFromSolanaTokenSelect : step.type === "solana-amount" ? handleBackFromSolanaAmount : step.type === "solana-confirm" ? handleBackFromSolanaConfirm : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
2775
2789
  _react.useEffect.call(void 0, () => {
2776
- _optionalChain([onStepChange, 'optionalCall', _63 => _63(stepIndex, currentBackHandler)]);
2790
+ _optionalChain([onStepChange, 'optionalCall', _67 => _67(stepIndex, currentBackHandler)]);
2777
2791
  }, [stepIndex, currentBackHandler, onStepChange]);
2778
2792
  _react.useEffect.call(void 0, () => {
2779
2793
  logFlow("state:changed", {
@@ -2792,7 +2806,7 @@ function DepositFlow({
2792
2806
  targetToken
2793
2807
  ]);
2794
2808
  _react.useEffect.call(void 0, () => {
2795
- _optionalChain([onTotalBalanceChange, 'optionalCall', _64 => _64(totalBalanceUsd)]);
2809
+ _optionalChain([onTotalBalanceChange, 'optionalCall', _68 => _68(totalBalanceUsd)]);
2796
2810
  }, [totalBalanceUsd, onTotalBalanceChange]);
2797
2811
  const isDepositAddressMode = flowMode === "deposit-address";
2798
2812
  const isSolanaWalletMode = flowMode === "solana-wallet";
@@ -2834,7 +2848,7 @@ function DepositFlow({
2834
2848
  solanaDepositAddress
2835
2849
  });
2836
2850
  } else {
2837
- _optionalChain([onError, 'optionalCall', _65 => _65({
2851
+ _optionalChain([onError, 'optionalCall', _69 => _69({
2838
2852
  message: "Solana deposit address not available. Please try again.",
2839
2853
  code: "SOLANA_SETUP_FAILED"
2840
2854
  })]);
@@ -2869,7 +2883,7 @@ function DepositFlow({
2869
2883
  directTransfer
2870
2884
  };
2871
2885
  });
2872
- _optionalChain([onDepositSubmitted, 'optionalCall', _66 => _66({ txHash, sourceChain: chainId, amount })]);
2886
+ _optionalChain([onDepositSubmitted, 'optionalCall', _70 => _70({ txHash, sourceChain: chainId, amount })]);
2873
2887
  },
2874
2888
  [onDepositSubmitted, targetChain, targetToken]
2875
2889
  );
@@ -2892,8 +2906,8 @@ function DepositFlow({
2892
2906
  );
2893
2907
  const handleSolanaAmountContinue = _react.useCallback.call(void 0,
2894
2908
  (token, amount) => {
2895
- const targetSym = _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
2896
- const isTargetStable = _chunkZNHU72LIcjs.isStablecoinSymbol.call(void 0, targetSym);
2909
+ const targetSym = _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
2910
+ const isTargetStable = _chunkNELAYNA3cjs.isStablecoinSymbol.call(void 0, targetSym);
2897
2911
  const targetTokenPriceUsd = isTargetStable ? 1 : getTokenPriceUsd(targetSym);
2898
2912
  logFlow("solana:amount:continue", {
2899
2913
  token: token.symbol,
@@ -2944,7 +2958,7 @@ function DepositFlow({
2944
2958
  sourceDecimals: prev.token.decimals
2945
2959
  };
2946
2960
  });
2947
- _optionalChain([onDepositSubmitted, 'optionalCall', _67 => _67({
2961
+ _optionalChain([onDepositSubmitted, 'optionalCall', _71 => _71({
2948
2962
  txHash,
2949
2963
  sourceChain: "solana",
2950
2964
  amount: amountUnits
@@ -2954,7 +2968,7 @@ function DepositFlow({
2954
2968
  );
2955
2969
  const handleConnected = _react.useCallback.call(void 0,
2956
2970
  (addr, smartAccount) => {
2957
- _optionalChain([onConnected, 'optionalCall', _68 => _68({ address: addr, smartAccount })]);
2971
+ _optionalChain([onConnected, 'optionalCall', _72 => _72({ address: addr, smartAccount })]);
2958
2972
  },
2959
2973
  [onConnected]
2960
2974
  );
@@ -2974,8 +2988,8 @@ function DepositFlow({
2974
2988
  );
2975
2989
  const handleAmountContinue = _react.useCallback.call(void 0,
2976
2990
  (amount, targetAmount, balance) => {
2977
- const targetSym = _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
2978
- const isTargetStable = _chunkZNHU72LIcjs.isStablecoinSymbol.call(void 0, targetSym);
2991
+ const targetSym = _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
2992
+ const isTargetStable = _chunkNELAYNA3cjs.isStablecoinSymbol.call(void 0, targetSym);
2979
2993
  const targetTokenPriceUsd = isTargetStable ? 1 : getTokenPriceUsd(targetSym);
2980
2994
  setStep((prev) => {
2981
2995
  if (prev.type !== "amount") return prev;
@@ -3017,28 +3031,28 @@ function DepositFlow({
3017
3031
  );
3018
3032
  const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
3019
3033
  (txHash, sourceChain, amount) => {
3020
- _optionalChain([onDepositSubmitted, 'optionalCall', _69 => _69({ txHash, sourceChain, amount })]);
3034
+ _optionalChain([onDepositSubmitted, 'optionalCall', _73 => _73({ txHash, sourceChain, amount })]);
3021
3035
  },
3022
3036
  [onDepositSubmitted]
3023
3037
  );
3024
3038
  const handleDepositComplete = _react.useCallback.call(void 0,
3025
3039
  (txHash, destinationTxHash) => {
3026
3040
  logFlow("deposit:complete", { txHash, destinationTxHash });
3027
- _optionalChain([onDepositComplete, 'optionalCall', _70 => _70({ txHash, destinationTxHash })]);
3041
+ _optionalChain([onDepositComplete, 'optionalCall', _74 => _74({ txHash, destinationTxHash })]);
3028
3042
  },
3029
3043
  [logFlow, onDepositComplete]
3030
3044
  );
3031
3045
  const handleDepositFailed = _react.useCallback.call(void 0,
3032
3046
  (txHash, error) => {
3033
3047
  logFlowError("deposit:failed", error, { txHash });
3034
- _optionalChain([onDepositFailed, 'optionalCall', _71 => _71({ txHash, error })]);
3048
+ _optionalChain([onDepositFailed, 'optionalCall', _75 => _75({ txHash, error })]);
3035
3049
  },
3036
3050
  [logFlowError, onDepositFailed]
3037
3051
  );
3038
3052
  const handleError = _react.useCallback.call(void 0,
3039
3053
  (message, code) => {
3040
3054
  logFlowError("flow:error", message, { code });
3041
- _optionalChain([onError, 'optionalCall', _72 => _72({ message, code })]);
3055
+ _optionalChain([onError, 'optionalCall', _76 => _76({ message, code })]);
3042
3056
  },
3043
3057
  [logFlowError, onError]
3044
3058
  );
@@ -3084,7 +3098,7 @@ function DepositFlow({
3084
3098
  if (walletId) {
3085
3099
  const selectedOption = walletOptions.find((o) => o.id === walletId);
3086
3100
  setSelectedWalletId(walletId);
3087
- if (_optionalChain([selectedOption, 'optionalAccess', _73 => _73.kind]) === "solana") {
3101
+ if (_optionalChain([selectedOption, 'optionalAccess', _77 => _77.kind]) === "solana") {
3088
3102
  handleSelectSolanaWallet();
3089
3103
  } else {
3090
3104
  handleSelectProvider();
@@ -3112,7 +3126,7 @@ function DepositFlow({
3112
3126
  ]);
3113
3127
  if (showConnectStep) {
3114
3128
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3115
- _chunk55QIUUIScjs.ConnectStep,
3129
+ _chunk7HJ7IBRHcjs.ConnectStep,
3116
3130
  {
3117
3131
  walletOptions,
3118
3132
  selectedWalletId: selectedWalletIdEffective,
@@ -3131,7 +3145,7 @@ function DepositFlow({
3131
3145
  const selectedOption = walletOptions.find(
3132
3146
  (o) => o.id === selectedWalletIdEffective
3133
3147
  );
3134
- if (_optionalChain([selectedOption, 'optionalAccess', _74 => _74.kind]) === "solana") {
3148
+ if (_optionalChain([selectedOption, 'optionalAccess', _78 => _78.kind]) === "solana") {
3135
3149
  handleSelectSolanaWallet();
3136
3150
  } else {
3137
3151
  handleSelectProvider();
@@ -3172,7 +3186,7 @@ function DepositFlow({
3172
3186
  }
3173
3187
  ),
3174
3188
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3175
- _chunk55QIUUIScjs.ProcessingStep,
3189
+ _chunk7HJ7IBRHcjs.ProcessingStep,
3176
3190
  {
3177
3191
  smartAccount: step.smartAccount,
3178
3192
  txHash: step.txHash,
@@ -3197,8 +3211,8 @@ function DepositFlow({
3197
3211
  }
3198
3212
  if (isSolanaWalletMode) {
3199
3213
  if (!sessionKeyAddress) return null;
3200
- const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _75 => _75.solanaAddress]);
3201
- const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _76 => _76.solanaProvider]);
3214
+ const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _79 => _79.solanaAddress]);
3215
+ const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _80 => _80.solanaProvider]);
3202
3216
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
3203
3217
  step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3204
3218
  SetupStep,
@@ -3289,7 +3303,7 @@ function DepositFlow({
3289
3303
  ) })
3290
3304
  ] }) : null,
3291
3305
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3292
- _chunk55QIUUIScjs.ProcessingStep,
3306
+ _chunk7HJ7IBRHcjs.ProcessingStep,
3293
3307
  {
3294
3308
  smartAccount: step.smartAccount,
3295
3309
  txHash: step.txHash,
@@ -3312,16 +3326,16 @@ function DepositFlow({
3312
3326
  )
3313
3327
  ] });
3314
3328
  }
3315
- if (!_optionalChain([signerContext, 'optionalAccess', _77 => _77.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _78 => _78.publicClient])) {
3329
+ if (!_optionalChain([signerContext, 'optionalAccess', _81 => _81.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _82 => _82.publicClient])) {
3316
3330
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-state", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Connecting wallet..." }) }) }) }) });
3317
3331
  }
3318
3332
  const ownerAddress = signerContext.ownerAddress;
3319
- const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _79 => _79.walletClient, 'optionalAccess', _80 => _80.chain, 'optionalAccess', _81 => _81.id]), () => ( _optionalChain([signerContext, 'access', _82 => _82.publicClient, 'access', _83 => _83.chain, 'optionalAccess', _84 => _84.id]))), () => ( targetChain));
3333
+ const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _83 => _83.walletClient, 'optionalAccess', _84 => _84.chain, 'optionalAccess', _85 => _85.id]), () => ( _optionalChain([signerContext, 'access', _86 => _86.publicClient, 'access', _87 => _87.chain, 'optionalAccess', _88 => _88.id]))), () => ( targetChain));
3320
3334
  const getReadClientForChain = (chainId) => {
3321
- if (_optionalChain([signerContext, 'access', _85 => _85.publicClient, 'access', _86 => _86.chain, 'optionalAccess', _87 => _87.id]) === chainId) {
3335
+ if (_optionalChain([signerContext, 'access', _89 => _89.publicClient, 'access', _90 => _90.chain, 'optionalAccess', _91 => _91.id]) === chainId) {
3322
3336
  return signerContext.publicClient;
3323
3337
  }
3324
- return _chunk55QIUUIScjs.getPublicClient.call(void 0, chainId);
3338
+ return _chunk7HJ7IBRHcjs.getPublicClient.call(void 0, chainId);
3325
3339
  };
3326
3340
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
3327
3341
  step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3348,6 +3362,7 @@ function DepositFlow({
3348
3362
  publicClient: getReadClientForChain(ownerChainId),
3349
3363
  defaultSourceChain,
3350
3364
  defaultSourceToken,
3365
+ allowedRoutes,
3351
3366
  service,
3352
3367
  onContinue: handleAssetContinue,
3353
3368
  onTotalBalanceComputed: handleTotalBalanceComputed,
@@ -3390,7 +3405,7 @@ function DepositFlow({
3390
3405
  }
3391
3406
  ),
3392
3407
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3393
- _chunk55QIUUIScjs.ProcessingStep,
3408
+ _chunk7HJ7IBRHcjs.ProcessingStep,
3394
3409
  {
3395
3410
  smartAccount: step.smartAccount,
3396
3411
  txHash: step.txHash,
@@ -3417,7 +3432,7 @@ function DepositFlow({
3417
3432
  // src/DepositModal.tsx
3418
3433
 
3419
3434
  var ReownDepositInner = _react.lazy.call(void 0,
3420
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-QSRCNLSN.cjs"))).then((m) => ({ default: m.DepositModalReown }))
3435
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-SV6QIUTL.cjs"))).then((m) => ({ default: m.DepositModalReown }))
3421
3436
  );
3422
3437
  function DepositModal(props) {
3423
3438
  const needsReown = !!props.reownAppId;
@@ -3440,9 +3455,9 @@ function DepositModalInner({
3440
3455
  sourceToken,
3441
3456
  defaultAmount,
3442
3457
  recipient,
3443
- backendUrl = _chunkZNHU72LIcjs.DEFAULT_BACKEND_URL,
3458
+ backendUrl = _chunkNELAYNA3cjs.DEFAULT_BACKEND_URL,
3444
3459
  solanaRpcUrl,
3445
- signerAddress = _chunkZNHU72LIcjs.DEFAULT_SIGNER_ADDRESS,
3460
+ signerAddress = _chunkNELAYNA3cjs.DEFAULT_SIGNER_ADDRESS,
3446
3461
  sessionChainIds,
3447
3462
  forceRegister = false,
3448
3463
  waitForFinalTx = true,
@@ -3454,6 +3469,7 @@ function DepositModalInner({
3454
3469
  theme,
3455
3470
  branding,
3456
3471
  uiConfig,
3472
+ allowedRoutes,
3457
3473
  className,
3458
3474
  onReady,
3459
3475
  onConnected,
@@ -3467,10 +3483,10 @@ function DepositModalInner({
3467
3483
  const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
3468
3484
  const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
3469
3485
  const backHandlerRef = _react.useRef.call(void 0, void 0);
3470
- const targetChain = _chunkZNHU72LIcjs.getChainId.call(void 0, targetChainProp);
3471
- const sourceChain = sourceChainProp ? _chunkZNHU72LIcjs.getChainId.call(void 0, sourceChainProp) : void 0;
3486
+ const targetChain = _chunkNELAYNA3cjs.getChainId.call(void 0, targetChainProp);
3487
+ const sourceChain = sourceChainProp ? _chunkNELAYNA3cjs.getChainId.call(void 0, sourceChainProp) : void 0;
3472
3488
  const service = _react.useMemo.call(void 0,
3473
- () => _chunk55QIUUIScjs.createDepositService.call(void 0, backendUrl, {
3489
+ () => _chunk7HJ7IBRHcjs.createDepositService.call(void 0, backendUrl, {
3474
3490
  debug,
3475
3491
  debugScope: "service:deposit"
3476
3492
  }),
@@ -3478,7 +3494,7 @@ function DepositModalInner({
3478
3494
  );
3479
3495
  _react.useEffect.call(void 0, () => {
3480
3496
  if (isOpen && modalRef.current) {
3481
- _chunk55QIUUIScjs.applyTheme.call(void 0, modalRef.current, theme);
3497
+ _chunk7HJ7IBRHcjs.applyTheme.call(void 0, modalRef.current, theme);
3482
3498
  }
3483
3499
  }, [isOpen, theme]);
3484
3500
  _react.useEffect.call(void 0, () => {
@@ -3488,7 +3504,7 @@ function DepositModalInner({
3488
3504
  _react.useEffect.call(void 0, () => {
3489
3505
  if (isOpen && !hasCalledReady.current) {
3490
3506
  hasCalledReady.current = true;
3491
- _optionalChain([onReady, 'optionalCall', _88 => _88()]);
3507
+ _optionalChain([onReady, 'optionalCall', _92 => _92()]);
3492
3508
  }
3493
3509
  }, [isOpen, onReady]);
3494
3510
  _react.useEffect.call(void 0, () => {
@@ -3507,17 +3523,17 @@ function DepositModalInner({
3507
3523
  setTotalBalanceUsd(balance2);
3508
3524
  }, []);
3509
3525
  const handleBack = _react.useCallback.call(void 0, () => {
3510
- _optionalChain([backHandlerRef, 'access', _89 => _89.current, 'optionalCall', _90 => _90()]);
3526
+ _optionalChain([backHandlerRef, 'access', _93 => _93.current, 'optionalCall', _94 => _94()]);
3511
3527
  }, []);
3512
- const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _91 => _91.showLogo]), () => ( false));
3513
- const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _92 => _92.showStepper]), () => ( false));
3514
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _93 => _93.showBackButton]), () => ( true));
3515
- const balance = _optionalChain([uiConfig, 'optionalAccess', _94 => _94.balance]);
3516
- const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _95 => _95.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
3517
- const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _96 => _96.title]), () => ( "Deposit"));
3528
+ const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _95 => _95.showLogo]), () => ( false));
3529
+ const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _96 => _96.showStepper]), () => ( false));
3530
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _97 => _97.showBackButton]), () => ( true));
3531
+ const balance = _optionalChain([uiConfig, 'optionalAccess', _98 => _98.balance]);
3532
+ const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _99 => _99.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
3533
+ const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _100 => _100.title]), () => ( "Deposit"));
3518
3534
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
3519
3535
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3520
- _chunk55QIUUIScjs.Modal,
3536
+ _chunk7HJ7IBRHcjs.Modal,
3521
3537
  {
3522
3538
  isOpen,
3523
3539
  onClose,
@@ -3578,7 +3594,7 @@ function DepositModalInner({
3578
3594
  balance.title,
3579
3595
  ":"
3580
3596
  ] }),
3581
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunk55QIUUIScjs.currencyFormatter.format(totalBalanceUsd) : null))) })
3597
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunk7HJ7IBRHcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
3582
3598
  ] })
3583
3599
  ] }),
3584
3600
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3631,6 +3647,7 @@ function DepositModalInner({
3631
3647
  onRequestConnect,
3632
3648
  connectButtonLabel,
3633
3649
  uiConfig,
3650
+ allowedRoutes,
3634
3651
  onStepChange: handleStepChange,
3635
3652
  onTotalBalanceChange: handleTotalBalanceChange,
3636
3653
  onClose,