@rhinestone/deposit-modal 0.1.51 → 0.1.53

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.
@@ -25,7 +25,7 @@
25
25
 
26
26
 
27
27
 
28
- var _chunkNU3ES4JYcjs = require('./chunk-NU3ES4JY.cjs');
28
+ var _chunkDBBSH7HPcjs = require('./chunk-DBBSH7HP.cjs');
29
29
 
30
30
 
31
31
 
@@ -61,15 +61,15 @@ var _react = require('react');
61
61
 
62
62
  var _jsxruntime = require('react/jsx-runtime');
63
63
  async function resolveSessionOwner(eoaAddress) {
64
- const localOwner = _chunkNU3ES4JYcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
64
+ const localOwner = _chunkDBBSH7HPcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
65
65
  if (localOwner) {
66
66
  return {
67
- account: _chunkNU3ES4JYcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
67
+ account: _chunkDBBSH7HPcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
68
68
  address: localOwner.address
69
69
  };
70
70
  }
71
- const created = _chunkNU3ES4JYcjs.createSessionOwnerKey.call(void 0, );
72
- _chunkNU3ES4JYcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
71
+ const created = _chunkDBBSH7HPcjs.createSessionOwnerKey.call(void 0, );
72
+ _chunkDBBSH7HPcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
73
73
  return {
74
74
  account: created.account,
75
75
  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: _chunkNU3ES4JYcjs.toEvmCaip2.call(void 0, targetChain),
108
+ targetChain: _chunkDBBSH7HPcjs.toEvmCaip2.call(void 0, targetChain),
109
109
  targetToken,
110
110
  signerAddress,
111
111
  sessionChainIds,
@@ -135,7 +135,7 @@ function SetupStep({
135
135
  primaryType: typedData.primaryType,
136
136
  message: typedData.message
137
137
  });
138
- const sessionDetails = _chunkNU3ES4JYcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
138
+ const sessionDetails = _chunkDBBSH7HPcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
139
139
  setState({ type: "registering" });
140
140
  const registerResult = await service.registerAccount({
141
141
  address: smartAccount,
@@ -147,7 +147,7 @@ function SetupStep({
147
147
  eoaAddress: address,
148
148
  sessionOwner: sessionOwner.address,
149
149
  target: {
150
- chain: _chunkNU3ES4JYcjs.toEvmCaip2.call(void 0, targetChain),
150
+ chain: _chunkDBBSH7HPcjs.toEvmCaip2.call(void 0, targetChain),
151
151
  token: targetToken,
152
152
  ...recipient && { recipient }
153
153
  }
@@ -210,7 +210,7 @@ function SetupStep({
210
210
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
211
211
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
212
212
  isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
213
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
213
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
214
214
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
215
215
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
216
216
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
@@ -247,7 +247,7 @@ function SetupStep({
247
247
  ] })
248
248
  ] })
249
249
  ] }),
250
- isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
250
+ isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
251
251
  ] });
252
252
  }
253
253
 
@@ -272,7 +272,7 @@ function AssetSelectStep({
272
272
  const [error, setError] = _react.useState.call(void 0, null);
273
273
  const defaultAssetId = _react.useMemo.call(void 0, () => {
274
274
  if (!defaultSourceChain || !defaultSourceToken) return null;
275
- return _chunkNU3ES4JYcjs.getAssetId.call(void 0, {
275
+ return _chunkDBBSH7HPcjs.getAssetId.call(void 0, {
276
276
  chainId: defaultSourceChain,
277
277
  token: defaultSourceToken
278
278
  });
@@ -289,7 +289,7 @@ function AssetSelectStep({
289
289
  try {
290
290
  const portfolio = await service.fetchPortfolio(address);
291
291
  if (!active) return;
292
- const portfolioAssets = _chunkNU3ES4JYcjs.portfolioToAssets.call(void 0, portfolio.tokens);
292
+ const portfolioAssets = _chunkDBBSH7HPcjs.portfolioToAssets.call(void 0, portfolio.tokens);
293
293
  setAssets(portfolioAssets);
294
294
  const hasNative = portfolioAssets.some(
295
295
  (asset) => asset.token.toLowerCase() === _chunkNELAYNA3cjs.NATIVE_TOKEN_ADDRESS
@@ -370,7 +370,7 @@ function AssetSelectStep({
370
370
  const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
371
371
  const numeric = Number(raw);
372
372
  if (!Number.isFinite(numeric)) return raw;
373
- return _chunkNU3ES4JYcjs.tokenFormatter.format(numeric);
373
+ return _chunkDBBSH7HPcjs.tokenFormatter.format(numeric);
374
374
  } catch (e3) {
375
375
  return asset.balance;
376
376
  }
@@ -384,7 +384,7 @@ function AssetSelectStep({
384
384
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
385
385
  children: [
386
386
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
387
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.Spinner, { className: "rs-text-tertiary" }),
387
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.Spinner, { className: "rs-text-tertiary" }),
388
388
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
389
389
  ] }),
390
390
  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 }) }),
@@ -474,7 +474,7 @@ function AssetSelectStep({
474
474
  ] })
475
475
  ] })
476
476
  ] }),
477
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkNU3ES4JYcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
477
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkDBBSH7HPcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
478
478
  ]
479
479
  },
480
480
  asset.id
@@ -484,7 +484,7 @@ function AssetSelectStep({
484
484
  }
485
485
  ),
486
486
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
487
- _chunkNU3ES4JYcjs.Button,
487
+ _chunkDBBSH7HPcjs.Button,
488
488
  {
489
489
  onClick: () => selectedAsset && onContinue(selectedAsset),
490
490
  disabled: !selectedAsset,
@@ -492,7 +492,7 @@ function AssetSelectStep({
492
492
  children: "Continue"
493
493
  }
494
494
  ) }),
495
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
495
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
496
496
  ] });
497
497
  }
