@rhinestone/deposit-modal 0.2.0 → 0.2.2

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.
@@ -28,7 +28,7 @@
28
28
 
29
29
 
30
30
 
31
- var _chunkXW4M7WDIcjs = require('./chunk-XW4M7WDI.cjs');
31
+ var _chunkT2KOQH57cjs = require('./chunk-T2KOQH57.cjs');
32
32
 
33
33
 
34
34
 
@@ -68,15 +68,15 @@ var _viem = require('viem');
68
68
 
69
69
  var _jsxruntime = require('react/jsx-runtime');
70
70
  async function resolveSessionOwner(eoaAddress) {
71
- const localOwner = _chunkXW4M7WDIcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
71
+ const localOwner = _chunkT2KOQH57cjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
72
72
  if (localOwner) {
73
73
  return {
74
- account: _chunkXW4M7WDIcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
74
+ account: _chunkT2KOQH57cjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
75
75
  address: localOwner.address
76
76
  };
77
77
  }
78
- const created = _chunkXW4M7WDIcjs.createSessionOwnerKey.call(void 0, );
79
- _chunkXW4M7WDIcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
78
+ const created = _chunkT2KOQH57cjs.createSessionOwnerKey.call(void 0, );
79
+ _chunkT2KOQH57cjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
80
80
  return {
81
81
  account: created.account,
82
82
  address: created.address
@@ -115,7 +115,7 @@ function SetupStep({
115
115
  const setup = await service.setupAccount({
116
116
  ownerAddress: address,
117
117
  sessionOwnerAddress: sessionOwner.address,
118
- targetChain: _chunkXW4M7WDIcjs.toEvmCaip2.call(void 0, targetChain),
118
+ targetChain: _chunkT2KOQH57cjs.toEvmCaip2.call(void 0, targetChain),
119
119
  targetToken,
120
120
  recipient,
121
121
  postBridgeActions,
@@ -149,7 +149,7 @@ function SetupStep({
149
149
  primaryType: typedData.primaryType,
150
150
  message: typedData.message
151
151
  });
152
- const sessionDetails = _chunkXW4M7WDIcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
152
+ const sessionDetails = _chunkT2KOQH57cjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
153
153
  setState({ type: "registering" });
154
154
  const registerResult = await service.registerAccount({
155
155
  address: smartAccount,
@@ -161,7 +161,7 @@ function SetupStep({
161
161
  eoaAddress: address,
162
162
  sessionOwner: sessionOwner.address,
163
163
  target: {
164
- chain: _chunkXW4M7WDIcjs.toEvmCaip2.call(void 0, targetChain),
164
+ chain: _chunkT2KOQH57cjs.toEvmCaip2.call(void 0, targetChain),
165
165
  token: targetToken,
166
166
  ...recipient && { recipient },
167
167
  ..._optionalChain([postBridgeActions, 'optionalAccess', _2 => _2.length]) && { postBridgeActions },
@@ -230,7 +230,7 @@ function SetupStep({
230
230
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
231
231
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
232
232
  isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
233
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
233
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
234
234
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
235
235
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
236
236
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
@@ -267,7 +267,7 @@ function SetupStep({
267
267
  ] })
268
268
  ] })
269
269
  ] }),
270
- isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
270
+ isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
271
271
  ] });
272
272
  }
273
273
 
@@ -293,7 +293,7 @@ function AssetSelectStep({
293
293
  const [error, setError] = _react.useState.call(void 0, null);
294
294
  const defaultAssetId = _react.useMemo.call(void 0, () => {
295
295
  if (!defaultSourceChain || !defaultSourceToken) return null;
296
- return _chunkXW4M7WDIcjs.getAssetId.call(void 0, {
296
+ return _chunkT2KOQH57cjs.getAssetId.call(void 0, {
297
297
  chainId: defaultSourceChain,
298
298
  token: defaultSourceToken
299
299
  });
@@ -310,7 +310,7 @@ function AssetSelectStep({
310
310
  try {
311
311
  const portfolio = await service.fetchPortfolio(address);
312
312
  if (!active) return;
313
- const portfolioAssets = _chunkXW4M7WDIcjs.portfolioToAssets.call(void 0, portfolio.tokens);
313
+ const portfolioAssets = _chunkT2KOQH57cjs.portfolioToAssets.call(void 0, portfolio.tokens);
314
314
  setAssets(portfolioAssets);
315
315
  const hasNative = portfolioAssets.some(
316
316
  (asset) => asset.token.toLowerCase() === _chunkMUWVDVY4cjs.NATIVE_TOKEN_ADDRESS
@@ -391,7 +391,7 @@ function AssetSelectStep({
391
391
  const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
392
392
  const numeric = Number(raw);
393
393
  if (!Number.isFinite(numeric)) return raw;
394
- return _chunkXW4M7WDIcjs.tokenFormatter.format(numeric);
394
+ return _chunkT2KOQH57cjs.tokenFormatter.format(numeric);
395
395
  } catch (e3) {
396
396
  return asset.balance;
397
397
  }
@@ -405,7 +405,7 @@ function AssetSelectStep({
405
405
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
406
406
  children: [
407
407
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
408
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.Spinner, { className: "rs-text-tertiary" }),
408
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.Spinner, { className: "rs-text-tertiary" }),
409
409
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
410
410
  ] }),
411
411
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-alert-text", children: error }) }),
@@ -504,7 +504,7 @@ function AssetSelectStep({
504
504
  ] })
505
505
  ] })
506
506
  ] }),
507
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkXW4M7WDIcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
507
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkT2KOQH57cjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
508
508
  ]
509
509
  },
510
510
  asset.id
@@ -514,7 +514,7 @@ function AssetSelectStep({
514
514
  }
515
515
  ),
516
516
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
517
- _chunkXW4M7WDIcjs.Button,
517
+ _chunkT2KOQH57cjs.Button,
518
518
  {
519
519
  onClick: () => selectedAsset && onContinue(selectedAsset),
520
520
  disabled: !selectedAsset,
@@ -522,7 +522,7 @@ function AssetSelectStep({
522
522
  children: "Continue"
523
523
  }
524
524
  ) }),
525
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.PoweredBy, {})
525
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
526
526
  ] });
