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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +76 -0
  2. package/dist/{DepositModalReown-TYHATVOM.mjs → DepositModalReown-6SUEC5IU.mjs} +4 -4
  3. package/dist/{DepositModalReown-LWGABUOF.cjs → DepositModalReown-DNW4GH6L.cjs} +7 -7
  4. package/dist/{QRCode-SMMYPUQC.cjs → QRCode-5DXFNKI2.cjs} +2 -2
  5. package/dist/{QRCode-YMQTKSSK.mjs → QRCode-WUC652SH.mjs} +2 -2
  6. package/dist/{WithdrawModalReown-H7HA3JP3.mjs → WithdrawModalReown-7UAGSOSU.mjs} +4 -4
  7. package/dist/{WithdrawModalReown-FCWED55P.cjs → WithdrawModalReown-OUWBSKSM.cjs} +7 -7
  8. package/dist/{constants-DqVn968d.d.cts → caip-CrQ2KKU-.d.cts} +11 -1
  9. package/dist/{constants-DqVn968d.d.ts → caip-CrQ2KKU-.d.ts} +11 -1
  10. package/dist/{chunk-U3OLJZBT.cjs → chunk-2SMS542Q.cjs} +109 -102
  11. package/dist/{chunk-PKD7W5JG.cjs → chunk-33H6O5UU.cjs} +6 -16
  12. package/dist/{chunk-SZIYS42B.mjs → chunk-6YRDD462.mjs} +63 -3
  13. package/dist/{chunk-E46WOBZQ.mjs → chunk-GPSBM66J.mjs} +2 -12
  14. package/dist/{chunk-5ZS4ZJPW.mjs → chunk-KAWJABTW.mjs} +1071 -543
  15. package/dist/{chunk-H7QMSMM5.mjs → chunk-KJ2RR2D4.mjs} +1834 -586
  16. package/dist/{chunk-7JIDIX27.cjs → chunk-MILJQWPT.cjs} +73 -13
  17. package/dist/{chunk-UELVNPGE.cjs → chunk-RABZINV3.cjs} +1056 -528
  18. package/dist/{chunk-DW276H63.mjs → chunk-TKQYTBU6.mjs} +21 -14
  19. package/dist/{chunk-GBFOGYMH.cjs → chunk-VVJAIMKB.cjs} +1885 -637
  20. package/dist/constants.cjs +6 -2
  21. package/dist/constants.d.cts +1 -1
  22. package/dist/constants.d.ts +1 -1
  23. package/dist/constants.mjs +5 -1
  24. package/dist/deposit.cjs +4 -4
  25. package/dist/deposit.d.cts +2 -2
  26. package/dist/deposit.d.ts +2 -2
  27. package/dist/deposit.mjs +3 -3
  28. package/dist/index.cjs +19 -6
  29. package/dist/index.d.cts +2 -2
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.mjs +20 -7
  32. package/dist/styles.css +685 -75
  33. package/dist/{types-D8Q4TMk7.d.cts → types-BMcGO5k_.d.cts} +56 -2
  34. package/dist/{types-D8Q4TMk7.d.ts → types-BMcGO5k_.d.ts} +56 -2
  35. package/dist/withdraw.cjs +4 -4
  36. package/dist/withdraw.d.cts +2 -2
  37. package/dist/withdraw.d.ts +2 -2
  38. package/dist/withdraw.mjs +3 -3
  39. package/package.json +41 -17
@@ -11,7 +11,9 @@
11
11
 
12
12
 
13
13
 
14
- var _chunk7JIDIX27cjs = require('./chunk-7JIDIX27.cjs');
14
+
15
+
16
+ var _chunkMILJQWPTcjs = require('./chunk-MILJQWPT.cjs');
15
17
 
16
18
  // src/components/ui/Modal.tsx
17
19
 
@@ -62,14 +64,14 @@ function Modal({
62
64
  }
63
65
  }, [isOpen]);
64
66
  _react.useEffect.call(void 0, () => {
65
- if (isOpen) {
67
+ if (isOpen && !inline) {
66
68
  const originalOverflow = document.body.style.overflow;
67
69
  document.body.style.overflow = "hidden";
68
70
  return () => {
69
71
  document.body.style.overflow = originalOverflow;
70
72
  };
71
73
  }
72
- }, [isOpen]);
74
+ }, [isOpen, inline]);
73
75
  const handleKeyDown = _react.useCallback.call(void 0,
74
76
  (event) => {
75
77
  if (event.key === "Escape") {
@@ -162,6 +164,9 @@ Modal.displayName = "Modal";
162
164
 
163
165
 
164
166
 
167
+
168
+
169
+
165
170
 
166
171
 
167
172
 
@@ -183,7 +188,7 @@ function TransferCryptoIcon() {
183
188
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
184
189
  "path",
185
190
  {
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",
191
+ d: "M26.08 18.37C27.03 18.72 27.87 19.30 28.53 20.07C29.19 20.83 29.65 21.75 29.86 22.73C30.07 23.72 30.03 24.74 29.74 25.71C29.45 26.68 28.92 27.55 28.20 28.26C27.48 28.97 26.59 29.49 25.62 29.76C24.65 30.04 23.63 30.06 22.64 29.83C21.66 29.61 20.75 29.14 20.00 28.47C19.24 27.80 18.67 26.95 18.33 26.00M15 14H16V18M24.70 21.87L25.40 22.58L22.58 25.40M22 16C22 19.31 19.31 22 16 22C12.68 22 10 19.31 10 16C10 12.68 12.68 10 16 10C19.31 10 22 12.68 22 16Z",
187
192
  stroke: "currentColor",
188
193
  strokeWidth: "2",
189
194
  strokeLinecap: "round",
@@ -207,6 +212,59 @@ var PercentIcon = _lucidereact.Percent;
207
212
  var ClockIcon = _lucidereact.Clock;
208
213
  var PlusCircleIcon = _lucidereact.CirclePlus;
209
214
  var CircleArrowOutUpLeftIcon = _lucidereact.CircleArrowOutUpLeft;
215
+ var CardIcon = _lucidereact.CreditCard;
216
+ var BankIcon = _lucidereact.Landmark;
217
+ var AppleIcon = _lucidereact.Apple;
218
+
219
+ // src/components/ui/Callout.tsx
220
+
221
+ function CircleAlertIcon() {
222
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
223
+ "svg",
224
+ {
225
+ width: "16",
226
+ height: "16",
227
+ viewBox: "0 0 16 16",
228
+ fill: "none",
229
+ xmlns: "http://www.w3.org/2000/svg",
230
+ "aria-hidden": "true",
231
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
232
+ "path",
233
+ {
234
+ d: "M10 5.99L6 9.99M6 5.99L10 9.99M14.66 7.99C14.66 11.68 11.68 14.66 8 14.66C4.31 14.66 1.33 11.68 1.33 7.99C1.33 4.31 4.31 1.33 8 1.33C11.68 1.33 14.66 4.31 14.66 7.99Z",
235
+ stroke: "currentColor",
236
+ strokeWidth: "1.33",
237
+ strokeLinecap: "round",
238
+ strokeLinejoin: "round"
239
+ }
240
+ )
241
+ }
242
+ );
243
+ }
244
+ function Callout({ variant = "error", children, role }) {
245
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
246
+ "div",
247
+ {
248
+ className: `rs-callout rs-callout--${variant}`,
249
+ role: _nullishCoalesce(role, () => ( (variant === "error" ? "alert" : "status"))),
250
+ children: [
251
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-callout-icon", children: variant === "error" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CircleAlertIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertTriangleIcon, {}) }),
252
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-callout-text", children })
253
+ ]
254
+ }
255
+ );
256
+ }
257
+ Callout.displayName = "Callout";
258
+
259
+ // src/core/useLatestRef.ts
260
+
261
+ function useLatestRef(value) {
262
+ const ref = _react.useRef.call(void 0, value);
263
+ _react.useEffect.call(void 0, () => {
264
+ ref.current = value;
265
+ }, [value]);
266
+ return ref;
267
+ }
210
268
 
211
269
  // src/core/debug.ts
212
270
  function truncateString(value, max = 240) {
@@ -261,29 +319,6 @@ function debugError(enabled, scope, message, error, data) {
261
319
  console.error(`[deposit-modal:${scope}] ${message}`, payload);
262
320
  }
263
321
 
264
- // src/core/caip.ts
265
- var SOLANA_MAINNET_GENESIS = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
266
- var SOLANA_MAINNET_CAIP2 = `solana:${SOLANA_MAINNET_GENESIS}`;
267
- function toEvmCaip2(chainId) {
268
- return `eip155:${chainId}`;
269
- }
270
- function targetChainToCaip2(targetChain) {
271
- return targetChain === "solana" ? SOLANA_MAINNET_CAIP2 : toEvmCaip2(targetChain);
272
- }
273
- function parseEvmChainId(value) {
274
- if (typeof value === "number" && Number.isFinite(value)) {
275
- return value;
276
- }
277
- if (typeof value !== "string") return null;
278
- const match = value.match(/^eip155:(\d+)$/);
279
- if (!_optionalChain([match, 'optionalAccess', _ => _[1]])) return null;
280
- const parsed = Number.parseInt(match[1], 10);
281
- return Number.isFinite(parsed) ? parsed : null;
282
- }
283
- function isSolanaCaip2(value) {
284
- return typeof value === "string" && value.startsWith("solana:");
285
- }
286
-
287
322
  // src/core/deposit-asset-helpers.ts
288
323
  function getAssetId(asset) {
289
324
  return `${asset.chainId}:${asset.token.toLowerCase()}`;
@@ -461,8 +496,8 @@ function buildSessionDetails(unsigned, signature) {
461
496
  }
462
497
  function createDepositService(baseUrl, options) {
463
498
  const normalizedBaseUrl = baseUrl.replace(/\/$/, "");
464
- const debug = _optionalChain([options, 'optionalAccess', _2 => _2.debug]) === true;
465
- const scope = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _3 => _3.debugScope]), () => ( "service"));
499
+ const debug = _optionalChain([options, 'optionalAccess', _ => _.debug]) === true;
500
+ const scope = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _2 => _2.debugScope]), () => ( "service"));
466
501
  function apiUrl(path) {
467
502
  const normalizedPath = path.startsWith("/") ? path : `/${path}`;
468
503
  return `${normalizedBaseUrl}${normalizedPath}`;
@@ -499,7 +534,7 @@ function createDepositService(baseUrl, options) {
499
534
  targetChain: params.targetChain,
500
535
  targetToken: params.targetToken,
501
536
  recipient: params.recipient ? shortRef(params.recipient) : void 0,
502
- postBridgeActionCount: _nullishCoalesce(_optionalChain([params, 'access', _4 => _4.postBridgeActions, 'optionalAccess', _5 => _5.length]), () => ( 0)),
537
+ postBridgeActionCount: _nullishCoalesce(_optionalChain([params, 'access', _3 => _3.postBridgeActions, 'optionalAccess', _4 => _4.length]), () => ( 0)),
503
538
  forceRegister: params.forceRegister
504
539
  });
505
540
  const response = await fetch(url, {
@@ -516,7 +551,7 @@ function createDepositService(baseUrl, options) {
516
551
  error,
517
552
  { status: response.status, ownerAddress: params.ownerAddress }
518
553
  );
519
- const detail = Array.isArray(error.details) ? error.details.map((d) => _optionalChain([d, 'optionalAccess', _6 => _6.message])).filter(Boolean).join("; ") : void 0;
554
+ const detail = Array.isArray(error.details) ? error.details.map((d) => _optionalChain([d, 'optionalAccess', _5 => _5.message])).filter(Boolean).join("; ") : void 0;
520
555
  const base = error.error || `Setup account failed: ${response.status}`;
521
556
  throw new Error(detail ? `${base}: ${detail}` : base);
522
557
  }
@@ -568,8 +603,8 @@ function createDepositService(baseUrl, options) {
568
603
  const result = await response.json();
569
604
  debugLog(debug, scope, "registerAccount:success", {
570
605
  address: params.address,
571
- evmDepositAddress: _optionalChain([result, 'optionalAccess', _7 => _7.evmDepositAddress]),
572
- hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _8 => _8.solanaDepositAddress]))
606
+ evmDepositAddress: _optionalChain([result, 'optionalAccess', _6 => _6.evmDepositAddress]),
607
+ hasSolanaDepositAddress: Boolean(_optionalChain([result, 'optionalAccess', _7 => _7.solanaDepositAddress]))
573
608
  });
574
609
  return result;
575
610
  },
@@ -671,9 +706,9 @@ function createDepositService(baseUrl, options) {
671
706
  }
672
707
  const data = await response.json();
673
708
  const result = {
674
- isRegistered: _optionalChain([data, 'optionalAccess', _9 => _9.isRegistered]) === true,
675
- targetChain: _optionalChain([data, 'optionalAccess', _10 => _10.targetChain]),
676
- targetToken: _optionalChain([data, 'optionalAccess', _11 => _11.targetToken])
709
+ isRegistered: _optionalChain([data, 'optionalAccess', _8 => _8.isRegistered]) === true,
710
+ targetChain: _optionalChain([data, 'optionalAccess', _9 => _9.targetChain]),
711
+ targetToken: _optionalChain([data, 'optionalAccess', _10 => _10.targetToken])
677
712
  };
678
713
  debugLog(debug, scope, "checkAccount:success", {
679
714
  address,
@@ -703,12 +738,12 @@ function createDepositService(baseUrl, options) {
703
738
  return { lastEvent: void 0 };
704
739
  }
705
740
  const body = await response.json();
706
- const row = _optionalChain([body, 'access', _12 => _12.deposits, 'optionalAccess', _13 => _13[0]]);
741
+ const row = _optionalChain([body, 'access', _11 => _11.deposits, 'optionalAccess', _12 => _12[0]]);
707
742
  const lastEvent = row ? depositRowToEvent(row) : void 0;
708
743
  debugLog(debug, scope, "fetchStatus:success", {
709
744
  address,
710
745
  txHash: shortRef(normalized),
711
- eventType: _optionalChain([lastEvent, 'optionalAccess', _14 => _14.type])
746
+ eventType: _optionalChain([lastEvent, 'optionalAccess', _13 => _13.type])
712
747
  });
713
748
  return { lastEvent };
714
749
  },
@@ -729,11 +764,11 @@ function createDepositService(baseUrl, options) {
729
764
  return { lastEvent: void 0 };
730
765
  }
731
766
  const body = await response.json();
732
- const row = _optionalChain([body, 'access', _15 => _15.deposits, 'optionalAccess', _16 => _16[0]]);
767
+ const row = _optionalChain([body, 'access', _14 => _14.deposits, 'optionalAccess', _15 => _15[0]]);
733
768
  const lastEvent = row ? depositRowToEvent(row) : void 0;
734
769
  debugLog(debug, scope, "fetchLatestStatus:success", {
735
770
  address,
736
- eventType: _optionalChain([lastEvent, 'optionalAccess', _17 => _17.type])
771
+ eventType: _optionalChain([lastEvent, 'optionalAccess', _16 => _16.type])
737
772
  });
738
773
  return { lastEvent };
739
774
  },
@@ -795,7 +830,7 @@ function createDepositService(baseUrl, options) {
795
830
  smartAccount,
796
831
  chainId,
797
832
  safeAddress,
798
- txHash: _optionalChain([result, 'optionalAccess', _18 => _18.txHash]) ? shortRef(result.txHash) : void 0
833
+ txHash: _optionalChain([result, 'optionalAccess', _17 => _17.txHash]) ? shortRef(result.txHash) : void 0
799
834
  });
800
835
  return result;
801
836
  },
@@ -835,7 +870,7 @@ function createDepositService(baseUrl, options) {
835
870
  const result = await response.json();
836
871
  debugLog(debug, scope, "submitPolymarketWithdraw:success", {
837
872
  depositWallet,
838
- txHash: _optionalChain([result, 'optionalAccess', _19 => _19.txHash]) ? shortRef(result.txHash) : void 0
873
+ txHash: _optionalChain([result, 'optionalAccess', _18 => _18.txHash]) ? shortRef(result.txHash) : void 0
839
874
  });
840
875
  return result;
841
876
  },
@@ -870,8 +905,8 @@ function createDepositService(baseUrl, options) {
870
905
  );
871
906
  }
872
907
  const data = await response.json();
