@rhinestone/deposit-modal 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/{DepositModalReown-ICBGUVAA.cjs → DepositModalReown-CHVDFNEX.cjs} +9 -9
  2. package/dist/{DepositModalReown-IVRDXQAA.mjs → DepositModalReown-T4RRW5FM.mjs} +6 -6
  3. package/dist/{WithdrawModalReown-O7PR343Z.mjs → WithdrawModalReown-Q6MUMZTX.mjs} +5 -5
  4. package/dist/{WithdrawModalReown-6XWURPFZ.cjs → WithdrawModalReown-YZMZTN6E.cjs} +8 -8
  5. package/dist/{chunk-FJWLC4AM.mjs → chunk-4JLYWRQA.mjs} +1 -1
  6. package/dist/{chunk-VVKJRGX3.cjs → chunk-6P3WNDED.cjs} +10 -8
  7. package/dist/{chunk-N73D3WN4.mjs → chunk-CLUR2J72.mjs} +4 -4
  8. package/dist/{chunk-WJX3TJFK.mjs → chunk-CPMHRMPH.mjs} +36 -7
  9. package/dist/{chunk-ABVRVW3P.cjs → chunk-HH46H6ZI.cjs} +37 -8
  10. package/dist/{chunk-7Q26RR6J.mjs → chunk-J52W34Y7.mjs} +6 -4
  11. package/dist/{chunk-F7P4MV72.mjs → chunk-K6J3RDDK.mjs} +1 -1
  12. package/dist/{chunk-SITLCMTI.cjs → chunk-KUURQOTT.cjs} +100 -100
  13. package/dist/{chunk-GBOCV2LQ.mjs → chunk-OYPFPEIT.mjs} +221 -45
  14. package/dist/{chunk-IZPUHIIN.cjs → chunk-QSMPJQTX.cjs} +687 -528
  15. package/dist/{chunk-UEKPBRBY.cjs → chunk-RLMXWLF4.cjs} +3 -3
  16. package/dist/{chunk-VPWWFWZT.cjs → chunk-UN6MEOOA.cjs} +283 -107
  17. package/dist/{chunk-TCLBFO3S.mjs → chunk-UZENNYHS.mjs} +230 -71
  18. package/dist/{chunk-NRNJAQUA.cjs → chunk-XOBLFIGV.cjs} +4 -4
  19. package/dist/constants.cjs +2 -2
  20. package/dist/constants.mjs +1 -1
  21. package/dist/deposit.cjs +6 -6
  22. package/dist/deposit.mjs +5 -5
  23. package/dist/index.cjs +7 -7
  24. package/dist/index.mjs +6 -6
  25. package/dist/polymarket.cjs +6 -6
  26. package/dist/polymarket.mjs +3 -3
  27. package/dist/styles.css +86 -12
  28. package/dist/withdraw.cjs +5 -5
  29. package/dist/withdraw.mjs +4 -4
  30. package/package.json +1 -1
@@ -7,7 +7,7 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkNRNJAQUAcjs = require('./chunk-NRNJAQUA.cjs');
10
+ var _chunkXOBLFIGVcjs = require('./chunk-XOBLFIGV.cjs');
11
11
 
12
12
 
13
13
 
@@ -68,10 +68,10 @@ var _chunkNRNJAQUAcjs = require('./chunk-NRNJAQUA.cjs');
68
68
 
69
69
 
70
70
 
71
- var _chunkVPWWFWZTcjs = require('./chunk-VPWWFWZT.cjs');
71
+ var _chunkUN6MEOOAcjs = require('./chunk-UN6MEOOA.cjs');
72
72
 
73
73
 
74
- var _chunkUEKPBRBYcjs = require('./chunk-UEKPBRBY.cjs');
74
+ var _chunkRLMXWLF4cjs = require('./chunk-RLMXWLF4.cjs');
75
75
 
76
76
 
77
77
 
@@ -101,7 +101,9 @@ var _chunkUEKPBRBYcjs = require('./chunk-UEKPBRBY.cjs');
101
101
 
102
102
 
103
103
 
104
- var _chunkABVRVW3Pcjs = require('./chunk-ABVRVW3P.cjs');
104
+
105
+
106
+ var _chunkHH46H6ZIcjs = require('./chunk-HH46H6ZI.cjs');
105
107
 
106
108
  // src/DepositModal.tsx
107
109
 
@@ -146,12 +148,12 @@ function AssetSelectStep({
146
148
  const [error, setError] = _react.useState.call(void 0, null);
147
149
  const defaultAssetId = _react.useMemo.call(void 0, () => {
148
150
  if (!defaultSourceChain || !defaultSourceToken) return null;
149
- return _chunkVPWWFWZTcjs.getAssetId.call(void 0, {
151
+ return _chunkUN6MEOOAcjs.getAssetId.call(void 0, {
150
152
  chainId: defaultSourceChain,
151
153
  token: defaultSourceToken
152
154
  });
153
155
  }, [defaultSourceChain, defaultSourceToken]);
154
- const onTotalBalanceComputedRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onTotalBalanceComputed);
156
+ const onTotalBalanceComputedRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onTotalBalanceComputed);
155
157
  _react.useEffect.call(void 0, () => {
156
158
  let active = true;
157
159
  function emitAssetsUpdate(currentAssets) {
@@ -171,11 +173,11 @@ function AssetSelectStep({
171
173
  try {
172
174
  const portfolio = await service.fetchPortfolio(address);
173
175
  if (!active) return;
174
- const portfolioAssets = _chunkVPWWFWZTcjs.portfolioToAssets.call(void 0, portfolio.tokens);
176
+ const portfolioAssets = _chunkUN6MEOOAcjs.portfolioToAssets.call(void 0, portfolio.tokens);
175
177
  setAssets(portfolioAssets);
176
178
  emitAssetsUpdate(portfolioAssets);
177
179
  const hasNative = portfolioAssets.some(
178
- (asset) => asset.token.toLowerCase() === _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS
180
+ (asset) => asset.token.toLowerCase() === _chunkHH46H6ZIcjs.NATIVE_TOKEN_ADDRESS
179
181
  );
180
182
  if (!hasNative) {
181
183
  const nativeAssets = await fetchNativeAssets(
@@ -204,12 +206,6 @@ function AssetSelectStep({
204
206
  active = false;
205
207
  };
206
208
  }, [address, publicClient, service, onTotalBalanceComputedRef]);
207
- _react.useEffect.call(void 0, () => {
208
- if (!defaultAssetId || selectedAssetId) return;
209
- if (assets.some((asset) => asset.id === defaultAssetId)) {
210
- setSelectedAssetId(defaultAssetId);
211
- }
212
- }, [assets, defaultAssetId, selectedAssetId]);
213
209
  const allowedChainSet = _react.useMemo.call(void 0,
214
210
  () => _optionalChain([allowedRoutes, 'optionalAccess', _4 => _4.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
215
211
  [_optionalChain([allowedRoutes, 'optionalAccess', _5 => _5.sourceChains])]
@@ -226,7 +222,12 @@ function AssetSelectStep({
226
222
  return false;
227
223
  }
228
224
  if (allowedChainSet && !allowedChainSet.has(a.chainId)) return false;
229
- if (allowedTokenSet && !allowedTokenSet.has(a.symbol.toUpperCase()))
225
+ if (allowedTokenSet) {
226
+ if (!allowedTokenSet.has(a.symbol.toUpperCase())) return false;
227
+ if (!_chunkHH46H6ZIcjs.isSupportedTokenAddressForChain.call(void 0, a.token, a.chainId)) return false;
228
+ }
229
+ const isNativeToken = a.token.toLowerCase() === _chunkHH46H6ZIcjs.NATIVE_TOKEN_ADDRESS;
230
+ if (!isNativeToken && !(typeof a.balanceUsd === "number" && a.balanceUsd >= 0.01))
230
231
  return false;
231
232
  return true;
232
233
  }).sort((a, b) => {
@@ -240,14 +241,20 @@ function AssetSelectStep({
240
241
  return 0;
241
242
  });
242
243
  }, [assets, allowedChainSet, allowedTokenSet]);
243
- const selectedAsset = selectedAssetId && assets.find((asset) => asset.id === selectedAssetId);
244
+ _react.useEffect.call(void 0, () => {
245
+ if (!defaultAssetId || selectedAssetId) return;
246
+ if (rows.some((asset) => asset.id === defaultAssetId)) {
247
+ setSelectedAssetId(defaultAssetId);
248
+ }
249
+ }, [rows, defaultAssetId, selectedAssetId]);
250
+ const selectedAsset = selectedAssetId && rows.find((asset) => asset.id === selectedAssetId);
244
251
  const formatBalance = (asset) => {
245
252
  if (!asset.balance) return "--";
246
253
  try {
247
254
  const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
248
255
  const numeric = Number(raw);
249
256
  if (!Number.isFinite(numeric)) return raw;
250
- return _chunkVPWWFWZTcjs.tokenFormatter.format(numeric);
257
+ return _chunkUN6MEOOAcjs.tokenFormatter.format(numeric);
251
258
  } catch (e3) {
252
259
  return asset.balance;
253
260
  }
@@ -255,20 +262,20 @@ function AssetSelectStep({
255
262
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
256
263
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
257
264
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
258
- _chunkVPWWFWZTcjs.BodyHeader,
265
+ _chunkUN6MEOOAcjs.BodyHeader,
259
266
  {
260
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}),
267
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}),
261
268
  title: "Your assets",
262
269
  subtitle: "Select source assets to transfer"
263
270
  }
264
271
  ),
265
272
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
266
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Spinner, { className: "rs-text-tertiary" }),
273
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, { className: "rs-text-tertiary" }),
267
274
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
268
275
  ] }),
269
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "error", children: error }),
276
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
270
277
  !loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
271
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, { className: "rs-empty-icon" }),
278
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, { className: "rs-empty-icon" }),
272
279
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
273
280
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
274
281
  address.slice(0, 6),
@@ -288,9 +295,9 @@ function AssetSelectStep({
288
295
  !loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((asset) => {
289
296
  const isSelected = selectedAssetId === asset.id;
290
297
  const tokenAmount = formatBalance(asset);
291
- const badge = _chunkABVRVW3Pcjs.getChainBadge.call(void 0, asset.chainId);
292
- const tokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol);
293
- const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, asset.chainId);
298
+ const badge = _chunkHH46H6ZIcjs.getChainBadge.call(void 0, asset.chainId);
299
+ const tokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, asset.symbol);
300
+ const chainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, asset.chainId);
294
301
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
295
302
  "button",
296
303
  {
@@ -306,7 +313,7 @@ function AssetSelectStep({
306
313
  "img",
307
314
  {
308
315
  src: chainIcon,
309
- alt: _chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)
316
+ alt: _chunkHH46H6ZIcjs.getChainName.call(void 0, asset.chainId)
310
317
  }
311
318
  ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
312
319
  "span",
@@ -325,7 +332,7 @@ function AssetSelectStep({
325
332
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-name", children: asset.symbol }),
326
333
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-asset-chain", children: [
327
334
  "on ",
328
- _chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)
335
+ _chunkHH46H6ZIcjs.getChainName.call(void 0, asset.chainId)
329
336
  ] })
330
337
  ] }),
331
338
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-balance-small", children: [
@@ -335,14 +342,14 @@ function AssetSelectStep({
335
342
  ] })
336
343
  ] })
337
344
  ] }),
338
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkVPWWFWZTcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
345
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkUN6MEOOAcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
339
346
  ]
340
347
  },
341
348
  asset.id
342
349
  );
343
350
  }) }),
344
351
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
345
- _chunkVPWWFWZTcjs.Button,
352
+ _chunkUN6MEOOAcjs.Button,
346
353
  {
347
354
  onClick: () => selectedAsset && onContinue(selectedAsset),
348
355
  disabled: !selectedAsset,
@@ -351,28 +358,29 @@ function AssetSelectStep({
351
358
  }
352
359
  )
353
360
  ] }),
354
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
361
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
355
362
  ] });
356
363
  }
357
364
  async function fetchNativeAssets(address, publicClient, existing) {
358
365
  const existingIds = new Set(existing.map((asset) => asset.id));
359
366
  const connectedChainId = _optionalChain([publicClient, 'access', _8 => _8.chain, 'optionalAccess', _9 => _9.id]);
360
367
  if (!connectedChainId) return [];
361
- if (!_chunkABVRVW3Pcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
362
- const id = _chunkVPWWFWZTcjs.getAssetId.call(void 0, {
368
+ if (!_chunkHH46H6ZIcjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
369
+ const id = _chunkUN6MEOOAcjs.getAssetId.call(void 0, {
363
370
  chainId: connectedChainId,
364
- token: _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS
371
+ token: _chunkHH46H6ZIcjs.NATIVE_TOKEN_ADDRESS
365
372
  });
366
373
  if (existingIds.has(id)) return [];
367
374
  try {
368
375
  const balance = await publicClient.getBalance({ address });
376
+ const nativeSymbol = _chunkHH46H6ZIcjs.getNativeSymbol.call(void 0, connectedChainId);
369
377
  return [
370
378
  {
371
379
  id,
372
380
  chainId: connectedChainId,
373
- token: _chunkABVRVW3Pcjs.NATIVE_TOKEN_ADDRESS,
374
- symbol: "ETH",
375
- name: "Ethereum",
381
+ token: _chunkHH46H6ZIcjs.NATIVE_TOKEN_ADDRESS,
382
+ symbol: nativeSymbol,
383
+ name: nativeSymbol,
376
384
  decimals: 18,
377
385
  balance: balance.toString()
378
386
  }
@@ -531,8 +539,8 @@ function AmountStep({
531
539
  const chainMismatch = Boolean(
532
540
  _optionalChain([walletClient, 'optionalAccess', _14 => _14.chain, 'optionalAccess', _15 => _15.id]) && walletClient.chain.id !== asset.chainId
533
541
  );
534
- const targetSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
535
- const isSourceStablecoin = _chunkABVRVW3Pcjs.isStablecoinSymbol.call(void 0, asset.symbol);
542
+ const targetSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
543
+ const isSourceStablecoin = _chunkHH46H6ZIcjs.isStablecoinSymbol.call(void 0, asset.symbol);
536
544
  const tokenPriceUsd = _react.useMemo.call(void 0, () => {
537
545
  if (tokenPriceUsdOverride !== void 0 && tokenPriceUsdOverride > 0)
538
546
  return tokenPriceUsdOverride;
@@ -556,7 +564,7 @@ function AmountStep({
556
564
  const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
557
565
  if (!balanceTarget || !publicClient) return;
558
566
  try {
559
- const bal = _chunkVPWWFWZTcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
567
+ const bal = _chunkUN6MEOOAcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
560
568
  address: asset.token,
561
569
  abi: _viem.erc20Abi,
562
570
  functionName: "balanceOf",
@@ -577,7 +585,7 @@ function AmountStep({
577
585
  hasAttemptedSwitch.current = true;
578
586
  switchChain(asset.chainId).catch((err) => {
579
587
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
580
- setError(_chunkVPWWFWZTcjs.formatUserError.call(void 0, raw));
588
+ setError(_chunkUN6MEOOAcjs.formatUserError.call(void 0, raw));
581
589
  });
582
590
  }
583
591
  }, [chainMismatch, switchChain, asset.chainId]);
@@ -630,7 +638,7 @@ function AmountStep({
630
638
  const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
631
639
  const numeric = Number(raw);
632
640
  if (!Number.isFinite(numeric)) return raw;
633
- return _chunkVPWWFWZTcjs.tokenFormatter.format(numeric);
641
+ return _chunkUN6MEOOAcjs.tokenFormatter.format(numeric);
634
642
  } catch (e8) {
635
643
  return "\u2026";
636
644
  }
@@ -649,7 +657,7 @@ function AmountStep({
649
657
  return null;
650
658
  }
651
659
  }, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, asset.decimals]);
652
- const minDepositUsd = targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkABVRVW3Pcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _16 => _16.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _17 => _17.minDepositUsd]), () => ( null));
660
+ const minDepositUsd = targetChain === _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkHH46H6ZIcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _16 => _16.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _17 => _17.minDepositUsd]), () => ( null));
653
661
  const maxDepositUsd = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _18 => _18.maxDepositUsd]), () => ( null));
654
662
  const isBelowMin = minDepositUsd !== null && numericAmount > 0 && amountUsd < minDepositUsd;
655
663
  const isAboveMax = maxDepositUsd !== null && amountUsd > maxDepositUsd;
@@ -745,13 +753,13 @@ function AmountStep({
745
753
  };
746
754
  const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
747
755
  const continueDisabled = chainMismatch || isCheckingLiquidity || exceedsBalance || numericAmount === 0 && !isBelowMin || balance === null;
748
- const sourceChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId);
749
- const targetChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
750
- const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol);
751
- const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
756
+ const sourceChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, asset.chainId);
757
+ const targetChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChain);
758
+ const sourceTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, asset.symbol);
759
+ const targetTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, targetSymbol);
752
760
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
753
761
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
754
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}), title: "Wallet deposit" }),
762
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}), title: "Wallet deposit" }),
755
763
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
756
764
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
757
765
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -771,13 +779,13 @@ function AmountStep({
771
779
  " available",
772
780
  balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
773
781
  " (~",
774
- _chunkVPWWFWZTcjs.currencyFormatter.format(balanceUsd),
782
+ _chunkUN6MEOOAcjs.currencyFormatter.format(balanceUsd),
775
783
  ")"
776
784
  ] })
777
785
  ] }),
778
786
  minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
779
787
  "Min. deposit ",
780
- _chunkVPWWFWZTcjs.currencyFormatter.format(minDepositUsd)
788
+ _chunkUN6MEOOAcjs.currencyFormatter.format(minDepositUsd)
781
789
  ] })
782
790
  ] })
783
791
  ] }),
@@ -818,13 +826,13 @@ function AmountStep({
818
826
  ] }),
819
827
  balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
820
828
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
821
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkVPWWFWZTcjs.currencyFormatter.format(balanceAfterUsd) })
829
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkUN6MEOOAcjs.currencyFormatter.format(balanceAfterUsd) })
822
830
  ] })
823
831
  ] }),
824
- targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
825
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "error", children: error }),
832
+ targetChain === _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
833
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
826
834
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
827
- _chunkVPWWFWZTcjs.Button,
835
+ _chunkUN6MEOOAcjs.Button,
828
836
  {
829
837
  onClick: handleContinue,
830
838
  fullWidth: true,
@@ -835,7 +843,7 @@ function AmountStep({
835
843
  }
836
844
  )
837
845
  ] }),
838
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
846
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
839
847
  ] });
840
848
  }
841
849
 
@@ -875,23 +883,23 @@ function ConfirmStep({
875
883
  _optionalChain([walletClient, 'optionalAccess', _24 => _24.chain, 'optionalAccess', _25 => _25.id]) && walletClient.chain.id !== asset.chainId
876
884
  );
877
885
  const sameRoute = targetChain === asset.chainId && targetToken.toLowerCase() === asset.token.toLowerCase();
878
- const targetSymbol = sameRoute ? asset.symbol : _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
879
- const sourceChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId);
880
- const targetChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
881
- const sourceChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, asset.chainId);
882
- const targetChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, targetChain);
883
- const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol);
884
- const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
885
- const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(_chunkVPWWFWZTcjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( "0")) : "0";
886
+ const targetSymbol = sameRoute ? asset.symbol : _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
887
+ const sourceChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, asset.chainId);
888
+ const targetChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChain);
889
+ const sourceChainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, asset.chainId);
890
+ const targetChainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, targetChain);
891
+ const sourceTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, asset.symbol);
892
+ const targetTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, targetSymbol);
893
+ const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(_chunkUN6MEOOAcjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( "0")) : "0";
886
894
  const receiveDisplay = (() => {
887
895
  if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
888
896
  if (quote) {
889
- const quoted = _chunkVPWWFWZTcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol);
897
+ const quoted = _chunkUN6MEOOAcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol);
890
898
  if (quoted !== void 0) return quoted;
891
899
  }
892
900
  const usdValue = Number(targetAmount);
893
901
  const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
894
- const estimate = _chunkVPWWFWZTcjs.formatReceiveEstimate.call(void 0, {
902
+ const estimate = _chunkUN6MEOOAcjs.formatReceiveEstimate.call(void 0, {
895
903
  sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
896
904
  sourceSymbol: asset.symbol,
897
905
  targetSymbol,
@@ -910,7 +918,7 @@ function ConfirmStep({
910
918
  hasAttemptedSwitch.current = true;
911
919
  switchChain(asset.chainId).catch((err) => {
912
920
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
913
- setError(_chunkVPWWFWZTcjs.formatUserError.call(void 0, raw));
921
+ setError(_chunkUN6MEOOAcjs.formatUserError.call(void 0, raw));
914
922
  });
915
923
  }
916
924
  }, [chainMismatch, switchChain, asset.chainId]);
@@ -990,7 +998,7 @@ function ConfirmStep({
990
998
  const result = await executeTransfer(amountUnits);
991
999
  hash = result.txHash;
992
1000
  resolvedSourceToken = result.sourceToken;
993
- } else if (_chunkVPWWFWZTcjs.isNativeAsset.call(void 0, asset)) {
1001
+ } else if (_chunkUN6MEOOAcjs.isNativeAsset.call(void 0, asset)) {
994
1002
  hash = await walletClient.sendTransaction({
995
1003
  account,
996
1004
  chain,
@@ -1008,19 +1016,25 @@ function ConfirmStep({
1008
1016
  });
1009
1017
  }
1010
1018
  _optionalChain([onDepositSubmitted, 'optionalCall', _28 => _28(hash, asset.chainId, amountUnits.toString())]);
1011
- onConfirm(hash, asset.chainId, amountUnits.toString(), resolvedSourceToken);
1019
+ onConfirm(
1020
+ hash,
1021
+ asset.chainId,
1022
+ amountUnits.toString(),
1023
+ resolvedSourceToken,
1024
+ _optionalChain([quote, 'optionalAccess', _29 => _29.fees, 'optionalAccess', _30 => _30.breakdown])
1025
+ );
1012
1026
  } catch (err) {
1013
1027
  const raw = err instanceof Error ? err.message : "Transfer failed";
1014
- const message = _chunkVPWWFWZTcjs.formatUserError.call(void 0, raw);
1028
+ const message = _chunkUN6MEOOAcjs.formatUserError.call(void 0, raw);
1015
1029
  setError(message);
1016
- _optionalChain([onError, 'optionalCall', _29 => _29(message, "TRANSFER_ERROR")]);
1030
+ _optionalChain([onError, 'optionalCall', _31 => _31(message, "TRANSFER_ERROR")]);
1017
1031
  } finally {
1018
1032
  setIsSubmitting(false);
1019
1033
  }
1020
1034
  };
1021
1035
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
1022
1036
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
1023
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}), title: "Review deposit" }),
1037
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}), title: "Review deposit" }),
1024
1038
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
1025
1039
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1026
1040
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
@@ -1074,14 +1088,14 @@ function ConfirmStep({
1074
1088
  children: feeDisplay
1075
1089
  }
1076
1090
  ),
1077
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.InfoIcon, {}) }) })
1091
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.InfoIcon, {}) }) })
1078
1092
  ] })
1079
1093
  ] })
1080
1094
  ] }),
1081
- targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
1082
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "error", children: error }),
1095
+ targetChain === _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
1096
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
1083
1097
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1084
- _chunkVPWWFWZTcjs.Button,
1098
+ _chunkUN6MEOOAcjs.Button,
1085
1099
  {
1086
1100
  onClick: handleConfirm,
1087
1101
  loading: isSubmitting,
@@ -1092,7 +1106,7 @@ function ConfirmStep({
1092
1106
  }
1093
1107
  )
1094
1108
  ] }),
1095
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
1109
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
1096
1110
  ] });
1097
1111
  }
1098
1112
 
@@ -1115,9 +1129,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
1115
1129
  var MAX_POLL_INTERVAL = 3e4;
1116
1130
  var BACKOFF_MULTIPLIER = 1.5;
1117
1131
  function isEventForTx(event, txHash) {
1118
- const eventTxHash = _chunkVPWWFWZTcjs.getEventTxHash.call(void 0, event);
1132
+ const eventTxHash = _chunkUN6MEOOAcjs.getEventTxHash.call(void 0, event);
1119
1133
  if (!eventTxHash) return false;
1120
- return _chunkVPWWFWZTcjs.txRefsMatch.call(void 0, eventTxHash, txHash);
1134
+ return _chunkUN6MEOOAcjs.txRefsMatch.call(void 0, eventTxHash, txHash);
1121
1135
  }