527
527
  }
528
528
  async function fetchNativeAssets(address, publicClient, existing) {
@@ -530,7 +530,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
530
530
  const connectedChainId = _optionalChain([publicClient, 'access', _12 => _12.chain, 'optionalAccess', _13 => _13.id]);
531
531
  if (!connectedChainId) return [];
532
532
  if (!_chunkMUWVDVY4cjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
533
- const id = _chunkXW4M7WDIcjs.getAssetId.call(void 0, {
533
+ const id = _chunkT2KOQH57cjs.getAssetId.call(void 0, {
534
534
  chainId: connectedChainId,
535
535
  token: _chunkMUWVDVY4cjs.NATIVE_TOKEN_ADDRESS
536
536
  });
@@ -619,7 +619,7 @@ function AmountStep({
619
619
  const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
620
620
  if (!balanceTarget || !publicClient) return;
621
621
  try {
622
- const bal = _chunkXW4M7WDIcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
622
+ const bal = _chunkT2KOQH57cjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
623
623
  address: asset.token,
624
624
  abi: _viem.erc20Abi,
625
625
  functionName: "balanceOf",
@@ -645,7 +645,7 @@ function AmountStep({
645
645
  setIsSwitching(true);
646
646
  switchChain(asset.chainId).catch((err) => {
647
647
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
648
- setError(_chunkXW4M7WDIcjs.formatUserError.call(void 0, raw));
648
+ setError(_chunkT2KOQH57cjs.formatUserError.call(void 0, raw));
649
649
  }).finally(() => {
650
650
  setIsSwitching(false);
651
651
  });
@@ -681,7 +681,7 @@ function AmountStep({
681
681
  const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
682
682
  const numeric = Number(raw);
683
683
  if (!Number.isFinite(numeric)) return raw;
684
- return _chunkXW4M7WDIcjs.tokenFormatter.format(numeric);
684
+ return _chunkT2KOQH57cjs.tokenFormatter.format(numeric);
685
685
  } catch (e8) {
686
686
  return "...";
687
687
  }
@@ -725,7 +725,7 @@ function AmountStep({
725
725
  const usdValue = numericAmount;
726
726
  if (_optionalChain([uiConfig, 'optionalAccess', _18 => _18.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
727
727
  setError(
728
- `Maximum deposit is ${_chunkXW4M7WDIcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
728
+ `Maximum deposit is ${_chunkT2KOQH57cjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
729
729
  );
730
730
  return;
731
731
  }
@@ -807,7 +807,7 @@ function AmountStep({
807
807
  hasPricing && balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
808
808
  " ",
809
809
  "(",
810
- _chunkXW4M7WDIcjs.currencyFormatter.format(balanceUsd),
810
+ _chunkT2KOQH57cjs.currencyFormatter.format(balanceUsd),
811
811
  ")"
812
812
  ] })
813
813
  ] }) })
@@ -944,7 +944,7 @@ function AmountStep({
944
944
  )
945
945
  ] }),
946
946
  _optionalChain([uiConfig, 'optionalAccess', _21 => _21.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
947
- _chunkXW4M7WDIcjs.currencyFormatter.format(uiConfig.minDepositUsd),
947
+ _chunkT2KOQH57cjs.currencyFormatter.format(uiConfig.minDepositUsd),
948
948
  " minimum deposit"
949
949
  ] }),
950
950
  error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
@@ -970,7 +970,7 @@ function AmountStep({
970
970
  ] })
971
971
  ] }),
972
972
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
973
- _chunkXW4M7WDIcjs.Button,
973
+ _chunkT2KOQH57cjs.Button,
974
974
  {
975
975
  onClick: handleContinue,
976
976
  fullWidth: true,
@@ -978,7 +978,7 @@ function AmountStep({
978
978
  children: isCheckingLiquidity ? "Checking liquidity\u2026" : _optionalChain([uiConfig, 'optionalAccess', _22 => _22.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
979
979
  }
980
980
  ) }),
981
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.PoweredBy, {})
981
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
982
982
  ] });
983
983
  }
984
984
 
@@ -1029,7 +1029,7 @@ function ConfirmStep({
1029
1029
  setIsSwitching(true);
1030
1030
  switchChain(asset.chainId).catch((err) => {
1031
1031
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
1032
- setError(_chunkXW4M7WDIcjs.formatUserError.call(void 0, raw));
1032
+ setError(_chunkT2KOQH57cjs.formatUserError.call(void 0, raw));
1033
1033
  }).finally(() => {
1034
1034
  setIsSwitching(false);
1035
1035
  });
@@ -1072,7 +1072,7 @@ function ConfirmStep({
1072
1072
  throw new Error("Wallet not properly connected");
1073
1073
  }
1074
1074
  const transferTo = sameRoute ? recipient : smartAccount;
1075
- const hash = _chunkXW4M7WDIcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1075
+ const hash = _chunkT2KOQH57cjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1076
1076
  account,
1077
1077
  chain,
1078
1078
  to: transferTo,
@@ -1089,7 +1089,7 @@ function ConfirmStep({
1089
1089
  onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
1090
1090
  } catch (err) {
1091
1091
  const raw = err instanceof Error ? err.message : "Transfer failed";
1092
- const message = _chunkXW4M7WDIcjs.formatUserError.call(void 0, raw);
1092
+ const message = _chunkT2KOQH57cjs.formatUserError.call(void 0, raw);
1093
1093
  setError(message);
1094
1094
  _optionalChain([onError, 'optionalCall', _26 => _26(message, "TRANSFER_ERROR")]);
1095
1095
  } finally {
@@ -1231,7 +1231,7 @@ function ConfirmStep({
1231
1231
  ] })
1232
1232
  ] }),
1233
1233
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1234
- _chunkXW4M7WDIcjs.Button,
1234
+ _chunkT2KOQH57cjs.Button,
1235
1235
  {
1236
1236
  onClick: handleConfirm,
1237
1237
  loading: isSubmitting,
@@ -1240,7 +1240,7 @@ function ConfirmStep({
1240
1240
  children: "Confirm Order"
1241
1241
  }
1242
1242
  ) }),
