@rhinestone/deposit-modal 0.1.38 → 0.1.39

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.
@@ -21,8 +21,8 @@
21
21
 
22
22
 
23
23
 
24
- var _chunkNULE6WIIcjs = require('./chunk-NULE6WII.cjs');
25
24
 
25
+ var _chunkAHOFT42Hcjs = require('./chunk-AHOFT42H.cjs');
26
26
 
27
27
 
28
28
 
@@ -37,7 +37,8 @@ var _chunkNULE6WIIcjs = require('./chunk-NULE6WII.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunkHYUITBRVcjs = require('./chunk-HYUITBRV.cjs');
40
+
41
+ var _chunkFLXTBFMZcjs = require('./chunk-FLXTBFMZ.cjs');
41
42
 
42
43
  // src/DepositModal.tsx
43
44
 
@@ -57,15 +58,15 @@ var _react = require('react');
57
58
 
58
59
  var _jsxruntime = require('react/jsx-runtime');
59
60
  async function resolveSessionOwner(eoaAddress) {
60
- const localOwner = _chunkNULE6WIIcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
61
+ const localOwner = _chunkAHOFT42Hcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
61
62
  if (localOwner) {
62
63
  return {
63
- account: _chunkNULE6WIIcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
64
+ account: _chunkAHOFT42Hcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
64
65
  address: localOwner.address
65
66
  };
66
67
  }
67
- const created = _chunkNULE6WIIcjs.createSessionOwnerKey.call(void 0, );
68
- _chunkNULE6WIIcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
68
+ const created = _chunkAHOFT42Hcjs.createSessionOwnerKey.call(void 0, );
69
+ _chunkAHOFT42Hcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
69
70
  return {
70
71
  account: created.account,
71
72
  address: created.address
@@ -127,7 +128,7 @@ function SetupStep({
127
128
  primaryType: typedData.primaryType,
128
129
  message: typedData.message
129
130
  });
130
- const sessionDetails = _chunkNULE6WIIcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
131
+ const sessionDetails = _chunkAHOFT42Hcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
131
132
  setState({ type: "registering" });
132
133
  await service.registerAccount({
133
134
  address: smartAccount,
@@ -198,7 +199,7 @@ function SetupStep({
198
199
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
199
200
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
200
201
  isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
201
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
202
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHOFT42Hcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
202
203
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
203
204
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
204
205
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
@@ -235,7 +236,7 @@ function SetupStep({
235
236
  ] })
236
237
  ] })
237
238
  ] }),
238
- isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
239
+ isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHOFT42Hcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
239
240
  ] });
240
241
  }
241
242
 
@@ -259,7 +260,7 @@ function AssetSelectStep({
259
260
  const [error, setError] = _react.useState.call(void 0, null);
260
261
  const defaultAssetId = _react.useMemo.call(void 0, () => {
261
262
  if (!defaultSourceChain || !defaultSourceToken) return null;
262
- return _chunkNULE6WIIcjs.getAssetId.call(void 0, {
263
+ return _chunkAHOFT42Hcjs.getAssetId.call(void 0, {
263
264
  chainId: defaultSourceChain,
264
265
  token: defaultSourceToken
265
266
  });
@@ -276,10 +277,10 @@ function AssetSelectStep({
276
277
  try {
277
278
  const portfolio = await service.fetchPortfolio(address);
278
279
  if (!active) return;
279
- const portfolioAssets = _chunkNULE6WIIcjs.portfolioToAssets.call(void 0, portfolio.tokens);
280
+ const portfolioAssets = _chunkAHOFT42Hcjs.portfolioToAssets.call(void 0, portfolio.tokens);
280
281
  setAssets(portfolioAssets);
281
282
  const hasNative = portfolioAssets.some(
282
- (asset) => asset.token.toLowerCase() === _chunkHYUITBRVcjs.NATIVE_TOKEN_ADDRESS
283
+ (asset) => asset.token.toLowerCase() === _chunkFLXTBFMZcjs.NATIVE_TOKEN_ADDRESS
283
284
  );
284
285
  if (!hasNative) {
285
286
  const nativeAssets = await fetchNativeAssets(
@@ -345,7 +346,7 @@ function AssetSelectStep({
345
346
  const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
346
347
  const numeric = Number(raw);
347
348
  if (!Number.isFinite(numeric)) return raw;
348
- return _chunkNULE6WIIcjs.tokenFormatter.format(numeric);
349
+ return _chunkAHOFT42Hcjs.tokenFormatter.format(numeric);
349
350
  } catch (e3) {
350
351
  return asset.balance;
351
352
  }
@@ -359,7 +360,7 @@ function AssetSelectStep({
359
360
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
360
361
  children: [
361
362
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
362
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.Spinner, { className: "rs-text-tertiary" }),
363
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHOFT42Hcjs.Spinner, { className: "rs-text-tertiary" }),
363
364
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
364
365
  ] }),
365
366
  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 }) }),
@@ -392,9 +393,9 @@ function AssetSelectStep({
392
393
  !loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((asset) => {
393
394
  const isSelected = selectedAssetId === asset.id;
394
395
  const tokenAmount = formatBalance(asset);
395
- const badge = _chunkHYUITBRVcjs.getChainBadge.call(void 0, asset.chainId);
396
- const tokenIcon = _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol);
397
- const chainIcon = _chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId);
396
+ const badge = _chunkFLXTBFMZcjs.getChainBadge.call(void 0, asset.chainId);
397
+ const tokenIcon = _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, asset.symbol);
398
+ const chainIcon = _chunkFLXTBFMZcjs.getChainIcon.call(void 0, asset.chainId);
398
399
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
399
400
  "button",
400
401
  {
@@ -418,7 +419,7 @@ function AssetSelectStep({
418
419
  "img",
419
420
  {
420
421
  src: chainIcon,
421
- alt: _chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId),
422
+ alt: _chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId),
422
423
  className: "rs-asset-chain-badge"
423
424
  }
424
425
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -439,7 +440,7 @@ function AssetSelectStep({
439
440
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-asset-chain", children: [
440
441
  " ",
441
442
  "on ",
442
- _chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)
443
+ _chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId)
443
444
  ] })
444
445
  ] }),
445
446
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-balance-small", children: [
@@ -449,7 +450,7 @@ function AssetSelectStep({
449
450
  ] })
450
451
  ] })
451
452
  ] }),
452
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkNULE6WIIcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
453
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkAHOFT42Hcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
453
454
  ]
454
455
  },
455
456
  asset.id
@@ -459,7 +460,7 @@ function AssetSelectStep({
459
460
  }
460
461
  ),
461
462
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
462
- _chunkNULE6WIIcjs.Button,
463
+ _chunkAHOFT42Hcjs.Button,
463
464
  {
464
465
  onClick: () => selectedAsset && onContinue(selectedAsset),
465
466
  disabled: !selectedAsset,
@@ -467,17 +468,17 @@ function AssetSelectStep({
467
468
  children: "Continue"
468
469
  }
469
470
  ) }),
470
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
471
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHOFT42Hcjs.PoweredBy, {})
471
472
  ] });
472
473
  }