873
- const deposits = Array.isArray(_optionalChain([data, 'optionalAccess', _20 => _20.deposits])) ? data.deposits : [];
874
- const nextCursor = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _21 => _21.nextCursor]), () => ( _optionalChain([data, 'optionalAccess', _22 => _22.next_cursor]))), () => ( null));
908
+ const deposits = Array.isArray(_optionalChain([data, 'optionalAccess', _19 => _19.deposits])) ? data.deposits : [];
909
+ const nextCursor = _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'optionalAccess', _20 => _20.nextCursor]), () => ( _optionalChain([data, 'optionalAccess', _21 => _21.next_cursor]))), () => ( null));
875
910
  debugLog(debug, scope, "fetchDepositHistory:success", {
876
911
  recipient: shortRef(params.recipient),
877
912
  count: deposits.length,
@@ -881,11 +916,11 @@ function createDepositService(baseUrl, options) {
881
916
  },
882
917
  async checkLiquidity(params) {
883
918
  if (params.destinationChainId === "solana") {
884
- const token = _chunk7JIDIX27cjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
919
+ const token = _chunkMILJQWPTcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
885
920
  return {
886
921
  hasLiquidity: true,
887
- symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _23 => _23.symbol]), () => ( "Token")),
888
- decimals: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _24 => _24.decimals]), () => ( 9)),
922
+ symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _22 => _22.symbol]), () => ( "Token")),
923
+ decimals: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _23 => _23.decimals]), () => ( 9)),
889
924
  unlimited: true,
890
925
  maxAmount: null
891
926
  };
@@ -933,6 +968,44 @@ function createDepositService(baseUrl, options) {
933
968
  });
934
969
  return result;
935
970
  },
971
+ async getQuotePreview(params) {
972
+ const url = apiUrl("/quotes/preview");
973
+ const body = {
974
+ account: params.account,
975
+ sourceChainId: `eip155:${params.sourceChainId}`,
976
+ sourceToken: params.sourceToken,
977
+ amount: params.amount
978
+ };
979
+ debugLog(debug, scope, "getQuotePreview:request", {
980
+ url,
981
+ sourceChainId: body.sourceChainId,
982
+ sourceToken: params.sourceToken,
983
+ amount: params.amount
984
+ });
985
+ try {
986
+ const response = await fetch(url, {
987
+ method: "POST",
988
+ headers: { "Content-Type": "application/json" },
989
+ body: JSON.stringify(body),
990
+ cache: "no-store"
991
+ });
992
+ if (!response.ok) {
993
+ debugLog(debug, scope, "getQuotePreview:unavailable", {
994
+ status: response.status
995
+ });
996
+ return null;
997
+ }
998
+ const quote = await response.json();
999
+ debugLog(debug, scope, "getQuotePreview:success", {
1000
+ settlementLayer: quote.settlementLayer,
1001
+ totalUsd: _optionalChain([quote, 'access', _24 => _24.fees, 'optionalAccess', _25 => _25.totalUsd])
1002
+ });
1003
+ return quote;
1004
+ } catch (error) {
1005
+ debugError(debug, scope, "getQuotePreview:error", error);
1006
+ return null;
1007
+ }
1008
+ },
936
1009
  async fetchPrices(symbols) {
937
1010
  const list = symbols.filter((s) => s.length > 0);
938
1011
  if (list.length === 0) return {};
@@ -962,21 +1035,165 @@ function createDepositService(baseUrl, options) {
962
1035
  debugError(debug, scope, "fetchPrices:error", err);
963
1036
  return {};
964
1037
  }
1038
+ },
1039
+ async getSwappedWidgetUrl(params) {
1040
+ const url = apiUrl("/onramp/swapped/widget-url");
1041
+ debugLog(debug, scope, "getSwappedWidgetUrl:request", {
1042
+ smartAccount: shortRef(params.smartAccount),
1043
+ method: params.method
1044
+ });
1045
+ const response = await fetch(url, {
1046
+ method: "POST",
1047
+ headers: { "Content-Type": "application/json" },
1048
+ body: JSON.stringify(params)
1049
+ });
1050
+ if (!response.ok) {
1051
+ const error = await response.json().catch(() => ({ error: "Unknown error" }));
1052
+ debugError(debug, scope, "getSwappedWidgetUrl:failed", error, {
1053
+ status: response.status
1054
+ });
1055
+ throw new Error(
1056
+ error.error || `Swapped widget URL failed: ${response.status}`
1057
+ );
1058
+ }
1059
+ const body = await response.json();
1060
+ if (typeof body.url !== "string" || typeof body.currencyCode !== "string" || typeof body.externalCustomerId !== "string") {
1061
+ throw new Error("Swapped widget URL: malformed response");
1062
+ }
1063
+ return {
1064
+ url: body.url,
1065
+ currencyCode: body.currencyCode,
1066
+ sandbox: body.sandbox === true,
1067
+ externalCustomerId: body.externalCustomerId,
1068
+ expiresAt: body.expiresAt
1069
+ };
1070
+ },
1071
+ async getSwappedConnectUrl(params) {
1072
+ const url = apiUrl("/onramp/swapped/connect-url");
1073
+ debugLog(debug, scope, "getSwappedConnectUrl:request", {
1074
+ smartAccount: shortRef(params.smartAccount),
1075
+ connection: params.connection
1076
+ });
1077
+ const response = await fetch(url, {
1078
+ method: "POST",
1079
+ headers: { "Content-Type": "application/json" },
1080
+ body: JSON.stringify(params)
1081
+ });
1082
+ if (!response.ok) {
1083
+ const error = await response.json().catch(() => ({ error: "Unknown error" }));
1084
+ debugError(debug, scope, "getSwappedConnectUrl:failed", error, {
1085
+ status: response.status
1086
+ });
1087
+ throw new Error(
1088
+ error.error || `Swapped Connect URL failed: ${response.status}`
1089
+ );
1090
+ }
1091
+ const body = await response.json();
1092
+ if (typeof body.url !== "string" || typeof body.currencyCode !== "string" || typeof body.externalCustomerId !== "string") {
1093
+ throw new Error("Swapped Connect URL: malformed response");
1094
+ }
1095
+ return {
1096
+ url: body.url,
1097
+ currencyCode: body.currencyCode,
1098
+ sandbox: body.sandbox === true,
1099
+ externalCustomerId: body.externalCustomerId,
1100
+ expiresAt: body.expiresAt
1101
+ };
1102
+ },
1103
+ async getSwappedConnectExchanges() {
1104
+ const url = apiUrl("/onramp/swapped/connect-exchanges");
1105
+ debugLog(debug, scope, "getSwappedConnectExchanges:request");
1106
+ const response = await fetch(url, {
1107
+ method: "GET",
1108
+ headers: { "Content-Type": "application/json" },
1109
+ cache: "no-store"
1110
+ });
1111
+ if (!response.ok) {
1112
+ const error = await response.json().catch(() => ({ error: "Unknown error" }));
1113
+ debugError(debug, scope, "getSwappedConnectExchanges:failed", error, {
1114
+ status: response.status
1115
+ });
1116
+ throw new Error(
1117
+ error.error || `Swapped Connect exchanges failed: ${response.status}`
1118
+ );
1119
+ }
1120
+ const body = await response.json();
1121
+ const rawExchanges = Array.isArray(body.exchanges) ? body.exchanges : null;
1122
+ const exchanges = [];
1123
+ let hasMalformedExchange = rawExchanges === null;
1124
+ for (const exchange of _nullishCoalesce(rawExchanges, () => ( []))) {
1125
+ if (!exchange || typeof exchange !== "object") {
1126
+ hasMalformedExchange = true;
1127
+ continue;
1128
+ }
1129
+ const raw = exchange;
1130
+ const connection = typeof raw.connection === "string" ? raw.connection : "";
1131
+ const name = typeof raw.name === "string" ? raw.name : "";
1132
+ const logoUrl = typeof raw.logoUrl === "string" || raw.logoUrl === null ? raw.logoUrl : null;
1133
+ if (!connection || !name) {
1134
+ hasMalformedExchange = true;
1135
+ continue;
1136
+ }
1137
+ exchanges.push({ connection, name, logoUrl });
1138
+ }
1139
+ if (hasMalformedExchange || typeof body.fetchedAt !== "string" || typeof body.expiresAt !== "string") {
1140
+ throw new Error("Swapped Connect exchanges: malformed response");
1141
+ }
1142
+ return {
1143
+ exchanges,
1144
+ fetchedAt: body.fetchedAt,
1145
+ expiresAt: body.expiresAt,
1146
+ stale: body.stale === true ? true : void 0
1147
+ };
1148
+ },
1149
+ async fetchSwappedOrderStatus(smartAccount) {
1150
+ const url = apiUrl(
1151
+ `/onramp/swapped/status/${encodeURIComponent(smartAccount)}`
1152
+ );
1153
+ const response = await fetch(url, {
1154
+ method: "GET",
1155
+ headers: { "Content-Type": "application/json" },
1156
+ cache: "no-store"
1157
+ });
1158
+ if (!response.ok) return null;
1159
+ let body = null;
1160
+ try {
1161
+ body = await response.json();
1162
+ } catch (e3) {
1163
+ return null;
1164
+ }
1165
+ if (!body || body.ok !== true) return null;
1166
+ const status = typeof body.status === "string" ? body.status : null;
1167
+ const orderId = typeof body.orderId === "string" ? body.orderId : null;
1168
+ if (!status || !orderId) return null;
1169
+ const numericOrNull = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
1170
+ return {
1171
+ orderId,
1172
+ status,
1173
+ orderCrypto: typeof body.orderCrypto === "string" ? body.orderCrypto : null,
1174
+ orderCryptoAmount: typeof body.orderCryptoAmount === "string" ? body.orderCryptoAmount : null,
1175
+ transactionId: typeof body.transactionId === "string" ? body.transactionId : null,
1176
+ receivedAt: typeof body.receivedAt === "string" ? body.receivedAt : null,
1177
+ paidAmountUsd: numericOrNull(body.paidAmountUsd),
1178
+ paidAmountEur: numericOrNull(body.paidAmountEur),
1179
+ onrampFeeUsd: numericOrNull(body.onrampFeeUsd),
1180
+ paymentMethod: typeof body.paymentMethod === "string" ? body.paymentMethod : null
1181
+ };
965
1182
  }
966
1183
  };
967
1184
  }
968
1185
  function normalizeDirectPortfolio(data) {
969
1186
  const rawTokens = _nullishCoalesce(_nullishCoalesce(extractArray(data, "tokens"), () => ( extractArray(
970
- _optionalChain([data, 'optionalAccess', _25 => _25.data]),
1187
+ _optionalChain([data, 'optionalAccess', _26 => _26.data]),
971
1188
  "tokens"
972
1189
  ))), () => ( []));
973
- const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _26 => _26.data]), "totalUsd"))), () => ( 0));
1190
+ const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _27 => _27.data]), "totalUsd"))), () => ( 0));
974
1191
  const tokens = rawTokens.map((token) => normalizeDirectToken(token)).filter((token) => Boolean(token));
975
1192
  return { tokens, totalUsd };
976
1193
  }
977
1194
  function extractOrchestratorPortfolio(data) {
978
1195
  const portfolio = _nullishCoalesce(extractArray(data, "portfolio"), () => ( extractArray(
979
- _optionalChain([data, 'optionalAccess', _27 => _27.data]),
1196
+ _optionalChain([data, 'optionalAccess', _28 => _28.data]),
980
1197
  "portfolio"
981
1198
  )));
982
1199
  if (!portfolio || !Array.isArray(portfolio)) return null;
@@ -987,17 +1204,17 @@ function normalizeOrchestratorPortfolio(data) {
987
1204
  for (const tokenData of data.portfolio || []) {
988
1205
  const chainBalances = _nullishCoalesce(_nullishCoalesce(tokenData.tokenChainBalance, () => ( tokenData.chainBalances)), () => ( []));
989
1206
  for (const chainBalance of chainBalances) {
990
- const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _28 => _28.balance, 'optionalAccess', _29 => _29.unlocked]), () => ( "0"));
1207
+ const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _29 => _29.balance, 'optionalAccess', _30 => _30.unlocked]), () => ( "0"));
991
1208
  const normalizedName = tokenData.tokenName.trim();
992
1209
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
993
- const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunk7JIDIX27cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
994
- const resolvedTokenAddress = isNativeSymbol ? _chunk7JIDIX27cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
1210
+ const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkMILJQWPTcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
1211
+ const resolvedTokenAddress = isNativeSymbol ? _chunkMILJQWPTcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
995
1212
  if (!resolvedTokenAddress) {
996
1213
  continue;
997
1214
  }
998
- const registrySymbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
1215
+ const registrySymbol = _chunkMILJQWPTcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
999
1216
  const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
1000
- const decimals = registrySymbol !== "Token" ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
1217
+ const decimals = registrySymbol !== "Token" ? _chunkMILJQWPTcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
1001
1218
  tokens.push({
1002
1219
  chainId: chainBalance.chainId,
1003
1220
  address: resolvedTokenAddress,
@@ -1017,23 +1234,23 @@ function normalizeOrchestratorPortfolio(data) {
1017
1234
  function normalizeDirectToken(token) {
1018
1235
  const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
1019
1236
  const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
1020
- const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? isSolanaCaip2(rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : parseEvmChainId(rawChainString) : null)));
1237
+ const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkMILJQWPTcjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : _chunkMILJQWPTcjs.parseEvmChainId.call(void 0, rawChainString) : null)));
1021
1238
  if (chainId === null) return null;
1022
1239
  const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
1023
1240
  if (!symbol) return null;
1024
- const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _30 => _30(token, "balance"), 'optionalAccess', _31 => _31.toString, 'call', _32 => _32()]))), () => ( _optionalChain([extractNumber, 'call', _33 => _33(token, "amount"), 'optionalAccess', _34 => _34.toString, 'call', _35 => _35()]))), () => ( _optionalChain([extractNumber, 'call', _36 => _36(token, "value"), 'optionalAccess', _37 => _37.toString, 'call', _38 => _38()]))), () => ( _optionalChain([extractNumber, 'call', _39 => _39(token, "rawBalance"), 'optionalAccess', _40 => _40.toString, 'call', _41 => _41()])));
1241
+ const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _31 => _31(token, "balance"), 'optionalAccess', _32 => _32.toString, 'call', _33 => _33()]))), () => ( _optionalChain([extractNumber, 'call', _34 => _34(token, "amount"), 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]))), () => ( _optionalChain([extractNumber, 'call', _37 => _37(token, "value"), 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]))), () => ( _optionalChain([extractNumber, 'call', _40 => _40(token, "rawBalance"), 'optionalAccess', _41 => _41.toString, 'call', _42 => _42()])));
1025
1242
  if (!balanceValue) return null;
1026
1243
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
1027
1244
  token.token,
1028
1245
  "address"
1029
- ))), () => ( (typeof chainId === "number" ? _chunk7JIDIX27cjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
1246
+ ))), () => ( (typeof chainId === "number" ? _chunkMILJQWPTcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
1030
1247
  if (!address) return null;
1031
1248
  const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
1032
1249
  const isSolanaToken = chainId === "solana";
1033
- const registrySymbol = isSolanaToken ? "Token" : _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, address, chainId);
1250
+ const registrySymbol = isSolanaToken ? "Token" : _chunkMILJQWPTcjs.getTokenSymbol.call(void 0, address, chainId);
1034
1251
  const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
1035
1252
  const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
1036
- const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
1253
+ const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkMILJQWPTcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
1037
1254
  return {
1038
1255
  chainId,
1039
1256
  address,
@@ -1046,7 +1263,7 @@ function normalizeDirectToken(token) {
1046
1263
  }
1047
1264
  function extractTokenAddress(tokenData, chainId) {
1048
1265
  const token = tokenData;
1049
- return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _42 => _42.addresses, 'optionalAccess', _43 => _43[chainId]]))), () => ( _optionalChain([token, 'access', _44 => _44.token, 'optionalAccess', _45 => _45.address]))), () => ( _optionalChain([token, 'access', _46 => _46.token, 'optionalAccess', _47 => _47.addresses, 'optionalAccess', _48 => _48[chainId]])));
1266
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _43 => _43.addresses, 'optionalAccess', _44 => _44[chainId]]))), () => ( _optionalChain([token, 'access', _45 => _45.token, 'optionalAccess', _46 => _46.address]))), () => ( _optionalChain([token, 'access', _47 => _47.token, 'optionalAccess', _48 => _48.addresses, 'optionalAccess', _49 => _49[chainId]])));
1050
1267
  }