1243
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.PoweredBy, {})
1243
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
1244
1244
  ] });
1245
1245
  }
1246
1246
 
@@ -1378,9 +1378,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
1378
1378
  var MAX_POLL_INTERVAL = 3e4;
1379
1379
  var BACKOFF_MULTIPLIER = 1.5;
1380
1380
  function isEventForTx(event, txHash) {
1381
- const eventTxHash = _chunkXW4M7WDIcjs.getEventTxHash.call(void 0, event);
1381
+ const eventTxHash = _chunkT2KOQH57cjs.getEventTxHash.call(void 0, event);
1382
1382
  if (!eventTxHash) return false;
1383
- return _chunkXW4M7WDIcjs.txRefsMatch.call(void 0, eventTxHash, txHash);
1383
+ return _chunkT2KOQH57cjs.txRefsMatch.call(void 0, eventTxHash, txHash);
1384
1384
  }
1385
1385
  function truncateHash(hash) {
1386
1386
  return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
@@ -1451,6 +1451,7 @@ var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1451
1451
  function DepositNotification({
1452
1452
  deposit,
1453
1453
  smartAccount,
1454
+ solanaDepositAddress,
1454
1455
  targetChain,
1455
1456
  targetToken,
1456
1457
  waitForFinalTx,
@@ -1474,7 +1475,7 @@ function DepositNotification({
1474
1475
  const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
1475
1476
  const pollTimeoutRef = _react.useRef.call(void 0, null);
1476
1477
  const completedRef = _react.useRef.call(void 0, _nullishCoalesce(directTransfer, () => ( false)));
1477
- const depositContextRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, {
1478
+ const depositContextRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, {
1478
1479
  amount,
1479
1480
  sourceChain,
1480
1481
  sourceToken: token,
@@ -1483,8 +1484,8 @@ function DepositNotification({
1483
1484
  waitForFinalTx,
1484
1485
  hasPostBridgeActions
1485
1486
  });
1486
- const onCompleteRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onComplete);
1487
- const onFailedRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onFailed);
1487
+ const onCompleteRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onComplete);
1488
+ const onFailedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onFailed);
1488
1489
  const handleComplete = _react.useCallback.call(void 0,
1489
1490
  (destTxHash) => {
1490
1491
  if (completedRef.current) return;
@@ -1521,7 +1522,8 @@ function DepositNotification({
1521
1522
  let isMounted = true;
1522
1523
  async function pollStatus() {
1523
1524
  try {
1524
- const data = await service.fetchStatus(smartAccount, txHash);
1525
+ const account = sourceChain === "solana" && solanaDepositAddress ? solanaDepositAddress : smartAccount;
1526
+ const data = await service.fetchStatus(account, txHash);
1525
1527
  if (!isMounted) return;
1526
1528
  const lastEvent = data.lastEvent;
1527
1529
  const eventForTx = isEventForTx(lastEvent, txHash) ? lastEvent : void 0;
@@ -1582,6 +1584,8 @@ function DepositNotification({
1582
1584
  handleFailed,
1583
1585
  service,
1584
1586
  smartAccount,
1587
+ solanaDepositAddress,
1588
+ sourceChain,
1585
1589
  status,
1586
1590
  txHash
1587
1591
  ]);
@@ -1621,7 +1625,7 @@ function DepositNotification({
1621
1625
  }
1622
1626
  )
1623
1627
  }
1624
- ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.Spinner, {}) });
1628
+ ) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.Spinner, {}) });
1625
1629
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1626
1630
  "div",
1627
1631
  {
@@ -2116,8 +2120,23 @@ function DepositAddressStep({
2116
2120
  return;
2117
2121
  }
2118
2122
  try {
2119
- const status = await service.fetchLatestStatus(smartAccount);
2123
+ const accounts = [smartAccount];
2124
+ if (solanaDepositAddress) accounts.push(solanaDepositAddress);
2125
+ const results = await Promise.all(
2126
+ accounts.map(
2127
+ (addr) => service.fetchLatestStatus(addr).catch(() => ({ lastEvent: void 0 }))
2128
+ )
2129
+ );
2120
2130
  if (cancelled) return;
2131
+ const events = results.map((r) => r.lastEvent).filter((e) => Boolean(e));
2132
+ const status = {
2133
+ lastEvent: events.reduce((latest, ev) => {
2134
+ if (!latest) return ev;
2135
+ const a = ev.time ? Date.parse(ev.time) : 0;
2136
+ const b = latest.time ? Date.parse(latest.time) : 0;
2137
+ return a > b ? ev : latest;
2138
+ }, void 0)
2139
+ };
2121
2140
  if (isTrackingRef.current) {
2122
2141
  if (!cancelled) {
2123
2142
  timeoutId = setTimeout(poll, POLL_INTERVAL_MS);
@@ -2125,10 +2144,10 @@ function DepositAddressStep({
2125
2144
  return;
2126
2145
  }
2127
2146
  const event = status.lastEvent;
2128
- const eventTxHash = _chunkXW4M7WDIcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkXW4M7WDIcjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
2147
+ const eventTxHash = _chunkT2KOQH57cjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkT2KOQH57cjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
2129
2148
  if (baselineTxHashRef.current === void 0) {
2130
2149
  baselineTxHashRef.current = eventTxHash;
2131
- } else if (eventTxHash && (!baselineTxHashRef.current || !_chunkXW4M7WDIcjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
2150
+ } else if (eventTxHash && (!baselineTxHashRef.current || !_chunkT2KOQH57cjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
2132
2151
  const details = getDepositEventDetails(event);
2133
2152
  const fallback = sourceSelectionRef.current;
2134
2153
  const chainId = _nullishCoalesce(details.chainId, () => ( fallback.chainId));
@@ -2183,7 +2202,7 @@ function DepositAddressStep({
2183
2202
  cancelled = true;
2184
2203
  clearTimeout(timeoutId);
2185
2204
  };
2186
- }, [smartAccount, service]);
2205
+ }, [smartAccount, solanaDepositAddress, service]);
2187
2206
  const handleNotificationComplete = _react.useCallback.call(void 0,
2188
2207
  (txHash, destinationTxHash, context) => {
2189
2208
  isTrackingRef.current = false;
@@ -2362,9 +2381,29 @@ function DepositAddressStep({
2362
2381
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, QRCode, { value: displayAddress, size: 150, iconSrc: qrIconSrc }) }),
2363
2382
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-info", children: [
2364
2383
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-label", children: [
2365
- "Your ",
2366
- isSolana ? "Solana" : "EVM",
2367
- " deposit address"
2384
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Your deposit address" }),
2385
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: "Send any accepted token to this address and it will auto swap to your account.", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2386
+ "svg",
2387
+ {
2388
+ className: "rs-deposit-address-label-icon",
2389
+ viewBox: "0 0 24 24",
2390
+ fill: "none",
2391
+ stroke: "currentColor",
2392
+ strokeWidth: "2",
2393
+ "aria-hidden": "true",
2394
+ children: [
2395
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "12", cy: "12", r: "9" }),
2396
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2397
+ "path",
2398
+ {
2399
+ strokeLinecap: "round",
2400
+ strokeLinejoin: "round",
2401
+ d: "M12 8h.01M11 12h1v4h1"
2402
+ }
2403
+ )
2404
+ ]
2405
+ }
2406
+ ) })
2368
2407
  ] }),
