@rhinestone/deposit-modal 0.7.0 → 0.8.1

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 (44) hide show
  1. package/dist/{DepositModalReown-T4RRW5FM.mjs → DepositModalReown-4BSHOQ5Y.mjs} +6 -6
  2. package/dist/{DepositModalReown-CHVDFNEX.cjs → DepositModalReown-UND3DEJH.cjs} +9 -9
  3. package/dist/{WithdrawModalReown-Q6MUMZTX.mjs → WithdrawModalReown-FVXSSGY5.mjs} +5 -5
  4. package/dist/{WithdrawModalReown-YZMZTN6E.cjs → WithdrawModalReown-TVZWJKQI.cjs} +8 -8
  5. package/dist/caip-C_ZYFIGa.d.cts +77 -0
  6. package/dist/caip-C_ZYFIGa.d.ts +77 -0
  7. package/dist/{chunk-J52W34Y7.mjs → chunk-2JPB3PLB.mjs} +2 -2
  8. package/dist/{chunk-XOBLFIGV.cjs → chunk-4NN7UTWQ.cjs} +4 -4
  9. package/dist/{chunk-UZENNYHS.mjs → chunk-7KHEIMWD.mjs} +102 -59
  10. package/dist/{chunk-UN6MEOOA.cjs → chunk-7OKA6GNA.cjs} +293 -137
  11. package/dist/{chunk-QSMPJQTX.cjs → chunk-D3Y7ZBED.cjs} +403 -360
  12. package/dist/{chunk-4JLYWRQA.mjs → chunk-DABKCJVL.mjs} +1 -1
  13. package/dist/{chunk-KUURQOTT.cjs → chunk-HQWZCOMS.cjs} +109 -106
  14. package/dist/{chunk-OYPFPEIT.mjs → chunk-NASHLEVQ.mjs} +304 -148
  15. package/dist/{chunk-CPMHRMPH.mjs → chunk-O5OKA27M.mjs} +55 -23
  16. package/dist/{chunk-6P3WNDED.cjs → chunk-Q3W53BKR.cjs} +7 -7
  17. package/dist/{chunk-CLUR2J72.mjs → chunk-T43VUEJH.mjs} +21 -18
  18. package/dist/{chunk-HH46H6ZI.cjs → chunk-U7SVYWVD.cjs} +56 -24
  19. package/dist/{chunk-K6J3RDDK.mjs → chunk-WK5AFRSP.mjs} +1 -1
  20. package/dist/{chunk-RLMXWLF4.cjs → chunk-XRWQMIBY.cjs} +3 -3
  21. package/dist/constants.cjs +4 -2
  22. package/dist/constants.d.cts +1 -1
  23. package/dist/constants.d.ts +1 -1
  24. package/dist/constants.mjs +5 -3
  25. package/dist/deposit.cjs +6 -6
  26. package/dist/deposit.d.cts +2 -2
  27. package/dist/deposit.d.ts +2 -2
  28. package/dist/deposit.mjs +5 -5
  29. package/dist/index.cjs +11 -7
  30. package/dist/index.d.cts +2 -2
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.mjs +12 -8
  33. package/dist/polymarket.cjs +6 -6
  34. package/dist/polymarket.mjs +3 -3
  35. package/dist/styles.css +29 -0
  36. package/dist/{types-6ROxwyfG.d.cts → types--LQWg_4W.d.cts} +1 -1
  37. package/dist/{types-6ROxwyfG.d.ts → types--LQWg_4W.d.ts} +1 -1
  38. package/dist/withdraw.cjs +5 -5
  39. package/dist/withdraw.d.cts +2 -2
  40. package/dist/withdraw.d.ts +2 -2
  41. package/dist/withdraw.mjs +4 -4
  42. package/package.json +1 -1
  43. package/dist/caip-CsslyHGL.d.cts +0 -62
  44. package/dist/caip-CsslyHGL.d.ts +0 -62