1051
1268
  function extractArray(data, key) {
1052
1269
  if (!data || typeof data !== "object") return null;
@@ -1145,14 +1362,31 @@ function formatUserError(raw) {
1145
1362
  return cleaned;
1146
1363
  }
1147
1364
 
1148
- // src/core/useLatestRef.ts
1149
-
1150
- function useLatestRef(value) {
1151
- const ref = _react.useRef.call(void 0, value);
1152
- _react.useEffect.call(void 0, () => {
1153
- ref.current = value;
1154
- }, [value]);
1155
- return ref;
1365
+ // src/core/public-client.ts
1366
+ var _viem = require('viem');
1367
+ var _chains = require('viem/chains');
1368
+ var clientCache = /* @__PURE__ */ new Map();
1369
+ function getPublicClient(chainId) {
1370
+ let client = clientCache.get(chainId);
1371
+ if (!client) {
1372
+ const chain = _chunkMILJQWPTcjs.CHAIN_BY_ID[chainId];
1373
+ client = _viem.createPublicClient.call(void 0, {
1374
+ chain,
1375
+ transport: _viem.http.call(void 0, )
1376
+ });
1377
+ clientCache.set(chainId, client);
1378
+ }
1379
+ return client;
1380
+ }
1381
+ var hyperEvmClient;
1382
+ function getHyperEvmReadClient() {
1383
+ if (!hyperEvmClient) {
1384
+ hyperEvmClient = _viem.createPublicClient.call(void 0, {
1385
+ chain: _chains.hyperliquid,
1386
+ transport: _viem.http.call(void 0, )
1387
+ });
1388
+ }
1389
+ return hyperEvmClient;
1156
1390
  }
1157
1391
 
1158
1392
  // src/core/theme.ts
@@ -1257,19 +1491,19 @@ var CUSTOM_PRIMARY_VARS = [
1257
1491
  function applyTheme(element, theme) {
1258
1492
  if (!element) return;
1259
1493
  const parent = element.parentElement;
1260
- const targets = _optionalChain([parent, 'optionalAccess', _49 => _49.classList, 'access', _50 => _50.contains, 'call', _51 => _51("rs-modal-content")]) ? [element, parent] : [element];
1261
- if (_optionalChain([theme, 'optionalAccess', _52 => _52.mode])) {
1494
+ const targets = _optionalChain([parent, 'optionalAccess', _50 => _50.classList, 'access', _51 => _51.contains, 'call', _52 => _52("rs-modal-content")]) ? [element, parent] : [element];
1495
+ if (_optionalChain([theme, 'optionalAccess', _53 => _53.mode])) {
1262
1496
  for (const t of targets) t.setAttribute("data-theme", theme.mode);
1263
1497
  } else {
1264
1498
  for (const t of targets) t.removeAttribute("data-theme");
1265
1499
  }
1266
- if (_optionalChain([theme, 'optionalAccess', _53 => _53.fontColor])) {
1500
+ if (_optionalChain([theme, 'optionalAccess', _54 => _54.fontColor])) {
1267
1501
  setVar(targets, "--rs-foreground", theme.fontColor);
1268
1502
  }
1269
- if (_optionalChain([theme, 'optionalAccess', _54 => _54.iconColor])) {
1503
+ if (_optionalChain([theme, 'optionalAccess', _55 => _55.iconColor])) {
1270
1504
  setVar(targets, "--rs-icon", theme.iconColor);
1271
1505
  }
1272
- if (_optionalChain([theme, 'optionalAccess', _55 => _55.ctaColor])) {
1506
+ if (_optionalChain([theme, 'optionalAccess', _56 => _56.ctaColor])) {
1273
1507
  const derived = deriveCustomPrimary(theme.ctaColor);
1274
1508
  if (derived) {
1275
1509
  setVar(targets, "--rs-primary", derived.base);
@@ -1294,18 +1528,18 @@ function applyTheme(element, theme) {
1294
1528
  }
1295
1529
  } else {
1296
1530
  for (const v of CUSTOM_PRIMARY_VARS) clearVar(targets, v);
1297
- if (_optionalChain([theme, 'optionalAccess', _56 => _56.ctaHoverColor])) {
1531
+ if (_optionalChain([theme, 'optionalAccess', _57 => _57.ctaHoverColor])) {
1298
1532
  setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
1299
1533
  }
1300
1534
  }
1301
- if (_optionalChain([theme, 'optionalAccess', _57 => _57.borderColor])) {
1535
+ if (_optionalChain([theme, 'optionalAccess', _58 => _58.borderColor])) {
1302
1536
  setVar(targets, "--rs-border", theme.borderColor);
1303
1537
  setVar(targets, "--rs-border-surface", theme.borderColor);
1304
1538
  }
1305
- if (_optionalChain([theme, 'optionalAccess', _58 => _58.backgroundColor])) {
1539
+ if (_optionalChain([theme, 'optionalAccess', _59 => _59.backgroundColor])) {
1306
1540
  setVar(targets, "--rs-background", theme.backgroundColor);
1307
1541
  }
1308
- if (_optionalChain([theme, 'optionalAccess', _59 => _59.radius])) {
1542
+ if (_optionalChain([theme, 'optionalAccess', _60 => _60.radius])) {
1309
1543
  const scale = RADIUS_SCALE[theme.radius];
1310
1544
  setVar(targets, "--rs-radius-sm", scale.sm);
1311
1545
  setVar(targets, "--rs-radius-md", scale.md);
@@ -1421,7 +1655,7 @@ function Spinner({ className }) {
1421
1655
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1422
1656
  "path",
1423
1657
  {
1424
- d: "M10 0.5C8.02219 0.5 6.08879 1.08649 4.4443 2.1853C2.79981 3.28412 1.51809 4.8459 0.761209 6.67316C0.00433288 8.50043 -0.1937 10.5111 0.192152 12.4509C0.578004 14.3907 1.53041 16.1725 2.92894 17.5711C4.32746 18.9696 6.10929 19.922 8.0491 20.3078C9.98891 20.6937 11.9996 20.4957 13.8268 19.7388C15.6541 18.9819 17.2159 17.7002 18.3147 16.0557C19.4135 14.4112 20 12.4778 20 10.5C20 7.84783 18.9464 5.3043 17.0711 3.42893C15.1957 1.55357 12.6522 0.5 10 0.5ZM10 17.7727C8.56159 17.7727 7.15549 17.3462 5.95949 16.547C4.7635 15.7479 3.83134 14.6121 3.28088 13.2831C2.73042 11.9542 2.5864 10.4919 2.86702 9.08116C3.14764 7.67039 3.8403 6.37451 4.85741 5.3574C5.87452 4.3403 7.17039 3.64764 8.58116 3.36702C9.99193 3.0864 11.4542 3.23042 12.7832 3.78088C14.1121 4.33133 15.2479 5.26349 16.0471 6.45949C16.8462 7.65548 17.2727 9.06159 17.2727 10.5C17.2727 12.4288 16.5065 14.2787 15.1426 15.6426C13.7787 17.0065 11.9288 17.7727 10 17.7727Z",
1658
+ d: "M10 0.5C8.02 0.5 6.08 1.08 4.44 2.18C2.79 3.28 1.51 4.84 0.76 6.67C0.00 8.50 -0.19 10.51 0.19 12.45C0.57 14.39 1.53 16.17 2.92 17.57C4.32 18.96 6.10 19.92 8.04 20.30C9.98 20.69 11.99 20.49 13.82 19.73C15.65 18.98 17.21 17.70 18.31 16.05C19.41 14.41 20 12.47 20 10.5C20 7.84 18.94 5.30 17.07 3.42C15.19 1.55 12.65 0.5 10 0.5ZM10 17.77C8.56 17.77 7.15 17.34 5.95 16.54C4.76 15.74 3.83 14.61 3.28 13.28C2.73 11.95 2.58 10.49 2.86 9.08C3.14 7.67 3.84 6.37 4.85 5.35C5.87 4.34 7.17 3.64 8.58 3.36C9.99 3.08 11.45 3.23 12.78 3.78C14.11 4.33 15.24 5.26 16.04 6.45C16.84 7.65 17.27 9.06 17.27 10.5C17.27 12.42 16.50 14.27 15.14 15.64C13.77 17.00 11.92 17.77 10 17.77Z",
1425
1659
  fill: "currentColor",
1426
1660
  opacity: 0.3
1427
1661
  }
@@ -1429,7 +1663,7 @@ function Spinner({ className }) {
1429
1663
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1430
1664
  "path",
1431
1665
  {
1432
- d: "M10 3.22767C11.7423 3.22846 13.4276 3.8412 14.7556 4.95667C16.0837 6.07214 16.9681 7.61784 17.2512 9.31825C17.3012 9.64364 17.4662 9.94096 17.7169 10.1573C17.9677 10.3737 18.2878 10.4951 18.6205 10.5C18.8211 10.5001 19.0193 10.457 19.2012 10.3735C19.3832 10.2901 19.5445 10.1684 19.674 10.017C19.8036 9.86549 19.8981 9.68789 19.9511 9.49656C20.004 9.30523 20.0141 9.10478 19.9807 8.90918C19.5986 6.56305 18.3843 4.42821 16.5554 2.88726C14.7265 1.34631 12.4025 0.5 10 0.5C7.59751 0.5 5.27354 1.34631 3.44461 2.88726C1.61569 4.42821 0.401366 6.56305 0.0192815 8.90918C-0.0141442 9.10478 -0.00402016 9.30523 0.0489472 9.49656C0.101914 9.68789 0.196449 9.86549 0.325956 10.017C0.455463 10.1684 0.616823 10.2901 0.798778 10.3735C0.980732 10.457 1.1789 10.5001 1.37945 10.5C1.71216 10.4951 2.03235 10.3737 2.28307 10.1573C2.5338 9.94096 2.69883 9.64364 2.74882 9.31825C3.03193 7.61784 3.91633 6.07214 5.24436 4.95667C6.57239 3.8412 8.25775 3.22846 10 3.22767Z",
1666
+ d: "M10 3.22C11.74 3.22 13.42 3.84 14.75 4.95C16.08 6.07 16.96 7.61 17.25 9.31C17.30 9.64 17.46 9.94 17.71 10.15C17.96 10.37 18.28 10.49 18.62 10.5C18.82 10.50 19.01 10.45 19.20 10.37C19.38 10.29 19.54 10.16 19.67 10.01C19.80 9.86 19.89 9.68 19.95 9.49C20.00 9.30 20.01 9.10 19.98 8.90C19.59 6.56 18.38 4.42 16.55 2.88C14.72 1.34 12.40 0.5 10 0.5C7.59 0.5 5.27 1.34 3.44 2.88C1.61 4.42 0.40 6.56 0.01 8.90C-0.01 9.10 -0.00 9.30 0.04 9.49C0.10 9.68 0.19 9.86 0.32 10.01C0.45 10.16 0.61 10.29 0.79 10.37C0.98 10.45 1.17 10.50 1.37 10.5C1.71 10.49 2.03 10.37 2.28 10.15C2.53 9.94 2.69 9.64 2.74 9.31C3.03 7.61 3.91 6.07 5.24 4.95C6.57 3.84 8.25 3.22 10 3.22Z",
1433
1667
  fill: "currentColor"
1434
1668
  }
1435
1669
  )
@@ -1481,7 +1715,7 @@ function ListRow({
1481
1715
  if (disabled) return;
1482
1716
  if (e.key === "Enter" || e.key === " ") {
1483
1717
  e.preventDefault();
1484
- _optionalChain([onClick, 'optionalCall', _60 => _60(e)]);
1718
+ _optionalChain([onClick, 'optionalCall', _61 => _61(e)]);
1485
1719
  }
1486
1720
  };
1487
1721
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1491,7 +1725,7 @@ function ListRow({
1491
1725
  role: "button",
1492
1726
  tabIndex: disabled ? -1 : 0,
1493
1727
  "aria-disabled": disabled || void 0,
1494
- onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _61 => _61(e)]),
1728
+ onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _62 => _62(e)]),
1495
1729
  onKeyDown: handleKey,
1496
1730
  children: inner
1497
1731
  }
@@ -1511,231 +1745,319 @@ function ListRow({
1511
1745
  }
1512
1746
  ListRow.displayName = "ListRow";
1513
1747
 
1514
- // src/components/ui/WalletBadgeIcons.tsx
1748
+ // src/components/ui/WalletBadgeIcons/RabbyIcon.tsx
1515
1749
 
1516
- var RabbyIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1517
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { clipPath: "url(#rs-rabby-clip)", children: [
1518
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1519
- "mask",
1520
- {
1521
- id: "rs-rabby-mask",
1522
- style: { maskType: "luminance" },
1523
- maskUnits: "userSpaceOnUse",
1524
- x: "0",
1525
- y: "0",
1526
- width: "20",
1527
- height: "20",
1528
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1750
+ function RabbyIcon() {
1751
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1752
+ "svg",
1753
+ {
1754
+ width: "20",
1755
+ height: "20",
1756
+ viewBox: "0 0 20 20",
1757
+ fill: "none",
1758
+ xmlns: "http://www.w3.org/2000/svg",
1759
+ children: [
1760
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { clipPath: "url(#rs-rabby-clip)", children: [
1761
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1762
+ "mask",
1763
+ {
1764
+ id: "rs-rabby-mask",
1765
+ style: { maskType: "luminance" },
1766
+ maskUnits: "userSpaceOnUse",
1767
+ x: "0",
1768
+ y: "0",
1769
+ width: "20",
1770
+ height: "20",
1771
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1772
+ "path",
1773
+ {
1774
+ d: "M20 10C20 4.47 15.52 0 10 0C4.47 0 0 4.47 0 10C0 15.52 4.47 20 10 20C15.52 20 20 15.52 20 10Z",
1775
+ fill: "white"
1776
+ }
1777
+ )
1778
+ }
1779
+ ),
1780
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { mask: "url(#rs-rabby-mask)", children: [
1781
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1782
+ "path",
1783
+ {
1784
+ d: "M20 10C20 4.47 15.52 0 10 0C4.47 0 0 4.47 0 10C0 15.52 4.47 20 10 20C15.52 20 20 15.52 20 10Z",
1785
+ fill: "#7084FF"
1786
+ }
1787
+ ),
1788
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1789
+ "path",
1790
+ {
1791
+ d: "M17.25 10.86C17.82 9.57 14.98 5.97 12.26 4.47C10.55 3.31 8.77 3.47 8.41 3.98C7.62 5.10 11.03 6.05 13.32 7.16C12.83 7.37 12.36 7.76 12.09 8.25C11.24 7.31 9.37 6.51 7.18 7.16C5.70 7.59 4.47 8.62 3.99 10.18C3.85 10.11 3.70 10.09 3.54 10.10C3.39 10.11 3.24 10.16 3.11 10.25C2.98 10.33 2.87 10.45 2.80 10.58C2.72 10.72 2.69 10.87 2.69 11.03C2.69 11.55 3.10 11.96 3.62 11.96C3.71 11.96 4.01 11.90 4.01 11.90L8.77 11.93C6.87 14.96 5.36 15.41 5.36 15.93C5.36 16.46 6.80 16.32 7.34 16.12C9.93 15.18 12.71 12.26 13.19 11.42C15.19 11.67 16.87 11.70 17.25 10.86Z",
1792
+ fill: "url(#rs-rabby-grad0)"
1793
+ }
1794
+ ),
1795
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1796
+ "path",
1797
+ {
1798
+ fillRule: "evenodd",
1799
+ clipRule: "evenodd",
1800
+ d: "M13.31 7.15L13.32 7.16C13.42 7.11 13.41 6.96 13.38 6.83C13.31 6.55 12.16 5.41 11.07 4.90C9.60 4.20 8.51 4.23 8.35 4.56C8.65 5.18 10.04 5.76 11.50 6.36C12.12 6.62 12.75 6.88 13.31 7.15Z",
1801
+ fill: "url(#rs-rabby-grad1)"
1802
+ }
1803
+ ),
1804
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1805
+ "path",
1806
+ {
1807
+ fillRule: "evenodd",
1808
+ clipRule: "evenodd",
1809
+ d: "M11.45 13.38C11.11 13.26 10.77 13.15 10.43 13.07C10.84 12.33 10.92 11.25 10.54 10.56C10.00 9.60 9.32 9.08 7.73 9.08C6.87 9.08 4.53 9.38 4.48 11.34C4.48 11.54 4.48 11.73 4.50 11.90L8.77 11.93C8.20 12.85 7.66 13.53 7.18 14.05C7.75 14.19 8.22 14.32 8.65 14.43C9.06 14.54 9.43 14.63 9.82 14.73C10.41 14.30 10.96 13.83 11.45 13.38Z",
1810
+ fill: "url(#rs-rabby-grad2)"
1811
+ }
1812
+ ),
1813
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1814
+ "path",
1815
+ {
1816
+ d: "M3.94 11.70C4.11 13.19 4.96 13.77 6.68 13.94C8.40 14.12 9.39 14.00 10.71 14.12C11.81 14.22 12.79 14.78 13.15 14.59C13.48 14.42 13.30 13.78 12.86 13.38C12.29 12.85 11.50 12.49 10.12 12.36C10.39 11.60 10.32 10.54 9.89 9.96C9.27 9.12 8.13 8.75 6.68 8.91C5.17 9.08 3.72 9.83 3.94 11.70Z",
1817
+ fill: "url(#rs-rabby-grad3)"
1818
+ }
1819
+ )
1820
+ ] })
1821
+ ] }),
1822
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "defs", { children: [
1823
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1824
+ "linearGradient",
1825
+ {
1826
+ id: "rs-rabby-grad0",
1827
+ x1: "7.00",
1828
+ y1: "9.72",
1829
+ x2: "17.13",
1830
+ y2: "12.58",
1831
+ gradientUnits: "userSpaceOnUse",
1832
+ children: [
1833
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
1834
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "white" })
1835
+ ]
1836
+ }
1837
+ ),
1838
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1839
+ "linearGradient",
1840
+ {
1841
+ id: "rs-rabby-grad1",
1842
+ x1: "15.42",
1843
+ y1: "9.53",
1844
+ x2: "8.09",
1845
+ y2: "2.21",
1846
+ gradientUnits: "userSpaceOnUse",
1847
+ children: [
1848
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
1849
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
1850
+ ]
1851
+ }
1852
+ ),
1853
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1854
+ "linearGradient",
1855
+ {
1856
+ id: "rs-rabby-grad2",
1857
+ x1: "11.65",
1858
+ y1: "13.64",
1859
+ x2: "4.63",
1860
+ y2: "9.61",
1861
+ gradientUnits: "userSpaceOnUse",
1862
+ children: [
1863
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
1864
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
1865
+ ]
1866
+ }
1867
+ ),
1868
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1869
+ "linearGradient",
1870
+ {
1871
+ id: "rs-rabby-grad3",
1872
+ x1: "7.61",
1873
+ y1: "9.64",
1874
+ x2: "12.37",
1875
+ y2: "15.67",
1876
+ gradientUnits: "userSpaceOnUse",
1877
+ children: [
1878
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
1879
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "0.98", stopColor: "#D1D8FF" })
1880
+ ]
1881
+ }
1882
+ ),
1883
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "clipPath", { id: "rs-rabby-clip", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", fill: "white" }) })
1884
+ ] })
1885
+ ]
1886
+ }
1887
+ );
1888
+ }
1889
+
1890
+ // src/components/ui/WalletBadgeIcons/PhantomIcon.tsx
1891
+
1892
+ function PhantomIcon() {
1893
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1894
+ "svg",
1895
+ {
1896
+ width: "20",
1897
+ height: "20",
1898
+ viewBox: "0 0 20 20",
1899
+ fill: "none",
1900
+ xmlns: "http://www.w3.org/2000/svg",
1901
+ children: [
1902
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1903
+ "path",
1904
+ {
1905
+ d: "M15.18 0H4.81C2.15 0 0 2.15 0 4.81V15.18C0 17.84 2.15 20 4.81 20H15.18C17.84 20 20 17.84 20 15.18V4.81C20 2.15 17.84 0 15.18 0Z",
1906
+ fill: "#AB9FF2"
1907
+ }
1908
+ ),
1909
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1529
1910
  "path",
1530
1911
  {
1531
- d: "M20 10C20 4.47688 15.5231 0 10 0C4.47688 0 0 4.47688 0 10C0 15.5231 4.47688 20 10 20C15.5231 20 20 15.5231 20 10Z",
1532
- fill: "white"
1912
+ fillRule: "evenodd",
1913
+ clipRule: "evenodd",
1914
+ d: "M8.61 12.94C7.77 14.23 6.37 15.85 4.50 15.85C3.62 15.85 2.77 15.49 2.77 13.91C2.77 9.89 8.26 3.67 13.35 3.67C16.25 3.67 17.40 5.68 17.40 7.96C17.40 10.89 15.50 14.24 13.61 14.24C13.01 14.24 12.72 13.91 12.72 13.39C12.72 13.25 12.74 13.10 12.79 12.94C12.14 14.04 10.90 15.07 9.73 15.07C8.88 15.07 8.45 14.53 8.45 13.78C8.45 13.51 8.51 13.23 8.61 12.94ZM15.49 7.88C15.49 8.54 15.10 8.88 14.66 8.88C14.21 8.88 13.83 8.54 13.83 7.88C13.83 7.21 14.21 6.88 14.66 6.88C15.10 6.88 15.49 7.22 15.49 7.88ZM13.00 7.88C13.00 8.54 12.60 8.88 12.17 8.88C11.72 8.88 11.33 8.54 11.33 7.88C11.33 7.22 11.72 6.88 12.17 6.88C12.60 6.88 13.00 7.22 13.00 7.88",
1915
+ fill: "#FFFDF8"
1533
1916
  }
1534
1917
  )
1535
- }
1536
- ),
1537
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { mask: "url(#rs-rabby-mask)", children: [
1538
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1539
- "path",
1540
- {
1541
- d: "M20 10C20 4.47688 15.5231 0 10 0C4.47688 0 0 4.47688 0 10C0 15.5231 4.47688 20 10 20C15.5231 20 20 15.5231 20 10Z",
1542
- fill: "#7084FF"
1543
- }
1544
- ),
1545
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1546
- "path",
1547
- {
1548
- d: "M17.2515 10.8675C17.8265 9.57871 14.9847 5.97871 12.2697 4.47934C10.5584 3.31684 8.77529 3.47684 8.41404 3.98684C7.62154 5.10684 11.039 6.05559 13.3234 7.16184C12.8322 7.37621 12.3697 7.76059 12.0972 8.25184C11.2453 7.31871 9.37529 6.51434 7.18154 7.16246C5.70279 7.59871 4.47404 8.62684 3.99904 10.18C3.85708 10.1175 3.70178 10.0914 3.5472 10.1041C3.39262 10.1168 3.24365 10.1678 3.11376 10.2526C2.98388 10.3373 2.87719 10.4532 2.80336 10.5896C2.72952 10.726 2.69088 10.8786 2.69092 11.0337C2.69092 11.55 3.10717 11.9681 3.62154 11.9681C3.71654 11.9681 4.01467 11.9037 4.01467 11.9037L8.77529 11.9387C6.87154 14.9687 5.36654 15.4118 5.36654 15.9368C5.36654 16.4618 6.80654 16.32 7.34717 16.1243C9.93467 15.1868 12.714 12.2675 13.1909 11.4268C15.1934 11.6775 16.8765 11.7075 17.2515 10.8675Z",
1549
- fill: "url(#rs-rabby-grad0)"
1550
- }
1551
- ),
1552
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1553
- "path",
1554
- {
1555
- fillRule: "evenodd",
1556
- clipRule: "evenodd",
1557
- d: "M13.3147 7.15865L13.3216 7.16177C13.4279 7.1199 13.4104 6.96302 13.3816 6.8399C13.3147 6.55615 12.161 5.41365 11.0779 4.90177C9.60224 4.20427 8.51536 4.2399 8.35474 4.56177C8.65474 5.18052 10.0485 5.76052 11.5047 6.3674C12.1235 6.6249 12.7529 6.88677 13.3147 7.15865Z",
1558
- fill: "url(#rs-rabby-grad1)"
1559
- }
1560
- ),
1561
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1562
- "path",
1563
- {
1564
- fillRule: "evenodd",
1565
- clipRule: "evenodd",
1566
- d: "M11.4522 13.3856C11.1193 13.26 10.7791 13.1548 10.4335 13.0706C10.8422 12.3369 10.9278 11.2506 10.5416 10.5644C10.0003 9.60001 9.32033 9.08688 7.73971 9.08688C6.87096 9.08688 4.53096 9.38063 4.48971 11.3406C4.48471 11.5456 4.4895 11.7346 4.50408 11.9075L8.77721 11.9388C8.20096 12.8556 7.66158 13.5363 7.18908 14.0531C7.75596 14.1994 8.22408 14.3219 8.65408 14.4344C9.06158 14.5406 9.43471 14.6381 9.82471 14.7381C10.4141 14.3069 10.9685 13.8381 11.4522 13.3856Z",
1567
- fill: "url(#rs-rabby-grad2)"
1568
- }
1569
- ),
1570
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1571
- "path",
1572
- {
1573
- d: "M3.94351 11.7048C4.11789 13.1936 4.96101 13.7773 6.68476 13.9498C8.40851 14.1223 9.39664 14.0067 10.7123 14.1273C11.8116 14.2273 12.7929 14.7898 13.1573 14.5954C13.4848 14.4204 13.301 13.7892 12.8629 13.3836C12.2941 12.8586 11.5079 12.4936 10.1241 12.3642C10.3998 11.6061 10.3223 10.5436 9.89414 9.96543C9.27476 9.1298 8.13164 8.7523 6.68476 8.9173C5.17226 9.0898 3.72414 9.83605 3.94351 11.7048Z",
1574
- fill: "url(#rs-rabby-grad3)"
1575
- }
1576
- )
1577
- ] })
1578
- ] }),
1579
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "defs", { children: [
1580
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1581
- "linearGradient",
1582
- {
1583
- id: "rs-rabby-grad0",
1584
- x1: "7.00904",
1585
- y1: "9.72621",
1586
- x2: "17.1328",
1587
- y2: "12.5875",
1588
- gradientUnits: "userSpaceOnUse",
1589
- children: [
1590
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
1591
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "white" })
1592
- ]
1593
- }
1594
- ),
1595
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1596
- "linearGradient",
1597
- {
1598
- id: "rs-rabby-grad1",
1599
- x1: "15.4216",
1600
- y1: "9.5324",
1601
- x2: "8.09661",
1602
- y2: "2.21365",
1603
- gradientUnits: "userSpaceOnUse",
1604
- children: [
1605
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
1606
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
1607
- ]
1608
- }
1609
- ),
1610
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1611
- "linearGradient",
1612
- {
1613
- id: "rs-rabby-grad2",
1614
- x1: "11.6553",
1615
- y1: "13.6413",
1616
- x2: "4.63033",
1617
- y2: "9.61626",
1618
- gradientUnits: "userSpaceOnUse",
1619
- children: [
1620
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#8697FF" }),
1621
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#8697FF", stopOpacity: "0" })
1622
- ]
1623
- }
1624
- ),
1625
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1626
- "linearGradient",
1627
- {
1628
- id: "rs-rabby-grad3",
1629
- x1: "7.61476",
1630
- y1: "9.64918",
1631
- x2: "12.3748",
1632
- y2: "15.6773",
1633
- gradientUnits: "userSpaceOnUse",
1634
- children: [
1635
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "white" }),
1636
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "0.984", stopColor: "#D1D8FF" })
1637
- ]
1638
- }
1639
- ),
1640
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "clipPath", { id: "rs-rabby-clip", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", fill: "white" }) })
1641
- ] })
1642
- ] });
1643
- var PhantomIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1644
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1645
- "path",
1646
- {
1647
- d: "M15.1852 0H4.81481C2.15567 0 0 2.15567 0 4.81481V15.1852C0 17.8443 2.15567 20 4.81481 20H15.1852C17.8443 20 20 17.8443 20 15.1852V4.81481C20 2.15567 17.8443 0 15.1852 0Z",
1648
- fill: "#AB9FF2"
1649
- }
1650
- ),
1651
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1652
- "path",
1653
- {
1654
- fillRule: "evenodd",
1655
- clipRule: "evenodd",
1656
- d: "M8.61617 12.9486C7.77876 14.2315 6.37579 15.855 4.50894 15.855C3.62635 15.855 2.77783 15.4917 2.77783 13.9136C2.77783 9.89449 8.26542 3.67264 13.3569 3.67264C16.2534 3.67264 17.4075 5.68227 17.4075 7.9643C17.4075 10.8936 15.5067 14.2428 13.6171 14.2428C13.0175 14.2428 12.7232 13.9136 12.7232 13.3913C12.7232 13.255 12.7459 13.1075 12.7912 12.9486C12.1462 14.0499 10.9015 15.0717 9.73617 15.0717C8.88765 15.0717 8.45765 14.538 8.45765 13.7887C8.45765 13.5162 8.51431 13.2325 8.61617 12.9486ZM15.4958 7.88486C15.4958 8.54986 15.1032 8.88245 14.6643 8.88245C14.2189 8.88245 13.8332 8.54986 13.8332 7.88486C13.8332 7.21986 14.2189 6.88745 14.6645 6.88745C15.1034 6.88745 15.4958 7.22004 15.4958 7.88486ZM13.0017 7.88486C13.0017 8.54986 12.6095 8.88245 12.1706 8.88245C11.7251 8.88245 11.3393 8.54986 11.3393 7.88505C11.3393 7.22005 11.7251 6.88745 12.1706 6.88745C12.6095 6.88745 13.0017 7.22005 13.0017 7.88505",
1657
- fill: "#FFFDF8"
1658
- }
1659
- )
1660
- ] });
1661
- var WalletConnectIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1662
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "2.5", fill: "#3B99FC" }),
1663
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1664
- "path",
1665
- {
1666
- d: "M6.18 7.96a5.36 5.36 0 0 1 7.64 0l.25.26a.26.26 0 0 1 0 .37l-.87.87a.13.13 0 0 1-.19 0l-.35-.35a3.74 3.74 0 0 0-5.32 0l-.38.37a.13.13 0 0 1-.19 0l-.86-.86a.26.26 0 0 1 0-.37l.27-.29Zm9.43 1.79.78.78a.26.26 0 0 1 0 .37l-3.54 3.54a.26.26 0 0 1-.37 0l-2.51-2.5a.07.07 0 0 0-.09 0l-2.51 2.5a.26.26 0 0 1-.37 0L3.46 10.9a.26.26 0 0 1 0-.37l.78-.78a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0L9.72 9.75a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0l2.5-2.5a.26.26 0 0 1 .37 0Z",
1667
- fill: "#fff"
1918
+ ]
1668
1919
  }