2369
2408
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-value", children: displayAddress }),
2370
2409
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -2529,6 +2568,7 @@ function DepositAddressStep({
2529
2568
  {
2530
2569
  deposit,
2531
2570
  smartAccount,
2571
+ solanaDepositAddress,
2532
2572
  targetChain,
2533
2573
  targetToken,
2534
2574
  waitForFinalTx,
@@ -2540,7 +2580,7 @@ function DepositAddressStep({
2540
2580
  },
2541
2581
  deposit.id
2542
2582
  )) }),
2543
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.PoweredBy, {})
2583
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
2544
2584
  ] });
2545
2585
  }
2546
2586
  DepositAddressStep.displayName = "DepositAddressStep";
@@ -2571,7 +2611,7 @@ function SolanaTokenSelectStep({
2571
2611
  setError(null);
2572
2612
  const portfolioBySymbol = {};
2573
2613
  try {
2574
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
2614
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
2575
2615
  solanaAddress
2576
2616
  });
2577
2617
  const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
@@ -2594,12 +2634,12 @@ function SolanaTokenSelectStep({
2594
2634
  };
2595
2635
  }
2596
2636
  }
2597
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
2637
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
2598
2638
  symbols: Object.keys(portfolioBySymbol)
2599
2639
  });
2600
2640
  } catch (err) {
2601
2641
  if (!active) return;
2602
- _chunkXW4M7WDIcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
2642
+ _chunkT2KOQH57cjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
2603
2643
  solanaAddress
2604
2644
  });
2605
2645
  setError(
@@ -2653,7 +2693,7 @@ function SolanaTokenSelectStep({
2653
2693
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
2654
2694
  children: [
2655
2695
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
2656
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.Spinner, { className: "rs-text-tertiary" }),
2696
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.Spinner, { className: "rs-text-tertiary" }),
2657
2697
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
2658
2698
  ] }),
2659
2699
  !loading && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
@@ -2690,7 +2730,7 @@ function SolanaTokenSelectStep({
2690
2730
  try {
2691
2731
  const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
2692
2732
  const numeric = Number(raw);
2693
- formattedBalance = Number.isFinite(numeric) ? _chunkXW4M7WDIcjs.tokenFormatter.format(numeric) : raw;
2733
+ formattedBalance = Number.isFinite(numeric) ? _chunkT2KOQH57cjs.tokenFormatter.format(numeric) : raw;
2694
2734
  } catch (e16) {
2695
2735
  formattedBalance = "...";
2696
2736
  }
@@ -2734,7 +2774,7 @@ function SolanaTokenSelectStep({
2734
2774
  ] })
2735
2775
  ] })
2736
2776
  ] }),
2737
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkXW4M7WDIcjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
2777
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkT2KOQH57cjs.currencyFormatter.format(entry.balanceUsd) : `${formattedBalance} ${entry.token.symbol}` })
2738
2778
  ]
2739
2779
  },
2740
2780
  entry.token.symbol
@@ -2744,7 +2784,7 @@ function SolanaTokenSelectStep({
2744
2784
  }
2745
2785
  ),
2746
2786
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2747
- _chunkXW4M7WDIcjs.Button,
2787
+ _chunkT2KOQH57cjs.Button,
2748
2788
  {
2749
2789
  onClick: () => selectedEntry && onContinue(
2750
2790
  selectedEntry.token,
@@ -2756,7 +2796,7 @@ function SolanaTokenSelectStep({
2756
2796
  children: "Continue"
2757
2797
  }
2758
2798
  ) }),
2759
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.PoweredBy, {})
2799
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
2760
2800
  ] });
2761
2801
  }
2762
2802
 