473
474
  async function fetchNativeAssets(address, publicClient, existing) {
474
475
  const existingIds = new Set(existing.map((asset) => asset.id));
475
476
  const connectedChainId = _optionalChain([publicClient, 'access', _6 => _6.chain, 'optionalAccess', _7 => _7.id]);
476
477
  if (!connectedChainId) return [];
477
- if (!_chunkHYUITBRVcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
478
- const id = _chunkNULE6WIIcjs.getAssetId.call(void 0, {
478
+ if (!_chunkFLXTBFMZcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
479
+ const id = _chunkAHOFT42Hcjs.getAssetId.call(void 0, {
479
480
  chainId: connectedChainId,
480
- token: _chunkHYUITBRVcjs.NATIVE_TOKEN_ADDRESS
481
+ token: _chunkFLXTBFMZcjs.NATIVE_TOKEN_ADDRESS
481
482
  });
482
483
  if (existingIds.has(id)) return [];
483
484
  try {
@@ -486,7 +487,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
486
487
  {
487
488
  id,
488
489
  chainId: connectedChainId,
489
- token: _chunkHYUITBRVcjs.NATIVE_TOKEN_ADDRESS,
490
+ token: _chunkFLXTBFMZcjs.NATIVE_TOKEN_ADDRESS,
490
491
  symbol: "ETH",
491
492
  name: "Ethereum",
492
493
  decimals: 18,
@@ -536,8 +537,8 @@ function AmountStep({
536
537
  const chainMismatch = Boolean(
537
538
  _optionalChain([walletClient, 'optionalAccess', _8 => _8.chain, 'optionalAccess', _9 => _9.id]) && walletClient.chain.id !== asset.chainId
538
539
  );
539
- const targetSymbol = _chunkHYUITBRVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
540
- const isSourceStablecoin = _chunkHYUITBRVcjs.isStablecoinSymbol.call(void 0, asset.symbol);
540
+ const targetSymbol = _chunkFLXTBFMZcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
541
+ const isSourceStablecoin = _chunkFLXTBFMZcjs.isStablecoinSymbol.call(void 0, asset.symbol);
541
542
  const tokenPriceUsd = _react.useMemo.call(void 0, () => {
542
543
  if (tokenPriceUsdOverride !== void 0 && tokenPriceUsdOverride > 0)
543
544
  return tokenPriceUsdOverride;
@@ -561,7 +562,7 @@ function AmountStep({
561
562
  const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
562
563
  if (!balanceTarget || !publicClient) return;
563
564
  try {
564
- const bal = _chunkNULE6WIIcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
565
+ const bal = _chunkAHOFT42Hcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
565
566
  address: asset.token,
566
567
  abi: _viem.erc20Abi,
567
568
  functionName: "balanceOf",
@@ -587,7 +588,7 @@ function AmountStep({
587
588
  setIsSwitching(true);
588
589
  switchChain(asset.chainId).catch((err) => {
589
590
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
590
- setError(_chunkNULE6WIIcjs.formatUserError.call(void 0, raw));
591
+ setError(_chunkAHOFT42Hcjs.formatUserError.call(void 0, raw));
591
592
  }).finally(() => {
592
593
  setIsSwitching(false);
593
594
  });
@@ -623,7 +624,7 @@ function AmountStep({
623
624
  const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
624
625
  const numeric = Number(raw);
625
626
  if (!Number.isFinite(numeric)) return raw;
626
- return _chunkNULE6WIIcjs.tokenFormatter.format(numeric);
627
+ return _chunkAHOFT42Hcjs.tokenFormatter.format(numeric);
627
628
  } catch (e8) {
628
629
  return "...";
629
630
  }
@@ -665,13 +666,13 @@ function AmountStep({
665
666
  const usdValue = numericAmount;
666
667
  if (_optionalChain([uiConfig, 'optionalAccess', _11 => _11.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
667
668
  setError(
668
- `Maximum deposit is ${_chunkNULE6WIIcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
669
+ `Maximum deposit is ${_chunkAHOFT42Hcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
669
670
  );
670
671
  return;
671
672
  }
672
673
  if (_optionalChain([uiConfig, 'optionalAccess', _12 => _12.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
673
674
  setError(
674
- `Minimum deposit is ${_chunkNULE6WIIcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
675
+ `Minimum deposit is ${_chunkAHOFT42Hcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
675
676
  );
676
677
  return;
677
678
  }
@@ -720,7 +721,7 @@ function AmountStep({
720
721
  hasPricing && balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
721
722
  " ",
722
723
  "(",
723
- _chunkNULE6WIIcjs.currencyFormatter.format(balanceUsd),
724
+ _chunkAHOFT42Hcjs.currencyFormatter.format(balanceUsd),
724
725
  ")"
725
726
  ] })
726
727
  ] }) })
@@ -734,26 +735,26 @@ function AmountStep({
734
735
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-flow-pill-label", children: "You send" }),
735
736
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token", children: [
736
737
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token-icon-wrapper", children: [
737
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
738
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, asset.symbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
738
739
  "img",
739
740
  {
740
- src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol),
741
+ src: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, asset.symbol),
741
742
  alt: asset.symbol
742
743
  }
743
744
  ) : asset.symbol.slice(0, 2) }),
744
745
  (() => {
745
- const chainIcon = _chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId);
746
+ const chainIcon = _chunkFLXTBFMZcjs.getChainIcon.call(void 0, asset.chainId);
746
747
  if (chainIcon) {
747
748
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
748
749
  "img",
749
750
  {
750
751
  src: chainIcon,
751
- alt: _chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId),
752
+ alt: _chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId),
752
753
  className: "rs-flow-pill-chain-badge"
753
754
  }
754
755
  );
755
756
  }
756
- const badge = _chunkHYUITBRVcjs.getChainBadge.call(void 0, asset.chainId);
757
+ const badge = _chunkFLXTBFMZcjs.getChainBadge.call(void 0, asset.chainId);
757
758
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
758
759
  "div",
759
760
  {
@@ -791,26 +792,26 @@ function AmountStep({
791
792
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-flow-pill-label", children: "You receive" }),
792
793
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token", children: [
793
794
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-flow-pill-token-icon-wrapper", children: [
794
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
795
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-flow-pill-token-icon", children: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, targetSymbol) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
795
796
  "img",
796
797
  {
797
- src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol),
798
+ src: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, targetSymbol),
798
799
  alt: targetSymbol
799
800
  }
800
801
  ) : targetSymbol.slice(0, 2) }),
801
802
  (() => {
802
- const chainIcon = _chunkHYUITBRVcjs.getChainIcon.call(void 0, targetChain);
803
+ const chainIcon = _chunkFLXTBFMZcjs.getChainIcon.call(void 0, targetChain);
803
804
  if (chainIcon) {
804
805
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
805
806
  "img",
806
807
  {
807
808
  src: chainIcon,
808
- alt: _chunkHYUITBRVcjs.getChainName.call(void 0, targetChain),
809
+ alt: _chunkFLXTBFMZcjs.getChainName.call(void 0, targetChain),
809
810
  className: "rs-flow-pill-chain-badge"
810
811
  }
811
812
  );
812
813
  }
813
- const badge = _chunkHYUITBRVcjs.getChainBadge.call(void 0, targetChain);
814
+ const badge = _chunkFLXTBFMZcjs.getChainBadge.call(void 0, targetChain);
814
815
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
815
816
  "div",
816
817
  {
@@ -856,7 +857,7 @@ function AmountStep({
856
857
  }
857
858
  )
858
859
  ] }),
859
- chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
860
+ chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", style: { marginTop: 16 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
860
861
  error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
861
862
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
862
863
  "svg",
@@ -880,7 +881,7 @@ function AmountStep({
880
881
  ] })
881
882
  ] }),
882
883
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
883
- _chunkNULE6WIIcjs.Button,
884
+ _chunkAHOFT42Hcjs.Button,
884
885
  {
885
886
  onClick: handleContinue,
886
887
  fullWidth: true,
@@ -888,7 +889,7 @@ function AmountStep({
888
889
  children: "Continue"
889
890
  }
890
891
  ) }),
891
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
892
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHOFT42Hcjs.PoweredBy, {})
892
893
  ] });
893
894
  }
894
895
 
@@ -919,7 +920,7 @@ function ConfirmStep({
919
920
  const hasAttemptedSwitch = _react.useRef.call(void 0, false);
920
921
  const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _13 => _13.chain, 'optionalAccess', _14 => _14.id]) && walletClient.chain.id !== asset.chainId;
921
922
  const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
922
- const targetSymbol = sameRoute ? asset.symbol : _chunkHYUITBRVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
923
+ const targetSymbol = sameRoute ? asset.symbol : _chunkFLXTBFMZcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
923
924
  const formattedSendAmount = amount && !Number.isNaN(Number(amount)) ? Number(amount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
924
925
  const formattedReceiveAmount = (() => {
925
926
  if (sameRoute) return formattedSendAmount;
@@ -938,7 +939,7 @@ function ConfirmStep({
938
939
  setIsSwitching(true);
939
940
  switchChain(asset.chainId).catch((err) => {
940
941
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
941
- setError(_chunkNULE6WIIcjs.formatUserError.call(void 0, raw));
942
+ setError(_chunkAHOFT42Hcjs.formatUserError.call(void 0, raw));
942
943
  }).finally(() => {
943
944
  setIsSwitching(false);
944
945
  });
@@ -953,7 +954,7 @@ function ConfirmStep({
953
954
  return;
954
955
  }
955
956
  if (chainMismatch) {
956
- setError(`Switch to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)} to sign`);
957
+ setError(`Switch to ${_chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId)} to sign`);
957
958
  return;
958
959
  }
959
960
  const parsedAmount = parseFloat(amount);
@@ -981,7 +982,7 @@ function ConfirmStep({
981
982
  throw new Error("Wallet not properly connected");
982
983
  }
983
984
  const transferTo = sameRoute ? recipient : smartAccount;
984
- const hash = _chunkNULE6WIIcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
985
+ const hash = _chunkAHOFT42Hcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
985
986
  account,
986
987
  chain,
987
988
  to: transferTo,
@@ -998,7 +999,7 @@ function ConfirmStep({
998
999
  onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
999
1000
  } catch (err) {
1000
1001
  const raw = err instanceof Error ? err.message : "Transfer failed";
1001
- const message = _chunkNULE6WIIcjs.formatUserError.call(void 0, raw);
1002
+ const message = _chunkAHOFT42Hcjs.formatUserError.call(void 0, raw);
1002
1003
  setError(message);
1003
1004
  _optionalChain([onError, 'optionalCall', _16 => _16(message, "TRANSFER_ERROR")]);
1004
1005
  } finally {
@@ -1017,15 +1018,15 @@ function ConfirmStep({
1017
1018
  className: "rs-card-value",
1018
1019
  style: { display: "flex", alignItems: "center", gap: 8 },
1019
1020
  children: [
1020
- _chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1021
+ _chunkFLXTBFMZcjs.getChainIcon.call(void 0, asset.chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1021
1022
  "img",
1022
1023
  {
1023
- src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, asset.chainId),
1024
+ src: _chunkFLXTBFMZcjs.getChainIcon.call(void 0, asset.chainId),
1024
1025
  alt: "",
1025
1026
  style: { width: 16, height: 16, borderRadius: 3 }
1026
1027
  }
1027
1028
  ),
1028
- _chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)
1029
+ _chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId)
1029
1030
  ]
1030
1031
  }
1031
1032
  )
@@ -1038,15 +1039,15 @@ function ConfirmStep({
1038
1039
  className: "rs-card-value",
1039
1040
  style: { display: "flex", alignItems: "center", gap: 8 },
1040
1041
  children: [
1041
- _chunkHYUITBRVcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1042
+ _chunkFLXTBFMZcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1042
1043
  "img",
1043
1044
  {
1044
- src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, targetChain),
1045
+ src: _chunkFLXTBFMZcjs.getChainIcon.call(void 0, targetChain),
1045
1046
  alt: "",
1046
1047
  style: { width: 16, height: 16, borderRadius: 3 }
1047
1048
  }
1048
1049
  ),
1049
- _chunkHYUITBRVcjs.getChainName.call(void 0, targetChain)
1050
+ _chunkFLXTBFMZcjs.getChainName.call(void 0, targetChain)
1050
1051
  ]
1051
1052
  }
1052
1053
  )
@@ -1065,10 +1066,10 @@ function ConfirmStep({
1065
1066
  className: "rs-card-value",
1066
1067
  style: { display: "flex", alignItems: "center", gap: 6 },
1067
1068
  children: [
1068
- _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1069
+ _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, asset.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1069
1070
  "img",
1070
1071
  {
1071
- src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, asset.symbol),
1072
+ src: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, asset.symbol),
1072
1073
  alt: "",
1073
1074
  style: { width: 16, height: 16, borderRadius: "50%" }
1074
1075
  }
@@ -1088,10 +1089,10 @@ function ConfirmStep({
1088
1089
  className: "rs-card-value",
1089
1090
  style: { display: "flex", alignItems: "center", gap: 6 },
1090
1091
  children: [
1091
- _chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1092
+ _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1092
1093
  "img",
1093
1094
  {
1094
- src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, targetSymbol),
1095
+ src: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, targetSymbol),
1095
1096
  alt: "",
1096
1097
  style: { width: 16, height: 16, borderRadius: "50%" }
1097
1098
  }
@@ -1104,7 +1105,7 @@ function ConfirmStep({
1104
1105
  )
1105
1106
  ] })
1106
1107
  ] }),
1107
- chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkHYUITBRVcjs.getChainName.call(void 0, asset.chainId)} to sign.` }) }),
1108
+ chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch your wallet to ${_chunkFLXTBFMZcjs.getChainName.call(void 0, asset.chainId)} to sign.` }) }),
1108
1109
  error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-alert rs-alert--error", children: [
