@rhinestone/deposit-modal 0.6.0 → 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-J3KYAOD3.cjs → DepositModalReown-CHVDFNEX.cjs} +9 -9
  2. package/dist/{DepositModalReown-YD7TLEAA.mjs → DepositModalReown-T4RRW5FM.mjs} +6 -6
  3. package/dist/{WithdrawModalReown-ZPDMX47Z.mjs → WithdrawModalReown-Q6MUMZTX.mjs} +5 -5
  4. package/dist/{WithdrawModalReown-QSQUV6HX.cjs → WithdrawModalReown-YZMZTN6E.cjs} +8 -8
  5. package/dist/{chunk-FJWLC4AM.mjs → chunk-4JLYWRQA.mjs} +1 -1
  6. package/dist/{chunk-YYIE5U5K.cjs → chunk-6P3WNDED.cjs} +10 -8
  7. package/dist/{chunk-3JVGI7FC.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-DXGM6YET.mjs → chunk-J52W34Y7.mjs} +6 -4
  11. package/dist/{chunk-F7P4MV72.mjs → chunk-K6J3RDDK.mjs} +1 -1
  12. package/dist/{chunk-DASS33PJ.cjs → chunk-KUURQOTT.cjs} +100 -100
  13. package/dist/{chunk-GQDVHMOT.mjs → chunk-OYPFPEIT.mjs} +333 -54
  14. package/dist/{chunk-7LVI3VAL.cjs → chunk-QSMPJQTX.cjs} +698 -529
  15. package/dist/{chunk-UEKPBRBY.cjs → chunk-RLMXWLF4.cjs} +3 -3
  16. package/dist/{chunk-ZDYV536Q.cjs → chunk-UN6MEOOA.cjs} +382 -103
  17. package/dist/{chunk-NSAODZSS.mjs → chunk-UZENNYHS.mjs} +242 -73
  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 +103 -31
  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 _chunkZDYV536Qcjs = require('./chunk-ZDYV536Q.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 _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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 _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.BodyHeader,
265
+ _chunkUN6MEOOAcjs.BodyHeader,
259
266
  {
260
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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 ? _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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(_chunkZDYV536Qcjs.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 _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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: _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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(_chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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(_chunkZDYV536Qcjs.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 (_chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.getEventTxHash.call(void 0, event);
1132
+ const eventTxHash = _chunkUN6MEOOAcjs.getEventTxHash.call(void 0, event);
1119
1133
  if (!eventTxHash) return false;
1120
- return _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onComplete);
1213
- const onFailedRef = _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkZDYV536Qcjs.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 || !_chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1856
- _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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
- _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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 = _chunkZDYV536Qcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkZDYV536Qcjs.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 || !_chunkZDYV536Qcjs.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) {
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]);
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 (_chunkZDYV536Qcjs.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: _chunkZDYV536Qcjs.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,32 +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(_chunkZDYV536Qcjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null))
2450
- });
2451
- }, [latestEvent, orderState]);
2500
+ amount: _nullishCoalesce(_chunkUN6MEOOAcjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null)),
2501
+ expectedOrderUuid: expectedOrderUuidRef.current,
2502
+ initialEvent: _nullishCoalesce(latestEvent, () => ( void 0))
2503
+ };
2504
+ completeTimeoutRef.current = setTimeout(() => {
2505
+ completeTimeoutRef.current = null;
2506
+ onSwappedCompleteRef.current(info);
2507
+ }, SWAPPED_SUCCESS_HANDOFF_DELAY_MS);
2508
+ }, [latestEvent, orderState, smartAccount]);
2452
2509
  _react.useEffect.call(void 0, () => {
2453
2510
  if (failedFiredRef.current || completeFiredRef.current) return;
2454
- if (!_chunkZDYV536Qcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
2511
+ if (!_chunkUN6MEOOAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
2455
2512
  const txHash = currentDepositTxHashRef.current;
2456
2513
  if (!txHash) return;
2457
2514
  failedFiredRef.current = true;
2458
2515
  setPhase("tracker");
2459
- _optionalChain([onSwappedFailedRef, 'access', _91 => _91.current, 'optionalCall', _92 => _92(
2516
+ _optionalChain([onSwappedFailedRef, 'access', _100 => _100.current, 'optionalCall', _101 => _101(
2460
2517
  txHash,
2461
- _chunkZDYV536Qcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
2518
+ _chunkUN6MEOOAcjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
2462
2519
  )]);
2463
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)]), []);
2464
2526
  if (phase === "tracker") {
2465
2527
  const paymentReceived = stepStates[0] === "complete";
2466
2528
  if (variant === "connect" && !terminalState && paymentReceived) {
@@ -2469,8 +2531,8 @@ function SwappedIframeStep({
2469
2531
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2470
2532
  SwappedOrderTracker,
2471
2533
  {
2472
- amount: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _93 => _93.orderCryptoAmount]), () => ( null)),
2473
- 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")),
2474
2536
  stepStates,
2475
2537
  terminal: terminalState,
2476
2538
  onRetry: () => setRetryToken((n) => n + 1),
@@ -2492,7 +2554,7 @@ function SwappedIframeStep({
2492
2554
  }
2493
2555
  )
2494
2556
  ] }),
2495
- !loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, {}) }),
2496
2558
  widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2497
2559
  "iframe",
2498
2560
  {
@@ -2507,21 +2569,21 @@ function SwappedIframeStep({
2507
2569
  retryToken
2508
2570
  )
2509
2571
  ] }) }),
2510
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
2572
+ loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2511
2573
  ] });
2512
2574
  }
2513
2575
  function deriveStepStates(swappedStatus, latestEvent) {
2514
- if (_chunkZDYV536Qcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
2576
+ if (_chunkUN6MEOOAcjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
2515
2577
  return ["complete", "complete", "failed", "pending"];
2516
2578
  }
2517
2579
  if (swappedStatus === "order_cancelled") {
2518
2580
  return ["failed", "pending", "pending", "pending"];
2519
2581
  }
2520
2582
  const step1Complete = swappedStatus === "order_completed" || swappedStatus === "order_broadcasted";
2521
- const step2Complete = latestEvent !== null;
2522
- 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";
2523
2585
  if (step3Complete) {
2524
- return ["complete", "complete", "complete", "pending"];
2586
+ return ["complete", "complete", "complete", "complete"];
2525
2587
  }
2526
2588
  if (step2Complete) {
2527
2589
  return ["complete", "complete", "active", "pending"];
@@ -2570,10 +2632,11 @@ function FiatOnrampStep({
2570
2632
  onSwappedFailed,
2571
2633
  onClose,
2572
2634
  onGoBack,
2573
- onError
2635
+ onError,
2636
+ onImmersiveChange
2574
2637
  }) {
2575
2638
  const loadUrl = _react.useCallback.call(void 0, async () => {
2576
- const prefetched = _optionalChain([consumePrefetchedUrl, 'optionalCall', _96 => _96(smartAccount, paymentMethod)]);
2639
+ const prefetched = _optionalChain([consumePrefetchedUrl, 'optionalCall', _109 => _109(smartAccount, paymentMethod)]);
2577
2640
  if (prefetched) {
2578
2641
  try {
2579
2642
  const cached = await prefetched;
@@ -2601,7 +2664,8 @@ function FiatOnrampStep({
2601
2664
  onSwappedFailed,
2602
2665
  onClose,
2603
2666
  onGoBack,
2604
- onError
2667
+ onError,
2668
+ onImmersiveChange
2605
2669
  }
2606
2670
  );
2607
2671
  }
@@ -2647,7 +2711,8 @@ function ExchangeConnectStep({
2647
2711
  onSwappedFailed,
2648
2712
  onClose,
2649
2713
  onGoBack,
2650
- onError
2714
+ onError,
2715
+ onImmersiveChange
2651
2716
  }) {
2652
2717
  const loadUrl = _react.useCallback.call(void 0, async () => {
2653
2718
  const res = await service.getSwappedConnectUrl({
@@ -2671,7 +2736,8 @@ function ExchangeConnectStep({
2671
2736
  onSwappedFailed,
2672
2737
  onClose,
2673
2738
  onGoBack,
2674
- onError
2739
+ onError,
2740
+ onImmersiveChange
2675
2741
  }
2676
2742
  );
2677
2743
  }
@@ -2683,7 +2749,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
2683
2749
  function ExchangeLogo({ exchange }) {
2684
2750
  const [failed, setFailed] = _react.useState.call(void 0, false);
2685
2751
  if (!exchange.logoUrl || failed) {
2686
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.BankIcon, {});
2752
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BankIcon, {});
2687
2753
  }
2688
2754
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2689
2755
  "img",
@@ -2718,7 +2784,7 @@ function ExchangeSelectStep({
2718
2784
  const message = err instanceof Error ? err.message : "Failed to load exchanges";
2719
2785
  setExchanges([]);
2720
2786
  setError(message);
2721
- _optionalChain([onError, 'optionalCall', _97 => _97(message, "SWAPPED_CONNECT_EXCHANGES_FAILED")]);
2787
+ _optionalChain([onError, 'optionalCall', _110 => _110(message, "SWAPPED_CONNECT_EXCHANGES_FAILED")]);
2722
2788
  }).finally(() => {
2723
2789
  if (!cancelled) setLoading(false);
2724
2790
  });
@@ -2729,14 +2795,14 @@ function ExchangeSelectStep({
2729
2795
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
2730
2796
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
2731
2797
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2732
- _chunkZDYV536Qcjs.BodyHeader,
2798
+ _chunkUN6MEOOAcjs.BodyHeader,
2733
2799
  {
2734
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.UnplugIcon, {}),
2800
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.UnplugIcon, {}),
2735
2801
  title: "Connect exchange",
2736
2802
  subtitle: "Select an exchange to connect"
2737
2803
  }
2738
2804
  ),
2739
- loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, {}) }),
2740
2806
  !loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
2741
2807
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
2742
2808
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2762,7 +2828,7 @@ function ExchangeSelectStep({
2762
2828
  )
2763
2829
  ] }),
2764
2830
  !loading && !error && exchanges.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
2765
- const brand = _chunkZDYV536Qcjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
2831
+ const brand = _chunkUN6MEOOAcjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
2766
2832
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2767
2833
  "button",
2768
2834
  {
@@ -2785,7 +2851,7 @@ function ExchangeSelectStep({
2785
2851
  );
2786
2852
  }) })
2787
2853
  ] }),
2788
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
2854
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2789
2855
  ] });
2790
2856
  }
2791
2857
  ExchangeSelectStep.displayName = "ExchangeSelectStep";
@@ -2797,25 +2863,25 @@ function DepositAddressSkeleton({
2797
2863
  uiConfig,
2798
2864
  allowedRoutes
2799
2865
  }) {
2800
- const allowedChainSet = _optionalChain([allowedRoutes, 'optionalAccess', _98 => _98.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null;
2801
- 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;
2802
2868
  const evmChainIds = (() => {
2803
- const all = _chunkABVRVW3Pcjs.getSupportedChainIds.call(void 0, );
2869
+ const all = _chunkHH46H6ZIcjs.getSupportedChainIds.call(void 0, );
2804
2870
  return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
2805
2871
  })();
2806
2872
  const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
2807
2873
  const tokensForChain = (() => {
2808
- const all = _chunkABVRVW3Pcjs.getTargetTokenSymbolsForChain.call(void 0, defaultChainId);
2874
+ const all = _chunkHH46H6ZIcjs.getTargetTokenSymbolsForChain.call(void 0, defaultChainId);
2809
2875
  return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
2810
2876
  })();
2811
2877
  const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
2812
- const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, defaultChainId);
2813
- const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, defaultChainId);
2814
- 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);
2815
2881
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
2816
2882
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
2817
2883
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
2818
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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" }),
2819
2885
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
2820
2886
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
2821
2887
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
@@ -2829,7 +2895,7 @@ function DepositAddressSkeleton({
2829
2895
  }
2830
2896
  ),
2831
2897
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
2832
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2898
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2833
2899
  ] })
2834
2900
  ] }),
2835
2901
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
@@ -2837,9 +2903,9 @@ function DepositAddressSkeleton({
2837
2903
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
2838
2904
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
2839
2905
  "Min.$",
2840
- (_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _100 => _100.minDepositUsd]), () => ( 0.1))).toFixed(2),
2841
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2842
- _chunkZDYV536Qcjs.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,
2843
2909
  {
2844
2910
  className: "rs-deposit-address-min-icon",
2845
2911
  "aria-hidden": "true"
@@ -2857,7 +2923,7 @@ function DepositAddressSkeleton({
2857
2923
  }
2858
2924
  ),
2859
2925
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
2860
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2926
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
2861
2927
  ] })
2862
2928
  ] })
2863
2929
  ] }),
@@ -2878,7 +2944,7 @@ function DepositAddressSkeleton({
2878
2944
  disabled: true,
2879
2945
  "aria-hidden": "true",
2880
2946
  children: [
2881
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.CopyIcon, {}),
2947
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CopyIcon, {}),
2882
2948
  "Copy address"
2883
2949
  ]
2884
2950
  }
@@ -2891,16 +2957,16 @@ function DepositAddressSkeleton({
2891
2957
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
2892
2958
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
2893
2959
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2894
- _chunkZDYV536Qcjs.Tooltip,
2960
+ _chunkUN6MEOOAcjs.Tooltip,
2895
2961
  {
2896
2962
  className: "rs-price-impact-info",
2897
2963
  content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
2898
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.InfoIcon, { "aria-hidden": "true" })
2964
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.InfoIcon, { "aria-hidden": "true" })
2899
2965
  }
2900
2966
  )
2901
2967
  ] }),