1669
- )
1670
- ] });
1671
- var EthBadgeIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1672
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1673
- "path",
1920
+ );
1921
+ }
1922
+
1923
+ // src/components/ui/WalletBadgeIcons/WalletConnectIcon.tsx
1924
+
1925
+ function WalletConnectIcon() {
1926
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1927
+ "svg",
1674
1928
  {
1675
- d: "M9.99987 19.9319C15.4852 19.9319 19.9319 15.4852 19.9319 9.9999C19.9319 4.51461 15.4852 0.0679016 9.99987 0.0679016C4.51458 0.0679016 0.0678711 4.51461 0.0678711 9.9999C0.0678711 15.4852 4.51458 19.9319 9.99987 19.9319Z",
1676
- fill: "#E3E3E3"
1929
+ width: "20",
1930
+ height: "20",
1931
+ viewBox: "0 0 20 20",
1932
+ fill: "none",
1933
+ xmlns: "http://www.w3.org/2000/svg",
1934
+ children: [
1935
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "2.5", fill: "#3B99FC" }),
1936
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1937
+ "path",
1938
+ {
1939
+ d: "M6.18 7.96a5.36 5.36 0 0 1 7.64 0l.25.26a.26.26 0 0 1 0 .37l-.87.87a.13.13 0 0 1-.19 0l-.35-.35a3.74 3.74 0 0 0-5.32 0l-.38.37a.13.13 0 0 1-.19 0l-.86-.86a.26.26 0 0 1 0-.37l.27-.29Zm9.43 1.79.78.78a.26.26 0 0 1 0 .37l-3.54 3.54a.26.26 0 0 1-.37 0l-2.51-2.5a.07.07 0 0 0-.09 0l-2.51 2.5a.26.26 0 0 1-.37 0L3.46 10.9a.26.26 0 0 1 0-.37l.78-.78a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0L9.72 9.75a.26.26 0 0 1 .37 0l2.5 2.5a.07.07 0 0 0 .1 0l2.5-2.5a.26.26 0 0 1 .37 0Z",
1940
+ fill: "#fff"
1941
+ }
1942
+ )
1943
+ ]
1677
1944
  }