1122
1136
  function truncateHash(hash) {
1123
1137
  return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
@@ -1147,7 +1161,7 @@ function formatTimestamp(ms) {
1147
1161
  return `${month} ${day}${suffix} \xB7 ${hours}:${minutes}:${seconds}`;
1148
1162
  }
1149
1163
  function formatBridgeFailedMessage(event) {
1150
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _30 => _30.data]), () => ( {}));
1164
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _32 => _32.data]), () => ( {}));
1151
1165
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
1152
1166
  if (backendMessage.length > 0) {
1153
1167
  const lower = backendMessage.toLowerCase();
@@ -1167,7 +1181,7 @@ function formatBridgeFailedMessage(event) {
1167
1181
  }
1168
1182
  return "Bridge failed";
1169
1183
  }
1170
- var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
1184
+ var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
1171
1185
  function DepositNotification({
1172
1186
  deposit,
1173
1187
  smartAccount,
@@ -1201,7 +1215,7 @@ function DepositNotification({
1201
1215
  const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
1202
1216
  const pollTimeoutRef = _react.useRef.call(void 0, null);
1203
1217
  const completedRef = _react.useRef.call(void 0, _nullishCoalesce(directTransfer, () => ( false)));
1204
- const depositContextRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, {
1218
+ const depositContextRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, {
1205
1219
  amount,
1206
1220
  sourceChain,
1207
1221
  sourceToken: token,
@@ -1209,8 +1223,8 @@ function DepositNotification({
1209
1223
  targetChain,
1210
1224
  targetToken
1211
1225
  });
1212
- const onCompleteRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onComplete);
1213
- const onFailedRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onFailed);
1226
+ const onCompleteRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onComplete);
1227
+ const onFailedRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onFailed);
1214
1228
  const handleComplete = _react.useCallback.call(void 0,
1215
1229
  (destTxHash) => {
1216
1230
  if (completedRef.current) return;
@@ -1219,7 +1233,7 @@ function DepositNotification({
1219
1233
  setCompletedAt(Date.now());
1220
1234
  setStatus("complete");
1221
1235
  const context = depositContextRef.current;
1222
- _optionalChain([onCompleteRef, 'access', _31 => _31.current, 'optionalCall', _32 => _32(txHash, destTxHash, {
1236
+ _optionalChain([onCompleteRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34(txHash, destTxHash, {
1223
1237
  amount: context.amount,
1224
1238
  sourceChain: context.sourceChain,
1225
1239
  sourceToken: context.sourceToken,
@@ -1235,7 +1249,7 @@ function DepositNotification({
1235
1249
  if (completedRef.current) return;
1236
1250
  completedRef.current = true;
1237
1251
  setStatus("failed");
1238
- _optionalChain([onFailedRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34(txHash, error)]);
1252
+ _optionalChain([onFailedRef, 'access', _35 => _35.current, 'optionalCall', _36 => _36(txHash, error)]);
1239
1253
  },
1240
1254
  [onFailedRef, txHash]
1241
1255
  );
@@ -1253,17 +1267,17 @@ function DepositNotification({
1253
1267
  if (!isMounted) return;
1254
1268
  const lastEvent = data.lastEvent;
1255
1269
  const eventForTx = isEventForTx(lastEvent, txHash) ? lastEvent : void 0;
1256
- if (_optionalChain([eventForTx, 'optionalAccess', _35 => _35.type]) === "bridge-complete") {
1257
- const destTx = _optionalChain([eventForTx, 'access', _36 => _36.data, 'optionalAccess', _37 => _37.destination, 'optionalAccess', _38 => _38.transactionHash]);
1270
+ if (_optionalChain([eventForTx, 'optionalAccess', _37 => _37.type]) === "bridge-complete") {
1271
+ const destTx = _optionalChain([eventForTx, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.destination, 'optionalAccess', _40 => _40.transactionHash]);
1258
1272
  handleComplete(destTx);
1259
1273
  return;
1260
1274
  }
1261
- if (_optionalChain([eventForTx, 'optionalAccess', _39 => _39.type]) === "bridge-failed") {
1275
+ if (_optionalChain([eventForTx, 'optionalAccess', _41 => _41.type]) === "bridge-failed") {
1262
1276
  handleFailed(formatBridgeFailedMessage(eventForTx));
1263
1277
  return;
1264
1278
  }
1265
- if (_optionalChain([eventForTx, 'optionalAccess', _40 => _40.type]) === "error") {
1266
- const errorMessage = _nullishCoalesce(_optionalChain([eventForTx, 'access', _41 => _41.data, 'optionalAccess', _42 => _42.message]), () => ( "Unknown error"));
1279
+ if (_optionalChain([eventForTx, 'optionalAccess', _42 => _42.type]) === "error") {
1280
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForTx, 'access', _43 => _43.data, 'optionalAccess', _44 => _44.message]), () => ( "Unknown error"));
1267
1281
  handleFailed(errorMessage);
1268
1282
  return;
1269
1283
  }
@@ -1301,11 +1315,11 @@ function DepositNotification({
1301
1315
  status,
1302
1316
  txHash
1303
1317
  ]);
1304
- const sourceExplorerUrl = sourceChain === "unknown" ? void 0 : _chunkABVRVW3Pcjs.getExplorerTxUrl.call(void 0, sourceChain, txHash);
1305
- const destExplorerUrl = destinationTxHash ? _chunkABVRVW3Pcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1318
+ const sourceExplorerUrl = sourceChain === "unknown" ? void 0 : _chunkHH46H6ZIcjs.getExplorerTxUrl.call(void 0, sourceChain, txHash);
1319
+ const destExplorerUrl = destinationTxHash ? _chunkHH46H6ZIcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1306
1320
  const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
1307
1321
  const subtitle = status === "complete" ? "Your deposit has been credited to your account." : status === "failed" ? "Your deposit could not be processed." : "Your deposit will be credited to your account shortly.";
1308
- const statusIcon = status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CloseIcon, {}) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1322
+ const statusIcon = status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CloseIcon, {}) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1309
1323
  "svg",
1310
1324
  {
1311
1325
  className: "rs-deposit-notification-spinner",
@@ -1355,7 +1369,7 @@ function DepositNotification({
1355
1369
  className: "rs-deposit-notification-close",
1356
1370
  onClick: () => onDismiss(deposit.id),
1357
1371
  "aria-label": "Dismiss",
1358
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CloseIcon, {})
1372
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CloseIcon, {})
1359
1373
  }
1360
1374
  )
1361
1375
  ] }),
@@ -1371,7 +1385,7 @@ function DepositNotification({
1371
1385
  "aria-expanded": expanded,
1372
1386
  children: [
1373
1387
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: expanded ? "See less details" : "See more details" }),
1374
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
1388
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
1375
1389
  ]
1376
1390
  }
1377
1391
  ),
@@ -1460,7 +1474,7 @@ function asString(value) {
1460
1474
  function resolveSolanaTokenMeta(token) {
1461
1475
  if (!token) return {};
1462
1476
  const normalized = token.toLowerCase();
1463
- const matched = _chunkABVRVW3Pcjs.SOLANA_TOKENS.find(
1477
+ const matched = _chunkHH46H6ZIcjs.SOLANA_TOKENS.find(
1464
1478
  (entry) => entry.mint.toLowerCase() === normalized
1465
1479
  );
1466
1480
  if (matched) {
@@ -1472,7 +1486,7 @@ function resolveSolanaTokenMeta(token) {
1472
1486
  return {};
1473
1487
  }
1474
1488
  function getDepositEventDetails(event) {
1475
- if (!_optionalChain([event, 'optionalAccess', _43 => _43.type]) || !isRecord(event.data)) return {};
1489
+ if (!_optionalChain([event, 'optionalAccess', _45 => _45.type]) || !isRecord(event.data)) return {};
1476
1490
  if (event.type === "deposit-received") {
1477
1491
  const chainId = asChainId(event.data.chain);
1478
1492
  const token = asString(event.data.token);
@@ -1487,12 +1501,12 @@ function getDepositEventDetails(event) {
1487
1501
  const source = isRecord(event.data.source) ? event.data.source : void 0;
1488
1502
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
1489
1503
  if (source || deposit) {
1490
- const chainId = _nullishCoalesce(asChainId(_optionalChain([source, 'optionalAccess', _44 => _44.chain])), () => ( asChainId(_optionalChain([deposit, 'optionalAccess', _45 => _45.chain]))));
1491
- const token = _nullishCoalesce(_nullishCoalesce(asString(_optionalChain([source, 'optionalAccess', _46 => _46.asset])), () => ( asString(_optionalChain([deposit, 'optionalAccess', _47 => _47.asset])))), () => ( asString(_optionalChain([deposit, 'optionalAccess', _48 => _48.token]))));
1504
+ const chainId = _nullishCoalesce(asChainId(_optionalChain([source, 'optionalAccess', _46 => _46.chain])), () => ( asChainId(_optionalChain([deposit, 'optionalAccess', _47 => _47.chain]))));
1505
+ const token = _nullishCoalesce(_nullishCoalesce(asString(_optionalChain([source, 'optionalAccess', _48 => _48.asset])), () => ( asString(_optionalChain([deposit, 'optionalAccess', _49 => _49.asset])))), () => ( asString(_optionalChain([deposit, 'optionalAccess', _50 => _50.token]))));
1492
1506
  const solanaMeta = chainId === "solana" ? resolveSolanaTokenMeta(token) : {};
1493
1507
  return {
1494
1508
  chainId,
1495
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _49 => _49.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _50 => _50.amount])))),
1509
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _51 => _51.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _52 => _52.amount])))),
1496
1510
  token,
1497
1511
  ...solanaMeta
1498
1512
  };
@@ -1502,14 +1516,26 @@ function getDepositEventDetails(event) {
1502
1516
  function isSameRoute(sourceChain, sourceToken, targetChain, targetToken) {
1503
1517
  return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
1504
1518
  }
1505
- function computeTokensForChain(chainId, allowedTokenSet) {
1506
- const all = chainId === "solana" ? _chunkABVRVW3Pcjs.SOLANA_TOKENS.map((t) => t.symbol) : _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain.call(void 0, chainId);
1519
+ function chainLabel(chainId) {
1520
+ return _chunkHH46H6ZIcjs.getChainName.call(void 0, chainId).replace(/\s+(One|Mainnet|Smart Chain)$/i, "");
1521
+ }
1522
+ function computeTokensForChain(chainId, allowedTokenSet, topTokens) {
1523
+ const fromBackend = _optionalChain([topTokens, 'optionalAccess', _53 => _53[String(chainId)], 'optionalAccess', _54 => _54.map, 'call', _55 => _55((t) => t.symbol)]);
1524
+ const all = _nullishCoalesce(fromBackend, () => ( (chainId === "solana" ? _chunkHH46H6ZIcjs.SOLANA_TOKENS.map((t) => t.symbol) : _chunkHH46H6ZIcjs.getTargetTokenSymbolsForChain.call(void 0, chainId))));
1507
1525
  return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
1508
1526
  }
1527
+ function resolveSourceTokenAddress(symbol, chainId, topTokens) {
1528
+ const top = _optionalChain([topTokens, 'optionalAccess', _56 => _56[String(chainId)], 'optionalAccess', _57 => _57.find, 'call', _58 => _58((t) => t.symbol === symbol)]);
1529
+ return _nullishCoalesce(_optionalChain([top, 'optionalAccess', _59 => _59.address]), () => ( _chunkHH46H6ZIcjs.getTokenAddress.call(void 0, symbol, chainId)));
1530
+ }
1531
+ function TokenGlyph({ symbol }) {
1532
+ const icon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, symbol);
1533
+ return icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: icon, alt: "", className: "rs-deposit-address-dropdown-icon" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-deposit-address-dropdown-icon rs-deposit-address-dropdown-icon--fallback", children: symbol.slice(0, 3) });
1534
+ }
1509
1535
  function pickFallbackToken(tokens, current) {
1510
1536
  if (tokens.includes(current)) return current;
1511
1537
  if (tokens.includes("USDC")) return "USDC";
1512
- return _nullishCoalesce(tokens[0], () => ( "USDC"));
1538
+ return _nullishCoalesce(tokens[0], () => ( ""));
1513
1539
  }
1514
1540
  function DepositAddressStep({
1515
1541
  smartAccount,
@@ -1527,15 +1553,15 @@ function DepositAddressStep({
1527
1553
  }) {
1528
1554
  const hasSolana = Boolean(solanaDepositAddress);
1529
1555
  const allowedChainSet = _react.useMemo.call(void 0,
1530
- () => _optionalChain([allowedRoutes, 'optionalAccess', _51 => _51.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
1531
- [_optionalChain([allowedRoutes, 'optionalAccess', _52 => _52.sourceChains])]
1556
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _60 => _60.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
1557
+ [_optionalChain([allowedRoutes, 'optionalAccess', _61 => _61.sourceChains])]
1532
1558
  );
1533
1559
  const allowedTokenSet = _react.useMemo.call(void 0,
1534
- () => _optionalChain([allowedRoutes, 'optionalAccess', _53 => _53.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
1535
- [_optionalChain([allowedRoutes, 'optionalAccess', _54 => _54.sourceTokens])]
1560
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _62 => _62.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
1561
+ [_optionalChain([allowedRoutes, 'optionalAccess', _63 => _63.sourceTokens])]
1536
1562
  );
1537
1563
  const evmChainIds = _react.useMemo.call(void 0, () => {
1538
- const all = _chunkABVRVW3Pcjs.getSupportedChainIds.call(void 0, );
1564
+ const all = _chunkHH46H6ZIcjs.getSupportedChainIds.call(void 0, );
1539
1565
  return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
1540
1566
  }, [allowedChainSet]);
1541
1567
  const chainOptions = _react.useMemo.call(void 0, () => {
@@ -1545,15 +1571,33 @@ function DepositAddressStep({
1545
1571
  return options;
1546
1572
  }, [evmChainIds, hasSolana]);
1547
1573
  const BASE_CHAIN_ID2 = 8453;
1548
- const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : evmChainIds[0];
1574
+ const chainHasAllowedToken = (id) => !allowedTokenSet || _chunkHH46H6ZIcjs.getTargetTokenSymbolsForChain.call(void 0, id).some(
1575
+ (s) => allowedTokenSet.has(s.toUpperCase())
1576
+ );
1577
+ const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID2) && chainHasAllowedToken(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : _nullishCoalesce(evmChainIds.find(chainHasAllowedToken), () => ( evmChainIds[0]));
1549
1578
  const [sourceChainId, setSourceChainId] = _react.useState.call(void 0, defaultChainId);
1550
1579
  const isSolana = sourceChainId === "solana";
1580
+ const [topTokens, setTopTokens] = _react.useState.call(void 0, null);
1581
+ _react.useEffect.call(void 0, () => {
1582
+ let active = true;
1583
+ service.getTopTokens().then((t) => {
1584
+ if (active) setTopTokens(t);
1585
+ });
1586
+ return () => {
1587
+ active = false;
1588
+ };
1589
+ }, [service]);
1551
1590
  const tokensForChain = _react.useMemo.call(void 0,
1552
- () => computeTokensForChain(sourceChainId, allowedTokenSet),
1553
- [sourceChainId, allowedTokenSet]
1591
+ () => computeTokensForChain(sourceChainId, allowedTokenSet, topTokens),
1592
+ [sourceChainId, allowedTokenSet, topTokens]
1554
1593
  );
1555
1594
  const defaultToken = pickFallbackToken(tokensForChain, "USDC");
1556
1595
  const [sourceTokenSymbol, setSourceTokenSymbol] = _react.useState.call(void 0, defaultToken);
1596
+ _react.useEffect.call(void 0, () => {
1597
+ if (!tokensForChain.includes(sourceTokenSymbol)) {
1598
+ setSourceTokenSymbol(pickFallbackToken(tokensForChain, sourceTokenSymbol));
1599
+ }
1600
+ }, [tokensForChain, sourceTokenSymbol]);
1557
1601
  const [copied, setCopied] = _react.useState.call(void 0, false);
1558
1602
  const [pollingError, setPollingError] = _react.useState.call(void 0, null);
1559
1603
  const [chainDropdownOpen, setChainDropdownOpen] = _react.useState.call(void 0, false);
@@ -1573,9 +1617,10 @@ function DepositAddressStep({
1573
1617
  setLiquidityHelper({ kind: "idle" });
1574
1618
  return;
1575
1619
  }
1576
- const sourceTokenAddress = _chunkABVRVW3Pcjs.getTokenAddress.call(void 0,
1620
+ const sourceTokenAddress = resolveSourceTokenAddress(
1577
1621
  sourceTokenSymbol,
1578
- sourceChainId
1622
+ sourceChainId,
1623
+ topTokens
1579
1624
  );
1580
1625
  if (!sourceTokenAddress) {
1581
1626
  setLiquidityHelper({ kind: "idle" });
@@ -1616,7 +1661,8 @@ function DepositAddressStep({
1616
1661
  sourceTokenSymbol,
1617
1662
  targetChain,
1618
1663
  targetToken,
1619
- service
1664
+ service,
1665
+ topTokens
1620
1666
  ]);
1621
1667
  const displayAddress = isSolana && solanaDepositAddress ? solanaDepositAddress : smartAccount;
1622
1668
  _react.useEffect.call(void 0, () => {
@@ -1624,8 +1670,8 @@ function DepositAddressStep({
1624
1670
  function handlePointerDown(event) {
1625
1671
  const target = event.target;
1626
1672
  if (!target) return;
1627
- const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _55 => _55.current, 'optionalAccess', _56 => _56.contains, 'call', _57 => _57(target)]);
1628
- const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _58 => _58.current, 'optionalAccess', _59 => _59.contains, 'call', _60 => _60(target)]);
1673
+ const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _64 => _64.current, 'optionalAccess', _65 => _65.contains, 'call', _66 => _66(target)]);
1674
+ const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _67 => _67.current, 'optionalAccess', _68 => _68.contains, 'call', _69 => _69(target)]);
1629
1675
  if (clickedChainDropdown || clickedTokenDropdown) return;
1630
1676
  setChainDropdownOpen(false);
1631
1677
  setTokenDropdownOpen(false);
@@ -1638,7 +1684,7 @@ function DepositAddressStep({
1638
1684
  };
1639
1685
  }, [chainDropdownOpen, tokenDropdownOpen]);
1640
1686
  const handleCopy = _react.useCallback.call(void 0, async () => {
1641
- _optionalChain([onCopyAddress, 'optionalCall', _61 => _61()]);
1687
+ _optionalChain([onCopyAddress, 'optionalCall', _70 => _70()]);
1642
1688
  try {
1643
1689
  await navigator.clipboard.writeText(displayAddress);
1644
1690
  setCopied(true);
@@ -1658,14 +1704,18 @@ function DepositAddressStep({
1658
1704
  }, [displayAddress, onCopyAddress]);
1659
1705
  const handleSelectChain = _react.useCallback.call(void 0,
1660
1706
  (nextChain) => {
1661
- const nextTokens = computeTokensForChain(nextChain, allowedTokenSet);
1707
+ const nextTokens = computeTokensForChain(
1708
+ nextChain,
1709
+ allowedTokenSet,
1710
+ topTokens
1711
+ );
1662
1712
  setSourceChainId(nextChain);
1663
1713
  setSourceTokenSymbol(pickFallbackToken(nextTokens, sourceTokenSymbol));
1664
1714
  setChainDropdownOpen(false);
1665
1715
  setTokenDropdownOpen(false);
1666
1716
  setCopied(false);
1667
1717
  },
1668
- [allowedTokenSet, sourceTokenSymbol]
1718
+ [allowedTokenSet, sourceTokenSymbol, topTokens]
1669
1719
  );
1670
1720
  const onDepositSubmittedRef = _react.useRef.call(void 0, onDepositSubmitted);
1671
1721
  onDepositSubmittedRef.current = onDepositSubmitted;
@@ -1717,10 +1767,10 @@ function DepositAddressStep({
1717
1767
  return;
1718
1768
  }
1719
1769
  const event = status.lastEvent;
1720
- const eventTxHash = _chunkVPWWFWZTcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkVPWWFWZTcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
1770
+ const eventTxHash = _chunkUN6MEOOAcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkUN6MEOOAcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
1721
1771
  if (baselineTxHashRef.current === void 0) {
1722
1772
  baselineTxHashRef.current = eventTxHash;
1723
- } else if (eventTxHash && (!baselineTxHashRef.current || !_chunkVPWWFWZTcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
1773
+ } else if (eventTxHash && (!baselineTxHashRef.current || !_chunkUN6MEOOAcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
1724
1774
  const details = getDepositEventDetails(event);
1725
1775
  const chainId = _nullishCoalesce(details.chainId, () => ( "unknown"));
1726
1776
  const amount = _nullishCoalesce(details.amount, () => ( "0"));
@@ -1729,7 +1779,7 @@ function DepositAddressStep({
1729
1779
  baselineTxHashRef.current = eventTxHash;
1730
1780
  isTrackingRef.current = true;
1731
1781
  const isEvmToken = token ? /^0x[a-fA-F0-9]{40}$/.test(token) : false;
1732
- const sourceDecimals = _nullishCoalesce(details.sourceDecimals, () => ( (isEvmToken ? _chunkABVRVW3Pcjs.findTokenDecimals.call(void 0,
1782
+ const sourceDecimals = _nullishCoalesce(details.sourceDecimals, () => ( (isEvmToken ? _chunkHH46H6ZIcjs.findTokenDecimals.call(void 0,
1733
1783
  token,
1734
1784
  typeof chainId === "number" ? chainId : void 0
1735
1785
  ) : void 0)));
@@ -1752,7 +1802,7 @@ function DepositAddressStep({
1752
1802
  directTransfer
1753
1803
  };
1754
1804
  setNotifications((prev) => [notification, ...prev]);
1755
- _optionalChain([onDepositSubmittedRef, 'access', _62 => _62.current, 'optionalCall', _63 => _63({
1805
+ _optionalChain([onDepositSubmittedRef, 'access', _71 => _71.current, 'optionalCall', _72 => _72({
1756
1806
  txHash: eventTxHash,
1757
1807
  sourceChain: chainId,
1758
1808
  amount,
@@ -1764,7 +1814,7 @@ function DepositAddressStep({
1764
1814
  if (!cancelled) {
1765
1815
  const msg = err instanceof Error ? err.message : "Failed to check status";
1766
1816
  setPollingError(msg);
1767
- _optionalChain([onErrorRef, 'access', _64 => _64.current, 'optionalCall', _65 => _65(msg, "STATUS_POLL_ERROR")]);
1817
+ _optionalChain([onErrorRef, 'access', _73 => _73.current, 'optionalCall', _74 => _74(msg, "STATUS_POLL_ERROR")]);
1768
1818
  }
1769
1819
  }
1770
1820
  if (!cancelled) {
@@ -1780,24 +1830,24 @@ function DepositAddressStep({
1780
1830
  const handleNotificationComplete = _react.useCallback.call(void 0,
1781
1831
  (txHash, destinationTxHash, context) => {
1782
1832
  isTrackingRef.current = false;
1783
- _optionalChain([onDepositCompleteRef, 'access', _66 => _66.current, 'optionalCall', _67 => _67(txHash, destinationTxHash, context)]);
1833
+ _optionalChain([onDepositCompleteRef, 'access', _75 => _75.current, 'optionalCall', _76 => _76(txHash, destinationTxHash, context)]);
1784
1834
  },
1785
1835
  []
1786
1836
  );
1787
1837
  const handleNotificationFailed = _react.useCallback.call(void 0,
1788
1838
  (txHash, error) => {
1789
1839
  isTrackingRef.current = false;
1790
- _optionalChain([onDepositFailedRef, 'access', _68 => _68.current, 'optionalCall', _69 => _69(txHash, error)]);
1840
+ _optionalChain([onDepositFailedRef, 'access', _77 => _77.current, 'optionalCall', _78 => _78(txHash, error)]);
1791
1841
  },
1792
1842
  []
1793
1843
  );
1794
1844
  const handleNotificationDismiss = _react.useCallback.call(void 0, (id) => {
1795
1845
  setNotifications((prev) => prev.filter((n) => n.id !== id));
1796
1846
  }, []);
1797
- const qrIconSrc = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, sourceChainId);
1847
+ const qrIconSrc = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, sourceChainId);
1798
1848
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-step--with-notifications", children: [
1799
1849
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
1800
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
1850
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
1801
1851
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
1802
1852
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
1803
1853
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
@@ -1812,16 +1862,16 @@ function DepositAddressStep({
1812
1862
  setTokenDropdownOpen(false);
1813
1863
  },
1814
1864
  children: [
1815
- _chunkABVRVW3Pcjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1865
+ _chunkHH46H6ZIcjs.getChainIcon.call(void 0, sourceChainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1816
1866
  "img",
1817
1867
  {
1818
- src: _chunkABVRVW3Pcjs.getChainIcon.call(void 0, sourceChainId),
1868
+ src: _chunkHH46H6ZIcjs.getChainIcon.call(void 0, sourceChainId),
1819
1869
  alt: "",
1820
1870
  className: "rs-deposit-address-dropdown-icon"
1821
1871
  }
1822
1872
  ),
1823
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkABVRVW3Pcjs.getChainName.call(void 0, sourceChainId) }),
1824
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
1873
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainLabel(sourceChainId) }),
1874
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
1825
1875
  ]
1826
1876
  }
1827
1877
  ),
@@ -1832,15 +1882,15 @@ function DepositAddressStep({
1832
1882
  className: `rs-deposit-address-dropdown-item ${chainId === sourceChainId ? "rs-deposit-address-dropdown-item--active" : ""}`,
1833
1883
  onClick: () => handleSelectChain(chainId),
1834
1884
  children: [
1835
- _chunkABVRVW3Pcjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1885
+ _chunkHH46H6ZIcjs.getChainIcon.call(void 0, chainId) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1836
1886
  "img",
1837
1887
  {
1838
- src: _chunkABVRVW3Pcjs.getChainIcon.call(void 0, chainId),
1888
+ src: _chunkHH46H6ZIcjs.getChainIcon.call(void 0, chainId),
1839
1889
  alt: "",
1840
1890
  className: "rs-deposit-address-dropdown-icon"
1841
1891
  }
1842
1892
  ),
1843
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkABVRVW3Pcjs.getChainName.call(void 0, chainId) })
1893
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainLabel(chainId) })
1844
1894
  ]
1845
1895
  },
1846
1896
  String(chainId)
@@ -1851,9 +1901,9 @@ function DepositAddressStep({
1851
1901
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
1852
1902
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
1853
1903
  "Min.$",
1854
- (targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkABVRVW3Pcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _70 => _70.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _71 => _71.minDepositUsd]), () => ( 0.1))).toFixed(2),
1855
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1856
- _chunkVPWWFWZTcjs.InfoIcon,
1904
+ (targetChain === _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkHH46H6ZIcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _79 => _79.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _80 => _80.minDepositUsd]), () => ( 0.1))).toFixed(2),
1905
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1906
+ _chunkUN6MEOOAcjs.InfoIcon,
1857
1907
  {
1858
1908
  className: "rs-deposit-address-min-icon",
1859
1909
  "aria-hidden": "true"
@@ -1872,16 +1922,9 @@ function DepositAddressStep({
1872
1922
  setChainDropdownOpen(false);
1873
1923
  },
1874
1924
  children: [
1875
- _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceTokenSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1876
- "img",
1877
- {
1878
- src: _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceTokenSymbol),
1879
- alt: "",
1880
- className: "rs-deposit-address-dropdown-icon"
1881
- }
1882
- ),
1925
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenGlyph, { symbol: sourceTokenSymbol }),
1883
1926
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceTokenSymbol }),
1884
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
1927
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
1885
1928
  ]
1886
1929
  }
1887
1930
  ),
@@ -1895,14 +1938,7 @@ function DepositAddressStep({
1895
1938
  setTokenDropdownOpen(false);
1896
1939
  },
1897
1940
  children: [
1898
- _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1899
- "img",
1900
- {
1901
- src: _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, symbol),
1902
- alt: "",
1903
- className: "rs-deposit-address-dropdown-icon"
1904
- }
1905
- ),
1941
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenGlyph, { symbol }),
1906
1942
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: symbol })
1907
1943
  ]
1908
1944
  },
@@ -1932,7 +1968,7 @@ function DepositAddressStep({
1932
1968
  className: "rs-deposit-address-copy",
1933
1969
  onClick: handleCopy,
1934
1970
  children: [
1935
- copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CopyIcon, {}),
1971
+ copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CopyIcon, {}),
1936
1972
  copied ? "Copied!" : "Copy address"
1937
1973
  ]
1938
1974
  }
@@ -1940,7 +1976,7 @@ function DepositAddressStep({
1940
1976
  ]
1941
1977
  }
1942
1978
  ),
1943
- targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "warning", children: "HyperCore's first deposit to a new account includes a ~1 USDC activation fee \u2014 send at least 1 USDC or it will fail." }),
1979
+ targetChain === _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "warning", children: "HyperCore's first deposit to a new account includes a ~1 USDC activation fee \u2014 send at least 1 USDC or it will fail." }),
1944
1980
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1945
1981
  "div",
1946
1982
  {
@@ -1958,16 +1994,16 @@ function DepositAddressStep({
1958
1994
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
1959
1995
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
1960
1996
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1961
- _chunkVPWWFWZTcjs.Tooltip,
1997
+ _chunkUN6MEOOAcjs.Tooltip,
1962
1998
  {
1963
1999
  className: "rs-price-impact-info",
1964
2000
  content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
1965
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.InfoIcon, { "aria-hidden": "true" })
2001
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.InfoIcon, { "aria-hidden": "true" })
1966
2002
  }
1967
2003
  )
1968
2004
  ] }),
1969
2005
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1970
- _chunkVPWWFWZTcjs.ChevronDownIcon,
2006
+ _chunkUN6MEOOAcjs.ChevronDownIcon,
1971
2007
  {
1972
2008
  className: "rs-price-impact-chevron",
1973
2009
  "aria-hidden": "true"
@@ -1978,29 +2014,29 @@ function DepositAddressStep({
1978
2014
  ),
1979
2015
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-panel-inner", children: [
1980
2016
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
1981
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PercentIcon, {}) }),
2017
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PercentIcon, {}) }),
1982
2018
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
1983
2019
  "Max slippage: ",
1984
2020
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.2%" })
1985
2021
  ] }),