498
498
  async function fetchNativeAssets(address, publicClient, existing) {
@@ -500,7 +500,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
500
500
  const connectedChainId = _optionalChain([publicClient, 'access', _10 => _10.chain, 'optionalAccess', _11 => _11.id]);
501
501
  if (!connectedChainId) return [];
502
502
  if (!_chunkNELAYNA3cjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
503
- const id = _chunkNU3ES4JYcjs.getAssetId.call(void 0, {
503
+ const id = _chunkDBBSH7HPcjs.getAssetId.call(void 0, {
504
504
  chainId: connectedChainId,
505
505
  token: _chunkNELAYNA3cjs.NATIVE_TOKEN_ADDRESS
506
506
  });
@@ -586,7 +586,7 @@ function AmountStep({
586
586
  const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
587
587
  if (!balanceTarget || !publicClient) return;
588
588
  try {
589
- const bal = _chunkNU3ES4JYcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
589
+ const bal = _chunkDBBSH7HPcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
590
590
  address: asset.token,
591
591
  abi: _viem.erc20Abi,
592
592
  functionName: "balanceOf",
@@ -612,7 +612,7 @@ function AmountStep({
612
612
  setIsSwitching(true);
613
613
  switchChain(asset.chainId).catch((err) => {
614
614
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
615
- setError(_chunkNU3ES4JYcjs.formatUserError.call(void 0, raw));
615
+ setError(_chunkDBBSH7HPcjs.formatUserError.call(void 0, raw));
616
616
  }).finally(() => {
617
617
  setIsSwitching(false);
618
618
  });
@@ -648,7 +648,7 @@ function AmountStep({
648
648
  const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
649
649
  const numeric = Number(raw);
650
650
  if (!Number.isFinite(numeric)) return raw;
651
- return _chunkNU3ES4JYcjs.tokenFormatter.format(numeric);
651
+ return _chunkDBBSH7HPcjs.tokenFormatter.format(numeric);
652
652
  } catch (e8) {
653
653
  return "...";
654
654
  }
@@ -690,14 +690,13 @@ function AmountStep({
690
690
  const usdValue = numericAmount;
691
691
  if (_optionalChain([uiConfig, 'optionalAccess', _15 => _15.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
692
692
  setError(
693
- `Maximum deposit is ${_chunkNU3ES4JYcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
693
+ `Maximum deposit is ${_chunkDBBSH7HPcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
694
694
  );
695
695
  return;
696
696
  }
697
697
  if (_optionalChain([uiConfig, 'optionalAccess', _16 => _16.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
698
- setError(
699
- `Minimum deposit is ${_chunkNU3ES4JYcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
700
- );
698
+ setAmount(uiConfig.minDepositUsd.toString());
699
+ setError(null);
701
700
  return;
702
701
  }
703
702
  }
@@ -737,7 +736,7 @@ function AmountStep({
737
736
  autoFocus: true
738
737
  }
739
738
  ) }),
740
- !isSourceStablecoin && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-amount-available", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-available-value", children: [
739
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-amount-available", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-available-value", children: [
741
740
  formattedBalance,
742
741
  " ",
743
742
  asset.symbol,
@@ -745,7 +744,7 @@ function AmountStep({
745
744
  hasPricing && balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
746
745
  " ",
747
746
  "(",
748
- _chunkNU3ES4JYcjs.currencyFormatter.format(balanceUsd),
747
+ _chunkDBBSH7HPcjs.currencyFormatter.format(balanceUsd),
749
748
  ")"
750
749
  ] })
751
750
  ] }) })
@@ -881,6 +880,10 @@ function AmountStep({
881
880
  }
882
881
  )
883
882
  ] }),
883
+ _optionalChain([uiConfig, 'optionalAccess', _17 => _17.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
884
+ _chunkDBBSH7HPcjs.currencyFormatter.format(uiConfig.minDepositUsd),
885
+ " minimum deposit"
886
+ ] }),
884
887
  error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
885
888
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
886
889
  "svg",
@@ -904,15 +907,15 @@ function AmountStep({
904
907
  ] })
905
908
  ] }),
906
909
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
907
- _chunkNU3ES4JYcjs.Button,
910
+ _chunkDBBSH7HPcjs.Button,
908
911
  {
909
912
  onClick: handleContinue,
910
913
  fullWidth: true,
911
914
  disabled: !amount || chainMismatch,
912
- children: "Continue"
915
+ children: _optionalChain([uiConfig, 'optionalAccess', _18 => _18.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
913
916
  }
914
917
  ) }),
915
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
918
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
916
919
  ] });
917
920
  }
918
921
 
@@ -941,7 +944,7 @@ function ConfirmStep({
941
944
  const [error, setError] = _react.useState.call(void 0, null);
942
945
  const [isSwitching, setIsSwitching] = _react.useState.call(void 0, false);
943
946
  const hasAttemptedSwitch = _react.useRef.call(void 0, false);
944
- const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _17 => _17.chain, 'optionalAccess', _18 => _18.id]) && walletClient.chain.id !== asset.chainId;
947
+ const chainMismatch = _optionalChain([walletClient, 'optionalAccess', _19 => _19.chain, 'optionalAccess', _20 => _20.id]) && walletClient.chain.id !== asset.chainId;
945
948
  const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
946
949
  const targetSymbol = sameRoute ? asset.symbol : _chunkNELAYNA3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
947
950
  const formattedSendAmount = amount && !Number.isNaN(Number(amount)) ? Number(amount).toLocaleString("en-US", { maximumFractionDigits: 6 }) : "0";
@@ -962,7 +965,7 @@ function ConfirmStep({
962
965
  setIsSwitching(true);
963
966
  switchChain(asset.chainId).catch((err) => {
964
967
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
965
- setError(_chunkNU3ES4JYcjs.formatUserError.call(void 0, raw));
968
+ setError(_chunkDBBSH7HPcjs.formatUserError.call(void 0, raw));
966
969
  }).finally(() => {
967
970
  setIsSwitching(false);
968
971
  });
@@ -1005,7 +1008,7 @@ function ConfirmStep({
1005
1008
  throw new Error("Wallet not properly connected");
1006
1009
  }
1007
1010
  const transferTo = sameRoute ? recipient : smartAccount;
1008
- const hash = _chunkNU3ES4JYcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1011
+ const hash = _chunkDBBSH7HPcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1009
1012
  account,
1010
1013
  chain,
1011
1014
  to: transferTo,
@@ -1018,13 +1021,13 @@ function ConfirmStep({
1018
1021
  functionName: "transfer",
1019
1022
  args: [transferTo, amountUnits]
1020
1023
  });
1021
- _optionalChain([onDepositSubmitted, 'optionalCall', _19 => _19(hash, asset.chainId, amountUnits.toString())]);
1024
+ _optionalChain([onDepositSubmitted, 'optionalCall', _21 => _21(hash, asset.chainId, amountUnits.toString())]);
1022
1025
  onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
1023
1026
  } catch (err) {
1024
1027
  const raw = err instanceof Error ? err.message : "Transfer failed";
1025
- const message = _chunkNU3ES4JYcjs.formatUserError.call(void 0, raw);
1028
+ const message = _chunkDBBSH7HPcjs.formatUserError.call(void 0, raw);
1026
1029
  setError(message);
1027
- _optionalChain([onError, 'optionalCall', _20 => _20(message, "TRANSFER_ERROR")]);
1030
+ _optionalChain([onError, 'optionalCall', _22 => _22(message, "TRANSFER_ERROR")]);
1028
1031
  } finally {
1029
1032
  setIsSubmitting(false);
1030
1033
  }
@@ -1151,7 +1154,7 @@ function ConfirmStep({
1151
1154
  ] })
1152
1155
  ] }),
1153
1156
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1154
- _chunkNU3ES4JYcjs.Button,
1157
+ _chunkDBBSH7HPcjs.Button,
1155
1158
  {
1156
1159
  onClick: handleConfirm,
1157
1160
  loading: isSubmitting,
@@ -1160,7 +1163,7 @@ function ConfirmStep({
1160
1163
  children: "Confirm Order"
1161
1164
  }
1162
1165
  ) }),
1163
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
1166
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
1164
1167
  ] });
1165
1168
  }
1166
1169
 
@@ -1285,7 +1288,7 @@ var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
1285
1288
  var configuredSolanaRpcUrl = null;
1286
1289
  var cachedConnections = /* @__PURE__ */ new Map();
1287
1290
  function configureSolanaRpcUrl(rpcUrl) {
1288
- const normalized = _optionalChain([rpcUrl, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]);
1291
+ const normalized = _optionalChain([rpcUrl, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]);
1289
1292
  configuredSolanaRpcUrl = normalized ? normalized : null;
1290
1293
  cachedConnections.clear();
1291
1294
  }
@@ -1420,7 +1423,7 @@ function resolveSolanaTokenMeta(token) {
1420
1423
  return {};
1421
1424
  }
1422
1425
  function getDepositEventDetails(event) {
1423
- if (!_optionalChain([event, 'optionalAccess', _23 => _23.type]) || !isRecord(event.data)) return {};
1426
+ if (!_optionalChain([event, 'optionalAccess', _25 => _25.type]) || !isRecord(event.data)) return {};
1424
1427
  if (event.type === "deposit-received") {
1425
1428
  const chainId = asChainId(event.data.chain);
1426
1429
  const token = asString(event.data.token);
@@ -1434,12 +1437,12 @@ function getDepositEventDetails(event) {
1434
1437
  }
1435
1438
  if (event.type === "bridge-started") {
1436
1439
  const source = isRecord(event.data.source) ? event.data.source : void 0;
1437
- const chainId = asChainId(_optionalChain([source, 'optionalAccess', _24 => _24.chain]));
1438
- const token = asString(_optionalChain([source, 'optionalAccess', _25 => _25.asset]));
1440
+ const chainId = asChainId(_optionalChain([source, 'optionalAccess', _26 => _26.chain]));
1441
+ const token = asString(_optionalChain([source, 'optionalAccess', _27 => _27.asset]));
1439
1442
  const solanaMeta = chainId === "solana" ? resolveSolanaTokenMeta(token) : {};
1440
1443
  return {
1441
1444
  chainId,
1442
- amount: asAmount(_optionalChain([source, 'optionalAccess', _26 => _26.amount])),
1445
+ amount: asAmount(_optionalChain([source, 'optionalAccess', _28 => _28.amount])),
1443
1446
  token,
1444
1447
  ...solanaMeta
1445
1448
  };
@@ -1492,9 +1495,9 @@ function DepositAddressStep({
1492
1495
  const matched = _nullishCoalesce(SOLANA_TOKENS.find((t) => t.symbol === sourceTokenSymbol), () => ( SOLANA_TOKENS[0]));
1493
1496
  sourceSelectionRef.current = {
1494
1497
  chainId: "solana",
1495
- token: _optionalChain([matched, 'optionalAccess', _27 => _27.mint]),
1496
- sourceSymbol: _optionalChain([matched, 'optionalAccess', _28 => _28.symbol]),
1497
- sourceDecimals: _optionalChain([matched, 'optionalAccess', _29 => _29.decimals])
1498
+ token: _optionalChain([matched, 'optionalAccess', _29 => _29.mint]),
1499
+ sourceSymbol: _optionalChain([matched, 'optionalAccess', _30 => _30.symbol]),
1500
+ sourceDecimals: _optionalChain([matched, 'optionalAccess', _31 => _31.decimals])
1498
1501
  };
1499
1502
  return;
1500
1503
  }
@@ -1510,8 +1513,8 @@ function DepositAddressStep({
1510
1513
  function handlePointerDown(event) {
1511
1514
  const target = event.target;
1512
1515
  if (!target) return;
1513
- const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _30 => _30.current, 'optionalAccess', _31 => _31.contains, 'call', _32 => _32(target)]);
1514
- const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _33 => _33.current, 'optionalAccess', _34 => _34.contains, 'call', _35 => _35(target)]);
1516
+ const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _32 => _32.current, 'optionalAccess', _33 => _33.contains, 'call', _34 => _34(target)]);
1517
+ const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _35 => _35.current, 'optionalAccess', _36 => _36.contains, 'call', _37 => _37(target)]);
1515
1518
  if (clickedChainDropdown || clickedTokenDropdown) return;
1516
1519
  setChainDropdownOpen(false);
1517
1520
  setTokenDropdownOpen(false);
@@ -1558,10 +1561,10 @@ function DepositAddressStep({
1558
1561
  const status = await service.fetchLatestStatus(smartAccount);
1559
1562
  if (cancelled || depositHandledRef.current) return;
1560
1563
  const event = status.lastEvent;
1561
- const eventTxHash = _chunkNU3ES4JYcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkNU3ES4JYcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
1564
+ const eventTxHash = _chunkDBBSH7HPcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkDBBSH7HPcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
1562
1565
  if (baselineTxHash === void 0) {
1563
1566
  baselineTxHash = eventTxHash;
1564
- } else if (eventTxHash && (!baselineTxHash || !_chunkNU3ES4JYcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHash))) {
1567
+ } else if (eventTxHash && (!baselineTxHash || !_chunkDBBSH7HPcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHash))) {
1565
1568
  const details = getDepositEventDetails(event);
1566
1569
  const fallback = sourceSelectionRef.current;
1567
1570
  const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
@@ -1587,7 +1590,7 @@ function DepositAddressStep({
1587
1590
  if (!cancelled) {
1588
1591
  const msg = err instanceof Error ? err.message : "Failed to check status";
1589
1592
  setPollingError(msg);
1590
- _optionalChain([onError, 'optionalCall', _36 => _36(msg, "STATUS_POLL_ERROR")]);
1593
+ _optionalChain([onError, 'optionalCall', _38 => _38(msg, "STATUS_POLL_ERROR")]);
1591
1594
  }
1592
1595
  }
1593
1596
  if (!cancelled && !depositHandledRef.current) {
@@ -1784,7 +1787,7 @@ function DepositAddressStep({
1784
1787
  ] }),
1785
1788
  pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
1786
1789
  ] }) }),
1787
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
1790
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
1788
1791
  ] });
1789
1792
  }
1790
1793
  DepositAddressStep.displayName = "DepositAddressStep";
@@ -1815,7 +1818,7 @@ function SolanaTokenSelectStep({
1815
1818
  setError(null);
1816
1819
  const portfolioBySymbol = {};
1817
1820
  try {
1818
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
1821
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
1819
1822
  solanaAddress
1820
1823
  });
1821
1824
  const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
@@ -1838,12 +1841,12 @@ function SolanaTokenSelectStep({
1838
1841
  };
1839
1842
  }
1840
1843
  }
1841
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
1844
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
1842
1845
  symbols: Object.keys(portfolioBySymbol)
1843
1846
  });
1844
1847
  } catch (err) {
1845
1848
  if (!active) return;
1846
- _chunkNU3ES4JYcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
1849
+ _chunkDBBSH7HPcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
1847
1850
  solanaAddress
1848
1851
  });
1849
1852
  setError(
@@ -1868,7 +1871,7 @@ function SolanaTokenSelectStep({
1868
1871
  setTokenBalances(results);
1869
1872
  setLoading(false);
1870
1873
  const totalUsd = results.reduce((sum, r) => sum + r.balanceUsd, 0);
1871
- _optionalChain([onTotalBalanceComputed, 'optionalCall', _37 => _37(totalUsd)]);
1874
+ _optionalChain([onTotalBalanceComputed, 'optionalCall', _39 => _39(totalUsd)]);
1872
1875
  }
1873
1876
  void loadBalances();
1874
1877
  return () => {
@@ -1897,7 +1900,7 @@ function SolanaTokenSelectStep({
1897
1900
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
1898
1901
  children: [
1899
1902
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
1900
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.Spinner, { className: "rs-text-tertiary" }),
1903
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.Spinner, { className: "rs-text-tertiary" }),
1901
1904
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
1902
1905
  ] }),
1903
1906
  !loading && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
@@ -1934,7 +1937,7 @@ function SolanaTokenSelectStep({
1934
1937
  try {
1935
1938
  const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
1936
1939
  const numeric = Number(raw);
1937
- formattedBalance = Number.isFinite(numeric) ? _chunkNU3ES4JYcjs.tokenFormatter.format(numeric) : raw;
1940
+ formattedBalance = Number.isFinite(numeric) ? _chunkDBBSH7HPcjs.tokenFormatter.format(numeric) : raw;
1938
1941
  } catch (e14) {
1939
1942
  formattedBalance = "...";
1940
1943
  }
@@ -1978,7 +1981,7 @@ function SolanaTokenSelectStep({
1978
1981
  ] })
1979
1982
  ] })
1980
1983
  ] }),
1981
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkNU3ES4JYcjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
1984
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkDBBSH7HPcjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
1982
1985
  ]
1983
1986
  },
1984
1987
  entry.token.symbol
@@ -1988,7 +1991,7 @@ function SolanaTokenSelectStep({
1988
1991
  }
1989
1992
  ),
1990
1993
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1991
- _chunkNU3ES4JYcjs.Button,
1994
+ _chunkDBBSH7HPcjs.Button,
1992
1995
  {
1993
1996
  onClick: () => selectedEntry && onContinue(
1994
1997
  selectedEntry.token,
@@ -2000,7 +2003,7 @@ function SolanaTokenSelectStep({
2000
2003
  children: "Continue"
2001
2004
  }
2002
2005
  ) }),
2003
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
2006
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
2004
2007
  ] });
2005
2008
  }
2006
2009
 
@@ -2048,7 +2051,7 @@ function SolanaAmountStep({
2048
2051
  const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
2049
2052
  const numeric = Number(raw);
2050
2053
  if (!Number.isFinite(numeric)) return raw;
2051
- return _chunkNU3ES4JYcjs.tokenFormatter.format(numeric);
2054
+ return _chunkDBBSH7HPcjs.tokenFormatter.format(numeric);
2052
2055
  } catch (e16) {
2053
2056
  return "...";
2054
2057
  }
@@ -2066,7 +2069,7 @@ function SolanaAmountStep({
2066
2069
  }, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
2067
2070
  const formattedBalanceUsd = _react.useMemo.call(void 0, () => {
2068
2071
  if (computedBalanceUsd === null || computedBalanceUsd <= 0) return null;
2069
- return _chunkNU3ES4JYcjs.currencyFormatter.format(computedBalanceUsd);
2072
+ return _chunkDBBSH7HPcjs.currencyFormatter.format(computedBalanceUsd);
2070
2073
  }, [computedBalanceUsd]);
2071
2074
  const spendableBalance = _react.useMemo.call(void 0, () => {
2072
2075
  if (!isNativeSol(token)) return balance;
@@ -2091,7 +2094,7 @@ function SolanaAmountStep({
2091
2094
  const factor = 10 ** maxDecimals;
2092
2095
  const truncated = Math.floor(value * factor) / factor;
2093
2096
  const formatted = truncated.toFixed(maxDecimals).replace(/\.?0+$/, "");
2094
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
2097
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
2095
2098
  percentage,
2096
2099
  symbol: token.symbol,
2097
2100
  formatted
@@ -2105,7 +2108,7 @@ function SolanaAmountStep({
2105
2108
  const handleContinue = () => {
2106
2109
  const numericAmount = parseFloat(amount);
2107
2110
  if (isNaN(numericAmount) || numericAmount <= 0) {
2108
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2111
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2109
2112
  amount,
2110
2113
  reason: "nan-or-non-positive"
2111
2114
  });
@@ -2115,16 +2118,15 @@ function SolanaAmountStep({
2115
2118
  const sourceAmount = isSourceStablecoin || !hasPricing ? numericAmount : numericAmount / tokenPriceUsd;
2116
2119
  if (hasPricing) {
2117
2120
  const usdValue = numericAmount;
2118
- if (_optionalChain([uiConfig, 'optionalAccess', _38 => _38.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
2121
+ if (_optionalChain([uiConfig, 'optionalAccess', _40 => _40.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
2119
2122
  setError(
2120
- `Maximum deposit is ${_chunkNU3ES4JYcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
2123
+ `Maximum deposit is ${_chunkDBBSH7HPcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
2121
2124
  );
2122
2125
  return;
2123
2126
  }
2124
- if (_optionalChain([uiConfig, 'optionalAccess', _39 => _39.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
2125
- setError(
2126
- `Minimum deposit is ${_chunkNU3ES4JYcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
2127
- );
2127
+ if (_optionalChain([uiConfig, 'optionalAccess', _41 => _41.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
2128
+ setAmount(uiConfig.minDepositUsd.toString());
2129
+ setError(null);
2128
2130
  return;
2129
2131
  }
2130
2132
  }
@@ -2133,7 +2135,7 @@ function SolanaAmountStep({
2133
2135
  try {
2134
2136
  amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
2135
2137
  } catch (e20) {
2136
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2138
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2137
2139
  amount,
2138
2140
  sourceAmount: sourceAmountStr,
2139
2141
  reason: "parse-units-failed"
@@ -2143,7 +2145,7 @@ function SolanaAmountStep({
2143
2145
  }
2144
2146
  if (amountInUnits > spendableBalance) {
2145
2147
  const isReserveIssue = isNativeSol(token) && amountInUnits <= balance;
2146
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2148
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2147
2149
  amount,
2148
2150
  balance: balance.toString(),
2149
2151
  spendableBalance: spendableBalance.toString(),
@@ -2155,7 +2157,7 @@ function SolanaAmountStep({
2155
2157
  );
2156
2158
  return;
2157
2159
  }
2158
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
2160
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
2159
2161
  symbol: token.symbol,
2160
2162
  inputAmountUsd: amount,
2161
2163
  sourceAmount: sourceAmountStr,
@@ -2223,6 +2225,10 @@ function SolanaAmountStep({
2223
2225
  }
2224
2226
  )
2225
2227
  ] }),
2228
+ _optionalChain([uiConfig, 'optionalAccess', _42 => _42.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
2229
+ _chunkDBBSH7HPcjs.currencyFormatter.format(uiConfig.minDepositUsd),
2230
+ " minimum deposit"
2231
+ ] }),
2226
2232
  error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
2227
2233
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2228
2234
  "svg",
@@ -2246,15 +2252,15 @@ function SolanaAmountStep({
2246
2252
  ] })
2247
2253
  ] }),
2248
2254
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2249
- _chunkNU3ES4JYcjs.Button,
2255
+ _chunkDBBSH7HPcjs.Button,
2250
2256
  {
2251
2257
  onClick: handleContinue,
2252
2258
  fullWidth: true,
2253
2259
  disabled: !amount,
2254
- children: "Continue"
2260
+ children: _optionalChain([uiConfig, 'optionalAccess', _43 => _43.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
2255
2261
  }
2256
2262
  ) }),
2257
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
2263
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
2258
2264
  ] });
2259
2265
  }
2260
2266
 
@@ -2298,7 +2304,7 @@ function SolanaConfirmStep({
2298
2304
  const receiveAmount = isSameToken ? formattedReceiveAmount : `~ ${formattedReceiveAmount}`;
2299
2305
  const handleConfirm = async () => {
2300
2306
  if (!solanaProvider) {
2301
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2307
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2302
2308
  reason: "missing-provider"
2303
2309
  });
2304
2310
  setError("Solana wallet not connected");
@@ -2306,7 +2312,7 @@ function SolanaConfirmStep({
2306
2312
  }
2307
2313
  const parsedAmount = parseFloat(sourceAmount);
2308
2314
  if (isNaN(parsedAmount) || parsedAmount <= 0) {
2309
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2315
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
2310
2316
  reason: "invalid-amount",
2311
2317
  sourceAmount
2312
2318
  });
@@ -2315,7 +2321,7 @@ function SolanaConfirmStep({
2315
2321
  }
2316
2322
  setError(null);
2317
2323
  setIsSubmitting(true);
2318
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
2324
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
2319
2325
  smartAccount,
2320
2326
  solanaAddress,
2321
2327
  solanaDepositAddress,
@@ -2325,7 +2331,7 @@ function SolanaConfirmStep({
2325
2331
  });
2326
2332
  try {
2327
2333
  const check = await service.checkAccount(smartAccount);
2328
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
2334
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
2329
2335
  smartAccount,
2330
2336
  isRegistered: check.isRegistered,
2331
2337
  targetChain: check.targetChain,
@@ -2338,7 +2344,7 @@ function SolanaConfirmStep({
2338
2344
  }
2339
2345
  const connection = getSolanaConnection();
2340
2346
  const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
2341
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
2347
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
2342
2348
  token: token.symbol,
2343
2349
  sourceAmount,
2344
2350
  amountUnits: amountUnits.toString()
@@ -2355,10 +2361,10 @@ function SolanaConfirmStep({
2355
2361
  token.mint,
2356
2362
  amountUnits
2357
2363
  );
2358
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
2364
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
2359
2365
  token: token.symbol,
2360
2366
  instructionCount: transaction.instructions.length,
2361
- feePayer: _optionalChain([transaction, 'access', _40 => _40.feePayer, 'optionalAccess', _41 => _41.toBase58, 'call', _42 => _42()]),
2367
+ feePayer: _optionalChain([transaction, 'access', _44 => _44.feePayer, 'optionalAccess', _45 => _45.toBase58, 'call', _46 => _46()]),
2362
2368
  recentBlockhash: transaction.recentBlockhash
2363
2369
  });
2364
2370
  const txHash = await sendSolanaTransaction(
@@ -2366,21 +2372,21 @@ function SolanaConfirmStep({
2366
2372
  connection,
2367
2373
  transaction
2368
2374
  );
2369
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
2375
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
2370
2376
  txHash,
2371
2377
  amountUnits: amountUnits.toString()
2372
2378
  });
2373
2379
  onConfirm(txHash, amountUnits.toString());
2374
2380
  } catch (err) {
2375
2381
  const raw = err instanceof Error ? err.message : "Transfer failed";
2376
- const message = _chunkNU3ES4JYcjs.formatUserError.call(void 0, raw);
2377
- _chunkNU3ES4JYcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
2382
+ const message = _chunkDBBSH7HPcjs.formatUserError.call(void 0, raw);
2383
+ _chunkDBBSH7HPcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
2378
2384
  smartAccount,
2379
2385
  token: token.symbol,
2380
2386
  sourceAmount
2381
2387
  });
2382
2388
  setError(message);
2383
- _optionalChain([onError, 'optionalCall', _43 => _43(message, "SOLANA_TRANSFER_ERROR")]);
2389
+ _optionalChain([onError, 'optionalCall', _47 => _47(message, "SOLANA_TRANSFER_ERROR")]);
2384
2390
  } finally {
2385
2391
  setIsSubmitting(false);
2386
2392
  }
@@ -2507,7 +2513,7 @@ function SolanaConfirmStep({
2507
2513
  ] })
2508
2514
  ] }),
2509
2515
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2510
- _chunkNU3ES4JYcjs.Button,
2516
+ _chunkDBBSH7HPcjs.Button,
2511
2517
  {
2512
2518
  onClick: handleConfirm,
2513
2519
  loading: isSubmitting,
@@ -2516,12 +2522,13 @@ function SolanaConfirmStep({
2516
2522
  children: "Confirm Order"
2517
2523
  }
2518
2524
  ) }),
2519
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNU3ES4JYcjs.PoweredBy, {})
2525
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDBBSH7HPcjs.PoweredBy, {})
2520
2526
  ] });
2521
2527
  }
2522
2528
 
2523
2529
  // src/DepositFlow.tsx
2524
2530
 
2531
+ var QR_AUTO_ADVANCE_HYDRATION_GRACE_MS = 1e3;
2525
2532
  function isSameRoute(sourceChain, sourceToken, targetChain, targetToken) {
2526
2533
  return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
2527
2534
  }
@@ -2532,6 +2539,7 @@ function DepositFlow({
2532
2539
  dappWalletClient,
2533
2540
  dappPublicClient,
2534
2541
  dappAddress,
2542
+ hasDappWalletClientProp,
2535
2543
  targetChain,
2536
2544
  targetToken,
2537
2545
  service,
@@ -2561,11 +2569,18 @@ function DepositFlow({
2561
2569
  onError,
2562
2570
  debug
2563
2571
  }) {
2572
+ const hasInitialReownSession = Boolean(
2573
+ enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _48 => _48.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _49 => _49.address]) : _optionalChain([reownWallet, 'optionalAccess', _50 => _50.address])
2574
+ );
2575
+ const hasInitialWalletHydrationPending = Boolean(
2576
+ dappAddress && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasInitialReownSession && !reownWallet.isReady)
2577
+ );
2564
2578
  const [step, setStep] = _react.useState.call(void 0, { type: "setup" });
2565
2579
  const [flowMode, setFlowMode] = _react.useState.call(void 0, null);
2566
2580
  const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, 0);
2567
2581
  const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = _react.useState.call(void 0, false);
2568
2582
  const [selectedWalletId, setSelectedWalletId] = _react.useState.call(void 0, null);
2583
+ const [hasQrAutoAdvanceGraceElapsed, setHasQrAutoAdvanceGraceElapsed] = _react.useState.call(void 0, () => !hasInitialWalletHydrationPending);
2569
2584
  const flowModeRef = _react.useRef.call(void 0, null);
2570
2585
  const portfolioAssetsRef = _react.useRef.call(void 0, []);
2571
2586
  const stableWalletSignerRef = _react.useRef.call(void 0, null);
@@ -2573,13 +2588,13 @@ function DepositFlow({
2573
2588
  flowModeRef.current = flowMode;
2574
2589
  const logFlow = _react.useCallback.call(void 0,
2575
2590
  (message, data) => {
2576
- _chunkNU3ES4JYcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
2591
+ _chunkDBBSH7HPcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
2577
2592
  },
2578
2593
  [debug]
2579
2594
  );
2580
2595
  const logFlowError = _react.useCallback.call(void 0,
2581
2596
  (message, error, data) => {
2582
- _chunkNU3ES4JYcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
2597
+ _chunkDBBSH7HPcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
2583
2598
  },
2584
2599
  [debug]
2585
2600
  );
@@ -2600,12 +2615,12 @@ function DepositFlow({
2600
2615
  return null;
2601
2616
  }, []);
2602
2617
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
2603
- if (!_optionalChain([dappWalletClient, 'optionalAccess', _44 => _44.switchChain])) return void 0;
2618
+ if (!_optionalChain([dappWalletClient, 'optionalAccess', _51 => _51.switchChain])) return void 0;
2604
2619
  return async (chainId) => {
2605
- await _optionalChain([dappWalletClient, 'access', _45 => _45.switchChain, 'optionalCall', _46 => _46({ id: chainId })]);
2620
+ await _optionalChain([dappWalletClient, 'access', _52 => _52.switchChain, 'optionalCall', _53 => _53({ id: chainId })]);
2606
2621
  };
2607
2622
  }, [dappWalletClient]);
2608
- const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _47 => _47.account, 'optionalAccess', _48 => _48.address]), () => ( null));
2623
+ const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _54 => _54.account, 'optionalAccess', _55 => _55.address]), () => ( null));
2609
2624
  const walletOptions = _react.useMemo.call(void 0, () => {
2610
2625
  const options = [];
2611
2626
  const seen = /* @__PURE__ */ new Set();
@@ -2619,7 +2634,7 @@ function DepositFlow({
2619
2634
  });
2620
2635
  seen.add(id);
2621
2636
  }
2622
- if (enableSolana && _optionalChain([reownWallet, 'optionalAccess', _49 => _49.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
2637
+ if (enableSolana && _optionalChain([reownWallet, 'optionalAccess', _56 => _56.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
2623
2638
  const id = _nullishCoalesce(reownWallet.caipAddress, () => ( `solana:${reownWallet.solanaAddress}`));
2624
2639
  if (!seen.has(id)) {
2625
2640
  options.push({
@@ -2631,7 +2646,7 @@ function DepositFlow({
2631
2646
  });
2632
2647
  seen.add(id);
2633
2648
  }
2634
- } else if (_optionalChain([reownWallet, 'optionalAccess', _50 => _50.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
2649
+ } else if (_optionalChain([reownWallet, 'optionalAccess', _57 => _57.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
2635
2650
  const id = `evm:${reownWallet.address.toLowerCase()}`;
2636
2651
  if (!seen.has(id)) {
2637
2652
  options.push({
@@ -2648,22 +2663,36 @@ function DepositFlow({
2648
2663
  }, [
2649
2664
  connectedWalletAddress,
2650
2665
  dappAddress,
2651
- _optionalChain([reownWallet, 'optionalAccess', _51 => _51.address]),
2652
- _optionalChain([reownWallet, 'optionalAccess', _52 => _52.isConnected]),
2653
- _optionalChain([reownWallet, 'optionalAccess', _53 => _53.walletClient]),
2654
- _optionalChain([reownWallet, 'optionalAccess', _54 => _54.publicClient]),
2655
- _optionalChain([reownWallet, 'optionalAccess', _55 => _55.icon]),
2666
+ _optionalChain([reownWallet, 'optionalAccess', _58 => _58.address]),
2667
+ _optionalChain([reownWallet, 'optionalAccess', _59 => _59.isConnected]),
2668
+ _optionalChain([reownWallet, 'optionalAccess', _60 => _60.walletClient]),
2669
+ _optionalChain([reownWallet, 'optionalAccess', _61 => _61.publicClient]),
2670
+ _optionalChain([reownWallet, 'optionalAccess', _62 => _62.icon]),
2656
2671
  enableSolana,
2657
- _optionalChain([reownWallet, 'optionalAccess', _56 => _56.isSolana]),
2658
- _optionalChain([reownWallet, 'optionalAccess', _57 => _57.solanaAddress]),
2659
- _optionalChain([reownWallet, 'optionalAccess', _58 => _58.caipAddress])
2672
+ _optionalChain([reownWallet, 'optionalAccess', _63 => _63.isSolana]),
2673
+ _optionalChain([reownWallet, 'optionalAccess', _64 => _64.solanaAddress]),
2674
+ _optionalChain([reownWallet, 'optionalAccess', _65 => _65.caipAddress])
2660
2675
  ]);
2661
- const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _59 => _59.account]) && dappAddress && !reownWallet;
2676
+ const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _66 => _66.account]) && dappAddress && !reownWallet;
2662
2677
  const hasWalletOptions = walletOptions.length > 0;
2663
2678
  const hasReownSession = Boolean(
2664
- enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _60 => _60.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _61 => _61.address]) : _optionalChain([reownWallet, 'optionalAccess', _62 => _62.address])
2679
+ enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _67 => _67.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _68 => _68.address]) : _optionalChain([reownWallet, 'optionalAccess', _69 => _69.address])
2680
+ );
2681
+ const isWalletHydrationPending = Boolean(
2682
+ dappAddress && !hasWalletOptions && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady)
2665
2683
  );
2666
2684
  const showConnectStep = flowMode === null && !canAutoLock && !isConnectSelectionConfirmed;
2685
+ _react.useEffect.call(void 0, () => {
2686
+ if (!isWalletHydrationPending) {
2687
+ setHasQrAutoAdvanceGraceElapsed(true);
2688
+ return;
2689
+ }
2690
+ setHasQrAutoAdvanceGraceElapsed(false);
2691
+ const timeout = window.setTimeout(() => {
2692
+ setHasQrAutoAdvanceGraceElapsed(true);
2693
+ }, QR_AUTO_ADVANCE_HYDRATION_GRACE_MS);
2694
+ return () => window.clearTimeout(timeout);
2695
+ }, [isWalletHydrationPending]);
2667
2696
  const walletSelectionKey = _react.useMemo.call(void 0, () => {
2668
2697
  if (flowMode !== "wallet") return null;
2669
2698
  if (canAutoLock) {
@@ -2687,16 +2716,16 @@ function DepositFlow({
2687
2716
  return {
2688
2717
  ownerAddress: dappAddress,
2689
2718
  walletClient: void 0,
2690
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, targetChain))),
2719
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, targetChain))),
2691
2720
  switchChain: void 0
2692
2721
  };
2693
2722
  }
2694
2723
  if (canAutoLock) {
2695
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _63 => _63.chain, 'optionalAccess', _64 => _64.id]), () => ( targetChain));
2724
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _70 => _70.chain, 'optionalAccess', _71 => _71.id]), () => ( targetChain));
2696
2725
  return {
2697
2726
  ownerAddress: dappWalletClient.account.address,
2698
2727
  walletClient: dappWalletClient,
2699
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, fallbackChainId))),
2728
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, fallbackChainId))),
2700
2729
  switchChain: dappSwitchChain