1678
- ),
1679
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.0073 2.18121L14.6948 9.99371L10.0247 7.98052L10.0073 2.18121Z", fill: "#2F3030" }),
1680
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M5.31982 9.99371L9.98998 2.18121L10.0073 7.98052L5.31982 9.99371Z", fill: "#828384" }),
1681
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M9.98998 12.8062L5.31982 10.047L10.0073 8.11871L9.98998 12.8062Z", fill: "#343535" }),
1682
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14.6948 10.047L10.0247 8.11871L10.0073 12.8062L14.6948 10.047Z", fill: "#131313" }),
1683
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.0073 14.0046L14.6948 11.2437L10.0073 17.8062V14.0046Z", fill: "#2F3030" }),
1684
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.0073 14.0046L5.31982 11.2437L10.0073 17.8062V14.0046Z", fill: "#828384" })
1685
- ] });
1686
- var SolBadgeIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1687
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "10", fill: "#0C0C0C" }),
1688
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1689
- "path",
1945
+ );
1946
+ }
1947
+
1948
+ // src/components/ui/WalletBadgeIcons/EthBadgeIcon.tsx
1949
+
1950
+ function EthBadgeIcon() {
1951
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1952
+ "svg",
1690
1953
  {
1691
- fillRule: "evenodd",
1692
- clipRule: "evenodd",
1693
- d: "M4.62391 9.04404H13.8799C13.9959 9.04404 14.1039 9.08804 14.1839 9.17204L15.6479 10.644C15.9199 10.916 15.7279 11.38 15.3439 11.38H6.08791C5.97191 11.38 5.86391 11.336 5.78391 11.252L4.31991 9.78004C4.04791 9.51203 4.23991 9.04404 4.62391 9.04404ZM4.31591 7.09204L5.77991 5.62003C5.86391 5.53603 5.97191 5.49203 6.08391 5.49203H15.3359C15.7199 5.49203 15.9159 5.95603 15.6399 6.22803L14.1799 7.70003C14.0999 7.78403 13.9879 7.82803 13.8759 7.82803H4.62391C4.23991 7.82803 4.04791 7.36404 4.31591 7.09204ZM15.6439 13.34L14.1799 14.816C14.0999 14.896 13.9879 14.944 13.8759 14.944H4.62391C4.23991 14.944 4.04791 14.48 4.31591 14.208L5.77991 12.732C5.86391 12.652 5.97191 12.604 6.08391 12.604H15.3359C15.7239 12.6 15.9199 13.064 15.6439 13.34Z",
1694
- fill: "url(#rs-sol-badge-grad)"
1954
+ width: "20",
1955
+ height: "20",
1956
+ viewBox: "0 0 20 20",
1957
+ fill: "none",
1958
+ xmlns: "http://www.w3.org/2000/svg",
1959
+ children: [
1960
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1961
+ "path",
1962
+ {
1963
+ d: "M9.99 19.93C15.48 19.93 19.93 15.48 19.93 9.99C19.93 4.51 15.48 0.06 9.99 0.06C4.51 0.06 0.06 4.51 0.06 9.99C0.06 15.48 4.51 19.93 9.99 19.93Z",
1964
+ fill: "#E3E3E3"
1965
+ }
1966
+ ),
1967
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.00 2.18L14.69 9.99L10.02 7.98L10.00 2.18Z", fill: "#2F3030" }),
1968
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M5.31 9.99L9.98 2.18L10.00 7.98L5.31 9.99Z", fill: "#828384" }),
1969
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M9.98 12.80L5.31 10.04L10.00 8.11L9.98 12.80Z", fill: "#343535" }),
1970
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M14.69 10.04L10.02 8.11L10.00 12.80L14.69 10.04Z", fill: "#131313" }),
1971
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.00 14.00L14.69 11.24L10.00 17.80V14.00Z", fill: "#2F3030" }),
1972
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M10.00 14.00L5.31 11.24L10.00 17.80V14.00Z", fill: "#828384" })
1973
+ ]
1695
1974
  }
1696
- ),
1697
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "defs", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1698
- "linearGradient",
1975
+ );
1976
+ }
1977
+
1978
+ // src/components/ui/WalletBadgeIcons/SolBadgeIcon.tsx
1979
+
1980
+ function SolBadgeIcon() {
1981
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1982
+ "svg",
1699
1983
  {
1700
- id: "rs-sol-badge-grad",
1701
- x1: "4.85031",
1702
- y1: "15.3466",
1703
- x2: "15.1135",
1704
- y2: "5.08343",
1705
- gradientUnits: "userSpaceOnUse",
1984
+ width: "20",
1985
+ height: "20",
1986
+ viewBox: "0 0 20 20",
1987
+ fill: "none",
1988
+ xmlns: "http://www.w3.org/2000/svg",
1706
1989
  children: [
1707
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#CB4EE8" }),
1708
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#10F4B1" })
1990
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "rect", { width: "20", height: "20", rx: "10", fill: "#0C0C0C" }),
1991
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1992
+ "path",
1993
+ {
1994
+ fillRule: "evenodd",
1995
+ clipRule: "evenodd",
1996
+ d: "M4.62 9.04H13.87C13.99 9.04 14.10 9.08 14.18 9.17L15.64 10.64C15.91 10.91 15.72 11.38 15.34 11.38H6.08C5.97 11.38 5.86 11.33 5.78 11.25L4.31 9.78C4.04 9.51 4.23 9.04 4.62 9.04ZM4.31 7.09L5.77 5.62C5.86 5.53 5.97 5.49 6.08 5.49H15.33C15.71 5.49 15.91 5.95 15.63 6.22L14.17 7.70C14.09 7.78 13.98 7.82 13.87 7.82H4.62C4.23 7.82 4.04 7.36 4.31 7.09ZM15.64 13.34L14.17 14.81C14.09 14.89 13.98 14.94 13.87 14.94H4.62C4.23 14.94 4.04 14.48 4.31 14.20L5.77 12.73C5.86 12.65 5.97 12.60 6.08 12.60H15.33C15.72 12.6 15.91 13.06 15.64 13.34Z",
1997
+ fill: "url(#rs-sol-badge-grad)"
1998
+ }
1999
+ ),
2000
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "defs", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2001
+ "linearGradient",
2002
+ {
2003
+ id: "rs-sol-badge-grad",
2004
+ x1: "4.85",
2005
+ y1: "15.34",
2006
+ x2: "15.11",
2007
+ y2: "5.08",
2008
+ gradientUnits: "userSpaceOnUse",
2009
+ children: [
2010
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { stopColor: "#CB4EE8" }),
2011
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "stop", { offset: "1", stopColor: "#10F4B1" })
2012
+ ]
2013
+ }
2014
+ ) })
1709
2015
  ]
1710
2016
  }
1711
- ) })
1712
- ] });
1713
- var BaseBadgeIcon = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 111 111", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1714
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "55.5", cy: "55.5", r: "55.5", fill: "#0052FF" }),
1715
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1716
- "path",
2017
+ );
2018
+ }
2019
+
2020
+ // src/components/ui/WalletBadgeIcons/BaseBadgeIcon.tsx
2021
+
2022
+ function BaseBadgeIcon() {
2023
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2024
+ "svg",
1717
2025
  {
1718
- d: "M54.921 93.4c20.942 0 37.92-16.978 37.92-37.921S75.863 17.558 54.92 17.558c-19.498 0-35.57 14.725-37.655 33.647h49.82v5.548h-49.82C19.351 75.675 35.423 93.4 54.921 93.4z",
1719
- fill: "#fff"
2026
+ width: "20",
2027
+ height: "20",
2028
+ viewBox: "0 0 111 111",
2029
+ fill: "none",
2030
+ xmlns: "http://www.w3.org/2000/svg",
2031
+ children: [
2032
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { cx: "55.5", cy: "55.5", r: "55.5", fill: "#0052FF" }),
2033
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2034
+ "path",
2035
+ {
2036
+ d: "M54.92 93.4c20.94 0 37.92-16.97 37.92-37.92S75.86 17.55 54.92 17.55c-19.49 0-35.57 14.72-37.65 33.64h49.82v5.54h-49.82C19.35 75.67 35.42 93.4 54.92 93.4z",
2037
+ fill: "#fff"
2038
+ }
2039
+ )
2040
+ ]
1720
2041
  }
1721
- )
1722
- ] });
1723
- var walletBadge = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons", children: [
1724
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RabbyIcon, {}) }),
1725
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PhantomIcon, {}) }),
1726
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletConnectIcon, {}) })
1727
- ] });
1728
- var chainBadge = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons", children: [
1729
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EthBadgeIcon, {}) }),
1730
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SolBadgeIcon, {}) }),
1731
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BaseBadgeIcon, {}) })
1732
- ] });
2042
+ );
2043
+ }
2044
+
2045
+ // src/components/ui/WalletBadgeIcons/index.tsx
2046
+
1733
2047
  function WalletBadgeIcons() {
1734
- return walletBadge;
2048
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons", children: [
2049
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RabbyIcon, {}) }),
2050
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PhantomIcon, {}) }),
2051
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletConnectIcon, {}) })
2052
+ ] });
1735
2053
  }
1736
2054
  WalletBadgeIcons.displayName = "WalletBadgeIcons";
1737
2055
  function ChainBadgeIcons() {
1738
- return chainBadge;
2056
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-list-row-meta-icons", children: [
2057
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EthBadgeIcon, {}) }),
2058
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SolBadgeIcon, {}) }),
2059
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BaseBadgeIcon, {}) })
2060
+ ] });
1739
2061
  }
1740
2062
  ChainBadgeIcons.displayName = "ChainBadgeIcons";
1741
2063
 
@@ -1745,6 +2067,11 @@ function formatBalanceUsd(value) {
1745
2067
  if (!Number.isFinite(value) || value <= 0) return "$0.00";
1746
2068
  return `$${value.toFixed(2)}`;
1747
2069
  }
2070
+ function fiatIcon(name) {
2071
+ if (name === "apple") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AppleIcon, {});
2072
+ if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BankIcon, {});
2073
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardIcon, {});
2074
+ }
1748
2075
  function shorten(addr) {
1749
2076
  return addr.length > 12 ? `${addr.slice(0, 6)}...${addr.slice(-4)}` : addr;
1750
2077
  }
@@ -1761,9 +2088,21 @@ function renderWalletLeading(row) {
1761
2088
  }
1762
2089
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {});
1763
2090
  }
