@rhinestone/deposit-modal 0.3.0-alpha.6 → 0.3.0-alpha.8

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 (38) hide show
  1. package/dist/{DepositModalReown-SBSP5ZW2.cjs → DepositModalReown-LWGABUOF.cjs} +12 -9
  2. package/dist/{DepositModalReown-3N7YYGB4.mjs → DepositModalReown-TYHATVOM.mjs} +9 -6
  3. package/dist/{WithdrawModalReown-4B6IMTBB.cjs → WithdrawModalReown-FCWED55P.cjs} +7 -7
  4. package/dist/{WithdrawModalReown-BB3MZAIO.mjs → WithdrawModalReown-H7HA3JP3.mjs} +4 -4
  5. package/dist/{chunk-CTYKQ4B4.mjs → chunk-5ZS4ZJPW.mjs} +272 -145
  6. package/dist/chunk-7JIDIX27.cjs +554 -0
  7. package/dist/{chunk-QI6Q7V6O.mjs → chunk-DW276H63.mjs} +26 -34
  8. package/dist/{chunk-5YXAQB6A.mjs → chunk-E46WOBZQ.mjs} +56 -16
  9. package/dist/{chunk-UVIIWUWP.cjs → chunk-GBFOGYMH.cjs} +1193 -862
  10. package/dist/{chunk-EJH36TH2.mjs → chunk-H7QMSMM5.mjs} +1247 -916
  11. package/dist/{chunk-YQFH2WSW.cjs → chunk-PKD7W5JG.cjs} +54 -14
  12. package/dist/chunk-SZIYS42B.mjs +554 -0
  13. package/dist/{chunk-BB6UVRAV.cjs → chunk-U3OLJZBT.cjs} +110 -118
  14. package/dist/{chunk-DX2D2TRZ.cjs → chunk-UELVNPGE.cjs} +312 -185
  15. package/dist/constants-DqVn968d.d.cts +52 -0
  16. package/dist/constants-DqVn968d.d.ts +52 -0
  17. package/dist/constants.cjs +8 -2
  18. package/dist/constants.d.cts +17 -48
  19. package/dist/constants.d.ts +17 -48
  20. package/dist/constants.mjs +7 -1
  21. package/dist/deposit.cjs +4 -4
  22. package/dist/deposit.d.cts +2 -2
  23. package/dist/deposit.d.ts +2 -2
  24. package/dist/deposit.mjs +3 -3
  25. package/dist/index.cjs +6 -6
  26. package/dist/index.d.cts +2 -2
  27. package/dist/index.d.ts +2 -2
  28. package/dist/index.mjs +5 -5
  29. package/dist/styles.css +180 -34
  30. package/dist/{types-xSHZSlrT.d.cts → types-D8Q4TMk7.d.cts} +17 -5
  31. package/dist/{types-xSHZSlrT.d.ts → types-D8Q4TMk7.d.ts} +17 -5
  32. package/dist/withdraw.cjs +4 -4
  33. package/dist/withdraw.d.cts +2 -2
  34. package/dist/withdraw.d.ts +2 -2
  35. package/dist/withdraw.mjs +3 -3
  36. package/package.json +5 -5
  37. package/dist/chunk-IVTXEYB2.cjs +0 -507
  38. package/dist/chunk-VA3ANS7D.mjs +0 -507
@@ -4,12 +4,14 @@ import {
4
4
  getChainIcon,
5
5
  getChainName,
6
6
  getExplorerTxUrl,
7
+ getSolanaTokenByMint,
7
8
  getSupportedChainIds,
9
+ getTargetTokenSymbol,
8
10
  getTokenAddress,
9
11
  getTokenDecimalsByAddress,
10
12
  getTokenIcon,
11
13
  getTokenSymbol
12
- } from "./chunk-VA3ANS7D.mjs";
14
+ } from "./chunk-SZIYS42B.mjs";
13
15
 
14
16
  // src/components/ui/Modal.tsx