@@ -2804,7 +2844,7 @@ function SolanaAmountStep({
2804
2844
  const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
2805
2845
  const numeric = Number(raw);
2806
2846
  if (!Number.isFinite(numeric)) return raw;
2807
- return _chunkXW4M7WDIcjs.tokenFormatter.format(numeric);
2847
+ return _chunkT2KOQH57cjs.tokenFormatter.format(numeric);
2808
2848
  } catch (e18) {
2809
2849
  return "...";
2810
2850
  }
@@ -2822,7 +2862,7 @@ function SolanaAmountStep({
2822
2862
  }, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
2823
2863
  const formattedBalanceUsd = _react.useMemo.call(void 0, () => {
2824
2864
  if (computedBalanceUsd === null || computedBalanceUsd <= 0) return null;
2825
- return _chunkXW4M7WDIcjs.currencyFormatter.format(computedBalanceUsd);
2865
+ return _chunkT2KOQH57cjs.currencyFormatter.format(computedBalanceUsd);
2826
2866
  }, [computedBalanceUsd]);
2827
2867
  const spendableBalance = _react.useMemo.call(void 0, () => {
2828
2868
  if (!isNativeSol(token)) return balance;
@@ -2847,7 +2887,7 @@ function SolanaAmountStep({
2847
2887
  const factor = 10 ** maxDecimals;
2848
2888
  const truncated = Math.floor(value * factor) / factor;
2849
2889
  const formatted = truncated.toFixed(maxDecimals).replace(/\.?0+$/, "");
2850
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
2890
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
2851
2891
  percentage,
2852
2892
  symbol: token.symbol,
2853
2893
  formatted
@@ -2861,7 +2901,7 @@ function SolanaAmountStep({
2861
2901
  const handleContinue = () => {
2862
2902
  const numericAmount = parseFloat(amount);
2863
2903
  if (isNaN(numericAmount) || numericAmount <= 0) {
2864
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2904
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2865
2905
  amount,
2866
2906
  reason: "nan-or-non-positive"
2867
2907
  });
@@ -2873,7 +2913,7 @@ function SolanaAmountStep({
2873
2913
  const usdValue = numericAmount;
2874
2914
  if (_optionalChain([uiConfig, 'optionalAccess', _82 => _82.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
2875
2915
  setError(
2876
- `Maximum deposit is ${_chunkXW4M7WDIcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
2916
+ `Maximum deposit is ${_chunkT2KOQH57cjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
2877
2917
  );
2878
2918
  return;
2879
2919
  }
@@ -2888,7 +2928,7 @@ function SolanaAmountStep({
2888
2928
  try {
2889
2929
  amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
2890
2930
  } catch (e22) {
2891
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2931
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2892
2932
  amount,
2893
2933
  sourceAmount: sourceAmountStr,
2894
2934
  reason: "parse-units-failed"
@@ -2898,7 +2938,7 @@ function SolanaAmountStep({
2898
2938
  }
2899
2939
  if (amountInUnits > spendableBalance) {
2900
2940
  const isReserveIssue = isNativeSol(token) && amountInUnits <= balance;
2901
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2941
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
2902
2942
  amount,
2903
2943
  balance: balance.toString(),
2904
2944
  spendableBalance: spendableBalance.toString(),
@@ -2910,7 +2950,7 @@ function SolanaAmountStep({
2910
2950
  );
2911
2951
  return;
2912
2952
  }
2913
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
2953
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
2914
2954
  symbol: token.symbol,
2915
2955
  inputAmountUsd: amount,
2916
2956
  sourceAmount: sourceAmountStr,
@@ -2979,7 +3019,7 @@ function SolanaAmountStep({
2979
3019
  )
2980
3020
  ] }),
2981
3021
  _optionalChain([uiConfig, 'optionalAccess', _84 => _84.minDepositUsd]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-minimum", children: [
2982
- _chunkXW4M7WDIcjs.currencyFormatter.format(uiConfig.minDepositUsd),
3022
+ _chunkT2KOQH57cjs.currencyFormatter.format(uiConfig.minDepositUsd),
2983
3023
  " minimum deposit"
2984
3024
  ] }),
2985
3025
  error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-error", children: [
@@ -3005,7 +3045,7 @@ function SolanaAmountStep({
3005
3045
  ] })
3006
3046
  ] }),
3007
3047
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3008
- _chunkXW4M7WDIcjs.Button,
3048
+ _chunkT2KOQH57cjs.Button,
3009
3049
  {
3010
3050
  onClick: handleContinue,
3011
3051
  fullWidth: true,
@@ -3013,7 +3053,7 @@ function SolanaAmountStep({
3013
3053
  children: _optionalChain([uiConfig, 'optionalAccess', _85 => _85.minDepositUsd]) && parseFloat(amount) > 0 && parseFloat(amount) < uiConfig.minDepositUsd ? "Update order" : "Continue"
3014
3054
  }
3015
3055
  ) }),
3016
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.PoweredBy, {})
3056
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
3017
3057
  ] });
3018
3058
  }
3019
3059
 
@@ -3057,7 +3097,7 @@ function SolanaConfirmStep({
3057
3097
  const receiveAmount = isSameToken ? formattedReceiveAmount : `~ ${formattedReceiveAmount}`;
3058
3098
  const handleConfirm = async () => {
3059
3099
  if (!solanaProvider) {
3060
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3100
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3061
3101
  reason: "missing-provider"
3062
3102
  });
3063
3103
  setError("Solana wallet not connected");
@@ -3065,7 +3105,7 @@ function SolanaConfirmStep({
3065
3105
  }
3066
3106
  const parsedAmount = parseFloat(sourceAmount);
3067
3107
  if (isNaN(parsedAmount) || parsedAmount <= 0) {
3068
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3108
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
3069
3109
  reason: "invalid-amount",
3070
3110
  sourceAmount
3071
3111
  });
@@ -3074,7 +3114,7 @@ function SolanaConfirmStep({
3074
3114
  }
3075
3115
  setError(null);
3076
3116
  setIsSubmitting(true);
3077
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
3117
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
3078
3118
  smartAccount,
3079
3119
  solanaAddress,
3080
3120
  solanaDepositAddress,
@@ -3084,7 +3124,7 @@ function SolanaConfirmStep({
3084
3124
  });
3085
3125
  try {
3086
3126
  const check = await service.checkAccount(smartAccount);
3087
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
3127
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
3088
3128
  smartAccount,
3089
3129
  isRegistered: check.isRegistered,
3090
3130
  targetChain: check.targetChain,
@@ -3097,7 +3137,7 @@ function SolanaConfirmStep({
3097
3137
  }
3098
3138
  const connection = getSolanaConnection();
3099
3139
  const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
3100
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
3140
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
3101
3141
  token: token.symbol,
3102
3142
  sourceAmount,
3103
3143
  amountUnits: amountUnits.toString()
@@ -3114,7 +3154,7 @@ function SolanaConfirmStep({
3114
3154
  token.mint,
3115
3155
  amountUnits
3116
3156
  );
3117
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
3157
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
3118
3158
  token: token.symbol,
3119
3159
  instructionCount: transaction.instructions.length,
3120
3160
  feePayer: _optionalChain([transaction, 'access', _86 => _86.feePayer, 'optionalAccess', _87 => _87.toBase58, 'call', _88 => _88()]),
@@ -3125,15 +3165,15 @@ function SolanaConfirmStep({
3125
3165
  connection,
3126
3166
  transaction
3127
3167
  );
3128
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
3168
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
3129
3169
  txHash,
3130
3170
  amountUnits: amountUnits.toString()
3131
3171
  });
3132
3172
  onConfirm(txHash, amountUnits.toString());
3133
3173
  } catch (err) {
3134
3174
  const raw = err instanceof Error ? err.message : "Transfer failed";
3135
- const message = _chunkXW4M7WDIcjs.formatUserError.call(void 0, raw);
3136
- _chunkXW4M7WDIcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
3175
+ const message = _chunkT2KOQH57cjs.formatUserError.call(void 0, raw);
3176
+ _chunkT2KOQH57cjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
3137
3177
  smartAccount,
3138
3178
  token: token.symbol,
3139
3179
  sourceAmount
@@ -3266,7 +3306,7 @@ function SolanaConfirmStep({
3266
3306
  ] })
3267
3307
  ] }),
3268
3308
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3269
- _chunkXW4M7WDIcjs.Button,
3309
+ _chunkT2KOQH57cjs.Button,
3270
3310
  {
3271
3311
  onClick: handleConfirm,
3272
3312
  loading: isSubmitting,
@@ -3275,7 +3315,7 @@ function SolanaConfirmStep({
3275
3315
  children: "Confirm Order"
3276
3316
  }
3277
3317
  ) }),
3278
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkXW4M7WDIcjs.PoweredBy, {})
3318
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkT2KOQH57cjs.PoweredBy, {})
3279
3319
  ] });