2091
+ var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TransferCryptoIcon, {});
2092
+ var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {});
2093
+ var SMALL_SPINNER = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { className: "rs-spinner--sm" });
2094
+ var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2095
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
2096
+ "+100 wallets"
2097
+ ] });
2098
+ var EXTRA_CHAIN_COUNT = Math.max(0, _chunkMILJQWPTcjs.getSupportedChainIds.call(void 0, ).length - 3);
2099
+ var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2100
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
2101
+ EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT} chains` : "All chains"
2102
+ ] });
1764
2103
  function renderRowTrailing(state) {
1765
2104
  if (state === "loading") {
1766
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { className: "rs-spinner--sm" });
2105
+ return SMALL_SPINNER;
1767
2106
  }
1768
2107
  return void 0;
1769
2108
  }
@@ -1773,6 +2112,10 @@ function ConnectStep({
1773
2112
  onSelectTransferCrypto,
1774
2113
  transferCryptoState,
1775
2114
  transferCryptoErrorReason,
2115
+ onSelectPayWithCard,
2116
+ fiatPaymentMethods,
2117
+ onSelectFiatMethod,
2118
+ onSelectFundFromExchange,
1776
2119
  onRequestConnect,
1777
2120
  onConnect,
1778
2121
  onDisconnect,
@@ -1786,12 +2129,7 @@ function ConnectStep({
1786
2129
  const hasReownWallet = rows.some(
1787
2130
  (row) => row.kind === "external" || row.kind === "solana"
1788
2131
  );
1789
- const showDappImports = hasReownWallet && (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _62 => _62.length]), () => ( 0))) > 0;
1790
- const extraChainCount = Math.max(0, _chunk7JIDIX27cjs.getSupportedChainIds.call(void 0, ).length - 3);
1791
- const chainBadge2 = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1792
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
1793
- extraChainCount > 0 ? `+${extraChainCount} chains` : "All chains"
1794
- ] });
2132
+ const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _63 => _63.length]), () => ( 0))) > 0;
1795
2133
  const defaultSubtitle = onSelectTransferCrypto ? "Add money to your balance" : "Choose a wallet to continue";
1796
2134
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
1797
2135
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
@@ -1807,29 +2145,52 @@ function ConnectStep({
1807
2145
  onSelectTransferCrypto && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1808
2146
  ListRow,
1809
2147
  {
1810
- leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TransferCryptoIcon, {}),
2148
+ leading: TRANSFER_CRYPTO_LEADING,
1811
2149
  title: "Transfer crypto",
1812
- subtitle: transferCryptoState === "loading" ? "Preparing\u2026" : transferCryptoState === "error" ? _nullishCoalesce(transferCryptoErrorReason, () => ( "Couldn't prepare account \u2014 tap to retry")) : "Instant - No limit",
1813
- meta: chainBadge2,
1814
- onClick: onSelectTransferCrypto,
1815
- disabled: transferCryptoState === "loading",
1816
- trailing: transferCryptoState === "loading" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { className: "rs-spinner--sm" }) : void 0
2150
+ subtitle: transferCryptoState === "error" ? _nullishCoalesce(transferCryptoErrorReason, () => ( "Couldn't prepare account \u2014 tap to retry")) : "Instant - No limit",
2151
+ meta: CHAIN_BADGE_META,
2152
+ onClick: onSelectTransferCrypto
2153
+ }
2154
+ ),
2155
+ fiatPaymentMethods && fiatPaymentMethods.length > 0 && onSelectFiatMethod ? fiatPaymentMethods.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2156
+ ListRow,
2157
+ {
2158
+ leading: fiatIcon(opt.icon),
2159
+ title: opt.label,
2160
+ subtitle: opt.sublabel,
2161
+ onClick: () => onSelectFiatMethod(opt.method)
2162
+ },
2163
+ opt.method
2164
+ )) : onSelectPayWithCard && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2165
+ ListRow,
2166
+ {
2167
+ leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardIcon, {}),
2168
+ title: "Pay with Card",
2169
+ subtitle: "Buy crypto with card or bank",
2170
+ onClick: onSelectPayWithCard
2171
+ }
2172
+ ),
2173
+ onSelectFundFromExchange && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2174
+ ListRow,
2175
+ {
2176
+ leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BankIcon, {}),
2177
+ title: "Fund from Exchange",
2178
+ subtitle: "Use Coinbase, Binance, MetaMask\u2026",
2179
+ onClick: onSelectFundFromExchange
1817
2180
  }
1818
2181
  ),
1819
2182
  rows.map((row) => {
1820
2183
  const collapseToExternal = Boolean(onSelectTransferCrypto) && row.kind !== "solana";
1821
2184
  const subtitleText = row.state === "loading" ? "Preparing\u2026" : row.state === "error" ? _nullishCoalesce(row.errorReason, () => ( "Couldn't prepare wallet \u2014 tap to retry")) : shorten(row.address);
1822
- const showInlineDisconnect = Boolean(onSelectTransferCrypto) && Boolean(onDisconnect) && row.state !== "loading";
1823
2185
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1824
2186
  ListRow,
1825
2187
  {
1826
2188
  leading: renderWalletLeading(row),
1827
2189
  title: collapseToExternal ? "External wallet" : row.label,
1828
2190
  subtitle: subtitleText,
1829
- onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _63 => _63(row.id)]),
2191
+ onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _64 => _64(row.id)]),
1830
2192
  disabled: row.state === "loading",
1831
- trailing: renderRowTrailing(row.state),
1832
- action: showInlineDisconnect && onDisconnect ? { label: "Disconnect", onClick: onDisconnect } : void 0
2193
+ trailing: renderRowTrailing(row.state)
1833
2194
  },
1834
2195
  row.id
1835
2196
  );
@@ -1837,18 +2198,28 @@ function ConnectStep({
1837
2198
  !hasReownWallet && handleConnect && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1838
2199
  ListRow,
1839
2200
  {
1840
- leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}),
2201
+ leading: WALLET_LEADING,
1841
2202
  title: "Connect wallet",
1842
2203
  subtitle: "Instant - No limit",
1843
- meta: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1844
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
1845
- "+100 wallets"
1846
- ] }),
2204
+ meta: CONNECT_META,
1847
2205
  onClick: handleConnect
1848
2206
  }
1849
2207
  ),
1850
- showDappImports && _optionalChain([dappImports, 'optionalAccess', _64 => _64.map, 'call', _65 => _65((row) => {
1851
- if (row.status === "loading") {
2208
+ showDappImports && _optionalChain([dappImports, 'optionalAccess', _65 => _65.map, 'call', _66 => _66((row) => {
2209
+ if (!hasReownWallet) {
2210
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2211
+ ListRow,
2212
+ {
2213
+ leading: row.icon,
2214
+ title: row.label,
2215
+ subtitle: "Connect wallet to view balance",
2216
+ onClick: handleConnect,
2217
+ disabled: !handleConnect
2218
+ },
2219
+ row.id
2220
+ );
2221
+ }
2222
+ if (row.status === "loading" || row.status === "needs-connect") {
1852
2223
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1853
2224
  ListRow,
1854
2225
  {
@@ -1856,7 +2227,7 @@ function ConnectStep({
1856
2227
  title: row.label,
1857
2228
  subtitle: "Checking balance\u2026",
1858
2229
  disabled: true,
1859
- trailing: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Spinner, { className: "rs-spinner--sm" })
2230
+ trailing: SMALL_SPINNER
1860
2231
  },
1861
2232
  row.id
1862
2233
  );
@@ -1868,7 +2239,7 @@ function ConnectStep({
1868
2239
  leading: row.icon,
1869
2240
  title: row.label,
1870
2241
  subtitle: formatBalanceUsd(row.status.balanceUsd),
1871
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _66 => _66(row.id)])
2242
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _67 => _67(row.id)])
1872
2243
  },
1873
2244
  row.id
1874
2245
  );
@@ -1880,7 +2251,7 @@ function ConnectStep({
1880
2251
  leading: row.icon,
1881
2252
  title: row.label,
1882
2253
  subtitle: row.status.reason,
1883
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _67 => _67(row.id)])
2254
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _68 => _68(row.id)])
1884
2255
  },
1885
2256
  row.id
1886
2257
  );
@@ -1898,6 +2269,15 @@ function ConnectStep({
1898
2269
  })])
1899
2270
  ] })
1900
2271
  ] }),
2272
+ onDisconnect && hasReownWallet && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen-tight-row", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2273
+ "button",
2274
+ {
2275
+ type: "button",
2276
+ className: "rs-connect-wallet-manage",
2277
+ onClick: onDisconnect,
2278
+ children: "Disconnect wallet"
2279
+ }
2280
+ ) }),
1901
2281
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PoweredBy, {})
1902
2282
  ] });
1903
2283
  }
@@ -1905,7 +2285,7 @@ ConnectStep.displayName = "ConnectStep";
1905
2285
 
1906
2286
  // src/components/steps/ProcessingStep.tsx
1907
2287
 
1908
- var _viem = require('viem');
2288
+
1909
2289
 
1910
2290
  // src/components/ui/Button.tsx
1911
2291
 
@@ -1976,15 +2356,15 @@ function Tooltip({ content, children, className }) {
1976
2356
  function handleOutside(event) {
1977
2357
  const target = event.target;
1978
2358
  if (!target) return;
1979
- if (_optionalChain([triggerRef, 'access', _68 => _68.current, 'optionalAccess', _69 => _69.contains, 'call', _70 => _70(target)])) return;
1980
- if (_optionalChain([bubbleRef, 'access', _71 => _71.current, 'optionalAccess', _72 => _72.contains, 'call', _73 => _73(target)])) return;
2359
+ if (_optionalChain([triggerRef, 'access', _69 => _69.current, 'optionalAccess', _70 => _70.contains, 'call', _71 => _71(target)])) return;
2360
+ if (_optionalChain([bubbleRef, 'access', _72 => _72.current, 'optionalAccess', _73 => _73.contains, 'call', _74 => _74(target)])) return;
1981
2361
  setOpen(false);
1982
2362
  }
1983
2363
  function handleKey(event) {
1984
2364
  if (event.key === "Escape") setOpen(false);
1985
2365
  }
1986
2366
  document.addEventListener("mousedown", handleOutside);
1987
- document.addEventListener("touchstart", handleOutside);
2367
+ document.addEventListener("touchstart", handleOutside, { passive: true });
1988
2368
  document.addEventListener("keydown", handleKey);
1989
2369
  window.addEventListener("scroll", updatePosition, true);
1990
2370
  window.addEventListener("resize", updatePosition);
@@ -2044,46 +2424,6 @@ function Tooltip({ content, children, className }) {
2044
2424
  }
2045
2425
  Tooltip.displayName = "Tooltip";
2046
2426
 
2047
- // src/components/ui/Callout.tsx
2048
-
2049
- function CircleAlertIcon() {
2050
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsx.call(void 0,
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__ */ _jsxruntime.jsxs.call(void 0,
2074
- "div",
2075
- {
2076
- className: `rs-callout rs-callout--${variant}`,
2077
- role: _nullishCoalesce(role, () => ( (variant === "error" ? "alert" : "status"))),
2078
- children: [
2079
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-callout-icon", children: variant === "error" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CircleAlertIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertTriangleIcon, {}) }),
2080
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-callout-text", children })
2081
- ]
2082
- }
2083
- );
2084
- }
2085
- Callout.displayName = "Callout";
2086
-
2087
2427
  // src/core/webhook.ts
2088
2428
  function isRecord(value) {
2089
2429
  return typeof value === "object" && value !== null;
@@ -2097,7 +2437,7 @@ function asNumber(value) {
2097
2437
  const trimmed = value.trim();
2098
2438
  if (!trimmed) return void 0;
2099
2439
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
2100
- if (_optionalChain([caipMatch, 'optionalAccess', _74 => _74[1]])) {
2440
+ if (_optionalChain([caipMatch, 'optionalAccess', _75 => _75[1]])) {
2101
2441
  const parsed2 = Number(caipMatch[1]);
2102
2442
  return Number.isFinite(parsed2) ? parsed2 : void 0;
2103
2443
  }
@@ -2116,28 +2456,28 @@ function asAddress(value) {
2116
2456
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
2117
2457
  }
2118
2458
  function getEventTxHash(event) {
2119
- if (!_optionalChain([event, 'optionalAccess', _75 => _75.type])) return void 0;
2459
+ if (!_optionalChain([event, 'optionalAccess', _76 => _76.type])) return void 0;
2120
2460
  if (event.type === "deposit-received") {
2121
- return asString(_optionalChain([event, 'access', _76 => _76.data, 'optionalAccess', _77 => _77.transactionHash]));
2461
+ return asString(_optionalChain([event, 'access', _77 => _77.data, 'optionalAccess', _78 => _78.transactionHash]));
2122
2462
  }
2123
2463
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
2124
- const deposit = isRecord(_optionalChain([event, 'access', _78 => _78.data, 'optionalAccess', _79 => _79.deposit])) ? event.data.deposit : void 0;
2125
- const source = isRecord(_optionalChain([event, 'access', _80 => _80.data, 'optionalAccess', _81 => _81.source])) ? event.data.source : void 0;
2126
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _82 => _82.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _83 => _83.transactionHash]))));
2464
+ const deposit = isRecord(_optionalChain([event, 'access', _79 => _79.data, 'optionalAccess', _80 => _80.deposit])) ? event.data.deposit : void 0;
2465
+ const source = isRecord(_optionalChain([event, 'access', _81 => _81.data, 'optionalAccess', _82 => _82.source])) ? event.data.source : void 0;
2466
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _83 => _83.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _84 => _84.transactionHash]))));
2127
2467
  }
2128
2468
  if (event.type === "bridge-failed" || event.type === "error") {
2129
- const deposit = isRecord(_optionalChain([event, 'access', _84 => _84.data, 'optionalAccess', _85 => _85.deposit])) ? event.data.deposit : void 0;
2130
- const source = isRecord(_optionalChain([event, 'access', _86 => _86.data, 'optionalAccess', _87 => _87.source])) ? event.data.source : void 0;
2131
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _88 => _88.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _89 => _89.transactionHash]))));
2469
+ const deposit = isRecord(_optionalChain([event, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.deposit])) ? event.data.deposit : void 0;
2470
+ const source = isRecord(_optionalChain([event, 'access', _87 => _87.data, 'optionalAccess', _88 => _88.source])) ? event.data.source : void 0;
2471
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _89 => _89.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _90 => _90.transactionHash]))));
2132
2472
  }
2133
2473
  if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
2134
- const deposit = isRecord(_optionalChain([event, 'access', _90 => _90.data, 'optionalAccess', _91 => _91.deposit])) ? event.data.deposit : void 0;
2135
- return asString(_optionalChain([deposit, 'optionalAccess', _92 => _92.transactionHash]));
2474
+ const deposit = isRecord(_optionalChain([event, 'access', _91 => _91.data, 'optionalAccess', _92 => _92.deposit])) ? event.data.deposit : void 0;
2475
+ return asString(_optionalChain([deposit, 'optionalAccess', _93 => _93.transactionHash]));
2136
2476
  }
2137
2477
  return void 0;
2138
2478
  }
2139
2479
  function getEventSourceDetails(event) {
2140
- if (!_optionalChain([event, 'optionalAccess', _93 => _93.type]) || !isRecord(event.data)) return {};
2480
+ if (!_optionalChain([event, 'optionalAccess', _94 => _94.type]) || !isRecord(event.data)) return {};
2141
2481
  if (event.type === "deposit-received") {
2142
2482
  return {
2143
2483
  chainId: asNumber(event.data.chain),
@@ -2149,15 +2489,18 @@ function getEventSourceDetails(event) {
2149
2489
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
2150
2490
  if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
2151
2491
  return {
2152
- chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _94 => _94.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _95 => _95.chain])))),
2153
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _96 => _96.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _97 => _97.amount])))),
2154
- token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _98 => _98.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _99 => _99.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _100 => _100.token]))))
2492
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _95 => _95.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _96 => _96.chain])))),
2493
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _97 => _97.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _98 => _98.amount])))),
2494
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _99 => _99.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _100 => _100.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _101 => _101.token]))))
2155
2495
  };
2156
2496
  }
2157
2497
  return {};
2158
2498
  }
2159
2499
  function isDepositEvent(event) {
2160
- return _optionalChain([event, 'optionalAccess', _101 => _101.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _102 => _102.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _103 => _103.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _104 => _104.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _105 => _105.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _106 => _106.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _107 => _107.type]) === "error";
2500
+ return _optionalChain([event, 'optionalAccess', _102 => _102.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _103 => _103.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _104 => _104.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _105 => _105.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _106 => _106.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _107 => _107.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _108 => _108.type]) === "error";
2501
+ }
2502
+ function isFailedEvent(event) {
2503
+ return _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "error";
2161
2504
  }
2162
2505
  function isHexString(value) {
2163
2506
  return value.startsWith("0x") || value.startsWith("0X");
@@ -2168,6 +2511,41 @@ function txRefsMatch(a, b) {
2168
2511
  }
2169
2512
  return a === b;
2170
2513
  }
2514
+ function formatBridgeFailedMessage(event) {
2515
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _112 => _112.data]), () => ( {}));
2516
+ const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
2517
+ const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
2518
+ function toUserFacingFailure(raw) {
2519
+ const lower = raw.toLowerCase();
2520
+ if (lower.includes("insufficient funds")) {
2521
+ return "Deposit was received, but processing could not continue due to insufficient funds. Please retry.";
2522
+ }
2523
+ if (lower.includes("no valid quote available")) {
2524
+ return "No bridge route is currently available for this transfer. Please try again shortly.";
2525
+ }
2526
+ if (lower.includes("simulation failed")) {
2527
+ return "Transfer processing failed during simulation. Please retry.";
2528
+ }
2529
+ if (raw.length > 220) {
2530
+ return "Transfer processing failed. Please retry.";
2531
+ }
2532
+ return raw;
2533
+ }
2534
+ if (backendMessage.length > 0) {
2535
+ return { message: toUserFacingFailure(backendMessage), code };
2536
+ }
2537
+ if (code) {
2538
+ return { message: `Bridge failed (${code})`, code };
2539
+ }
2540
+ return { message: "Bridge failed" };
2541
+ }
2542
+ function failureMessageForEvent(event) {
2543
+ if (_optionalChain([event, 'optionalAccess', _113 => _113.type]) === "error") {
2544
+ const message = isRecord(event.data) ? asString(event.data.message) : void 0;
2545
+ return _nullishCoalesce(message, () => ( "Unknown error"));
2546
+ }
2547
+ return formatBridgeFailedMessage(event).message;
2548
+ }
2171
2549
 
2172
2550
  // src/components/steps/ProcessingStep.tsx
2173
2551
 
@@ -2241,6 +2619,47 @@ var SOFT_DELAY_MS = {
2241
2619
  bridging: 4 * 60 * 1e3
2242
2620
  };
2243
2621
  var PHASE_TIMINGS_PREFIX = "rhinestone:phase-timings";
2622
+ var STABLECOIN_SYMBOLS = /* @__PURE__ */ new Set([
2623
+ "USDC",
2624
+ "USDT",
2625
+ "DAI",
2626
+ "FRAX",
2627
+ "PYUSD",
2628
+ "USDP",
2629
+ "TUSD",
2630
+ "GUSD",
2631
+ "USDS",
2632
+ "LUSD",
2633
+ "BUSD",
2634
+ "USDE"
2635
+ ]);
2636
+ function maxFractionDigitsFor(symbol) {
2637
+ if (!symbol) return 6;
2638
+ return STABLECOIN_SYMBOLS.has(symbol.toUpperCase()) ? 3 : 6;
2639
+ }
2640
+ var PAYMENT_METHOD_LABELS = {
2641
+ creditcard: "Card",
2642
+ debitcard: "Card",
2643
+ card: "Card",
2644
+ "apple-pay": "Apple Pay",
2645
+ applepay: "Apple Pay",
2646
+ "google-pay": "Google Pay",
2647
+ googlepay: "Google Pay",
2648
+ "bank-transfer": "Bank Transfer",
2649
+ banktransfer: "Bank Transfer",
2650
+ sepa: "SEPA",
2651
+ "open-banking": "Open Banking",
2652
+ "krak-pay": "Kraken Pay",
2653
+ krakpay: "Kraken Pay",
2654
+ kraken: "Kraken",
2655
+ coinbase: "Coinbase",
2656
+ binance: "Binance"
2657
+ };
2658
+ function formatPaymentMethod(method) {
2659
+ const key = method.trim().toLowerCase();
2660
+ if (PAYMENT_METHOD_LABELS[key]) return PAYMENT_METHOD_LABELS[key];
2661
+ return key.replace(/[-_]+/g, " ").split(" ").filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
2662
+ }
2244
2663
  function loadPhaseTimings(txHash) {
2245
2664
  if (typeof window === "undefined") return null;
2246
2665
  try {
@@ -2249,7 +2668,7 @@ function loadPhaseTimings(txHash) {
2249
2668
  const parsed = JSON.parse(raw);
2250
2669
  if (typeof parsed.startedAt !== "number") return null;
2251
2670
  return parsed;
2252
- } catch (e3) {
2671
+ } catch (e4) {
2253
2672
  return null;
2254
2673
  }
2255
2674
  }
@@ -2260,7 +2679,7 @@ function savePhaseTimings(txHash, timings) {
2260
2679
  `${PHASE_TIMINGS_PREFIX}:${txHash}`,
2261
2680
  JSON.stringify(timings)
2262
2681
  );
2263
- } catch (e4) {
2682
+ } catch (e5) {
2264
2683
  }
2265
2684
  }
2266
2685
  function isEventForTx(event, txHash) {
@@ -2268,45 +2687,13 @@ function isEventForTx(event, txHash) {
2268
2687
  if (!eventTxHash) return false;
2269
2688
  return txRefsMatch(eventTxHash, txHash);
2270
2689
  }
2271
- function formatBridgeFailedMessage(event) {
2272
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _108 => _108.data]), () => ( {}));
2273
- const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
2274
- const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
2275
- function toUserFacingFailure(raw) {
2276
- const lower = raw.toLowerCase();
2277
- if (lower.includes("insufficient funds")) {
2278
- return "Deposit was received, but processing could not continue due to insufficient funds. Please retry.";
2279
- }
2280
- if (lower.includes("no valid quote available")) {
2281
- return "No bridge route is currently available for this transfer. Please try again shortly.";
2282
- }
2283
- if (lower.includes("simulation failed")) {
2284
- return "Transfer processing failed during simulation. Please retry.";
2285
- }
2286
- if (raw.length > 220) {
2287
- return "Transfer processing failed. Please retry.";
2288
- }
2289
- return raw;
2290
- }
2291
- if (backendMessage.length > 0) {
2292
- const userMessage = toUserFacingFailure(backendMessage);
2293
- return {
2294
- message: userMessage,
2295
- code
2296
- };
2297
- }
2298
- if (code) {
2299
- return { message: `Bridge failed (${code})`, code };
2300
- }
2301
- return { message: "Bridge failed" };
2302
- }
2303
2690
  function parseWebhookTimestamp(event) {
2304
- if (typeof _optionalChain([event, 'optionalAccess', _109 => _109.time]) !== "string") return void 0;
2691
+ if (typeof _optionalChain([event, 'optionalAccess', _114 => _114.time]) !== "string") return void 0;
2305
2692
  const timestamp = Date.parse(event.time);
2306
2693
  return Number.isFinite(timestamp) ? timestamp : void 0;
2307
2694
  }
2308
2695
  function syncPhaseTimings(previous, event) {
2309
- if (!_optionalChain([event, 'optionalAccess', _110 => _110.type])) return previous;
2696
+ if (!_optionalChain([event, 'optionalAccess', _115 => _115.type])) return previous;
2310
2697
  const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
2311
2698
  const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed" || event.type === "error") && previous.receivedAt === void 0;
2312
2699
  const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
@@ -2319,11 +2706,35 @@ function syncPhaseTimings(previous, event) {
2319
2706
  ...setCompleted && { completedAt: timestamp }
2320
2707
  };
2321
2708
  }
2322
- function formatElapsedTime(seconds) {
2323
- if (seconds < 60) return `${seconds} second${seconds !== 1 ? "s" : ""}`;
2324
- const mins = Math.floor(seconds / 60);
2325
- const secs = seconds % 60;
2326
- return `${mins}m ${secs}s`;
2709
+ function formatTimer(seconds) {
2710
+ const safe = Math.max(0, seconds);
2711
+ const mins = Math.floor(safe / 60);
2712
+ const secs = safe % 60;
2713
+ return `${mins}:${String(secs).padStart(2, "0")}`;
2714
+ }
2715
+ function TickerChar({ value }) {
2716
+ const [current, setCurrent] = _react.useState.call(void 0, value);
2717
+ const [previous, setPrevious] = _react.useState.call(void 0, null);
2718
+ const [animKey, setAnimKey] = _react.useState.call(void 0, 0);
2719
+ _react.useEffect.call(void 0, () => {
2720
+ if (value === current) return;
2721
+ setPrevious(current);
2722
+ setCurrent(value);
2723
+ setAnimKey((k) => k + 1);
2724
+ const timeout = setTimeout(() => setPrevious(null), 360);
2725
+ return () => clearTimeout(timeout);
2726
+ }, [value, current]);
2727
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-ticker-slot", children: [
2728
+ previous !== null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-ticker-out", children: previous }, `out-${animKey}`),
2729
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-ticker-in", children: current }, `in-${animKey}`)
2730
+ ] });
2731
+ }
2732
+ function Ticker({ value }) {
2733
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-ticker", "aria-label": value, children: value.split("").map((char, index) => (
2734
+ // Position-stable key so each slot keeps its own animation state.
2735
+ // eslint-disable-next-line react/no-array-index-key
2736
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TickerChar, { value: char }, index)
2737
+ )) });
2327
2738
  }
2328
2739
  function getPhaseStartTime(phaseId, phaseTimings) {
2329
2740
  if (phaseId === "confirming") return phaseTimings.startedAt;
@@ -2337,19 +2748,16 @@ function getFailedPhaseId(phaseTimings) {
2337
2748
  if (phaseTimings.receivedAt !== void 0) return "received";
2338
2749
  return "confirming";
2339
2750
  }
2340
- function getCurrentPhaseId(state, phaseTimings, isEarlyComplete) {
2751
+ function getCurrentPhaseId(state, phaseTimings) {
2341
2752
  if (state.type === "failed") {
2342
2753
  return getFailedPhaseId(phaseTimings);
2343
2754
  }
2344
- if (isEarlyComplete) {
2345
- return "bridging";
2346
- }
2347
2755
  if (state.type === "complete") {
2348
2756
  return void 0;
2349
2757
  }
2350
- if (_optionalChain([state, 'access', _111 => _111.lastEvent, 'optionalAccess', _112 => _112.type]) === "bridge-started" || _optionalChain([state, 'access', _113 => _113.lastEvent, 'optionalAccess', _114 => _114.type]) === "bridge-complete")
2758
+ if (_optionalChain([state, 'access', _116 => _116.lastEvent, 'optionalAccess', _117 => _117.type]) === "bridge-started" || _optionalChain([state, 'access', _118 => _118.lastEvent, 'optionalAccess', _119 => _119.type]) === "bridge-complete")
2351
2759
  return "bridging";
2352
- if (_optionalChain([state, 'access', _115 => _115.lastEvent, 'optionalAccess', _116 => _116.type]) === "deposit-received") return "received";
2760
+ if (_optionalChain([state, 'access', _120 => _120.lastEvent, 'optionalAccess', _121 => _121.type]) === "deposit-received") return "received";
2353
2761
  return "confirming";
2354
2762
  }
2355
2763
  function ProcessingStep({
@@ -2362,7 +2770,7 @@ function ProcessingStep({
2362
2770
  amount,
2363
2771
  sourceSymbol: providedSourceSymbol,
2364
2772
  sourceDecimals: providedSourceDecimals,
2365
- waitForFinalTx,
2773
+ amountUsd,
2366
2774
  hasPostBridgeActions,
2367
2775
  service,
2368
2776
  directTransfer,
@@ -2370,10 +2778,10 @@ function ProcessingStep({
2370
2778
  debug,
2371
2779
  targetToken,
2372
2780
  uiConfig,
2373
- estimatedTime = "< 1 min",
2374
- quotedFeeAmount = "0.1",
2781
+ quotedFeeAmount,
2375
2782
  quotedFeeSymbol,
2376
2783
  balanceAfterUsd,
2784
+ isSwappedOrder,
2377
2785
  onClose,
2378
2786
  onNewDeposit,
2379
2787
  onRetry,
@@ -2389,9 +2797,10 @@ function ProcessingStep({
2389
2797
  amount,
2390
2798
  sourceChain,
2391
2799
  sourceToken,
2800
+ sourceDecimals: providedSourceDecimals,
2801
+ amountUsd,
2392
2802
  targetChain,
2393
2803
  targetToken,
2394
- waitForFinalTx,
2395
2804
  hasPostBridgeActions
2396
2805
  });
2397
2806
  const onDepositCompleteRef = useLatestRef(onDepositComplete);
@@ -2410,23 +2819,35 @@ function ProcessingStep({
2410
2819
  return { startedAt: startTimeRef.current };
2411
2820
  });
2412
2821
  const [hasEscalatedDelay, setHasEscalatedDelay] = _react.useState.call(void 0, false);
2822
+ const updatePhaseTimings = _react.useCallback.call(void 0,
2823
+ (updater) => {
2824
+ setPhaseTimings((previous) => {
2825
+ const next = updater(previous);
2826
+ savePhaseTimings(txHash, next);
2827
+ return next;
2828
+ });
2829
+ },
2830
+ [txHash]
2831
+ );
2413
2832
  _react.useEffect.call(void 0, () => {
2414
2833
  if (!directTransfer) return;
2415
2834
  const completedAt = Date.now();
2416
- setPhaseTimings({
2835
+ updatePhaseTimings(() => ({
2417
2836
  startedAt: startTimeRef.current,
2418
2837
  completedAt,
2419
2838
  endedAt: completedAt
2420
- });
2839
+ }));
2421
2840
  debugLog(debug, "processing", "direct-transfer:complete", {
2422
2841
  txHash,
2423
2842
  flowLabel
2424
2843
  });
2425
2844
  const context = processingContextRef.current;
2426
- _optionalChain([onDepositCompleteRef, 'access', _117 => _117.current, 'optionalCall', _118 => _118(txHash, void 0, {
2845
+ _optionalChain([onDepositCompleteRef, 'access', _122 => _122.current, 'optionalCall', _123 => _123(txHash, void 0, {
2427
2846
  amount: context.amount,
2428
2847
  sourceChain: context.sourceChain,
2429
2848
  sourceToken: context.sourceToken,
2849
+ sourceDecimals: context.sourceDecimals,
2850
+ amountUsd: context.amountUsd,
2430
2851
  targetChain: context.targetChain,
2431
2852
  targetToken: context.targetToken
2432
2853
  })]);
@@ -2436,7 +2857,8 @@ function ProcessingStep({
2436
2857
  flowLabel,
2437
2858
  onDepositCompleteRef,
2438
2859
  processingContextRef,
2439
- txHash
2860
+ txHash,
2861
+ updatePhaseTimings
2440
2862
  ]);
2441
2863
  _react.useEffect.call(void 0, () => {
2442
2864
  if (directTransfer || state.type !== "processing") return;
@@ -2453,17 +2875,38 @@ function ProcessingStep({
2453
2875
  if (state.type === "processing") return;
2454
2876
  const endedAt = state.type === "complete" ? _nullishCoalesce(phaseTimings.completedAt, () => ( Date.now())) : Date.now();
2455
2877
  setElapsedSeconds(Math.floor((endedAt - startTimeRef.current) / 1e3));
2456
- setPhaseTimings(
2878
+ updatePhaseTimings(
2457
2879
  (previous) => previous.endedAt !== void 0 ? previous : { ...previous, endedAt }
2458
2880
  );
2459
- }, [phaseTimings.completedAt, state.type]);
2881
+ }, [phaseTimings.completedAt, state.type, updatePhaseTimings]);
2460
2882
  _react.useEffect.call(void 0, () => {
2461
2883
  if (!state.lastEvent) return;
2462
- setPhaseTimings((previous) => syncPhaseTimings(previous, state.lastEvent));
2463
- }, [_optionalChain([state, 'access', _119 => _119.lastEvent, 'optionalAccess', _120 => _120.time]), _optionalChain([state, 'access', _121 => _121.lastEvent, 'optionalAccess', _122 => _122.type])]);
2884
+ updatePhaseTimings(
2885
+ (previous) => syncPhaseTimings(previous, state.lastEvent)
2886
+ );
2887
+ }, [_optionalChain([state, 'access', _124 => _124.lastEvent, 'optionalAccess', _125 => _125.time]), _optionalChain([state, 'access', _126 => _126.lastEvent, 'optionalAccess', _127 => _127.type]), updatePhaseTimings]);
2888
+ const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
2464
2889
  _react.useEffect.call(void 0, () => {
2465
- savePhaseTimings(txHash, phaseTimings);
2466
- }, [txHash, phaseTimings]);
2890
+ let cancelled = false;
2891
+ service.fetchSwappedOrderStatus(smartAccount).then((res) => {
2892
+ if (cancelled || !res) return;
2893
+ if (res.transactionId != null) {
2894
+ if (res.transactionId.toLowerCase() !== txHash.toLowerCase()) return;
2895
+ } else if (!isSwappedOrder) {
2896
+ return;
2897
+ }
2898
+ setSwappedFiatContext({
2899
+ paidAmountUsd: res.paidAmountUsd,
2900
+ paidAmountEur: res.paidAmountEur,
2901
+ onrampFeeUsd: res.onrampFeeUsd,
2902
+ paymentMethod: res.paymentMethod
2903
+ });
2904
+ }).catch(() => {
2905
+ });
2906
+ return () => {
2907
+ cancelled = true;
2908
+ };
2909
+ }, [service, smartAccount, txHash, isSwappedOrder]);
2467
2910
  _react.useEffect.call(void 0, () => {
2468
2911
  if (directTransfer) return;
2469
2912
  if (state.type !== "processing") {
@@ -2488,30 +2931,32 @@ function ProcessingStep({
2488
2931
  debugLog(debug, "processing", "poll:event", {
2489
2932
  type: lastEvent2.type,
2490
2933
  matchesTx: eventMatchesTx,
2491
- intentId: _optionalChain([eventData, 'optionalAccess', _123 => _123.intentId])
2934
+ intentId: _optionalChain([eventData, 'optionalAccess', _128 => _128.intentId])
2492
2935
  });
2493
2936
  }
2494
2937
  if (!isMounted) return;
2495
- const awaitingPostBridgeSwap = processingContextRef.current.waitForFinalTx && processingContextRef.current.hasPostBridgeActions;
2496
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _124 => _124.type]) === "post-bridge-swap-complete") {
2938
+ const awaitingPostBridgeSwap = processingContextRef.current.hasPostBridgeActions;
2939
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _129 => _129.type]) === "post-bridge-swap-complete") {
2497
2940
  setState({ type: "complete", lastEvent: eventForCurrentTx });
2498
- const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _125 => _125.data, 'optionalAccess', _126 => _126.swap, 'optionalAccess', _127 => _127.transactionHash]);
2941
+ const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _130 => _130.data, 'optionalAccess', _131 => _131.swap, 'optionalAccess', _132 => _132.transactionHash]);
2499
2942
  debugLog(debug, "processing", "state:complete", {
2500
2943
  txHash,
2501
2944
  destinationTxHash: swapTxHash,
2502
2945
  event: eventForCurrentTx.type
2503
2946
  });
2504
2947
  const context = processingContextRef.current;
2505
- _optionalChain([onDepositCompleteRef, 'access', _128 => _128.current, 'optionalCall', _129 => _129(txHash, swapTxHash, {
2948
+ _optionalChain([onDepositCompleteRef, 'access', _133 => _133.current, 'optionalCall', _134 => _134(txHash, swapTxHash, {
2506
2949
  amount: context.amount,
2507
2950
  sourceChain: context.sourceChain,
2508
2951
  sourceToken: context.sourceToken,
2952
+ sourceDecimals: context.sourceDecimals,
2953
+ amountUsd: context.amountUsd,
2509
2954
  targetChain: context.targetChain,
2510
2955
  targetToken: context.targetToken
2511
2956
  })]);
2512
2957
  return;
2513
2958
  }
2514
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _130 => _130.type]) === "post-bridge-swap-failed") {
2959
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _135 => _135.type]) === "post-bridge-swap-failed") {
2515
2960
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
2516
2961
  setState({
2517
2962
  type: "failed",
@@ -2523,44 +2968,30 @@ function ProcessingStep({
2523
2968
  message: formatted.message,
2524
2969
  code: formatted.code
2525
2970
  });
2526
- _optionalChain([onDepositFailedRef, 'access', _131 => _131.current, 'optionalCall', _132 => _132(txHash, formatted.message)]);
2971
+ _optionalChain([onDepositFailedRef, 'access', _136 => _136.current, 'optionalCall', _137 => _137(txHash, formatted.message)]);
2527
2972
  return;
2528
2973
  }
2529
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _133 => _133.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
2974
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _138 => _138.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
2530
2975
  setState({ type: "complete", lastEvent: eventForCurrentTx });
2531
- const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _134 => _134.data, 'optionalAccess', _135 => _135.destination, 'optionalAccess', _136 => _136.transactionHash]);
2976
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _139 => _139.data, 'optionalAccess', _140 => _140.destination, 'optionalAccess', _141 => _141.transactionHash]);
2532
2977
  debugLog(debug, "processing", "state:complete", {
2533
2978
  txHash,
2534
2979
  destinationTxHash: destinationTxHash2,
2535
2980
  event: eventForCurrentTx.type
2536
2981
  });
2537
2982
  const context = processingContextRef.current;
2538
- _optionalChain([onDepositCompleteRef, 'access', _137 => _137.current, 'optionalCall', _138 => _138(txHash, destinationTxHash2, {
2983
+ _optionalChain([onDepositCompleteRef, 'access', _142 => _142.current, 'optionalCall', _143 => _143(txHash, destinationTxHash2, {
2539
2984
  amount: context.amount,
2540
2985
  sourceChain: context.sourceChain,
2541
2986
  sourceToken: context.sourceToken,
2987
+ sourceDecimals: context.sourceDecimals,
2988
+ amountUsd: context.amountUsd,
2542
2989
  targetChain: context.targetChain,
2543
2990
  targetToken: context.targetToken
2544
2991
  })]);
2545
2992
  return;
2546
2993
  }
2547
- if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess', _139 => _139.type]) === "bridge-started") {
2548
- setState({ type: "complete", lastEvent: eventForCurrentTx });
2549
- debugLog(debug, "processing", "state:early-complete", {
2550
- txHash,
2551
- event: eventForCurrentTx.type
2552
- });
2553
- const context = processingContextRef.current;
2554
- _optionalChain([onDepositCompleteRef, 'access', _140 => _140.current, 'optionalCall', _141 => _141(txHash, void 0, {
2555
- amount: context.amount,
2556
- sourceChain: context.sourceChain,
2557
- sourceToken: context.sourceToken,
2558
- targetChain: context.targetChain,
2559
- targetToken: context.targetToken
2560
- })]);
2561
- return;
2562
- }
2563
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _142 => _142.type]) === "bridge-failed") {
2994
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _144 => _144.type]) === "bridge-failed") {
2564
2995
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
2565
2996
  setState({
2566
2997
  type: "failed",
@@ -2572,11 +3003,11 @@ function ProcessingStep({
2572
3003
  message: formatted.message,
2573
3004
  code: formatted.code
2574
3005
  });
2575
- _optionalChain([onDepositFailedRef, 'access', _143 => _143.current, 'optionalCall', _144 => _144(txHash, formatted.message)]);
3006
+ _optionalChain([onDepositFailedRef, 'access', _145 => _145.current, 'optionalCall', _146 => _146(txHash, formatted.message)]);
2576
3007
  return;
2577
3008
  }
2578
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _145 => _145.type]) === "error") {
2579
- const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _146 => _146.data, 'optionalAccess', _147 => _147.message]), () => ( "Unknown error"));
3009
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _147 => _147.type]) === "error") {
3010
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _148 => _148.data, 'optionalAccess', _149 => _149.message]), () => ( "Unknown error"));
2580
3011
  setState({
2581
3012
  type: "failed",
2582
3013
  message: errorMessage,
@@ -2586,7 +3017,7 @@ function ProcessingStep({
2586
3017
  txHash,
2587
3018
  message: errorMessage
2588
3019
  });
2589
- _optionalChain([onDepositFailedRef, 'access', _148 => _148.current, 'optionalCall', _149 => _149(txHash, errorMessage)]);
3020
+ _optionalChain([onDepositFailedRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(txHash, errorMessage)]);
2590
3021
  return;
2591
3022
  }
2592
3023
  setState((previous) => ({
@@ -2647,7 +3078,7 @@ function ProcessingStep({
2647
3078
  txHash,
2648
3079
  timeoutMs: ESCALATED_DELAY_MS
2649
3080
  });
2650
- _optionalChain([onErrorRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(message, "PROCESS_TIMEOUT")]);
3081
+ _optionalChain([onErrorRef, 'access', _152 => _152.current, 'optionalCall', _153 => _153(message, "PROCESS_TIMEOUT")]);
2651
3082
  }, ESCALATED_DELAY_MS);
2652
3083
  return () => clearTimeout(timeoutId);
2653
3084
  }, [debug, directTransfer, onErrorRef, state.type, txHash]);
@@ -2656,55 +3087,102 @@ function ProcessingStep({
2656
3087
  const isProcessing = state.type === "processing";
2657
3088
  const lastEvent = state.lastEvent;
2658
3089
  const failureMessage = state.type === "failed" ? state.message : void 0;
2659
- const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess', _152 => _152.type]) === "bridge-started";
2660
3090
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
2661
3091
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
2662
3092
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
2663
- const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _153 => _153.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _154 => _154.type]) === "post-bridge-swap-failed";
2664
- const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _155 => _155.data, 'optionalAccess', _156 => _156.swap, 'optionalAccess', _157 => _157.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _158 => _158.data, 'optionalAccess', _159 => _159.destination, 'optionalAccess', _160 => _160.transactionHash]) || null;
3093
+ const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _154 => _154.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _155 => _155.type]) === "post-bridge-swap-failed";
3094
+ const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _156 => _156.data, 'optionalAccess', _157 => _157.swap, 'optionalAccess', _158 => _158.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _159 => _159.data, 'optionalAccess', _160 => _160.destination, 'optionalAccess', _161 => _161.transactionHash]) || null;
2665
3095
  const sourceDetails = getEventSourceDetails(lastEvent);
2666
3096
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
2667
3097
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
2668
3098
  const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
2669
- const sourceExplorerUrl = _chunk7JIDIX27cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
2670
- const destExplorerUrl = destinationTxHash ? _chunk7JIDIX27cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
3099
+ const sourceExplorerUrl = _chunkMILJQWPTcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
3100
+ const destExplorerUrl = destinationTxHash ? _chunkMILJQWPTcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
2671
3101
  const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
2672
- const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
2673
- const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0,
3102
+ const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkMILJQWPTcjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
3103
+ const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkMILJQWPTcjs.getTokenDecimalsByAddress.call(void 0,
2674
3104
  displaySourceToken,
2675
3105
  displaySourceChain
2676
3106
  ) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
3107
+ const amountMaxDigits = maxFractionDigitsFor(sourceSymbol);
2677
3108
  const formattedReceivedAmount = (() => {
2678
3109
  try {
2679
3110
  const raw = _viem.formatUnits.call(void 0, BigInt(displayAmount), sourceDecimals);
2680
3111
  const numeric = Number(raw);
2681
3112
  if (!Number.isFinite(numeric)) return raw;
2682
- return numeric.toLocaleString("en-US", { maximumFractionDigits: 6 });
2683
- } catch (e5) {
3113
+ return numeric.toLocaleString("en-US", {
3114
+ minimumFractionDigits: 2,
3115
+ maximumFractionDigits: amountMaxDigits
3116
+ });
3117
+ } catch (e6) {
2684
3118
  return Number(displayAmount).toLocaleString("en-US", {
2685
- maximumFractionDigits: 6
3119
+ minimumFractionDigits: 2,
3120
+ maximumFractionDigits: amountMaxDigits
2686
3121
  });
2687
3122
  }
2688
3123
  })();
2689
- const currentPhaseId = getCurrentPhaseId(state, phaseTimings, isEarlyComplete);
3124
+ const destinationAmountRaw = (() => {
3125
+ const dest = _optionalChain([lastEvent, 'optionalAccess', _162 => _162.data, 'optionalAccess', _163 => _163.destination]);
3126
+ if (!dest || dest.amount === void 0) return void 0;
3127
+ try {
3128
+ return BigInt(dest.amount);
3129
+ } catch (e7) {
3130
+ return void 0;
3131
+ }
3132
+ })();
3133
+ const sourceAmountRaw = (() => {
3134
+ try {
3135
+ return BigInt(displayAmount);
3136
+ } catch (e8) {
3137
+ return void 0;
3138
+ }
3139
+ })();
3140
+ const bridgingCostRaw = sourceAmountRaw !== void 0 && destinationAmountRaw !== void 0 && sourceAmountRaw > destinationAmountRaw ? sourceAmountRaw - destinationAmountRaw : void 0;
3141
+ const formattedDestinationAmount = destinationAmountRaw !== void 0 ? (() => {
3142
+ try {
3143
+ const raw = _viem.formatUnits.call(void 0, destinationAmountRaw, sourceDecimals);
3144
+ const numeric = Number(raw);
3145
+ if (!Number.isFinite(numeric)) return raw;
3146
+ return numeric.toLocaleString("en-US", {
3147
+ minimumFractionDigits: 2,
3148
+ maximumFractionDigits: amountMaxDigits
3149
+ });
3150
+ } catch (e9) {
3151
+ return void 0;
3152
+ }
3153
+ })() : void 0;
3154
+ const formattedBridgingCost = bridgingCostRaw !== void 0 ? (() => {
3155
+ try {
3156
+ const raw = _viem.formatUnits.call(void 0, bridgingCostRaw, sourceDecimals);
3157
+ const numeric = Number(raw);
3158
+ if (!Number.isFinite(numeric)) return raw;
3159
+ return numeric.toLocaleString("en-US", {
3160
+ minimumFractionDigits: 2,
3161
+ maximumFractionDigits: amountMaxDigits
3162
+ });
3163
+ } catch (e10) {
3164
+ return void 0;
3165
+ }
3166
+ })() : void 0;
3167
+ const currentPhaseId = getCurrentPhaseId(state, phaseTimings);
2690
3168
  const activePhaseStartedAt = currentPhaseId ? getPhaseStartTime(currentPhaseId, phaseTimings) : void 0;
2691
3169
  const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
2692
3170
  const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
2693
3171
  void delayPhaseId;
2694
3172
  void hasEscalatedDelay;
2695
3173
  const targetSymbol = (() => {
2696
- const resolved = _chunk7JIDIX27cjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
3174
+ const resolved = _chunkMILJQWPTcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
2697
3175
  return resolved !== "Token" ? resolved : _nullishCoalesce(providedSourceSymbol, () => ( "USDC"));
2698
3176
  })();
2699
- const targetTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, targetSymbol);
2700
- const sourceChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, displaySourceChain);
2701
- const targetChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, targetChain);
2702
- const sourceTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, sourceSymbol);
2703
- const sourceChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, displaySourceChain);
2704
- const targetChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, targetChain);
2705
- const totalTimeText = formatElapsedTime(elapsedSeconds);
2706
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _161 => _161.feeSponsored]), () => ( false));
2707
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _162 => _162.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3177
+ const targetTokenIcon = _chunkMILJQWPTcjs.getTokenIcon.call(void 0, targetSymbol);
3178
+ const sourceChainIcon = _chunkMILJQWPTcjs.getChainIcon.call(void 0, displaySourceChain);
3179
+ const targetChainIcon = _chunkMILJQWPTcjs.getChainIcon.call(void 0, targetChain);
3180
+ const sourceTokenIcon = _chunkMILJQWPTcjs.getTokenIcon.call(void 0, sourceSymbol);
3181
+ const sourceChainName = _chunkMILJQWPTcjs.getChainName.call(void 0, displaySourceChain);
3182
+ const targetChainName = _chunkMILJQWPTcjs.getChainName.call(void 0, targetChain);
3183
+ const timerText = formatTimer(elapsedSeconds);
3184
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _164 => _164.feeSponsored]), () => ( false));
3185
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _165 => _165.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
2708
3186
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
2709
3187
  const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
2710
3188
  const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
@@ -2723,7 +3201,7 @@ function ProcessingStep({
2723
3201
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
2724
3202
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
2725
3203
  sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: sourceChainIcon, alt: "" }) }),
2726
- sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3204
+ isSwappedOrder && sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2727
3205
  "a",
2728
3206
  {
2729
3207
  href: sourceExplorerUrl,
@@ -2741,7 +3219,7 @@ function ProcessingStep({
2741
3219
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
2742
3220
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
2743
3221
  targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: targetChainIcon, alt: "" }) }),
2744
- destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3222
+ isSwappedOrder && destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2745
3223
  "a",
2746
3224
  {
2747
3225
  href: destExplorerUrl,
@@ -2755,11 +3233,42 @@ function ProcessingStep({
2755
3233
  ] })
2756
3234
  ] }),
2757
3235
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
2758
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Estimated time" : "Total time" }),
2759
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: isProcessing ? estimatedTime : totalTimeText })
3236
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Time elapsed" : "Total time" }),
3237
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
2760
3238
  ] }),
2761
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
2762
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You send" }),
3239
+ isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3240
+ _optionalChain([swappedFiatContext, 'optionalAccess', _166 => _166.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3241
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
3242
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3243
+ "$",
3244
+ swappedFiatContext.paidAmountUsd.toFixed(2),
3245
+ swappedFiatContext.paymentMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "#71717b", marginLeft: 6 }, children: [
3246
+ "via",
3247
+ " ",
3248
+ formatPaymentMethod(swappedFiatContext.paymentMethod)
3249
+ ] })
3250
+ ] })
3251
+ ] }),
3252
+ _optionalChain([swappedFiatContext, 'optionalAccess', _167 => _167.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3253
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
3254
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3255
+ "$",
3256
+ swappedFiatContext.onrampFeeUsd.toFixed(2)
3257
+ ] })
3258
+ ] }),
3259
+ formattedBridgingCost && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3260
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Bridging cost" }),
3261
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3262
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
3263
+ formattedBridgingCost,
3264
+ " ",
3265
+ sourceSymbol
3266
+ ] }),
3267
+ sourceTokenIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: sourceTokenIcon, alt: "" }) })
3268
+ ] })
3269
+ ] })
3270
+ ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3271
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "You send" : "You sent" }),
2763
3272
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
2764
3273
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
2765
3274
  formattedReceivedAmount,
@@ -2770,14 +3279,9 @@ function ProcessingStep({
2770
3279
  ] })
2771
3280
  ] }),
2772
3281
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
2773
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
3282
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
2774
3283
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
2775
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
2776
- "~",
2777
- formattedReceivedAmount,
2778
- " ",
2779
- targetSymbol
2780
- ] }),
3284
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: formattedDestinationAmount ? `${formattedDestinationAmount} ${targetSymbol}` : `~${formattedReceivedAmount} ${targetSymbol}` }),
2781
3285
  targetTokenIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "img", { src: targetTokenIcon, alt: "" }) })
2782
3286
  ] })
2783
3287
  ] }),
@@ -2788,19 +3292,57 @@ function ProcessingStep({
2788
3292
  balanceAfterUsd.toFixed(2)
2789
3293
  ] })
2790
3294
  ] }),
2791
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3295
+ isSwappedOrder ? quotedFeeAmount !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
2792
3296
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
2793
3297
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
2794
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3298
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2795
3299
  "span",
2796
3300
  {
2797
3301
  style: feeSponsored ? { textDecoration: "line-through" } : void 0,
2798
- children: "$0.04"
3302
+ children: [
3303
+ quotedFeeAmount,
3304
+ " ",
3305
+ _nullishCoalesce(quotedFeeSymbol, () => ( sourceSymbol))
3306
+ ]
2799
3307
  }
2800
3308
  ),
2801
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoIcon, {}) }) })
3309
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3310
+ "span",
3311
+ {
3312
+ className: "rs-review-detail-info",
3313
+ "aria-label": "Fee info",
3314
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoIcon, {})
3315
+ }
3316
+ ) })
2802
3317
  ] })
2803
- ] })
3318
+ ] }) : (() => {
3319
+ const feeValue = _nullishCoalesce(quotedFeeAmount, () => ( formattedBridgingCost));
3320
+ if (feeValue === void 0) return null;
3321
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3322
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
3323
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3324
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3325
+ "span",
3326
+ {
3327
+ style: feeSponsored ? { textDecoration: "line-through" } : void 0,
3328
+ children: [
3329
+ feeValue,
3330
+ " ",
3331
+ _nullishCoalesce(quotedFeeSymbol, () => ( sourceSymbol))
3332
+ ]
3333
+ }
3334
+ ),
3335
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3336
+ "span",
3337
+ {
3338
+ className: "rs-review-detail-info",
3339
+ "aria-label": "Fee info",
3340
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoIcon, {})
3341
+ }
3342
+ ) })
3343
+ ] })
3344
+ ] });
3345
+ })()
2804
3346
  ] }),
2805
3347
  isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Callout, { variant: "error", children: failureMessage }),
2806
3348
  isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2809,8 +3351,8 @@ function ProcessingStep({
2809
3351
  fullWidth: true,
2810
3352
  disabled: true,
2811
3353
  loading: true,
2812
- loadingText: "Submitting transaction...",
2813
- children: "Submitting transaction..."
3354
+ loadingText: "Submitting transaction\u2026",
3355
+ children: "Submitting transaction\u2026"
2814
3356
  }
2815
3357
  ),
2816
3358
  isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
@@ -2907,7 +3449,7 @@ async function executeSafeEthTransfer(params) {
2907
3449
  throw new Error("Wallet not connected");
2908
3450
  }
2909
3451
  if (chain.id !== chainId) {
2910
- throw new Error(`Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} to sign`);
3452
+ throw new Error(`Switch to ${_chunkMILJQWPTcjs.getChainName.call(void 0, chainId)} to sign`);
2911
3453
  }
2912
3454
  const isOwner = await publicClient.readContract({
2913
3455
  address: safeAddress,
@@ -2990,7 +3532,7 @@ async function executeSafeErc20Transfer(params) {
2990
3532
  throw new Error("Wallet not connected");
2991
3533
  }
2992
3534
  if (chain.id !== chainId) {
2993
- throw new Error(`Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} to sign`);
3535
+ throw new Error(`Switch to ${_chunkMILJQWPTcjs.getChainName.call(void 0, chainId)} to sign`);
2994
3536
  }
2995
3537
  const isOwner = await publicClient.readContract({
2996
3538
  address: safeAddress,
@@ -3114,22 +3656,6 @@ async function buildSafeTransaction(params) {
3114
3656
  };
3115
3657
  }
3116
3658
 
3117
- // src/core/public-client.ts
3118
-
3119
- var clientCache = /* @__PURE__ */ new Map();
3120
- function getPublicClient(chainId) {
3121
- let client = clientCache.get(chainId);
3122
- if (!client) {
3123
- const chain = _chunk7JIDIX27cjs.CHAIN_BY_ID[chainId];
3124
- client = _viem.createPublicClient.call(void 0, {
3125
- chain,
3126
- transport: _viem.http.call(void 0, )
3127
- });
3128
- clientCache.set(chainId, client);
3129
- }
3130
- return client;
3131
- }
3132
-
3133
3659
  // src/core/session-owner.ts
3134
3660
 
3135
3661
 
@@ -3152,7 +3678,7 @@ function loadSessionOwnerFromStorage(eoaAddress) {
3152
3678
  privateKey: parsed.privateKey,
3153
3679
  address: account.address
3154
3680
  };
3155
- } catch (e6) {
3681
+ } catch (e11) {
3156
3682
  return null;
3157
3683
  }
3158
3684
  }
@@ -3234,4 +3760,6 @@ function accountFromPrivateKey(privateKey) {
3234
3760
 
3235
3761
 
3236
3762
 
3237
- exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.ConnectStep = ConnectStep; exports.Button = Button; exports.Callout = Callout; exports.debugLog = debugLog; exports.debugError = debugError; exports.toEvmCaip2 = toEvmCaip2; exports.targetChainToCaip2 = targetChainToCaip2; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.getEventTxHash = getEventTxHash; exports.isDepositEvent = isDepositEvent; exports.txRefsMatch = txRefsMatch; exports.useLatestRef = useLatestRef; exports.ProcessingStep = ProcessingStep; exports.SAFE_ABI = SAFE_ABI; exports.executeSafeEthTransfer = executeSafeEthTransfer; exports.executeSafeErc20Transfer = executeSafeErc20Transfer; exports.buildSafeTransaction = buildSafeTransaction; exports.getPublicClient = getPublicClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
3763
+
3764
+
3765
+ exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BankIcon = BankIcon; exports.Callout = Callout; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.ProcessingStep = ProcessingStep; exports.SAFE_ABI = SAFE_ABI; exports.executeSafeEthTransfer = executeSafeEthTransfer; exports.executeSafeErc20Transfer = executeSafeErc20Transfer; exports.buildSafeTransaction = buildSafeTransaction; exports.getPublicClient = getPublicClient; exports.getHyperEvmReadClient = getHyperEvmReadClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;