15
17
  import {
@@ -174,14 +176,14 @@ function TransferCryptoIcon() {
174
176
  {
175
177
  width: "24",
176
178
  height: "24",
177
- viewBox: "0 6 24 24",
179
+ viewBox: "8 8 24 24",
178
180
  fill: "none",
179
181
  xmlns: "http://www.w3.org/2000/svg",
180
182
  "aria-hidden": "true",
181
183
  children: /* @__PURE__ */ jsx2(
182
184
  "path",
183
185
  {
184
- d: "M18.0898 16.3701C19.0352 16.7225 19.8763 17.3076 20.5356 18.0713C21.1949 18.835 21.6509 19.7526 21.8616 20.7392C22.0723 21.7258 22.0307 22.7496 21.7409 23.716C21.451 24.6823 20.9222 25.5599 20.2033 26.2677C19.4844 26.9755 18.5986 27.4906 17.6278 27.7653C16.6571 28.0401 15.6327 28.0656 14.6495 27.8396C13.6663 27.6135 12.756 27.1432 12.0027 26.4721C11.2494 25.801 10.6775 24.9508 10.3398 24.0001M7 12H8V16M16.7098 19.8799L17.4098 20.5899L14.5898 23.4099M14 14C14 17.3137 11.3137 20 8 20C4.68629 20 2 17.3137 2 14C2 10.6863 4.68629 8 8 8C11.3137 8 14 10.6863 14 14Z",
186
+ d: "M26.0898 18.3701C27.0352 18.7225 27.8763 19.3076 28.5356 20.0713C29.1949 20.835 29.6509 21.7526 29.8616 22.7392C30.0723 23.7258 30.0307 24.7496 29.7409 25.716C29.451 26.6823 28.9222 27.5599 28.2033 28.2677C27.4844 28.9755 26.5986 29.4906 25.6278 29.7653C24.6571 30.0401 23.6327 30.0656 22.6495 29.8396C21.6663 29.6135 20.756 29.1432 20.0027 28.4721C19.2494 27.801 18.6775 26.9508 18.3398 26.0001M15 14H16V18M24.7098 21.8799L25.4098 22.5899L22.5898 25.4099M22 16C22 19.3137 19.3137 22 16 22C12.6863 22 10 19.3137 10 16C10 12.6863 12.6863 10 16 10C19.3137 10 22 12.6863 22 16Z",
185
187
  stroke: "currentColor",
186
188
  strokeWidth: "2",
187
189
  strokeLinecap: "round",
@@ -196,7 +198,6 @@ var ChevronLeftIcon = ChevronLeft;
196
198
  var ChevronDownIcon = ChevronDown;
197
199
  var CloseIcon = X;
198
200
  var HandCoinsIcon = HandCoins;
199
- var CoinsIcon = Coins;
200
201
  var HistoryIcon = History;
201
202
  var InfoIcon = Info;
202
203
  var CopyIcon = Copy;
@@ -266,6 +267,9 @@ var SOLANA_MAINNET_CAIP2 = `solana:${SOLANA_MAINNET_GENESIS}`;
266
267
  function toEvmCaip2(chainId) {
267
268
  return `eip155:${chainId}`;
268
269
  }
270
+ function targetChainToCaip2(targetChain) {
271
+ return targetChain === "solana" ? SOLANA_MAINNET_CAIP2 : toEvmCaip2(targetChain);
272
+ }
269
273
  function parseEvmChainId(value) {
270
274
  if (typeof value === "number" && Number.isFinite(value)) {
271
275
  return value;
@@ -512,9 +516,9 @@ function createDepositService(baseUrl, options) {
512
516
  error,
513
517
  { status: response.status, ownerAddress: params.ownerAddress }
514
518
  );
515
- throw new Error(
516
- error.error || `Setup account failed: ${response.status}`
517
- );
519
+ const detail = Array.isArray(error.details) ? error.details.map((d) => d?.message).filter(Boolean).join("; ") : void 0;
520
+ const base = error.error || `Setup account failed: ${response.status}`;
521
+ throw new Error(detail ? `${base}: ${detail}` : base);
518
522
  }
519
523
  const normalized = normalizeSetupAccountResponse(await response.json());
520
524
  debugLog(debug, scope, "setupAccount:success", {
@@ -795,6 +799,46 @@ function createDepositService(baseUrl, options) {
795
799
  });
796
800
  return result;
797
801
  },
802
+ async submitPolymarketWithdraw(params) {
803
+ const { depositWallet, owner, nonce, deadline, calls, signature } = params;
804
+ const url = apiUrl(`/polymarket/withdraw`);
805
+ debugLog(debug, scope, "submitPolymarketWithdraw:request", {
806
+ url,
807
+ depositWallet,
808
+ owner,
809
+ nonce,
810
+ callCount: calls.length
811
+ });
812
+ const response = await fetch(url, {
813
+ method: "POST",
814
+ headers: { "Content-Type": "application/json" },
815
+ body: JSON.stringify({
816
+ depositWallet,
817
+ owner,
818
+ nonce,
819
+ deadline,
820
+ calls,
821
+ signature
822
+ })
823
+ });
824
+ if (!response.ok) {
825
+ const error = await response.json().catch(() => ({ error: "Unknown error" }));
826
+ debugError(debug, scope, "submitPolymarketWithdraw:failed", error, {
827
+ status: response.status,
828
+ depositWallet,
829
+ owner
830
+ });
831
+ throw new Error(
832
+ error.error || `Polymarket withdraw failed: ${response.status}`
833
+ );
834
+ }
835
+ const result = await response.json();
836
+ debugLog(debug, scope, "submitPolymarketWithdraw:success", {
837
+ depositWallet,
838
+ txHash: result?.txHash ? shortRef(result.txHash) : void 0
839
+ });
840
+ return result;
841
+ },
798
842
  async fetchDepositHistory(params) {
799
843
  const searchParams = new URLSearchParams({ recipient: params.recipient });
800
844
  searchParams.set("limit", String(params.limit ?? 20));
@@ -836,6 +880,16 @@ function createDepositService(baseUrl, options) {
836
880
  return { deposits, nextCursor };
837
881
  },
838
882
  async checkLiquidity(params) {
883
+ if (params.destinationChainId === "solana") {
884
+ const token = getSolanaTokenByMint(params.destinationToken);
885
+ return {
886
+ hasLiquidity: true,
887
+ symbol: token?.symbol ?? "Token",
888
+ decimals: token?.decimals ?? 9,
889
+ unlimited: true,
890
+ maxAmount: null
891
+ };
892
+ }
839
893
  const searchParams = new URLSearchParams({
840
894
  sourceChainId: String(params.sourceChainId),
841
895
  sourceToken: params.sourceToken,
@@ -878,6 +932,36 @@ function createDepositService(baseUrl, options) {
878
932
  maxAmount: result.maxAmount
879
933
  });
880
934
  return result;
935
+ },
936
+ async fetchPrices(symbols) {
937
+ const list = symbols.filter((s) => s.length > 0);
938
+ if (list.length === 0) return {};
939
+ const url = apiUrl(
940
+ `/prices?${new URLSearchParams({ symbols: list.join(",") }).toString()}`
941
+ );
942
+ try {
943
+ const response = await fetch(url, {
944
+ method: "GET",
945
+ headers: { "Content-Type": "application/json" },
946
+ cache: "no-store"
947
+ });
948
+ if (!response.ok) {
949
+ debugError(debug, scope, "fetchPrices:failed", {
950
+ status: response.status
951
+ });
952
+ return {};
953
+ }
954
+ const data = await response.json();
955
+ return Object.fromEntries(
956
+ Object.entries(data.prices ?? {}).map(([symbol, price]) => [
957
+ symbol.toUpperCase(),
958
+ price
959
+ ])
960
+ );
961
+ } catch (err) {
962
+ debugError(debug, scope, "fetchPrices:error", err);
963
+ return {};
964
+ }
881
965
  }
882
966
  };
883
967
  }
@@ -989,6 +1073,78 @@ function extractNumericString(data, key) {
989
1073
  return Number.isFinite(parsed) ? parsed : null;
990
1074
  }
991
1075
 
1076
+ // src/core/formatters.ts
1077
+ var currencyFormatter = new Intl.NumberFormat("en-US", {
1078
+ style: "currency",
1079
+ currency: "USD",
1080
+ maximumFractionDigits: 2
1081
+ });
1082
+ var tokenFormatter = new Intl.NumberFormat("en-US", {
1083
+ minimumFractionDigits: 2,
1084
+ maximumFractionDigits: 5
1085
+ });
1086
+ function isUnsupportedChainSwitchError(error) {
1087
+ if (!error) return false;
1088
+ const name = error instanceof Error ? error.name : "";
1089
+ const message = (error instanceof Error ? error.message : String(error)).toLowerCase();
1090
+ return name === "SwitchChainNotSupportedError" || message.includes("does not support programmatic chain switching") || message.includes("switch chain not supported") || message.includes("method not found") || message.includes("does not exist") || message.includes("is not available");
1091
+ }
1092
+ function formatUserError(raw) {
1093
+ const lower = raw.toLowerCase();
1094
+ if (lower.includes("user rejected") || lower.includes("user denied")) {
1095
+ return "Transaction cancelled";
1096
+ }
1097
+ if (lower.includes("insufficient funds")) {
1098
+ return "Insufficient funds for this transaction";
1099
+ }
1100
+ if (lower.includes("nonce too low") || lower.includes("nonce too high")) {
1101
+ return "Transaction conflict \u2014 please try again";
1102
+ }
1103
+ if (lower.includes("execution reverted")) {
1104
+ return "Transaction would fail on-chain";
1105
+ }
1106
+ if (lower.includes("timed out") || lower.includes("took too long")) {
1107
+ return "Request timed out \u2014 please try again";
1108
+ }
1109
+ if (lower.includes("econnrefused") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("fetch failed")) {
1110
+ return "Service unavailable \u2014 please try again";
1111
+ }
1112
+ if (lower.includes("recent blockhash") || lower.includes("latest blockhash")) {
1113
+ return "Solana RPC unavailable \u2014 please retry";
1114
+ }
1115
+ if (lower.includes("network") || lower.includes("disconnected")) {
1116
+ return "Network error \u2014 check your connection";
1117
+ }
1118
+ if (lower.includes("rate limit") || lower.includes("429")) {
1119
+ return "Rate limited \u2014 please try again shortly";
1120
+ }
1121
+ let cleaned = raw;
1122
+ const stripMarkers = [
1123
+ "\n\nRequest Arguments:",
1124
+ "\nRaw Call Arguments:",
1125
+ "\nRequest body:",
1126
+ "\nContract Call:",
1127
+ "\nDocs:",
1128
+ "\nDetails:",
1129
+ "\nVersion:",
1130
+ "\nURL:"
1131
+ ];
1132
+ for (const marker of stripMarkers) {
1133
+ const idx = cleaned.indexOf(marker);
1134
+ if (idx !== -1) {
1135
+ cleaned = cleaned.slice(0, idx).trim();
1136
+ }
1137
+ }
1138
+ cleaned = cleaned.replace(/https?:\/\/\S+/g, "").trim();
1139
+ if (cleaned.length === 0) {
1140
+ return "An unexpected error occurred";
1141
+ }
1142
+ if (cleaned.length > 120) {
1143
+ return cleaned.slice(0, 120) + "...";
1144
+ }
1145
+ return cleaned;
1146
+ }
1147
+
992
1148
  // src/core/useLatestRef.ts
993
1149
  import { useEffect as useEffect2, useRef as useRef2 } from "react";
994
1150
  function useLatestRef(value) {
@@ -1663,7 +1819,7 @@ function ConnectStep({
1663
1819
  rows.map((row) => {
1664
1820
  const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
1665
1821
  const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? row.errorReason ?? "Couldn't prepare wallet \u2014 tap to retry" : shorten(row.address);
1666
- const showInlineDisconnect = collapseToExternal && Boolean(onDisconnect) && row.state !== "loading";
1822
+ const showInlineDisconnect = Boolean(onSelectTransferCrypto) && Boolean(onDisconnect) && row.state !== "loading";
1667
1823
  return /* @__PURE__ */ jsx8(
1668
1824
  ListRow,
1669
1825
  {
@@ -1747,71 +1903,6 @@ function ConnectStep({
1747
1903
  }
1748
1904
  ConnectStep.displayName = "ConnectStep";
1749
1905
 
1750
- // src/core/formatters.ts
1751
- var currencyFormatter = new Intl.NumberFormat("en-US", {
1752
- style: "currency",
1753
- currency: "USD",
1754
- maximumFractionDigits: 2
1755
- });
1756
- var tokenFormatter = new Intl.NumberFormat("en-US", {
1757
- maximumFractionDigits: 6
1758
- });
1759
- function formatUserError(raw) {
1760
- const lower = raw.toLowerCase();
1761
- if (lower.includes("user rejected") || lower.includes("user denied")) {
1762
- return "Transaction cancelled";
1763
- }
1764
- if (lower.includes("insufficient funds")) {
1765
- return "Insufficient funds for this transaction";
1766
- }
1767
- if (lower.includes("nonce too low") || lower.includes("nonce too high")) {
1768
- return "Transaction conflict \u2014 please try again";
1769
- }
1770
- if (lower.includes("execution reverted")) {
1771
- return "Transaction would fail on-chain";
1772
- }
1773
- if (lower.includes("timed out") || lower.includes("took too long")) {
1774
- return "Request timed out \u2014 please try again";
1775
- }
1776
- if (lower.includes("econnrefused") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("fetch failed")) {
1777
- return "Service unavailable \u2014 please try again";
1778
- }
1779
- if (lower.includes("recent blockhash") || lower.includes("latest blockhash")) {
1780
- return "Solana RPC unavailable \u2014 please retry";
1781
- }
1782
- if (lower.includes("network") || lower.includes("disconnected")) {
1783
- return "Network error \u2014 check your connection";
1784
- }
1785
- if (lower.includes("rate limit") || lower.includes("429")) {
1786
- return "Rate limited \u2014 please try again shortly";
1787
- }
1788
- let cleaned = raw;
1789
- const stripMarkers = [
1790
- "\n\nRequest Arguments:",
1791
- "\nRaw Call Arguments:",
1792
- "\nRequest body:",
1793
- "\nContract Call:",
1794
- "\nDocs:",
1795
- "\nDetails:",
1796
- "\nVersion:",
1797
- "\nURL:"
1798
- ];
1799
- for (const marker of stripMarkers) {
1800
- const idx = cleaned.indexOf(marker);
1801
- if (idx !== -1) {
1802
- cleaned = cleaned.slice(0, idx).trim();
1803
- }
1804
- }
1805
- cleaned = cleaned.replace(/https?:\/\/\S+/g, "").trim();
1806
- if (cleaned.length === 0) {
1807
- return "An unexpected error occurred";
1808
- }
1809
- if (cleaned.length > 120) {
1810
- return cleaned.slice(0, 120) + "...";
1811
- }
1812
- return cleaned;
1813
- }
1814
-
1815
1906
  // src/components/steps/ProcessingStep.tsx
1816
1907
  import { useEffect as useEffect4, useRef as useRef4, useState as useState2 } from "react";
1817
1908
  import { formatUnits } from "viem";
@@ -1953,6 +2044,46 @@ function Tooltip({ content, children, className }) {
1953
2044
  }
1954
2045
  Tooltip.displayName = "Tooltip";
1955
2046
 
2047
+ // src/components/ui/Callout.tsx
2048
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
2049
+ function CircleAlertIcon() {
2050
+ return /* @__PURE__ */ jsx11(
2051
+ "svg",
2052
+ {
2053
+ width: "16",
2054
+ height: "16",
2055
+ viewBox: "0 0 16 16",
2056
+ fill: "none",
2057
+ xmlns: "http://www.w3.org/2000/svg",
2058
+ "aria-hidden": "true",
2059
+ children: /* @__PURE__ */ jsx11(
2060
+ "path",
2061
+ {
2062
+ d: "M10 5.99992L6 9.99992M6 5.99992L10 9.99992M14.6667 7.99992C14.6667 11.6818 11.6819 14.6666 8 14.6666C4.3181 14.6666 1.33333 11.6818 1.33333 7.99992C1.33333 4.31802 4.3181 1.33325 8 1.33325C11.6819 1.33325 14.6667 4.31802 14.6667 7.99992Z",
2063
+ stroke: "currentColor",
2064
+ strokeWidth: "1.33333",
2065
+ strokeLinecap: "round",
2066
+ strokeLinejoin: "round"
2067
+ }
2068
+ )
2069
+ }
2070
+ );
2071
+ }
2072
+ function Callout({ variant = "error", children, role }) {
2073
+ return /* @__PURE__ */ jsxs9(
2074
+ "div",
2075
+ {
2076
+ className: `rs-callout rs-callout--${variant}`,
2077
+ role: role ?? (variant === "error" ? "alert" : "status"),
2078
+ children: [
2079
+ /* @__PURE__ */ jsx11("span", { className: "rs-callout-icon", children: variant === "error" ? /* @__PURE__ */ jsx11(CircleAlertIcon, {}) : /* @__PURE__ */ jsx11(AlertTriangleIcon, {}) }),
2080
+ /* @__PURE__ */ jsx11("span", { className: "rs-callout-text", children })
2081
+ ]
2082
+ }
2083
+ );
2084
+ }
2085
+ Callout.displayName = "Callout";
2086
+
1956
2087
  // src/core/webhook.ts
1957
2088
  function isRecord(value) {
1958
2089
  return typeof value === "object" && value !== null;
@@ -2039,9 +2170,9 @@ function txRefsMatch(a, b) {
2039
2170
  }
2040
2171
 
2041
2172
  // src/components/steps/ProcessingStep.tsx
2042
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
2173
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
2043
2174
  function SuccessBadge() {
2044
- return /* @__PURE__ */ jsxs9(
2175
+ return /* @__PURE__ */ jsxs10(
2045
2176
  "svg",
2046
2177
  {
2047
2178
  width: "40",
@@ -2051,7 +2182,7 @@ function SuccessBadge() {
2051
2182
  xmlns: "http://www.w3.org/2000/svg",
2052
2183
  "aria-hidden": "true",
2053
2184
  children: [
2054
- /* @__PURE__ */ jsx11(
2185
+ /* @__PURE__ */ jsx12(
2055
2186
  "rect",
2056
2187
  {
2057
2188
  width: "40",
@@ -2060,7 +2191,7 @@ function SuccessBadge() {
2060
2191
  fill: "var(--rs-icon-wrapper-bg)"
2061
2192
  }
2062
2193
  ),
2063
- /* @__PURE__ */ jsx11(
2194
+ /* @__PURE__ */ jsx12(
2064
2195
  "path",
2065
2196
  {
2066
2197
  d: "M28 14L17 25L12 20",
@@ -2075,7 +2206,7 @@ function SuccessBadge() {
2075
2206
  );
2076
2207
  }
2077
2208
  function FailedBadge() {
2078
- return /* @__PURE__ */ jsxs9(
2209
+ return /* @__PURE__ */ jsxs10(
2079
2210
  "svg",
2080
2211
  {
2081
2212
  width: "40",
@@ -2085,8 +2216,8 @@ function FailedBadge() {
2085
2216
  xmlns: "http://www.w3.org/2000/svg",
2086
2217
  "aria-hidden": "true",
2087
2218
  children: [
2088
- /* @__PURE__ */ jsx11("rect", { width: "40", height: "40", rx: "8", fill: "#FB2C36" }),
2089
- /* @__PURE__ */ jsx11(
2219
+ /* @__PURE__ */ jsx12("rect", { width: "40", height: "40", rx: "8", fill: "#FB2C36" }),
2220
+ /* @__PURE__ */ jsx12(
2090
2221
  "path",
2091
2222
  {
2092
2223
  d: "M26 14L14 26M14 14L26 26",
@@ -2562,10 +2693,8 @@ function ProcessingStep({
2562
2693
  void delayPhaseId;
2563
2694
  void hasEscalatedDelay;
2564
2695
  const targetSymbol = (() => {
2565
- if (typeof targetToken === "string" && /^0x[a-fA-F0-9]{40}$/.test(targetToken)) {
2566
- return getTokenSymbol(targetToken, targetChain);
2567
- }
2568
- return providedSourceSymbol ?? "USDC";
2696
+ const resolved = getTargetTokenSymbol(targetToken, targetChain);
2697
+ return resolved !== "Token" ? resolved : providedSourceSymbol ?? "USDC";
2569
2698
  })();
2570
2699
  const targetTokenIcon = getTokenIcon(targetSymbol);
2571
2700
  const sourceChainIcon = getChainIcon(displaySourceChain);
@@ -2578,23 +2707,23 @@ function ProcessingStep({
2578
2707
  const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
2579
2708
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
2580
2709
  const handleRetry = onRetry ?? onNewDeposit;
2581
- const headerContent = isComplete ? /* @__PURE__ */ jsxs9("div", { className: "rs-body-header", children: [
2582
- /* @__PURE__ */ jsx11(SuccessBadge, {}),
2583
- /* @__PURE__ */ jsx11("div", { className: "rs-body-header-text", children: /* @__PURE__ */ jsx11("h2", { className: "rs-body-header-title", children: stateTitle }) })
2584
- ] }) : isFailed ? /* @__PURE__ */ jsxs9("div", { className: "rs-body-header", children: [
2585
- /* @__PURE__ */ jsx11(FailedBadge, {}),
2586
- /* @__PURE__ */ jsx11("div", { className: "rs-body-header-text", children: /* @__PURE__ */ jsx11("h2", { className: "rs-body-header-title", children: stateTitle }) })
2587
- ] }) : /* @__PURE__ */ jsx11(BodyHeader, { icon: /* @__PURE__ */ jsx11(WalletIcon, {}), title: stateTitle });
2588
- return /* @__PURE__ */ jsxs9("div", { className: "rs-screen", children: [
2589
- /* @__PURE__ */ jsxs9("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
2710
+ const headerContent = isComplete ? /* @__PURE__ */ jsxs10("div", { className: "rs-body-header", children: [
2711
+ /* @__PURE__ */ jsx12(SuccessBadge, {}),
2712
+ /* @__PURE__ */ jsx12("div", { className: "rs-body-header-text", children: /* @__PURE__ */ jsx12("h2", { className: "rs-body-header-title", children: stateTitle }) })
2713
+ ] }) : isFailed ? /* @__PURE__ */ jsxs10("div", { className: "rs-body-header", children: [
2714
+ /* @__PURE__ */ jsx12(FailedBadge, {}),
2715
+ /* @__PURE__ */ jsx12("div", { className: "rs-body-header-text", children: /* @__PURE__ */ jsx12("h2", { className: "rs-body-header-title", children: stateTitle }) })
2716
+ ] }) : /* @__PURE__ */ jsx12(BodyHeader, { icon: /* @__PURE__ */ jsx12(WalletIcon, {}), title: stateTitle });
2717
+ return /* @__PURE__ */ jsxs10("div", { className: "rs-screen", children: [
2718
+ /* @__PURE__ */ jsxs10("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
2590
2719
  headerContent,
2591
- /* @__PURE__ */ jsxs9("div", { className: "rs-review-details", children: [
2592
- /* @__PURE__ */ jsxs9("div", { className: "rs-review-detail-row", children: [
2593
- /* @__PURE__ */ jsx11("span", { children: "Source chain" }),
2594
- /* @__PURE__ */ jsxs9("span", { className: "rs-review-detail-value", children: [
2595
- /* @__PURE__ */ jsx11("span", { children: sourceChainName }),
2596
- sourceChainIcon && /* @__PURE__ */ jsx11("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx11("img", { src: sourceChainIcon, alt: "" }) }),
2597
- sourceExplorerUrl && /* @__PURE__ */ jsx11(
2720
+ /* @__PURE__ */ jsxs10("div", { className: "rs-review-details", children: [
2721
+ /* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
2722
+ /* @__PURE__ */ jsx12("span", { children: "Source chain" }),
2723
+ /* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
2724
+ /* @__PURE__ */ jsx12("span", { children: sourceChainName }),
2725
+ sourceChainIcon && /* @__PURE__ */ jsx12("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx12("img", { src: sourceChainIcon, alt: "" }) }),
2726
+ sourceExplorerUrl && /* @__PURE__ */ jsx12(
2598
2727
  "a",
2599
2728
  {
2600
2729
  href: sourceExplorerUrl,
@@ -2602,17 +2731,17 @@ function ProcessingStep({
2602
2731
  rel: "noopener noreferrer",
2603
2732
  className: "rs-review-detail-link",
2604
2733
  "aria-label": "View source transaction",
2605
- children: /* @__PURE__ */ jsx11(ExternalLinkIcon, {})
2734
+ children: /* @__PURE__ */ jsx12(ExternalLinkIcon, {})
2606
2735
  }
2607
2736
  )
2608
2737
  ] })
2609
2738
  ] }),
2610
- /* @__PURE__ */ jsxs9("div", { className: "rs-review-detail-row", children: [
2611
- /* @__PURE__ */ jsx11("span", { children: "Destination chain" }),
2612
- /* @__PURE__ */ jsxs9("span", { className: "rs-review-detail-value", children: [
2613
- /* @__PURE__ */ jsx11("span", { children: targetChainName }),
2614
- targetChainIcon && /* @__PURE__ */ jsx11("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx11("img", { src: targetChainIcon, alt: "" }) }),
2615
- destExplorerUrl && /* @__PURE__ */ jsx11(
2739
+ /* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
2740
+ /* @__PURE__ */ jsx12("span", { children: "Destination chain" }),
2741
+ /* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
2742
+ /* @__PURE__ */ jsx12("span", { children: targetChainName }),
2743
+ targetChainIcon && /* @__PURE__ */ jsx12("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx12("img", { src: targetChainIcon, alt: "" }) }),
2744
+ destExplorerUrl && /* @__PURE__ */ jsx12(
2616
2745
  "a",
2617
2746
  {
2618
2747
  href: destExplorerUrl,
@@ -2620,64 +2749,61 @@ function ProcessingStep({
2620
2749
  rel: "noopener noreferrer",
2621
2750
  className: "rs-review-detail-link",
2622
2751
  "aria-label": "View destination transaction",
2623
- children: /* @__PURE__ */ jsx11(ExternalLinkIcon, {})
2752
+ children: /* @__PURE__ */ jsx12(ExternalLinkIcon, {})
2624
2753
  }
2625
2754
  )
2626
2755
  ] })
2627
2756
  ] }),
2628
- /* @__PURE__ */ jsxs9("div", { className: "rs-review-detail-row", children: [
2629
- /* @__PURE__ */ jsx11("span", { children: isProcessing ? "Estimated time" : "Total time" }),
2630
- /* @__PURE__ */ jsx11("span", { className: "rs-review-detail-value", children: isProcessing ? estimatedTime : totalTimeText })
2757
+ /* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
2758
+ /* @__PURE__ */ jsx12("span", { children: isProcessing ? "Estimated time" : "Total time" }),
2759
+ /* @__PURE__ */ jsx12("span", { className: "rs-review-detail-value", children: isProcessing ? estimatedTime : totalTimeText })
2631
2760
  ] }),
2632
- /* @__PURE__ */ jsxs9("div", { className: "rs-review-detail-row", children: [
2633
- /* @__PURE__ */ jsx11("span", { children: "You send" }),
2634
- /* @__PURE__ */ jsxs9("span", { className: "rs-review-detail-value", children: [
2635
- /* @__PURE__ */ jsxs9("span", { children: [
2761
+ /* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
2762
+ /* @__PURE__ */ jsx12("span", { children: "You send" }),
2763
+ /* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
2764
+ /* @__PURE__ */ jsxs10("span", { children: [
2636
2765
  formattedReceivedAmount,
2637
2766
  " ",
2638
2767
  sourceSymbol
2639
2768
  ] }),
2640
- sourceTokenIcon && /* @__PURE__ */ jsx11("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx11("img", { src: sourceTokenIcon, alt: "" }) })
2769
+ sourceTokenIcon && /* @__PURE__ */ jsx12("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx12("img", { src: sourceTokenIcon, alt: "" }) })
2641
2770
  ] })
2642
2771
  ] }),
2643
- /* @__PURE__ */ jsxs9("div", { className: "rs-review-detail-row", children: [
2644
- /* @__PURE__ */ jsx11("span", { children: "Receive" }),
2645
- /* @__PURE__ */ jsxs9("span", { className: "rs-review-detail-value", children: [
2646
- /* @__PURE__ */ jsxs9("span", { children: [
2772
+ /* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
2773
+ /* @__PURE__ */ jsx12("span", { children: "Receive" }),
2774
+ /* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
2775
+ /* @__PURE__ */ jsxs10("span", { children: [
2647
2776
  "~",
2648
2777
  formattedReceivedAmount,
2649
2778
  " ",
2650
2779
  targetSymbol
2651
2780
  ] }),
2652
- targetTokenIcon && /* @__PURE__ */ jsx11("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx11("img", { src: targetTokenIcon, alt: "" }) })
2781
+ targetTokenIcon && /* @__PURE__ */ jsx12("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx12("img", { src: targetTokenIcon, alt: "" }) })
2653
2782
  ] })
2654
2783
  ] }),
2655
- isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ jsxs9("div", { className: "rs-review-detail-row", children: [
2656
- /* @__PURE__ */ jsx11("span", { children: "Balance" }),
2657
- /* @__PURE__ */ jsxs9("span", { className: "rs-review-detail-value", children: [
2784
+ isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
2785
+ /* @__PURE__ */ jsx12("span", { children: "Balance" }),
2786
+ /* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
2658
2787
  "$",
2659
2788
  balanceAfterUsd.toFixed(2)
2660
2789
  ] })
2661
2790
  ] }),
2662
- /* @__PURE__ */ jsxs9("div", { className: "rs-review-detail-row", children: [
2663
- /* @__PURE__ */ jsx11("span", { children: "Fees" }),
2664
- /* @__PURE__ */ jsxs9("span", { className: "rs-review-detail-value", children: [
2665
- /* @__PURE__ */ jsx11(
2791
+ /* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
2792
+ /* @__PURE__ */ jsx12("span", { children: "Fees" }),
2793
+ /* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
2794
+ /* @__PURE__ */ jsx12(
2666
2795
  "span",
2667
2796
  {
2668
2797
  style: feeSponsored ? { textDecoration: "line-through" } : void 0,
2669
- children: "$0.05"
2798
+ children: "$0.04"
2670
2799
  }
2671
2800
  ),
2672
- /* @__PURE__ */ jsx11(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx11("span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ jsx11(InfoIcon, {}) }) })
2801
+ /* @__PURE__ */ jsx12(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx12("span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ jsx12(InfoIcon, {}) }) })
2673
2802
  ] })
2674
2803
  ] })
2675
2804
  ] }),
2676
- isFailed && failureMessage && /* @__PURE__ */ jsxs9("div", { className: "rs-amount-error", role: "alert", children: [
2677
- /* @__PURE__ */ jsx11(AlertTriangleIcon, { style: { width: 16, height: 16, flexShrink: 0 } }),
2678
- /* @__PURE__ */ jsx11("span", { children: failureMessage })
2679
- ] }),
2680
- isProcessing && /* @__PURE__ */ jsx11(
2805
+ isFailed && failureMessage && /* @__PURE__ */ jsx12(Callout, { variant: "error", children: failureMessage }),
2806
+ isProcessing && /* @__PURE__ */ jsx12(
2681
2807
  Button,
2682
2808
  {
2683
2809
  fullWidth: true,
@@ -2687,19 +2813,19 @@ function ProcessingStep({
2687
2813
  children: "Submitting transaction..."
2688
2814
  }
2689
2815
  ),
2690
- isComplete && /* @__PURE__ */ jsxs9("div", { className: "rs-screen-button-row", children: [
2691
- onNewDeposit && /* @__PURE__ */ jsxs9(Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
2816
+ isComplete && /* @__PURE__ */ jsxs10("div", { className: "rs-screen-button-row", children: [
2817
+ onNewDeposit && /* @__PURE__ */ jsxs10(Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
2692
2818
  "New ",
2693
2819
  flowNoun
2694
2820
  ] }),
2695
- onClose && /* @__PURE__ */ jsx11(Button, { onClick: onClose, fullWidth: true, children: "Done" })
2821
+ onClose && /* @__PURE__ */ jsx12(Button, { onClick: onClose, fullWidth: true, children: "Done" })
2696
2822
  ] }),
2697
- isFailed && /* @__PURE__ */ jsxs9("div", { className: "rs-screen-button-row", children: [
2698
- onClose && /* @__PURE__ */ jsx11(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
2699
- handleRetry && /* @__PURE__ */ jsx11(Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
2823
+ isFailed && /* @__PURE__ */ jsxs10("div", { className: "rs-screen-button-row", children: [
2824
+ onClose && /* @__PURE__ */ jsx12(Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
2825
+ handleRetry && /* @__PURE__ */ jsx12(Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
2700
2826
  ] })
2701
2827
  ] }),
2702
- /* @__PURE__ */ jsx11(PoweredBy, {})
2828
+ /* @__PURE__ */ jsx12(PoweredBy, {})
2703
2829
  ] });
2704
2830
  }
2705
2831
 
@@ -3058,11 +3184,10 @@ export {
3058
3184
  WalletIcon,
3059
3185
  ExternalLinkIcon,
3060
3186
  CheckIcon,
3187
+ TransferCryptoIcon,
3061
3188
  ChevronLeftIcon,
3062
3189
  ChevronDownIcon,
3063
3190
  CloseIcon,
3064
- HandCoinsIcon,
3065
- CoinsIcon,
3066
3191
  HistoryIcon,
3067
3192
  InfoIcon,
3068
3193
  CopyIcon,
@@ -3073,14 +3198,15 @@ export {
3073
3198
  PlusCircleIcon,
3074
3199
  CircleArrowOutUpLeftIcon,
3075
3200
  BodyHeader,
3076
- ListRow,
3077
3201
  PoweredBy,
3078
3202
  Spinner,
3079
3203
  ConnectStep,
3080
3204
  Button,
3205
+ Callout,
3081
3206
  debugLog,
3082
3207
  debugError,
3083
3208
  toEvmCaip2,
3209
+ targetChainToCaip2,
3084
3210
  parseEvmChainId,
3085
3211
  isSolanaCaip2,
3086
3212
  getAssetId,
@@ -3090,6 +3216,7 @@ export {
3090
3216
  createDepositService,
3091
3217
  currencyFormatter,
3092
3218
  tokenFormatter,
3219
+ isUnsupportedChainSwitchError,
3093
3220
  formatUserError,
3094
3221
  Tooltip,
3095
3222
  getEventTxHash,