3280
3320
  }
3281
3321
 
@@ -3327,14 +3367,14 @@ function DepositFlow({
3327
3367
  onError,
3328
3368
  debug
3329
3369
  }) {
3330
- const onStepChangeRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onStepChange);
3331
- const onTotalBalanceChangeRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onTotalBalanceChange);
3332
- const onSmartAccountChangeRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onSmartAccountChange);
3333
- const onEventRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onEvent);
3334
- const onDepositSubmittedRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onDepositSubmitted);
3335
- const onDepositCompleteRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onDepositComplete);
3336
- const onDepositFailedRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onDepositFailed);
3337
- const onErrorRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onError);
3370
+ const onStepChangeRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onStepChange);
3371
+ const onTotalBalanceChangeRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onTotalBalanceChange);
3372
+ const onSmartAccountChangeRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onSmartAccountChange);
3373
+ const onEventRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onEvent);
3374
+ const onDepositSubmittedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onDepositSubmitted);
3375
+ const onDepositCompleteRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onDepositComplete);
3376
+ const onDepositFailedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onDepositFailed);
3377
+ const onErrorRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onError);
3338
3378
  const hasInitialReownSession = Boolean(
3339
3379
  enableSolana ? _optionalChain([reownWallet, 'optionalAccess', _90 => _90.isConnected]) || _optionalChain([reownWallet, 'optionalAccess', _91 => _91.address]) : _optionalChain([reownWallet, 'optionalAccess', _92 => _92.address])
3340
3380
  );
@@ -3354,13 +3394,13 @@ function DepositFlow({
3354
3394
  flowModeRef.current = flowMode;
3355
3395
  const logFlow = _react.useCallback.call(void 0,
3356
3396
  (message, data) => {
3357
- _chunkXW4M7WDIcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
3397
+ _chunkT2KOQH57cjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
3358
3398
  },
3359
3399
  [debug]
3360
3400
  );
3361
3401
  const logFlowError = _react.useCallback.call(void 0,
3362
3402
  (message, error, data) => {
3363
- _chunkXW4M7WDIcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
3403
+ _chunkT2KOQH57cjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
3364
3404
  },
3365
3405
  [debug]
3366
3406
  );
@@ -3484,7 +3524,7 @@ function DepositFlow({
3484
3524
  return {
3485
3525
  ownerAddress: dappAddress,
3486
3526
  walletClient: void 0,
3487
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkXW4M7WDIcjs.getPublicClient.call(void 0, targetChain))),
3527
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, targetChain))),
3488
3528
  switchChain: void 0
3489
3529
  };
3490
3530
  }