1109
1110
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1110
1111
  "svg",
@@ -1128,7 +1129,7 @@ function ConfirmStep({
1128
1129
  ] })
1129
1130
  ] }),
1130
1131
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1131
- _chunkNULE6WIIcjs.Button,
1132
+ _chunkAHOFT42Hcjs.Button,
1132
1133
  {
1133
1134
  onClick: handleConfirm,
1134
1135
  loading: isSubmitting,
@@ -1137,7 +1138,7 @@ function ConfirmStep({
1137
1138
  children: "Confirm Order"
1138
1139
  }
1139
1140
  ) }),
1140
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
1141
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHOFT42Hcjs.PoweredBy, {})
1141
1142
  ] });
1142
1143
  }
1143
1144
 
@@ -1236,58 +1237,18 @@ QRCode.displayName = "QRCode";
1236
1237
  // src/components/steps/DepositAddressStep.tsx
1237
1238
 
1238
1239
  var POLL_INTERVAL_MS = 4e3;
1239
- function isRecord(value) {
1240
- return typeof value === "object" && value !== null;
1241
- }
1242
- function asNumber(value) {
1243
- if (typeof value === "number" && Number.isFinite(value)) return value;
1244
- if (typeof value === "string" && value.trim() !== "") {
1245
- const parsed = Number(value);
1246
- return Number.isFinite(parsed) ? parsed : void 0;
1247
- }
1248
- return void 0;
1249
- }
1250
- function asAmount(value) {
1251
- if (typeof value === "string") return value;
1252
- if (typeof value === "number" && Number.isFinite(value)) {
1253
- return value.toString();
1254
- }
1255
- return void 0;
1256
- }
1257
- function asAddress(value) {
1258
- if (typeof value !== "string") return void 0;
1259
- return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
1260
- }
1261
- function getDepositEventDetails(event) {
1262
- if (!_optionalChain([event, 'optionalAccess', _17 => _17.type]) || !isRecord(event.data)) return {};
1263
- if (event.type === "deposit-received") {
1264
- return {
1265
- chainId: asNumber(event.data.chain),
1266
- amount: asAmount(event.data.amount),
1267
- token: asAddress(event.data.token)
1268
- };
1269
- }
1270
- if (event.type === "bridge-started") {
1271
- const source = isRecord(event.data.source) ? event.data.source : void 0;
1272
- return {
1273
- chainId: asNumber(_optionalChain([source, 'optionalAccess', _18 => _18.chain])),
1274
- token: asAddress(_optionalChain([source, 'optionalAccess', _19 => _19.asset]))
1275
- };
1276
- }
1277
- return {};
1278
- }
1279
1240
  function DepositAddressStep({
1280
1241
  smartAccount,
1281
1242
  service,
1282
1243
  onDepositDetected,
1283
1244
  onError
1284
1245
  }) {
1285
- const supportedChainIds = _react.useMemo.call(void 0, () => _chunkHYUITBRVcjs.getSupportedChainIds.call(void 0, ), []);
1246
+ const supportedChainIds = _react.useMemo.call(void 0, () => _chunkFLXTBFMZcjs.getSupportedChainIds.call(void 0, ), []);
1286
1247
  const BASE_CHAIN_ID = 8453;
1287
1248
  const defaultChainId = supportedChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : supportedChainIds[0];
1288
1249
  const [sourceChainId, setSourceChainId] = _react.useState.call(void 0, defaultChainId);
1289
1250
  const tokensForChain = _react.useMemo.call(void 0,
1290
- () => _chunkHYUITBRVcjs.getTargetTokenSymbolsForChain.call(void 0, sourceChainId),
1251
+ () => _chunkFLXTBFMZcjs.getTargetTokenSymbolsForChain.call(void 0, sourceChainId),
1291
1252
  [sourceChainId]
1292
1253
  );
1293
1254
  const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
@@ -1319,8 +1280,8 @@ function DepositAddressStep({
1319
1280
  function handlePointerDown(event) {
1320
1281
  const target = event.target;
1321
1282
  if (!target) return;
1322
- const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _20 => _20.current, 'optionalAccess', _21 => _21.contains, 'call', _22 => _22(target)]);
1323
- const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _23 => _23.current, 'optionalAccess', _24 => _24.contains, 'call', _25 => _25(target)]);
1283
+ const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _17 => _17.current, 'optionalAccess', _18 => _18.contains, 'call', _19 => _19(target)]);
1284
+ const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _20 => _20.current, 'optionalAccess', _21 => _21.contains, 'call', _22 => _22(target)]);
1324
1285
  if (clickedChainDropdown || clickedTokenDropdown) return;