2701
2730
  };
2702
2731
  }
@@ -2710,24 +2739,24 @@ function DepositFlow({
2710
2739
  return {
2711
2740
  ownerAddress: dappAddress,
2712
2741
  walletClient: void 0,
2713
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, targetChain))),
2742
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, targetChain))),
2714
2743
  switchChain: void 0
2715
2744
  };
2716
2745
  }
2717
- if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _65 => _65.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2718
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _66 => _66.chain, 'optionalAccess', _67 => _67.id]), () => ( targetChain));
2746
+ if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _72 => _72.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2747
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _73 => _73.chain, 'optionalAccess', _74 => _74.id]), () => ( targetChain));
2719
2748
  return {
2720
2749
  ownerAddress: dappWalletClient.account.address,
2721
2750
  walletClient: dappWalletClient,
2722
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, fallbackChainId))),
2751
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, fallbackChainId))),
2723
2752
  switchChain: dappSwitchChain
2724
2753
  };
2725
2754
  }
2726
- if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _68 => _68.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2755
+ if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _75 => _75.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
2727
2756
  return {
2728
2757
  ownerAddress: reownWallet.address,
2729
2758
  walletClient: reownWallet.walletClient,
2730
- publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, targetChain))),
2759
+ publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, targetChain))),
2731
2760
  switchChain: reownWallet.switchChain