1986
2022
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1987
- _chunkVPWWFWZTcjs.Tooltip,
2023
+ _chunkUN6MEOOAcjs.Tooltip,
1988
2024
  {
1989
2025
  className: "rs-price-impact-info",
1990
2026
  content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
1991
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.InfoIcon, { "aria-hidden": "true" })
2027
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.InfoIcon, { "aria-hidden": "true" })
1992
2028
  }
1993
2029
  )
1994
2030
  ] }),
1995
2031
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
1996
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ClockIcon, {}) }),
2032
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ClockIcon, {}) }),
1997
2033
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
1998
2034
  "Processing time: ",
1999
2035
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "< 1 min" })
2000
2036
  ] })
2001
2037
  ] }),
2002
2038
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
2003
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PlusCircleIcon, {}) }),
2039
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PlusCircleIcon, {}) }),
2004
2040
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
2005
2041
  "Max deposit:",
2006
2042
  " ",
@@ -2031,7 +2067,7 @@ function DepositAddressStep({
2031
2067
  },
2032
2068
  deposit.id
2033
2069
  )) }),
2034
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
2070
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2035
2071
  ] });
2036
2072
  }
2037
2073
  DepositAddressStep.displayName = "DepositAddressStep";
@@ -2079,7 +2115,7 @@ function FinalisingDepositStep() {
2079
2115
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
2080
2116
  ] })
2081
2117
  ] }),
2082
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
2118
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2083
2119
  ] });
2084
2120
  }
2085
2121
  FinalisingDepositStep.displayName = "FinalisingDepositStep";
@@ -2109,7 +2145,7 @@ function SwappedOrderTracker({
2109
2145
  ];
2110
2146
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-swapped-tracker", children: [
2111
2147
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
2112
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.HandCoinsIcon, {}), title }),
2148
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.HandCoinsIcon, {}), title }),
2113
2149
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
2114
2150
  const status = stepStates[idx];
2115
2151
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -2123,7 +2159,7 @@ function SwappedOrderTracker({
2123
2159
  {
2124
2160
  className: "rs-swapped-tracker-step-marker",
2125
2161
  "aria-hidden": "true",
2126
- children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Spinner, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2162
+ children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2127
2163
  "svg",
2128
2164
  {
2129
2165
  className: "rs-swapped-tracker-step-ring",
@@ -2158,7 +2194,7 @@ function SwappedOrderTracker({
2158
2194
  }
2159
2195
  )
2160
2196
  ] }),
2161
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
2197
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2162
2198
  ] });
2163
2199
  }
2164
2200
  function formatTrackerAmount(amount) {
@@ -2176,6 +2212,7 @@ var DEPOSIT_POLL_INTERVAL_MS = 2e3;
2176
2212
  var DEPOSIT_POLL_FAST_INITIAL_DELAY_MS = 1e3;
2177
2213
  var DEPOSIT_POLL_FAST_INTERVAL_MS = 500;
2178
2214
  var IFRAME_LOAD_TIMEOUT_MS = 15e3;
2215
+ var SWAPPED_SUCCESS_HANDOFF_DELAY_MS = 1400;
2179
2216
  var SWAPPED_IFRAME_ORIGINS = new Set(SWAPPED_ORIGINS);
2180
2217
  var SWAPPED_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
2181
2218
  "order_completed",
@@ -2244,7 +2281,8 @@ function SwappedIframeStep({
2244
2281
  onSwappedFailed,
2245
2282
  onClose,
2246
2283
  onGoBack,
2247
- onError
2284
+ onError,
2285
+ onImmersiveChange
2248
2286
  }) {
2249
2287
  const [widgetUrl, setWidgetUrl] = _react.useState.call(void 0, null);
2250
2288
  const [loadError, setLoadError] = _react.useState.call(void 0, null);
@@ -2256,6 +2294,7 @@ function SwappedIframeStep({
2256
2294
  const iframeRef = _react.useRef.call(void 0, null);
2257
2295
  const completeFiredRef = _react.useRef.call(void 0, false);
2258
2296
  const failedFiredRef = _react.useRef.call(void 0, false);
2297
+ const completeTimeoutRef = _react.useRef.call(void 0, null);
2259
2298
  const expectedOrderUuidRef = _react.useRef.call(void 0, null);
2260
2299
  const expectedExternalCustomerIdRef = _react.useRef.call(void 0, null);
2261
2300
  const baselineDepositTxHashRef = _react.useRef.call(void 0, void 0);
@@ -2272,6 +2311,8 @@ function SwappedIframeStep({
2272
2311
  onErrorRef.current = onError;
2273
2312
  const onGoBackRef = _react.useRef.call(void 0, onGoBack);
2274
2313
  onGoBackRef.current = onGoBack;
2314
+ const onImmersiveChangeRef = _react.useRef.call(void 0, onImmersiveChange);
2315
+ onImmersiveChangeRef.current = onImmersiveChange;
2275
2316
  const loadUrlRef = _react.useRef.call(void 0, loadUrl);
2276
2317
  loadUrlRef.current = loadUrl;
2277
2318
  _react.useEffect.call(void 0, () => {
@@ -2282,6 +2323,10 @@ function SwappedIframeStep({
2282
2323
  setOrderState(null);
2283
2324
  setLatestEvent(null);
2284
2325
  setPhase("iframe");
2326
+ if (completeTimeoutRef.current !== null) {
2327
+ clearTimeout(completeTimeoutRef.current);
2328
+ completeTimeoutRef.current = null;
2329
+ }
2285
2330
  expectedOrderUuidRef.current = null;
2286
2331
  expectedExternalCustomerIdRef.current = null;
2287
2332
  completeFiredRef.current = false;
@@ -2299,10 +2344,14 @@ function SwappedIframeStep({
2299
2344
  if (cancelled) return;
2300
2345
  const message = err instanceof Error ? err.message : loadErrorFallback;
2301
2346
  setLoadError(message);
2302
- _optionalChain([onErrorRef, 'access', _72 => _72.current, 'optionalCall', _73 => _73(message, loadErrorCode)]);
2347
+ _optionalChain([onErrorRef, 'access', _81 => _81.current, 'optionalCall', _82 => _82(message, loadErrorCode)]);
2303
2348
  });
2304
2349
  return () => {
2305
2350
  cancelled = true;
2351
+ if (completeTimeoutRef.current !== null) {
2352
+ clearTimeout(completeTimeoutRef.current);
2353
+ completeTimeoutRef.current = null;
2354
+ }
2306
2355
  };
2307
2356
  }, [service, smartAccount, retryToken, loadErrorCode, loadErrorFallback]);
2308
2357
  _react.useEffect.call(void 0, () => {
@@ -2345,10 +2394,10 @@ function SwappedIframeStep({
2345
2394
  const status = await service.fetchLatestStatus(smartAccount);
2346
2395
  if (cancelled) return;
2347
2396
  const event = status.lastEvent;
2348
- const eventTxHash = _chunkVPWWFWZTcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkVPWWFWZTcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
2397
+ const eventTxHash = _chunkUN6MEOOAcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkUN6MEOOAcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
2349
2398
  if (baselineDepositTxHashRef.current === void 0) {
2350
2399
  baselineDepositTxHashRef.current = eventTxHash;
2351
- } else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunkVPWWFWZTcjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
2400
+ } else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunkUN6MEOOAcjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
2352
2401
  currentDepositTxHashRef.current = eventTxHash;
2353
2402
  setLatestEvent(_nullishCoalesce(event, () => ( null)));
2354
2403
  }
@@ -2373,15 +2422,15 @@ function SwappedIframeStep({
2373
2422
  }, [service, smartAccount]);
2374
2423
  _react.useEffect.call(void 0, () => {
2375
2424
  if (fastDepositPollEnabledRef.current) return;
2376
- const status = _optionalChain([orderState, 'optionalAccess', _74 => _74.status]);
2425
+ const status = _optionalChain([orderState, 'optionalAccess', _83 => _83.status]);
2377
2426
  if (!status || !SWAPPED_TERMINAL_STATUSES.has(status)) return;
2378
2427
  fastDepositPollEnabledRef.current = true;
2379
- _optionalChain([rescheduleDepositPollRef, 'access', _75 => _75.current, 'optionalCall', _76 => _76(DEPOSIT_POLL_FAST_INITIAL_DELAY_MS)]);
2428
+ _optionalChain([rescheduleDepositPollRef, 'access', _84 => _84.current, 'optionalCall', _85 => _85(DEPOSIT_POLL_FAST_INITIAL_DELAY_MS)]);
2380
2429
  }, [orderState]);
2381
2430
  _react.useEffect.call(void 0, () => {
2382
2431
  function onMessage(e) {
2383
2432
  if (!SWAPPED_IFRAME_ORIGINS.has(e.origin)) return;
2384
- if (e.source !== _optionalChain([iframeRef, 'access', _77 => _77.current, 'optionalAccess', _78 => _78.contentWindow])) return;
2433
+ if (e.source !== _optionalChain([iframeRef, 'access', _86 => _86.current, 'optionalAccess', _87 => _87.contentWindow])) return;
2385
2434
  if (isSwappedGoBackMessage(e.data)) {
2386
2435
  onGoBackRef.current();
2387
2436
  return;
@@ -2396,38 +2445,39 @@ function SwappedIframeStep({
2396
2445
  setOrderState((prev) => ({
2397
2446
  // Normalise to the uuid the backend poll also keys on, so orderState
2398
2447
  // is consistent regardless of which path set it.
2399
- orderId: _nullishCoalesce(_nullishCoalesce(expectedOrderUuidRef.current, () => ( _optionalChain([prev, 'optionalAccess', _79 => _79.orderId]))), () => ( ext)),
2448
+ orderId: _nullishCoalesce(_nullishCoalesce(expectedOrderUuidRef.current, () => ( _optionalChain([prev, 'optionalAccess', _88 => _88.orderId]))), () => ( ext)),
2400
2449
  status: parsed.status,
2401
- orderCrypto: _nullishCoalesce(_nullishCoalesce(parsed.orderCrypto, () => ( _optionalChain([prev, 'optionalAccess', _80 => _80.orderCrypto]))), () => ( null)),
2402
- orderCryptoAmount: _nullishCoalesce(_nullishCoalesce(parsed.orderCryptoAmount, () => ( _optionalChain([prev, 'optionalAccess', _81 => _81.orderCryptoAmount]))), () => ( null)),
2403
- transactionId: _nullishCoalesce(_nullishCoalesce(parsed.transactionId, () => ( _optionalChain([prev, 'optionalAccess', _82 => _82.transactionId]))), () => ( null)),
2450
+ orderCrypto: _nullishCoalesce(_nullishCoalesce(parsed.orderCrypto, () => ( _optionalChain([prev, 'optionalAccess', _89 => _89.orderCrypto]))), () => ( null)),
2451
+ orderCryptoAmount: _nullishCoalesce(_nullishCoalesce(parsed.orderCryptoAmount, () => ( _optionalChain([prev, 'optionalAccess', _90 => _90.orderCryptoAmount]))), () => ( null)),
2452
+ transactionId: _nullishCoalesce(_nullishCoalesce(parsed.transactionId, () => ( _optionalChain([prev, 'optionalAccess', _91 => _91.transactionId]))), () => ( null)),
2404
2453
  receivedAt: (/* @__PURE__ */ new Date()).toISOString(),
2405
- paidAmountUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _83 => _83.paidAmountUsd]), () => ( null)),
2406
- paidAmountEur: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _84 => _84.paidAmountEur]), () => ( null)),
2407
- onrampFeeUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _85 => _85.onrampFeeUsd]), () => ( null)),
2408
- paymentMethod: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _86 => _86.paymentMethod]), () => ( null))
2454
+ paidAmountUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _92 => _92.paidAmountUsd]), () => ( null)),
2455
+ paidAmountEur: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _93 => _93.paidAmountEur]), () => ( null)),
2456
+ onrampFeeUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _94 => _94.onrampFeeUsd]), () => ( null)),
2457
+ paymentMethod: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _95 => _95.paymentMethod]), () => ( null))
2409
2458
  }));
2410
2459
  }
2411
2460
  window.addEventListener("message", onMessage);
2412
2461
  return () => window.removeEventListener("message", onMessage);
2413
2462
  }, []);
2414
2463
  _react.useEffect.call(void 0, () => {
2415
- if (phase === "iframe" && (orderState !== null || latestEvent !== null)) {
2464
+ const swappedProvesLive = orderState !== null && !(variant === "fiat" && orderState.status === "payment_pending");
2465
+ if (phase === "iframe" && (swappedProvesLive || latestEvent !== null)) {
2416
2466
  setPhase("tracker");
2417
2467
  }
2418
- }, [phase, orderState, latestEvent]);
2468
+ }, [phase, orderState, latestEvent, variant]);
2419
2469
  const stepStates = _react.useMemo.call(void 0,
2420
- () => deriveStepStates(_nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _87 => _87.status]), () => ( null)), latestEvent),
2470
+ () => deriveStepStates(_nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _96 => _96.status]), () => ( null)), latestEvent),
2421
2471
  [orderState, latestEvent]
2422
2472
  );
2423
2473
  const terminalState = _react.useMemo.call(void 0, () => {
2424
- if (_chunkVPWWFWZTcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
2474
+ if (_chunkUN6MEOOAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
2425
2475
  return {
2426
2476
  kind: "failed",
2427
- message: _chunkVPWWFWZTcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
2477
+ message: _chunkUN6MEOOAcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
2428
2478
  };
2429
2479
  }
2430
- if (_optionalChain([orderState, 'optionalAccess', _88 => _88.status]) === "order_cancelled") {
2480
+ if (_optionalChain([orderState, 'optionalAccess', _97 => _97.status]) === "order_cancelled") {
2431
2481
  const banner = bannerForStatus("order_cancelled", {});
2432
2482
  return { kind: "cancelled", message: _nullishCoalesce(banner.detail, () => ( banner.title)) };
2433
2483
  }
@@ -2435,33 +2485,44 @@ function SwappedIframeStep({
2435
2485
  }, [latestEvent, orderState, bannerForStatus]);
2436
2486
  _react.useEffect.call(void 0, () => {
2437
2487
  if (completeFiredRef.current || failedFiredRef.current) return;
2438
- const t = _optionalChain([latestEvent, 'optionalAccess', _89 => _89.type]);
2488
+ const t = _optionalChain([latestEvent, 'optionalAccess', _98 => _98.type]);
2439
2489
  const isSuccess = t === "bridge-complete";
2440
2490
  if (!isSuccess) return;
2441
2491
  const txHash = currentDepositTxHashRef.current;
2442
2492
  if (!txHash) return;
2443
2493
  completeFiredRef.current = true;
2444
- onSwappedCompleteRef.current({
2494
+ const info = {
2495
+ smartAccount,
2445
2496
  txHash,
2446
- orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _90 => _90.orderCrypto]), () => ( null)),
2497
+ orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _99 => _99.orderCrypto]), () => ( null)),
2447
2498
  // Base-unit source amount from the deposit row/event, consistent with the
2448
2499
  // wallet/QR path. ProcessingStep + onLifecycle expect base units.
2449
- amount: _nullishCoalesce(_chunkVPWWFWZTcjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null)),
2500
+ amount: _nullishCoalesce(_chunkUN6MEOOAcjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null)),
2501
+ expectedOrderUuid: expectedOrderUuidRef.current,
2450
2502
  initialEvent: _nullishCoalesce(latestEvent, () => ( void 0))
2451
- });
2452
- }, [latestEvent, orderState]);
2503
+ };
2504
+ completeTimeoutRef.current = setTimeout(() => {
2505
+ completeTimeoutRef.current = null;
2506
+ onSwappedCompleteRef.current(info);
2507
+ }, SWAPPED_SUCCESS_HANDOFF_DELAY_MS);
2508
+ }, [latestEvent, orderState, smartAccount]);
2453
2509
  _react.useEffect.call(void 0, () => {
2454
2510
  if (failedFiredRef.current || completeFiredRef.current) return;
2455
- if (!_chunkVPWWFWZTcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
2511
+ if (!_chunkUN6MEOOAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
2456
2512
  const txHash = currentDepositTxHashRef.current;
2457
2513
  if (!txHash) return;
2458
2514
  failedFiredRef.current = true;
2459
2515
  setPhase("tracker");
2460
- _optionalChain([onSwappedFailedRef, 'access', _91 => _91.current, 'optionalCall', _92 => _92(
2516
+ _optionalChain([onSwappedFailedRef, 'access', _100 => _100.current, 'optionalCall', _101 => _101(
2461
2517
  txHash,
2462
- _chunkVPWWFWZTcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
2518
+ _chunkUN6MEOOAcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
2463
2519
  )]);
2464
2520
  }, [latestEvent]);
2521
+ const immersive = variant === "fiat" && phase === "iframe" && !loadError;
2522
+ _react.useEffect.call(void 0, () => {
2523
+ _optionalChain([onImmersiveChangeRef, 'access', _102 => _102.current, 'optionalCall', _103 => _103(immersive)]);
2524
+ }, [immersive]);
2525
+ _react.useEffect.call(void 0, () => () => _optionalChain([onImmersiveChangeRef, 'access', _104 => _104.current, 'optionalCall', _105 => _105(false)]), []);
2465
2526
  if (phase === "tracker") {
2466
2527
  const paymentReceived = stepStates[0] === "complete";
2467
2528
  if (variant === "connect" && !terminalState && paymentReceived) {
@@ -2470,8 +2531,8 @@ function SwappedIframeStep({
2470
2531
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2471
2532
  SwappedOrderTracker,
2472
2533
  {
2473
- amount: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _93 => _93.orderCryptoAmount]), () => ( null)),
2474
- currency: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _94 => _94.orderCrypto]), () => ( "USDC")),
2534
+ amount: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _106 => _106.orderCryptoAmount]), () => ( null)),
2535
+ currency: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _107 => _107.orderCrypto]), () => ( "USDC")),
2475
2536
  stepStates,
2476
2537
  terminal: terminalState,
2477
2538
  onRetry: () => setRetryToken((n) => n + 1),
@@ -2493,7 +2554,7 @@ function SwappedIframeStep({
2493
2554
  }
2494
2555
  )
2495
2556
  ] }),
2496
- !loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Spinner, {}) }),
2557
+ !loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, {}) }),
2497
2558
  widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2498
2559
  "iframe",
2499
2560
  {
@@ -2508,21 +2569,21 @@ function SwappedIframeStep({
2508
2569
  retryToken
2509
2570
  )
2510
2571
  ] }) }),
2511
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
2572
+ loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2512
2573
  ] });
2513
2574
  }