1325
1286
  setChainDropdownOpen(false);
1326
1287
  setTokenDropdownOpen(false);
@@ -1362,15 +1323,15 @@ function DepositAddressStep({
1362
1323
  const status = await service.fetchLatestStatus(smartAccount);
1363
1324
  if (cancelled || depositHandledRef.current) return;
1364
1325
  const event = status.lastEvent;
1365
- const eventTxHash = _chunkNULE6WIIcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunkNULE6WIIcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _26 => _26.toLowerCase, 'call', _27 => _27()]), () => ( null)) : null;
1326
+ const eventTxHash = _chunkAHOFT42Hcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunkAHOFT42Hcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _23 => _23.toLowerCase, 'call', _24 => _24()]), () => ( null)) : null;
1366
1327
  if (baselineTxHash === void 0) {
1367
1328
  baselineTxHash = eventTxHash;
1368
1329
  } else if (eventTxHash && eventTxHash !== baselineTxHash) {
1369
- const details = getDepositEventDetails(event);
1330
+ const details = _chunkAHOFT42Hcjs.getEventSourceDetails.call(void 0, event);
1370
1331
  const fallback = sourceSelectionRef.current;
1371
1332
  const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
1372
1333
  const amount = _nullishCoalesce(details.amount, () => ( "0"));
1373
- const token = _nullishCoalesce(details.token, () => ( _chunkHYUITBRVcjs.getTokenAddress.call(void 0, fallback.tokenSymbol, fallback.chainId)));
1334
+ const token = _nullishCoalesce(details.token, () => ( _chunkFLXTBFMZcjs.getTokenAddress.call(void 0, fallback.tokenSymbol, fallback.chainId)));
1374
1335
  if (token) {
1375
1336
  depositHandledRef.current = true;
1376
1337
  onDepositDetected(eventTxHash, chainId, amount, token);
@@ -1382,7 +1343,7 @@ function DepositAddressStep({
1382
1343
  if (!cancelled) {
1383
1344
  const msg = err instanceof Error ? err.message : "Failed to check status";
1384
1345
  setPollingError(msg);
1385
- _optionalChain([onError, 'optionalCall', _28 => _28(msg, "STATUS_POLL_ERROR")]);
1346
+ _optionalChain([onError, 'optionalCall', _25 => _25(msg, "STATUS_POLL_ERROR")]);
1386
1347
  }
1387
1348
  }
1388
1349
  if (!cancelled && !depositHandledRef.current) {
@@ -1395,7 +1356,7 @@ function DepositAddressStep({
1395
1356
  clearTimeout(timeoutId);
1396
1357
  };
1397
1358
  }, [smartAccount, service, onDepositDetected, onError]);
1398
- const chainIconSrc = _chunkHYUITBRVcjs.getChainIcon.call(void 0, sourceChainId);
1359
+ const chainIconSrc = _chunkFLXTBFMZcjs.getChainIcon.call(void 0, sourceChainId);
1399
1360
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
1400
1361
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-body", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address", children: [
1401
1362
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
@@ -1411,10 +1372,10 @@ function DepositAddressStep({
1411
1372
  setChainDropdownOpen(false);
1412
1373
  },
1413
1374
  children: [
1414
- _chunkHYUITBRVcjs.getTokenIcon.call(void 0, sourceTokenSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1375
+ _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, sourceTokenSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1415
1376
  "img",
1416
1377
  {
1417
- src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, sourceTokenSymbol),
1378
+ src: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, sourceTokenSymbol),
1418
1379
  alt: "",
1419
1380
  className: "rs-deposit-address-dropdown-icon"
1420
1381
  }
@@ -1451,10 +1412,10 @@ function DepositAddressStep({
1451
1412
  setTokenDropdownOpen(false);
1452
1413
  },
1453
1414
  children: [
1454
- _chunkHYUITBRVcjs.getTokenIcon.call(void 0, symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1415
+ _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1455
1416
  "img",
1456
1417
  {
1457
- src: _chunkHYUITBRVcjs.getTokenIcon.call(void 0, symbol),
1418
+ src: _chunkFLXTBFMZcjs.getTokenIcon.call(void 0, symbol),
1458
1419
  alt: "",
1459
1420
  className: "rs-deposit-address-dropdown-icon"
1460
1421
  }
@@ -1477,15 +1438,15 @@ function DepositAddressStep({
1477
1438
  setTokenDropdownOpen(false);
1478
1439
  },
1479
1440
  children: [
1480
- _chunkHYUITBRVcjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1441
+ _chunkFLXTBFMZcjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1481
1442
  "img",
1482
1443
  {
1483
- src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, sourceChainId),
1444
+ src: _chunkFLXTBFMZcjs.getChainIcon.call(void 0, sourceChainId),
1484
1445
  alt: "",
1485
1446
  className: "rs-deposit-address-dropdown-icon"
1486
1447
  }
1487
1448
  ),
1488
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkHYUITBRVcjs.getChainName.call(void 0, sourceChainId) }),
1449
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkFLXTBFMZcjs.getChainName.call(void 0, sourceChainId) }),
1489
1450
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1490
1451
  "svg",
1491
1452
  {
@@ -1517,15 +1478,15 @@ function DepositAddressStep({
1517
1478
  setChainDropdownOpen(false);
1518
1479
  },
1519
1480
  children: [
1520
- _chunkHYUITBRVcjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1481
+ _chunkFLXTBFMZcjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1521
1482
  "img",
1522
1483
  {
1523
- src: _chunkHYUITBRVcjs.getChainIcon.call(void 0, chainId),
1484
+ src: _chunkFLXTBFMZcjs.getChainIcon.call(void 0, chainId),
1524
1485
  alt: "",
1525
1486
  className: "rs-deposit-address-dropdown-icon"
1526
1487
  }
1527
1488
  ),
1528
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkHYUITBRVcjs.getChainName.call(void 0, chainId) })
1489
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkFLXTBFMZcjs.getChainName.call(void 0, chainId) })
1529
1490
  ]
1530
1491
  },