@@ -3493,7 +3533,7 @@ function DepositFlow({
3493
3533
  return {
3494
3534
  ownerAddress: dappWalletClient.account.address,
3495
3535
  walletClient: dappWalletClient,
3496
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkXW4M7WDIcjs.getPublicClient.call(void 0, fallbackChainId))),
3536
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, fallbackChainId))),
3497
3537
  switchChain: dappSwitchChain
3498
3538
  };
3499
3539
  }
@@ -3507,7 +3547,7 @@ function DepositFlow({
3507
3547
  return {
3508
3548
  ownerAddress: dappAddress,
3509
3549
  walletClient: void 0,
3510
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkXW4M7WDIcjs.getPublicClient.call(void 0, targetChain))),
3550
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, targetChain))),
3511
3551
  switchChain: void 0
3512
3552
  };
3513
3553
  }
@@ -3516,7 +3556,7 @@ function DepositFlow({
3516
3556
  return {
3517
3557
  ownerAddress: dappWalletClient.account.address,
3518
3558
  walletClient: dappWalletClient,
3519
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkXW4M7WDIcjs.getPublicClient.call(void 0, fallbackChainId))),
3559
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, fallbackChainId))),
3520
3560
  switchChain: dappSwitchChain
3521
3561
  };
3522
3562
  }
@@ -3524,7 +3564,7 @@ function DepositFlow({
3524
3564
  return {
3525
3565
  ownerAddress: reownWallet.address,
3526
3566
  walletClient: reownWallet.walletClient,
3527
- publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkXW4M7WDIcjs.getPublicClient.call(void 0, targetChain))),
3567
+ publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, targetChain))),
3528
3568
  switchChain: reownWallet.switchChain
3529
3569
  };
3530
3570
  }
@@ -3562,7 +3602,7 @@ function DepositFlow({
3562
3602
  return {
3563
3603
  ownerAddress: dappAddress,
3564
3604
  walletClient: void 0,
3565
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkXW4M7WDIcjs.getPublicClient.call(void 0, targetChain))),
3605
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkT2KOQH57cjs.getPublicClient.call(void 0, targetChain))),
3566
3606
  switchChain: void 0
3567
3607
  };
3568
3608
  }