2902
2968
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2903
- _chunkZDYV536Qcjs.ChevronDownIcon,
2969
+ _chunkUN6MEOOAcjs.ChevronDownIcon,
2904
2970
  {
2905
2971
  className: "rs-price-impact-chevron",
2906
2972
  "aria-hidden": "true"
@@ -2908,7 +2974,7 @@ function DepositAddressSkeleton({
2908
2974
  )
2909
2975
  ] }) })
2910
2976
  ] }),
2911
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
2977
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
2912
2978
  ] });
2913
2979
  }
2914
2980
  DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
@@ -2940,14 +3006,14 @@ function SolanaTokenSelectStep({
2940
3006
  setError(null);
2941
3007
  const portfolioBySymbol = {};
2942
3008
  try {
2943
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
3009
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
2944
3010
  solanaAddress
2945
3011
  });
2946
3012
  const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
2947
3013
  if (!active) return;
2948
3014
  for (const t of portfolio.tokens) {
2949
3015
  const symbol = t.symbol.toUpperCase();
2950
- if (!_chunkABVRVW3Pcjs.SOLANA_TOKENS.some((st) => st.symbol === symbol)) continue;
3016
+ if (!_chunkHH46H6ZIcjs.SOLANA_TOKENS.some((st) => st.symbol === symbol)) continue;
2951
3017
  let parsed = 0n;
2952
3018
  try {
2953
3019
  parsed = BigInt(t.balance || "0");
@@ -2963,12 +3029,12 @@ function SolanaTokenSelectStep({
2963
3029
  };
2964
3030
  }
2965
3031
  }
2966
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
3032
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
2967
3033
  symbols: Object.keys(portfolioBySymbol)
2968
3034
  });
2969
3035
  } catch (err) {
2970
3036
  if (!active) return;
2971
- _chunkZDYV536Qcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
3037
+ _chunkUN6MEOOAcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
2972
3038
  solanaAddress
2973
3039
  });
2974
3040
  setError(
@@ -2979,7 +3045,7 @@ function SolanaTokenSelectStep({
2979
3045
  return;
2980
3046
  }
2981
3047
  const results = [];
2982
- for (const token of _chunkABVRVW3Pcjs.SOLANA_TOKENS) {
3048
+ for (const token of _chunkHH46H6ZIcjs.SOLANA_TOKENS) {
2983
3049
  const fromPortfolio = portfolioBySymbol[token.symbol];
2984
3050
  if (fromPortfolio && fromPortfolio.balance > 0n) {
2985
3051
  results.push({
@@ -2993,7 +3059,7 @@ function SolanaTokenSelectStep({
2993
3059
  setTokenBalances(results);
2994
3060
  setLoading(false);
2995
3061
  const totalUsd = results.reduce((sum, r) => sum + r.balanceUsd, 0);
2996
- _optionalChain([onTotalBalanceComputed, 'optionalCall', _101 => _101(totalUsd)]);
3062
+ _optionalChain([onTotalBalanceComputed, 'optionalCall', _114 => _114(totalUsd)]);
2997
3063
  }
2998
3064
  void loadBalances();
2999
3065
  return () => {
@@ -3015,30 +3081,30 @@ function SolanaTokenSelectStep({
3015
3081
  const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
3016
3082
  const numeric = Number(raw);
3017
3083
  if (!Number.isFinite(numeric)) return raw;
3018
- return _chunkZDYV536Qcjs.tokenFormatter.format(numeric);
3084
+ return _chunkUN6MEOOAcjs.tokenFormatter.format(numeric);
3019
3085
  } catch (e22) {
3020
3086
  return "--";
3021
3087
  }
3022
3088
  };
3023
- const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, "solana");
3024
- 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");
3025
3091
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3026
3092
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
3027
3093
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3028
- _chunkZDYV536Qcjs.BodyHeader,
3094
+ _chunkUN6MEOOAcjs.BodyHeader,
3029
3095
  {
3030
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.WalletIcon, {}),
3096
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}),
3031
3097
  title: "Your assets",
3032
3098
  subtitle: "Select source assets to transfer"
3033
3099
  }
3034
3100
  ),
3035
3101
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
3036
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Spinner, { className: "rs-text-tertiary" }),
3102
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, { className: "rs-text-tertiary" }),
3037
3103
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
3038
3104
  ] }),
3039
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Callout, { variant: "error", children: error }),
3105
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
3040
3106
  !loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
3041
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.WalletIcon, { className: "rs-empty-icon" }),
3107
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, { className: "rs-empty-icon" }),
3042
3108
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
3043
3109
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
3044
3110
  solanaAddress.slice(0, 6),
@@ -3058,7 +3124,7 @@ function SolanaTokenSelectStep({
3058
3124
  !loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((entry) => {
3059
3125
  const isSelected = selectedSymbol === entry.token.symbol;
3060
3126
  const tokenAmount = formatBalance(entry);
3061
- const tokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, entry.token.symbol);
3127
+ const tokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, entry.token.symbol);
3062
3128
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3063
3129
  "button",
3064
3130
  {
@@ -3087,14 +3153,14 @@ function SolanaTokenSelectStep({
3087
3153
  ] })
3088
3154
  ] })
3089
3155
  ] }),