2514
2575
  function deriveStepStates(swappedStatus, latestEvent) {
2515
- if (_chunkVPWWFWZTcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
2576
+ if (_chunkUN6MEOOAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
2516
2577
  return ["complete", "complete", "failed", "pending"];
2517
2578
  }
2518
2579
  if (swappedStatus === "order_cancelled") {
2519
2580
  return ["failed", "pending", "pending", "pending"];
2520
2581
  }
2521
2582
  const step1Complete = swappedStatus === "order_completed" || swappedStatus === "order_broadcasted";
2522
- const step2Complete = latestEvent !== null;
2523
- const step3Complete = _optionalChain([latestEvent, 'optionalAccess', _95 => _95.type]) === "bridge-complete";
2583
+ const step2Complete = latestEvent !== null || swappedStatus === "order_broadcasted";
2584
+ const step3Complete = _optionalChain([latestEvent, 'optionalAccess', _108 => _108.type]) === "bridge-complete";
2524
2585
  if (step3Complete) {
2525
- return ["complete", "complete", "complete", "pending"];
2586
+ return ["complete", "complete", "complete", "complete"];
2526
2587
  }
2527
2588
  if (step2Complete) {
2528
2589
  return ["complete", "complete", "active", "pending"];
@@ -2571,10 +2632,11 @@ function FiatOnrampStep({
2571
2632
  onSwappedFailed,
2572
2633
  onClose,
2573
2634
  onGoBack,
2574
- onError
2635
+ onError,
2636
+ onImmersiveChange
2575
2637
  }) {
2576
2638
  const loadUrl = _react.useCallback.call(void 0, async () => {
2577
- const prefetched = _optionalChain([consumePrefetchedUrl, 'optionalCall', _96 => _96(smartAccount, paymentMethod)]);
2639
+ const prefetched = _optionalChain([consumePrefetchedUrl, 'optionalCall', _109 => _109(smartAccount, paymentMethod)]);
2578
2640
  if (prefetched) {
2579
2641
  try {
2580
2642
  const cached = await prefetched;
@@ -2602,7 +2664,8 @@ function FiatOnrampStep({
2602
2664
  onSwappedFailed,
2603
2665
  onClose,
2604
2666
  onGoBack,
2605
- onError
2667
+ onError,
2668
+ onImmersiveChange
2606
2669
  }
2607
2670
  );
2608
2671
  }
@@ -2648,7 +2711,8 @@ function ExchangeConnectStep({
2648
2711
  onSwappedFailed,
2649
2712
  onClose,
2650
2713
  onGoBack,
2651
- onError
2714
+ onError,
2715
+ onImmersiveChange
2652
2716
  }) {
2653
2717
  const loadUrl = _react.useCallback.call(void 0, async () => {
2654
2718
  const res = await service.getSwappedConnectUrl({
@@ -2672,7 +2736,8 @@ function ExchangeConnectStep({
2672
2736
  onSwappedFailed,
2673
2737
  onClose,
2674
2738
  onGoBack,
2675
- onError
2739
+ onError,
2740
+ onImmersiveChange
2676
2741
  }
2677
2742
  );
2678
2743
  }
@@ -2684,7 +2749,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
2684
2749
  function ExchangeLogo({ exchange }) {
2685
2750
  const [failed, setFailed] = _react.useState.call(void 0, false);
2686
2751
  if (!exchange.logoUrl || failed) {
2687
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BankIcon, {});
2752
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BankIcon, {});
2688
2753
  }
2689
2754
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2690
2755
  "img",
@@ -2719,7 +2784,7 @@ function ExchangeSelectStep({
2719
2784
  const message = err instanceof Error ? err.message : "Failed to load exchanges";
2720
2785
  setExchanges([]);
2721
2786
  setError(message);
2722
- _optionalChain([onError, 'optionalCall', _97 => _97(message, "SWAPPED_CONNECT_EXCHANGES_FAILED")]);
2787
+ _optionalChain([onError, 'optionalCall', _110 => _110(message, "SWAPPED_CONNECT_EXCHANGES_FAILED")]);
2723
2788
  }).finally(() => {
2724
2789
  if (!cancelled) setLoading(false);
2725
2790
  });
@@ -2730,14 +2795,14 @@ function ExchangeSelectStep({
2730
2795
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
2731
2796
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
2732
2797
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2733
- _chunkVPWWFWZTcjs.BodyHeader,
2798
+ _chunkUN6MEOOAcjs.BodyHeader,
2734
2799
  {
2735
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.UnplugIcon, {}),
2800
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.UnplugIcon, {}),
2736
2801
  title: "Connect exchange",
2737
2802
  subtitle: "Select an exchange to connect"
2738
2803
  }
2739
2804
  ),
2740
- loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Spinner, {}) }),
2805
+ loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, {}) }),
2741
2806
  !loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
2742
2807
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
2743
2808
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2763,7 +2828,7 @@ function ExchangeSelectStep({
2763
2828
  )
2764
2829
  ] }),
2765
2830
  !loading && !error && exchanges.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
2766
- const brand = _chunkVPWWFWZTcjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
2831
+ const brand = _chunkUN6MEOOAcjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
2767
2832
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2768
2833
  "button",
2769
2834
  {
@@ -2786,7 +2851,7 @@ function ExchangeSelectStep({
2786
2851
  );
2787
2852
  }) })
2788
2853
  ] }),
2789
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
2854
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2790
2855
  ] });
2791
2856
  }
2792
2857
  ExchangeSelectStep.displayName = "ExchangeSelectStep";
@@ -2798,25 +2863,25 @@ function DepositAddressSkeleton({
2798
2863
  uiConfig,
2799
2864
  allowedRoutes
2800
2865
  }) {
2801
- const allowedChainSet = _optionalChain([allowedRoutes, 'optionalAccess', _98 => _98.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null;
2802
- const allowedTokenSet = _optionalChain([allowedRoutes, 'optionalAccess', _99 => _99.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null;
2866
+ const allowedChainSet = _optionalChain([allowedRoutes, 'optionalAccess', _111 => _111.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null;
2867
+ const allowedTokenSet = _optionalChain([allowedRoutes, 'optionalAccess', _112 => _112.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null;
2803
2868
  const evmChainIds = (() => {
2804
- const all = _chunkABVRVW3Pcjs.getSupportedChainIds.call(void 0, );
2869
+ const all = _chunkHH46H6ZIcjs.getSupportedChainIds.call(void 0, );
2805
2870
  return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
2806
2871
  })();
2807
2872
  const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
2808
2873
  const tokensForChain = (() => {
2809
- const all = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain.call(void 0, defaultChainId);
2874
+ const all = _chunkHH46H6ZIcjs.getTargetTokenSymbolsForChain.call(void 0, defaultChainId);
2810
2875
  return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
2811
2876
  })();
2812
2877
  const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
2813
- const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, defaultChainId);
2814
- const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, defaultChainId);
2815
- const tokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, defaultToken);
2878
+ const chainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, defaultChainId);
2879
+ const chainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, defaultChainId);
2880
+ const tokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, defaultToken);
2816
2881
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
2817
2882
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
2818
2883
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
2819
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
2884
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
2820
2885
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
2821
2886
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
2822
2887
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
@@ -2830,7 +2895,7 @@ function DepositAddressSkeleton({
2830
2895
  }
2831
2896
  ),
2832
2897
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
2833
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2898
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2834
2899
  ] })
2835
2900
  ] }),
2836
2901
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
@@ -2838,9 +2903,9 @@ function DepositAddressSkeleton({
2838
2903
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
2839
2904
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
2840
2905
  "Min.$",
2841
- (_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _100 => _100.minDepositUsd]), () => ( 0.1))).toFixed(2),
2842
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2843
- _chunkVPWWFWZTcjs.InfoIcon,
2906
+ (_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _113 => _113.minDepositUsd]), () => ( 0.1))).toFixed(2),
2907
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2908
+ _chunkUN6MEOOAcjs.InfoIcon,
2844
2909
  {
2845
2910
  className: "rs-deposit-address-min-icon",
2846
2911
  "aria-hidden": "true"
@@ -2858,7 +2923,7 @@ function DepositAddressSkeleton({
2858
2923
  }
2859
2924
  ),
2860
2925
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
2861
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2926
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2862
2927
  ] })
2863
2928
  ] })
2864
2929
  ] }),
@@ -2879,7 +2944,7 @@ function DepositAddressSkeleton({
2879
2944
  disabled: true,
2880
2945
  "aria-hidden": "true",
2881
2946
  children: [
2882
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CopyIcon, {}),
2947
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CopyIcon, {}),
2883
2948
  "Copy address"
2884
2949
  ]
2885
2950
  }
@@ -2892,16 +2957,16 @@ function DepositAddressSkeleton({
2892
2957
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
2893
2958
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
2894
2959
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2895
- _chunkVPWWFWZTcjs.Tooltip,
2960
+ _chunkUN6MEOOAcjs.Tooltip,
2896
2961
  {
2897
2962
  className: "rs-price-impact-info",
2898
2963
  content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
2899
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.InfoIcon, { "aria-hidden": "true" })
2964
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.InfoIcon, { "aria-hidden": "true" })
2900
2965
  }
2901
2966
  )
2902
2967
  ] }),
2903
2968
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2904
- _chunkVPWWFWZTcjs.ChevronDownIcon,
2969
+ _chunkUN6MEOOAcjs.ChevronDownIcon,
2905
2970
  {
2906
2971
  className: "rs-price-impact-chevron",
2907
2972
  "aria-hidden": "true"
@@ -2909,7 +2974,7 @@ function DepositAddressSkeleton({
2909
2974
  )
2910
2975
  ] }) })
2911
2976
  ] }),
2912
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
2977
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2913
2978
  ] });
2914
2979
  }
2915
2980
  DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
@@ -2941,14 +3006,14 @@ function SolanaTokenSelectStep({
2941
3006
  setError(null);
2942
3007
  const portfolioBySymbol = {};
2943
3008
  try {
2944
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
3009
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
2945
3010
  solanaAddress
2946
3011
  });
2947
3012
  const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
2948
3013
  if (!active) return;
2949
3014
  for (const t of portfolio.tokens) {
2950
3015
  const symbol = t.symbol.toUpperCase();
2951
- if (!_chunkABVRVW3Pcjs.SOLANA_TOKENS.some((st) => st.symbol === symbol)) continue;
3016
+ if (!_chunkHH46H6ZIcjs.SOLANA_TOKENS.some((st) => st.symbol === symbol)) continue;
2952
3017
  let parsed = 0n;
2953
3018
  try {
2954
3019
  parsed = BigInt(t.balance || "0");
@@ -2964,12 +3029,12 @@ function SolanaTokenSelectStep({
2964
3029
  };
2965
3030
  }
2966
3031
  }
2967
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
3032
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
2968
3033
  symbols: Object.keys(portfolioBySymbol)
2969
3034
  });
2970
3035
  } catch (err) {
2971
3036
  if (!active) return;
2972
- _chunkVPWWFWZTcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
3037
+ _chunkUN6MEOOAcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
2973
3038
  solanaAddress
2974
3039
  });
2975
3040
  setError(
@@ -2980,7 +3045,7 @@ function SolanaTokenSelectStep({
2980
3045
  return;
2981
3046
  }
2982
3047
  const results = [];
2983
- for (const token of _chunkABVRVW3Pcjs.SOLANA_TOKENS) {
3048
+ for (const token of _chunkHH46H6ZIcjs.SOLANA_TOKENS) {
2984
3049
  const fromPortfolio = portfolioBySymbol[token.symbol];
2985
3050
  if (fromPortfolio && fromPortfolio.balance > 0n) {
2986
3051
  results.push({
@@ -2994,7 +3059,7 @@ function SolanaTokenSelectStep({
2994
3059
  setTokenBalances(results);
2995
3060
  setLoading(false);
2996
3061
  const totalUsd = results.reduce((sum, r) => sum + r.balanceUsd, 0);
2997
- _optionalChain([onTotalBalanceComputed, 'optionalCall', _101 => _101(totalUsd)]);
3062
+ _optionalChain([onTotalBalanceComputed, 'optionalCall', _114 => _114(totalUsd)]);
2998
3063
  }
2999
3064
  void loadBalances();
3000
3065
  return () => {
@@ -3016,30 +3081,30 @@ function SolanaTokenSelectStep({
3016
3081
  const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
3017
3082
  const numeric = Number(raw);
3018
3083
  if (!Number.isFinite(numeric)) return raw;
3019
- return _chunkVPWWFWZTcjs.tokenFormatter.format(numeric);
3084
+ return _chunkUN6MEOOAcjs.tokenFormatter.format(numeric);
3020
3085
  } catch (e22) {
3021
3086
  return "--";
3022
3087
  }
3023
3088
  };
3024
- const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, "solana");
3025
- const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, "solana");
3089
+ const chainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, "solana");
3090
+ const chainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, "solana");
3026
3091
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3027
3092
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
3028
3093
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3029
- _chunkVPWWFWZTcjs.BodyHeader,
3094
+ _chunkUN6MEOOAcjs.BodyHeader,
3030
3095
  {
3031
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}),
3096
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}),
3032
3097
  title: "Your assets",
3033
3098
  subtitle: "Select source assets to transfer"
3034
3099
  }
3035
3100
  ),
3036
3101
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
3037
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Spinner, { className: "rs-text-tertiary" }),
3102
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, { className: "rs-text-tertiary" }),
3038
3103
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
3039
3104
  ] }),
3040
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "error", children: error }),
3105
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
3041
3106
  !loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
3042
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, { className: "rs-empty-icon" }),
3107
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, { className: "rs-empty-icon" }),
3043
3108
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
3044
3109
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
3045
3110
  solanaAddress.slice(0, 6),
@@ -3059,7 +3124,7 @@ function SolanaTokenSelectStep({
3059
3124
  !loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((entry) => {
3060
3125
  const isSelected = selectedSymbol === entry.token.symbol;
3061
3126
  const tokenAmount = formatBalance(entry);
3062
- const tokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, entry.token.symbol);
3127
+ const tokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, entry.token.symbol);
3063
3128
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3064
3129
  "button",
3065
3130
  {
@@ -3088,14 +3153,14 @@ function SolanaTokenSelectStep({
3088
3153
  ] })
3089
3154
  ] })
3090
3155
  ] }),
3091
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkVPWWFWZTcjs.currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
3156
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkUN6MEOOAcjs.currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
3092
3157
  ]
3093
3158
  },
3094
3159
  entry.token.symbol
3095
3160
  );
3096
3161
  }) }),
3097
3162
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3098
- _chunkVPWWFWZTcjs.Button,
3163
+ _chunkUN6MEOOAcjs.Button,
3099
3164
  {
3100
3165
  onClick: () => selectedEntry && onContinue(
3101
3166
  selectedEntry.token,
@@ -3108,7 +3173,7 @@ function SolanaTokenSelectStep({
3108
3173
  }
3109
3174
  )
3110
3175
  ] }),
3111
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
3176
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3112
3177
  ] });
3113
3178
  }
3114
3179
 
@@ -3140,8 +3205,8 @@ function SolanaAmountStep({
3140
3205
  const [amount, setAmount] = _react.useState.call(void 0, "");
3141
3206
  const [error, setError] = _react.useState.call(void 0, null);
3142
3207
  const hasAppliedDefaultRef = _react.useRef.call(void 0, false);
3143
- const isSourceStablecoin = _chunkABVRVW3Pcjs.isStablecoinSymbol.call(void 0, token.symbol);
3144
- const isMaxDefault = _optionalChain([defaultAmount, 'optionalAccess', _102 => _102.trim, 'call', _103 => _103(), 'access', _104 => _104.toLowerCase, 'call', _105 => _105()]) === "max";
3208
+ const isSourceStablecoin = _chunkHH46H6ZIcjs.isStablecoinSymbol.call(void 0, token.symbol);
3209
+ const isMaxDefault = _optionalChain([defaultAmount, 'optionalAccess', _115 => _115.trim, 'call', _116 => _116(), 'access', _117 => _117.toLowerCase, 'call', _118 => _118()]) === "max";
3145
3210
  const tokenPriceUsd = _react.useMemo.call(void 0, () => {
3146
3211
  if (isSourceStablecoin) return 1;
3147
3212
  try {
@@ -3161,7 +3226,7 @@ function SolanaAmountStep({
3161
3226
  const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
3162
3227
  const numeric = Number(raw);
3163
3228
  if (!Number.isFinite(numeric)) return raw;
3164
- return _chunkVPWWFWZTcjs.tokenFormatter.format(numeric);
3229
+ return _chunkUN6MEOOAcjs.tokenFormatter.format(numeric);
3165
3230
  } catch (e24) {
3166
3231
  return "\u2026";
3167
3232
  }
@@ -3178,7 +3243,7 @@ function SolanaAmountStep({
3178
3243
  }
3179
3244
  }, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
3180
3245
  const spendableBalance = _react.useMemo.call(void 0, () => {
3181
- if (!_chunkABVRVW3Pcjs.isNativeSol.call(void 0, token)) return balance;
3246
+ if (!_chunkHH46H6ZIcjs.isNativeSol.call(void 0, token)) return balance;
3182
3247
  return balance > SOL_FEE_RESERVE_LAMPORTS ? balance - SOL_FEE_RESERVE_LAMPORTS : 0n;
3183
3248
  }, [balance, token]);
3184
3249
  const spendableBalanceUsd = _react.useMemo.call(void 0, () => {
@@ -3243,8 +3308,8 @@ function SolanaAmountStep({
3243
3308
  return null;
3244
3309
  }
3245
3310
  }, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, token.decimals]);
3246
- const minDepositUsd = targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkABVRVW3Pcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _106 => _106.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _107 => _107.minDepositUsd]), () => ( null));
3247
- const maxDepositUsd = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _108 => _108.maxDepositUsd]), () => ( null));
3311
+ const minDepositUsd = targetChain === _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID ? Math.max(_chunkHH46H6ZIcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _119 => _119.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _120 => _120.minDepositUsd]), () => ( null));
3312
+ const maxDepositUsd = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _121 => _121.maxDepositUsd]), () => ( null));
3248
3313
  const isBelowMin = minDepositUsd !== null && numericAmount > 0 && numericAmount < minDepositUsd;
3249
3314
  const isAboveMax = maxDepositUsd !== null && numericAmount > maxDepositUsd;
3250
3315
  const exceedsBalance = Boolean(
@@ -3254,7 +3319,7 @@ function SolanaAmountStep({
3254
3319
  const handlePresetClick = (percentage) => {
3255
3320
  const formatted = computePresetAmount(percentage);
3256
3321
  if (!formatted) return;
3257
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
3322
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
3258
3323
  percentage,
3259
3324
  symbol: token.symbol,
3260
3325
  formatted
@@ -3289,7 +3354,7 @@ function SolanaAmountStep({
3289
3354
  try {
3290
3355
  amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
3291
3356
  } catch (e29) {
3292
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
3357
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
3293
3358
  amount,
3294
3359
  sourceAmount: sourceAmountStr,
3295
3360
  reason: "parse-units-failed"
@@ -3298,13 +3363,13 @@ function SolanaAmountStep({
3298
3363
  return;
3299
3364
  }
3300
3365
  if (amountInUnits > spendableBalance) {
3301
- const isReserveIssue = _chunkABVRVW3Pcjs.isNativeSol.call(void 0, token) && amountInUnits <= balance;
3366
+ const isReserveIssue = _chunkHH46H6ZIcjs.isNativeSol.call(void 0, token) && amountInUnits <= balance;
3302
3367
  setError(
3303
3368
  isReserveIssue ? "Use a bit less than your full SOL balance" : "Insufficient balance"
3304
3369
  );
3305
3370
  return;
3306
3371
  }
3307
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
3372
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
3308
3373
  symbol: token.symbol,
3309
3374
  inputAmountUsd: amount,
3310
3375
  sourceAmount: sourceAmountStr,
@@ -3315,10 +3380,10 @@ function SolanaAmountStep({
3315
3380
  };
3316
3381
  const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
3317
3382
  const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
3318
- const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, token.symbol);
3383
+ const sourceTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, token.symbol);
3319
3384
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3320
3385
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3321
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}), title: "Wallet deposit" }),
3386
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}), title: "Wallet deposit" }),
3322
3387
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
3323
3388
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
3324
3389
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3338,13 +3403,13 @@ function SolanaAmountStep({
3338
3403
  " available",
3339
3404
  computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3340
3405
  " (~",
3341
- _chunkVPWWFWZTcjs.currencyFormatter.format(computedBalanceUsd),
3406
+ _chunkUN6MEOOAcjs.currencyFormatter.format(computedBalanceUsd),
3342
3407
  ")"
3343
3408
  ] })
3344
3409
  ] }),
3345
3410
  minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
3346
3411
  "Min. deposit ",
3347
- _chunkVPWWFWZTcjs.currencyFormatter.format(minDepositUsd)
3412
+ _chunkUN6MEOOAcjs.currencyFormatter.format(minDepositUsd)
3348
3413
  ] })
3349
3414
  ] })
3350
3415
  ] }),
@@ -3383,13 +3448,13 @@ function SolanaAmountStep({
3383
3448
  ] }),
3384
3449
  balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
3385
3450
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
3386
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkVPWWFWZTcjs.currencyFormatter.format(balanceAfterUsd) })
3451
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkUN6MEOOAcjs.currencyFormatter.format(balanceAfterUsd) })
3387
3452
  ] })
3388
3453
  ] }),
3389
- targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
3390
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "error", children: error }),
3454
+ targetChain === _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
3455
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
3391
3456
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3392
- _chunkVPWWFWZTcjs.Button,
3457
+ _chunkUN6MEOOAcjs.Button,
3393
3458
  {
3394
3459
  onClick: handleContinue,
3395
3460
  fullWidth: true,
@@ -3398,7 +3463,7 @@ function SolanaAmountStep({
3398
3463
  }
3399
3464
  )
3400
3465
  ] }),
3401
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
3466
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3402
3467
  ] });
3403
3468
  }
3404
3469
 
@@ -3421,10 +3486,10 @@ var _spltoken = require('@solana/spl-token');
3421
3486
  var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
3422
3487
  var cachedConnections = /* @__PURE__ */ new Map();