1531
1492
  chainId
@@ -1575,7 +1536,7 @@ function DepositAddressStep({
1575
1536
  ] }),
1576
1537
  pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
1577
1538
  ] }) }),
1578
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNULE6WIIcjs.PoweredBy, {})
1539
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAHOFT42Hcjs.PoweredBy, {})
1579
1540
  ] });
1580
1541
  }
1581
1542
  DepositAddressStep.displayName = "DepositAddressStep";
@@ -1585,6 +1546,9 @@ DepositAddressStep.displayName = "DepositAddressStep";
1585
1546
  function isSameRoute(sourceChain, sourceToken, targetChain, targetToken) {
1586
1547
  return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
1587
1548
  }
1549
+ function getAddressKey(address) {
1550
+ return address ? address.toLowerCase() : null;
1551
+ }
1588
1552
  function DepositFlow({
1589
1553
  dappWalletClient,
1590
1554
  dappPublicClient,
@@ -1596,7 +1560,7 @@ function DepositFlow({
1596
1560
  sourceToken: defaultSourceToken,
1597
1561
  amount: defaultAmount,
1598
1562
  recipient,
1599
- signerAddress = _chunkHYUITBRVcjs.DEFAULT_SIGNER_ADDRESS,
1563
+ signerAddress = _chunkFLXTBFMZcjs.DEFAULT_SIGNER_ADDRESS,
1600
1564
  sessionChainIds,
1601
1565
  forceRegister = false,
1602
1566
  waitForFinalTx = true,
@@ -1622,6 +1586,8 @@ function DepositFlow({
1622
1586
  const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = _react.useState.call(void 0, false);
1623
1587
  const [selectedConnectAddress, setSelectedConnectAddress] = _react.useState.call(void 0, null);
1624
1588
  const portfolioAssetsRef = _react.useRef.call(void 0, []);
1589
+ const stableWalletSignerRef = _react.useRef.call(void 0, null);
1590
+ const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
1625
1591
  const handleAssetsLoaded = _react.useCallback.call(void 0, (assets) => {
1626
1592
  portfolioAssetsRef.current = assets;
1627
1593
  }, []);
@@ -1639,23 +1605,24 @@ function DepositFlow({
1639
1605
  return null;
1640
1606
  }, []);
1641
1607
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
1642
- if (!_optionalChain([dappWalletClient, 'optionalAccess', _29 => _29.switchChain])) return void 0;
1608
+ if (!_optionalChain([dappWalletClient, 'optionalAccess', _26 => _26.switchChain])) return void 0;
1643
1609
  return async (chainId) => {
1644
- await _optionalChain([dappWalletClient, 'access', _30 => _30.switchChain, 'optionalCall', _31 => _31({ id: chainId })]);
1610
+ await _optionalChain([dappWalletClient, 'access', _27 => _27.switchChain, 'optionalCall', _28 => _28({ id: chainId })]);
1645
1611
  };
1646
1612
  }, [dappWalletClient]);
1613
+ const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _29 => _29.account, 'optionalAccess', _30 => _30.address]), () => ( null));
1647
1614
  const walletOptions = _react.useMemo.call(void 0, () => {
1648
1615
  const options = [];
1649
1616
  const seen = /* @__PURE__ */ new Set();
1650
- if (_optionalChain([dappWalletClient, 'optionalAccess', _32 => _32.account]) && dappAddress) {
1617
+ if (connectedWalletAddress && dappAddress) {
1651
1618
  options.push({
1652
- address: dappWalletClient.account.address,
1619
+ address: connectedWalletAddress,
1653
1620
  label: "Connected Wallet",
1654
1621
  kind: "connected"
1655
1622
  });
1656
- seen.add(dappWalletClient.account.address.toLowerCase());
1623
+ seen.add(connectedWalletAddress.toLowerCase());
1657
1624
  }
1658
- if (_optionalChain([reownWallet, 'optionalAccess', _33 => _33.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(reownWallet.address.toLowerCase())) {
1625
+ if (_optionalChain([reownWallet, 'optionalAccess', _31 => _31.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(reownWallet.address.toLowerCase())) {
1659
1626
  options.push({
1660
1627
  address: reownWallet.address,
1661
1628
  label: "External Wallet",
@@ -1665,48 +1632,58 @@ function DepositFlow({
1665
1632
  }
1666
1633
  return options;
1667
1634
  }, [
1668
- dappWalletClient,
1635
+ connectedWalletAddress,
1669
1636
  dappAddress,
1670
- _optionalChain([reownWallet, 'optionalAccess', _34 => _34.address]),
1671
- _optionalChain([reownWallet, 'optionalAccess', _35 => _35.isConnected]),
1672
- _optionalChain([reownWallet, 'optionalAccess', _36 => _36.walletClient]),
1673
- _optionalChain([reownWallet, 'optionalAccess', _37 => _37.publicClient]),
1674
- _optionalChain([reownWallet, 'optionalAccess', _38 => _38.icon])
1637
+ _optionalChain([reownWallet, 'optionalAccess', _32 => _32.address]),
1638
+ _optionalChain([reownWallet, 'optionalAccess', _33 => _33.isConnected]),
1639
+ _optionalChain([reownWallet, 'optionalAccess', _34 => _34.walletClient]),
1640
+ _optionalChain([reownWallet, 'optionalAccess', _35 => _35.publicClient]),
1641
+ _optionalChain([reownWallet, 'optionalAccess', _36 => _36.icon])
1675
1642
  ]);
1676
- const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _39 => _39.account]) && dappAddress && !reownWallet;
1643
+ const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _37 => _37.account]) && dappAddress && !reownWallet;
1677
1644
  const hasWalletOptions = walletOptions.length > 0;
1678
- const hasReownSession = Boolean(_optionalChain([reownWallet, 'optionalAccess', _40 => _40.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _41 => _41.address]));
1679
- const showConnectStep = !canAutoLock && !isConnectSelectionConfirmed;
1680
- const signerContext = _react.useMemo.call(void 0, () => {
1645
+ const hasReownSession = Boolean(
1646
+ _optionalChain([reownWallet, 'optionalAccess', _38 => _38.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _39 => _39.address])
1647
+ );
1648
+ const showConnectStep = flowMode === null && !canAutoLock && !isConnectSelectionConfirmed;
1649
+ const walletSelectionKey = _react.useMemo.call(void 0, () => {
1650
+ if (flowMode !== "wallet") return null;
1651
+ if (canAutoLock) {
1652
+ return getAddressKey(connectedWalletAddress);
1653
+ }
1654
+ if (!isConnectSelectionConfirmed) return null;
1655
+ return getAddressKey(selectedConnectAddress);
1656
+ }, [
1657
+ flowMode,
1658
+ canAutoLock,
1659
+ connectedWalletAddress,
1660
+ isConnectSelectionConfirmed,
1661
+ selectedConnectAddress
1662
+ ]);
1663
+ const walletSignerContext = _react.useMemo.call(void 0, () => {
1681
1664
  if (flowMode === "deposit-address") {
1682
- if (!dappAddress) return null;
1683
- return {
1684
- ownerAddress: dappAddress,
1685
- walletClient: void 0,
1686
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNULE6WIIcjs.getPublicClient.call(void 0, targetChain))),
1687
- switchChain: void 0
1688
- };
1665
+ return null;
1689
1666
  }
1690
1667
  if (canAutoLock) {
1691
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _42 => _42.chain, 'optionalAccess', _43 => _43.id]), () => ( targetChain));
1668
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _40 => _40.chain, 'optionalAccess', _41 => _41.id]), () => ( targetChain));
1692
1669
  return {
1693
1670
  ownerAddress: dappWalletClient.account.address,
1694
1671
  walletClient: dappWalletClient,
1695
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNULE6WIIcjs.getPublicClient.call(void 0, fallbackChainId))),
1672
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkAHOFT42Hcjs.getPublicClient.call(void 0, fallbackChainId))),
1696
1673
  switchChain: dappSwitchChain
1697
1674
  };