3090
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkZDYV536Qcjs.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}` : "--" })
3091
3157
  ]
3092
3158
  },
3093
3159
  entry.token.symbol
3094
3160
  );
3095
3161
  }) }),
3096
3162
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3097
- _chunkZDYV536Qcjs.Button,
3163
+ _chunkUN6MEOOAcjs.Button,
3098
3164
  {
3099
3165
  onClick: () => selectedEntry && onContinue(
3100
3166
  selectedEntry.token,
@@ -3107,7 +3173,7 @@ function SolanaTokenSelectStep({
3107
3173
  }
3108
3174
  )
3109
3175
  ] }),
3110
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
3176
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3111
3177
  ] });
3112
3178
  }
3113
3179
 
@@ -3139,8 +3205,8 @@ function SolanaAmountStep({
3139
3205
  const [amount, setAmount] = _react.useState.call(void 0, "");
3140
3206
  const [error, setError] = _react.useState.call(void 0, null);
3141
3207
  const hasAppliedDefaultRef = _react.useRef.call(void 0, false);
3142
- const isSourceStablecoin = _chunkABVRVW3Pcjs.isStablecoinSymbol.call(void 0, token.symbol);
3143
- 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";
3144
3210
  const tokenPriceUsd = _react.useMemo.call(void 0, () => {
3145
3211
  if (isSourceStablecoin) return 1;
3146
3212
  try {
@@ -3160,7 +3226,7 @@ function SolanaAmountStep({
3160
3226
  const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
3161
3227
  const numeric = Number(raw);
3162
3228
  if (!Number.isFinite(numeric)) return raw;
3163
- return _chunkZDYV536Qcjs.tokenFormatter.format(numeric);
3229
+ return _chunkUN6MEOOAcjs.tokenFormatter.format(numeric);
3164
3230
  } catch (e24) {
3165
3231
  return "\u2026";
3166
3232
  }
@@ -3177,7 +3243,7 @@ function SolanaAmountStep({
3177
3243
  }
3178
3244
  }, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
3179
3245
  const spendableBalance = _react.useMemo.call(void 0, () => {
3180
- if (!_chunkABVRVW3Pcjs.isNativeSol.call(void 0, token)) return balance;
3246
+ if (!_chunkHH46H6ZIcjs.isNativeSol.call(void 0, token)) return balance;
3181
3247
  return balance > SOL_FEE_RESERVE_LAMPORTS ? balance - SOL_FEE_RESERVE_LAMPORTS : 0n;
3182
3248
  }, [balance, token]);
3183
3249
  const spendableBalanceUsd = _react.useMemo.call(void 0, () => {
@@ -3242,8 +3308,8 @@ function SolanaAmountStep({
3242
3308
  return null;
3243
3309
  }
3244
3310
  }, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, token.decimals]);
3245
- 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));
3246
- 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));
3247
3313
  const isBelowMin = minDepositUsd !== null && numericAmount > 0 && numericAmount < minDepositUsd;
3248
3314
  const isAboveMax = maxDepositUsd !== null && numericAmount > maxDepositUsd;
3249
3315
  const exceedsBalance = Boolean(
@@ -3253,7 +3319,7 @@ function SolanaAmountStep({
3253
3319
  const handlePresetClick = (percentage) => {
3254
3320
  const formatted = computePresetAmount(percentage);
3255
3321
  if (!formatted) return;
3256
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
3322
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
3257
3323
  percentage,
3258
3324
  symbol: token.symbol,
3259
3325
  formatted
@@ -3288,7 +3354,7 @@ function SolanaAmountStep({
3288
3354
  try {
3289
3355
  amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
3290
3356
  } catch (e29) {
3291
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
3357
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
3292
3358
  amount,
3293
3359
  sourceAmount: sourceAmountStr,
3294
3360
  reason: "parse-units-failed"
@@ -3297,13 +3363,13 @@ function SolanaAmountStep({
3297
3363
  return;
3298
3364
  }
3299
3365
  if (amountInUnits > spendableBalance) {
3300
- const isReserveIssue = _chunkABVRVW3Pcjs.isNativeSol.call(void 0, token) && amountInUnits <= balance;
3366
+ const isReserveIssue = _chunkHH46H6ZIcjs.isNativeSol.call(void 0, token) && amountInUnits <= balance;
3301
3367
  setError(
3302
3368
  isReserveIssue ? "Use a bit less than your full SOL balance" : "Insufficient balance"
3303
3369
  );
3304
3370
  return;
3305
3371
  }
3306
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
3372
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
3307
3373
  symbol: token.symbol,
3308
3374
  inputAmountUsd: amount,
3309
3375
  sourceAmount: sourceAmountStr,
@@ -3314,10 +3380,10 @@ function SolanaAmountStep({
3314
3380
  };
3315
3381
  const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
3316
3382
  const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
3317
- const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, token.symbol);
3383
+ const sourceTokenIcon = _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, token.symbol);
3318
3384
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3319
3385
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3320
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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" }),
3321
3387
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
3322
3388
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
3323
3389
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3337,13 +3403,13 @@ function SolanaAmountStep({
3337
3403
  " available",
3338
3404
  computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3339
3405
  " (~",
3340
- _chunkZDYV536Qcjs.currencyFormatter.format(computedBalanceUsd),
3406
+ _chunkUN6MEOOAcjs.currencyFormatter.format(computedBalanceUsd),
3341
3407
  ")"
3342
3408
  ] })
3343
3409
  ] }),
3344
3410
  minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
3345
3411
  "Min. deposit ",
3346
- _chunkZDYV536Qcjs.currencyFormatter.format(minDepositUsd)
3412
+ _chunkUN6MEOOAcjs.currencyFormatter.format(minDepositUsd)
3347
3413
  ] })
3348
3414
  ] })
3349
3415
  ] }),
@@ -3382,13 +3448,13 @@ function SolanaAmountStep({
3382
3448
  ] }),
3383
3449
  balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
3384
3450
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
3385
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkZDYV536Qcjs.currencyFormatter.format(balanceAfterUsd) })
3451
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkUN6MEOOAcjs.currencyFormatter.format(balanceAfterUsd) })
3386
3452
  ] })
3387
3453
  ] }),
3388
- targetChain === _chunkABVRVW3Pcjs.HYPERCORE_CHAIN_ID && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
3389
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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 }),
3390
3456
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3391
- _chunkZDYV536Qcjs.Button,
3457
+ _chunkUN6MEOOAcjs.Button,
3392
3458
  {
3393
3459
  onClick: handleContinue,
3394
3460
  fullWidth: true,
@@ -3397,7 +3463,7 @@ function SolanaAmountStep({
3397
3463
  }
3398
3464
  )
3399
3465
  ] }),
3400
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
3466
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3401
3467
  ] });
3402
3468
  }
3403
3469
 
@@ -3420,10 +3486,10 @@ var _spltoken = require('@solana/spl-token');
3420
3486
  var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
3421
3487
  var cachedConnections = /* @__PURE__ */ new Map();
3422
3488
  function getSolanaRpcUrl(rpcUrls) {
3423
- return _nullishCoalesce(_chunkZDYV536Qcjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
3489
+ return _nullishCoalesce(_chunkUN6MEOOAcjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
3424
3490
  }
3425
3491
  function hasConfiguredSolanaRpcUrl(rpcUrls) {
3426
- return _chunkZDYV536Qcjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
3492
+ return _chunkUN6MEOOAcjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
3427
3493
  }
3428
3494
  function getSolanaConnection(rpcUrls) {
3429
3495
  const rpcUrl = getSolanaRpcUrl(rpcUrls);
@@ -3525,23 +3591,23 @@ function SolanaConfirmStep({
3525
3591
  onError,
3526
3592
  debug
3527
3593
  }) {
3528
- const rpcUrls = _chunkZDYV536Qcjs.useRpcUrls.call(void 0, );
3594
+ const rpcUrls = _chunkUN6MEOOAcjs.useRpcUrls.call(void 0, );
3529
3595
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
3530
3596
  const [error, setError] = _react.useState.call(void 0, null);
3531
- const targetSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
3532
- const sourceChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, "solana");
3533
- const targetChainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
3534
- const sourceChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, "solana");
3535
- const targetChainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, targetChain);
3536
- const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, token.symbol);
3537
- const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
3538
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _109 => _109.feeSponsored]), () => ( false));
3539
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _110 => _110.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3540
- const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkZDYV536Qcjs.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";
3541
3607
  const receiveDisplay = (() => {
3542
3608
  const usdValue = Number(targetAmount);
3543
3609
  const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
3544
- const estimate = _chunkZDYV536Qcjs.formatReceiveEstimate.call(void 0, {
3610
+ const estimate = _chunkUN6MEOOAcjs.formatReceiveEstimate.call(void 0, {
3545
3611
  sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
3546
3612
  sourceSymbol: token.symbol,
3547
3613
  targetSymbol,
@@ -3553,7 +3619,7 @@ function SolanaConfirmStep({
3553
3619
  })();
3554
3620
  const handleConfirm = async () => {
3555
3621
  if (!solanaProvider) {
3556
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3622
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3557
3623
  reason: "missing-provider"
3558
3624
  });
3559
3625
  setError("Solana wallet not connected");
@@ -3561,7 +3627,7 @@ function SolanaConfirmStep({
3561
3627
  }
3562
3628
  const parsedAmount = parseFloat(sourceAmount);
3563
3629
  if (isNaN(parsedAmount) || parsedAmount <= 0) {
3564
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3630
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3565
3631
  reason: "invalid-amount",
3566
3632
  sourceAmount
3567
3633
  });
@@ -3570,7 +3636,7 @@ function SolanaConfirmStep({
3570
3636
  }
3571
3637
  setError(null);
3572
3638
  setIsSubmitting(true);
3573
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
3639
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
3574
3640
  smartAccount,
3575
3641
  solanaAddress,
3576
3642
  solanaDepositAddress,
@@ -3580,7 +3646,7 @@ function SolanaConfirmStep({
3580
3646
  });
3581
3647
  try {
3582
3648
  const check = await service.checkAccount(smartAccount);
3583
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
3649
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
3584
3650
  smartAccount,
3585
3651
  isRegistered: check.isRegistered,
3586
3652
  targetChain: check.targetChain,
@@ -3593,12 +3659,12 @@ function SolanaConfirmStep({
3593
3659
  }
3594
3660
  const connection = hasConfiguredSolanaRpcUrl(rpcUrls) ? getSolanaConnection(rpcUrls) : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection(rpcUrls)));
3595
3661
  const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
3596
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
3662
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
3597
3663
  token: token.symbol,
3598
3664
  sourceAmount,
3599
3665
  amountUnits: amountUnits.toString()
3600
3666
  });
3601
- const transaction = _chunkABVRVW3Pcjs.isNativeSol.call(void 0, token) ? await buildSolTransferTransaction(
3667
+ const transaction = _chunkHH46H6ZIcjs.isNativeSol.call(void 0, token) ? await buildSolTransferTransaction(
3602
3668
  connection,
3603
3669
  solanaAddress,
3604
3670
  solanaDepositAddress,
@@ -3610,10 +3676,10 @@ function SolanaConfirmStep({
3610
3676
  token.mint,
3611
3677
  amountUnits
3612
3678
  );
3613
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
3679
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
3614
3680
  token: token.symbol,
3615
3681
  instructionCount: transaction.instructions.length,
3616
- 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()]),
3617
3683
  recentBlockhash: transaction.recentBlockhash
3618
3684
  });
3619
3685
  const txHash = await sendSolanaTransaction(
@@ -3621,28 +3687,28 @@ function SolanaConfirmStep({
3621
3687
  connection,
3622
3688
  transaction
3623
3689
  );
3624
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
3690
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
3625
3691
  txHash,
3626
3692
  amountUnits: amountUnits.toString()
3627
3693
  });
3628
3694
  onConfirm(txHash, amountUnits.toString());
3629
3695
  } catch (err) {
3630
3696
  const raw = err instanceof Error ? err.message : "Transfer failed";
3631
- const message = _chunkZDYV536Qcjs.formatUserError.call(void 0, raw);
3632
- _chunkZDYV536Qcjs.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, {
3633
3699
  smartAccount,
3634
3700
  token: token.symbol,
3635
3701
  sourceAmount
3636
3702
  });
3637
3703
  setError(message);
3638
- _optionalChain([onError, 'optionalCall', _114 => _114(message, "SOLANA_TRANSFER_ERROR")]);
3704
+ _optionalChain([onError, 'optionalCall', _127 => _127(message, "SOLANA_TRANSFER_ERROR")]);
3639
3705
  } finally {
3640
3706
  setIsSubmitting(false);
3641
3707
  }
3642
3708
  };
3643
3709
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3644
3710
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3645
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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" }),
3646
3712
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
3647
3713
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3648
3714
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
@@ -3690,13 +3756,13 @@ function SolanaConfirmStep({
3690
3756
  children: "$0.04"
3691
3757
  }
3692
3758
  ),
3693
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, _chunkZDYV536Qcjs.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, {}) }) })
3694
3760
  ] })
3695
3761
  ] })
3696
3762
  ] }),
3697
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Callout, { variant: "error", children: error }),
3763
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Callout, { variant: "error", children: error }),
3698
3764
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3699
- _chunkZDYV536Qcjs.Button,
3765
+ _chunkUN6MEOOAcjs.Button,
3700
3766
  {
3701
3767
  onClick: handleConfirm,
3702
3768
  loading: isSubmitting,
@@ -3707,7 +3773,7 @@ function SolanaConfirmStep({
3707
3773
  }
3708
3774
  )
3709
3775
  ] }),
3710
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
3776
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3711
3777
  ] });
3712
3778
  }
3713
3779
 
@@ -3721,21 +3787,21 @@ function DappImportAssetSelectStep({
3721
3787
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
3722
3788
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3723
3789
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3724
- _chunkZDYV536Qcjs.BodyHeader,
3790
+ _chunkUN6MEOOAcjs.BodyHeader,
3725
3791
  {
3726
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.WalletIcon, {}),
3792
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}),
3727
3793
  title: `Transfer from ${sourceLabel}`,
3728
3794
  subtitle: "Pick the balance to import"
3729
3795
  }
3730
3796
  ),
3731
3797
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
3732
- const tokenAmount = asset.balance ? _chunkZDYV536Qcjs.tokenFormatter.format(
3798
+ const tokenAmount = asset.balance ? _chunkUN6MEOOAcjs.tokenFormatter.format(
3733
3799
  Number(asset.balance) / 10 ** asset.decimals
3734
3800
  ) : "0";
3735
- const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkZDYV536Qcjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
3736
- const tokenIcon = _nullishCoalesce(asset.icon, () => ( _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, asset.symbol)));
3737
- const chainIcon = _chunkABVRVW3Pcjs.getChainIcon.call(void 0, asset.chainId);
3738
- 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);
3739
3805
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3740
3806
  "button",
3741
3807
  {
@@ -3750,7 +3816,7 @@ function DappImportAssetSelectStep({
3750
3816
  "img",
3751
3817
  {
3752
3818
  src: chainIcon,
3753
- alt: _chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)
3819
+ alt: _chunkHH46H6ZIcjs.getChainName.call(void 0, asset.chainId)
3754
3820
  }
3755
3821
  ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3756
3822
  "span",
@@ -3783,7 +3849,7 @@ function DappImportAssetSelectStep({
3783
3849
  );
3784
3850
  }) })
3785
3851
  ] }),
3786
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
3852
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3787
3853
  ] });
3788
3854
  }
3789
3855
  DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
@@ -3800,9 +3866,9 @@ function DappImportAssetSelectSkeleton({
3800
3866
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
3801
3867
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3802
3868
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3803
- _chunkZDYV536Qcjs.BodyHeader,
3869
+ _chunkUN6MEOOAcjs.BodyHeader,
3804
3870
  {
3805
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.WalletIcon, {}),
3871
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.WalletIcon, {}),
3806
3872
  title: `Transfer from ${sourceLabel}`,
3807
3873
  subtitle: "Pick the balance to import"
3808
3874
  }
@@ -3840,7 +3906,7 @@ function DappImportAssetSelectSkeleton({
3840
3906
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Try again" })
3841
3907
  }
3842
3908
  ) }),
3843
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
3909
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
3844
3910
  ] });
3845
3911
  }
3846
3912
  DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
@@ -3897,7 +3963,7 @@ async function detectPolymarketWalletKind(params) {
3897
3963
  contracts: [
3898
3964
  {
3899
3965
  address: proxyWallet,
3900
- abi: _chunkUEKPBRBYcjs.SAFE_ABI,
3966
+ abi: _chunkRLMXWLF4cjs.SAFE_ABI,
3901
3967
  functionName: "isOwner",
3902
3968
  args: [eoa]
3903
3969
  },
@@ -3930,7 +3996,7 @@ async function buildSignedDepositWalletBatch(params) {
3930
3996
  if (!account || !chain) {
3931
3997
  throw new Error("Wallet not connected");
3932
3998
  }
3933
- if (chain.id !== _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID) {
3999
+ if (chain.id !== _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID) {
3934
4000
  throw new Error("Switch to Polygon to sign");
3935
4001
  }
3936
4002
  const owner = await publicClient.readContract({
@@ -3975,14 +4041,14 @@ async function buildSignedDepositWalletBatch(params) {
3975
4041
  })),
3976
4042
  signature
3977
4043
  },
3978
- sourceToken: _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS,
4044
+ sourceToken: _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS,
3979
4045
  sourceSymbol: tokenKind === "pusd" ? "pUSD" : "USDC.e"
3980
4046
  };
3981
4047
  }
3982
4048
  function buildUsdceTransferCalls(recipient, amount) {
3983
4049
  return [
3984
4050
  {
3985
- target: _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS,
4051
+ target: _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS,
3986
4052
  value: 0n,
3987
4053
  data: _viem.encodeFunctionData.call(void 0, {
3988
4054
  abi: _viem.erc20Abi,
@@ -3995,21 +4061,21 @@ function buildUsdceTransferCalls(recipient, amount) {
3995
4061
  function buildPusdUnwrapCalls(recipient, amount) {
3996
4062
  return [
3997
4063
  {
3998
- target: _chunkNRNJAQUAcjs.POLYMARKET_PUSD_ADDRESS,
4064
+ target: _chunkXOBLFIGVcjs.POLYMARKET_PUSD_ADDRESS,
3999
4065
  value: 0n,
4000
4066
  data: _viem.encodeFunctionData.call(void 0, {
4001
4067
  abi: _viem.erc20Abi,
4002
4068
  functionName: "approve",
4003
- args: [_chunkNRNJAQUAcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, amount]
4069
+ args: [_chunkXOBLFIGVcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, amount]
4004
4070
  })
4005
4071
  },
4006
4072
  {
4007
- target: _chunkNRNJAQUAcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
4073
+ target: _chunkXOBLFIGVcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
4008
4074
  value: 0n,
4009
4075
  data: _viem.encodeFunctionData.call(void 0, {
4010
4076
  abi: COLLATERAL_OFFRAMP_ABI,
4011
4077
  functionName: "unwrap",
4012
- args: [_chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS, recipient, amount]
4078
+ args: [_chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS, recipient, amount]
4013
4079
  })
4014
4080
  }
4015
4081
  ];
@@ -4022,29 +4088,29 @@ var polymarketProvider = {
4022
4088
  label: "Transfer from Polymarket",
4023
4089
  sourceLabel: "Polymarket",
4024
4090
  icon: _react.createElement.call(void 0, "img", {
4025
- src: _chunkNRNJAQUAcjs.POLYMARKET_ICON_URL,
4091
+ src: _chunkXOBLFIGVcjs.POLYMARKET_ICON_URL,
4026
4092
  alt: "Polymarket",
4027
4093
  style: { width: 24, height: 24, borderRadius: 6 }
4028
4094
  }),
4029
- chainId: _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID,
4095
+ chainId: _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID,
4030
4096
  async fetchAvailability({ eoa, getPublicClient: getPublicClient2, signal }) {
4031
- const proxyWallet = await _chunkNRNJAQUAcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
4097
+ const proxyWallet = await _chunkXOBLFIGVcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
4032
4098
  if (!proxyWallet) return null;
4033
- if (_optionalChain([signal, 'optionalAccess', _115 => _115.aborted])) return null;
4034
- 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);
4035
4101
  if (!polygonClient) return null;
4036
- const balances = await _chunkNRNJAQUAcjs.readPolymarketBalances.call(void 0, {
4102
+ const balances = await _chunkXOBLFIGVcjs.readPolymarketBalances.call(void 0, {
4037
4103
  publicClient: polygonClient,
4038
4104
  proxyWallet
4039
4105
  });
4040
- if (_optionalChain([signal, 'optionalAccess', _116 => _116.aborted])) return null;
4106
+ if (_optionalChain([signal, 'optionalAccess', _129 => _129.aborted])) return null;
4041
4107
  if (balances.pusd === 0n && balances.usdce === 0n) return null;
4042
4108
  const walletKind = await detectPolymarketWalletKind({
4043
4109
  publicClient: polygonClient,
4044
4110
  proxyWallet,
4045
4111
  eoa
4046
4112
  });
4047
- if (_optionalChain([signal, 'optionalAccess', _117 => _117.aborted])) return null;
4113
+ if (_optionalChain([signal, 'optionalAccess', _130 => _130.aborted])) return null;
4048
4114
  if (!walletKind) return null;
4049
4115
  const assets = [];
4050
4116
  if (balances.pusd > 0n) {
@@ -4091,7 +4157,7 @@ var polymarketProvider = {
4091
4157
  const { txHash } = await backend.submitPolymarketWithdraw(payload);
4092
4158
  return { txHash, sourceToken, sourceSymbol, sourceDecimals: 6 };
4093
4159
  }
4094
- const result = await _chunkNRNJAQUAcjs.executePolymarketSafeTransfer.call(void 0, {
4160
+ const result = await _chunkXOBLFIGVcjs.executePolymarketSafeTransfer.call(void 0, {
4095
4161
  walletClient,
4096
4162
  publicClient,
4097
4163
  safeAddress: metadata.proxyWallet,
@@ -4110,17 +4176,17 @@ var polymarketProvider = {
4110
4176
  function buildAsset(params) {
4111
4177
  const { tokenKind, proxyWallet, walletKind, balance } = params;
4112
4178
  const isPusd = tokenKind === "pusd";
4113
- const tokenAddress = isPusd ? _chunkNRNJAQUAcjs.POLYMARKET_PUSD_ADDRESS : _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS;
4179
+ const tokenAddress = isPusd ? _chunkXOBLFIGVcjs.POLYMARKET_PUSD_ADDRESS : _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS;
4114
4180
  const symbol = isPusd ? "pUSD" : "USDC.e";
4115
4181
  const balanceUsd = Number(_viem.formatUnits.call(void 0, balance, 6));
4116
4182
  const metadata = { proxyWallet, tokenKind, walletKind };
4117
4183
  return {
4118
4184
  id: `polymarket:${tokenKind}`,
4119
- chainId: _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID,
4185
+ chainId: _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID,
4120
4186
  token: tokenAddress,
4121
4187
  symbol,
4122
4188
  name: isPusd ? "Polymarket USD" : "Polygon USDC.e",
4123
- icon: isPusd ? _chunkNRNJAQUAcjs.POLYMARKET_ICON_URL : void 0,
4189
+ icon: isPusd ? _chunkXOBLFIGVcjs.POLYMARKET_ICON_URL : void 0,
4124
4190
  decimals: 6,
4125
4191
  balance: balance.toString(),
4126
4192
  balanceUsd: Number.isFinite(balanceUsd) ? balanceUsd : 0,
@@ -4130,8 +4196,8 @@ function buildAsset(params) {
4130
4196
  // pUSD unwraps to USDC.e via the offramp; USDC.e is what actually
4131
4197
  // arrives at the smart account, so it's also what the orchestrator
4132
4198
  // bridges from.
4133
- depositToken: _chunkNRNJAQUAcjs.POLYMARKET_USDCE_ADDRESS,
4134
- depositChainId: _chunkNRNJAQUAcjs.POLYMARKET_POLYGON_CHAIN_ID,
4199
+ depositToken: _chunkXOBLFIGVcjs.POLYMARKET_USDCE_ADDRESS,
4200
+ depositChainId: _chunkXOBLFIGVcjs.POLYMARKET_POLYGON_CHAIN_ID,
4135
4201
  providerMetadata: metadata
4136
4202
  };
4137
4203
  }
@@ -4180,7 +4246,9 @@ function createInitialState(overrides) {
4180
4246
  processing: {
4181
4247
  txHash: null,
4182
4248
  directTransfer: false,
4183
- swappedContext: null
4249
+ swappedContext: null,
4250
+ initialEvent: null,
4251
+ quoteFeeBreakdown: null
4184
4252
  },
4185
4253
  dappImport: {
4186
4254
  activeProviderId: null,
@@ -4234,7 +4302,7 @@ function readPortfolioEntry(portfolio, network, address) {
4234
4302
  function computeDappImportStatus(providerId, inputs) {
4235
4303
  const { owner, availability, availabilityOwner, setup } = inputs;
4236
4304
  if (!owner) return "needs-connect";
4237
- 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;
4238
4306
  if (entry === "loading" || entry === void 0) return "loading";
4239
4307
  if (entry === "error") {
4240
4308
  return {
@@ -4588,12 +4656,12 @@ function applyAction(state, action) {
4588
4656
  requestKey: action.requestKey,
4589
4657
  cacheKey: action.cacheKey,
4590
4658
  status: "loading",
4591
- smartAccount: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _120 => _120.smartAccount]), () => ( null)),
4592
- sessionOwnerAddress: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _121 => _121.sessionOwnerAddress]), () => ( null)),
4593
- 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)),
4594
4662
  message: null,
4595
4663
  cacheable: action.cacheable,
4596
- attemptNonce: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _123 => _123.attemptNonce]), () => ( 0))
4664
+ attemptNonce: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _136 => _136.attemptNonce]), () => ( 0))
4597
4665
  }));
4598
4666
  }
4599
4667
  case "setup/ready": {
@@ -4789,10 +4857,23 @@ function applyAction(state, action) {
4789
4857
  ...state.processing,
4790
4858
  txHash: action.txHash,
4791
4859
  directTransfer: _nullishCoalesce(action.directTransfer, () => ( false)),
4792
- swappedContext: _nullishCoalesce(action.swappedContext, () => ( null))
4860
+ swappedContext: _nullishCoalesce(action.swappedContext, () => ( null)),
4861
+ initialEvent: _nullishCoalesce(action.initialEvent, () => ( null)),
4862
+ quoteFeeBreakdown: _nullishCoalesce(action.quoteFeeBreakdown, () => ( null))
4793
4863
  },
4794
4864
  flow: { ...state.flow, step: "processing" }
4795
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
+ };
4796
4877
  case "dapp-import/availability-loading":
4797
4878
  return {
4798
4879
  ...state,
@@ -4959,7 +5040,9 @@ function applyAction(state, action) {
4959
5040
  processing: {
4960
5041
  txHash: null,
4961
5042
  directTransfer: false,
4962
- swappedContext: null
5043
+ swappedContext: null,
5044
+ initialEvent: null,
5045
+ quoteFeeBreakdown: null
4963
5046
  },
4964
5047
  // Drop fetched availability wholesale. The fetch effect refetches
4965
5048
  // unconditionally on remount (so keeping the map saves nothing),
@@ -5060,15 +5143,15 @@ var SetupError = class extends Error {
5060
5143
  }
5061
5144
  };
5062
5145
  async function resolveSessionOwner(eoaAddress) {
5063
- const local = _chunkZDYV536Qcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
5146
+ const local = _chunkUN6MEOOAcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
5064
5147
  if (local) {
5065
5148
  return {
5066
- account: _chunkZDYV536Qcjs.accountFromPrivateKey.call(void 0, local.privateKey),
5149
+ account: _chunkUN6MEOOAcjs.accountFromPrivateKey.call(void 0, local.privateKey),
5067
5150
  address: local.address
5068
5151
  };
5069
5152
  }
5070
- const created = _chunkZDYV536Qcjs.createSessionOwnerKey.call(void 0, );
5071
- _chunkZDYV536Qcjs.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);
5072
5155
  return { account: created.account, address: created.address };
5073
5156
  }
5074
5157
  function stableStringify(value) {
@@ -5124,7 +5207,7 @@ var setupRequestDedupe = /* @__PURE__ */ new Map();
5124
5207
  function readDedupedAccountSetupResult(requestKey) {
5125
5208
  const now = Date.now();
5126
5209
  const existing = setupRequestDedupe.get(requestKey);
5127
- 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) {
5128
5211
  return existing.result;
5129
5212
  }
5130
5213
  return null;
@@ -5135,7 +5218,7 @@ async function runAccountSetup(input, deps) {
5135
5218
  try {
5136
5219
  const sessionOwner = await resolveSessionOwner(input.ownerAddress);
5137
5220
  const cacheKey = computeCacheKey(input, sessionOwner.address);
5138
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
5221
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
5139
5222
  owner: input.ownerAddress,
5140
5223
  sessionOwner: sessionOwner.address,
5141
5224
  forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
@@ -5143,7 +5226,7 @@ async function runAccountSetup(input, deps) {
5143
5226
  const setup = await service.setupAccount({
5144
5227
  ownerAddress: input.ownerAddress,
5145
5228
  sessionOwnerAddress: sessionOwner.address,
5146
- targetChain: _chunkABVRVW3Pcjs.targetChainToCaip2.call(void 0, input.targetChain),
5229
+ targetChain: _chunkHH46H6ZIcjs.targetChainToCaip2.call(void 0, input.targetChain),
5147
5230
  targetToken: input.targetToken,
5148
5231
  recipient: input.recipient,
5149
5232
  outputTokenRules: input.outputTokenRules,
@@ -5181,7 +5264,7 @@ async function runAccountSetup(input, deps) {
5181
5264
  primaryType: typedData.primaryType,
5182
5265
  message: typedData.message
5183
5266
  });
5184
- const sessionDetails = _chunkZDYV536Qcjs.buildSessionDetails.call(void 0,
5267
+ const sessionDetails = _chunkUN6MEOOAcjs.buildSessionDetails.call(void 0,
5185
5268
  setup.sessionDetailsUnsigned,
5186
5269
  signature
5187
5270
  );
@@ -5195,10 +5278,10 @@ async function runAccountSetup(input, deps) {
5195
5278
  eoaAddress: input.ownerAddress,
5196
5279
  sessionOwner: sessionOwner.address,
5197
5280
  target: {
5198
- chain: _chunkABVRVW3Pcjs.targetChainToCaip2.call(void 0, input.targetChain),
5281
+ chain: _chunkHH46H6ZIcjs.targetChainToCaip2.call(void 0, input.targetChain),
5199
5282
  token: input.targetToken,
5200
5283
  ...input.recipient && { recipient: input.recipient },
5201
- ..._optionalChain([input, 'access', _125 => _125.outputTokenRules, 'optionalAccess', _126 => _126.length]) && {
5284
+ ..._optionalChain([input, 'access', _142 => _142.outputTokenRules, 'optionalAccess', _143 => _143.length]) && {
5202
5285
  outputTokenRules: input.outputTokenRules
5203
5286
  },
5204
5287
  ...input.rejectUnmapped != null && {
@@ -5214,7 +5297,7 @@ async function runAccountSetup(input, deps) {
5214
5297
  isRegistered: true
5215
5298
  };
5216
5299
  } catch (error) {
5217
- _chunkZDYV536Qcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
5300
+ _chunkUN6MEOOAcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
5218
5301
  owner: input.ownerAddress
5219
5302
  });
5220
5303
  if (error instanceof SetupError) throw error;
@@ -5225,7 +5308,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
5225
5308
  const now = Date.now();
5226
5309
  const existing = setupRequestDedupe.get(requestKey);
5227
5310
  if (existing && (!existing.settled || existing.expiresAt > now)) {
5228
- _chunkZDYV536Qcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
5311
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
5229
5312
  owner: input.ownerAddress,
5230
5313
  forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
5231
5314
  });
@@ -5316,6 +5399,33 @@ function isSameRoute2(sourceChain, sourceToken, targetChain, targetToken) {
5316
5399
  var SWAPPED_SOURCE_CHAIN = 8453;
5317
5400
  var SWAPPED_SOURCE_TOKEN = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
5318
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
+ }
5319
5429
  var DEFAULT_FIAT_ONRAMP_METHODS = [
5320
5430
  {
5321
5431
  method: "creditcard",
@@ -5455,7 +5565,9 @@ function deriveStep(flow, d, p, activeEntry, fiat, exchange) {
5455
5565
  sourceDecimals: _nullishCoalesce(d.sourceDecimals, () => ( void 0)),
5456
5566
  inputAmountUsd: _nullishCoalesce(d.inputAmountUsd, () => ( void 0)),
5457
5567
  directTransfer: p.directTransfer,
5458
- swappedContext: _nullishCoalesce(p.swappedContext, () => ( void 0))
5568
+ swappedContext: _nullishCoalesce(p.swappedContext, () => ( void 0)),
5569
+ initialEvent: _nullishCoalesce(p.initialEvent, () => ( void 0)),
5570
+ quoteFeeBreakdown: _nullishCoalesce(p.quoteFeeBreakdown, () => ( void 0))
5459
5571
  };
5460
5572
  }
5461
5573
  }
@@ -5489,7 +5601,7 @@ function DepositFlow({
5489
5601
  appBalanceUsd,
5490
5602
  outputTokenRules,
5491
5603
  rejectUnmapped,
5492
- signerAddress = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS,
5604
+ signerAddress = _chunkHH46H6ZIcjs.DEFAULT_SIGNER_ADDRESS,
5493
5605
  sessionChainIds,
5494
5606
  forceRegister = false,
5495
5607
  enableSolana = true,
@@ -5506,17 +5618,18 @@ function DepositFlow({
5506
5618
  uiConfig,
5507
5619
  allowedRoutes,
5508
5620
  onStepChange,
5621
+ onSwappedImmersiveChange,
5509
5622
  onClose,
5510
5623
  onLifecycle,
5511
5624
  onEvent,
5512
5625
  onError,
5513
5626
  debug
5514
5627
  }) {
5515
- const rpcUrls = _chunkZDYV536Qcjs.useRpcUrls.call(void 0, );
5516
- const onStepChangeRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onStepChange);
5517
- const onEventRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onEvent);
5518
- const onLifecycleRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onLifecycle);
5519
- const onErrorRef = _chunkZDYV536Qcjs.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);
5520
5633
  const storeApi = useDepositStoreApi();
5521
5634
  const flowSlice = useDepositStore((s) => s.flow);
5522
5635
  const depositSlice = useDepositStore((s) => s.deposit);
@@ -5533,13 +5646,13 @@ function DepositFlow({
5533
5646
  const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
5534
5647
  const logFlow = _react.useCallback.call(void 0,
5535
5648
  (message, data) => {
5536
- _chunkZDYV536Qcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
5649
+ _chunkUN6MEOOAcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
5537
5650
  },
5538
5651
  [debug]
5539
5652
  );
5540
5653
  const logFlowError = _react.useCallback.call(void 0,
5541
5654
  (message, error, data) => {
5542
- _chunkZDYV536Qcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
5655
+ _chunkUN6MEOOAcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
5543
5656
  },
5544
5657
  [debug]
5545
5658
  );
@@ -5563,12 +5676,12 @@ function DepositFlow({
5563
5676
  };
5564
5677
  }, [enableSwappedPreconnect]);
5565
5678
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
5566
- if (!_optionalChain([dappWalletClient, 'optionalAccess', _127 => _127.switchChain])) return void 0;
5679
+ if (!_optionalChain([dappWalletClient, 'optionalAccess', _146 => _146.switchChain])) return void 0;
5567
5680
  return async (chainId) => {
5568
- 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 })]);
5569
5682
  };
5570
5683
  }, [dappWalletClient]);
5571
- 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));
5572
5685
  const walletOptions = _react.useMemo.call(void 0, () => {
5573
5686
  const options = [];
5574
5687
  const seen = /* @__PURE__ */ new Set();
@@ -5582,7 +5695,7 @@ function DepositFlow({
5582
5695
  });
5583
5696
  seen.add(id);
5584
5697
  }
5585
- 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) {
5586
5699
  const id = _nullishCoalesce(reownWallet.caipAddress, () => ( `solana:${reownWallet.solanaAddress}`));
5587
5700
  if (!seen.has(id)) {
5588
5701
  options.push({
@@ -5594,7 +5707,7 @@ function DepositFlow({
5594
5707
  });
5595
5708
  seen.add(id);
5596
5709
  }
5597
- } 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()}`)) {
5598
5711
  const id = `evm:${reownWallet.address.toLowerCase()}`;
5599
5712
  if (!seen.has(id)) {
5600
5713
  options.push({
@@ -5611,20 +5724,20 @@ function DepositFlow({
5611
5724
  }, [
5612
5725
  connectedWalletAddress,
5613
5726
  dappAddress,
5614
- _optionalChain([reownWallet, 'optionalAccess', _134 => _134.address]),
5615
- _optionalChain([reownWallet, 'optionalAccess', _135 => _135.isConnected]),
5616
- _optionalChain([reownWallet, 'optionalAccess', _136 => _136.walletClient]),
5617
- _optionalChain([reownWallet, 'optionalAccess', _137 => _137.publicClient]),
5618
- _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]),
5619
5732
  enableSolana,
5620
- _optionalChain([reownWallet, 'optionalAccess', _139 => _139.isSolana]),
5621
- _optionalChain([reownWallet, 'optionalAccess', _140 => _140.solanaAddress]),
5622
- _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])
5623
5736
  ]);