3423
3488
  function getSolanaRpcUrl(rpcUrls) {
3424
- return _nullishCoalesce(_chunkVPWWFWZTcjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
3489
+ return _nullishCoalesce(_chunkUN6MEOOAcjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
3425
3490
  }
3426
3491
  function hasConfiguredSolanaRpcUrl(rpcUrls) {
3427
- return _chunkVPWWFWZTcjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
3492
+ return _chunkUN6MEOOAcjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
3428
3493
  }
3429
3494
  function getSolanaConnection(rpcUrls) {
3430
3495
  const rpcUrl = getSolanaRpcUrl(rpcUrls);
@@ -3526,23 +3591,23 @@ function SolanaConfirmStep({
3526
3591
  onError,
3527
3592
  debug
3528
3593
  }) {
3529
- const rpcUrls = _chunkVPWWFWZTcjs.useRpcUrls.call(void 0, );
3594
+ const rpcUrls = _chunkUN6MEOOAcjs.useRpcUrls.call(void 0, );
3530
3595
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
3531
3596
  const [error, setError] = _react.useState.call(void 0, null);
3532
- const targetSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
3533
- const sourceChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, "solana");
3534
- const targetChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
3535
- const sourceChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, "solana");
3536
- const targetChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, targetChain);
3537
- const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, token.symbol);
3538
- const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
3539
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _109 => _109.feeSponsored]), () => ( false));
3540
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _110 => _110.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3541
- const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkVPWWFWZTcjs.formatTokenAmount.call(void 0, Number(sourceAmount), token.symbol), () => ( "0")) : "0";
3597
+ const targetSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
3598
+ const sourceChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, "solana");
3599
+ const targetChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChain);
3600
+ const sourceChainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, "solana");
3601
+ const targetChainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, targetChain);
3602
+ const sourceTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, token.symbol);
3603
+ const targetTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, targetSymbol);
3604
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _122 => _122.feeSponsored]), () => ( false));
3605
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _123 => _123.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3606
+ const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkUN6MEOOAcjs.formatTokenAmount.call(void 0, Number(sourceAmount), token.symbol), () => ( "0")) : "0";
3542
3607
  const receiveDisplay = (() => {
3543
3608
  const usdValue = Number(targetAmount);
3544
3609
  const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
3545
- const estimate = _chunkVPWWFWZTcjs.formatReceiveEstimate.call(void 0, {
3610
+ const estimate = _chunkUN6MEOOAcjs.formatReceiveEstimate.call(void 0, {
3546
3611
  sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
3547
3612
  sourceSymbol: token.symbol,
3548
3613
  targetSymbol,
@@ -3554,7 +3619,7 @@ function SolanaConfirmStep({
3554
3619
  })();
3555
3620
  const handleConfirm = async () => {
3556
3621
  if (!solanaProvider) {
3557
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3622
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3558
3623
  reason: "missing-provider"
3559
3624
  });
3560
3625
  setError("Solana wallet not connected");
@@ -3562,7 +3627,7 @@ function SolanaConfirmStep({
3562
3627
  }
3563
3628
  const parsedAmount = parseFloat(sourceAmount);
3564
3629
  if (isNaN(parsedAmount) || parsedAmount <= 0) {
3565
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3630
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3566
3631
  reason: "invalid-amount",
3567
3632
  sourceAmount
3568
3633
  });
@@ -3571,7 +3636,7 @@ function SolanaConfirmStep({
3571
3636
  }
3572
3637
  setError(null);
3573
3638
  setIsSubmitting(true);
3574
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
3639
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
3575
3640
  smartAccount,
3576
3641
  solanaAddress,
3577
3642
  solanaDepositAddress,
@@ -3581,7 +3646,7 @@ function SolanaConfirmStep({
3581
3646
  });
3582
3647
  try {
3583
3648
  const check = await service.checkAccount(smartAccount);
3584
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
3649
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
3585
3650
  smartAccount,
3586
3651
  isRegistered: check.isRegistered,
3587
3652
  targetChain: check.targetChain,
@@ -3594,12 +3659,12 @@ function SolanaConfirmStep({
3594
3659
  }
3595
3660
  const connection = hasConfiguredSolanaRpcUrl(rpcUrls) ? getSolanaConnection(rpcUrls) : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection(rpcUrls)));
3596
3661
  const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
3597
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
3662
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
3598
3663
  token: token.symbol,
3599
3664
  sourceAmount,
3600
3665
  amountUnits: amountUnits.toString()
3601
3666
  });
3602
- const transaction = _chunkABVRVW3Pcjs.isNativeSol.call(void 0, token) ? await buildSolTransferTransaction(
3667
+ const transaction = _chunkHH46H6ZIcjs.isNativeSol.call(void 0, token) ? await buildSolTransferTransaction(
3603
3668
  connection,
3604
3669
  solanaAddress,
3605
3670
  solanaDepositAddress,
@@ -3611,10 +3676,10 @@ function SolanaConfirmStep({
3611
3676
  token.mint,
3612
3677
  amountUnits
3613
3678
  );
3614
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
3679
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
3615
3680
  token: token.symbol,
3616
3681
  instructionCount: transaction.instructions.length,
3617
- feePayer: _optionalChain([transaction, 'access', _111 => _111.feePayer, 'optionalAccess', _112 => _112.toBase58, 'call', _113 => _113()]),
3682
+ feePayer: _optionalChain([transaction, 'access', _124 => _124.feePayer, 'optionalAccess', _125 => _125.toBase58, 'call', _126 => _126()]),
3618
3683
  recentBlockhash: transaction.recentBlockhash
3619
3684
  });
3620
3685
  const txHash = await sendSolanaTransaction(
@@ -3622,28 +3687,28 @@ function SolanaConfirmStep({
3622
3687
  connection,
3623
3688
  transaction
3624
3689
  );
3625
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
3690
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
3626
3691
  txHash,
3627
3692
  amountUnits: amountUnits.toString()
3628
3693
  });
3629
3694
  onConfirm(txHash, amountUnits.toString());
3630
3695
  } catch (err) {
3631
3696
  const raw = err instanceof Error ? err.message : "Transfer failed";
3632
- const message = _chunkVPWWFWZTcjs.formatUserError.call(void 0, raw);
3633
- _chunkVPWWFWZTcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
3697
+ const message = _chunkUN6MEOOAcjs.formatUserError.call(void 0, raw);
3698
+ _chunkUN6MEOOAcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
3634
3699
  smartAccount,
3635
3700
  token: token.symbol,
3636
3701
  sourceAmount
3637
3702
  });
3638
3703
  setError(message);
3639
- _optionalChain([onError, 'optionalCall', _114 => _114(message, "SOLANA_TRANSFER_ERROR")]);
3704
+ _optionalChain([onError, 'optionalCall', _127 => _127(message, "SOLANA_TRANSFER_ERROR")]);
3640
3705
  } finally {
3641
3706
  setIsSubmitting(false);
3642
3707
  }
3643
3708
  };
3644
3709
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3645
3710
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3646
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}), title: "Review deposit" }),
3711
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}), title: "Review deposit" }),
3647
3712
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
3648
3713
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3649
3714
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
@@ -3691,13 +3756,13 @@ function SolanaConfirmStep({
3691
3756
  children: "$0.04"
3692
3757
  }
3693
3758
  ),
3694
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.InfoIcon, {}) }) })
3759
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.InfoIcon, {}) }) })
3695
3760
  ] })
3696
3761
  ] })
3697
3762
  ] }),
3698
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "error", children: error }),
3763
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
3699
3764
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3700
- _chunkVPWWFWZTcjs.Button,
3765
+ _chunkUN6MEOOAcjs.Button,
3701
3766
  {
3702
3767
  onClick: handleConfirm,
3703
3768
  loading: isSubmitting,
@@ -3708,7 +3773,7 @@ function SolanaConfirmStep({
3708
3773
  }
3709
3774
  )
3710
3775
  ] }),
3711
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
3776
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3712
3777
  ] });
3713
3778
  }
3714
3779
 
@@ -3722,21 +3787,21 @@ function DappImportAssetSelectStep({
3722
3787
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3723
3788
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3724
3789
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3725
- _chunkVPWWFWZTcjs.BodyHeader,
3790
+ _chunkUN6MEOOAcjs.BodyHeader,
3726
3791
  {
3727
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}),
3792
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}),
3728
3793
  title: `Transfer from ${sourceLabel}`,
3729
3794
  subtitle: "Pick the balance to import"
3730
3795
  }
3731
3796
  ),
3732
3797
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
3733
- const tokenAmount = asset.balance ? _chunkVPWWFWZTcjs.tokenFormatter.format(
3798
+ const tokenAmount = asset.balance ? _chunkUN6MEOOAcjs.tokenFormatter.format(
3734
3799
  Number(asset.balance) / 10 ** asset.decimals
3735
3800
  ) : "0";
3736
- const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkVPWWFWZTcjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
3737
- const tokenIcon = _nullishCoalesce(asset.icon, () => ( _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol)));
3738
- const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, asset.chainId);
3739
- const badge = _chunkABVRVW3Pcjs.getChainBadge.call(void 0, asset.chainId);
3801
+ const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkUN6MEOOAcjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
3802
+ const tokenIcon = _nullishCoalesce(asset.icon, () => ( _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, asset.symbol)));
3803
+ const chainIcon = _chunkHH46H6ZIcjs.getChainIcon.call(void 0, asset.chainId);
3804
+ const badge = _chunkHH46H6ZIcjs.getChainBadge.call(void 0, asset.chainId);
3740
3805
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3741
3806
  "button",
3742
3807
  {
@@ -3751,7 +3816,7 @@ function DappImportAssetSelectStep({
3751
3816
  "img",
3752
3817
  {
3753
3818
  src: chainIcon,
3754
- alt: _chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)
3819
+ alt: _chunkHH46H6ZIcjs.getChainName.call(void 0, asset.chainId)
3755
3820
  }
3756
3821
  ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3757
3822
  "span",
@@ -3784,7 +3849,7 @@ function DappImportAssetSelectStep({
3784
3849
  );
3785
3850
  }) })
3786
3851
  ] }),
3787
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
3852
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3788
3853
  ] });
3789
3854
  }
3790
3855
  DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
@@ -3801,9 +3866,9 @@ function DappImportAssetSelectSkeleton({
3801
3866
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
3802
3867
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3803
3868
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3804
- _chunkVPWWFWZTcjs.BodyHeader,
3869
+ _chunkUN6MEOOAcjs.BodyHeader,
3805
3870
  {
3806
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.WalletIcon, {}),
3871
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}),
3807
3872
  title: `Transfer from ${sourceLabel}`,
3808
3873
  subtitle: "Pick the balance to import"
3809
3874
  }
@@ -3841,7 +3906,7 @@ function DappImportAssetSelectSkeleton({
3841
3906
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Try again" })
3842
3907
  }
3843
3908
  ) }),
3844
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
3909
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3845
3910
  ] });
3846
3911
  }
3847
3912
  DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
@@ -3898,7 +3963,7 @@ async function detectPolymarketWalletKind(params) {
3898
3963
  contracts: [
3899
3964
  {
3900
3965
  address: proxyWallet,
3901
- abi: _chunkUEKPBRBYcjs.SAFE_ABI,
3966
+ abi: _chunkRLMXWLF4cjs.SAFE_ABI,
3902
3967
  functionName: "isOwner",
3903
3968
  args: [eoa]
3904
3969
  },
@@ -3931,7 +3996,7 @@ async function buildSignedDepositWalletBatch(params) {
3931
3996
  if (!account || !chain) {
3932
3997
  throw new Error("Wallet not connected");
3933
3998
  }
3934
- if (chain.id !== _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID) {
3999
+ if (chain.id !== _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID) {
3935
4000
  throw new Error("Switch to Polygon to sign");
3936
4001
  }
3937
4002
  const owner = await publicClient.readContract({
@@ -3976,14 +4041,14 @@ async function buildSignedDepositWalletBatch(params) {
3976
4041
  })),
3977
4042
  signature
3978
4043
  },
3979
- sourceToken: _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS,
4044
+ sourceToken: _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS,
3980
4045
  sourceSymbol: tokenKind === "pusd" ? "pUSD" : "USDC.e"
3981
4046
  };
3982
4047
  }
3983
4048
  function buildUsdceTransferCalls(recipient, amount) {
3984
4049
  return [
3985
4050
  {
3986
- target: _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS,
4051
+ target: _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS,
3987
4052
  value: 0n,
3988
4053
  data: _viem.encodeFunctionData.call(void 0, {
3989
4054
  abi: _viem.erc20Abi,
@@ -3996,21 +4061,21 @@ function buildUsdceTransferCalls(recipient, amount) {
3996
4061
  function buildPusdUnwrapCalls(recipient, amount) {
3997
4062
  return [
3998
4063
  {
3999
- target: _chunkNRNJAQUAcjs.POLYMARKET_PUSD_ADDRESS,
4064
+ target: _chunkXOBLFIGVcjs.POLYMARKET_PUSD_ADDRESS,
4000
4065
  value: 0n,
4001
4066
  data: _viem.encodeFunctionData.call(void 0, {
4002
4067
  abi: _viem.erc20Abi,
4003
4068
  functionName: "approve",
4004
- args: [_chunkNRNJAQUAcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, amount]
4069
+ args: [_chunkXOBLFIGVcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, amount]
4005
4070
  })
4006
4071
  },
4007
4072
  {
4008
- target: _chunkNRNJAQUAcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
4073
+ target: _chunkXOBLFIGVcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
4009
4074
  value: 0n,
4010
4075
  data: _viem.encodeFunctionData.call(void 0, {
4011
4076
  abi: COLLATERAL_OFFRAMP_ABI,
4012
4077
  functionName: "unwrap",
4013
- args: [_chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS, recipient, amount]
4078
+ args: [_chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS, recipient, amount]
4014
4079
  })
4015
4080
  }
4016
4081
  ];
@@ -4023,29 +4088,29 @@ var polymarketProvider = {
4023
4088
  label: "Transfer from Polymarket",
4024
4089
  sourceLabel: "Polymarket",
4025
4090
  icon: _react.createElement.call(void 0, "img", {
4026
- src: _chunkNRNJAQUAcjs.POLYMARKET_ICON_URL,
4091
+ src: _chunkXOBLFIGVcjs.POLYMARKET_ICON_URL,
4027
4092
  alt: "Polymarket",
4028
4093
  style: { width: 24, height: 24, borderRadius: 6 }
4029
4094
  }),
4030
- chainId: _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID,
4095
+ chainId: _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID,
4031
4096
  async fetchAvailability({ eoa, getPublicClient: getPublicClient2, signal }) {
4032
- const proxyWallet = await _chunkNRNJAQUAcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
4097
+ const proxyWallet = await _chunkXOBLFIGVcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
4033
4098
  if (!proxyWallet) return null;
4034
- if (_optionalChain([signal, 'optionalAccess', _115 => _115.aborted])) return null;
4035
- const polygonClient = getPublicClient2(_chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID);
4099
+ if (_optionalChain([signal, 'optionalAccess', _128 => _128.aborted])) return null;
4100
+ const polygonClient = getPublicClient2(_chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID);
4036
4101
  if (!polygonClient) return null;
4037
- const balances = await _chunkNRNJAQUAcjs.readPolymarketBalances.call(void 0, {
4102
+ const balances = await _chunkXOBLFIGVcjs.readPolymarketBalances.call(void 0, {
4038
4103
  publicClient: polygonClient,
4039
4104
  proxyWallet
4040
4105
  });
4041
- if (_optionalChain([signal, 'optionalAccess', _116 => _116.aborted])) return null;
4106
+ if (_optionalChain([signal, 'optionalAccess', _129 => _129.aborted])) return null;
4042
4107
  if (balances.pusd === 0n && balances.usdce === 0n) return null;
4043
4108
  const walletKind = await detectPolymarketWalletKind({
4044
4109
  publicClient: polygonClient,
4045
4110
  proxyWallet,
4046
4111
  eoa
4047
4112
  });
4048
- if (_optionalChain([signal, 'optionalAccess', _117 => _117.aborted])) return null;
4113
+ if (_optionalChain([signal, 'optionalAccess', _130 => _130.aborted])) return null;
4049
4114
  if (!walletKind) return null;
4050
4115
  const assets = [];
4051
4116
  if (balances.pusd > 0n) {
@@ -4092,7 +4157,7 @@ var polymarketProvider = {
4092
4157
  const { txHash } = await backend.submitPolymarketWithdraw(payload);
4093
4158
  return { txHash, sourceToken, sourceSymbol, sourceDecimals: 6 };
4094
4159
  }
4095
- const result = await _chunkNRNJAQUAcjs.executePolymarketSafeTransfer.call(void 0, {
4160
+ const result = await _chunkXOBLFIGVcjs.executePolymarketSafeTransfer.call(void 0, {
4096
4161
  walletClient,
4097
4162
  publicClient,
4098
4163
  safeAddress: metadata.proxyWallet,
@@ -4111,17 +4176,17 @@ var polymarketProvider = {
4111
4176
  function buildAsset(params) {
4112
4177
  const { tokenKind, proxyWallet, walletKind, balance } = params;
4113
4178
  const isPusd = tokenKind === "pusd";
4114
- const tokenAddress = isPusd ? _chunkNRNJAQUAcjs.POLYMARKET_PUSD_ADDRESS : _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS;
4179
+ const tokenAddress = isPusd ? _chunkXOBLFIGVcjs.POLYMARKET_PUSD_ADDRESS : _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS;
4115
4180
  const symbol = isPusd ? "pUSD" : "USDC.e";
4116
4181
  const balanceUsd = Number(_viem.formatUnits.call(void 0, balance, 6));
4117
4182
  const metadata = { proxyWallet, tokenKind, walletKind };
4118
4183
  return {
4119
4184
  id: `polymarket:${tokenKind}`,
4120
- chainId: _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID,
4185
+ chainId: _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID,
4121
4186
  token: tokenAddress,
4122
4187
  symbol,
4123
4188
  name: isPusd ? "Polymarket USD" : "Polygon USDC.e",
4124
- icon: isPusd ? _chunkNRNJAQUAcjs.POLYMARKET_ICON_URL : void 0,
4189
+ icon: isPusd ? _chunkXOBLFIGVcjs.POLYMARKET_ICON_URL : void 0,
4125
4190
  decimals: 6,
4126
4191
  balance: balance.toString(),
4127
4192
  balanceUsd: Number.isFinite(balanceUsd) ? balanceUsd : 0,
@@ -4131,8 +4196,8 @@ function buildAsset(params) {
4131
4196
  // pUSD unwraps to USDC.e via the offramp; USDC.e is what actually
4132
4197
  // arrives at the smart account, so it's also what the orchestrator
4133
4198
  // bridges from.
4134
- depositToken: _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS,
4135
- depositChainId: _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID,
4199
+ depositToken: _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS,
4200
+ depositChainId: _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID,
4136
4201
  providerMetadata: metadata
4137
4202
  };
4138
4203
  }
@@ -4182,7 +4247,8 @@ function createInitialState(overrides) {
4182
4247
  txHash: null,
4183
4248
  directTransfer: false,
4184
4249
  swappedContext: null,
4185
- initialEvent: null
4250
+ initialEvent: null,
4251
+ quoteFeeBreakdown: null
4186
4252
  },
4187
4253
  dappImport: {
4188
4254
  activeProviderId: null,
@@ -4236,7 +4302,7 @@ function readPortfolioEntry(portfolio, network, address) {
4236
4302
  function computeDappImportStatus(providerId, inputs) {
4237
4303
  const { owner, availability, availabilityOwner, setup } = inputs;
4238
4304
  if (!owner) return "needs-connect";
4239
- const entry = _optionalChain([availabilityOwner, 'optionalAccess', _118 => _118.toLowerCase, 'call', _119 => _119()]) === owner.toLowerCase() ? availability[providerId] : void 0;
4305
+ const entry = _optionalChain([availabilityOwner, 'optionalAccess', _131 => _131.toLowerCase, 'call', _132 => _132()]) === owner.toLowerCase() ? availability[providerId] : void 0;
4240
4306
  if (entry === "loading" || entry === void 0) return "loading";
4241
4307
  if (entry === "error") {
4242
4308
  return {
@@ -4590,12 +4656,12 @@ function applyAction(state, action) {
4590
4656
  requestKey: action.requestKey,
4591
4657
  cacheKey: action.cacheKey,
4592
4658
  status: "loading",
4593
- smartAccount: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _120 => _120.smartAccount]), () => ( null)),
4594
- sessionOwnerAddress: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _121 => _121.sessionOwnerAddress]), () => ( null)),
4595
- solanaDepositAddress: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _122 => _122.solanaDepositAddress]), () => ( null)),
4659
+ smartAccount: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _133 => _133.smartAccount]), () => ( null)),
4660
+ sessionOwnerAddress: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _134 => _134.sessionOwnerAddress]), () => ( null)),
4661
+ solanaDepositAddress: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _135 => _135.solanaDepositAddress]), () => ( null)),
4596
4662
  message: null,
4597
4663
  cacheable: action.cacheable,
4598
- attemptNonce: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _123 => _123.attemptNonce]), () => ( 0))
4664
+ attemptNonce: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _136 => _136.attemptNonce]), () => ( 0))
4599
4665
  }));
4600
4666
  }
4601
4667
  case "setup/ready": {
@@ -4792,10 +4858,22 @@ function applyAction(state, action) {
4792
4858
  txHash: action.txHash,
4793
4859
  directTransfer: _nullishCoalesce(action.directTransfer, () => ( false)),
4794
4860
  swappedContext: _nullishCoalesce(action.swappedContext, () => ( null)),
4795
- initialEvent: _nullishCoalesce(action.initialEvent, () => ( null))
4861
+ initialEvent: _nullishCoalesce(action.initialEvent, () => ( null)),
4862
+ quoteFeeBreakdown: _nullishCoalesce(action.quoteFeeBreakdown, () => ( null))
4796
4863
  },
4797
4864
  flow: { ...state.flow, step: "processing" }
4798
4865
  };
4866
+ case "processing/quote-fee-breakdown-loaded":
4867
+ if (state.flow.step !== "processing" || _optionalChain([state, 'access', _137 => _137.processing, 'access', _138 => _138.txHash, 'optionalAccess', _139 => _139.toLowerCase, 'call', _140 => _140()]) !== action.txHash.toLowerCase()) {
4868
+ return state;
4869
+ }
4870
+ return {
4871
+ ...state,
4872
+ processing: {
4873
+ ...state.processing,
4874
+ quoteFeeBreakdown: action.quoteFeeBreakdown
4875
+ }
4876
+ };
4799
4877
  case "dapp-import/availability-loading":
4800
4878
  return {
4801
4879
  ...state,
@@ -4963,7 +5041,8 @@ function applyAction(state, action) {
4963
5041
  txHash: null,
4964
5042
  directTransfer: false,
4965
5043
  swappedContext: null,
4966
- initialEvent: null
5044
+ initialEvent: null,
5045
+ quoteFeeBreakdown: null
4967
5046
  },
4968
5047
  // Drop fetched availability wholesale. The fetch effect refetches
4969
5048
  // unconditionally on remount (so keeping the map saves nothing),
@@ -5064,15 +5143,15 @@ var SetupError = class extends Error {
5064
5143
  }
5065
5144
  };
5066
5145
  async function resolveSessionOwner(eoaAddress) {
5067
- const local = _chunkVPWWFWZTcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
5146
+ const local = _chunkUN6MEOOAcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
5068
5147
  if (local) {
5069
5148
  return {
5070
- account: _chunkVPWWFWZTcjs.accountFromPrivateKey.call(void 0, local.privateKey),
5149
+ account: _chunkUN6MEOOAcjs.accountFromPrivateKey.call(void 0, local.privateKey),
5071
5150
  address: local.address
5072
5151
  };
5073
5152
  }
5074
- const created = _chunkVPWWFWZTcjs.createSessionOwnerKey.call(void 0, );
5075
- _chunkVPWWFWZTcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
5153
+ const created = _chunkUN6MEOOAcjs.createSessionOwnerKey.call(void 0, );
5154
+ _chunkUN6MEOOAcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
5076
5155
  return { account: created.account, address: created.address };
5077
5156
  }