1698
1675
  }
1699
1676
  if (!isConnectSelectionConfirmed || !selectedConnectAddress) return null;
1700
- if (_optionalChain([dappWalletClient, 'optionalAccess', _44 => _44.account]) && dappWalletClient.account.address.toLowerCase() === selectedConnectAddress.toLowerCase()) {
1701
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _45 => _45.chain, 'optionalAccess', _46 => _46.id]), () => ( targetChain));
1677
+ if (_optionalChain([dappWalletClient, 'optionalAccess', _42 => _42.account]) && dappWalletClient.account.address.toLowerCase() === selectedConnectAddress.toLowerCase()) {
1678
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _43 => _43.chain, 'optionalAccess', _44 => _44.id]), () => ( targetChain));
1702
1679
  return {
1703
1680
  ownerAddress: dappWalletClient.account.address,
1704
1681
  walletClient: dappWalletClient,
1705
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNULE6WIIcjs.getPublicClient.call(void 0, fallbackChainId))),
1682
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkAHOFT42Hcjs.getPublicClient.call(void 0, fallbackChainId))),
1706
1683
  switchChain: dappSwitchChain
1707
1684
  };
1708
1685
  }
1709
- if (_optionalChain([reownWallet, 'optionalAccess', _47 => _47.address, 'optionalAccess', _48 => _48.toLowerCase, 'call', _49 => _49()]) === selectedConnectAddress.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
1686
+ if (_optionalChain([reownWallet, 'optionalAccess', _45 => _45.address, 'optionalAccess', _46 => _46.toLowerCase, 'call', _47 => _47()]) === selectedConnectAddress.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
1710
1687
  return {
1711
1688
  ownerAddress: reownWallet.address,
1712
1689
  walletClient: reownWallet.walletClient,
@@ -1716,7 +1693,6 @@ function DepositFlow({
1716
1693
  }
1717
1694
  return null;
1718
1695
  }, [
1719
- flowMode,
1720
1696
  canAutoLock,
1721
1697
  isConnectSelectionConfirmed,
1722
1698
  selectedConnectAddress,
@@ -1727,7 +1703,50 @@ function DepositFlow({
1727
1703
  reownWallet,
1728
1704
  targetChain
1729
1705
  ]);
1730
- const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _50 => _50.ownerAddress]))), () => ( null));
1706
+ _react.useEffect.call(void 0, () => {
1707
+ if (flowMode !== "wallet") {
1708
+ stableWalletSelectionKeyRef.current = null;
1709
+ stableWalletSignerRef.current = null;
1710
+ return;
1711
+ }
1712
+ if (walletSelectionKey !== stableWalletSelectionKeyRef.current) {
1713
+ stableWalletSelectionKeyRef.current = walletSelectionKey;
1714
+ stableWalletSignerRef.current = null;
1715
+ }
1716
+ if (walletSignerContext && walletSelectionKey) {
1717
+ stableWalletSelectionKeyRef.current = walletSelectionKey;
1718
+ stableWalletSignerRef.current = walletSignerContext;
1719
+ }
1720
+ }, [flowMode, walletSelectionKey, walletSignerContext]);
1721
+ const signerContext = _react.useMemo.call(void 0, () => {
1722
+ if (flowMode === "deposit-address") {
1723
+ if (!dappAddress) return null;
1724
+ return {
1725
+ ownerAddress: dappAddress,
1726
+ walletClient: void 0,
1727
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkAHOFT42Hcjs.getPublicClient.call(void 0, targetChain))),
1728
+ switchChain: void 0
1729
+ };
1730
+ }
1731
+ if (flowMode !== "wallet") {
1732
+ return null;
1733
+ }
1734
+ if (walletSignerContext) {
1735
+ return walletSignerContext;
1736
+ }
1737
+ if (walletSelectionKey && stableWalletSelectionKeyRef.current === walletSelectionKey) {
1738
+ return stableWalletSignerRef.current;
1739
+ }
1740
+ return null;
1741
+ }, [
1742
+ flowMode,
1743
+ dappAddress,
1744
+ dappPublicClient,
1745
+ targetChain,
1746
+ walletSignerContext,
1747
+ walletSelectionKey
1748
+ ]);
1749
+ const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _48 => _48.ownerAddress]))), () => ( null));
1731
1750
  const lastTargetRef = _react.useRef.call(void 0, null);