@@ -7,7 +7,7 @@ import {
7
7
  executePolymarketSafeTransfer,
8
8
  fetchPolymarketProxyWallet,
9
9
  readPolymarketBalances
10
- } from "./chunk-4JLYWRQA.mjs";
10
+ } from "./chunk-DABKCJVL.mjs";
11
11
  import {
12
12
  AlertTriangleIcon,
13
13
  ArrowUpRightIcon,
@@ -33,6 +33,7 @@ import {
33
33
  ProcessingStep,
34
34
  RpcUrlsProvider,
35
35
  Spinner,
36
+ TokenIcon,
36
37
  Tooltip,
37
38
  TransferCryptoIcon,
38
39
  UnplugIcon,
@@ -46,6 +47,7 @@ import {
46
47
  debugError,
47
48
  debugLog,
48
49
  failureMessageForEvent,
50
+ fetchTokenPriceUsd,
49
51
  formatQuotedReceive,
50
52
  formatReceiveEstimate,
51
53
  formatTokenAmount,
@@ -57,8 +59,10 @@ import {
57
59
  getHyperEvmReadClient,
58
60
  getPublicClient,
59
61
  isDepositEvent,
62
+ isDisplayStablecoinSymbol,
60
63
  isFailedEvent,
61
64
  isNativeAsset,
65
+ isRecognizedToken,
62
66
  loadSessionOwnerFromStorage,
63
67
  portfolioToAssets,
64
68
  rpcUrlFor,
@@ -68,10 +72,10 @@ import {
68
72
  useLatestRef,
69
73
  useRpcUrls,
70
74
  useStableRpcUrls
71
- } from "./chunk-OYPFPEIT.mjs";
75
+ } from "./chunk-NASHLEVQ.mjs";
72
76
  import {
73
77
  SAFE_ABI
74
- } from "./chunk-K6J3RDDK.mjs";
78
+ } from "./chunk-WK5AFRSP.mjs";
75
79
  import {
76
80
  DEFAULT_BACKEND_URL,
77
81
  DEFAULT_SIGNER_ADDRESS,
@@ -93,9 +97,9 @@ import {
93
97
  getTargetTokenSymbolsForChain,
94
98
  getTokenAddress,
95
99
  getTokenDecimalsByAddress,
96
- getTokenIcon,
97
100
  getTokenSymbol,
98
101
  isContractBytecode,
102
+ isHyperCoreCaip2,
99
103
  isNativeSol,
100
104
  isSolanaCaip2,
101
105
  isStablecoinSymbol,
@@ -103,7 +107,7 @@ import {
103
107
  isVirtualDestination,
104
108
  parseEvmChainId,
105
109
  targetChainToCaip2
106
- } from "./chunk-CPMHRMPH.mjs";
110
+ } from "./chunk-O5OKA27M.mjs";
107
111
 
108
112
  // src/DepositModal.tsx
109
113
  import {
@@ -296,7 +300,6 @@ function AssetSelectStep({
296
300
  const isSelected = selectedAssetId === asset.id;
297
301
  const tokenAmount = formatBalance(asset);
298
302
  const badge = getChainBadge(asset.chainId);
299
- const tokenIcon = getTokenIcon(asset.symbol);
300
303
  const chainIcon = getChainIcon(asset.chainId);
301
304
  return /* @__PURE__ */ jsxs(
302
305
  "button",
@@ -308,7 +311,13 @@ function AssetSelectStep({
308
311
  children: [
309
312
  /* @__PURE__ */ jsxs("div", { className: "rs-asset-info", children: [
310
313
  /* @__PURE__ */ jsxs("div", { className: "rs-asset-icon-wrapper", children: [
311
- tokenIcon ? /* @__PURE__ */ jsx("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx("img", { src: tokenIcon, alt: asset.symbol }) }) : /* @__PURE__ */ jsx("span", { className: "rs-asset-icon", children: asset.symbol.slice(0, 4) }),
314
+ /* @__PURE__ */ jsx("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx(
315
+ TokenIcon,
316
+ {
317
+ symbol: asset.symbol,
318
+ fallback: asset.symbol.slice(0, 4)
319
+ }
320
+ ) }),
312
321
  chainIcon ? /* @__PURE__ */ jsx("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx(
313
322
  "img",
314
323
  {
@@ -755,8 +764,6 @@ function AmountStep({
755
764
  const continueDisabled = chainMismatch || isCheckingLiquidity || exceedsBalance || numericAmount === 0 && !isBelowMin || balance === null;
756
765
  const sourceChainName = getChainName(asset.chainId);
757
766
  const targetChainName = getChainName(targetChain);
758
- const sourceTokenIcon = getTokenIcon(asset.symbol);
759
- const targetTokenIcon = getTokenIcon(targetSymbol);
760
767
  return /* @__PURE__ */ jsxs3("div", { className: "rs-screen", children: [
761
768
  /* @__PURE__ */ jsxs3("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
762
769
  /* @__PURE__ */ jsx3(BodyHeader, { icon: /* @__PURE__ */ jsx3(WalletIcon, {}), title: "Wallet deposit" }),
@@ -810,7 +817,7 @@ function AmountStep({
810
817
  " ",
811
818
  asset.symbol
812
819
  ] }),
813
- sourceTokenIcon && /* @__PURE__ */ jsx3("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx3("img", { src: sourceTokenIcon, alt: "" }) })
820
+ /* @__PURE__ */ jsx3("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx3(TokenIcon, { symbol: asset.symbol }) })
814
821
  ] })
815
822
  ] }),
816
823
  /* @__PURE__ */ jsxs3("div", { className: "rs-amount-detail-row", children: [
@@ -821,7 +828,7 @@ function AmountStep({
821
828
  " ",
822
829
  targetSymbol
823
830
  ] }),
824
- targetTokenIcon && /* @__PURE__ */ jsx3("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx3("img", { src: targetTokenIcon, alt: "" }) })
831
+ /* @__PURE__ */ jsx3("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx3(TokenIcon, { symbol: targetSymbol }) })
825
832
  ] })
826
833
  ] }),
827
834
  balanceAfterUsd !== null && /* @__PURE__ */ jsxs3("div", { className: "rs-amount-detail-row", children: [
@@ -888,8 +895,6 @@ function ConfirmStep({
888
895
  const targetChainName = getChainName(targetChain);
889
896
  const sourceChainIcon = getChainIcon(asset.chainId);
890
897
  const targetChainIcon = getChainIcon(targetChain);
891
- const sourceTokenIcon = getTokenIcon(asset.symbol);
892
- const targetTokenIcon = getTokenIcon(targetSymbol);
893
898
  const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? formatTokenAmount(Number(amount), asset.symbol) ?? "0" : "0";
894
899
  const receiveDisplay = (() => {
895
900
  if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
@@ -904,7 +909,11 @@ function ConfirmStep({
904
909
  sourceSymbol: asset.symbol,
905
910
  targetSymbol,
906
911
  sourceAmountUsd,
907
- prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
912
+ sourceTrusted: isRecognizedToken(asset.token, asset.chainId),
913
+ // The target is the curated deposit destination, so a stablecoin target
914
+ // estimates at $1 when unquoted (DepositFlow skips fetching stablecoin
915
+ // target prices). Not applied to the source — that can be a held token.
916
+ prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : isDisplayStablecoinSymbol(targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
908
917
  });
909
918
  if (estimate !== void 0) return estimate;
910
919
  return targetSymbol;
@@ -1062,14 +1071,14 @@ function ConfirmStep({
1062
1071
  " ",
1063
1072
  asset.symbol
1064
1073
  ] }),
1065
- sourceTokenIcon && /* @__PURE__ */ jsx4("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx4("img", { src: sourceTokenIcon, alt: "" }) })
1074
+ /* @__PURE__ */ jsx4("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx4(TokenIcon, { symbol: asset.symbol }) })
1066
1075
  ] })
1067
1076
  ] }),
1068
1077
  /* @__PURE__ */ jsxs4("div", { className: "rs-review-detail-row", children: [
1069
1078
  /* @__PURE__ */ jsx4("span", { children: "Receive" }),
1070
1079
  /* @__PURE__ */ jsxs4("span", { className: "rs-review-detail-value", children: [
1071
1080
  /* @__PURE__ */ jsx4("span", { children: receiveDisplay }),
1072
- targetTokenIcon && /* @__PURE__ */ jsx4("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx4("img", { src: targetTokenIcon, alt: "" }) })
1081
+ /* @__PURE__ */ jsx4("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx4(TokenIcon, { symbol: targetSymbol }) })
1073
1082
  ] })
1074
1083
  ] }),
1075
1084
  /* @__PURE__ */ jsxs4("div", { className: "rs-review-detail-row", children: [
@@ -1456,6 +1465,7 @@ function asNumber(value) {
1456
1465
  function asChainId(value) {
1457
1466
  if (typeof value === "string") {
1458
1467
  if (value.startsWith("solana")) return "solana";
1468
+ if (value.startsWith("hypercore")) return "hypercore";
1459
1469
  const eip155Match = value.match(/^eip155:(\d+)$/);
1460
1470
  if (eip155Match) return Number(eip155Match[1]);
1461
1471
  }
@@ -1521,7 +1531,11 @@ function chainLabel(chainId) {
1521
1531
  }
1522
1532
  function computeTokensForChain(chainId, allowedTokenSet, topTokens) {
1523
1533
  const fromBackend = topTokens?.[String(chainId)]?.map((t) => t.symbol);
1524
- const all = fromBackend ?? (chainId === "solana" ? SOLANA_TOKENS.map((t) => t.symbol) : getTargetTokenSymbolsForChain(chainId));
1534
+ const all = fromBackend ?? (chainId === "solana" ? SOLANA_TOKENS.map((t) => t.symbol) : (
1535
+ // HyperCore accepts USDC + USDT0 as origin tokens (native Hyperliquid L1
1536
+ // spot transfers); it has no EVM source-chain matrix entry.
1537
+ chainId === "hypercore" ? ["USDC", "USDT0"] : getTargetTokenSymbolsForChain(chainId)
1538
+ ));
1525
1539
  return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
1526
1540
  }
1527
1541
  function resolveSourceTokenAddress(symbol, chainId, topTokens) {
@@ -1529,8 +1543,14 @@ function resolveSourceTokenAddress(symbol, chainId, topTokens) {
1529
1543
  return top?.address ?? getTokenAddress(symbol, chainId);
1530
1544
  }
1531
1545
  function TokenGlyph({ symbol }) {
1532
- const icon = getTokenIcon(symbol);
1533
- return icon ? /* @__PURE__ */ jsx6("img", { src: icon, alt: "", className: "rs-deposit-address-dropdown-icon" }) : /* @__PURE__ */ jsx6("span", { className: "rs-deposit-address-dropdown-icon rs-deposit-address-dropdown-icon--fallback", children: symbol.slice(0, 3) });
1546
+ return /* @__PURE__ */ jsx6(
1547
+ TokenIcon,
1548
+ {
1549
+ symbol,
1550
+ className: "rs-deposit-address-dropdown-icon",
1551
+ fallback: /* @__PURE__ */ jsx6("span", { className: "rs-deposit-address-dropdown-icon rs-deposit-address-dropdown-icon--fallback", children: symbol.slice(0, 3) })
1552
+ }
1553
+ );
1534
1554
  }
1535
1555
  function pickFallbackToken(tokens, current) {
1536
1556
  if (tokens.includes(current)) return current;
@@ -1565,18 +1585,24 @@ function DepositAddressStep({
1565
1585
  return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
1566
1586
  }, [allowedChainSet]);
1567
1587
  const chainOptions = useMemo3(() => {
1568
- if (!hasSolana) return evmChainIds;
1569
1588
  const options = [...evmChainIds];
1570
- options.splice(1, 0, "solana");
1589
+ const extras = [];
1590
+ if (hasSolana) extras.push("solana");
1591
+ if (!allowedChainSet || allowedChainSet.has(HYPERCORE_CHAIN_ID)) {
1592
+ extras.push("hypercore");
1593
+ }
1594
+ options.splice(1, 0, ...extras);
1571
1595
  return options;
1572
- }, [evmChainIds, hasSolana]);
1596
+ }, [evmChainIds, hasSolana, allowedChainSet]);
1573
1597
  const BASE_CHAIN_ID2 = 8453;
1574
1598
  const chainHasAllowedToken = (id) => !allowedTokenSet || getTargetTokenSymbolsForChain(id).some(
1575
1599
  (s) => allowedTokenSet.has(s.toUpperCase())
1576
1600
  );
1577
- const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID2) && chainHasAllowedToken(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : evmChainIds.find(chainHasAllowedToken) ?? evmChainIds[0];
1601
+ const evmDefault = evmChainIds.includes(BASE_CHAIN_ID2) && chainHasAllowedToken(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : evmChainIds.find(chainHasAllowedToken) ?? evmChainIds[0];
1602
+ const defaultChainId = evmDefault ?? chainOptions[0];
1578
1603
  const [sourceChainId, setSourceChainId] = useState5(defaultChainId);
1579
1604
  const isSolana = sourceChainId === "solana";
1605
+ const isHyperCore = sourceChainId === "hypercore";
1580
1606
  const [topTokens, setTopTokens] = useState5(null);
1581
1607
  useEffect5(() => {
1582
1608
  let active = true;
@@ -1613,7 +1639,7 @@ function DepositAddressStep({
1613
1639
  kind: "idle"
1614
1640
  });
1615
1641
  useEffect5(() => {
1616
- if (isSolana) {
1642
+ if (isSolana || isHyperCore) {
1617
1643
  setLiquidityHelper({ kind: "idle" });
1618
1644
  return;
1619
1645
  }
@@ -1657,6 +1683,7 @@ function DepositAddressStep({
1657
1683
  };
1658
1684
  }, [
1659
1685
  isSolana,
1686
+ isHyperCore,
1660
1687
  sourceChainId,
1661
1688
  sourceTokenSymbol,
1662
1689
  targetChain,
@@ -1901,7 +1928,7 @@ function DepositAddressStep({
1901
1928
  /* @__PURE__ */ jsx6("span", { children: "Supported token" }),
1902
1929
  /* @__PURE__ */ jsxs6("span", { className: "rs-deposit-address-min", children: [
1903
1930
  "Min.$",
1904
- (targetChain === HYPERCORE_CHAIN_ID ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
1931
+ (targetChain === HYPERCORE_CHAIN_ID || isHyperCore ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
1905
1932
  /* @__PURE__ */ jsx6(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx6(
1906
1933
  InfoIcon,
1907
1934
  {
@@ -2877,7 +2904,6 @@ function DepositAddressSkeleton({
2877
2904
  const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
2878
2905
  const chainName = getChainName(defaultChainId);
2879
2906
  const chainIcon = getChainIcon(defaultChainId);
2880
- const tokenIcon = getTokenIcon(defaultToken);
2881
2907
  return /* @__PURE__ */ jsxs11("div", { className: "rs-screen", "aria-busy": "true", children: [
2882
2908
  /* @__PURE__ */ jsx13("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
2883
2909
  /* @__PURE__ */ jsxs11("div", { className: "rs-screen-body", children: [
@@ -2914,11 +2940,10 @@ function DepositAddressSkeleton({
2914
2940
  ] })
2915
2941
  ] }),
2916
2942
  /* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-trigger", children: [
2917
- tokenIcon && /* @__PURE__ */ jsx13(
2918
- "img",
2943
+ /* @__PURE__ */ jsx13(
2944
+ TokenIcon,
2919
2945
  {
2920
- src: tokenIcon,
2921
- alt: "",
2946
+ symbol: defaultToken,
2922
2947
  className: "rs-deposit-address-dropdown-icon"
2923
2948
  }
2924
2949
  ),
@@ -3124,7 +3149,6 @@ function SolanaTokenSelectStep({
3124
3149
  !loading && !error && rows.length > 0 && /* @__PURE__ */ jsx14("div", { className: "rs-asset-list", children: rows.map((entry) => {
3125
3150
  const isSelected = selectedSymbol === entry.token.symbol;
3126
3151
  const tokenAmount = formatBalance(entry);
3127
- const tokenIcon = getTokenIcon(entry.token.symbol);
3128
3152
  return /* @__PURE__ */ jsxs12(
3129
3153
  "button",
3130
3154
  {
@@ -3135,7 +3159,13 @@ function SolanaTokenSelectStep({
3135
3159
  children: [
3136
3160
  /* @__PURE__ */ jsxs12("div", { className: "rs-asset-info", children: [
3137
3161
  /* @__PURE__ */ jsxs12("div", { className: "rs-asset-icon-wrapper", children: [
3138
- tokenIcon ? /* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx14("img", { src: tokenIcon, alt: entry.token.symbol }) }) : /* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: entry.token.symbol.slice(0, 4) }),
3162
+ /* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx14(
3163
+ TokenIcon,
3164
+ {
3165
+ symbol: entry.token.symbol,
3166
+ fallback: entry.token.symbol.slice(0, 4)
3167
+ }
3168
+ ) }),
3139
3169
  chainIcon && /* @__PURE__ */ jsx14("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx14("img", { src: chainIcon, alt: chainName }) })
3140
3170
  ] }),
3141
3171
  /* @__PURE__ */ jsxs12("div", { className: "rs-asset-text", children: [
@@ -3197,7 +3227,6 @@ function SolanaAmountStep({
3197
3227
  targetChain,
3198
3228
  targetChainName,
3199
3229
  targetTokenSymbol,
3200
- targetTokenIcon,
3201
3230
  appBalanceUsd,
3202
3231
  onContinue,
3203
3232
  debug
@@ -3380,7 +3409,6 @@ function SolanaAmountStep({
3380
3409
  };
3381
3410
  const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
3382
3411
  const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
3383
- const sourceTokenIcon = getTokenIcon(token.symbol);
3384
3412
  return /* @__PURE__ */ jsxs13("div", { className: "rs-screen", children: [
3385
3413
  /* @__PURE__ */ jsxs13("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
3386
3414
  /* @__PURE__ */ jsx15(BodyHeader, { icon: /* @__PURE__ */ jsx15(WalletIcon, {}), title: "Wallet deposit" }),
@@ -3432,7 +3460,7 @@ function SolanaAmountStep({
3432
3460
  "Solana ",
3433
3461
  token.symbol
3434
3462
  ] }),
3435
- sourceTokenIcon && /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15("img", { src: sourceTokenIcon, alt: "" }) })
3463
+ /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15(TokenIcon, { symbol: token.symbol }) })
3436
3464
  ] })
3437
3465
  ] }),
3438
3466
  targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
@@ -3443,7 +3471,7 @@ function SolanaAmountStep({
3443
3471
  " ",
3444
3472
  targetTokenSymbol
3445
3473
  ] }),
3446
- targetTokenIcon && /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15("img", { src: targetTokenIcon, alt: "" }) })
3474
+ /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15(TokenIcon, { symbol: targetTokenSymbol }) })
3447
3475
  ] })
3448
3476
  ] }),
3449
3477
  balanceAfterUsd !== null && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
@@ -3599,8 +3627,6 @@ function SolanaConfirmStep({
3599
3627
  const targetChainName = getChainName(targetChain);
3600
3628
  const sourceChainIcon = getChainIcon("solana");
3601
3629
  const targetChainIcon = getChainIcon(targetChain);
3602
- const sourceTokenIcon = getTokenIcon(token.symbol);
3603
- const targetTokenIcon = getTokenIcon(targetSymbol);
3604
3630
  const feeSponsored = uiConfig?.feeSponsored ?? false;
3605
3631
  const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
3606
3632
  const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? formatTokenAmount(Number(sourceAmount), token.symbol) ?? "0" : "0";
@@ -3612,7 +3638,10 @@ function SolanaConfirmStep({
3612
3638
  sourceSymbol: token.symbol,
3613
3639
  targetSymbol,
3614
3640
  sourceAmountUsd,
3615
- prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
3641
+ sourceTrusted: isRecognizedToken(token.mint, "solana"),
3642
+ // Curated stablecoin target estimates at $1 when unquoted; never applied
3643
+ // to the source (a held token). See ConfirmStep for the rationale.
3644
+ prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : isDisplayStablecoinSymbol(targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
3616
3645
  });
3617
3646
  if (estimate !== void 0) return estimate;
3618
3647
  return targetSymbol;
@@ -3736,14 +3765,14 @@ function SolanaConfirmStep({
3736
3765
  " ",
3737
3766
  token.symbol
3738
3767
  ] }),
3739
- sourceTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: sourceTokenIcon, alt: "" }) })
3768
+ /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16(TokenIcon, { symbol: token.symbol }) })
3740
3769
  ] })
3741
3770
  ] }),
3742
3771
  /* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
3743
3772
  /* @__PURE__ */ jsx16("span", { children: "Receive" }),
3744
3773
  /* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
3745
3774
  /* @__PURE__ */ jsx16("span", { children: receiveDisplay }),
3746
- targetTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: targetTokenIcon, alt: "" }) })
3775
+ /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16(TokenIcon, { symbol: targetSymbol }) })
3747
3776
  ] })
3748
3777
  ] }),
3749
3778
  /* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
@@ -3799,7 +3828,7 @@ function DappImportAssetSelectStep({
3799
3828
  Number(asset.balance) / 10 ** asset.decimals
3800
3829
  ) : "0";
3801
3830
  const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
3802
- const tokenIcon = asset.icon ?? getTokenIcon(asset.symbol);
3831
+ const assetIcon = asset.icon;
3803
3832
  const chainIcon = getChainIcon(asset.chainId);
3804
3833
  const badge = getChainBadge(asset.chainId);
3805
3834
  return /* @__PURE__ */ jsxs15(
@@ -3811,7 +3840,13 @@ function DappImportAssetSelectStep({
3811
3840
  children: [
3812
3841
  /* @__PURE__ */ jsxs15("div", { className: "rs-asset-info", children: [
3813
3842
  /* @__PURE__ */ jsxs15("div", { className: "rs-asset-icon-wrapper", children: [
3814
- /* @__PURE__ */ jsx17("span", { className: "rs-asset-icon", children: tokenIcon ? /* @__PURE__ */ jsx17("img", { src: tokenIcon, alt: asset.symbol }) : asset.symbol.slice(0, 4) }),
3843
+ /* @__PURE__ */ jsx17("span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ jsx17("img", { src: assetIcon, alt: asset.symbol }) : /* @__PURE__ */ jsx17(
3844
+ TokenIcon,
3845
+ {
3846
+ symbol: asset.symbol,
3847
+ fallback: asset.symbol.slice(0, 4)
3848
+ }
3849
+ ) }),
3815
3850
  chainIcon ? /* @__PURE__ */ jsx17("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx17(
3816
3851
  "img",
3817
3852
  {
@@ -5550,7 +5585,12 @@ function deriveStep(flow, d, p, activeEntry, fiat, exchange) {
5550
5585
  balanceUsd: d.balanceUsd
5551
5586
  };
5552
5587
  case "processing":
5553
- if (!smartAccount || !p.txHash || !d.amount || d.sourceChain === null || d.sourceChain === "unknown" || !d.sourceToken) {
5588
+ if (!smartAccount || !p.txHash || !d.amount || d.sourceChain === null || d.sourceChain === "unknown" || // HyperCore is a QR/deposit-address-only source (no wallet flow), so it
5589
+ // never dispatches `deposit/submitted` and never reaches this store
5590
+ // `processing` step — its completion is tracked by the DepositNotification
5591
+ // on the deposit-address screen. Excluding it here keeps `sourceChain`
5592
+ // narrowed to the EVM/Solana shape ProcessingStep expects.
5593
+ d.sourceChain === "hypercore" || !d.sourceToken) {
5554
5594
  return { type: "setup" };
5555
5595
  }
5556
5596
  return {
@@ -5767,15 +5807,18 @@ function DepositFlow({
5767
5807
  return;
5768
5808
  }
5769
5809
  let cancelled = false;
5770
- service.fetchPrices([targetSymbol]).then((prices) => {
5810
+ fetchTokenPriceUsd(service, {
5811
+ chainId: targetChain,
5812
+ address: targetToken,
5813
+ symbol: targetSymbol
5814
+ }).then((price) => {
5771
5815
  if (cancelled) return;
5772
- const price = prices[targetSymbol.toUpperCase()];
5773
- targetMarketPriceRef.current = typeof price === "number" && price > 0 ? price : null;
5816
+ targetMarketPriceRef.current = price;
5774
5817
  });
5775
5818
  return () => {
5776
5819
  cancelled = true;
5777
5820
  };
5778
- }, [service, targetSymbol, isTargetStablecoin]);
5821
+ }, [service, targetSymbol, isTargetStablecoin, targetChain, targetToken]);
5779
5822
  const walletSignerContext = useMemo7(() => {
5780
5823
  if (flowMode === "deposit-address") {
5781
5824
  return null;
@@ -7208,9 +7251,6 @@ function DepositFlow({
7208
7251
  targetChain,
7209
7252
  targetChainName: getChainName(targetChain),
7210
7253
  targetTokenSymbol: getTargetTokenSymbol(targetToken, targetChain),
7211
- targetTokenIcon: getTokenIcon(
7212
- getTargetTokenSymbol(targetToken, targetChain)
7213
- ),
7214
7254
  appBalanceUsd,
7215
7255
  onContinue: handleSolanaAmountContinue,
7216
7256
  debug
@@ -7489,6 +7529,7 @@ function resolveChainId(value) {
7489
7529
  if (value === void 0 || value === null) return null;
7490
7530
  if (typeof value === "number") return value;
7491
7531
  if (isSolanaCaip2(value) || value === "solana") return "solana";
7532
+ if (isHyperCoreCaip2(value) || value === "hypercore") return "hypercore";
7492
7533
  const parsed = parseEvmChainId(value);
7493
7534
  if (parsed !== null) return parsed;
7494
7535
  const num = Number(value);
@@ -7507,7 +7548,8 @@ function resolveTokenSymbol(token, chainId) {
7507
7548
  }
7508
7549
  }
7509
7550
  if (chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
7510
- const sym = getTokenSymbol(token, chainId);
7551
+ const evmChainId = chainId === "hypercore" ? HYPERCORE_CHAIN_ID : chainId;
7552
+ const sym = getTokenSymbol(token, evmChainId);
7511
7553
  if (sym !== "Token") return sym;
7512
7554
  }
7513
7555
  return shortenHash(token);
@@ -7527,7 +7569,8 @@ function formatAmount(rawAmount, token, chainId) {
7527
7569
  decimals = 9;
7528
7570
  }
7529
7571
  } else if (/^0x[a-fA-F0-9]{40}$/.test(token)) {
7530
- decimals = getTokenDecimalsByAddress(token, chainId);
7572
+ const evmChainId = chainId === "hypercore" ? HYPERCORE_CHAIN_ID : chainId;
7573
+ decimals = getTokenDecimalsByAddress(token, evmChainId);
7531
7574
  }
7532
7575
  }
7533
7576
  try {
@@ -7678,7 +7721,6 @@ function HistoryCard({ deposit }) {
7678
7721
  const sourceChainIcon = sourceChainId ? getChainIcon(sourceChainId) : void 0;
7679
7722
  const targetChainIcon = targetChainId ? getChainIcon(targetChainId) : void 0;
7680
7723
  const sourceSymbol = resolveTokenSymbol(deposit.token, sourceChainId);
7681
- const sourceTokenIcon = sourceSymbol ? getTokenIcon(sourceSymbol) : void 0;
7682
7724
  const rawAmount = deposit.sourceAmount && deposit.sourceAmount !== "0" ? deposit.sourceAmount : deposit.amount;
7683
7725
  const formattedAmount = rawAmount ? formatAmount(rawAmount, deposit.token, sourceChainId) : null;
7684
7726
  const displayAmount = formattedAmount ? sourceSymbol && /^USD/.test(sourceSymbol) ? `$${Number(formattedAmount).toLocaleString("en-US", {
@@ -7687,7 +7729,8 @@ function HistoryCard({ deposit }) {
7687
7729
  })}` : `${formattedAmount} ${sourceSymbol}` : "\u2014";
7688
7730
  const date = deposit.createdAt ? formatDate(deposit.createdAt) : null;
7689
7731
  const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
7690
- const srcTxUrl = deposit.sourceTxHash ? getTxExplorerUrl(deposit.sourceTxHash, sourceChainId) : null;
7732
+ const srcTxHash = sourceChainId === "hypercore" ? deposit.txHash : deposit.sourceTxHash;
7733
+ const srcTxUrl = srcTxHash ? getTxExplorerUrl(srcTxHash, sourceChainId) : null;
7691
7734
  return /* @__PURE__ */ jsxs18(
7692
7735
  "button",
7693
7736
  {
@@ -7698,7 +7741,7 @@ function HistoryCard({ deposit }) {
7698
7741
  children: [
7699
7742
  /* @__PURE__ */ jsxs18("div", { className: "rs-history-card-row", children: [
7700
7743
  /* @__PURE__ */ jsxs18("div", { className: "rs-history-card-icons", children: [
7701
- /* @__PURE__ */ jsx20("span", { className: "rs-history-card-token", children: sourceTokenIcon ? /* @__PURE__ */ jsx20("img", { src: sourceTokenIcon, alt: "" }) : sourceSymbol.slice(0, 2) }),
7744
+ /* @__PURE__ */ jsx20("span", { className: "rs-history-card-token", children: /* @__PURE__ */ jsx20(TokenIcon, { symbol: sourceSymbol, fallback: sourceSymbol.slice(0, 2) }) }),
7702
7745
  sourceChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx20("img", { src: sourceChainIcon, alt: "" }) })
7703
7746
  ] }),
7704
7747
  /* @__PURE__ */ jsxs18("div", { className: "rs-history-card-text", children: [
@@ -7725,7 +7768,7 @@ function HistoryCard({ deposit }) {
7725
7768
  targetChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20("img", { src: targetChainIcon, alt: "" }) })
7726
7769
  ] })
7727
7770
  ] }),
7728
- srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
7771
+ srcTxUrl && srcTxHash && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
7729
7772
  /* @__PURE__ */ jsx20("span", { children: "Transaction details" }),
7730
7773
  /* @__PURE__ */ jsxs18(
7731
7774
  "a",
@@ -7736,7 +7779,7 @@ function HistoryCard({ deposit }) {
7736
7779
  className: "rs-history-card-link",
7737
7780
  onClick: (e) => e.stopPropagation(),
7738
7781
  children: [
7739
- /* @__PURE__ */ jsx20("span", { children: shortenHash(deposit.sourceTxHash) }),
7782
+ /* @__PURE__ */ jsx20("span", { children: shortenHash(srcTxHash) }),
7740
7783
  /* @__PURE__ */ jsx20(ArrowUpRightIcon, {})
7741
7784
  ]
7742
7785
  }
@@ -7752,7 +7795,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
7752
7795
  // src/DepositModal.tsx
7753
7796
  import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
7754
7797
  var ReownDepositInner = lazy2(
7755
- () => import("./DepositModalReown-T4RRW5FM.mjs").then((m) => ({ default: m.DepositModalReown }))
7798
+ () => import("./DepositModalReown-4BSHOQ5Y.mjs").then((m) => ({ default: m.DepositModalReown }))
7756
7799
  );
7757
7800
  function sortByCreatedAtDesc(items) {
7758
7801
  return [...items].sort((a, b) => {