5078
5157
  function stableStringify(value) {
@@ -5128,7 +5207,7 @@ var setupRequestDedupe = /* @__PURE__ */ new Map();
5128
5207
  function readDedupedAccountSetupResult(requestKey) {
5129
5208
  const now = Date.now();
5130
5209
  const existing = setupRequestDedupe.get(requestKey);
5131
- if (_optionalChain([existing, 'optionalAccess', _124 => _124.settled]) && existing.expiresAt > now && existing.result) {
5210
+ if (_optionalChain([existing, 'optionalAccess', _141 => _141.settled]) && existing.expiresAt > now && existing.result) {
5132
5211
  return existing.result;
5133
5212
  }
5134
5213
  return null;
@@ -5139,7 +5218,7 @@ async function runAccountSetup(input, deps) {
5139
5218
  try {
5140
5219
  const sessionOwner = await resolveSessionOwner(input.ownerAddress);
5141
5220
  const cacheKey = computeCacheKey(input, sessionOwner.address);
5142
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
5221
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
5143
5222
  owner: input.ownerAddress,
5144
5223
  sessionOwner: sessionOwner.address,
5145
5224
  forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
@@ -5147,7 +5226,7 @@ async function runAccountSetup(input, deps) {
5147
5226
  const setup = await service.setupAccount({
5148
5227
  ownerAddress: input.ownerAddress,
5149
5228
  sessionOwnerAddress: sessionOwner.address,
5150
- targetChain: _chunkABVRVW3Pcjs.targetChainToCaip2.call(void 0, input.targetChain),
5229
+ targetChain: _chunkHH46H6ZIcjs.targetChainToCaip2.call(void 0, input.targetChain),
5151
5230
  targetToken: input.targetToken,
5152
5231
  recipient: input.recipient,
5153
5232
  outputTokenRules: input.outputTokenRules,
@@ -5185,7 +5264,7 @@ async function runAccountSetup(input, deps) {
5185
5264
  primaryType: typedData.primaryType,
5186
5265
  message: typedData.message
5187
5266
  });
5188
- const sessionDetails = _chunkVPWWFWZTcjs.buildSessionDetails.call(void 0,
5267
+ const sessionDetails = _chunkUN6MEOOAcjs.buildSessionDetails.call(void 0,
5189
5268
  setup.sessionDetailsUnsigned,
5190
5269
  signature
5191
5270
  );
@@ -5199,10 +5278,10 @@ async function runAccountSetup(input, deps) {
5199
5278
  eoaAddress: input.ownerAddress,
5200
5279
  sessionOwner: sessionOwner.address,
5201
5280
  target: {
5202
- chain: _chunkABVRVW3Pcjs.targetChainToCaip2.call(void 0, input.targetChain),
5281
+ chain: _chunkHH46H6ZIcjs.targetChainToCaip2.call(void 0, input.targetChain),
5203
5282
  token: input.targetToken,
5204
5283
  ...input.recipient && { recipient: input.recipient },
5205
- ..._optionalChain([input, 'access', _125 => _125.outputTokenRules, 'optionalAccess', _126 => _126.length]) && {
5284
+ ..._optionalChain([input, 'access', _142 => _142.outputTokenRules, 'optionalAccess', _143 => _143.length]) && {
5206
5285
  outputTokenRules: input.outputTokenRules
5207
5286
  },
5208
5287
  ...input.rejectUnmapped != null && {
@@ -5218,7 +5297,7 @@ async function runAccountSetup(input, deps) {
5218
5297
  isRegistered: true
5219
5298
  };
5220
5299
  } catch (error) {
5221
- _chunkVPWWFWZTcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
5300
+ _chunkUN6MEOOAcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
5222
5301
  owner: input.ownerAddress
5223
5302
  });
5224
5303
  if (error instanceof SetupError) throw error;
@@ -5229,7 +5308,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
5229
5308
  const now = Date.now();
5230
5309
  const existing = setupRequestDedupe.get(requestKey);
5231
5310
  if (existing && (!existing.settled || existing.expiresAt > now)) {
5232
- _chunkVPWWFWZTcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
5311
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
5233
5312
  owner: input.ownerAddress,
5234
5313
  forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
5235
5314
  });
@@ -5320,6 +5399,33 @@ function isSameRoute2(sourceChain, sourceToken, targetChain, targetToken) {
5320
5399
  var SWAPPED_SOURCE_CHAIN = 8453;
5321
5400
  var SWAPPED_SOURCE_TOKEN = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
5322
5401
  var SWAPPED_SOURCE_DECIMALS = 6;
5402
+ var SWAPPED_QUOTE_FEE_TIMEOUT_MS = 2500;
5403
+ async function fetchQuoteFeeBreakdown(params) {
5404
+ try {
5405
+ if (BigInt(params.amount) <= 0n) return void 0;
5406
+ } catch (e30) {
5407
+ return void 0;
5408
+ }
5409
+ let timeoutId;
5410
+ try {
5411
+ const quote = await Promise.race([
5412
+ params.service.getQuotePreview({
5413
+ account: params.account,
5414
+ sourceChainId: params.sourceChainId,
5415
+ sourceToken: params.sourceToken,
5416
+ amount: params.amount
5417
+ }),
5418
+ new Promise((resolve) => {
5419
+ timeoutId = setTimeout(resolve, SWAPPED_QUOTE_FEE_TIMEOUT_MS, null);
5420
+ })
5421
+ ]);
5422
+ return _optionalChain([quote, 'optionalAccess', _144 => _144.fees, 'optionalAccess', _145 => _145.breakdown]);
5423
+ } catch (e31) {
5424
+ return void 0;
5425
+ } finally {
5426
+ if (timeoutId !== void 0) clearTimeout(timeoutId);
5427
+ }
5428
+ }
5323
5429
  var DEFAULT_FIAT_ONRAMP_METHODS = [
5324
5430
  {
5325
5431
  method: "creditcard",
@@ -5460,7 +5566,8 @@ function deriveStep(flow, d, p, activeEntry, fiat, exchange) {
5460
5566
  inputAmountUsd: _nullishCoalesce(d.inputAmountUsd, () => ( void 0)),
5461
5567
  directTransfer: p.directTransfer,
5462
5568
  swappedContext: _nullishCoalesce(p.swappedContext, () => ( void 0)),
5463
- initialEvent: _nullishCoalesce(p.initialEvent, () => ( void 0))
5569
+ initialEvent: _nullishCoalesce(p.initialEvent, () => ( void 0)),
5570
+ quoteFeeBreakdown: _nullishCoalesce(p.quoteFeeBreakdown, () => ( void 0))
5464
5571
  };
5465
5572
  }
5466
5573
  }
@@ -5494,7 +5601,7 @@ function DepositFlow({
5494
5601
  appBalanceUsd,
5495
5602
  outputTokenRules,
5496
5603
  rejectUnmapped,
5497
- signerAddress = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS,
5604
+ signerAddress = _chunkHH46H6ZIcjs.DEFAULT_SIGNER_ADDRESS,
5498
5605
  sessionChainIds,
5499
5606
  forceRegister = false,
5500
5607
  enableSolana = true,
@@ -5511,17 +5618,18 @@ function DepositFlow({
5511
5618
  uiConfig,
5512
5619
  allowedRoutes,
5513
5620
  onStepChange,
5621
+ onSwappedImmersiveChange,
5514
5622
  onClose,
5515
5623
  onLifecycle,
5516
5624
  onEvent,
5517
5625
  onError,
5518
5626
  debug
5519
5627
  }) {
5520
- const rpcUrls = _chunkVPWWFWZTcjs.useRpcUrls.call(void 0, );
5521
- const onStepChangeRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onStepChange);
5522
- const onEventRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onEvent);
5523
- const onLifecycleRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onLifecycle);
5524
- const onErrorRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onError);
5628
+ const rpcUrls = _chunkUN6MEOOAcjs.useRpcUrls.call(void 0, );
5629
+ const onStepChangeRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onStepChange);
5630
+ const onEventRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onEvent);
5631
+ const onLifecycleRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onLifecycle);
5632
+ const onErrorRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onError);
5525
5633
  const storeApi = useDepositStoreApi();
5526
5634
  const flowSlice = useDepositStore((s) => s.flow);
5527
5635
  const depositSlice = useDepositStore((s) => s.deposit);
@@ -5538,13 +5646,13 @@ function DepositFlow({
5538
5646
  const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
5539
5647
  const logFlow = _react.useCallback.call(void 0,
5540
5648
  (message, data) => {
5541
- _chunkVPWWFWZTcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
5649
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
5542
5650
  },
5543
5651
  [debug]
5544
5652
  );
5545
5653
  const logFlowError = _react.useCallback.call(void 0,
5546
5654
  (message, error, data) => {
5547
- _chunkVPWWFWZTcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
5655
+ _chunkUN6MEOOAcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
5548
5656
  },
5549
5657
  [debug]
5550
5658
  );
@@ -5568,12 +5676,12 @@ function DepositFlow({
5568
5676
  };
5569
5677
  }, [enableSwappedPreconnect]);
5570
5678
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
5571
- if (!_optionalChain([dappWalletClient, 'optionalAccess', _127 => _127.switchChain])) return void 0;
5679
+ if (!_optionalChain([dappWalletClient, 'optionalAccess', _146 => _146.switchChain])) return void 0;
5572
5680
  return async (chainId) => {
5573
- await _optionalChain([dappWalletClient, 'access', _128 => _128.switchChain, 'optionalCall', _129 => _129({ id: chainId })]);
5681
+ await _optionalChain([dappWalletClient, 'access', _147 => _147.switchChain, 'optionalCall', _148 => _148({ id: chainId })]);
5574
5682
  };
5575
5683
  }, [dappWalletClient]);
5576
- const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _130 => _130.account, 'optionalAccess', _131 => _131.address]), () => ( null));
5684
+ const connectedWalletAddress = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _149 => _149.account, 'optionalAccess', _150 => _150.address]), () => ( null));
5577
5685
  const walletOptions = _react.useMemo.call(void 0, () => {
5578
5686
  const options = [];
5579
5687
  const seen = /* @__PURE__ */ new Set();
@@ -5587,7 +5695,7 @@ function DepositFlow({
5587
5695
  });
5588
5696
  seen.add(id);
5589
5697
  }
5590
- if (enableSolana && _optionalChain([reownWallet, 'optionalAccess', _132 => _132.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
5698
+ if (enableSolana && _optionalChain([reownWallet, 'optionalAccess', _151 => _151.isConnected]) && reownWallet.isSolana && reownWallet.solanaAddress && dappAddress) {
5591
5699
  const id = _nullishCoalesce(reownWallet.caipAddress, () => ( `solana:${reownWallet.solanaAddress}`));
5592
5700
  if (!seen.has(id)) {
5593
5701
  options.push({
@@ -5599,7 +5707,7 @@ function DepositFlow({
5599
5707
  });
5600
5708
  seen.add(id);
5601
5709
  }
5602
- } else if (_optionalChain([reownWallet, 'optionalAccess', _133 => _133.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
5710
+ } else if (_optionalChain([reownWallet, 'optionalAccess', _152 => _152.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient && !seen.has(`evm:${reownWallet.address.toLowerCase()}`)) {
5603
5711
  const id = `evm:${reownWallet.address.toLowerCase()}`;
5604
5712
  if (!seen.has(id)) {
5605
5713
  options.push({
@@ -5616,20 +5724,20 @@ function DepositFlow({
5616
5724
  }, [
5617
5725
  connectedWalletAddress,
5618
5726
  dappAddress,
5619
- _optionalChain([reownWallet, 'optionalAccess', _134 => _134.address]),
5620
- _optionalChain([reownWallet, 'optionalAccess', _135 => _135.isConnected]),
5621
- _optionalChain([reownWallet, 'optionalAccess', _136 => _136.walletClient]),
5622
- _optionalChain([reownWallet, 'optionalAccess', _137 => _137.publicClient]),
5623
- _optionalChain([reownWallet, 'optionalAccess', _138 => _138.icon]),
5727
+ _optionalChain([reownWallet, 'optionalAccess', _153 => _153.address]),
5728
+ _optionalChain([reownWallet, 'optionalAccess', _154 => _154.isConnected]),
5729
+ _optionalChain([reownWallet, 'optionalAccess', _155 => _155.walletClient]),
5730
+ _optionalChain([reownWallet, 'optionalAccess', _156 => _156.publicClient]),
5731
+ _optionalChain([reownWallet, 'optionalAccess', _157 => _157.icon]),
5624
5732
  enableSolana,
5625
- _optionalChain([reownWallet, 'optionalAccess', _139 => _139.isSolana]),
5626
- _optionalChain([reownWallet, 'optionalAccess', _140 => _140.solanaAddress]),
5627
- _optionalChain([reownWallet, 'optionalAccess', _141 => _141.caipAddress])
5733
+ _optionalChain([reownWallet, 'optionalAccess', _158 => _158.isSolana]),
5734
+ _optionalChain([reownWallet, 'optionalAccess', _159 => _159.solanaAddress]),
5735
+ _optionalChain([reownWallet, 'optionalAccess', _160 => _160.caipAddress])
5628
5736
  ]);
5629
- const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _142 => _142.account]) && dappAddress && !reownWallet && !enableFiatOnramp && !enableExchangeConnect;
5737
+ const canAutoLock = _optionalChain([dappWalletClient, 'optionalAccess', _161 => _161.account]) && dappAddress && !reownWallet && !enableFiatOnramp && !enableExchangeConnect;
5630
5738
  const hasWalletOptions = walletOptions.length > 0;
5631
5739
  const hasReownSession = Boolean(
5632
- enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _143 => _143.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _144 => _144.address]) : _optionalChain([reownWallet, 'optionalAccess', _145 => _145.address])
5740
+ enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _162 => _162.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _163 => _163.address]) : _optionalChain([reownWallet, 'optionalAccess', _164 => _164.address])
5633
5741
  );
5634
5742
  const isDappImportWalletHydrating = Boolean(
5635
5743
  hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady
@@ -5649,9 +5757,9 @@ function DepositFlow({
5649
5757
  isConnectSelectionConfirmed,
5650
5758
  selectedWalletId
5651
5759
  ]);
5652
- const setupChainId = typeof targetChain === "number" && !_chunkABVRVW3Pcjs.isVirtualDestination.call(void 0, targetChain) ? targetChain : typeof defaultSourceChain === "number" ? defaultSourceChain : _chains.base.id;
5653
- const targetSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
5654
- const isTargetStablecoin = _chunkABVRVW3Pcjs.isStablecoinSymbol.call(void 0, targetSymbol);
5760
+ const setupChainId = typeof targetChain === "number" && !_chunkHH46H6ZIcjs.isVirtualDestination.call(void 0, targetChain) ? targetChain : typeof defaultSourceChain === "number" ? defaultSourceChain : _chains.base.id;
5761
+ const targetSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
5762
+ const isTargetStablecoin = _chunkHH46H6ZIcjs.isStablecoinSymbol.call(void 0, targetSymbol);
5655
5763
  const targetMarketPriceRef = _react.useRef.call(void 0, null);
5656
5764
  _react.useEffect.call(void 0, () => {
5657
5765
  targetMarketPriceRef.current = null;
@@ -5677,16 +5785,16 @@ function DepositFlow({
5677
5785
  return {
5678
5786
  ownerAddress: dappAddress,
5679
5787
  walletClient: void 0,
5680
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVPWWFWZTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5788
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5681
5789
  switchChain: void 0
5682
5790
  };
5683
5791
  }
5684
5792
  if (canAutoLock) {
5685
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _146 => _146.chain, 'optionalAccess', _147 => _147.id]), () => ( setupChainId));
5793
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _165 => _165.chain, 'optionalAccess', _166 => _166.id]), () => ( setupChainId));
5686
5794
  return {
5687
5795
  ownerAddress: dappWalletClient.account.address,
5688
5796
  walletClient: dappWalletClient,
5689
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVPWWFWZTcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5797
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5690
5798
  switchChain: dappSwitchChain
5691
5799
  };
5692
5800
  }
@@ -5700,24 +5808,24 @@ function DepositFlow({
5700
5808
  return {
5701
5809
  ownerAddress: dappAddress,
5702
5810
  walletClient: void 0,
5703
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVPWWFWZTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5811
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5704
5812
  switchChain: void 0
5705
5813
  };
5706
5814
  }
5707
- if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _148 => _148.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
5708
- const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _149 => _149.chain, 'optionalAccess', _150 => _150.id]), () => ( setupChainId));
5815
+ if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _167 => _167.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
5816
+ const fallbackChainId = _nullishCoalesce(_optionalChain([dappWalletClient, 'optionalAccess', _168 => _168.chain, 'optionalAccess', _169 => _169.id]), () => ( setupChainId));
5709
5817
  return {
5710
5818
  ownerAddress: dappWalletClient.account.address,
5711
5819
  walletClient: dappWalletClient,
5712
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVPWWFWZTcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5820
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5713
5821
  switchChain: dappSwitchChain
5714
5822
  };
5715
5823
  }
5716
- if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _151 => _151.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
5824
+ if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _170 => _170.address]) && selectedOption.address && reownWallet.address.toLowerCase() === selectedOption.address.toLowerCase()) {
5717
5825
  return {
5718
5826
  ownerAddress: reownWallet.address,
5719
5827
  walletClient: reownWallet.walletClient,
5720
- publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkVPWWFWZTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5828
+ publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5721
5829
  switchChain: reownWallet.switchChain
5722
5830
  };
5723
5831
  }