@@ -3851,6 +3891,7 @@ function DepositFlow({
3851
3891
  return {
3852
3892
  type: "processing",
3853
3893
  smartAccount: prev.smartAccount,
3894
+ solanaDepositAddress: prev.solanaDepositAddress,
3854
3895
  txHash,
3855
3896
  sourceChain: "solana",
3856
3897
  sourceToken: prev.token.mint,
@@ -4049,7 +4090,7 @@ function DepositFlow({
4049
4090
  ]);
4050
4091
  if (showConnectStep) {
4051
4092
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4052
- _chunkXW4M7WDIcjs.ConnectStep,
4093
+ _chunkT2KOQH57cjs.ConnectStep,
4053
4094
  {
4054
4095
  walletOptions,
4055
4096
  selectedWalletId: selectedWalletIdEffective,
@@ -4235,9 +4276,10 @@ function DepositFlow({
4235
4276
  ) })
4236
4277
  ] }) : null,
4237
4278
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4238
- _chunkXW4M7WDIcjs.ProcessingStep,
4279
+ _chunkT2KOQH57cjs.ProcessingStep,
4239
4280
  {
4240
4281
  smartAccount: step.smartAccount,
4282
+ solanaDepositAddress: step.solanaDepositAddress,
4241
4283
  txHash: step.txHash,
4242
4284
  sourceChain: step.sourceChain,
4243
4285
  sourceToken: step.sourceToken,
@@ -4269,7 +4311,7 @@ function DepositFlow({
4269
4311
  if (_optionalChain([signerContext, 'access', _162 => _162.publicClient, 'access', _163 => _163.chain, 'optionalAccess', _164 => _164.id]) === chainId) {
4270
4312
  return signerContext.publicClient;
4271
4313
  }
4272
- return _chunkXW4M7WDIcjs.getPublicClient.call(void 0, chainId);
4314
+ return _chunkT2KOQH57cjs.getPublicClient.call(void 0, chainId);
4273
4315
  };
4274
4316
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
4275
4317
  step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -4359,9 +4401,10 @@ function DepositFlow({
4359
4401
  }
4360
4402
  ),
4361
4403
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4362
- _chunkXW4M7WDIcjs.ProcessingStep,
4404
+ _chunkT2KOQH57cjs.ProcessingStep,
4363
4405
  {
4364
4406
  smartAccount: step.smartAccount,
4407
+ solanaDepositAddress: step.solanaDepositAddress,
4365
4408
  txHash: step.txHash,
4366
4409
  sourceChain: step.sourceChain,
4367
4410
  sourceToken: step.sourceToken,
@@ -4416,8 +4459,8 @@ function formatTimestamp2(iso) {
4416
4459
  function resolveChainId(value) {
4417
4460
  if (value === void 0 || value === null) return null;
4418
4461
  if (typeof value === "number") return value;
4419
- if (_chunkXW4M7WDIcjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
4420
- const parsed = _chunkXW4M7WDIcjs.parseEvmChainId.call(void 0, value);
4462
+ if (_chunkT2KOQH57cjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
4463
+ const parsed = _chunkT2KOQH57cjs.parseEvmChainId.call(void 0, value);
4421
4464
  if (parsed !== null) return parsed;
4422
4465
  const num = Number(value);
4423
4466
  return Number.isFinite(num) ? num : null;
@@ -4478,10 +4521,12 @@ function getTxExplorerUrl(txHash, chainId) {
4478
4521
  if (!base) return null;
4479
4522
  return `${base}/tx/${txHash}`;
4480
4523
  }
4481
- function normalizeStatus(raw) {
4524
+ function normalizeStatus(raw, isSpam) {
4482
4525
  const lower = raw.toLowerCase();
4483
4526
  if (lower === "completed" || lower === "complete" || lower === "bridge-complete" || lower === "processed") return "completed";
4484
- if (lower === "failed" || lower === "error" || lower === "bridge-failed") return "failed";
4527
+ if (lower === "failed" || lower === "error" || lower === "bridge-failed") {
4528
+ return isSpam ? "spam" : "failed";
4529
+ }
4485
4530
  if (lower === "processing" || lower === "submitted" || lower === "bridging") return "processing";
4486
4531
  return "pending";
4487
4532
  }
@@ -4489,7 +4534,8 @@ var STATUS_LABEL = {
4489
4534
  pending: "Pending",
4490
4535
  processing: "Processing",
4491
4536
  completed: "Completed",
4492
- failed: "Failed"
4537
+ failed: "Failed",
4538
+ spam: "Spam token"
4493
4539
  };
4494
4540
  function ExternalLinkIcon() {
4495
4541
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "rs-history-ext-icon", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 1.5H2.25A.75.75 0 0 0 1.5 2.25v7.5c0 .414.336.75.75.75h7.5a.75.75 0 0 0 .75-.75V7.5m-3-6h3m0 0v3m0-3L6 6" }) });
@@ -4570,7 +4616,7 @@ function DepositHistoryPanel({
4570
4616
  );
4571
4617
  }
4572
4618
  function HistoryRow({ deposit }) {
4573
- const status = normalizeStatus(deposit.status);
4619
+ const status = normalizeStatus(deposit.status, deposit.isSpam);
4574
4620
  const sourceChainId = resolveChainId(deposit.chain);
4575
4621
  const targetChainId = resolveChainId(deposit.targetChain);
4576
4622
  const sourceChainName = sourceChainId ? _chunkMUWVDVY4cjs.getChainName.call(void 0, sourceChainId) : null;
@@ -4651,7 +4697,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
4651
4697
  // src/DepositModal.tsx
4652
4698
 
4653
4699
  var ReownDepositInner = _react.lazy.call(void 0,
4654
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-66DE7NAY.cjs"))).then((m) => ({ default: m.DepositModalReown }))
4700
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-WGRUAIY3.cjs"))).then((m) => ({ default: m.DepositModalReown }))
4655
4701
  );
4656
4702
  function DepositModal(props) {
4657
4703
  const needsReown = !!props.reownAppId;
@@ -4722,7 +4768,7 @@ function DepositModalInner({
4722
4768
  debug
4723
4769
  }) {
4724
4770
  const modalRef = _react.useRef.call(void 0, null);
4725
- const onReadyRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onReady);
4771
+ const onReadyRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onReady);
4726
4772
  const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
4727
4773
  const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
4728
4774
  const backHandlerRef = _react.useRef.call(void 0, void 0);
@@ -4739,7 +4785,7 @@ function DepositModalInner({
4739
4785
  const targetChain = _chunkMUWVDVY4cjs.getChainId.call(void 0, targetChainProp);
4740
4786
  const sourceChain = sourceChainProp ? _chunkMUWVDVY4cjs.getChainId.call(void 0, sourceChainProp) : void 0;
4741
4787
  const service = _react.useMemo.call(void 0,
4742
- () => _chunkXW4M7WDIcjs.createDepositService.call(void 0, backendUrl, {
4788
+ () => _chunkT2KOQH57cjs.createDepositService.call(void 0, backendUrl, {
4743
4789
  debug,
4744
4790
  debugScope: "service:deposit"
4745
4791
  }),
@@ -4747,7 +4793,7 @@ function DepositModalInner({
4747
4793
  );
4748
4794
  _react.useEffect.call(void 0, () => {
4749
4795
  if (isOpen && modalRef.current) {
4750
- _chunkXW4M7WDIcjs.applyTheme.call(void 0, modalRef.current, theme);
4796
+ _chunkT2KOQH57cjs.applyTheme.call(void 0, modalRef.current, theme);
4751
4797
  }
4752
4798
  }, [isOpen, theme]);
4753
4799
  _react.useEffect.call(void 0, () => {
@@ -4843,9 +4889,9 @@ function DepositModalInner({
4843
4889
  fetchHistory();
4844
4890
  }
4845
4891
  }, [historyOpen, fetchHistory]);
4846
- const onDepositSubmittedRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onDepositSubmitted);
4847
- const onDepositCompleteRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onDepositComplete);
4848
- const onDepositFailedRef = _chunkXW4M7WDIcjs.useLatestRef.call(void 0, onDepositFailed);
4892
+ const onDepositSubmittedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onDepositSubmitted);
4893
+ const onDepositCompleteRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onDepositComplete);
4894
+ const onDepositFailedRef = _chunkT2KOQH57cjs.useLatestRef.call(void 0, onDepositFailed);
4849
4895
  const handleDepositSubmitted = _react.useCallback.call(void 0,
4850
4896
  (data) => {
4851
4897
  _optionalChain([onDepositSubmittedRef, 'access', _172 => _172.current, 'optionalCall', _173 => _173(data)]);
@@ -4886,7 +4932,7 @@ function DepositModalInner({
4886
4932
  const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _183 => _183.title]), () => ( "Deposit"));
4887
4933
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
4888
4934
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4889
- _chunkXW4M7WDIcjs.Modal,
4935
+ _chunkT2KOQH57cjs.Modal,
4890
4936
  {
4891
4937
  isOpen,
4892
4938
  onClose,
@@ -4979,7 +5025,7 @@ function DepositModalInner({
4979
5025
  balance.title,
4980
5026
  ":"
4981
5027
  ] }),
4982
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkXW4M7WDIcjs.currencyFormatter.format(totalBalanceUsd) : null))) })
5028
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _nullishCoalesce(balance.amount, () => ( (totalBalanceUsd !== null ? _chunkT2KOQH57cjs.currencyFormatter.format(totalBalanceUsd) : null))) })
4983
5029
  ] })
4984
5030
  ] }),
4985
5031
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [