@rhinestone/deposit-modal 0.3.0-alpha.15 → 0.3.0-alpha.16

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 (29) hide show
  1. package/dist/{DepositModalReown-P4QGKQRZ.cjs → DepositModalReown-QRLLANTS.cjs} +7 -7
  2. package/dist/{DepositModalReown-CAX35NN2.mjs → DepositModalReown-THU2QG76.mjs} +4 -4
  3. package/dist/{WithdrawModalReown-ZSFALZOB.cjs → WithdrawModalReown-PHWLYDZQ.cjs} +7 -7
  4. package/dist/{WithdrawModalReown-V4YYPNBE.mjs → WithdrawModalReown-SSRJNUGZ.mjs} +4 -4
  5. package/dist/{constants-DqVn968d.d.ts → caip-CrQ2KKU-.d.cts} +11 -1
  6. package/dist/{constants-DqVn968d.d.cts → caip-CrQ2KKU-.d.ts} +11 -1
  7. package/dist/{chunk-7C4SPVM5.mjs → chunk-6YRDD462.mjs} +57 -1
  8. package/dist/{chunk-7NO7WVJV.cjs → chunk-7W5M6WEE.cjs} +217 -203
  9. package/dist/{chunk-H2WSFD53.mjs → chunk-E2K7XWMN.mjs} +2 -2
  10. package/dist/{chunk-7LJYEGZZ.cjs → chunk-G5YDICEN.cjs} +93 -93
  11. package/dist/{chunk-DZ2RPLBM.cjs → chunk-MILJQWPT.cjs} +67 -11
  12. package/dist/{chunk-LDMY67HP.mjs → chunk-PAK3NUGY.mjs} +5 -5
  13. package/dist/{chunk-AAQPYKBA.cjs → chunk-PXQBJMNF.cjs} +480 -441
  14. package/dist/{chunk-6O4NGY2N.cjs → chunk-UD6QUZJS.cjs} +5 -5
  15. package/dist/{chunk-KDJS56TQ.mjs → chunk-YX3I7C2R.mjs} +51 -12
  16. package/dist/{chunk-IZMF2WHM.mjs → chunk-Z7OJPEV2.mjs} +249 -235
  17. package/dist/constants.cjs +6 -2
  18. package/dist/constants.d.cts +1 -1
  19. package/dist/constants.d.ts +1 -1
  20. package/dist/constants.mjs +5 -1
  21. package/dist/deposit.cjs +4 -4
  22. package/dist/deposit.mjs +3 -3
  23. package/dist/index.cjs +9 -5
  24. package/dist/index.d.cts +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.mjs +8 -4
  27. package/dist/withdraw.cjs +4 -4
  28. package/dist/withdraw.mjs +3 -3
  29. package/package.json +1 -1
@@ -11,7 +11,9 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkDZ2RPLBMcjs = require('./chunk-DZ2RPLBM.cjs');
14
+
15
+
16
+ var _chunkMILJQWPTcjs = require('./chunk-MILJQWPT.cjs');
15
17
 
16
18
  // src/components/ui/Modal.tsx
17
19
 
@@ -214,6 +216,46 @@ var CardIcon = _lucidereact.CreditCard;
214
216
  var BankIcon = _lucidereact.Landmark;
215
217
  var AppleIcon = _lucidereact.Apple;
216
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
+
217
259
  // src/core/useLatestRef.ts
218
260
 
219
261
  function useLatestRef(value) {
@@ -277,29 +319,6 @@ function debugError(enabled, scope, message, error, data) {
277
319
  console.error(`[deposit-modal:${scope}] ${message}`, payload);
278
320
  }
279
321
 
280
- // src/core/caip.ts
281
- var SOLANA_MAINNET_GENESIS = "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp";
282
- var SOLANA_MAINNET_CAIP2 = `solana:${SOLANA_MAINNET_GENESIS}`;
283
- function toEvmCaip2(chainId) {
284
- return `eip155:${chainId}`;
285
- }
286
- function targetChainToCaip2(targetChain) {
287
- return targetChain === "solana" ? SOLANA_MAINNET_CAIP2 : toEvmCaip2(targetChain);
288
- }
289
- function parseEvmChainId(value) {
290
- if (typeof value === "number" && Number.isFinite(value)) {
291
- return value;
292
- }
293
- if (typeof value !== "string") return null;
294
- const match = value.match(/^eip155:(\d+)$/);
295
- if (!_optionalChain([match, 'optionalAccess', _ => _[1]])) return null;
296
- const parsed = Number.parseInt(match[1], 10);
297
- return Number.isFinite(parsed) ? parsed : null;
298
- }
299
- function isSolanaCaip2(value) {
300
- return typeof value === "string" && value.startsWith("solana:");
301
- }
302
-
303
322
  // src/core/deposit-asset-helpers.ts
304
323
  function getAssetId(asset) {
305
324
  return `${asset.chainId}:${asset.token.toLowerCase()}`;
@@ -477,8 +496,8 @@ function buildSessionDetails(unsigned, signature) {
477
496
  }
478
497
  function createDepositService(baseUrl, options) {
479
498
  const normalizedBaseUrl = baseUrl.replace(/\/$/, "");
480
- const debug = _optionalChain([options, 'optionalAccess', _2 => _2.debug]) === true;
481
- 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"));
482
501
  function apiUrl(path) {
483
502
  const normalizedPath = path.startsWith("/") ? path : `/${path}`;
484
503
  return `${normalizedBaseUrl}${normalizedPath}`;
@@ -515,7 +534,7 @@ function createDepositService(baseUrl, options) {
515
534
  targetChain: params.targetChain,
516
535
  targetToken: params.targetToken,
517
536
  recipient: params.recipient ? shortRef(params.recipient) : void 0,
518
- 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)),
519
538
  forceRegister: params.forceRegister
520
539
  });
521
540
  const response = await fetch(url, {
@@ -532,7 +551,7 @@ function createDepositService(baseUrl, options) {
532
551
  error,
533
552
  { status: response.status, ownerAddress: params.ownerAddress }
534
553
  );
535
- 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;
536
555
  const base = error.error || `Setup account failed: ${response.status}`;
537
556
  throw new Error(detail ? `${base}: ${detail}` : base);
538
557
  }
@@ -584,8 +603,8 @@ function createDepositService(baseUrl, options) {
584
603
  const result = await response.json();
585
604
  debugLog(debug, scope, "registerAccount:success", {
586
605
  address: params.address,
587
- evmDepositAddress: _optionalChain([result, 'optionalAccess', _7 => _7.evmDepositAddress]),
588
- 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]))
589
608
  });
590
609
  return result;
591
610
  },
@@ -687,9 +706,9 @@ function createDepositService(baseUrl, options) {
687
706
  }
688
707
  const data = await response.json();
689
708
  const result = {
690
- isRegistered: _optionalChain([data, 'optionalAccess', _9 => _9.isRegistered]) === true,
691
- targetChain: _optionalChain([data, 'optionalAccess', _10 => _10.targetChain]),
692
- 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])
693
712
  };
694
713
  debugLog(debug, scope, "checkAccount:success", {
695
714
  address,
@@ -719,12 +738,12 @@ function createDepositService(baseUrl, options) {
719
738
  return { lastEvent: void 0 };
720
739
  }
721
740
  const body = await response.json();
722
- 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]]);
723
742
  const lastEvent = row ? depositRowToEvent(row) : void 0;
724
743
  debugLog(debug, scope, "fetchStatus:success", {
725
744
  address,
726
745
  txHash: shortRef(normalized),
727
- eventType: _optionalChain([lastEvent, 'optionalAccess', _14 => _14.type])
746
+ eventType: _optionalChain([lastEvent, 'optionalAccess', _13 => _13.type])
728
747
  });
729
748
  return { lastEvent };
730
749
  },
@@ -745,11 +764,11 @@ function createDepositService(baseUrl, options) {
745
764
  return { lastEvent: void 0 };
746
765
  }
747
766
  const body = await response.json();
748
- 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]]);
749
768
  const lastEvent = row ? depositRowToEvent(row) : void 0;
750
769
  debugLog(debug, scope, "fetchLatestStatus:success", {
751
770
  address,
752
- eventType: _optionalChain([lastEvent, 'optionalAccess', _17 => _17.type])
771
+ eventType: _optionalChain([lastEvent, 'optionalAccess', _16 => _16.type])
753
772
  });
754
773
  return { lastEvent };
755
774
  },
@@ -811,7 +830,7 @@ function createDepositService(baseUrl, options) {
811
830
  smartAccount,
812
831
  chainId,
813
832
  safeAddress,
814
- 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
815
834
  });
816
835
  return result;
817
836
  },
@@ -851,7 +870,7 @@ function createDepositService(baseUrl, options) {
851
870
  const result = await response.json();
852
871
  debugLog(debug, scope, "submitPolymarketWithdraw:success", {
853
872
  depositWallet,
854
- 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
855
874
  });
856
875
  return result;
857
876
  },
@@ -886,8 +905,8 @@ function createDepositService(baseUrl, options) {
886
905
  );
887
906
  }
888
907
  const data = await response.json();
889
- const deposits = Array.isArray(_optionalChain([data, 'optionalAccess', _20 => _20.deposits])) ? data.deposits : [];
890
- 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));
891
910
  debugLog(debug, scope, "fetchDepositHistory:success", {
892
911
  recipient: shortRef(params.recipient),
893
912
  count: deposits.length,
@@ -897,11 +916,11 @@ function createDepositService(baseUrl, options) {
897
916
  },
898
917
  async checkLiquidity(params) {
899
918
  if (params.destinationChainId === "solana") {
900
- const token = _chunkDZ2RPLBMcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
919
+ const token = _chunkMILJQWPTcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
901
920
  return {
902
921
  hasLiquidity: true,
903
- symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _23 => _23.symbol]), () => ( "Token")),
904
- 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)),
905
924
  unlimited: true,
906
925
  maxAmount: null
907
926
  };
@@ -1127,16 +1146,16 @@ function createDepositService(baseUrl, options) {
1127
1146
  }
1128
1147
  function normalizeDirectPortfolio(data) {
1129
1148
  const rawTokens = _nullishCoalesce(_nullishCoalesce(extractArray(data, "tokens"), () => ( extractArray(
1130
- _optionalChain([data, 'optionalAccess', _25 => _25.data]),
1149
+ _optionalChain([data, 'optionalAccess', _24 => _24.data]),
1131
1150
  "tokens"
1132
1151
  ))), () => ( []));
1133
- const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _26 => _26.data]), "totalUsd"))), () => ( 0));
1152
+ const totalUsd = _nullishCoalesce(_nullishCoalesce(extractNumber(data, "totalUsd"), () => ( extractNumber(_optionalChain([data, 'optionalAccess', _25 => _25.data]), "totalUsd"))), () => ( 0));
1134
1153
  const tokens = rawTokens.map((token) => normalizeDirectToken(token)).filter((token) => Boolean(token));
1135
1154
  return { tokens, totalUsd };
1136
1155
  }
1137
1156
  function extractOrchestratorPortfolio(data) {
1138
1157
  const portfolio = _nullishCoalesce(extractArray(data, "portfolio"), () => ( extractArray(
1139
- _optionalChain([data, 'optionalAccess', _27 => _27.data]),
1158
+ _optionalChain([data, 'optionalAccess', _26 => _26.data]),
1140
1159
  "portfolio"
1141
1160
  )));
1142
1161
  if (!portfolio || !Array.isArray(portfolio)) return null;
@@ -1147,17 +1166,17 @@ function normalizeOrchestratorPortfolio(data) {
1147
1166
  for (const tokenData of data.portfolio || []) {
1148
1167
  const chainBalances = _nullishCoalesce(_nullishCoalesce(tokenData.tokenChainBalance, () => ( tokenData.chainBalances)), () => ( []));
1149
1168
  for (const chainBalance of chainBalances) {
1150
- const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _28 => _28.balance, 'optionalAccess', _29 => _29.unlocked]), () => ( "0"));
1169
+ const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _27 => _27.balance, 'optionalAccess', _28 => _28.unlocked]), () => ( "0"));
1151
1170
  const normalizedName = tokenData.tokenName.trim();
1152
1171
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
1153
- const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkDZ2RPLBMcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
1154
- const resolvedTokenAddress = isNativeSymbol ? _chunkDZ2RPLBMcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
1172
+ const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkMILJQWPTcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
1173
+ const resolvedTokenAddress = isNativeSymbol ? _chunkMILJQWPTcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
1155
1174
  if (!resolvedTokenAddress) {
1156
1175
  continue;
1157
1176
  }
1158
- const registrySymbol = _chunkDZ2RPLBMcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
1177
+ const registrySymbol = _chunkMILJQWPTcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
1159
1178
  const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
1160
- const decimals = registrySymbol !== "Token" ? _chunkDZ2RPLBMcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
1179
+ const decimals = registrySymbol !== "Token" ? _chunkMILJQWPTcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
1161
1180
  tokens.push({
1162
1181
  chainId: chainBalance.chainId,
1163
1182
  address: resolvedTokenAddress,
@@ -1177,23 +1196,23 @@ function normalizeOrchestratorPortfolio(data) {
1177
1196
  function normalizeDirectToken(token) {
1178
1197
  const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
1179
1198
  const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
1180
- const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? isSolanaCaip2(rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : parseEvmChainId(rawChainString) : null)));
1199
+ const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkMILJQWPTcjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : _chunkMILJQWPTcjs.parseEvmChainId.call(void 0, rawChainString) : null)));
1181
1200
  if (chainId === null) return null;
1182
1201
  const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
1183
1202
  if (!symbol) return null;
1184
- 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()])));
1203
+ const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _29 => _29(token, "balance"), 'optionalAccess', _30 => _30.toString, 'call', _31 => _31()]))), () => ( _optionalChain([extractNumber, 'call', _32 => _32(token, "amount"), 'optionalAccess', _33 => _33.toString, 'call', _34 => _34()]))), () => ( _optionalChain([extractNumber, 'call', _35 => _35(token, "value"), 'optionalAccess', _36 => _36.toString, 'call', _37 => _37()]))), () => ( _optionalChain([extractNumber, 'call', _38 => _38(token, "rawBalance"), 'optionalAccess', _39 => _39.toString, 'call', _40 => _40()])));
1185
1204
  if (!balanceValue) return null;
1186
1205
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
1187
1206
  token.token,
1188
1207
  "address"
1189
- ))), () => ( (typeof chainId === "number" ? _chunkDZ2RPLBMcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
1208
+ ))), () => ( (typeof chainId === "number" ? _chunkMILJQWPTcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
1190
1209
  if (!address) return null;
1191
1210
  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));
1192
1211
  const isSolanaToken = chainId === "solana";
1193
- const registrySymbol = isSolanaToken ? "Token" : _chunkDZ2RPLBMcjs.getTokenSymbol.call(void 0, address, chainId);
1212
+ const registrySymbol = isSolanaToken ? "Token" : _chunkMILJQWPTcjs.getTokenSymbol.call(void 0, address, chainId);
1194
1213
  const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
1195
1214
  const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
1196
- const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkDZ2RPLBMcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
1215
+ const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkMILJQWPTcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
1197
1216
  return {
1198
1217
  chainId,
1199
1218
  address,
@@ -1206,7 +1225,7 @@ function normalizeDirectToken(token) {
1206
1225
  }
1207
1226
  function extractTokenAddress(tokenData, chainId) {
1208
1227
  const token = tokenData;
1209
- 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]])));
1228
+ return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(token.tokenAddress, () => ( token.address)), () => ( _optionalChain([token, 'access', _41 => _41.addresses, 'optionalAccess', _42 => _42[chainId]]))), () => ( _optionalChain([token, 'access', _43 => _43.token, 'optionalAccess', _44 => _44.address]))), () => ( _optionalChain([token, 'access', _45 => _45.token, 'optionalAccess', _46 => _46.addresses, 'optionalAccess', _47 => _47[chainId]])));
1210
1229
  }
1211
1230
  function extractArray(data, key) {
1212
1231
  if (!data || typeof data !== "object") return null;
@@ -1305,6 +1324,33 @@ function formatUserError(raw) {
1305
1324
  return cleaned;
1306
1325
  }
1307
1326
 
1327
+ // src/core/public-client.ts
1328
+ var _viem = require('viem');
1329
+ var _chains = require('viem/chains');
1330
+ var clientCache = /* @__PURE__ */ new Map();
1331
+ function getPublicClient(chainId) {
1332
+ let client = clientCache.get(chainId);
1333
+ if (!client) {
1334
+ const chain = _chunkMILJQWPTcjs.CHAIN_BY_ID[chainId];
1335
+ client = _viem.createPublicClient.call(void 0, {
1336
+ chain,
1337
+ transport: _viem.http.call(void 0, )
1338
+ });
1339
+ clientCache.set(chainId, client);
1340
+ }
1341
+ return client;
1342
+ }
1343
+ var hyperEvmClient;
1344
+ function getHyperEvmReadClient() {
1345
+ if (!hyperEvmClient) {
1346
+ hyperEvmClient = _viem.createPublicClient.call(void 0, {
1347
+ chain: _chains.hyperliquid,
1348
+ transport: _viem.http.call(void 0, )
1349
+ });
1350
+ }
1351
+ return hyperEvmClient;
1352
+ }
1353
+
1308
1354
  // src/core/theme.ts
1309
1355
  var RADIUS_SCALE = {
1310
1356
  none: { sm: "0", md: "0", lg: "0" },
@@ -1407,19 +1453,19 @@ var CUSTOM_PRIMARY_VARS = [
1407
1453
  function applyTheme(element, theme) {
1408
1454
  if (!element) return;
1409
1455
  const parent = element.parentElement;
1410
- const targets = _optionalChain([parent, 'optionalAccess', _49 => _49.classList, 'access', _50 => _50.contains, 'call', _51 => _51("rs-modal-content")]) ? [element, parent] : [element];
1411
- if (_optionalChain([theme, 'optionalAccess', _52 => _52.mode])) {
1456
+ const targets = _optionalChain([parent, 'optionalAccess', _48 => _48.classList, 'access', _49 => _49.contains, 'call', _50 => _50("rs-modal-content")]) ? [element, parent] : [element];
1457
+ if (_optionalChain([theme, 'optionalAccess', _51 => _51.mode])) {
1412
1458
  for (const t of targets) t.setAttribute("data-theme", theme.mode);
1413
1459
  } else {
1414
1460
  for (const t of targets) t.removeAttribute("data-theme");
1415
1461
  }
1416
- if (_optionalChain([theme, 'optionalAccess', _53 => _53.fontColor])) {
1462
+ if (_optionalChain([theme, 'optionalAccess', _52 => _52.fontColor])) {
1417
1463
  setVar(targets, "--rs-foreground", theme.fontColor);
1418
1464
  }
1419
- if (_optionalChain([theme, 'optionalAccess', _54 => _54.iconColor])) {
1465
+ if (_optionalChain([theme, 'optionalAccess', _53 => _53.iconColor])) {
1420
1466
  setVar(targets, "--rs-icon", theme.iconColor);
1421
1467
  }
1422
- if (_optionalChain([theme, 'optionalAccess', _55 => _55.ctaColor])) {
1468
+ if (_optionalChain([theme, 'optionalAccess', _54 => _54.ctaColor])) {
1423
1469
  const derived = deriveCustomPrimary(theme.ctaColor);
1424
1470
  if (derived) {
1425
1471
  setVar(targets, "--rs-primary", derived.base);
@@ -1444,18 +1490,18 @@ function applyTheme(element, theme) {
1444
1490
  }
1445
1491
  } else {
1446
1492
  for (const v of CUSTOM_PRIMARY_VARS) clearVar(targets, v);
1447
- if (_optionalChain([theme, 'optionalAccess', _56 => _56.ctaHoverColor])) {
1493
+ if (_optionalChain([theme, 'optionalAccess', _55 => _55.ctaHoverColor])) {
1448
1494
  setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
1449
1495
  }
1450
1496
  }
1451
- if (_optionalChain([theme, 'optionalAccess', _57 => _57.borderColor])) {
1497
+ if (_optionalChain([theme, 'optionalAccess', _56 => _56.borderColor])) {
1452
1498
  setVar(targets, "--rs-border", theme.borderColor);
1453
1499
  setVar(targets, "--rs-border-surface", theme.borderColor);
1454
1500
  }
1455
- if (_optionalChain([theme, 'optionalAccess', _58 => _58.backgroundColor])) {
1501
+ if (_optionalChain([theme, 'optionalAccess', _57 => _57.backgroundColor])) {
1456
1502
  setVar(targets, "--rs-background", theme.backgroundColor);
1457
1503
  }
1458
- if (_optionalChain([theme, 'optionalAccess', _59 => _59.radius])) {
1504
+ if (_optionalChain([theme, 'optionalAccess', _58 => _58.radius])) {
1459
1505
  const scale = RADIUS_SCALE[theme.radius];
1460
1506
  setVar(targets, "--rs-radius-sm", scale.sm);
1461
1507
  setVar(targets, "--rs-radius-md", scale.md);
@@ -1631,7 +1677,7 @@ function ListRow({
1631
1677
  if (disabled) return;
1632
1678
  if (e.key === "Enter" || e.key === " ") {
1633
1679
  e.preventDefault();
1634
- _optionalChain([onClick, 'optionalCall', _60 => _60(e)]);
1680
+ _optionalChain([onClick, 'optionalCall', _59 => _59(e)]);
1635
1681
  }
1636
1682
  };
1637
1683
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1641,7 +1687,7 @@ function ListRow({
1641
1687
  role: "button",
1642
1688
  tabIndex: disabled ? -1 : 0,
1643
1689
  "aria-disabled": disabled || void 0,
1644
- onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _61 => _61(e)]),
1690
+ onClick: disabled ? void 0 : (e) => _optionalChain([onClick, 'optionalCall', _60 => _60(e)]),
1645
1691
  onKeyDown: handleKey,
1646
1692
  children: inner
1647
1693
  }
@@ -2011,7 +2057,7 @@ var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fra
2011
2057
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
2012
2058
  "+100 wallets"
2013
2059
  ] });
2014
- var EXTRA_CHAIN_COUNT = Math.max(0, _chunkDZ2RPLBMcjs.getSupportedChainIds.call(void 0, ).length - 3);
2060
+ var EXTRA_CHAIN_COUNT = Math.max(0, _chunkMILJQWPTcjs.getSupportedChainIds.call(void 0, ).length - 3);
2015
2061
  var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2016
2062
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
2017
2063
  EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT} chains` : "All chains"
@@ -2045,7 +2091,7 @@ function ConnectStep({
2045
2091
  const hasReownWallet = rows.some(
2046
2092
  (row) => row.kind === "external" || row.kind === "solana"
2047
2093
  );
2048
- const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _62 => _62.length]), () => ( 0))) > 0;
2094
+ const showDappImports = (_nullishCoalesce(_optionalChain([dappImports, 'optionalAccess', _61 => _61.length]), () => ( 0))) > 0;
2049
2095
  const defaultSubtitle = onSelectTransferCrypto ? "Add money to your balance" : "Choose a wallet to continue";
2050
2096
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
2051
2097
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
@@ -2104,7 +2150,7 @@ function ConnectStep({
2104
2150
  leading: renderWalletLeading(row),
2105
2151
  title: collapseToExternal ? "External wallet" : row.label,
2106
2152
  subtitle: subtitleText,
2107
- onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _63 => _63(row.id)]),
2153
+ onClick: () => _optionalChain([onConfirmWallet, 'optionalCall', _62 => _62(row.id)]),
2108
2154
  disabled: row.state === "loading",
2109
2155
  trailing: renderRowTrailing(row.state)
2110
2156
  },
@@ -2121,7 +2167,7 @@ function ConnectStep({
2121
2167
  onClick: handleConnect
2122
2168
  }
2123
2169
  ),
2124
- showDappImports && _optionalChain([dappImports, 'optionalAccess', _64 => _64.map, 'call', _65 => _65((row) => {
2170
+ showDappImports && _optionalChain([dappImports, 'optionalAccess', _63 => _63.map, 'call', _64 => _64((row) => {
2125
2171
  if (!hasReownWallet) {
2126
2172
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2127
2173
  ListRow,
@@ -2155,7 +2201,7 @@ function ConnectStep({
2155
2201
  leading: row.icon,
2156
2202
  title: row.label,
2157
2203
  subtitle: formatBalanceUsd(row.status.balanceUsd),
2158
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _66 => _66(row.id)])
2204
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _65 => _65(row.id)])
2159
2205
  },
2160
2206
  row.id
2161
2207
  );
@@ -2167,7 +2213,7 @@ function ConnectStep({
2167
2213
  leading: row.icon,
2168
2214
  title: row.label,
2169
2215
  subtitle: row.status.reason,
2170
- onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _67 => _67(row.id)])
2216
+ onClick: () => _optionalChain([onSelectDappImport, 'optionalCall', _66 => _66(row.id)])
2171
2217
  },
2172
2218
  row.id
2173
2219
  );
@@ -2201,7 +2247,7 @@ ConnectStep.displayName = "ConnectStep";
2201
2247
 
2202
2248
  // src/components/steps/ProcessingStep.tsx
2203
2249
 
2204
- var _viem = require('viem');
2250
+
2205
2251
 
2206
2252
  // src/components/ui/Button.tsx
2207
2253
 
@@ -2272,8 +2318,8 @@ function Tooltip({ content, children, className }) {
2272
2318
  function handleOutside(event) {
2273
2319
  const target = event.target;
2274
2320
  if (!target) return;
2275
- if (_optionalChain([triggerRef, 'access', _68 => _68.current, 'optionalAccess', _69 => _69.contains, 'call', _70 => _70(target)])) return;
2276
- if (_optionalChain([bubbleRef, 'access', _71 => _71.current, 'optionalAccess', _72 => _72.contains, 'call', _73 => _73(target)])) return;
2321
+ if (_optionalChain([triggerRef, 'access', _67 => _67.current, 'optionalAccess', _68 => _68.contains, 'call', _69 => _69(target)])) return;
2322
+ if (_optionalChain([bubbleRef, 'access', _70 => _70.current, 'optionalAccess', _71 => _71.contains, 'call', _72 => _72(target)])) return;
2277
2323
  setOpen(false);
2278
2324
  }
2279
2325
  function handleKey(event) {
@@ -2340,46 +2386,6 @@ function Tooltip({ content, children, className }) {
2340
2386
  }
2341
2387
  Tooltip.displayName = "Tooltip";
2342
2388
 
2343
- // src/components/ui/Callout.tsx
2344
-
2345
- function CircleAlertIcon() {
2346
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2347
- "svg",
2348
- {
2349
- width: "16",
2350
- height: "16",
2351
- viewBox: "0 0 16 16",
2352
- fill: "none",
2353
- xmlns: "http://www.w3.org/2000/svg",
2354
- "aria-hidden": "true",
2355
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2356
- "path",
2357
- {
2358
- 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",
2359
- stroke: "currentColor",
2360
- strokeWidth: "1.33",
2361
- strokeLinecap: "round",
2362
- strokeLinejoin: "round"
2363
- }
2364
- )
2365
- }
2366
- );
2367
- }
2368
- function Callout({ variant = "error", children, role }) {
2369
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2370
- "div",
2371
- {
2372
- className: `rs-callout rs-callout--${variant}`,
2373
- role: _nullishCoalesce(role, () => ( (variant === "error" ? "alert" : "status"))),
2374
- children: [
2375
- /* @__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, {}) }),
2376
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-callout-text", children })
2377
- ]
2378
- }
2379
- );
2380
- }
2381
- Callout.displayName = "Callout";
2382
-
2383
2389
  // src/core/webhook.ts
2384
2390
  function isRecord(value) {
2385
2391
  return typeof value === "object" && value !== null;
@@ -2393,7 +2399,7 @@ function asNumber(value) {
2393
2399
  const trimmed = value.trim();
2394
2400
  if (!trimmed) return void 0;
2395
2401
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
2396
- if (_optionalChain([caipMatch, 'optionalAccess', _74 => _74[1]])) {
2402
+ if (_optionalChain([caipMatch, 'optionalAccess', _73 => _73[1]])) {
2397
2403
  const parsed2 = Number(caipMatch[1]);
2398
2404
  return Number.isFinite(parsed2) ? parsed2 : void 0;
2399
2405
  }
@@ -2412,28 +2418,28 @@ function asAddress(value) {
2412
2418
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
2413
2419
  }
2414
2420
  function getEventTxHash(event) {
2415
- if (!_optionalChain([event, 'optionalAccess', _75 => _75.type])) return void 0;
2421
+ if (!_optionalChain([event, 'optionalAccess', _74 => _74.type])) return void 0;
2416
2422
  if (event.type === "deposit-received") {
2417
- return asString(_optionalChain([event, 'access', _76 => _76.data, 'optionalAccess', _77 => _77.transactionHash]));
2423
+ return asString(_optionalChain([event, 'access', _75 => _75.data, 'optionalAccess', _76 => _76.transactionHash]));
2418
2424
  }
2419
2425
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
2420
- const deposit = isRecord(_optionalChain([event, 'access', _78 => _78.data, 'optionalAccess', _79 => _79.deposit])) ? event.data.deposit : void 0;
2421
- const source = isRecord(_optionalChain([event, 'access', _80 => _80.data, 'optionalAccess', _81 => _81.source])) ? event.data.source : void 0;
2422
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _82 => _82.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _83 => _83.transactionHash]))));
2426
+ const deposit = isRecord(_optionalChain([event, 'access', _77 => _77.data, 'optionalAccess', _78 => _78.deposit])) ? event.data.deposit : void 0;
2427
+ const source = isRecord(_optionalChain([event, 'access', _79 => _79.data, 'optionalAccess', _80 => _80.source])) ? event.data.source : void 0;
2428
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _81 => _81.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _82 => _82.transactionHash]))));
2423
2429
  }
2424
2430
  if (event.type === "bridge-failed" || event.type === "error") {
2425
- const deposit = isRecord(_optionalChain([event, 'access', _84 => _84.data, 'optionalAccess', _85 => _85.deposit])) ? event.data.deposit : void 0;
2426
- const source = isRecord(_optionalChain([event, 'access', _86 => _86.data, 'optionalAccess', _87 => _87.source])) ? event.data.source : void 0;
2427
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _88 => _88.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _89 => _89.transactionHash]))));
2431
+ const deposit = isRecord(_optionalChain([event, 'access', _83 => _83.data, 'optionalAccess', _84 => _84.deposit])) ? event.data.deposit : void 0;
2432
+ const source = isRecord(_optionalChain([event, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.source])) ? event.data.source : void 0;
2433
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _87 => _87.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _88 => _88.transactionHash]))));
2428
2434
  }
2429
2435
  if (event.type === "post-bridge-swap-complete" || event.type === "post-bridge-swap-failed") {
2430
- const deposit = isRecord(_optionalChain([event, 'access', _90 => _90.data, 'optionalAccess', _91 => _91.deposit])) ? event.data.deposit : void 0;
2431
- return asString(_optionalChain([deposit, 'optionalAccess', _92 => _92.transactionHash]));
2436
+ const deposit = isRecord(_optionalChain([event, 'access', _89 => _89.data, 'optionalAccess', _90 => _90.deposit])) ? event.data.deposit : void 0;
2437
+ return asString(_optionalChain([deposit, 'optionalAccess', _91 => _91.transactionHash]));
2432
2438
  }
2433
2439
  return void 0;
2434
2440
  }
2435
2441
  function getEventSourceDetails(event) {
2436
- if (!_optionalChain([event, 'optionalAccess', _93 => _93.type]) || !isRecord(event.data)) return {};
2442
+ if (!_optionalChain([event, 'optionalAccess', _92 => _92.type]) || !isRecord(event.data)) return {};
2437
2443
  if (event.type === "deposit-received") {
2438
2444
  return {
2439
2445
  chainId: asNumber(event.data.chain),
@@ -2445,18 +2451,18 @@ function getEventSourceDetails(event) {
2445
2451
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
2446
2452
  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") {
2447
2453
  return {
2448
- chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _94 => _94.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _95 => _95.chain])))),
2449
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _96 => _96.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _97 => _97.amount])))),
2450
- token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _98 => _98.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _99 => _99.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _100 => _100.token]))))
2454
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _93 => _93.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _94 => _94.chain])))),
2455
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _95 => _95.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _96 => _96.amount])))),
2456
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _97 => _97.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _98 => _98.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _99 => _99.token]))))
2451
2457
  };
2452
2458
  }
2453
2459
  return {};
2454
2460
  }
2455
2461
  function isDepositEvent(event) {
2456
- 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";
2462
+ return _optionalChain([event, 'optionalAccess', _100 => _100.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _101 => _101.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _102 => _102.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _103 => _103.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _104 => _104.type]) === "post-bridge-swap-complete" || _optionalChain([event, 'optionalAccess', _105 => _105.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _106 => _106.type]) === "error";
2457
2463
  }
2458
2464
  function isFailedEvent(event) {
2459
- return _optionalChain([event, 'optionalAccess', _108 => _108.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "error";
2465
+ return _optionalChain([event, 'optionalAccess', _107 => _107.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _108 => _108.type]) === "post-bridge-swap-failed" || _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "error";
2460
2466
  }
2461
2467
  function isHexString(value) {
2462
2468
  return value.startsWith("0x") || value.startsWith("0X");
@@ -2468,7 +2474,7 @@ function txRefsMatch(a, b) {
2468
2474
  return a === b;
2469
2475
  }
2470
2476
  function formatBridgeFailedMessage(event) {
2471
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _111 => _111.data]), () => ( {}));
2477
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _110 => _110.data]), () => ( {}));
2472
2478
  const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
2473
2479
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
2474
2480
  function toUserFacingFailure(raw) {
@@ -2496,7 +2502,7 @@ function formatBridgeFailedMessage(event) {
2496
2502
  return { message: "Bridge failed" };
2497
2503
  }
2498
2504
  function failureMessageForEvent(event) {
2499
- if (_optionalChain([event, 'optionalAccess', _112 => _112.type]) === "error") {
2505
+ if (_optionalChain([event, 'optionalAccess', _111 => _111.type]) === "error") {
2500
2506
  const message = isRecord(event.data) ? asString(event.data.message) : void 0;
2501
2507
  return _nullishCoalesce(message, () => ( "Unknown error"));
2502
2508
  }
@@ -2593,6 +2599,27 @@ function maxFractionDigitsFor(symbol) {
2593
2599
  if (!symbol) return 6;
2594
2600
  return STABLECOIN_SYMBOLS.has(symbol.toUpperCase()) ? 3 : 6;
2595
2601
  }
2602
+ var PAYMENT_METHOD_LABELS = {
2603
+ creditcard: "Card",
2604
+ debitcard: "Card",
2605
+ card: "Card",
2606
+ applepay: "Apple Pay",
2607
+ googlepay: "Google Pay",
2608
+ "bank-transfer": "Bank Transfer",
2609
+ banktransfer: "Bank Transfer",
2610
+ sepa: "SEPA",
2611
+ "open-banking": "Open Banking",
2612
+ "krak-pay": "Kraken Pay",
2613
+ krakpay: "Kraken Pay",
2614
+ kraken: "Kraken",
2615
+ coinbase: "Coinbase",
2616
+ binance: "Binance"
2617
+ };
2618
+ function formatPaymentMethod(method) {
2619
+ const key = method.trim().toLowerCase();
2620
+ if (PAYMENT_METHOD_LABELS[key]) return PAYMENT_METHOD_LABELS[key];
2621
+ return key.replace(/[-_]+/g, " ").split(" ").filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
2622
+ }
2596
2623
  function loadPhaseTimings(txHash) {
2597
2624
  if (typeof window === "undefined") return null;
2598
2625
  try {
@@ -2621,12 +2648,12 @@ function isEventForTx(event, txHash) {
2621
2648
  return txRefsMatch(eventTxHash, txHash);
2622
2649
  }
2623
2650
  function parseWebhookTimestamp(event) {
2624
- if (typeof _optionalChain([event, 'optionalAccess', _113 => _113.time]) !== "string") return void 0;
2651
+ if (typeof _optionalChain([event, 'optionalAccess', _112 => _112.time]) !== "string") return void 0;
2625
2652
  const timestamp = Date.parse(event.time);
2626
2653
  return Number.isFinite(timestamp) ? timestamp : void 0;
2627
2654
  }
2628
2655
  function syncPhaseTimings(previous, event) {
2629
- if (!_optionalChain([event, 'optionalAccess', _114 => _114.type])) return previous;
2656
+ if (!_optionalChain([event, 'optionalAccess', _113 => _113.type])) return previous;
2630
2657
  const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
2631
2658
  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;
2632
2659
  const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "post-bridge-swap-complete") && previous.bridgingAt === void 0;
@@ -2688,9 +2715,9 @@ function getCurrentPhaseId(state, phaseTimings) {
2688
2715
  if (state.type === "complete") {
2689
2716
  return void 0;
2690
2717
  }
2691
- if (_optionalChain([state, 'access', _115 => _115.lastEvent, 'optionalAccess', _116 => _116.type]) === "bridge-started" || _optionalChain([state, 'access', _117 => _117.lastEvent, 'optionalAccess', _118 => _118.type]) === "bridge-complete")
2718
+ if (_optionalChain([state, 'access', _114 => _114.lastEvent, 'optionalAccess', _115 => _115.type]) === "bridge-started" || _optionalChain([state, 'access', _116 => _116.lastEvent, 'optionalAccess', _117 => _117.type]) === "bridge-complete")
2692
2719
  return "bridging";
2693
- if (_optionalChain([state, 'access', _119 => _119.lastEvent, 'optionalAccess', _120 => _120.type]) === "deposit-received") return "received";
2720
+ if (_optionalChain([state, 'access', _118 => _118.lastEvent, 'optionalAccess', _119 => _119.type]) === "deposit-received") return "received";
2694
2721
  return "confirming";
2695
2722
  }
2696
2723
  function ProcessingStep({
@@ -2714,6 +2741,7 @@ function ProcessingStep({
2714
2741
  quotedFeeAmount,
2715
2742
  quotedFeeSymbol,
2716
2743
  balanceAfterUsd,
2744
+ isSwappedOrder,
2717
2745
  onClose,
2718
2746
  onNewDeposit,
2719
2747
  onRetry,
@@ -2774,7 +2802,7 @@ function ProcessingStep({
2774
2802
  flowLabel
2775
2803
  });
2776
2804
  const context = processingContextRef.current;
2777
- _optionalChain([onDepositCompleteRef, 'access', _121 => _121.current, 'optionalCall', _122 => _122(txHash, void 0, {
2805
+ _optionalChain([onDepositCompleteRef, 'access', _120 => _120.current, 'optionalCall', _121 => _121(txHash, void 0, {
2778
2806
  amount: context.amount,
2779
2807
  sourceChain: context.sourceChain,
2780
2808
  sourceToken: context.sourceToken,
@@ -2816,14 +2844,17 @@ function ProcessingStep({
2816
2844
  updatePhaseTimings(
2817
2845
  (previous) => syncPhaseTimings(previous, state.lastEvent)
2818
2846
  );
2819
- }, [_optionalChain([state, 'access', _123 => _123.lastEvent, 'optionalAccess', _124 => _124.time]), _optionalChain([state, 'access', _125 => _125.lastEvent, 'optionalAccess', _126 => _126.type]), updatePhaseTimings]);
2847
+ }, [_optionalChain([state, 'access', _122 => _122.lastEvent, 'optionalAccess', _123 => _123.time]), _optionalChain([state, 'access', _124 => _124.lastEvent, 'optionalAccess', _125 => _125.type]), updatePhaseTimings]);
2820
2848
  const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
2821
2849
  _react.useEffect.call(void 0, () => {
2822
2850
  let cancelled = false;
2823
2851
  service.fetchSwappedOrderStatus(smartAccount).then((res) => {
2824
2852
  if (cancelled || !res) return;
2825
- if (!res.transactionId) return;
2826
- if (res.transactionId.toLowerCase() !== txHash.toLowerCase()) return;
2853
+ if (res.transactionId != null) {
2854
+ if (res.transactionId.toLowerCase() !== txHash.toLowerCase()) return;
2855
+ } else if (!isSwappedOrder) {
2856
+ return;
2857
+ }
2827
2858
  setSwappedFiatContext({
2828
2859
  paidAmountUsd: res.paidAmountUsd,
2829
2860
  paidAmountEur: res.paidAmountEur,
@@ -2835,7 +2866,7 @@ function ProcessingStep({
2835
2866
  return () => {
2836
2867
  cancelled = true;
2837
2868
  };
2838
- }, [service, smartAccount, txHash]);
2869
+ }, [service, smartAccount, txHash, isSwappedOrder]);
2839
2870
  _react.useEffect.call(void 0, () => {
2840
2871
  if (directTransfer) return;
2841
2872
  if (state.type !== "processing") {
@@ -2860,21 +2891,21 @@ function ProcessingStep({
2860
2891
  debugLog(debug, "processing", "poll:event", {
2861
2892
  type: lastEvent2.type,
2862
2893
  matchesTx: eventMatchesTx,
2863
- intentId: _optionalChain([eventData, 'optionalAccess', _127 => _127.intentId])
2894
+ intentId: _optionalChain([eventData, 'optionalAccess', _126 => _126.intentId])
2864
2895
  });
2865
2896
  }
2866
2897
  if (!isMounted) return;
2867
2898
  const awaitingPostBridgeSwap = processingContextRef.current.hasPostBridgeActions;
2868
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _128 => _128.type]) === "post-bridge-swap-complete") {
2899
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _127 => _127.type]) === "post-bridge-swap-complete") {
2869
2900
  setState({ type: "complete", lastEvent: eventForCurrentTx });
2870
- const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _129 => _129.data, 'optionalAccess', _130 => _130.swap, 'optionalAccess', _131 => _131.transactionHash]);
2901
+ const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _128 => _128.data, 'optionalAccess', _129 => _129.swap, 'optionalAccess', _130 => _130.transactionHash]);
2871
2902
  debugLog(debug, "processing", "state:complete", {
2872
2903
  txHash,
2873
2904
  destinationTxHash: swapTxHash,
2874
2905
  event: eventForCurrentTx.type
2875
2906
  });
2876
2907
  const context = processingContextRef.current;
2877
- _optionalChain([onDepositCompleteRef, 'access', _132 => _132.current, 'optionalCall', _133 => _133(txHash, swapTxHash, {
2908
+ _optionalChain([onDepositCompleteRef, 'access', _131 => _131.current, 'optionalCall', _132 => _132(txHash, swapTxHash, {
2878
2909
  amount: context.amount,
2879
2910
  sourceChain: context.sourceChain,
2880
2911
  sourceToken: context.sourceToken,
@@ -2885,7 +2916,7 @@ function ProcessingStep({
2885
2916
  })]);
2886
2917
  return;
2887
2918
  }
2888
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _134 => _134.type]) === "post-bridge-swap-failed") {
2919
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _133 => _133.type]) === "post-bridge-swap-failed") {
2889
2920
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
2890
2921
  setState({
2891
2922
  type: "failed",
@@ -2897,19 +2928,19 @@ function ProcessingStep({
2897
2928
  message: formatted.message,
2898
2929
  code: formatted.code
2899
2930
  });
2900
- _optionalChain([onDepositFailedRef, 'access', _135 => _135.current, 'optionalCall', _136 => _136(txHash, formatted.message)]);
2931
+ _optionalChain([onDepositFailedRef, 'access', _134 => _134.current, 'optionalCall', _135 => _135(txHash, formatted.message)]);
2901
2932
  return;
2902
2933
  }
2903
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _137 => _137.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
2934
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _136 => _136.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
2904
2935
  setState({ type: "complete", lastEvent: eventForCurrentTx });
2905
- const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _138 => _138.data, 'optionalAccess', _139 => _139.destination, 'optionalAccess', _140 => _140.transactionHash]);
2936
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _137 => _137.data, 'optionalAccess', _138 => _138.destination, 'optionalAccess', _139 => _139.transactionHash]);
2906
2937
  debugLog(debug, "processing", "state:complete", {
2907
2938
  txHash,
2908
2939
  destinationTxHash: destinationTxHash2,
2909
2940
  event: eventForCurrentTx.type
2910
2941
  });
2911
2942
  const context = processingContextRef.current;
2912
- _optionalChain([onDepositCompleteRef, 'access', _141 => _141.current, 'optionalCall', _142 => _142(txHash, destinationTxHash2, {
2943
+ _optionalChain([onDepositCompleteRef, 'access', _140 => _140.current, 'optionalCall', _141 => _141(txHash, destinationTxHash2, {
2913
2944
  amount: context.amount,
2914
2945
  sourceChain: context.sourceChain,
2915
2946
  sourceToken: context.sourceToken,
@@ -2920,7 +2951,7 @@ function ProcessingStep({
2920
2951
  })]);
2921
2952
  return;
2922
2953
  }
2923
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _143 => _143.type]) === "bridge-failed") {
2954
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _142 => _142.type]) === "bridge-failed") {
2924
2955
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
2925
2956
  setState({
2926
2957
  type: "failed",
@@ -2932,11 +2963,11 @@ function ProcessingStep({
2932
2963
  message: formatted.message,
2933
2964
  code: formatted.code
2934
2965
  });
2935
- _optionalChain([onDepositFailedRef, 'access', _144 => _144.current, 'optionalCall', _145 => _145(txHash, formatted.message)]);
2966
+ _optionalChain([onDepositFailedRef, 'access', _143 => _143.current, 'optionalCall', _144 => _144(txHash, formatted.message)]);
2936
2967
  return;
2937
2968
  }
2938
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _146 => _146.type]) === "error") {
2939
- const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _147 => _147.data, 'optionalAccess', _148 => _148.message]), () => ( "Unknown error"));
2969
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _145 => _145.type]) === "error") {
2970
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _146 => _146.data, 'optionalAccess', _147 => _147.message]), () => ( "Unknown error"));
2940
2971
  setState({
2941
2972
  type: "failed",
2942
2973
  message: errorMessage,
@@ -2946,7 +2977,7 @@ function ProcessingStep({
2946
2977
  txHash,
2947
2978
  message: errorMessage
2948
2979
  });
2949
- _optionalChain([onDepositFailedRef, 'access', _149 => _149.current, 'optionalCall', _150 => _150(txHash, errorMessage)]);
2980
+ _optionalChain([onDepositFailedRef, 'access', _148 => _148.current, 'optionalCall', _149 => _149(txHash, errorMessage)]);
2950
2981
  return;
2951
2982
  }
2952
2983
  setState((previous) => ({
@@ -3007,7 +3038,7 @@ function ProcessingStep({
3007
3038
  txHash,
3008
3039
  timeoutMs: ESCALATED_DELAY_MS
3009
3040
  });
3010
- _optionalChain([onErrorRef, 'access', _151 => _151.current, 'optionalCall', _152 => _152(message, "PROCESS_TIMEOUT")]);
3041
+ _optionalChain([onErrorRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(message, "PROCESS_TIMEOUT")]);
3011
3042
  }, ESCALATED_DELAY_MS);
3012
3043
  return () => clearTimeout(timeoutId);
3013
3044
  }, [debug, directTransfer, onErrorRef, state.type, txHash]);
@@ -3019,17 +3050,17 @@ function ProcessingStep({
3019
3050
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
3020
3051
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
3021
3052
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
3022
- const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _153 => _153.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _154 => _154.type]) === "post-bridge-swap-failed";
3023
- 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;
3053
+ const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _152 => _152.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _153 => _153.type]) === "post-bridge-swap-failed";
3054
+ const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _154 => _154.data, 'optionalAccess', _155 => _155.swap, 'optionalAccess', _156 => _156.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _157 => _157.data, 'optionalAccess', _158 => _158.destination, 'optionalAccess', _159 => _159.transactionHash]) || null;
3024
3055
  const sourceDetails = getEventSourceDetails(lastEvent);
3025
3056
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
3026
3057
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
3027
3058
  const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
3028
- const sourceExplorerUrl = _chunkDZ2RPLBMcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
3029
- const destExplorerUrl = destinationTxHash ? _chunkDZ2RPLBMcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
3059
+ const sourceExplorerUrl = _chunkMILJQWPTcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
3060
+ const destExplorerUrl = destinationTxHash ? _chunkMILJQWPTcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
3030
3061
  const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
3031
- const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkDZ2RPLBMcjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
3032
- const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkDZ2RPLBMcjs.getTokenDecimalsByAddress.call(void 0,
3062
+ const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkMILJQWPTcjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
3063
+ const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkMILJQWPTcjs.getTokenDecimalsByAddress.call(void 0,
3033
3064
  displaySourceToken,
3034
3065
  displaySourceChain
3035
3066
  ) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
@@ -3051,7 +3082,7 @@ function ProcessingStep({
3051
3082
  }
3052
3083
  })();
3053
3084
  const destinationAmountRaw = (() => {
3054
- const dest = _optionalChain([lastEvent, 'optionalAccess', _161 => _161.data, 'optionalAccess', _162 => _162.destination]);
3085
+ const dest = _optionalChain([lastEvent, 'optionalAccess', _160 => _160.data, 'optionalAccess', _161 => _161.destination]);
3055
3086
  if (!dest || dest.amount === void 0) return void 0;
3056
3087
  try {
3057
3088
  return BigInt(dest.amount);
@@ -3073,6 +3104,7 @@ function ProcessingStep({
3073
3104
  const numeric = Number(raw);
3074
3105
  if (!Number.isFinite(numeric)) return raw;
3075
3106
  return numeric.toLocaleString("en-US", {
3107
+ minimumFractionDigits: 2,
3076
3108
  maximumFractionDigits: amountMaxDigits
3077
3109
  });
3078
3110
  } catch (e9) {
@@ -3085,6 +3117,7 @@ function ProcessingStep({
3085
3117
  const numeric = Number(raw);
3086
3118
  if (!Number.isFinite(numeric)) return raw;
3087
3119
  return numeric.toLocaleString("en-US", {
3120
+ minimumFractionDigits: 2,
3088
3121
  maximumFractionDigits: amountMaxDigits
3089
3122
  });
3090
3123
  } catch (e10) {
@@ -3098,18 +3131,18 @@ function ProcessingStep({
3098
3131
  void delayPhaseId;
3099
3132
  void hasEscalatedDelay;
3100
3133
  const targetSymbol = (() => {
3101
- const resolved = _chunkDZ2RPLBMcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
3134
+ const resolved = _chunkMILJQWPTcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
3102
3135
  return resolved !== "Token" ? resolved : _nullishCoalesce(providedSourceSymbol, () => ( "USDC"));
3103
3136
  })();
3104
- const targetTokenIcon = _chunkDZ2RPLBMcjs.getTokenIcon.call(void 0, targetSymbol);
3105
- const sourceChainIcon = _chunkDZ2RPLBMcjs.getChainIcon.call(void 0, displaySourceChain);
3106
- const targetChainIcon = _chunkDZ2RPLBMcjs.getChainIcon.call(void 0, targetChain);
3107
- const sourceTokenIcon = _chunkDZ2RPLBMcjs.getTokenIcon.call(void 0, sourceSymbol);
3108
- const sourceChainName = _chunkDZ2RPLBMcjs.getChainName.call(void 0, displaySourceChain);
3109
- const targetChainName = _chunkDZ2RPLBMcjs.getChainName.call(void 0, targetChain);
3137
+ const targetTokenIcon = _chunkMILJQWPTcjs.getTokenIcon.call(void 0, targetSymbol);
3138
+ const sourceChainIcon = _chunkMILJQWPTcjs.getChainIcon.call(void 0, displaySourceChain);
3139
+ const targetChainIcon = _chunkMILJQWPTcjs.getChainIcon.call(void 0, targetChain);
3140
+ const sourceTokenIcon = _chunkMILJQWPTcjs.getTokenIcon.call(void 0, sourceSymbol);
3141
+ const sourceChainName = _chunkMILJQWPTcjs.getChainName.call(void 0, displaySourceChain);
3142
+ const targetChainName = _chunkMILJQWPTcjs.getChainName.call(void 0, targetChain);
3110
3143
  const timerText = formatTimer(elapsedSeconds);
3111
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _163 => _163.feeSponsored]), () => ( false));
3112
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _164 => _164.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3144
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _162 => _162.feeSponsored]), () => ( false));
3145
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _163 => _163.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
3113
3146
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
3114
3147
  const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
3115
3148
  const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
@@ -3163,18 +3196,18 @@ function ProcessingStep({
3163
3196
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Time elapsed" : "Total time" }),
3164
3197
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
3165
3198
  ] }),
3166
- _optionalChain([swappedFiatContext, 'optionalAccess', _165 => _165.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3167
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Paid" }),
3199
+ _optionalChain([swappedFiatContext, 'optionalAccess', _164 => _164.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3200
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
3168
3201
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3169
3202
  "$",
3170
3203
  swappedFiatContext.paidAmountUsd.toFixed(2),
3171
3204
  swappedFiatContext.paymentMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "#71717b", marginLeft: 6 }, children: [
3172
3205
  "via ",
3173
- swappedFiatContext.paymentMethod
3206
+ formatPaymentMethod(swappedFiatContext.paymentMethod)
3174
3207
  ] })
3175
3208
  ] })
3176
3209
  ] }),
3177
- _optionalChain([swappedFiatContext, 'optionalAccess', _166 => _166.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3210
+ _optionalChain([swappedFiatContext, 'optionalAccess', _165 => _165.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
3178
3211
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
3179
3212
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
3180
3213
  "$",
@@ -3329,7 +3362,7 @@ async function executeSafeEthTransfer(params) {
3329
3362
  throw new Error("Wallet not connected");
3330
3363
  }
3331
3364
  if (chain.id !== chainId) {
3332
- throw new Error(`Switch to ${_chunkDZ2RPLBMcjs.getChainName.call(void 0, chainId)} to sign`);
3365
+ throw new Error(`Switch to ${_chunkMILJQWPTcjs.getChainName.call(void 0, chainId)} to sign`);
3333
3366
  }
3334
3367
  const isOwner = await publicClient.readContract({
3335
3368
  address: safeAddress,
@@ -3412,7 +3445,7 @@ async function executeSafeErc20Transfer(params) {
3412
3445
  throw new Error("Wallet not connected");
3413
3446
  }
3414
3447
  if (chain.id !== chainId) {
3415
- throw new Error(`Switch to ${_chunkDZ2RPLBMcjs.getChainName.call(void 0, chainId)} to sign`);
3448
+ throw new Error(`Switch to ${_chunkMILJQWPTcjs.getChainName.call(void 0, chainId)} to sign`);
3416
3449
  }
3417
3450
  const isOwner = await publicClient.readContract({
3418
3451
  address: safeAddress,
@@ -3536,22 +3569,6 @@ async function buildSafeTransaction(params) {
3536
3569
  };
3537
3570
  }
3538
3571
 
3539
- // src/core/public-client.ts
3540
-
3541
- var clientCache = /* @__PURE__ */ new Map();
3542
- function getPublicClient(chainId) {
3543
- let client = clientCache.get(chainId);
3544
- if (!client) {
3545
- const chain = _chunkDZ2RPLBMcjs.CHAIN_BY_ID[chainId];
3546
- client = _viem.createPublicClient.call(void 0, {
3547
- chain,
3548
- transport: _viem.http.call(void 0, )
3549
- });
3550
- clientCache.set(chainId, client);
3551
- }
3552
- return client;
3553
- }
3554
-
3555
3572
  // src/core/session-owner.ts
3556
3573
 
3557
3574
 
@@ -3658,7 +3675,4 @@ function accountFromPrivateKey(privateKey) {
3658
3675
 
3659
3676
 
3660
3677
 
3661
-
3662
-
3663
-
3664
- 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.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; 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.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.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
3678
+ 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;