1732
1751
  _react.useEffect.call(void 0, () => {
1733
1752
  const prev = lastTargetRef.current;
@@ -1747,6 +1766,7 @@ function DepositFlow({
1747
1766
  const handleBackFromSelectAsset = _react.useCallback.call(void 0, () => {
1748
1767
  if (hasWalletOptions || reownWallet) {
1749
1768
  hasNavigatedBackRef.current = true;
1769
+ setFlowMode(null);
1750
1770
  setIsConnectSelectionConfirmed(false);
1751
1771
  }
1752
1772
  }, [hasWalletOptions, reownWallet]);
@@ -1771,10 +1791,10 @@ function DepositFlow({
1771
1791
  const stepIndex = step.type === "setup" ? 0 : step.type === "deposit-address" ? 1 : step.type === "select-asset" ? 1 : step.type === "amount" ? 2 : step.type === "confirm" ? 3 : 4;
1772
1792
  const currentBackHandler = step.type === "deposit-address" ? handleBackFromDepositAddress : step.type === "select-asset" && signerContext && !canAutoLock ? handleBackFromSelectAsset : step.type === "amount" ? handleBackFromAmount : step.type === "confirm" ? handleBackFromConfirm : void 0;
1773
1793
  _react.useEffect.call(void 0, () => {
1774
- _optionalChain([onStepChange, 'optionalCall', _51 => _51(stepIndex, currentBackHandler)]);
1794
+ _optionalChain([onStepChange, 'optionalCall', _49 => _49(stepIndex, currentBackHandler)]);
1775
1795
  }, [stepIndex, currentBackHandler, onStepChange]);
1776
1796
  _react.useEffect.call(void 0, () => {
1777
- _optionalChain([onTotalBalanceChange, 'optionalCall', _52 => _52(totalBalanceUsd)]);
1797
+ _optionalChain([onTotalBalanceChange, 'optionalCall', _50 => _50(totalBalanceUsd)]);
1778
1798
  }, [totalBalanceUsd, onTotalBalanceChange]);
1779
1799
  const isDepositAddressMode = flowMode === "deposit-address";
1780
1800
  const handleSelectProvider = _react.useCallback.call(void 0, () => {
@@ -1812,13 +1832,13 @@ function DepositFlow({
1812
1832
  directTransfer: isSameRoute(chainId, token, targetChain, targetToken)
1813
1833
  };
1814
1834
  });
1815
- _optionalChain([onDepositSubmitted, 'optionalCall', _53 => _53({ txHash, sourceChain: chainId, amount })]);
1835
+ _optionalChain([onDepositSubmitted, 'optionalCall', _51 => _51({ txHash, sourceChain: chainId, amount })]);
1816
1836
  },
1817
1837
  [onDepositSubmitted, targetChain, targetToken]
1818
1838
  );
1819
1839
  const handleConnected = _react.useCallback.call(void 0,
1820
1840
  (addr, smartAccount) => {
1821
- _optionalChain([onConnected, 'optionalCall', _54 => _54({ address: addr, smartAccount })]);
1841
+ _optionalChain([onConnected, 'optionalCall', _52 => _52({ address: addr, smartAccount })]);
1822
1842
  },
1823
1843
  [onConnected]
1824
1844
  );
@@ -1838,8 +1858,8 @@ function DepositFlow({
1838
1858
  );
1839
1859
  const handleAmountContinue = _react.useCallback.call(void 0,
1840
1860
  (amount, targetAmount, balance) => {
1841
- const targetSym = _chunkHYUITBRVcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1842
- const isTargetStable = _chunkHYUITBRVcjs.isStablecoinSymbol.call(void 0, targetSym);
1861
+ const targetSym = _chunkFLXTBFMZcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1862
+ const isTargetStable = _chunkFLXTBFMZcjs.isStablecoinSymbol.call(void 0, targetSym);
1843
1863
  const targetTokenPriceUsd = isTargetStable ? 1 : getTokenPriceUsd(targetSym);
1844
1864
  setStep((prev) => {
1845
1865
  if (prev.type !== "amount") return prev;
@@ -1875,25 +1895,25 @@ function DepositFlow({
1875
1895
  );
1876
1896
  const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
1877
1897
  (txHash, sourceChain, amount) => {
1878
- _optionalChain([onDepositSubmitted, 'optionalCall', _55 => _55({ txHash, sourceChain, amount })]);
1898
+ _optionalChain([onDepositSubmitted, 'optionalCall', _53 => _53({ txHash, sourceChain, amount })]);
1879
1899
  },
1880
1900
  [onDepositSubmitted]
1881
1901
  );
1882
1902
  const handleDepositComplete = _react.useCallback.call(void 0,
1883
1903
  (txHash, destinationTxHash) => {
1884
- _optionalChain([onDepositComplete, 'optionalCall', _56 => _56({ txHash, destinationTxHash })]);
1904
+ _optionalChain([onDepositComplete, 'optionalCall', _54 => _54({ txHash, destinationTxHash })]);
1885
1905
  },
1886
1906
  [onDepositComplete]
1887
1907
  );
1888
1908
  const handleDepositFailed = _react.useCallback.call(void 0,
1889
1909
  (txHash, error) => {
1890
- _optionalChain([onDepositFailed, 'optionalCall', _57 => _57({ txHash, error })]);
1910
+ _optionalChain([onDepositFailed, 'optionalCall', _55 => _55({ txHash, error })]);
1891
1911
  },
1892
1912
  [onDepositFailed]
1893
1913
  );
1894
1914
  const handleError = _react.useCallback.call(void 0,
1895
1915
  (message, code) => {
1896
- _optionalChain([onError, 'optionalCall', _58 => _58({ message, code })]);
1916
+ _optionalChain([onError, 'optionalCall', _56 => _56({ message, code })]);
1897
1917
  },
1898
1918
  [onError]
1899
1919
  );
@@ -1944,7 +1964,7 @@ function DepositFlow({
1944
1964
  ]);
1945
1965
  if (showConnectStep) {
1946
1966
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1947
- _chunkNULE6WIIcjs.ConnectStep,
1967
+ _chunkAHOFT42Hcjs.ConnectStep,
1948
1968
  {
1949
1969
  walletOptions,
1950
1970
  selectedAddress: selectedConnectAddressEffective,
@@ -1996,7 +2016,7 @@ function DepositFlow({
1996
2016
  }
1997
2017
  ),
1998
2018
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1999
- _chunkNULE6WIIcjs.ProcessingStep,
2019
+ _chunkAHOFT42Hcjs.ProcessingStep,
2000
2020
  {
2001
2021
  smartAccount: step.smartAccount,
2002
2022
  txHash: step.txHash,
@@ -2017,16 +2037,16 @@ function DepositFlow({
2017
2037
  )
2018
2038
  ] });
2019
2039
  }
2020
- if (!_optionalChain([signerContext, 'optionalAccess', _59 => _59.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _60 => _60.publicClient])) {
2040
+ if (!_optionalChain([signerContext, 'optionalAccess', _57 => _57.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _58 => _58.publicClient])) {
2021
2041
  return null;
2022
2042
  }
2023
2043
  const ownerAddress = signerContext.ownerAddress;
2024
- const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _61 => _61.walletClient, 'optionalAccess', _62 => _62.chain, 'optionalAccess', _63 => _63.id]), () => ( _optionalChain([signerContext, 'access', _64 => _64.publicClient, 'access', _65 => _65.chain, 'optionalAccess', _66 => _66.id]))), () => ( targetChain));
2044
+ const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _59 => _59.walletClient, 'optionalAccess', _60 => _60.chain, 'optionalAccess', _61 => _61.id]), () => ( _optionalChain([signerContext, 'access', _62 => _62.publicClient, 'access', _63 => _63.chain, 'optionalAccess', _64 => _64.id]))), () => ( targetChain));
2025
2045
  const getReadClientForChain = (chainId) => {
2026
- if (_optionalChain([signerContext, 'access', _67 => _67.publicClient, 'access', _68 => _68.chain, 'optionalAccess', _69 => _69.id]) === chainId) {
2046
+ if (_optionalChain([signerContext, 'access', _65 => _65.publicClient, 'access', _66 => _66.chain, 'optionalAccess', _67 => _67.id]) === chainId) {
2027
2047
  return signerContext.publicClient;
2028
2048
  }
2029
- return _chunkNULE6WIIcjs.getPublicClient.call(void 0, chainId);
2049
+ return _chunkAHOFT42Hcjs.getPublicClient.call(void 0, chainId);
2030
2050
  };
2031
2051
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
2032
2052
  step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2095,7 +2115,7 @@ function DepositFlow({
2095
2115
  }
2096
2116
  ),
2097
2117
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2098
- _chunkNULE6WIIcjs.ProcessingStep,
2118
+ _chunkAHOFT42Hcjs.ProcessingStep,
2099
2119
  {
2100
2120
  smartAccount: step.smartAccount,
2101
2121
  txHash: step.txHash,
@@ -2119,7 +2139,7 @@ function DepositFlow({
2119
2139
  // src/DepositModal.tsx
2120
2140
 
2121
2141
  var ReownDepositInner = _react.lazy.call(void 0,
2122
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-M6GRPFJW.cjs"))).then((m) => ({ default: m.DepositModalReown }))
2142
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-UMUTS37L.cjs"))).then((m) => ({ default: m.DepositModalReown }))
2123
2143
  );
2124
2144
  function DepositModal(props) {
2125
2145
  const needsReown = !!props.reownAppId;
@@ -2142,8 +2162,8 @@ function DepositModalInner({
2142
2162
  sourceToken,
2143
2163
  defaultAmount,
2144
2164
  recipient,
2145
- backendUrl = _chunkHYUITBRVcjs.DEFAULT_BACKEND_URL,
2146
- signerAddress = _chunkHYUITBRVcjs.DEFAULT_SIGNER_ADDRESS,
2165
+ backendUrl = _chunkFLXTBFMZcjs.DEFAULT_BACKEND_URL,
2166
+ signerAddress = _chunkFLXTBFMZcjs.DEFAULT_SIGNER_ADDRESS,
2147
2167
  sessionChainIds,
2148
2168
  forceRegister = false,
2149
2169
  waitForFinalTx = true,
@@ -2168,19 +2188,19 @@ function DepositModalInner({
2168
2188
  const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
2169
2189
  const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
2170
2190
  const backHandlerRef = _react.useRef.call(void 0, void 0);
2171
- const targetChain = _chunkHYUITBRVcjs.getChainId.call(void 0, targetChainProp);
2172
- const sourceChain = sourceChainProp ? _chunkHYUITBRVcjs.getChainId.call(void 0, sourceChainProp) : void 0;
2173
- const service = _react.useMemo.call(void 0, () => _chunkNULE6WIIcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
2191
+ const targetChain = _chunkFLXTBFMZcjs.getChainId.call(void 0, targetChainProp);
2192
+ const sourceChain = sourceChainProp ? _chunkFLXTBFMZcjs.getChainId.call(void 0, sourceChainProp) : void 0;
2193
+ const service = _react.useMemo.call(void 0, () => _chunkAHOFT42Hcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
2174
2194
  _react.useEffect.call(void 0, () => {
2175
2195
  if (isOpen && modalRef.current) {
2176
- _chunkNULE6WIIcjs.applyTheme.call(void 0, modalRef.current, theme);
2196
+ _chunkAHOFT42Hcjs.applyTheme.call(void 0, modalRef.current, theme);
2177
2197
  }
2178
2198
  }, [isOpen, theme]);
2179
2199
  const hasCalledReady = _react.useRef.call(void 0, false);
2180
2200
  _react.useEffect.call(void 0, () => {
2181
2201
  if (isOpen && !hasCalledReady.current) {
2182
2202
  hasCalledReady.current = true;
2183
- _optionalChain([onReady, 'optionalCall', _70 => _70()]);
2203
+ _optionalChain([onReady, 'optionalCall', _68 => _68()]);
2184
2204
  }
2185
2205
  }, [isOpen, onReady]);
2186
2206
  _react.useEffect.call(void 0, () => {
@@ -2199,17 +2219,17 @@ function DepositModalInner({
2199
2219
  setTotalBalanceUsd(balance2);
2200
2220
  }, []);
2201
2221
  const handleBack = _react.useCallback.call(void 0, () => {
2202
- _optionalChain([backHandlerRef, 'access', _71 => _71.current, 'optionalCall', _72 => _72()]);
2222
+ _optionalChain([backHandlerRef, 'access', _69 => _69.current, 'optionalCall', _70 => _70()]);
2203
2223
  }, []);
2204
- const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _73 => _73.showLogo]), () => ( false));
2205
- const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _74 => _74.showStepper]), () => ( false));
2206
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _75 => _75.showBackButton]), () => ( true));
2207
- const balance = _optionalChain([uiConfig, 'optionalAccess', _76 => _76.balance]);
2208
- const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _77 => _77.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
2209
- const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _78 => _78.title]), () => ( "Deposit"));
2224
+ const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _71 => _71.showLogo]), () => ( false));
2225
+ const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _72 => _72.showStepper]), () => ( false));
2226
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _73 => _73.showBackButton]), () => ( true));
2227
+ const balance = _optionalChain([uiConfig, 'optionalAccess', _74 => _74.balance]);
2228
+ const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _75 => _75.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
2229
+ const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _76 => _76.title]), () => ( "Deposit"));
2210
2230
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
2211
2231
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2212
- _chunkNULE6WIIcjs.Modal,
2232
+ _chunkAHOFT42Hcjs.Modal,
2213
2233
  {
2214
2234
  isOpen,
2215
2235
  onClose,
@@ -2270,7 +2290,7 @@ function DepositModalInner({
2270
2290
  balance.title,
2271
2291
  ":"
2272
2292
  ] }),
2273
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkNULE6WIIcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
2293
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkAHOFT42Hcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
2274
2294
  ] })
2275
2295
  ] }),
2276
2296
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,