5624
- 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;
5625
5738
  const hasWalletOptions = walletOptions.length > 0;
5626
5739
  const hasReownSession = Boolean(
5627
- 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])
5628
5741
  );
5629
5742
  const isDappImportWalletHydrating = Boolean(
5630
5743
  hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady
@@ -5644,9 +5757,9 @@ function DepositFlow({
5644
5757
  isConnectSelectionConfirmed,
5645
5758
  selectedWalletId
5646
5759
  ]);
5647
- const setupChainId = typeof targetChain === "number" && !_chunkABVRVW3Pcjs.isVirtualDestination.call(void 0, targetChain) ? targetChain : typeof defaultSourceChain === "number" ? defaultSourceChain : _chains.base.id;
5648
- const targetSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
5649
- 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);
5650
5763
  const targetMarketPriceRef = _react.useRef.call(void 0, null);
5651
5764
  _react.useEffect.call(void 0, () => {
5652
5765
  targetMarketPriceRef.current = null;
@@ -5672,16 +5785,16 @@ function DepositFlow({
5672
5785
  return {
5673
5786
  ownerAddress: dappAddress,
5674
5787
  walletClient: void 0,
5675
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5788
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5676
5789
  switchChain: void 0
5677
5790
  };
5678
5791
  }
5679
5792
  if (canAutoLock) {
5680
- 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));
5681
5794
  return {
5682
5795
  ownerAddress: dappWalletClient.account.address,
5683
5796
  walletClient: dappWalletClient,
5684
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5797
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5685
5798
  switchChain: dappSwitchChain
5686
5799
  };
5687
5800
  }
@@ -5695,24 +5808,24 @@ function DepositFlow({
5695
5808
  return {
5696
5809
  ownerAddress: dappAddress,
5697
5810
  walletClient: void 0,
5698
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5811
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5699
5812
  switchChain: void 0
5700
5813
  };
5701
5814
  }
5702
- if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _148 => _148.account]) && selectedOption.address && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
5703
- 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));
5704
5817
  return {
5705
5818
  ownerAddress: dappWalletClient.account.address,
5706
5819
  walletClient: dappWalletClient,
5707
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5820
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
5708
5821
  switchChain: dappSwitchChain
5709
5822
  };