2732
2761
  };
2733
2762
  }
@@ -2765,7 +2794,7 @@ function DepositFlow({
2765
2794
  return {
2766
2795
  ownerAddress: dappAddress,
2767
2796
  walletClient: void 0,
2768
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkNU3ES4JYcjs.getPublicClient.call(void 0, targetChain))),
2797
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkDBBSH7HPcjs.getPublicClient.call(void 0, targetChain))),
2769
2798
  switchChain: void 0
2770
2799
  };
2771
2800
  }
@@ -2787,7 +2816,7 @@ function DepositFlow({
2787
2816
  walletSignerContext,
2788
2817
  walletSelectionKey
2789
2818
  ]);
2790
- const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _69 => _69.ownerAddress]))), () => ( null));
2819
+ const sessionKeyAddress = _nullishCoalesce(_nullishCoalesce(dappAddress, () => ( _optionalChain([signerContext, 'optionalAccess', _76 => _76.ownerAddress]))), () => ( null));
2791
2820
  const lastTargetRef = _react.useRef.call(void 0, null);
2792
2821
  _react.useEffect.call(void 0, () => {
2793
2822
  const prev = lastTargetRef.current;
@@ -2864,7 +2893,7 @@ function DepositFlow({
2864
2893
  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;
2865
2894
  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;
2866
2895
  _react.useEffect.call(void 0, () => {
2867
- _optionalChain([onStepChange, 'optionalCall', _70 => _70(stepIndex, currentBackHandler)]);
2896
+ _optionalChain([onStepChange, 'optionalCall', _77 => _77(stepIndex, currentBackHandler)]);
2868
2897
  }, [stepIndex, currentBackHandler, onStepChange]);
2869
2898
  _react.useEffect.call(void 0, () => {
2870
2899
  logFlow("state:changed", {
@@ -2883,7 +2912,7 @@ function DepositFlow({
2883
2912
  targetToken
2884
2913
  ]);
2885
2914
  _react.useEffect.call(void 0, () => {
2886
- _optionalChain([onTotalBalanceChange, 'optionalCall', _71 => _71(totalBalanceUsd)]);
2915
+ _optionalChain([onTotalBalanceChange, 'optionalCall', _78 => _78(totalBalanceUsd)]);
2887
2916
  }, [totalBalanceUsd, onTotalBalanceChange]);
2888
2917
  const isDepositAddressMode = flowMode === "deposit-address";
2889
2918
  const isSolanaWalletMode = flowMode === "solana-wallet";
@@ -2925,7 +2954,7 @@ function DepositFlow({
2925
2954
  solanaDepositAddress
2926
2955
  });
2927
2956
  } else {
2928
- _optionalChain([onError, 'optionalCall', _72 => _72({
2957
+ _optionalChain([onError, 'optionalCall', _79 => _79({
2929
2958
  message: "Solana deposit address not available. Please try again.",
2930
2959
  code: "SOLANA_SETUP_FAILED"
2931
2960
  })]);
@@ -2960,7 +2989,7 @@ function DepositFlow({
2960
2989
  directTransfer
2961
2990
  };
2962
2991
  });
2963
- _optionalChain([onDepositSubmitted, 'optionalCall', _73 => _73({ txHash, sourceChain: chainId, amount })]);
2992
+ _optionalChain([onDepositSubmitted, 'optionalCall', _80 => _80({ txHash, sourceChain: chainId, amount })]);
2964
2993
  },
2965
2994
  [onDepositSubmitted, targetChain, targetToken]
2966
2995
  );
@@ -3032,7 +3061,7 @@ function DepositFlow({
3032
3061
  sourceDecimals: prev.token.decimals
3033
3062
  };
3034
3063
  });
3035
- _optionalChain([onDepositSubmitted, 'optionalCall', _74 => _74({
3064
+ _optionalChain([onDepositSubmitted, 'optionalCall', _81 => _81({
3036
3065
  txHash,
3037
3066
  sourceChain: "solana",
3038
3067
  amount: amountUnits
@@ -3042,7 +3071,7 @@ function DepositFlow({
3042
3071
  );
3043
3072
  const handleConnected = _react.useCallback.call(void 0,
3044
3073
  (addr, smartAccount) => {
3045
- _optionalChain([onConnected, 'optionalCall', _75 => _75({ address: addr, smartAccount })]);
3074
+ _optionalChain([onConnected, 'optionalCall', _82 => _82({ address: addr, smartAccount })]);
3046
3075
  },
3047
3076
  [onConnected]
3048
3077
  );
@@ -3105,28 +3134,28 @@ function DepositFlow({
3105
3134
  );
3106
3135
  const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
3107
3136
  (txHash, sourceChain, amount) => {
3108
- _optionalChain([onDepositSubmitted, 'optionalCall', _76 => _76({ txHash, sourceChain, amount })]);
3137
+ _optionalChain([onDepositSubmitted, 'optionalCall', _83 => _83({ txHash, sourceChain, amount })]);
3109
3138
  },
3110
3139
  [onDepositSubmitted]
3111
3140
  );
3112
3141
  const handleDepositComplete = _react.useCallback.call(void 0,
3113
3142
  (txHash, destinationTxHash, context) => {
3114
3143
  logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
3115
- _optionalChain([onDepositComplete, 'optionalCall', _77 => _77({ txHash, destinationTxHash, ...context })]);
3144
+ _optionalChain([onDepositComplete, 'optionalCall', _84 => _84({ txHash, destinationTxHash, ...context })]);
3116
3145
  },
3117
3146
  [logFlow, onDepositComplete]
3118
3147
  );
3119
3148
  const handleDepositFailed = _react.useCallback.call(void 0,
3120
3149
  (txHash, error) => {
3121
3150
  logFlowError("deposit:failed", error, { txHash });
3122
- _optionalChain([onDepositFailed, 'optionalCall', _78 => _78({ txHash, error })]);
3151
+ _optionalChain([onDepositFailed, 'optionalCall', _85 => _85({ txHash, error })]);
3123
3152
  },
3124
3153
  [logFlowError, onDepositFailed]
3125
3154
  );
3126
3155
  const handleError = _react.useCallback.call(void 0,
3127
3156
  (message, code) => {
3128
3157
  logFlowError("flow:error", message, { code });
3129
- _optionalChain([onError, 'optionalCall', _79 => _79({ message, code })]);
3158
+ _optionalChain([onError, 'optionalCall', _86 => _86({ message, code })]);
3130
3159
  },
3131
3160
  [logFlowError, onError]
3132
3161
  );
@@ -3183,7 +3212,7 @@ function DepositFlow({
3183
3212
  if (walletId) {
3184
3213
  const selectedOption = walletOptions.find((o) => o.id === walletId);
3185
3214
  setSelectedWalletId(walletId);
3186
- if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _80 => _80.kind]) === "solana") {
3215
+ if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _87 => _87.kind]) === "solana") {
3187
3216
  handleSelectSolanaWallet();
3188
3217
  } else {
3189
3218
  handleSelectProvider();
@@ -3192,13 +3221,14 @@ function DepositFlow({
3192
3221
  return;
3193
3222
  }
3194
3223
  }
3195
- if (!hasWalletOptions && dappAddress && !hasReownSession && !dappWalletClient) {
3224
+ if (!hasWalletOptions && dappAddress && !hasReownSession && !dappWalletClient && hasQrAutoAdvanceGraceElapsed) {
3196
3225
  handleSelectTransferCrypto();
3197
3226
  setIsConnectSelectionConfirmed(true);
3198
3227
  }
3199
3228
  }, [
3200
3229
  hasWalletOptions,
3201
3230
  hasReownSession,
3231
+ hasQrAutoAdvanceGraceElapsed,
3202
3232
  enableSolana,
3203
3233
  isConnectSelectionConfirmed,
3204
3234
  flowMode,
@@ -3212,7 +3242,7 @@ function DepositFlow({
3212
3242
  ]);
3213
3243
  if (showConnectStep) {
3214
3244
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3215
- _chunkNU3ES4JYcjs.ConnectStep,
3245
+ _chunkDBBSH7HPcjs.ConnectStep,
3216
3246
  {
3217
3247
  walletOptions,
3218
3248
  selectedWalletId: selectedWalletIdEffective,
@@ -3231,7 +3261,7 @@ function DepositFlow({
3231
3261
  const selectedOption = walletOptions.find(
3232
3262
  (o) => o.id === selectedWalletIdEffective
3233
3263
  );
3234
- if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _81 => _81.kind]) === "solana") {
3264
+ if (enableSolana && _optionalChain([selectedOption, 'optionalAccess', _88 => _88.kind]) === "solana") {
3235
3265
  handleSelectSolanaWallet();
3236
3266
  } else {
3237
3267
  handleSelectProvider();
@@ -3273,7 +3303,7 @@ function DepositFlow({
3273
3303
  }
3274
3304
  ),
3275
3305
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3276
- _chunkNU3ES4JYcjs.ProcessingStep,
3306
+ _chunkDBBSH7HPcjs.ProcessingStep,
3277
3307
  {
3278
3308
  smartAccount: step.smartAccount,
3279
3309
  txHash: step.txHash,
@@ -3299,8 +3329,8 @@ function DepositFlow({
3299
3329
  }
3300
3330
  if (isSolanaWalletMode) {
3301
3331
  if (!sessionKeyAddress) return null;
3302
- const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _82 => _82.solanaAddress]);
3303
- const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _83 => _83.solanaProvider]);
3332
+ const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _89 => _89.solanaAddress]);
3333
+ const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _90 => _90.solanaProvider]);
3304
3334
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
3305
3335
  step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3306
3336
  SetupStep,
@@ -3395,7 +3425,7 @@ function DepositFlow({
3395
3425
  ) })
3396
3426
  ] }) : null,
3397
3427
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3398
- _chunkNU3ES4JYcjs.ProcessingStep,
3428
+ _chunkDBBSH7HPcjs.ProcessingStep,
3399
3429
  {
3400
3430
  smartAccount: step.smartAccount,
3401
3431
  txHash: step.txHash,
@@ -3419,16 +3449,16 @@ function DepositFlow({
3419
3449
  )
3420
3450
  ] });
3421
3451
  }
3422
- if (!_optionalChain([signerContext, 'optionalAccess', _84 => _84.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _85 => _85.publicClient])) {
3452
+ if (!_optionalChain([signerContext, 'optionalAccess', _91 => _91.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _92 => _92.publicClient])) {
3423
3453
  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..." }) }) }) }) });
3424
3454
  }
3425
3455
  const ownerAddress = signerContext.ownerAddress;
3426
- const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _86 => _86.walletClient, 'optionalAccess', _87 => _87.chain, 'optionalAccess', _88 => _88.id]), () => ( _optionalChain([signerContext, 'access', _89 => _89.publicClient, 'access', _90 => _90.chain, 'optionalAccess', _91 => _91.id]))), () => ( targetChain));
3456
+ const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _93 => _93.walletClient, 'optionalAccess', _94 => _94.chain, 'optionalAccess', _95 => _95.id]), () => ( _optionalChain([signerContext, 'access', _96 => _96.publicClient, 'access', _97 => _97.chain, 'optionalAccess', _98 => _98.id]))), () => ( targetChain));
3427
3457
  const getReadClientForChain = (chainId) => {
3428
- if (_optionalChain([signerContext, 'access', _92 => _92.publicClient, 'access', _93 => _93.chain, 'optionalAccess', _94 => _94.id]) === chainId) {
3458
+ if (_optionalChain([signerContext, 'access', _99 => _99.publicClient, 'access', _100 => _100.chain, 'optionalAccess', _101 => _101.id]) === chainId) {
3429
3459
  return signerContext.publicClient;
3430
3460
  }
3431
- return _chunkNU3ES4JYcjs.getPublicClient.call(void 0, chainId);
3461
+ return _chunkDBBSH7HPcjs.getPublicClient.call(void 0, chainId);
3432
3462
  };
3433
3463
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
3434
3464
  step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3499,7 +3529,7 @@ function DepositFlow({
3499
3529
  }
3500
3530
  ),
3501
3531
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3502
- _chunkNU3ES4JYcjs.ProcessingStep,
3532
+ _chunkDBBSH7HPcjs.ProcessingStep,
3503
3533
  {
3504
3534
  smartAccount: step.smartAccount,
3505
3535
  txHash: step.txHash,
@@ -3527,20 +3557,37 @@ function DepositFlow({
3527
3557
  // src/DepositModal.tsx
3528
3558
 
3529
3559
  var ReownDepositInner = _react.lazy.call(void 0,
3530
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-KT5MMNTJ.cjs"))).then((m) => ({ default: m.DepositModalReown }))
3560
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-OXAW4Y7O.cjs"))).then((m) => ({ default: m.DepositModalReown }))
3531
3561
  );
3532
3562
  function DepositModal(props) {
3533
3563
  const needsReown = !!props.reownAppId;
3564
+ const hasDappWalletClientProp = Object.prototype.hasOwnProperty.call(
3565
+ props,
3566
+ "dappWalletClient"
3567
+ );
3534
3568
  if (needsReown) {
3535
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Suspense, { fallback: null, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ReownDepositInner, { ...props }) });
3569
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Suspense, { fallback: null, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3570
+ ReownDepositInner,
3571
+ {
3572
+ ...props,
3573
+ hasDappWalletClientProp
3574
+ }
3575
+ ) });
3536
3576
  }
3537
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositModalInner, { ...props });
3577
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3578
+ DepositModalInner,
3579
+ {
3580
+ ...props,
3581
+ hasDappWalletClientProp
3582
+ }
3583
+ );
3538
3584
  }