@@ -5756,7 +5864,7 @@ function DepositFlow({
5756
5864
  return {
5757
5865
  ownerAddress: dappAddress,
5758
5866
  walletClient: void 0,
5759
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVPWWFWZTcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5867
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5760
5868
  switchChain: void 0
5761
5869
  };
5762
5870
  }
@@ -5781,37 +5889,37 @@ function DepositFlow({
5781
5889
  const selectedEvmWalletOwner = _react.useMemo.call(void 0, () => {
5782
5890
  if (!selectedWalletId) return null;
5783
5891
  const opt = walletOptions.find((o) => o.id === selectedWalletId);
5784
- if (_optionalChain([opt, 'optionalAccess', _152 => _152.kind]) === "external" && opt.address) {
5892
+ if (_optionalChain([opt, 'optionalAccess', _171 => _171.kind]) === "external" && opt.address) {
5785
5893
  return opt.address;
5786
5894
  }
5787
- if (_optionalChain([opt, 'optionalAccess', _153 => _153.kind]) === "connected" && opt.address) {
5895
+ if (_optionalChain([opt, 'optionalAccess', _172 => _172.kind]) === "connected" && opt.address) {
5788
5896
  return opt.address;
5789
5897
  }
5790
5898
  return null;
5791
5899
  }, [selectedWalletId, walletOptions]);
5792
5900
  const dappImportOwner = _react.useMemo.call(void 0, () => {
5793
5901
  if (selectedEvmWalletOwner) return selectedEvmWalletOwner;
5794
- if (_optionalChain([reownWallet, 'optionalAccess', _154 => _154.address]) && reownWallet.isConnected) {
5902
+ if (_optionalChain([reownWallet, 'optionalAccess', _173 => _173.address]) && reownWallet.isConnected) {
5795
5903
  return reownWallet.address;
5796
5904
  }
5797
5905
  if (connectedWalletAddress) return connectedWalletAddress;
5798
5906
  return null;
5799
5907
  }, [
5800
5908
  selectedEvmWalletOwner,
5801
- _optionalChain([reownWallet, 'optionalAccess', _155 => _155.address]),
5802
- _optionalChain([reownWallet, 'optionalAccess', _156 => _156.isConnected]),
5909
+ _optionalChain([reownWallet, 'optionalAccess', _174 => _174.address]),
5910
+ _optionalChain([reownWallet, 'optionalAccess', _175 => _175.isConnected]),
5803
5911
  connectedWalletAddress
5804
5912
  ]);
5805
5913
  const activeOwner = _react.useMemo.call(void 0,
5806
5914
  () => resolveOwnerForMode(flowMode, {
5807
5915
  dappAddress,
5808
- walletOwner: _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _157 => _157.ownerAddress]), () => ( (canAutoLock ? connectedWalletAddress : selectedEvmWalletOwner))),
5916
+ walletOwner: _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _176 => _176.ownerAddress]), () => ( (canAutoLock ? connectedWalletAddress : selectedEvmWalletOwner))),
5809
5917
  dappImportOwner
5810
5918
  }),
5811
5919
  [
5812
5920
  flowMode,
5813
5921
  dappAddress,
5814
- _optionalChain([signerContext, 'optionalAccess', _158 => _158.ownerAddress]),
5922
+ _optionalChain([signerContext, 'optionalAccess', _177 => _177.ownerAddress]),
5815
5923
  canAutoLock,
5816
5924
  connectedWalletAddress,
5817
5925
  selectedEvmWalletOwner,
@@ -5840,12 +5948,12 @@ function DepositFlow({
5840
5948
  return;
5841
5949
  }
5842
5950
  lastActiveSetupLifecycleKeyRef.current = lifecycleKey;
5843
- _optionalChain([onLifecycleRef, 'access', _159 => _159.current, 'optionalCall', _160 => _160({
5951
+ _optionalChain([onLifecycleRef, 'access', _178 => _178.current, 'optionalCall', _179 => _179({
5844
5952
  type: "smart-account-changed",
5845
5953
  evm: activeEntry.smartAccount,
5846
5954
  solana: _nullishCoalesce(activeEntry.solanaDepositAddress, () => ( null))
5847
5955
  })]);
5848
- _optionalChain([onLifecycleRef, 'access', _161 => _161.current, 'optionalCall', _162 => _162({
5956
+ _optionalChain([onLifecycleRef, 'access', _180 => _180.current, 'optionalCall', _181 => _181({
5849
5957
  type: "connected",
5850
5958
  address: activeOwner,
5851
5959
  smartAccount: activeEntry.smartAccount
@@ -5891,7 +5999,7 @@ function DepositFlow({
5891
5999
  const currentBackHandler = canGoBackFromHere ? handleBack : void 0;
5892
6000
  const currentScreen = showConnectStep ? "connect" : effectiveStep.type;
5893
6001
  _react.useEffect.call(void 0, () => {
5894
- _optionalChain([onStepChangeRef, 'access', _163 => _163.current, 'optionalCall', _164 => _164(currentBackHandler, currentScreen)]);
6002
+ _optionalChain([onStepChangeRef, 'access', _182 => _182.current, 'optionalCall', _183 => _183(currentBackHandler, currentScreen)]);
5895
6003
  }, [currentBackHandler, currentScreen, onStepChangeRef]);
5896
6004
  const lastModalHeightRef = _react.useRef.call(void 0, 0);
5897
6005
  const modalContentElRef = _react.useRef.call(void 0, null);
@@ -5901,7 +6009,7 @@ function DepositFlow({
5901
6009
  modalContentElRef.current = mc;
5902
6010
  const ro = new ResizeObserver((entries) => {
5903
6011
  for (const entry of entries) {
5904
- const border = _optionalChain([entry, 'access', _165 => _165.borderBoxSize, 'optionalAccess', _166 => _166[0], 'optionalAccess', _167 => _167.blockSize]);
6012
+ const border = _optionalChain([entry, 'access', _184 => _184.borderBoxSize, 'optionalAccess', _185 => _185[0], 'optionalAccess', _186 => _186.blockSize]);
5905
6013
  lastModalHeightRef.current = typeof border === "number" ? border : entry.contentRect.height;
5906
6014
  }
5907
6015
  });
@@ -5942,23 +6050,23 @@ function DepositFlow({
5942
6050
  }
5943
6051
  lastStepOpenEventKeyRef.current = stepOpenEventKey;
5944
6052
  if (effectiveStep.type === "select-asset") {
5945
- _optionalChain([onEventRef, 'access', _168 => _168.current, 'optionalCall', _169 => _169({
6053
+ _optionalChain([onEventRef, 'access', _187 => _187.current, 'optionalCall', _188 => _188({
5946
6054
  type: "deposit_modal_connected_wallet_select_source_open",
5947
6055
  total_balance_in_external_wallet: totalBalanceUsd,
5948
6056
  pred_balance: totalBalanceUsd
5949
6057
  })]);
5950
6058
  } else if (effectiveStep.type === "deposit-address") {
5951
- const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
5952
- const tokenSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
5953
- _optionalChain([onEventRef, 'access', _170 => _170.current, 'optionalCall', _171 => _171({
6059
+ const chainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChain);
6060
+ const tokenSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6061
+ _optionalChain([onEventRef, 'access', _189 => _189.current, 'optionalCall', _190 => _190({
5954
6062
  type: "deposit_modal_transfer_crypto_open",
5955
6063
  default_chain: chainName,
5956
6064
  default_token: tokenSymbol,
5957
6065
  pred_balance: totalBalanceUsd
5958
6066
  })]);
5959
6067
  } else if (effectiveStep.type === "amount" && stepSendToken) {
5960
- const receiveSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
5961
- _optionalChain([onEventRef, 'access', _172 => _172.current, 'optionalCall', _173 => _173({
6068
+ const receiveSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6069
+ _optionalChain([onEventRef, 'access', _191 => _191.current, 'optionalCall', _192 => _192({
5962
6070
  type: "deposit_modal_connected_wallet_enter_value_open",
5963
6071
  send_token: stepSendToken,
5964
6072
  receive_token: receiveSymbol,
@@ -5991,7 +6099,7 @@ function DepositFlow({
5991
6099
  targetToken
5992
6100
  ]);
5993
6101
  _react.useEffect.call(void 0, () => {
5994
- _optionalChain([onLifecycleRef, 'access', _174 => _174.current, 'optionalCall', _175 => _175({
6102
+ _optionalChain([onLifecycleRef, 'access', _193 => _193.current, 'optionalCall', _194 => _194({
5995
6103
  type: "balance-changed",
5996
6104
  totalUsd: totalBalanceUsd
5997
6105
  })]);
@@ -6007,7 +6115,7 @@ function DepositFlow({
6007
6115
  const handleConfirmWallet = _react.useCallback.call(void 0,
6008
6116
  (walletId) => {
6009
6117
  const selectedOption = walletOptions.find((o) => o.id === walletId);
6010
- const mode = enableSolana && _optionalChain([selectedOption, 'optionalAccess', _176 => _176.kind]) === "solana" ? "solana-wallet" : "wallet";
6118
+ const mode = enableSolana && _optionalChain([selectedOption, 'optionalAccess', _195 => _195.kind]) === "solana" ? "solana-wallet" : "wallet";
6011
6119
  storeApi.dispatch({
6012
6120
  type: "connect/wallet-confirmed",
6013
6121
  walletId,
@@ -6017,7 +6125,7 @@ function DepositFlow({
6017
6125
  [walletOptions, enableSolana, storeApi]
6018
6126
  );
6019
6127
  const isSolanaWalletConnected = Boolean(
6020
- enableSolana && _optionalChain([reownWallet, 'optionalAccess', _177 => _177.isConnected]) && _optionalChain([reownWallet, 'optionalAccess', _178 => _178.isSolana])
6128
+ enableSolana && _optionalChain([reownWallet, 'optionalAccess', _196 => _196.isConnected]) && _optionalChain([reownWallet, 'optionalAccess', _197 => _197.isSolana])
6021
6129
  );
6022
6130
  const dappImportsKey = dappImports ? Object.keys(dappImports).filter((k) => dappImports[k]).sort().join(",") : "";
6023
6131
  const enabledDappImportProviders = _react.useMemo.call(void 0,
@@ -6034,7 +6142,7 @@ function DepositFlow({
6034
6142
  const owner = dappImportOwner;
6035
6143
  if (owner) {
6036
6144
  const wallet = walletOptions.find(
6037
- (o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess', _179 => _179.toLowerCase, 'call', _180 => _180()]) === owner.toLowerCase()
6145
+ (o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess', _198 => _198.toLowerCase, 'call', _199 => _199()]) === owner.toLowerCase()
6038
6146
  );
6039
6147
  if (wallet) {
6040
6148
  storeApi.dispatch({
@@ -6075,8 +6183,8 @@ function DepositFlow({
6075
6183
  eoa: dappImportOwner,
6076
6184
  getPublicClient: (chainId) => {
6077
6185
  try {
6078
- return _chunkVPWWFWZTcjs.getPublicClient.call(void 0, chainId, rpcUrls);
6079
- } catch (e30) {
6186
+ return _chunkUN6MEOOAcjs.getPublicClient.call(void 0, chainId, rpcUrls);
6187
+ } catch (e32) {
6080
6188
  return null;
6081
6189
  }
6082
6190
  },
@@ -6152,7 +6260,7 @@ function DepositFlow({
6152
6260
  }, [activeDappImportProviderId, enabledDappImportProviders]);
6153
6261
  const activeDappImportAvailability = _react.useMemo.call(void 0, () => {
6154
6262
  if (!activeDappImportProviderId) return null;
6155
- if (!dappImportOwner || _optionalChain([dappImportAvailabilityOwner, 'optionalAccess', _181 => _181.toLowerCase, 'call', _182 => _182()]) !== dappImportOwner.toLowerCase()) {
6263
+ if (!dappImportOwner || _optionalChain([dappImportAvailabilityOwner, 'optionalAccess', _200 => _200.toLowerCase, 'call', _201 => _201()]) !== dappImportOwner.toLowerCase()) {
6156
6264
  return null;
6157
6265
  }
6158
6266
  const entry = dappImportAvailability[activeDappImportProviderId];
@@ -6193,7 +6301,7 @@ function DepositFlow({
6193
6301
  setup: setupSlice
6194
6302
  });
6195
6303
  const pinnableWallet = dappImportOwner ? _nullishCoalesce(walletOptions.find(
6196
- (o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess', _183 => _183.toLowerCase, 'call', _184 => _184()]) === dappImportOwner.toLowerCase()
6304
+ (o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess', _202 => _202.toLowerCase, 'call', _203 => _203()]) === dappImportOwner.toLowerCase()
6197
6305
  ), () => ( null)) : null;
6198
6306
  const outcome = resolveBootOutcome({
6199
6307
  status,
@@ -6235,7 +6343,7 @@ function DepositFlow({
6235
6343
  if (dappImportOwner) {
6236
6344
  const plan = bootRetryPlan({
6237
6345
  setupStatus: readSetupForOwner(snapshot.setup, dappImportOwner).status,
6238
- availabilityEntry: _optionalChain([snapshot, 'access', _185 => _185.dappImport, 'access', _186 => _186.availabilityOwner, 'optionalAccess', _187 => _187.toLowerCase, 'call', _188 => _188()]) === dappImportOwner.toLowerCase() ? snapshot.dappImport.availability[providerId] : void 0
6346
+ availabilityEntry: _optionalChain([snapshot, 'access', _204 => _204.dappImport, 'access', _205 => _205.availabilityOwner, 'optionalAccess', _206 => _206.toLowerCase, 'call', _207 => _207()]) === dappImportOwner.toLowerCase() ? snapshot.dappImport.availability[providerId] : void 0
6239
6347
  });
6240
6348
  if (plan.restartSetup) {
6241
6349
  storeApi.dispatch({
@@ -6316,7 +6424,7 @@ function DepositFlow({
6316
6424
  swappedUrlPrefetchRef.current.clear();
6317
6425
  }, [dappAddress]);
6318
6426
  const handleNewDeposit = _react.useCallback.call(void 0, () => {
6319
- _optionalChain([onLifecycleRef, 'access', _189 => _189.current, 'optionalCall', _190 => _190({
6427
+ _optionalChain([onLifecycleRef, 'access', _208 => _208.current, 'optionalCall', _209 => _209({
6320
6428
  type: "smart-account-changed",
6321
6429
  evm: null,
6322
6430
  solana: null
@@ -6362,13 +6470,13 @@ function DepositFlow({
6362
6470
  };
6363
6471
  push(dappAddress);
6364
6472
  push(connectedWalletAddress);
6365
- push(_optionalChain([reownWallet, 'optionalAccess', _191 => _191.address]));
6473
+ push(_optionalChain([reownWallet, 'optionalAccess', _210 => _210.address]));
6366
6474
  push(dappImportOwner);
6367
6475
  return owners;
6368
6476
  }, [
6369
6477
  dappAddress,
6370
6478
  connectedWalletAddress,
6371
- _optionalChain([reownWallet, 'optionalAccess', _192 => _192.address]),
6479
+ _optionalChain([reownWallet, 'optionalAccess', _211 => _211.address]),
6372
6480
  dappImportOwner
6373
6481
  ]);
6374
6482
  _react.useEffect.call(void 0, () => {
@@ -6382,7 +6490,7 @@ function DepositFlow({
6382
6490
  try {
6383
6491
  sessionOwner = await resolveSessionOwner(owner);
6384
6492
  } catch (error) {
6385
- _chunkVPWWFWZTcjs.debugError.call(void 0,
6493
+ _chunkUN6MEOOAcjs.debugError.call(void 0,
6386
6494
  debug,
6387
6495
  "deposit-flow",
6388
6496
  "session-owner:resolve-failed",
@@ -6489,11 +6597,11 @@ function DepositFlow({
6489
6597
  return;
6490
6598
  }
6491
6599
  storeApi.dispatch({ type: "portfolio/loading", network, address });
6492
- const requestId = _optionalChain([readPortfolioEntry, 'call', _193 => _193(
6600
+ const requestId = _optionalChain([readPortfolioEntry, 'call', _212 => _212(
6493
6601
  storeApi.getState().portfolio,
6494
6602
  network,
6495
6603
  address
6496
- ), 'optionalAccess', _194 => _194.requestId]);
6604
+ ), 'optionalAccess', _213 => _213.requestId]);
6497
6605
  if (requestId === void 0) return;
6498
6606
  void (async () => {
6499
6607
  try {
@@ -6507,7 +6615,7 @@ function DepositFlow({
6507
6615
  requestId,
6508
6616
  totalUsd: portfolio.totalUsd
6509
6617
  });
6510
- } catch (e31) {
6618
+ } catch (e33) {
6511
6619
  storeApi.dispatch({
6512
6620
  type: "portfolio/failed",
6513
6621
  network,
@@ -6525,7 +6633,7 @@ function DepositFlow({
6525
6633
  sourceChain: data.sourceChain,
6526
6634
  amount: data.amount
6527
6635
  });
6528
- _optionalChain([onLifecycleRef, 'access', _195 => _195.current, 'optionalCall', _196 => _196({ type: "submitted", ...data })]);
6636
+ _optionalChain([onLifecycleRef, 'access', _214 => _214.current, 'optionalCall', _215 => _215({ type: "submitted", ...data })]);
6529
6637
  },
6530
6638
  [logFlow, onLifecycleRef]
6531
6639
  );
@@ -6544,8 +6652,8 @@ function DepositFlow({
6544
6652
  );
6545
6653
  const handleSolanaAmountContinue = _react.useCallback.call(void 0,
6546
6654
  (token, sourceAmount, inputAmountUsd) => {
6547
- const targetSym = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6548
- const isTargetStable = _chunkABVRVW3Pcjs.isStablecoinSymbol.call(void 0, targetSym);
6655
+ const targetSym = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6656
+ const isTargetStable = _chunkHH46H6ZIcjs.isStablecoinSymbol.call(void 0, targetSym);
6549
6657
  const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
6550
6658
  logFlow("solana:amount:continue", {
6551
6659
  token: token.symbol,
@@ -6585,7 +6693,7 @@ function DepositFlow({
6585
6693
  sourceDecimals: tokenAtSubmit.decimals,
6586
6694
  inputAmountUsd: amountUsd
6587
6695
  });
6588
- _optionalChain([onLifecycleRef, 'access', _197 => _197.current, 'optionalCall', _198 => _198({
6696
+ _optionalChain([onLifecycleRef, 'access', _216 => _216.current, 'optionalCall', _217 => _217({
6589
6697
  type: "submitted",
6590
6698
  txHash,
6591
6699
  sourceChain: "solana",
@@ -6598,7 +6706,7 @@ function DepositFlow({
6598
6706
  );
6599
6707
  const handleAssetContinue = _react.useCallback.call(void 0,
6600
6708
  (asset) => {
6601
- _optionalChain([onEventRef, 'access', _199 => _199.current, 'optionalCall', _200 => _200({
6709
+ _optionalChain([onEventRef, 'access', _218 => _218.current, 'optionalCall', _219 => _219({
6602
6710
  type: "deposit_modal_connected_wallet_select_source_cta_click",
6603
6711
  total_balance_in_external_wallet: totalBalanceUsd,
6604
6712
  pred_balance: totalBalanceUsd,
@@ -6621,8 +6729,8 @@ function DepositFlow({
6621
6729
  activeOwner
6622
6730
  );
6623
6731
  if (entry.status !== "ready") return;
6624
- const targetSym = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6625
- const isTargetStable = _chunkABVRVW3Pcjs.isStablecoinSymbol.call(void 0, targetSym);
6732
+ const targetSym = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6733
+ const isTargetStable = _chunkHH46H6ZIcjs.isStablecoinSymbol.call(void 0, targetSym);
6626
6734
  const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
6627
6735
  storeApi.dispatch({
6628
6736
  type: "amount/entered",
@@ -6636,7 +6744,7 @@ function DepositFlow({
6636
6744
  [targetToken, targetChain, storeApi, activeOwner]
6637
6745
  );
6638
6746
  const handleDepositSubmitted = _react.useCallback.call(void 0,
6639
- (txHash, chainId, amount, token) => {
6747
+ (txHash, chainId, amount, token, quoteFeeBreakdown) => {
6640
6748
  logFlow("evm:submitted", {
6641
6749
  txHash,
6642
6750
  sourceChain: chainId,
@@ -6652,10 +6760,11 @@ function DepositFlow({
6652
6760
  sourceChain: chainId,
6653
6761
  sourceToken: token,
6654
6762
  amount,
6655
- sourceSymbol: _optionalChain([asset, 'optionalAccess', _201 => _201.symbol]),
6656
- sourceDecimals: _optionalChain([asset, 'optionalAccess', _202 => _202.decimals]),
6763
+ sourceSymbol: _optionalChain([asset, 'optionalAccess', _220 => _220.symbol]),
6764
+ sourceDecimals: _optionalChain([asset, 'optionalAccess', _221 => _221.decimals]),
6657
6765
  inputAmountUsd: _nullishCoalesce(depositAtSubmit.inputAmountUsd, () => ( void 0)),
6658
- directTransfer: !dappImport && isSameRoute2(chainId, token, targetChain, targetToken)
6766
+ directTransfer: !dappImport && isSameRoute2(chainId, token, targetChain, targetToken),
6767
+ quoteFeeBreakdown
6659
6768
  });
6660
6769
  },
6661
6770
  [logFlow, storeApi, targetChain, targetToken]
@@ -6670,10 +6779,12 @@ function DepositFlow({
6670
6779
  const stateAtComplete = storeApi.getState();
6671
6780
  const swappedContext = stateAtComplete.flow.mode === "exchange-connect" ? {
6672
6781
  variant: "connect",
6673
- method: stateAtComplete.exchange.selectedConnection
6782
+ method: stateAtComplete.exchange.selectedConnection,
6783
+ expectedOrderUuid: info.expectedOrderUuid
6674
6784
  } : stateAtComplete.flow.mode === "fiat-onramp" ? {
6675
6785
  variant: "fiat",
6676
- method: stateAtComplete.fiat.selectedMethod
6786
+ method: stateAtComplete.fiat.selectedMethod,
6787
+ expectedOrderUuid: info.expectedOrderUuid
6677
6788
  } : void 0;
6678
6789
  storeApi.dispatch({
6679
6790
  type: "deposit/submitted",
@@ -6686,25 +6797,40 @@ function DepositFlow({
6686
6797
  swappedContext,
6687
6798
  initialEvent: info.initialEvent
6688
6799
  });
6689
- _optionalChain([onLifecycleRef, 'access', _203 => _203.current, 'optionalCall', _204 => _204({
6800
+ _optionalChain([onLifecycleRef, 'access', _222 => _222.current, 'optionalCall', _223 => _223({
6690
6801
  type: "submitted",
6691
6802
  txHash: info.txHash,
6692
6803
  sourceChain: SWAPPED_SOURCE_CHAIN,
6693
6804
  amount,
6694
6805
  sourceDecimals: SWAPPED_SOURCE_DECIMALS
6695
6806
  })]);
6807
+ void (async () => {
6808
+ const quoteFeeBreakdown = await fetchQuoteFeeBreakdown({
6809
+ service,
6810
+ account: info.smartAccount,
6811
+ sourceChainId: SWAPPED_SOURCE_CHAIN,
6812
+ sourceToken: SWAPPED_SOURCE_TOKEN,
6813
+ amount
6814
+ });
6815
+ if (!quoteFeeBreakdown) return;
6816
+ storeApi.dispatch({
6817
+ type: "processing/quote-fee-breakdown-loaded",
6818
+ txHash: info.txHash,
6819
+ quoteFeeBreakdown
6820
+ });
6821
+ })();
6696
6822
  },
6697
- [logFlow, storeApi, onLifecycleRef]
6823
+ [logFlow, onLifecycleRef, service, storeApi]
6698
6824
  );
6699
6825
  const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
6700
6826
  (txHash, sourceChain, amount) => {
6701
6827
  const depositAtSubmit = storeApi.getState().deposit;
6702
- _optionalChain([onLifecycleRef, 'access', _205 => _205.current, 'optionalCall', _206 => _206({
6828
+ _optionalChain([onLifecycleRef, 'access', _224 => _224.current, 'optionalCall', _225 => _225({
6703
6829
  type: "submitted",
6704
6830
  txHash,
6705
6831
  sourceChain,
6706
6832
  amount,
6707
- sourceDecimals: _optionalChain([depositAtSubmit, 'access', _207 => _207.selectedAsset, 'optionalAccess', _208 => _208.decimals]),
6833
+ sourceDecimals: _optionalChain([depositAtSubmit, 'access', _226 => _226.selectedAsset, 'optionalAccess', _227 => _227.decimals]),
6708
6834
  amountUsd: _nullishCoalesce(depositAtSubmit.inputAmountUsd, () => ( void 0))
6709
6835
  })]);
6710
6836
  },
@@ -6713,7 +6839,7 @@ function DepositFlow({
6713
6839
  const handleDepositComplete = _react.useCallback.call(void 0,
6714
6840
  (txHash, destinationTxHash, context) => {
6715
6841
  logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
6716
- _optionalChain([onLifecycleRef, 'access', _209 => _209.current, 'optionalCall', _210 => _210({
6842
+ _optionalChain([onLifecycleRef, 'access', _228 => _228.current, 'optionalCall', _229 => _229({
6717
6843
  type: "complete",
6718
6844
  txHash,
6719
6845
  destinationTxHash,
@@ -6725,14 +6851,14 @@ function DepositFlow({
6725
6851
  const handleDepositFailed = _react.useCallback.call(void 0,
6726
6852
  (txHash, error) => {
6727
6853
  logFlowError("deposit:failed", error, { txHash });
6728
- _optionalChain([onLifecycleRef, 'access', _211 => _211.current, 'optionalCall', _212 => _212({ type: "failed", txHash, error })]);
6854
+ _optionalChain([onLifecycleRef, 'access', _230 => _230.current, 'optionalCall', _231 => _231({ type: "failed", txHash, error })]);
6729
6855
  },
6730
6856
  [logFlowError, onLifecycleRef]
6731
6857
  );
6732
6858
  const handleError = _react.useCallback.call(void 0,
6733
6859
  (message, code) => {
6734
6860
  logFlowError("flow:error", message, { code });
6735
- _optionalChain([onErrorRef, 'access', _213 => _213.current, 'optionalCall', _214 => _214({ message, code })]);
6861
+ _optionalChain([onErrorRef, 'access', _232 => _232.current, 'optionalCall', _233 => _233({ message, code })]);
6736
6862
  },
6737
6863
  [logFlowError, onErrorRef]
6738
6864
  );
@@ -6790,8 +6916,8 @@ function DepositFlow({
6790
6916
  address: _nullishCoalesce(_nullishCoalesce(option.address, () => ( option.solanaAddress)), () => ( option.id)),
6791
6917
  state,
6792
6918
  errorReason: _nullishCoalesce(entry.message, () => ( void 0)),
6793
- balanceStatus: _nullishCoalesce(_optionalChain([portfolioEntry, 'optionalAccess', _215 => _215.status]), () => ( "loading")),
6794
- balanceUsd: _optionalChain([portfolioEntry, 'optionalAccess', _216 => _216.status]) === "ready" ? portfolioEntry.totalUsd : null
6919
+ balanceStatus: _nullishCoalesce(_optionalChain([portfolioEntry, 'optionalAccess', _234 => _234.status]), () => ( "loading")),
6920
+ balanceUsd: _optionalChain([portfolioEntry, 'optionalAccess', _235 => _235.status]) === "ready" ? portfolioEntry.totalUsd : null
6795
6921
  };
6796
6922
  });
6797
6923
  }, [walletOptions, setupSlice, dappAddress, portfolioSlice]);
@@ -6808,7 +6934,7 @@ function DepositFlow({
6808
6934
  );
6809
6935
  if (showConnectStep) {
6810
6936
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6811
- _chunkVPWWFWZTcjs.ConnectStep,
6937
+ _chunkUN6MEOOAcjs.ConnectStep,
6812
6938
  {
6813
6939
  walletRows,
6814
6940
  transferCryptoState: dappAddress ? transferCryptoState : void 0,
@@ -6841,7 +6967,7 @@ function DepositFlow({
6841
6967
  },
6842
6968
  dappImports: connectStepDappImports,
6843
6969
  onSelectDappImport: (providerId) => {
6844
- const availabilityEntry = dappImportOwner && _optionalChain([dappImportAvailabilityOwner, 'optionalAccess', _217 => _217.toLowerCase, 'call', _218 => _218()]) === dappImportOwner.toLowerCase() ? dappImportAvailability[providerId] : void 0;
6970
+ const availabilityEntry = dappImportOwner && _optionalChain([dappImportAvailabilityOwner, 'optionalAccess', _236 => _236.toLowerCase, 'call', _237 => _237()]) === dappImportOwner.toLowerCase() ? dappImportAvailability[providerId] : void 0;
6845
6971
  if (availabilityEntry === "error") {
6846
6972
  storeApi.dispatch({
6847
6973
  type: "dapp-import/availability-retry-requested"
@@ -6892,9 +7018,9 @@ function DepositFlow({
6892
7018
  onDepositComplete: handleDepositComplete,
6893
7019
  onDepositFailed: handleDepositFailed,
6894
7020
  onCopyAddress: () => {
6895
- const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
6896
- const tokenSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6897
- _optionalChain([onEvent, 'optionalCall', _219 => _219({
7021
+ const chainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChain);
7022
+ const tokenSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
7023
+ _optionalChain([onEvent, 'optionalCall', _238 => _238({
6898
7024
  type: "deposit_modal_transfer_crypto_cta_click",
6899
7025
  default_chain: chainName,
6900
7026
  default_token: tokenSymbol,
@@ -6936,11 +7062,12 @@ function DepositFlow({
6936
7062
  onClose: _nullishCoalesce(onClose, () => ( (() => {
6937
7063
  }))),
6938
7064
  onGoBack: handleBack,
6939
- onError: handleError
7065
+ onError: handleError,
7066
+ onImmersiveChange: onSwappedImmersiveChange
6940
7067
  }
6941
7068
  ),
6942
7069
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6943
- _chunkVPWWFWZTcjs.ProcessingStep,
7070
+ _chunkUN6MEOOAcjs.ProcessingStep,
6944
7071
  {
6945
7072
  smartAccount: step.smartAccount,
6946
7073
  solanaDepositAddress: step.solanaDepositAddress,
@@ -6954,10 +7081,12 @@ function DepositFlow({
6954
7081
  sourceDecimals: step.sourceDecimals,
6955
7082
  amountUsd: step.inputAmountUsd,
6956
7083
  swappedContext: step.swappedContext,
7084
+ quoteFeeBreakdown: step.quoteFeeBreakdown,
6957
7085
  service,
6958
7086
  directTransfer: step.directTransfer,
6959
7087
  initialEvent: step.initialEvent,
6960
7088
  isSwappedOrder: true,
7089
+ uiConfig,
6961
7090
  onClose,
6962
7091
  onNewDeposit: handleNewDeposit,
6963
7092
  onDepositComplete: handleDepositComplete,
@@ -7005,11 +7134,12 @@ function DepositFlow({
7005
7134
  onClose: _nullishCoalesce(onClose, () => ( (() => {
7006
7135
  }))),
7007
7136
  onGoBack: handleBack,
7008
- onError: handleError
7137
+ onError: handleError,
7138
+ onImmersiveChange: onSwappedImmersiveChange
7009
7139
  }
7010
7140
  ),
7011
7141
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7012
- _chunkVPWWFWZTcjs.ProcessingStep,
7142
+ _chunkUN6MEOOAcjs.ProcessingStep,
7013
7143
  {
7014
7144
  smartAccount: step.smartAccount,
7015
7145
  solanaDepositAddress: step.solanaDepositAddress,
@@ -7023,10 +7153,12 @@ function DepositFlow({
7023
7153
  sourceDecimals: step.sourceDecimals,
7024
7154
  amountUsd: step.inputAmountUsd,
7025
7155
  swappedContext: step.swappedContext,
7156
+ quoteFeeBreakdown: step.quoteFeeBreakdown,
7026
7157
  service,
7027
7158
  directTransfer: step.directTransfer,
7028
7159
  initialEvent: step.initialEvent,
7029
7160
  isSwappedOrder: true,
7161
+ uiConfig,
7030
7162
  onClose,
7031
7163
  onNewDeposit: handleNewDeposit,
7032
7164
  onDepositComplete: handleDepositComplete,
@@ -7041,8 +7173,8 @@ function DepositFlow({
7041
7173
  }
7042
7174
  if (isSolanaWalletMode) {
7043
7175
  if (!dappAddress) return null;
7044
- const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _220 => _220.solanaAddress]);
7045
- const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _221 => _221.solanaProvider]);
7176
+ const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _239 => _239.solanaAddress]);
7177
+ const solanaProvider = _optionalChain([reownWallet, 'optionalAccess', _240 => _240.solanaProvider]);
7046
7178
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
7047
7179
  effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7048
7180
  AccountPreparingSkeleton,
@@ -7074,10 +7206,10 @@ function DepositFlow({
7074
7206
  defaultAmount: effectiveStep.inputAmountUsd,
7075
7207
  uiConfig,
7076
7208
  targetChain,
7077
- targetChainName: _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain),
7078
- targetTokenSymbol: _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain),
7079
- targetTokenIcon: _chunkABVRVW3Pcjs.getTokenIcon.call(void 0,
7080
- _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain)
7209
+ targetChainName: _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChain),
7210
+ targetTokenSymbol: _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain),
7211
+ targetTokenIcon: _chunkHH46H6ZIcjs.getTokenIcon.call(void 0,
7212
+ _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain)
7081
7213
  ),
7082
7214
  appBalanceUsd,
7083
7215
  onContinue: handleSolanaAmountContinue,
@@ -7099,7 +7231,7 @@ function DepositFlow({
7099
7231
  targetToken,
7100
7232
  service,
7101
7233
  solanaProvider,
7102
- solanaConnection: _optionalChain([reownWallet, 'optionalAccess', _222 => _222.solanaConnection]),
7234
+ solanaConnection: _optionalChain([reownWallet, 'optionalAccess', _241 => _241.solanaConnection]),
7103
7235
  uiConfig,
7104
7236
  onConfirm: handleSolanaConfirmed,
7105
7237
  onError: handleError,
@@ -7140,7 +7272,7 @@ function DepositFlow({
7140
7272
  ) })
7141
7273
  ] }) : null,
7142
7274
  effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7143
- _chunkVPWWFWZTcjs.ProcessingStep,
7275
+ _chunkUN6MEOOAcjs.ProcessingStep,
7144
7276
  {
7145
7277
  smartAccount: effectiveStep.smartAccount,
7146
7278
  solanaDepositAddress: effectiveStep.solanaDepositAddress,
@@ -7156,6 +7288,7 @@ function DepositFlow({
7156
7288
  service,
7157
7289
  directTransfer: effectiveStep.directTransfer,
7158
7290
  initialEvent: effectiveStep.initialEvent,
7291
+ quoteFeeBreakdown: effectiveStep.quoteFeeBreakdown,
7159
7292
  onClose,
7160
7293
  onNewDeposit: handleNewDeposit,
7161
7294
  onDepositComplete: handleDepositComplete,
@@ -7176,7 +7309,7 @@ function DepositFlow({
7176
7309
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7177
7310
  DappImportAssetSelectSkeleton,
7178
7311
  {
7179
- sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportProvider, 'optionalAccess', _223 => _223.sourceLabel]), () => ( "")),
7312
+ sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportProvider, 'optionalAccess', _242 => _242.sourceLabel]), () => ( "")),
7180
7313
  error: dappImportBootError,
7181
7314
  onRetry: handleBootRetry
7182
7315
  }
@@ -7184,16 +7317,16 @@ function DepositFlow({
7184
7317
  }
7185
7318
  );
7186
7319
  }
7187
- if (!_optionalChain([signerContext, 'optionalAccess', _224 => _224.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _225 => _225.publicClient])) {
7320
+ if (!_optionalChain([signerContext, 'optionalAccess', _243 => _243.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _244 => _244.publicClient])) {
7188
7321
  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\u2026" }) }) }) }) });
7189
7322
  }
7190
7323
  const ownerAddress = signerContext.ownerAddress;
7191
- const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _226 => _226.walletClient, 'optionalAccess', _227 => _227.chain, 'optionalAccess', _228 => _228.id]), () => ( _optionalChain([signerContext, 'access', _229 => _229.publicClient, 'access', _230 => _230.chain, 'optionalAccess', _231 => _231.id]))), () => ( setupChainId));
7324
+ const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _245 => _245.walletClient, 'optionalAccess', _246 => _246.chain, 'optionalAccess', _247 => _247.id]), () => ( _optionalChain([signerContext, 'access', _248 => _248.publicClient, 'access', _249 => _249.chain, 'optionalAccess', _250 => _250.id]))), () => ( setupChainId));
7192
7325
  const getReadClientForChain = (chainId) => {
7193
- if (_optionalChain([signerContext, 'access', _232 => _232.publicClient, 'access', _233 => _233.chain, 'optionalAccess', _234 => _234.id]) === chainId) {
7326
+ if (_optionalChain([signerContext, 'access', _251 => _251.publicClient, 'access', _252 => _252.chain, 'optionalAccess', _253 => _253.id]) === chainId) {
7194
7327
  return signerContext.publicClient;
7195
7328
  }
7196
- return _chunkVPWWFWZTcjs.getPublicClient.call(void 0, chainId, rpcUrls);
7329
+ return _chunkUN6MEOOAcjs.getPublicClient.call(void 0, chainId, rpcUrls);
7197
7330
  };
7198
7331
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
7199
7332
  effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -7223,7 +7356,7 @@ function DepositFlow({
7223
7356
  effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7224
7357
  DappImportAssetSelectStep,
7225
7358
  {
7226
- sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportAvailability, 'access', _235 => _235.assets, 'access', _236 => _236[0], 'optionalAccess', _237 => _237.sourceLabel]), () => ( activeDappImportProvider.sourceLabel)),
7359
+ sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportAvailability, 'access', _254 => _254.assets, 'access', _255 => _255[0], 'optionalAccess', _256 => _256.sourceLabel]), () => ( activeDappImportProvider.sourceLabel)),
7227
7360
  assets: activeDappImportAvailability.assets,
7228
7361
  onSelect: handleDappImportAssetSelected
7229
7362
  }
@@ -7249,8 +7382,8 @@ function DepositFlow({
7249
7382
  service,
7250
7383
  onContinue: handleAmountContinue,
7251
7384
  onCtaClick: (ctaName) => {
7252
- const receiveSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
7253
- _optionalChain([onEvent, 'optionalCall', _238 => _238({
7385
+ const receiveSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
7386
+ _optionalChain([onEvent, 'optionalCall', _257 => _257({
7254
7387
  type: "deposit_modal_connected_wallet_enter_value_cta_click",
7255
7388
  send_token: effectiveStep.asset.symbol,
7256
7389
  receive_token: receiveSymbol,
@@ -7302,7 +7435,7 @@ function DepositFlow({
7302
7435
  }
7303
7436
  ),
7304
7437
  effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7305
- _chunkVPWWFWZTcjs.ProcessingStep,
7438
+ _chunkUN6MEOOAcjs.ProcessingStep,
7306
7439
  {
7307
7440
  smartAccount: effectiveStep.smartAccount,
7308
7441
  solanaDepositAddress: effectiveStep.solanaDepositAddress,
@@ -7318,6 +7451,7 @@ function DepositFlow({
7318
7451
  service,
7319
7452
  directTransfer: effectiveStep.directTransfer,
7320
7453
  initialEvent: effectiveStep.initialEvent,
7454
+ quoteFeeBreakdown: effectiveStep.quoteFeeBreakdown,
7321
7455
  uiConfig,
7322
7456
  onClose,
7323
7457
  onNewDeposit: handleNewDeposit,
@@ -7347,15 +7481,15 @@ function formatDate(iso) {
7347
7481
  month: "short",
7348
7482
  year: "numeric"
7349
7483
  });
7350
- } catch (e32) {
7484
+ } catch (e34) {
7351
7485
  return iso;
7352
7486
  }
7353
7487
  }
7354
7488
  function resolveChainId(value) {
7355
7489
  if (value === void 0 || value === null) return null;
7356
7490
  if (typeof value === "number") return value;
7357
- if (_chunkABVRVW3Pcjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
7358
- const parsed = _chunkABVRVW3Pcjs.parseEvmChainId.call(void 0, value);
7491
+ if (_chunkHH46H6ZIcjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
7492
+ const parsed = _chunkHH46H6ZIcjs.parseEvmChainId.call(void 0, value);
7359
7493
  if (parsed !== null) return parsed;
7360
7494
  const num = Number(value);
7361
7495
  return Number.isFinite(num) ? num : null;
@@ -7364,7 +7498,7 @@ function resolveTokenSymbol(token, chainId) {
7364
7498
  if (!token) return "";
7365
7499
  if (chainId === "solana") {
7366
7500
  const normalized = token.toLowerCase();
7367
- const matched = _chunkABVRVW3Pcjs.SOLANA_TOKENS.find(
7501
+ const matched = _chunkHH46H6ZIcjs.SOLANA_TOKENS.find(
7368
7502
  (entry) => entry.mint.toLowerCase() === normalized
7369
7503
  );
7370
7504
  if (matched) return matched.symbol;
@@ -7373,7 +7507,7 @@ function resolveTokenSymbol(token, chainId) {
7373
7507
  }
7374
7508
  }
7375
7509
  if (chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
7376
- const sym = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, token, chainId);
7510
+ const sym = _chunkHH46H6ZIcjs.getTokenSymbol.call(void 0, token, chainId);
7377
7511
  if (sym !== "Token") return sym;
7378
7512
  }
7379
7513
  return shortenHash(token);
@@ -7384,7 +7518,7 @@ function formatAmount(rawAmount, token, chainId) {
7384
7518
  if (token && chainId !== null && chainId !== void 0) {
7385
7519
  if (chainId === "solana") {
7386
7520
  const normalized = token.toLowerCase();
7387
- const matched = _chunkABVRVW3Pcjs.SOLANA_TOKENS.find(
7521
+ const matched = _chunkHH46H6ZIcjs.SOLANA_TOKENS.find(
7388
7522
  (entry) => entry.mint.toLowerCase() === normalized
7389
7523
  );
7390
7524
  if (matched) {
@@ -7393,7 +7527,7 @@ function formatAmount(rawAmount, token, chainId) {
7393
7527
  decimals = 9;
7394
7528
  }
7395
7529
  } else if (/^0x[a-fA-F0-9]{40}$/.test(token)) {
7396
- decimals = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, token, chainId);
7530
+ decimals = _chunkHH46H6ZIcjs.getTokenDecimalsByAddress.call(void 0, token, chainId);
7397
7531
  }
7398
7532
  }
7399
7533
  try {
@@ -7405,13 +7539,13 @@ function formatAmount(rawAmount, token, chainId) {
7405
7539
  let frac = fracStr.slice(0, 5).replace(/0+$/, "");
7406
7540
  if (frac.length < 2) frac = frac.padEnd(2, "0");
7407
7541
  return `${whole}.${frac}`;
7408
- } catch (e33) {
7542
+ } catch (e35) {
7409
7543
  return rawAmount;
7410
7544
  }
7411
7545
  }
7412
7546
  function getTxExplorerUrl(txHash, chainId) {
7413
7547
  if (!chainId) return null;
7414
- const base2 = _chunkABVRVW3Pcjs.getExplorerUrl.call(void 0, chainId);
7548
+ const base2 = _chunkHH46H6ZIcjs.getExplorerUrl.call(void 0, chainId);
7415
7549
  if (!base2) return null;
7416
7550
  return `${base2}/tx/${txHash}`;
7417
7551
  }
@@ -7454,7 +7588,7 @@ function DepositHistoryPanel({
7454
7588
  );
7455
7589
  const visibleDeposits = _react.useMemo.call(void 0, () => {
7456
7590
  const sourceHashes = new Set(
7457
- deposits.map((d) => _optionalChain([d, 'access', _239 => _239.sourceTxHash, 'optionalAccess', _240 => _240.toLowerCase, 'call', _241 => _241()])).filter((h) => Boolean(h))
7591
+ deposits.map((d) => _optionalChain([d, 'access', _258 => _258.sourceTxHash, 'optionalAccess', _259 => _259.toLowerCase, 'call', _260 => _260()])).filter((h) => Boolean(h))
7458
7592
  );
7459
7593
  return deposits.filter(
7460
7594
  (d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
@@ -7476,7 +7610,7 @@ function DepositHistoryPanel({
7476
7610
  className: "rs-modal-header-back",
7477
7611
  "aria-label": "Back",
7478
7612
  onClick: onClose,
7479
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ChevronLeftIcon, {})
7613
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronLeftIcon, {})
7480
7614
  }
7481
7615
  ) }),
7482
7616
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -7486,29 +7620,29 @@ function DepositHistoryPanel({
7486
7620
  className: "rs-modal-close",
7487
7621
  "aria-label": "Close",
7488
7622
  onClick: onCloseModal,
7489
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CloseIcon, {})
7623
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CloseIcon, {})
7490
7624
  }
7491
7625
  ) })
7492
7626
  ] }),
7493
7627
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen", children: [
7494
7628
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen-body", children: [
7495
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.HistoryIcon, {}), title: "History" }),
7629
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.HistoryIcon, {}), title: "History" }),
7496
7630
  isLoading && deposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
7497
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.HistoryIcon, {}) }),
7631
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.HistoryIcon, {}) }),
7498
7632
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
7499
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Spinner, { className: "rs-spinner--sm" }),
7633
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, { className: "rs-spinner--sm" }),
7500
7634
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
7501
7635
  ] })
7502
7636
  ] }),
7503
7637
  error && !isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
7504
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.AlertTriangleIcon, {}) }),
7638
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.AlertTriangleIcon, {}) }),
7505
7639
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
7506
7640
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
7507
7641
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: error })
7508
7642
  ] })
7509
7643
  ] }),
7510
7644
  !isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
7511
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.HistoryIcon, {}) }),
7645
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.HistoryIcon, {}) }),
7512
7646
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
7513
7647
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "No deposits yet" }),
7514
7648
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
@@ -7528,7 +7662,7 @@ function DepositHistoryPanel({
7528
7662
  )
7529
7663
  ] })
7530
7664
  ] }),
7531
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.PoweredBy, {})
7665
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
7532
7666
  ] })
7533
7667
  ]
7534
7668
  }
@@ -7539,12 +7673,12 @@ function HistoryCard({ deposit }) {
7539
7673
  const status = normalizeStatus(deposit.status, deposit.isSpam);
7540
7674
  const sourceChainId = resolveChainId(deposit.chain);
7541
7675
  const targetChainId = resolveChainId(deposit.targetChain);
7542
- const sourceChainName = sourceChainId ? _chunkABVRVW3Pcjs.getChainName.call(void 0, sourceChainId) : null;
7543
- const targetChainName = targetChainId ? _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChainId) : null;
7544
- const sourceChainIcon = sourceChainId ? _chunkABVRVW3Pcjs.getChainIcon.call(void 0, sourceChainId) : void 0;
7545
- const targetChainIcon = targetChainId ? _chunkABVRVW3Pcjs.getChainIcon.call(void 0, targetChainId) : void 0;
7676
+ const sourceChainName = sourceChainId ? _chunkHH46H6ZIcjs.getChainName.call(void 0, sourceChainId) : null;
7677
+ const targetChainName = targetChainId ? _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChainId) : null;
7678
+ const sourceChainIcon = sourceChainId ? _chunkHH46H6ZIcjs.getChainIcon.call(void 0, sourceChainId) : void 0;
7679
+ const targetChainIcon = targetChainId ? _chunkHH46H6ZIcjs.getChainIcon.call(void 0, targetChainId) : void 0;
7546
7680
  const sourceSymbol = resolveTokenSymbol(deposit.token, sourceChainId);
7547
- const sourceTokenIcon = sourceSymbol ? _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceSymbol) : void 0;
7681
+ const sourceTokenIcon = sourceSymbol ? _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, sourceSymbol) : void 0;
7548
7682
  const rawAmount = deposit.sourceAmount && deposit.sourceAmount !== "0" ? deposit.sourceAmount : deposit.amount;
7549
7683
  const formattedAmount = rawAmount ? formatAmount(rawAmount, deposit.token, sourceChainId) : null;
7550
7684
  const displayAmount = formattedAmount ? sourceSymbol && /^USD/.test(sourceSymbol) ? `$${Number(formattedAmount).toLocaleString("en-US", {
@@ -7603,7 +7737,7 @@ function HistoryCard({ deposit }) {
7603
7737
  onClick: (e) => e.stopPropagation(),
7604
7738
  children: [
7605
7739
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: shortenHash(deposit.sourceTxHash) }),
7606
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ArrowUpRightIcon, {})
7740
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ArrowUpRightIcon, {})
7607
7741
  ]
7608
7742
  }
7609
7743
  )
@@ -7618,7 +7752,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
7618
7752
  // src/DepositModal.tsx
7619
7753
 
7620
7754
  var ReownDepositInner = _react.lazy.call(void 0,
7621
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-ICBGUVAA.cjs"))).then((m) => ({ default: m.DepositModalReown }))
7755
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-CHVDFNEX.cjs"))).then((m) => ({ default: m.DepositModalReown }))
7622
7756
  );
7623
7757
  function sortByCreatedAtDesc(items) {
7624
7758
  return [...items].sort((a, b) => {
@@ -7667,9 +7801,9 @@ function DepositModalInner({
7667
7801
  defaultAmount,
7668
7802
  recipient,
7669
7803
  appBalanceUsd,
7670
- backendUrl = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL,
7804
+ backendUrl = _chunkHH46H6ZIcjs.DEFAULT_BACKEND_URL,
7671
7805
  rpcUrls: rpcUrlsProp,
7672
- signerAddress = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS,
7806
+ signerAddress = _chunkHH46H6ZIcjs.DEFAULT_SIGNER_ADDRESS,
7673
7807
  sessionChainIds,
7674
7808
  forceRegister = false,
7675
7809
  enableSolana = true,
@@ -7696,12 +7830,13 @@ function DepositModalInner({
7696
7830
  debug
7697
7831
  }) {
7698
7832
  const modalRef = _react.useRef.call(void 0, null);
7699
- const onReadyRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onReady);
7833
+ const onReadyRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onReady);
7700
7834
  const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
7835
+ const [swappedImmersive, setSwappedImmersive] = _react.useState.call(void 0, false);
7701
7836
  const [backHandler, setBackHandler] = _react.useState.call(void 0,
7702
7837
  void 0
7703
7838
  );
7704
- const showHistoryButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _242 => _242.showHistoryButton]), () => ( false));
7839
+ const showHistoryButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _261 => _261.showHistoryButton]), () => ( false));
7705
7840
  const historyButtonVisible = showHistoryButton && (currentScreen === "select-asset" || currentScreen === "deposit-address");
7706
7841
  const [historyOpen, setHistoryOpen] = _react.useState.call(void 0, false);
7707
7842
  const [historyDeposits, setHistoryDeposits] = _react.useState.call(void 0, []);
@@ -7712,23 +7847,23 @@ function DepositModalInner({
7712
7847
  const cursorRef = _react.useRef.call(void 0, null);
7713
7848
  const historyStaleRef = _react.useRef.call(void 0, false);
7714
7849
  const historyLoadedRef = _react.useRef.call(void 0, false);
7715
- const targetChain = targetChainProp === "solana" ? "solana" : _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
7716
- const sourceChain = sourceChainProp ? _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp) : void 0;
7717
- const rpcUrls = _chunkVPWWFWZTcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
7850
+ const targetChain = targetChainProp === "solana" ? "solana" : _chunkHH46H6ZIcjs.getChainId.call(void 0, targetChainProp);
7851
+ const sourceChain = sourceChainProp ? _chunkHH46H6ZIcjs.getChainId.call(void 0, sourceChainProp) : void 0;
7852
+ const rpcUrls = _chunkUN6MEOOAcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
7718
7853
  const [recipientIsContract, setRecipientIsContract] = _react.useState.call(void 0, false);
7719
- const onErrorRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onError);
7854
+ const onErrorRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onError);
7720
7855
  _react.useEffect.call(void 0, () => {
7721
- if (targetChain !== _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID || !_viem.isAddress.call(void 0, recipient, { strict: false })) {
7856
+ if (targetChain !== _chunkHH46H6ZIcjs.HYPERCORE_CHAIN_ID || !_viem.isAddress.call(void 0, recipient, { strict: false })) {
7722
7857
  setRecipientIsContract(false);
7723
7858
  return;
7724
7859
  }
7725
7860
  let cancelled = false;
7726
- _chunkVPWWFWZTcjs.getHyperEvmReadClient.call(void 0, rpcUrls).getCode({ address: recipient }).then((code) => {
7861
+ _chunkUN6MEOOAcjs.getHyperEvmReadClient.call(void 0, rpcUrls).getCode({ address: recipient }).then((code) => {
7727
7862
  if (cancelled) return;
7728
- const isContract = _chunkABVRVW3Pcjs.isContractBytecode.call(void 0, code);
7863
+ const isContract = _chunkHH46H6ZIcjs.isContractBytecode.call(void 0, code);
7729
7864
  setRecipientIsContract(isContract);
7730
7865
  if (isContract) {
7731
- _optionalChain([onErrorRef, 'access', _243 => _243.current, 'optionalCall', _244 => _244({
7866
+ _optionalChain([onErrorRef, 'access', _262 => _262.current, 'optionalCall', _263 => _263({
7732
7867
  message: "HyperCore deposits require an EOA recipient; the configured recipient is a smart contract.",
7733
7868
  code: "HYPERCORE_RECIPIENT_NOT_EOA"
7734
7869
  })]);
@@ -7741,12 +7876,30 @@ function DepositModalInner({
7741
7876
  };
7742
7877
  }, [targetChain, recipient, onErrorRef, rpcUrls]);
7743
7878
  const service = _react.useMemo.call(void 0,
7744
- () => _chunkVPWWFWZTcjs.createDepositService.call(void 0, backendUrl, {
7879
+ () => _chunkUN6MEOOAcjs.createDepositService.call(void 0, backendUrl, {
7745
7880
  debug,
7746
7881
  debugScope: "service:deposit"
7747
7882
  }),
7748
7883
  [backendUrl, debug]
7749
7884
  );
7885
+ const [clientSetup, setClientSetup] = _react.useState.call(void 0,
7886
+ null
7887
+ );
7888
+ _react.useEffect.call(void 0, () => {
7889
+ if (!isOpen) return;
7890
+ let active = true;
7891
+ service.getSetup().then((config) => {
7892
+ if (active) setClientSetup(config);
7893
+ });
7894
+ return () => {
7895
+ active = false;
7896
+ };
7897
+ }, [isOpen, service]);
7898
+ _react.useEffect.call(void 0, () => {
7899
+ if (debug && clientSetup) {
7900
+ console.debug("[deposit] client setup config (not shown yet)", clientSetup);
7901
+ }
7902
+ }, [debug, clientSetup]);
7750
7903
  const store = _react.useMemo.call(void 0,
7751
7904
  () => createDepositStore({ targetChain, targetToken }),
7752
7905
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -7757,12 +7910,12 @@ function DepositModalInner({
7757
7910
  }, [store, targetChain, targetToken]);
7758
7911
  _react.useEffect.call(void 0, () => {
7759
7912
  if (isOpen && modalRef.current) {
7760
- _chunkVPWWFWZTcjs.applyTheme.call(void 0, modalRef.current, theme);
7913
+ _chunkUN6MEOOAcjs.applyTheme.call(void 0, modalRef.current, theme);
7761
7914
  }
7762
7915
  }, [isOpen, theme]);
7763
7916
  _react.useEffect.call(void 0, () => {
7764
7917
  if (isOpen) {
7765
- _optionalChain([onReadyRef, 'access', _245 => _245.current, 'optionalCall', _246 => _246()]);
7918
+ _optionalChain([onReadyRef, 'access', _264 => _264.current, 'optionalCall', _265 => _265()]);
7766
7919
  }
7767
7920
  }, [isOpen, onReadyRef]);
7768
7921
  const handleStepChange = _react.useCallback.call(void 0,
@@ -7838,10 +7991,10 @@ function DepositModalInner({
7838
7991
  fetchHistory("initial");
7839
7992
  }
7840
7993
  }, [historyOpen, fetchHistory]);
7841
- const onLifecycleRef = _chunkVPWWFWZTcjs.useLatestRef.call(void 0, onLifecycle);
7994
+ const onLifecycleRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onLifecycle);
7842
7995
  const handleLifecycle = _react.useCallback.call(void 0,
7843
7996
  (event) => {
7844
- _optionalChain([onLifecycleRef, 'access', _247 => _247.current, 'optionalCall', _248 => _248(event)]);
7997
+ _optionalChain([onLifecycleRef, 'access', _266 => _266.current, 'optionalCall', _267 => _267(event)]);
7845
7998
  if (event.type === "smart-account-changed" && !event.evm && !event.solana) {
7846
7999
  historyStaleRef.current = true;
7847
8000
  }
@@ -7860,6 +8013,9 @@ function DepositModalInner({
7860
8013
  cursorRef.current = null;
7861
8014
  historyStaleRef.current = false;
7862
8015
  historyLoadedRef.current = false;
8016
+ setCurrentScreen("connect");
8017
+ setBackHandler(void 0);
8018
+ setSwappedImmersive(false);
7863
8019
  }
7864
8020
  }, [isOpen]);
7865
8021
  _react.useEffect.call(void 0, () => {
@@ -7867,18 +8023,20 @@ function DepositModalInner({
7867
8023
  store.dispatch({ type: "flow/reset" });
7868
8024
  }
7869
8025
  }, [isOpen, store]);
7870
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _249 => _249.showBackButton]), () => ( true));
8026
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _268 => _268.showBackButton]), () => ( true));
7871
8027
  const canGoBack = backHandler !== void 0;
7872
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7873
- _chunkVPWWFWZTcjs.Modal,
8028
+ const hideHeaderChrome = swappedImmersive;
8029
+ const modalClassName = `rs-modal${hideHeaderChrome ? " rs-modal--swapped-iframe" : ""}`;
8030
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8031
+ _chunkUN6MEOOAcjs.Modal,
7874
8032
  {
7875
8033
  isOpen,
7876
8034
  onClose,
7877
8035
  className,
7878
8036
  inline,
7879
8037
  closeOnOverlayClick,
7880
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: modalRef, className: "rs-modal", children: [
7881
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header--redesigned", children: [
8038
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: modalRef, className: modalClassName, children: [
8039
+ !hideHeaderChrome && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header--redesigned", children: [
7882
8040
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7883
8041
  "button",
7884
8042
  {
@@ -7886,7 +8044,7 @@ function DepositModalInner({
7886
8044
  className: "rs-modal-header-back",
7887
8045
  "aria-label": "Go back",
7888
8046
  onClick: backHandler,
7889
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.ChevronLeftIcon, {})
8047
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronLeftIcon, {})
7890
8048
  }
7891
8049
  ) }),
7892
8050
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
@@ -7898,7 +8056,7 @@ function DepositModalInner({
7898
8056
  "aria-label": "Deposit history",
7899
8057
  onClick: handleHistoryOpen,
7900
8058
  disabled: !recipient,
7901
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.HistoryIcon, {})
8059
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.HistoryIcon, {})
7902
8060
  }
7903
8061
  ),
7904
8062
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -7908,12 +8066,12 @@ function DepositModalInner({
7908
8066
  onClick: onClose,
7909
8067
  className: "rs-modal-close",
7910
8068
  "aria-label": "Close",
7911
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.CloseIcon, {})
8069
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CloseIcon, {})
7912
8070
  }
7913
8071
  )
7914
8072
  ] })
7915
8073
  ] }),
7916
- recipientIsContract ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVPWWFWZTcjs.Callout, { variant: "error", children: "HyperCore deposits require an EOA recipient. The configured recipient is a smart contract, which is not supported." }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8074
+ recipientIsContract ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: "HyperCore deposits require an EOA recipient. The configured recipient is a smart contract, which is not supported." }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7917
8075
  DepositFlow,
7918
8076
  {
7919
8077
  dappWalletClient,
@@ -7947,6 +8105,7 @@ function DepositModalInner({
7947
8105
  uiConfig,
7948
8106
  allowedRoutes,
7949
8107
  onStepChange: handleStepChange,
8108
+ onSwappedImmersiveChange: setSwappedImmersive,
7950
8109
  onClose,
7951
8110
  onLifecycle: handleLifecycle,
7952
8111
  onEvent,