5710
5823
  }
5711
- 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()) {
5712
5825
  return {
5713
5826
  ownerAddress: reownWallet.address,
5714
5827
  walletClient: reownWallet.walletClient,
5715
- publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5828
+ publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5716
5829
  switchChain: reownWallet.switchChain
5717
5830
  };
5718
5831
  }
@@ -5751,7 +5864,7 @@ function DepositFlow({
5751
5864
  return {
5752
5865
  ownerAddress: dappAddress,
5753
5866
  walletClient: void 0,
5754
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkZDYV536Qcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5867
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUN6MEOOAcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
5755
5868
  switchChain: void 0
5756
5869
  };
5757
5870
  }
@@ -5776,37 +5889,37 @@ function DepositFlow({
5776
5889
  const selectedEvmWalletOwner = _react.useMemo.call(void 0, () => {
5777
5890
  if (!selectedWalletId) return null;
5778
5891
  const opt = walletOptions.find((o) => o.id === selectedWalletId);
5779
- if (_optionalChain([opt, 'optionalAccess', _152 => _152.kind]) === "external" && opt.address) {
5892
+ if (_optionalChain([opt, 'optionalAccess', _171 => _171.kind]) === "external" && opt.address) {
5780
5893
  return opt.address;
5781
5894
  }
5782
- if (_optionalChain([opt, 'optionalAccess', _153 => _153.kind]) === "connected" && opt.address) {
5895
+ if (_optionalChain([opt, 'optionalAccess', _172 => _172.kind]) === "connected" && opt.address) {
5783
5896
  return opt.address;
5784
5897
  }
5785
5898
  return null;
5786
5899
  }, [selectedWalletId, walletOptions]);
5787
5900
  const dappImportOwner = _react.useMemo.call(void 0, () => {
5788
5901
  if (selectedEvmWalletOwner) return selectedEvmWalletOwner;
5789
- if (_optionalChain([reownWallet, 'optionalAccess', _154 => _154.address]) && reownWallet.isConnected) {
5902
+ if (_optionalChain([reownWallet, 'optionalAccess', _173 => _173.address]) && reownWallet.isConnected) {
5790
5903
  return reownWallet.address;
5791
5904
  }
5792
5905
  if (connectedWalletAddress) return connectedWalletAddress;
5793
5906
  return null;
5794
5907
  }, [
5795
5908
  selectedEvmWalletOwner,
5796
- _optionalChain([reownWallet, 'optionalAccess', _155 => _155.address]),
5797
- _optionalChain([reownWallet, 'optionalAccess', _156 => _156.isConnected]),
5909
+ _optionalChain([reownWallet, 'optionalAccess', _174 => _174.address]),
5910
+ _optionalChain([reownWallet, 'optionalAccess', _175 => _175.isConnected]),
5798
5911
  connectedWalletAddress
5799
5912
  ]);
5800
5913
  const activeOwner = _react.useMemo.call(void 0,
5801
5914
  () => resolveOwnerForMode(flowMode, {
5802
5915
  dappAddress,
5803
- walletOwner: _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _157 => _157.ownerAddress]), () => ( (canAutoLock ? connectedWalletAddress : selectedEvmWalletOwner))),
5916
+ walletOwner: _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _176 => _176.ownerAddress]), () => ( (canAutoLock ? connectedWalletAddress : selectedEvmWalletOwner))),
5804
5917
  dappImportOwner
5805
5918
  }),
5806
5919
  [
5807
5920
  flowMode,
5808
5921
  dappAddress,
5809
- _optionalChain([signerContext, 'optionalAccess', _158 => _158.ownerAddress]),
5922
+ _optionalChain([signerContext, 'optionalAccess', _177 => _177.ownerAddress]),
5810
5923
  canAutoLock,
5811
5924
  connectedWalletAddress,
5812
5925
  selectedEvmWalletOwner,
@@ -5835,12 +5948,12 @@ function DepositFlow({
5835
5948
  return;
5836
5949
  }
5837
5950
  lastActiveSetupLifecycleKeyRef.current = lifecycleKey;
5838
- _optionalChain([onLifecycleRef, 'access', _159 => _159.current, 'optionalCall', _160 => _160({
5951
+ _optionalChain([onLifecycleRef, 'access', _178 => _178.current, 'optionalCall', _179 => _179({
5839
5952
  type: "smart-account-changed",
5840
5953
  evm: activeEntry.smartAccount,
5841
5954
  solana: _nullishCoalesce(activeEntry.solanaDepositAddress, () => ( null))
5842
5955
  })]);
5843
- _optionalChain([onLifecycleRef, 'access', _161 => _161.current, 'optionalCall', _162 => _162({
5956
+ _optionalChain([onLifecycleRef, 'access', _180 => _180.current, 'optionalCall', _181 => _181({
5844
5957
  type: "connected",
5845
5958
  address: activeOwner,
5846
5959
  smartAccount: activeEntry.smartAccount
@@ -5886,7 +5999,7 @@ function DepositFlow({
5886
5999
  const currentBackHandler = canGoBackFromHere ? handleBack : void 0;
5887
6000
  const currentScreen = showConnectStep ? "connect" : effectiveStep.type;
5888
6001
  _react.useEffect.call(void 0, () => {
5889
- _optionalChain([onStepChangeRef, 'access', _163 => _163.current, 'optionalCall', _164 => _164(currentBackHandler, currentScreen)]);
6002
+ _optionalChain([onStepChangeRef, 'access', _182 => _182.current, 'optionalCall', _183 => _183(currentBackHandler, currentScreen)]);
5890
6003
  }, [currentBackHandler, currentScreen, onStepChangeRef]);
5891
6004
  const lastModalHeightRef = _react.useRef.call(void 0, 0);
5892
6005
  const modalContentElRef = _react.useRef.call(void 0, null);
@@ -5896,7 +6009,7 @@ function DepositFlow({
5896
6009
  modalContentElRef.current = mc;
5897
6010
  const ro = new ResizeObserver((entries) => {
5898
6011
  for (const entry of entries) {
5899
- 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]);
5900
6013
  lastModalHeightRef.current = typeof border === "number" ? border : entry.contentRect.height;
5901
6014
  }
5902
6015
  });
@@ -5937,23 +6050,23 @@ function DepositFlow({
5937
6050
  }
5938
6051
  lastStepOpenEventKeyRef.current = stepOpenEventKey;
5939
6052
  if (effectiveStep.type === "select-asset") {
5940
- _optionalChain([onEventRef, 'access', _168 => _168.current, 'optionalCall', _169 => _169({
6053
+ _optionalChain([onEventRef, 'access', _187 => _187.current, 'optionalCall', _188 => _188({
5941
6054
  type: "deposit_modal_connected_wallet_select_source_open",
5942
6055
  total_balance_in_external_wallet: totalBalanceUsd,
5943
6056
  pred_balance: totalBalanceUsd
5944
6057
  })]);
5945
6058
  } else if (effectiveStep.type === "deposit-address") {
5946
- const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
5947
- const tokenSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
5948
- _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({
5949
6062
  type: "deposit_modal_transfer_crypto_open",
5950
6063
  default_chain: chainName,
5951
6064
  default_token: tokenSymbol,
5952
6065
  pred_balance: totalBalanceUsd
5953
6066
  })]);
5954
6067
  } else if (effectiveStep.type === "amount" && stepSendToken) {
5955
- const receiveSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
5956
- _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({
5957
6070
  type: "deposit_modal_connected_wallet_enter_value_open",
5958
6071
  send_token: stepSendToken,
5959
6072
  receive_token: receiveSymbol,
@@ -5986,7 +6099,7 @@ function DepositFlow({
5986
6099
  targetToken
5987
6100
  ]);
5988
6101
  _react.useEffect.call(void 0, () => {
5989
- _optionalChain([onLifecycleRef, 'access', _174 => _174.current, 'optionalCall', _175 => _175({
6102
+ _optionalChain([onLifecycleRef, 'access', _193 => _193.current, 'optionalCall', _194 => _194({
5990
6103
  type: "balance-changed",
5991
6104
  totalUsd: totalBalanceUsd
5992
6105
  })]);
@@ -6002,7 +6115,7 @@ function DepositFlow({
6002
6115
  const handleConfirmWallet = _react.useCallback.call(void 0,
6003
6116
  (walletId) => {
6004
6117
  const selectedOption = walletOptions.find((o) => o.id === walletId);
6005
- 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";
6006
6119
  storeApi.dispatch({
6007
6120
  type: "connect/wallet-confirmed",
6008
6121
  walletId,
@@ -6012,7 +6125,7 @@ function DepositFlow({
6012
6125
  [walletOptions, enableSolana, storeApi]
6013
6126
  );
6014
6127
  const isSolanaWalletConnected = Boolean(
6015
- 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])
6016
6129
  );
6017
6130
  const dappImportsKey = dappImports ? Object.keys(dappImports).filter((k) => dappImports[k]).sort().join(",") : "";
6018
6131
  const enabledDappImportProviders = _react.useMemo.call(void 0,
@@ -6029,7 +6142,7 @@ function DepositFlow({
6029
6142
  const owner = dappImportOwner;
6030
6143
  if (owner) {
6031
6144
  const wallet = walletOptions.find(
6032
- (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()
6033
6146
  );
6034
6147
  if (wallet) {
6035
6148
  storeApi.dispatch({
@@ -6070,8 +6183,8 @@ function DepositFlow({
6070
6183
  eoa: dappImportOwner,
6071
6184
  getPublicClient: (chainId) => {
6072
6185
  try {
6073
- return _chunkZDYV536Qcjs.getPublicClient.call(void 0, chainId, rpcUrls);
6074
- } catch (e30) {
6186
+ return _chunkUN6MEOOAcjs.getPublicClient.call(void 0, chainId, rpcUrls);
6187
+ } catch (e32) {
6075
6188
  return null;
6076
6189
  }
6077
6190
  },
@@ -6147,7 +6260,7 @@ function DepositFlow({
6147
6260
  }, [activeDappImportProviderId, enabledDappImportProviders]);
6148
6261
  const activeDappImportAvailability = _react.useMemo.call(void 0, () => {
6149
6262
  if (!activeDappImportProviderId) return null;
6150
- 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()) {
6151
6264
  return null;
6152
6265
  }
6153
6266
  const entry = dappImportAvailability[activeDappImportProviderId];
@@ -6188,7 +6301,7 @@ function DepositFlow({
6188
6301
  setup: setupSlice
6189
6302
  });
6190
6303
  const pinnableWallet = dappImportOwner ? _nullishCoalesce(walletOptions.find(
6191
- (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()
6192
6305
  ), () => ( null)) : null;
6193
6306
  const outcome = resolveBootOutcome({
6194
6307
  status,
@@ -6230,7 +6343,7 @@ function DepositFlow({
6230
6343
  if (dappImportOwner) {
6231
6344
  const plan = bootRetryPlan({
6232
6345
  setupStatus: readSetupForOwner(snapshot.setup, dappImportOwner).status,
6233
- 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
6234
6347
  });
6235
6348
  if (plan.restartSetup) {
6236
6349
  storeApi.dispatch({
@@ -6311,7 +6424,7 @@ function DepositFlow({
6311
6424
  swappedUrlPrefetchRef.current.clear();
6312
6425
  }, [dappAddress]);
6313
6426
  const handleNewDeposit = _react.useCallback.call(void 0, () => {
6314
- _optionalChain([onLifecycleRef, 'access', _189 => _189.current, 'optionalCall', _190 => _190({
6427
+ _optionalChain([onLifecycleRef, 'access', _208 => _208.current, 'optionalCall', _209 => _209({
6315
6428
  type: "smart-account-changed",
6316
6429
  evm: null,
6317
6430
  solana: null
@@ -6357,13 +6470,13 @@ function DepositFlow({
6357
6470
  };
6358
6471
  push(dappAddress);
6359
6472
  push(connectedWalletAddress);
6360
- push(_optionalChain([reownWallet, 'optionalAccess', _191 => _191.address]));
6473
+ push(_optionalChain([reownWallet, 'optionalAccess', _210 => _210.address]));
6361
6474
  push(dappImportOwner);
6362
6475
  return owners;
6363
6476
  }, [
6364
6477
  dappAddress,
6365
6478
  connectedWalletAddress,
6366
- _optionalChain([reownWallet, 'optionalAccess', _192 => _192.address]),
6479
+ _optionalChain([reownWallet, 'optionalAccess', _211 => _211.address]),
6367
6480
  dappImportOwner
6368
6481
  ]);
6369
6482
  _react.useEffect.call(void 0, () => {
@@ -6377,7 +6490,7 @@ function DepositFlow({
6377
6490
  try {
6378
6491
  sessionOwner = await resolveSessionOwner(owner);
6379
6492
  } catch (error) {
6380
- _chunkZDYV536Qcjs.debugError.call(void 0,
6493
+ _chunkUN6MEOOAcjs.debugError.call(void 0,
6381
6494
  debug,
6382
6495
  "deposit-flow",
6383
6496
  "session-owner:resolve-failed",
@@ -6484,11 +6597,11 @@ function DepositFlow({
6484
6597
  return;
6485
6598
  }
6486
6599
  storeApi.dispatch({ type: "portfolio/loading", network, address });
6487
- const requestId = _optionalChain([readPortfolioEntry, 'call', _193 => _193(
6600
+ const requestId = _optionalChain([readPortfolioEntry, 'call', _212 => _212(
6488
6601
  storeApi.getState().portfolio,
6489
6602
  network,
6490
6603
  address
6491
- ), 'optionalAccess', _194 => _194.requestId]);
6604
+ ), 'optionalAccess', _213 => _213.requestId]);
6492
6605
  if (requestId === void 0) return;
6493
6606
  void (async () => {
6494
6607
  try {
@@ -6502,7 +6615,7 @@ function DepositFlow({
6502
6615
  requestId,
6503
6616
  totalUsd: portfolio.totalUsd
6504
6617
  });
6505
- } catch (e31) {
6618
+ } catch (e33) {
6506
6619
  storeApi.dispatch({
6507
6620
  type: "portfolio/failed",
6508
6621
  network,
@@ -6520,7 +6633,7 @@ function DepositFlow({
6520
6633
  sourceChain: data.sourceChain,
6521
6634
  amount: data.amount
6522
6635
  });
6523
- _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 })]);
6524
6637
  },
6525
6638
  [logFlow, onLifecycleRef]
6526
6639
  );
@@ -6539,8 +6652,8 @@ function DepositFlow({
6539
6652
  );
6540
6653
  const handleSolanaAmountContinue = _react.useCallback.call(void 0,
6541
6654
  (token, sourceAmount, inputAmountUsd) => {
6542
- const targetSym = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6543
- 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);
6544
6657
  const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
6545
6658
  logFlow("solana:amount:continue", {
6546
6659
  token: token.symbol,
@@ -6580,7 +6693,7 @@ function DepositFlow({
6580
6693
  sourceDecimals: tokenAtSubmit.decimals,
6581
6694
  inputAmountUsd: amountUsd
6582
6695
  });
6583
- _optionalChain([onLifecycleRef, 'access', _197 => _197.current, 'optionalCall', _198 => _198({
6696
+ _optionalChain([onLifecycleRef, 'access', _216 => _216.current, 'optionalCall', _217 => _217({
6584
6697
  type: "submitted",
6585
6698
  txHash,
6586
6699
  sourceChain: "solana",
@@ -6593,7 +6706,7 @@ function DepositFlow({
6593
6706
  );
6594
6707
  const handleAssetContinue = _react.useCallback.call(void 0,
6595
6708
  (asset) => {
6596
- _optionalChain([onEventRef, 'access', _199 => _199.current, 'optionalCall', _200 => _200({
6709
+ _optionalChain([onEventRef, 'access', _218 => _218.current, 'optionalCall', _219 => _219({
6597
6710
  type: "deposit_modal_connected_wallet_select_source_cta_click",
6598
6711
  total_balance_in_external_wallet: totalBalanceUsd,
6599
6712
  pred_balance: totalBalanceUsd,
@@ -6616,8 +6729,8 @@ function DepositFlow({
6616
6729
  activeOwner
6617
6730
  );
6618
6731
  if (entry.status !== "ready") return;
6619
- const targetSym = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6620
- 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);
6621
6734
  const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
6622
6735
  storeApi.dispatch({
6623
6736
  type: "amount/entered",
@@ -6631,7 +6744,7 @@ function DepositFlow({
6631
6744
  [targetToken, targetChain, storeApi, activeOwner]
6632
6745
  );
6633
6746
  const handleDepositSubmitted = _react.useCallback.call(void 0,
6634
- (txHash, chainId, amount, token) => {
6747
+ (txHash, chainId, amount, token, quoteFeeBreakdown) => {
6635
6748
  logFlow("evm:submitted", {
6636
6749
  txHash,
6637
6750
  sourceChain: chainId,
@@ -6647,10 +6760,11 @@ function DepositFlow({
6647
6760
  sourceChain: chainId,
6648
6761
  sourceToken: token,
6649
6762
  amount,
6650
- sourceSymbol: _optionalChain([asset, 'optionalAccess', _201 => _201.symbol]),
6651
- sourceDecimals: _optionalChain([asset, 'optionalAccess', _202 => _202.decimals]),
6763
+ sourceSymbol: _optionalChain([asset, 'optionalAccess', _220 => _220.symbol]),
6764
+ sourceDecimals: _optionalChain([asset, 'optionalAccess', _221 => _221.decimals]),
6652
6765
  inputAmountUsd: _nullishCoalesce(depositAtSubmit.inputAmountUsd, () => ( void 0)),
6653
- directTransfer: !dappImport && isSameRoute2(chainId, token, targetChain, targetToken)
6766
+ directTransfer: !dappImport && isSameRoute2(chainId, token, targetChain, targetToken),
6767
+ quoteFeeBreakdown
6654
6768
  });
6655
6769
  },
6656
6770
  [logFlow, storeApi, targetChain, targetToken]
@@ -6665,10 +6779,12 @@ function DepositFlow({
6665
6779
  const stateAtComplete = storeApi.getState();
6666
6780
  const swappedContext = stateAtComplete.flow.mode === "exchange-connect" ? {
6667
6781
  variant: "connect",
6668
- method: stateAtComplete.exchange.selectedConnection
6782
+ method: stateAtComplete.exchange.selectedConnection,
6783
+ expectedOrderUuid: info.expectedOrderUuid
6669
6784
  } : stateAtComplete.flow.mode === "fiat-onramp" ? {
6670
6785
  variant: "fiat",
6671
- method: stateAtComplete.fiat.selectedMethod
6786
+ method: stateAtComplete.fiat.selectedMethod,
6787
+ expectedOrderUuid: info.expectedOrderUuid
6672
6788
  } : void 0;
6673
6789
  storeApi.dispatch({
6674
6790
  type: "deposit/submitted",
@@ -6678,27 +6794,43 @@ function DepositFlow({
6678
6794
  amount,
6679
6795
  sourceSymbol: _nullishCoalesce(info.orderCrypto, () => ( "USDC")),
6680
6796
  sourceDecimals: SWAPPED_SOURCE_DECIMALS,
6681
- swappedContext
6797
+ swappedContext,
6798
+ initialEvent: info.initialEvent
6682
6799
  });
6683
- _optionalChain([onLifecycleRef, 'access', _203 => _203.current, 'optionalCall', _204 => _204({
6800
+ _optionalChain([onLifecycleRef, 'access', _222 => _222.current, 'optionalCall', _223 => _223({
6684
6801
  type: "submitted",
6685
6802
  txHash: info.txHash,
6686
6803
  sourceChain: SWAPPED_SOURCE_CHAIN,
6687
6804
  amount,
6688
6805
  sourceDecimals: SWAPPED_SOURCE_DECIMALS
6689
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
+ })();
6690
6822
  },
6691
- [logFlow, storeApi, onLifecycleRef]
6823
+ [logFlow, onLifecycleRef, service, storeApi]
6692
6824
  );
6693
6825
  const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
6694
6826
  (txHash, sourceChain, amount) => {
6695
6827
  const depositAtSubmit = storeApi.getState().deposit;
6696
- _optionalChain([onLifecycleRef, 'access', _205 => _205.current, 'optionalCall', _206 => _206({
6828
+ _optionalChain([onLifecycleRef, 'access', _224 => _224.current, 'optionalCall', _225 => _225({
6697
6829
  type: "submitted",
6698
6830
  txHash,
6699
6831
  sourceChain,
6700
6832
  amount,
6701
- sourceDecimals: _optionalChain([depositAtSubmit, 'access', _207 => _207.selectedAsset, 'optionalAccess', _208 => _208.decimals]),
6833
+ sourceDecimals: _optionalChain([depositAtSubmit, 'access', _226 => _226.selectedAsset, 'optionalAccess', _227 => _227.decimals]),
6702
6834
  amountUsd: _nullishCoalesce(depositAtSubmit.inputAmountUsd, () => ( void 0))
6703
6835
  })]);
6704
6836
  },
@@ -6707,7 +6839,7 @@ function DepositFlow({
6707
6839
  const handleDepositComplete = _react.useCallback.call(void 0,
6708
6840
  (txHash, destinationTxHash, context) => {
6709
6841
  logFlow("deposit:complete", { txHash, destinationTxHash, ...context });
6710
- _optionalChain([onLifecycleRef, 'access', _209 => _209.current, 'optionalCall', _210 => _210({
6842
+ _optionalChain([onLifecycleRef, 'access', _228 => _228.current, 'optionalCall', _229 => _229({
6711
6843
  type: "complete",
6712
6844
  txHash,
6713
6845
  destinationTxHash,
@@ -6719,14 +6851,14 @@ function DepositFlow({
6719
6851
  const handleDepositFailed = _react.useCallback.call(void 0,
6720
6852
  (txHash, error) => {
6721
6853
  logFlowError("deposit:failed", error, { txHash });
6722
- _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 })]);
6723
6855
  },
6724
6856
  [logFlowError, onLifecycleRef]
6725
6857
  );
6726
6858
  const handleError = _react.useCallback.call(void 0,
6727
6859
  (message, code) => {
6728
6860
  logFlowError("flow:error", message, { code });
6729
- _optionalChain([onErrorRef, 'access', _213 => _213.current, 'optionalCall', _214 => _214({ message, code })]);
6861
+ _optionalChain([onErrorRef, 'access', _232 => _232.current, 'optionalCall', _233 => _233({ message, code })]);
6730
6862
  },
6731
6863
  [logFlowError, onErrorRef]
6732
6864
  );
@@ -6784,8 +6916,8 @@ function DepositFlow({
6784
6916
  address: _nullishCoalesce(_nullishCoalesce(option.address, () => ( option.solanaAddress)), () => ( option.id)),
6785
6917
  state,
6786
6918
  errorReason: _nullishCoalesce(entry.message, () => ( void 0)),
6787
- balanceStatus: _nullishCoalesce(_optionalChain([portfolioEntry, 'optionalAccess', _215 => _215.status]), () => ( "loading")),
6788
- 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
6789
6921
  };
6790
6922
  });
6791
6923
  }, [walletOptions, setupSlice, dappAddress, portfolioSlice]);
@@ -6802,7 +6934,7 @@ function DepositFlow({
6802
6934
  );
6803
6935
  if (showConnectStep) {
6804
6936
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6805
- _chunkZDYV536Qcjs.ConnectStep,
6937
+ _chunkUN6MEOOAcjs.ConnectStep,
6806
6938
  {
6807
6939
  walletRows,
6808
6940
  transferCryptoState: dappAddress ? transferCryptoState : void 0,
@@ -6835,7 +6967,7 @@ function DepositFlow({
6835
6967
  },
6836
6968
  dappImports: connectStepDappImports,
6837
6969
  onSelectDappImport: (providerId) => {
6838
- 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;
6839
6971
  if (availabilityEntry === "error") {
6840
6972
  storeApi.dispatch({
6841
6973
  type: "dapp-import/availability-retry-requested"
@@ -6886,9 +7018,9 @@ function DepositFlow({
6886
7018
  onDepositComplete: handleDepositComplete,
6887
7019
  onDepositFailed: handleDepositFailed,
6888
7020
  onCopyAddress: () => {
6889
- const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
6890
- const tokenSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
6891
- _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({
6892
7024
  type: "deposit_modal_transfer_crypto_cta_click",
6893
7025
  default_chain: chainName,
6894
7026
  default_token: tokenSymbol,
@@ -6930,11 +7062,12 @@ function DepositFlow({
6930
7062
  onClose: _nullishCoalesce(onClose, () => ( (() => {
6931
7063
  }))),
6932
7064
  onGoBack: handleBack,
6933
- onError: handleError
7065
+ onError: handleError,
7066
+ onImmersiveChange: onSwappedImmersiveChange
6934
7067
  }
6935
7068
  ),
6936
7069
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6937
- _chunkZDYV536Qcjs.ProcessingStep,
7070
+ _chunkUN6MEOOAcjs.ProcessingStep,
6938
7071
  {
6939
7072
  smartAccount: step.smartAccount,
6940
7073
  solanaDepositAddress: step.solanaDepositAddress,
@@ -6948,9 +7081,12 @@ function DepositFlow({
6948
7081
  sourceDecimals: step.sourceDecimals,
6949
7082
  amountUsd: step.inputAmountUsd,
6950
7083
  swappedContext: step.swappedContext,
7084
+ quoteFeeBreakdown: step.quoteFeeBreakdown,
6951
7085
  service,
6952
7086
  directTransfer: step.directTransfer,
7087
+ initialEvent: step.initialEvent,
6953
7088
  isSwappedOrder: true,
7089
+ uiConfig,
6954
7090
  onClose,
6955
7091
  onNewDeposit: handleNewDeposit,
6956
7092
  onDepositComplete: handleDepositComplete,
@@ -6998,11 +7134,12 @@ function DepositFlow({
6998
7134
  onClose: _nullishCoalesce(onClose, () => ( (() => {
6999
7135
  }))),
7000
7136
  onGoBack: handleBack,
7001
- onError: handleError
7137
+ onError: handleError,
7138
+ onImmersiveChange: onSwappedImmersiveChange
7002
7139
  }
7003
7140
  ),
7004
7141
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7005
- _chunkZDYV536Qcjs.ProcessingStep,
7142
+ _chunkUN6MEOOAcjs.ProcessingStep,
7006
7143
  {
7007
7144
  smartAccount: step.smartAccount,
7008
7145
  solanaDepositAddress: step.solanaDepositAddress,
@@ -7016,9 +7153,12 @@ function DepositFlow({
7016
7153
  sourceDecimals: step.sourceDecimals,
7017
7154
  amountUsd: step.inputAmountUsd,
7018
7155
  swappedContext: step.swappedContext,
7156
+ quoteFeeBreakdown: step.quoteFeeBreakdown,
7019
7157
  service,
7020
7158
  directTransfer: step.directTransfer,
7159
+ initialEvent: step.initialEvent,
7021
7160
  isSwappedOrder: true,
7161
+ uiConfig,
7022
7162
  onClose,
7023
7163
  onNewDeposit: handleNewDeposit,
7024
7164
  onDepositComplete: handleDepositComplete,
@@ -7033,8 +7173,8 @@ function DepositFlow({
7033
7173
  }
7034
7174
  if (isSolanaWalletMode) {
7035
7175
  if (!dappAddress) return null;
7036
- const solanaAddr = _optionalChain([reownWallet, 'optionalAccess', _220 => _220.solanaAddress]);
7037
- 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]);
7038
7178
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
7039
7179
  effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7040
7180
  AccountPreparingSkeleton,
@@ -7066,10 +7206,10 @@ function DepositFlow({
7066
7206
  defaultAmount: effectiveStep.inputAmountUsd,
7067
7207
  uiConfig,
7068
7208
  targetChain,
7069
- targetChainName: _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain),
7070
- targetTokenSymbol: _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain),
7071
- targetTokenIcon: _chunkABVRVW3Pcjs.getTokenIcon.call(void 0,
7072
- _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)
7073
7213
  ),
7074
7214
  appBalanceUsd,
7075
7215
  onContinue: handleSolanaAmountContinue,
@@ -7091,7 +7231,7 @@ function DepositFlow({
7091
7231
  targetToken,
7092
7232
  service,
7093
7233
  solanaProvider,
7094
- solanaConnection: _optionalChain([reownWallet, 'optionalAccess', _222 => _222.solanaConnection]),
7234
+ solanaConnection: _optionalChain([reownWallet, 'optionalAccess', _241 => _241.solanaConnection]),
7095
7235
  uiConfig,
7096
7236
  onConfirm: handleSolanaConfirmed,
7097
7237
  onError: handleError,
@@ -7132,7 +7272,7 @@ function DepositFlow({
7132
7272
  ) })
7133
7273
  ] }) : null,
7134
7274
  effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7135
- _chunkZDYV536Qcjs.ProcessingStep,
7275
+ _chunkUN6MEOOAcjs.ProcessingStep,
7136
7276
  {
7137
7277
  smartAccount: effectiveStep.smartAccount,
7138
7278
  solanaDepositAddress: effectiveStep.solanaDepositAddress,
@@ -7147,6 +7287,8 @@ function DepositFlow({
7147
7287
  amountUsd: effectiveStep.inputAmountUsd,
7148
7288
  service,
7149
7289
  directTransfer: effectiveStep.directTransfer,
7290
+ initialEvent: effectiveStep.initialEvent,
7291
+ quoteFeeBreakdown: effectiveStep.quoteFeeBreakdown,
7150
7292
  onClose,
7151
7293
  onNewDeposit: handleNewDeposit,
7152
7294
  onDepositComplete: handleDepositComplete,
@@ -7167,7 +7309,7 @@ function DepositFlow({
7167
7309
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7168
7310
  DappImportAssetSelectSkeleton,
7169
7311
  {
7170
- sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportProvider, 'optionalAccess', _223 => _223.sourceLabel]), () => ( "")),
7312
+ sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportProvider, 'optionalAccess', _242 => _242.sourceLabel]), () => ( "")),
7171
7313
  error: dappImportBootError,
7172
7314
  onRetry: handleBootRetry
7173
7315
  }
@@ -7175,16 +7317,16 @@ function DepositFlow({
7175
7317
  }
7176
7318
  );
7177
7319
  }
7178
- 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])) {
7179
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" }) }) }) }) });
7180
7322
  }
7181
7323
  const ownerAddress = signerContext.ownerAddress;
7182
- 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));
7183
7325
  const getReadClientForChain = (chainId) => {
7184
- 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) {
7185
7327
  return signerContext.publicClient;
7186
7328
  }
7187
- return _chunkZDYV536Qcjs.getPublicClient.call(void 0, chainId, rpcUrls);
7329
+ return _chunkUN6MEOOAcjs.getPublicClient.call(void 0, chainId, rpcUrls);
7188
7330
  };
7189
7331
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
7190
7332
  effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -7214,7 +7356,7 @@ function DepositFlow({
7214
7356
  effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7215
7357
  DappImportAssetSelectStep,
7216
7358
  {
7217
- 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)),
7218
7360
  assets: activeDappImportAvailability.assets,
7219
7361
  onSelect: handleDappImportAssetSelected
7220
7362
  }
@@ -7240,8 +7382,8 @@ function DepositFlow({
7240
7382
  service,
7241
7383
  onContinue: handleAmountContinue,
7242
7384
  onCtaClick: (ctaName) => {
7243
- const receiveSymbol = _chunkABVRVW3Pcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
7244
- _optionalChain([onEvent, 'optionalCall', _238 => _238({
7385
+ const receiveSymbol = _chunkHH46H6ZIcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
7386
+ _optionalChain([onEvent, 'optionalCall', _257 => _257({
7245
7387
  type: "deposit_modal_connected_wallet_enter_value_cta_click",
7246
7388
  send_token: effectiveStep.asset.symbol,
7247
7389
  receive_token: receiveSymbol,
@@ -7293,7 +7435,7 @@ function DepositFlow({
7293
7435
  }
7294
7436
  ),
7295
7437
  effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7296
- _chunkZDYV536Qcjs.ProcessingStep,
7438
+ _chunkUN6MEOOAcjs.ProcessingStep,
7297
7439
  {
7298
7440
  smartAccount: effectiveStep.smartAccount,
7299
7441
  solanaDepositAddress: effectiveStep.solanaDepositAddress,
@@ -7308,6 +7450,8 @@ function DepositFlow({
7308
7450
  amountUsd: effectiveStep.inputAmountUsd,
7309
7451
  service,
7310
7452
  directTransfer: effectiveStep.directTransfer,
7453
+ initialEvent: effectiveStep.initialEvent,
7454
+ quoteFeeBreakdown: effectiveStep.quoteFeeBreakdown,
7311
7455
  uiConfig,
7312
7456
  onClose,
7313
7457
  onNewDeposit: handleNewDeposit,
@@ -7337,15 +7481,15 @@ function formatDate(iso) {
7337
7481
  month: "short",
7338
7482
  year: "numeric"
7339
7483
  });
7340
- } catch (e32) {
7484
+ } catch (e34) {
7341
7485
  return iso;
7342
7486
  }
7343
7487
  }
7344
7488
  function resolveChainId(value) {
7345
7489
  if (value === void 0 || value === null) return null;
7346
7490
  if (typeof value === "number") return value;
7347
- if (_chunkABVRVW3Pcjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
7348
- 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);
7349
7493
  if (parsed !== null) return parsed;
7350
7494
  const num = Number(value);
7351
7495
  return Number.isFinite(num) ? num : null;
@@ -7354,7 +7498,7 @@ function resolveTokenSymbol(token, chainId) {
7354
7498
  if (!token) return "";
7355
7499
  if (chainId === "solana") {
7356
7500
  const normalized = token.toLowerCase();
7357
- const matched = _chunkABVRVW3Pcjs.SOLANA_TOKENS.find(
7501
+ const matched = _chunkHH46H6ZIcjs.SOLANA_TOKENS.find(
7358
7502
  (entry) => entry.mint.toLowerCase() === normalized
7359
7503
  );
7360
7504
  if (matched) return matched.symbol;
@@ -7363,7 +7507,7 @@ function resolveTokenSymbol(token, chainId) {
7363
7507
  }
7364
7508
  }
7365
7509
  if (chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
7366
- const sym = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, token, chainId);
7510
+ const sym = _chunkHH46H6ZIcjs.getTokenSymbol.call(void 0, token, chainId);
7367
7511
  if (sym !== "Token") return sym;
7368
7512
  }
7369
7513
  return shortenHash(token);
@@ -7374,7 +7518,7 @@ function formatAmount(rawAmount, token, chainId) {
7374
7518
  if (token && chainId !== null && chainId !== void 0) {
7375
7519
  if (chainId === "solana") {
7376
7520
  const normalized = token.toLowerCase();
7377
- const matched = _chunkABVRVW3Pcjs.SOLANA_TOKENS.find(
7521
+ const matched = _chunkHH46H6ZIcjs.SOLANA_TOKENS.find(
7378
7522
  (entry) => entry.mint.toLowerCase() === normalized
7379
7523
  );
7380
7524
  if (matched) {
@@ -7383,7 +7527,7 @@ function formatAmount(rawAmount, token, chainId) {
7383
7527
  decimals = 9;
7384
7528
  }
7385
7529
  } else if (/^0x[a-fA-F0-9]{40}$/.test(token)) {
7386
- decimals = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, token, chainId);
7530
+ decimals = _chunkHH46H6ZIcjs.getTokenDecimalsByAddress.call(void 0, token, chainId);
7387
7531
  }
7388
7532
  }
7389
7533
  try {
@@ -7395,13 +7539,13 @@ function formatAmount(rawAmount, token, chainId) {
7395
7539
  let frac = fracStr.slice(0, 5).replace(/0+$/, "");
7396
7540
  if (frac.length < 2) frac = frac.padEnd(2, "0");
7397
7541
  return `${whole}.${frac}`;
7398
- } catch (e33) {
7542
+ } catch (e35) {
7399
7543
  return rawAmount;
7400
7544
  }
7401
7545
  }
7402
7546
  function getTxExplorerUrl(txHash, chainId) {
7403
7547
  if (!chainId) return null;
7404
- const base2 = _chunkABVRVW3Pcjs.getExplorerUrl.call(void 0, chainId);
7548
+ const base2 = _chunkHH46H6ZIcjs.getExplorerUrl.call(void 0, chainId);
7405
7549
  if (!base2) return null;
7406
7550
  return `${base2}/tx/${txHash}`;
7407
7551
  }
@@ -7444,7 +7588,7 @@ function DepositHistoryPanel({
7444
7588
  );
7445
7589
  const visibleDeposits = _react.useMemo.call(void 0, () => {
7446
7590
  const sourceHashes = new Set(
7447
- 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))
7448
7592
  );
7449
7593
  return deposits.filter(
7450
7594
  (d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
@@ -7466,7 +7610,7 @@ function DepositHistoryPanel({
7466
7610
  className: "rs-modal-header-back",
7467
7611
  "aria-label": "Back",
7468
7612
  onClick: onClose,
7469
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.ChevronLeftIcon, {})
7613
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronLeftIcon, {})
7470
7614
  }
7471
7615
  ) }),
7472
7616
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -7476,29 +7620,29 @@ function DepositHistoryPanel({
7476
7620
  className: "rs-modal-close",
7477
7621
  "aria-label": "Close",
7478
7622
  onClick: onCloseModal,
7479
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.CloseIcon, {})
7623
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CloseIcon, {})
7480
7624
  }
7481
7625
  ) })
7482
7626
  ] }),
7483
7627
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen", children: [
7484
7628
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen-body", children: [
7485
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.HistoryIcon, {}), title: "History" }),
7629
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.HistoryIcon, {}), title: "History" }),
7486
7630
  isLoading && deposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
7487
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, {}) }),
7488
7632
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
7489
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.Spinner, { className: "rs-spinner--sm" }),
7633
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.Spinner, { className: "rs-spinner--sm" }),
7490
7634
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
7491
7635
  ] })
7492
7636
  ] }),
7493
7637
  error && !isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
7494
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, {}) }),
7495
7639
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
7496
7640
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
7497
7641
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: error })
7498
7642
  ] })
7499
7643
  ] }),
7500
7644
  !isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
7501
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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, {}) }),
7502
7646
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
7503
7647
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "No deposits yet" }),
7504
7648
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
@@ -7518,7 +7662,7 @@ function DepositHistoryPanel({
7518
7662
  )
7519
7663
  ] })
7520
7664
  ] }),
7521
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.PoweredBy, {})
7665
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.PoweredBy, {})
7522
7666
  ] })
7523
7667
  ]
7524
7668
  }
@@ -7529,12 +7673,12 @@ function HistoryCard({ deposit }) {
7529
7673
  const status = normalizeStatus(deposit.status, deposit.isSpam);
7530
7674
  const sourceChainId = resolveChainId(deposit.chain);
7531
7675
  const targetChainId = resolveChainId(deposit.targetChain);
7532
- const sourceChainName = sourceChainId ? _chunkABVRVW3Pcjs.getChainName.call(void 0, sourceChainId) : null;
7533
- const targetChainName = targetChainId ? _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChainId) : null;
7534
- const sourceChainIcon = sourceChainId ? _chunkABVRVW3Pcjs.getChainIcon.call(void 0, sourceChainId) : void 0;
7535
- 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;
7536
7680
  const sourceSymbol = resolveTokenSymbol(deposit.token, sourceChainId);
7537
- const sourceTokenIcon = sourceSymbol ? _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceSymbol) : void 0;
7681
+ const sourceTokenIcon = sourceSymbol ? _chunkHH46H6ZIcjs.getTokenIcon.call(void 0, sourceSymbol) : void 0;
7538
7682
  const rawAmount = deposit.sourceAmount && deposit.sourceAmount !== "0" ? deposit.sourceAmount : deposit.amount;
7539
7683
  const formattedAmount = rawAmount ? formatAmount(rawAmount, deposit.token, sourceChainId) : null;
7540
7684
  const displayAmount = formattedAmount ? sourceSymbol && /^USD/.test(sourceSymbol) ? `$${Number(formattedAmount).toLocaleString("en-US", {
@@ -7593,7 +7737,7 @@ function HistoryCard({ deposit }) {
7593
7737
  onClick: (e) => e.stopPropagation(),
7594
7738
  children: [
7595
7739
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: shortenHash(deposit.sourceTxHash) }),
7596
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.ArrowUpRightIcon, {})
7740
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ArrowUpRightIcon, {})
7597
7741
  ]
7598
7742
  }
7599
7743
  )
@@ -7608,7 +7752,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
7608
7752
  // src/DepositModal.tsx
7609
7753
 
7610
7754
  var ReownDepositInner = _react.lazy.call(void 0,
7611
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-J3KYAOD3.cjs"))).then((m) => ({ default: m.DepositModalReown }))
7755
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-CHVDFNEX.cjs"))).then((m) => ({ default: m.DepositModalReown }))
7612
7756
  );
7613
7757
  function sortByCreatedAtDesc(items) {
7614
7758
  return [...items].sort((a, b) => {
@@ -7657,9 +7801,9 @@ function DepositModalInner({
7657
7801
  defaultAmount,
7658
7802
  recipient,
7659
7803
  appBalanceUsd,
7660
- backendUrl = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL,
7804
+ backendUrl = _chunkHH46H6ZIcjs.DEFAULT_BACKEND_URL,
7661
7805
  rpcUrls: rpcUrlsProp,
7662
- signerAddress = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS,
7806
+ signerAddress = _chunkHH46H6ZIcjs.DEFAULT_SIGNER_ADDRESS,
7663
7807
  sessionChainIds,
7664
7808
  forceRegister = false,
7665
7809
  enableSolana = true,
@@ -7686,12 +7830,13 @@ function DepositModalInner({
7686
7830
  debug
7687
7831
  }) {
7688
7832
  const modalRef = _react.useRef.call(void 0, null);
7689
- const onReadyRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onReady);
7833
+ const onReadyRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onReady);
7690
7834
  const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
7835
+ const [swappedImmersive, setSwappedImmersive] = _react.useState.call(void 0, false);
7691
7836
  const [backHandler, setBackHandler] = _react.useState.call(void 0,
7692
7837
  void 0
7693
7838
  );
7694
- const showHistoryButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _242 => _242.showHistoryButton]), () => ( false));
7839
+ const showHistoryButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _261 => _261.showHistoryButton]), () => ( false));
7695
7840
  const historyButtonVisible = showHistoryButton && (currentScreen === "select-asset" || currentScreen === "deposit-address");
7696
7841
  const [historyOpen, setHistoryOpen] = _react.useState.call(void 0, false);
7697
7842
  const [historyDeposits, setHistoryDeposits] = _react.useState.call(void 0, []);
@@ -7702,23 +7847,23 @@ function DepositModalInner({
7702
7847
  const cursorRef = _react.useRef.call(void 0, null);
7703
7848
  const historyStaleRef = _react.useRef.call(void 0, false);
7704
7849
  const historyLoadedRef = _react.useRef.call(void 0, false);
7705
- const targetChain = targetChainProp === "solana" ? "solana" : _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
7706
- const sourceChain = sourceChainProp ? _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp) : void 0;
7707
- const rpcUrls = _chunkZDYV536Qcjs.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);
7708
7853
  const [recipientIsContract, setRecipientIsContract] = _react.useState.call(void 0, false);
7709
- const onErrorRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onError);
7854
+ const onErrorRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onError);
7710
7855
  _react.useEffect.call(void 0, () => {
7711
- 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 })) {
7712
7857
  setRecipientIsContract(false);
7713
7858
  return;
7714
7859
  }
7715
7860
  let cancelled = false;
7716
- _chunkZDYV536Qcjs.getHyperEvmReadClient.call(void 0, rpcUrls).getCode({ address: recipient }).then((code) => {
7861
+ _chunkUN6MEOOAcjs.getHyperEvmReadClient.call(void 0, rpcUrls).getCode({ address: recipient }).then((code) => {
7717
7862
  if (cancelled) return;
7718
- const isContract = _chunkABVRVW3Pcjs.isContractBytecode.call(void 0, code);
7863
+ const isContract = _chunkHH46H6ZIcjs.isContractBytecode.call(void 0, code);
7719
7864
  setRecipientIsContract(isContract);
7720
7865
  if (isContract) {
7721
- _optionalChain([onErrorRef, 'access', _243 => _243.current, 'optionalCall', _244 => _244({
7866
+ _optionalChain([onErrorRef, 'access', _262 => _262.current, 'optionalCall', _263 => _263({
7722
7867
  message: "HyperCore deposits require an EOA recipient; the configured recipient is a smart contract.",
7723
7868
  code: "HYPERCORE_RECIPIENT_NOT_EOA"
7724
7869
  })]);
@@ -7731,12 +7876,30 @@ function DepositModalInner({
7731
7876
  };
7732
7877
  }, [targetChain, recipient, onErrorRef, rpcUrls]);
7733
7878
  const service = _react.useMemo.call(void 0,
7734
- () => _chunkZDYV536Qcjs.createDepositService.call(void 0, backendUrl, {
7879
+ () => _chunkUN6MEOOAcjs.createDepositService.call(void 0, backendUrl, {
7735
7880
  debug,
7736
7881
  debugScope: "service:deposit"
7737
7882
  }),
7738
7883
  [backendUrl, debug]
7739
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]);
7740
7903
  const store = _react.useMemo.call(void 0,
7741
7904
  () => createDepositStore({ targetChain, targetToken }),
7742
7905
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -7747,12 +7910,12 @@ function DepositModalInner({
7747
7910
  }, [store, targetChain, targetToken]);
7748
7911
  _react.useEffect.call(void 0, () => {
7749
7912
  if (isOpen && modalRef.current) {
7750
- _chunkZDYV536Qcjs.applyTheme.call(void 0, modalRef.current, theme);
7913
+ _chunkUN6MEOOAcjs.applyTheme.call(void 0, modalRef.current, theme);
7751
7914
  }
7752
7915
  }, [isOpen, theme]);
7753
7916
  _react.useEffect.call(void 0, () => {
7754
7917
  if (isOpen) {
7755
- _optionalChain([onReadyRef, 'access', _245 => _245.current, 'optionalCall', _246 => _246()]);
7918
+ _optionalChain([onReadyRef, 'access', _264 => _264.current, 'optionalCall', _265 => _265()]);
7756
7919
  }
7757
7920
  }, [isOpen, onReadyRef]);
7758
7921
  const handleStepChange = _react.useCallback.call(void 0,
@@ -7828,10 +7991,10 @@ function DepositModalInner({
7828
7991
  fetchHistory("initial");
7829
7992
  }
7830
7993
  }, [historyOpen, fetchHistory]);
7831
- const onLifecycleRef = _chunkZDYV536Qcjs.useLatestRef.call(void 0, onLifecycle);
7994
+ const onLifecycleRef = _chunkUN6MEOOAcjs.useLatestRef.call(void 0, onLifecycle);
7832
7995
  const handleLifecycle = _react.useCallback.call(void 0,
7833
7996
  (event) => {
7834
- _optionalChain([onLifecycleRef, 'access', _247 => _247.current, 'optionalCall', _248 => _248(event)]);
7997
+ _optionalChain([onLifecycleRef, 'access', _266 => _266.current, 'optionalCall', _267 => _267(event)]);
7835
7998
  if (event.type === "smart-account-changed" && !event.evm && !event.solana) {
7836
7999
  historyStaleRef.current = true;
7837
8000
  }
@@ -7850,6 +8013,9 @@ function DepositModalInner({
7850
8013
  cursorRef.current = null;
7851
8014
  historyStaleRef.current = false;
7852
8015
  historyLoadedRef.current = false;
8016
+ setCurrentScreen("connect");
8017
+ setBackHandler(void 0);
8018
+ setSwappedImmersive(false);
7853
8019
  }
7854
8020
  }, [isOpen]);
7855
8021
  _react.useEffect.call(void 0, () => {
@@ -7857,18 +8023,20 @@ function DepositModalInner({
7857
8023
  store.dispatch({ type: "flow/reset" });
7858
8024
  }
7859
8025
  }, [isOpen, store]);
7860
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _249 => _249.showBackButton]), () => ( true));
8026
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _268 => _268.showBackButton]), () => ( true));
7861
8027
  const canGoBack = backHandler !== void 0;
7862
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7863
- _chunkZDYV536Qcjs.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,
7864
8032
  {
7865
8033
  isOpen,
7866
8034
  onClose,
7867
8035
  className,
7868
8036
  inline,
7869
8037
  closeOnOverlayClick,
7870
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { ref: modalRef, className: "rs-modal", children: [
7871
- /* @__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: [
7872
8040
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7873
8041
  "button",
7874
8042
  {
@@ -7876,7 +8044,7 @@ function DepositModalInner({
7876
8044
  className: "rs-modal-header-back",
7877
8045
  "aria-label": "Go back",
7878
8046
  onClick: backHandler,
7879
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.ChevronLeftIcon, {})
8047
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.ChevronLeftIcon, {})
7880
8048
  }
7881
8049
  ) }),
7882
8050
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
@@ -7888,7 +8056,7 @@ function DepositModalInner({
7888
8056
  "aria-label": "Deposit history",
7889
8057
  onClick: handleHistoryOpen,
7890
8058
  disabled: !recipient,
7891
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.HistoryIcon, {})
8059
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.HistoryIcon, {})
7892
8060
  }
7893
8061
  ),
7894
8062
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -7898,12 +8066,12 @@ function DepositModalInner({
7898
8066
  onClick: onClose,
7899
8067
  className: "rs-modal-close",
7900
8068
  "aria-label": "Close",
7901
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.CloseIcon, {})
8069
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUN6MEOOAcjs.CloseIcon, {})
7902
8070
  }
7903
8071
  )
7904
8072
  ] })
7905
8073
  ] }),
7906
- recipientIsContract ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZDYV536Qcjs.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,
7907
8075
  DepositFlow,
7908
8076
  {
7909
8077
  dappWalletClient,
@@ -7937,6 +8105,7 @@ function DepositModalInner({
7937
8105
  uiConfig,
7938
8106
  allowedRoutes,
7939
8107
  onStepChange: handleStepChange,
8108
+ onSwappedImmersiveChange: setSwappedImmersive,
7940
8109
  onClose,
7941
8110
  onLifecycle: handleLifecycle,
7942
8111
  onEvent,