3539
3585
  DepositModal.displayName = "DepositModal";
3540
3586
  function DepositModalInner({
3541
3587
  dappWalletClient,
3542
3588
  dappPublicClient,
3543
3589
  dappAddress,
3590
+ hasDappWalletClientProp,
3544
3591
  targetChain: targetChainProp,
3545
3592
  targetToken,
3546
3593
  isOpen,
@@ -3582,7 +3629,7 @@ function DepositModalInner({
3582
3629
  const targetChain = _chunkNELAYNA3cjs.getChainId.call(void 0, targetChainProp);
3583
3630
  const sourceChain = sourceChainProp ? _chunkNELAYNA3cjs.getChainId.call(void 0, sourceChainProp) : void 0;
3584
3631
  const service = _react.useMemo.call(void 0,
3585
- () => _chunkNU3ES4JYcjs.createDepositService.call(void 0, backendUrl, {
3632
+ () => _chunkDBBSH7HPcjs.createDepositService.call(void 0, backendUrl, {
3586
3633
  debug,
3587
3634
  debugScope: "service:deposit"
3588
3635
  }),
@@ -3590,7 +3637,7 @@ function DepositModalInner({
3590
3637
  );
3591
3638
  _react.useEffect.call(void 0, () => {
3592
3639
  if (isOpen && modalRef.current) {
3593
- _chunkNU3ES4JYcjs.applyTheme.call(void 0, modalRef.current, theme);
3640
+ _chunkDBBSH7HPcjs.applyTheme.call(void 0, modalRef.current, theme);
3594
3641
  }
3595
3642
  }, [isOpen, theme]);
3596
3643
  _react.useEffect.call(void 0, () => {
@@ -3600,7 +3647,7 @@ function DepositModalInner({
3600
3647
  _react.useEffect.call(void 0, () => {
3601
3648
  if (isOpen && !hasCalledReady.current) {
3602
3649
  hasCalledReady.current = true;
3603
- _optionalChain([onReady, 'optionalCall', _95 => _95()]);
3650
+ _optionalChain([onReady, 'optionalCall', _102 => _102()]);
3604
3651
  }
3605
3652
  }, [isOpen, onReady]);
3606
3653
  _react.useEffect.call(void 0, () => {
@@ -3619,17 +3666,17 @@ function DepositModalInner({
3619
3666
  setTotalBalanceUsd(balance2);
3620
3667
  }, []);
3621
3668
  const handleBack = _react.useCallback.call(void 0, () => {
3622
- _optionalChain([backHandlerRef, 'access', _96 => _96.current, 'optionalCall', _97 => _97()]);
3669
+ _optionalChain([backHandlerRef, 'access', _103 => _103.current, 'optionalCall', _104 => _104()]);
3623
3670
  }, []);
3624
- const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _98 => _98.showLogo]), () => ( false));
3625
- const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _99 => _99.showStepper]), () => ( false));
3626
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _100 => _100.showBackButton]), () => ( true));
3627
- const balance = _optionalChain([uiConfig, 'optionalAccess', _101 => _101.balance]);
3628
- const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _102 => _102.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
3629
- const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _103 => _103.title]), () => ( "Deposit"));
3671
+ const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _105 => _105.showLogo]), () => ( false));
3672
+ const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _106 => _106.showStepper]), () => ( false));
3673
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _107 => _107.showBackButton]), () => ( true));
3674
+ const balance = _optionalChain([uiConfig, 'optionalAccess', _108 => _108.balance]);
3675
+ const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _109 => _109.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
3676
+ const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _110 => _110.title]), () => ( "Deposit"));
3630
3677
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
3631
3678
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3632
- _chunkNU3ES4JYcjs.Modal,
3679
+ _chunkDBBSH7HPcjs.Modal,
3633
3680
  {
3634
3681
  isOpen,
3635
3682
  onClose,
@@ -3677,20 +3724,51 @@ function DepositModalInner({
3677
3724
  }
3678
3725
  ),
3679
3726
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-title", children: title }),
3680
- showStepper && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-progress", style: { marginLeft: 8 }, children: [0, 1, 2, 3, 4].map((i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3681
- "div",
3682
- {
3683
- className: `rs-modal-progress-dot ${i <= currentStepIndex ? "rs-modal-progress-dot--active" : "rs-modal-progress-dot--inactive"}`
3684
- },
3685
- i
3686
- )) })
3727
+ showStepper && currentStepIndex >= 2 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step-indicator", style: { marginLeft: 8 }, children: [
3728
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3729
+ "div",
3730
+ {
3731
+ className: `rs-step-indicator-node ${currentStepIndex >= 4 ? "rs-step-indicator-node--complete" : "rs-step-indicator-node--active"}`,
3732
+ children: currentStepIndex >= 4 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3733
+ "svg",
3734
+ {
3735
+ viewBox: "0 0 24 24",
3736
+ fill: "none",
3737
+ stroke: "currentColor",
3738
+ strokeWidth: "3",
3739
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3740
+ "path",
3741
+ {
3742
+ strokeLinecap: "round",
3743
+ strokeLinejoin: "round",
3744
+ d: "M5 12l5 5L20 7"
3745
+ }
3746
+ )
3747
+ }
3748
+ ) : "1"
3749
+ }
3750
+ ),
3751
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3752
+ "div",
3753
+ {
3754
+ className: `rs-step-indicator-line ${currentStepIndex >= 4 ? "rs-step-indicator-line--active" : ""}`
3755
+ }
3756
+ ),
3757
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3758
+ "div",
3759
+ {
3760
+ className: `rs-step-indicator-node ${currentStepIndex >= 4 ? "rs-step-indicator-node--active" : "rs-step-indicator-node--inactive"}`,
3761
+ children: "2"
3762
+ }
3763
+ )
3764
+ ] })
3687
3765
  ] }),
3688
3766
  balance && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
3689
3767
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
3690
3768
  balance.title,
3691
3769
  ":"
3692
3770
  ] }),
3693
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkNU3ES4JYcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
3771
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkDBBSH7HPcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
3694
3772
  ] })
3695
3773
  ] }),
3696
3774
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3726,6 +3804,7 @@ function DepositModalInner({
3726
3804
  dappWalletClient,
3727
3805
  dappPublicClient,
3728
3806
  dappAddress,
3807
+ hasDappWalletClientProp,
3729
3808
  targetChain,
3730
3809
  targetToken,
3731
3810
  service,