@rhinestone/deposit-modal 0.12.1 → 0.13.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 (65) hide show
  1. package/README.md +30 -16
  2. package/dist/ClaimModal-CREZO27I.mjs +11 -0
  3. package/dist/ClaimModal-JRIA32U2.cjs +11 -0
  4. package/dist/{DepositModalReown-SXAXHYTN.mjs → DepositModalReown-3H75G3XQ.mjs} +44 -22
  5. package/dist/{DepositModalReown-CH6FUTCR.cjs → DepositModalReown-YNNHLAV2.cjs} +57 -35
  6. package/dist/{QRCode-WUC652SH.mjs → QRCode-5RGIZZHL.mjs} +1 -1
  7. package/dist/{QRCode-5DXFNKI2.cjs → QRCode-JKXG4RHN.cjs} +2 -2
  8. package/dist/WithdrawModal-NVRX44IZ.mjs +10 -0
  9. package/dist/WithdrawModal-YYSBPCJJ.cjs +10 -0
  10. package/dist/{chunk-2BOEUV6B.cjs → chunk-2G2EIN4A.cjs} +1510 -896
  11. package/dist/{chunk-O7BCVQ6L.cjs → chunk-4KCSH4T3.cjs} +157 -199
  12. package/dist/{chunk-UGK4JRK6.cjs → chunk-5NUIKYSF.cjs} +83 -209
  13. package/dist/{chunk-ZLCY33FQ.cjs → chunk-7N77GIP4.cjs} +102 -88
  14. package/dist/{chunk-PVWZN66D.mjs → chunk-COCBCQQC.mjs} +121 -86
  15. package/dist/chunk-CVGNCUVU.cjs +154 -0
  16. package/dist/{chunk-KPWB2JAX.mjs → chunk-DSIZNRWA.mjs} +1540 -926
  17. package/dist/{chunk-75DVGSAX.cjs → chunk-DW2EQA2U.cjs} +6 -3
  18. package/dist/{chunk-2K44IE3V.mjs → chunk-EOMT5LKX.mjs} +374 -151
  19. package/dist/chunk-FZ5FZFIG.mjs +31 -0
  20. package/dist/chunk-GACIGCSN.cjs +31 -0
  21. package/dist/{chunk-TYBMAUGH.cjs → chunk-HOGZKHHY.cjs} +3 -3
  22. package/dist/{chunk-TQWEGW3A.mjs → chunk-LTMMETAB.mjs} +29 -15
  23. package/dist/{chunk-O4AXBFHU.mjs → chunk-OLCD75JK.mjs} +20 -146
  24. package/dist/{chunk-FKHPVLJY.cjs → chunk-RAADLTSW.cjs} +240 -205
  25. package/dist/{chunk-4ZXQPFNU.mjs → chunk-RN5VKWI6.mjs} +4 -1
  26. package/dist/{chunk-3STTWRAN.mjs → chunk-VUATPOWJ.mjs} +147 -189
  27. package/dist/{chunk-NHGFU3WC.mjs → chunk-XYJFEN5D.mjs} +1 -1
  28. package/dist/chunk-YREVFB64.mjs +154 -0
  29. package/dist/{chunk-65MLWUQD.cjs → chunk-ZMT4ATHR.cjs} +437 -214
  30. package/dist/claim.cjs +7 -6
  31. package/dist/claim.d.cts +11 -3
  32. package/dist/claim.d.ts +11 -3
  33. package/dist/claim.mjs +6 -5
  34. package/dist/{constants-FuzG3h4m.d.cts → constants-DBrWhJWE.d.cts} +12 -7
  35. package/dist/{constants-FuzG3h4m.d.ts → constants-DBrWhJWE.d.ts} +12 -7
  36. package/dist/constants.cjs +3 -9
  37. package/dist/constants.d.cts +2 -3
  38. package/dist/constants.d.ts +2 -3
  39. package/dist/constants.mjs +4 -10
  40. package/dist/deposit.cjs +8 -8
  41. package/dist/deposit.d.cts +2 -2
  42. package/dist/deposit.d.ts +2 -2
  43. package/dist/deposit.mjs +7 -7
  44. package/dist/embed.cjs +1268 -0
  45. package/dist/embed.d.cts +177 -0
  46. package/dist/embed.d.ts +177 -0
  47. package/dist/embed.mjs +1268 -0
  48. package/dist/index.cjs +11 -16
  49. package/dist/index.d.cts +3 -3
  50. package/dist/index.d.ts +3 -3
  51. package/dist/index.mjs +14 -19
  52. package/dist/modal-ui-state-OD1RmKkK.d.cts +30 -0
  53. package/dist/modal-ui-state-OD1RmKkK.d.ts +30 -0
  54. package/dist/polymarket.cjs +17 -7
  55. package/dist/polymarket.mjs +13 -3
  56. package/dist/styles.css +133 -98
  57. package/dist/{types-oFblf65g.d.ts → types-B89I8_8H.d.ts} +27 -1
  58. package/dist/{types-BO4iP6fG.d.cts → types-nnDR4tqA.d.cts} +27 -1
  59. package/dist/withdraw.cjs +6 -6
  60. package/dist/withdraw.d.cts +11 -3
  61. package/dist/withdraw.d.ts +11 -3
  62. package/dist/withdraw.mjs +5 -5
  63. package/package.json +33 -1
  64. package/dist/chunk-DMYA7U53.cjs +0 -11
  65. package/dist/chunk-O2TQLD4I.mjs +0 -11
@@ -24,7 +24,7 @@
24
24
 
25
25
 
26
26
 
27
- var _chunk65MLWUQDcjs = require('./chunk-65MLWUQD.cjs');
27
+ var _chunkZMT4ATHRcjs = require('./chunk-ZMT4ATHR.cjs');
28
28
 
29
29
 
30
30
 
@@ -33,7 +33,8 @@ var _chunk65MLWUQDcjs = require('./chunk-65MLWUQD.cjs');
33
33
 
34
34
 
35
35
 
36
- var _chunkO7BCVQ6Lcjs = require('./chunk-O7BCVQ6L.cjs');
36
+
37
+ var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
37
38
 
38
39
  // src/core/removed-props.ts
39
40
  var MANAGED_ACCOUNT_REMOVALS = {
@@ -62,7 +63,7 @@ var REMOVED_PROPS = {
62
63
  }
63
64
  };
64
65
  var REMOVED_UI_CONFIG_KEYS = {
65
- checkLiquidity: "removed \u2014 the liquidity cap is shown on the QR / transfer screen, which checks it directly.",
66
+ checkLiquidity: "removed \u2014 the modal no longer surfaces a liquidity cap. Route capacity is enforced when the deposit is processed.",
66
67
  showHistoryButton: "removed \u2014 deposit history is always offered, from the modal's home screen. There is no way to hide it."
67
68
  };
68
69
  var warned = /* @__PURE__ */ new Set();
@@ -96,77 +97,27 @@ function warnRemovedProps(component, props) {
96
97
  }
97
98
  }
98
99
 
99
- // src/core/useTokenPrices.ts
100
- var _react = require('react');
101
- function isErc20(token) {
102
- return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !== _chunkO7BCVQ6Lcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
103
- }
104
- function caip2For(token) {
105
- return `${_chunkO7BCVQ6Lcjs.toEvmCaip2.call(void 0, token.chainId)}:${token.address.toLowerCase()}`;
100
+ // src/core/submission-uncertainty.ts
101
+ var MARKER = "__rhinestoneSubmissionUncertain";
102
+ function markSubmissionUncertain(error) {
103
+ Object.defineProperty(error, MARKER, {
104
+ value: true,
105
+ enumerable: false
106
+ });
107
+ return error;
106
108
  }
107
- async function fetchTokenPriceUsd(service, token) {
108
- if (isErc20(token)) {
109
- const caip2 = caip2For(token);
110
- const prices2 = await service.fetchPricesByAddress([caip2]);
111
- const price2 = prices2[caip2];
112
- return typeof price2 === "number" && price2 > 0 ? price2 : null;
109
+ function isSubmissionUncertain(error) {
110
+ let current = error;
111
+ for (let depth = 0; depth < 10; depth += 1) {
112
+ if (typeof current !== "object" || current === null) return false;
113
+ if (current[MARKER] === true) return true;
114
+ current = current.cause;
113
115
  }
114
- const symbol = token.symbol.toUpperCase();
115
- const prices = await service.fetchPrices([symbol]);
116
- const price = prices[symbol];
117
- return typeof price === "number" && price > 0 ? price : null;
118
- }
119
- function useTokenPrices(service, tokens) {
120
- const [prices, setPrices] = _react.useState.call(void 0, {});
121
- const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _ => _.symbol])));
122
- const entries = [
123
- ...new Map(
124
- defined.map((token) => {
125
- const erc20 = isErc20(token);
126
- const caip2 = erc20 ? caip2For(token) : null;
127
- const symbol = token.symbol.toUpperCase();
128
- return [_nullishCoalesce(caip2, () => ( `sym:${symbol}`)), { symbol, caip2 }];
129
- })
130
- ).values()
131
- ].sort(
132
- (a, b) => (_nullishCoalesce(a.caip2, () => ( a.symbol))).localeCompare(_nullishCoalesce(b.caip2, () => ( b.symbol)))
133
- );
134
- const key = JSON.stringify(entries);
135
- _react.useEffect.call(void 0, () => {
136
- if (key === "[]") return;
137
- let cancelled = false;
138
- const parsed = JSON.parse(key);
139
- const symbols = [
140
- ...new Set(parsed.filter((e) => !e.caip2).map((e) => e.symbol))
141
- ];
142
- const caip2Ids = [
143
- ...new Set(
144
- parsed.filter((e) => e.caip2).map((e) => e.caip2)
145
- )
146
- ];
147
- Promise.all([
148
- symbols.length > 0 ? service.fetchPrices(symbols) : Promise.resolve({}),
149
- caip2Ids.length > 0 ? service.fetchPricesByAddress(caip2Ids) : Promise.resolve({})
150
- ]).then(([bySymbol, byAddress]) => {
151
- if (cancelled) return;
152
- const merged = { ...bySymbol };
153
- for (const entry of parsed) {
154
- if (!entry.caip2) continue;
155
- const price = byAddress[entry.caip2];
156
- if (typeof price === "number") merged[entry.symbol] = price;
157
- }
158
- setPrices(merged);
159
- }).catch(() => {
160
- });
161
- return () => {
162
- cancelled = true;
163
- };
164
- }, [service, key]);
165
- return prices;
116
+ return false;
166
117
  }
167
118
 
168
119
  // src/components/steps/ProcessingStep.tsx
169
-
120
+ var _react = require('react');
170
121
 
171
122
  // src/components/ui/Tooltip.tsx
172
123
 
@@ -197,8 +148,8 @@ function Tooltip({ content, children, className }) {
197
148
  function handleOutside(event) {
198
149
  const target = event.target;
199
150
  if (!target) return;
200
- if (_optionalChain([triggerRef, 'access', _2 => _2.current, 'optionalAccess', _3 => _3.contains, 'call', _4 => _4(target)])) return;
201
- if (_optionalChain([bubbleRef, 'access', _5 => _5.current, 'optionalAccess', _6 => _6.contains, 'call', _7 => _7(target)])) return;
151
+ if (_optionalChain([triggerRef, 'access', _ => _.current, 'optionalAccess', _2 => _2.contains, 'call', _3 => _3(target)])) return;
152
+ if (_optionalChain([bubbleRef, 'access', _4 => _4.current, 'optionalAccess', _5 => _5.contains, 'call', _6 => _6(target)])) return;
202
153
  setOpen(false);
203
154
  }
204
155
  function handleKey(event) {
@@ -275,7 +226,7 @@ function FeesAccordion({ total, rows, tooltip }) {
275
226
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-fees-accordion-summary", children: [
276
227
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-fees-accordion-label", children: [
277
228
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
278
- tooltip && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: tooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fees info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.InfoIcon, {}) }) })
229
+ tooltip && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Tooltip, { content: tooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fees info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.InfoIcon, {}) }) })
279
230
  ] }),
280
231
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
281
232
  "button",
@@ -293,7 +244,7 @@ function FeesAccordion({ total, rows, tooltip }) {
293
244
  {
294
245
  className: `rs-fees-accordion-chevron${open ? " rs-fees-accordion-chevron--open" : ""}`,
295
246
  "aria-hidden": "true",
296
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.ChevronDownIcon, {})
247
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ChevronDownIcon, {})
297
248
  }
298
249
  )
299
250
  ]
@@ -315,7 +266,7 @@ function FeesAccordion({ total, rows, tooltip }) {
315
266
  {
316
267
  className: "rs-review-detail-info",
317
268
  "aria-label": `${row.label} info`,
318
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.InfoIcon, {})
269
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.InfoIcon, {})
319
270
  }
320
271
  ) })
321
272
  ] })
@@ -341,13 +292,13 @@ function SwappedReceipt({
341
292
  }) {
342
293
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
343
294
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
344
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CheckIcon, {}), title: "Deposit successful" }),
295
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CheckIcon, {}), title: "Deposit successful" }),
345
296
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
346
297
  onrampMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
347
298
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Onramp method" }),
348
299
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
349
300
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: onrampMethod }),
350
- onrampMethodIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon rs-review-detail-icon--square", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CdnIcon, { src: onrampMethodIcon }) })
301
+ onrampMethodIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon rs-review-detail-icon--square", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CdnIcon, { src: onrampMethodIcon }) })
351
302
  ] })
352
303
  ] }),
353
304
  amountPaid && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -358,7 +309,7 @@ function SwappedReceipt({
358
309
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
359
310
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
360
311
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
361
- depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.TokenIcon, { symbol: depositedSymbol }) })
312
+ depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: depositedSymbol }) })
362
313
  ] })
363
314
  ] }),
364
315
  feesTotal != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -371,11 +322,11 @@ function SwappedReceipt({
371
322
  )
372
323
  ] }),
373
324
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
374
- onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
375
- onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
325
+ onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
326
+ onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
376
327
  ] })
377
328
  ] }),
378
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.PoweredBy, {})
329
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.PoweredBy, {})
379
330
  ] });
380
331
  }
381
332
  SwappedReceipt.displayName = "SwappedReceipt";
@@ -394,7 +345,7 @@ var EXCHANGE_SLUGS = [
394
345
  "kucoin"
395
346
  ];
396
347
  var EXCHANGE_LOGO_SOURCES = Object.fromEntries(
397
- EXCHANGE_SLUGS.map((slug) => [slug, _chunkO7BCVQ6Lcjs.cdnIconUrl.call(void 0, "exchanges", slug)])
348
+ EXCHANGE_SLUGS.map((slug) => [slug, _chunk4KCSH4T3cjs.cdnIconUrl.call(void 0, "exchanges", slug)])
398
349
  );
399
350
  var EXCHANGE_LOGO_ALIASES = {
400
351
  gate: "gateio"
@@ -411,7 +362,7 @@ function getExchangeLogoSrc(name, connection) {
411
362
  }
412
363
  function getExchangeLogo(name, connection) {
413
364
  const src = getExchangeLogoSrc(name, connection);
414
- return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CdnIcon, { src }) : null;
365
+ return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CdnIcon, { src }) : null;
415
366
  }
416
367
 
417
368
  // src/core/webhook.ts
@@ -427,7 +378,7 @@ function asNumber(value) {
427
378
  const trimmed = value.trim();
428
379
  if (!trimmed) return void 0;
429
380
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
430
- if (_optionalChain([caipMatch, 'optionalAccess', _8 => _8[1]])) {
381
+ if (_optionalChain([caipMatch, 'optionalAccess', _7 => _7[1]])) {
431
382
  const parsed2 = Number(caipMatch[1]);
432
383
  return Number.isFinite(parsed2) ? parsed2 : void 0;
433
384
  }
@@ -446,24 +397,24 @@ function asAddress(value) {
446
397
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
447
398
  }
448
399
  function getEventTxHash(event) {
449
- if (!_optionalChain([event, 'optionalAccess', _9 => _9.type])) return void 0;
400
+ if (!_optionalChain([event, 'optionalAccess', _8 => _8.type])) return void 0;
450
401
  if (event.type === "deposit-received") {
451
- return asString(_optionalChain([event, 'access', _10 => _10.data, 'optionalAccess', _11 => _11.transactionHash]));
402
+ return asString(_optionalChain([event, 'access', _9 => _9.data, 'optionalAccess', _10 => _10.transactionHash]));
452
403
  }
453
404
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
454
- const deposit = isRecord(_optionalChain([event, 'access', _12 => _12.data, 'optionalAccess', _13 => _13.deposit])) ? event.data.deposit : void 0;
455
- const source = isRecord(_optionalChain([event, 'access', _14 => _14.data, 'optionalAccess', _15 => _15.source])) ? event.data.source : void 0;
456
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _16 => _16.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _17 => _17.transactionHash]))));
405
+ const deposit = isRecord(_optionalChain([event, 'access', _11 => _11.data, 'optionalAccess', _12 => _12.deposit])) ? event.data.deposit : void 0;
406
+ const source = isRecord(_optionalChain([event, 'access', _13 => _13.data, 'optionalAccess', _14 => _14.source])) ? event.data.source : void 0;
407
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _15 => _15.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _16 => _16.transactionHash]))));
457
408
  }
458
409
  if (event.type === "bridge-failed" || event.type === "error") {
459
- const deposit = isRecord(_optionalChain([event, 'access', _18 => _18.data, 'optionalAccess', _19 => _19.deposit])) ? event.data.deposit : void 0;
460
- const source = isRecord(_optionalChain([event, 'access', _20 => _20.data, 'optionalAccess', _21 => _21.source])) ? event.data.source : void 0;
461
- return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _22 => _22.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _23 => _23.transactionHash]))));
410
+ const deposit = isRecord(_optionalChain([event, 'access', _17 => _17.data, 'optionalAccess', _18 => _18.deposit])) ? event.data.deposit : void 0;
411
+ const source = isRecord(_optionalChain([event, 'access', _19 => _19.data, 'optionalAccess', _20 => _20.source])) ? event.data.source : void 0;
412
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _21 => _21.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _22 => _22.transactionHash]))));
462
413
  }
463
414
  return void 0;
464
415
  }
465
416
  function getEventSourceDetails(event) {
466
- if (!_optionalChain([event, 'optionalAccess', _24 => _24.type]) || !isRecord(event.data)) return {};
417
+ if (!_optionalChain([event, 'optionalAccess', _23 => _23.type]) || !isRecord(event.data)) return {};
467
418
  if (event.type === "deposit-received") {
468
419
  return {
469
420
  chainId: asNumber(event.data.chain),
@@ -475,9 +426,9 @@ function getEventSourceDetails(event) {
475
426
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
476
427
  if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") {
477
428
  return {
478
- chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _25 => _25.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _26 => _26.chain])))),
479
- amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _27 => _27.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _28 => _28.amount])))),
480
- token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _29 => _29.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _30 => _30.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _31 => _31.token]))))
429
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _24 => _24.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _25 => _25.chain])))),
430
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _26 => _26.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _27 => _27.amount])))),
431
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _28 => _28.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _29 => _29.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _30 => _30.token]))))
481
432
  };
482
433
  }
483
434
  return {};
@@ -491,7 +442,7 @@ function asChain(value) {
491
442
  return asNumber(value);
492
443
  }
493
444
  function getEventDestinationDetails(event) {
494
- if (!_optionalChain([event, 'optionalAccess', _32 => _32.type]) || !isRecord(event.data)) return {};
445
+ if (!_optionalChain([event, 'optionalAccess', _31 => _31.type]) || !isRecord(event.data)) return {};
495
446
  if (event.type !== "bridge-started" && event.type !== "bridge-complete") {
496
447
  return {};
497
448
  }
@@ -501,14 +452,14 @@ function getEventDestinationDetails(event) {
501
452
  return {
502
453
  chainId: asChain(destination.chain),
503
454
  amount: asAmount(destination.amount),
504
- token: _optionalChain([token, 'optionalAccess', _33 => _33.trim, 'call', _34 => _34()]) || void 0
455
+ token: _optionalChain([token, 'optionalAccess', _32 => _32.trim, 'call', _33 => _33()]) || void 0
505
456
  };
506
457
  }
507
458
  function isDepositEvent(event) {
508
- return _optionalChain([event, 'optionalAccess', _35 => _35.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _36 => _36.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _37 => _37.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _38 => _38.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _39 => _39.type]) === "error";
459
+ return _optionalChain([event, 'optionalAccess', _34 => _34.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _35 => _35.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _36 => _36.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _37 => _37.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _38 => _38.type]) === "error";
509
460
  }
510
461
  function isFailedEvent(event) {
511
- return _optionalChain([event, 'optionalAccess', _40 => _40.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _41 => _41.type]) === "error";
462
+ return _optionalChain([event, 'optionalAccess', _39 => _39.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _40 => _40.type]) === "error";
512
463
  }
513
464
  function isHexString(value) {
514
465
  return value.startsWith("0x") || value.startsWith("0X");
@@ -520,7 +471,7 @@ function txRefsMatch(a, b) {
520
471
  return a === b;
521
472
  }
522
473
  function formatBridgeFailedMessage(event) {
523
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _42 => _42.data]), () => ( {}));
474
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _41 => _41.data]), () => ( {}));
524
475
  const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
525
476
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
526
477
  function toUserFacingFailure(raw) {
@@ -548,13 +499,77 @@ function formatBridgeFailedMessage(event) {
548
499
  return { message: "Bridge failed" };
549
500
  }
550
501
  function failureMessageForEvent(event) {
551
- if (_optionalChain([event, 'optionalAccess', _43 => _43.type]) === "error") {
502
+ if (_optionalChain([event, 'optionalAccess', _42 => _42.type]) === "error") {
552
503
  const message = isRecord(event.data) ? asString(event.data.message) : void 0;
553
504
  return _nullishCoalesce(message, () => ( "Unknown error"));
554
505
  }
555
506
  return formatBridgeFailedMessage(event).message;
556
507
  }
557
508
 
509
+ // src/core/useTokenPrices.ts
510
+
511
+ var PRICE_SERVICE_NATIVE = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
512
+ var WRAPPED_SOL_MINT = "So11111111111111111111111111111111111111112";
513
+ var SOL_SYSTEM_PROGRAM = "11111111111111111111111111111111";
514
+ function isSolanaNativeAddress(address) {
515
+ if (!address) return true;
516
+ const lower = address.toLowerCase();
517
+ return lower === "native" || lower === SOL_SYSTEM_PROGRAM;
518
+ }
519
+ function isNativeAddress(address) {
520
+ if (!address) return true;
521
+ return address.toLowerCase() === _chunk4KCSH4T3cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
522
+ }
523
+ function caip2For(token) {
524
+ if (token.chainId === "solana") {
525
+ const mint = isSolanaNativeAddress(token.address) ? WRAPPED_SOL_MINT : token.address;
526
+ return mint ? `${_chunk4KCSH4T3cjs.SOLANA_MAINNET_CAIP2}:${mint}` : void 0;
527
+ }
528
+ if (typeof token.chainId !== "number") return void 0;
529
+ const address = isNativeAddress(token.address) ? PRICE_SERVICE_NATIVE : token.address;
530
+ return `${_chunk4KCSH4T3cjs.toEvmCaip2.call(void 0, token.chainId)}:${address.toLowerCase()}`;
531
+ }
532
+ async function fetchTokenPriceUsd(service, token) {
533
+ const caip2 = caip2For(token);
534
+ if (!caip2) return null;
535
+ const prices = await service.fetchPricesByAddress([caip2]);
536
+ const price = prices[caip2];
537
+ return typeof price === "number" && price > 0 ? price : null;
538
+ }
539
+ function useTokenPrices(service, tokens) {
540
+ const [prices, setPrices] = _react.useState.call(void 0, {});
541
+ const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _43 => _43.symbol])));
542
+ const entries = [
543
+ ...new Map(
544
+ defined.flatMap((token) => {
545
+ const caip2 = caip2For(token);
546
+ return caip2 ? [{ symbol: token.symbol.toUpperCase(), caip2 }] : [];
547
+ }).map((entry) => [entry.caip2, entry])
548
+ ).values()
549
+ ].sort((a, b) => a.caip2.localeCompare(b.caip2));
550
+ const key = JSON.stringify(entries);
551
+ _react.useEffect.call(void 0, () => {
552
+ if (key === "[]") return;
553
+ let cancelled = false;
554
+ const parsed = JSON.parse(key);
555
+ const caip2Ids = [...new Set(parsed.map((e) => e.caip2))];
556
+ service.fetchPricesByAddress(caip2Ids).then((byAddress) => {
557
+ if (cancelled) return;
558
+ const merged = {};
559
+ for (const entry of parsed) {
560
+ const price = byAddress[entry.caip2];
561
+ if (typeof price === "number") merged[entry.symbol] = price;
562
+ }
563
+ setPrices(merged);
564
+ }).catch(() => {
565
+ });
566
+ return () => {
567
+ cancelled = true;
568
+ };
569
+ }, [service, key]);
570
+ return prices;
571
+ }
572
+
558
573
  // src/components/steps/ProcessingStep.tsx
559
574
 
560
575
  function SuccessBadge() {
@@ -656,14 +671,14 @@ function buildQuoteFeeRows(breakdown, sponsoredTooltip) {
656
671
  if (!breakdown) return { rows: [], chargeableUsd: 0 };
657
672
  const rows = [];
658
673
  let chargeableUsd = 0;
659
- for (const group of _chunk65MLWUQDcjs.quoteFeeGroups.call(void 0, breakdown)) {
674
+ for (const group of _chunkZMT4ATHRcjs.quoteFeeGroups.call(void 0, breakdown)) {
660
675
  if (group.chargedUsd > 0) {
661
676
  chargeableUsd += group.chargedUsd;
662
- rows.push({ label: group.label, value: _chunk65MLWUQDcjs.formatFeeUsd.call(void 0, group.chargedUsd) });
677
+ rows.push({ label: group.label, value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, group.chargedUsd) });
663
678
  } else if (group.sponsoredUsd > 0) {
664
679
  rows.push({
665
680
  label: group.label,
666
- value: _chunk65MLWUQDcjs.formatFeeUsd.call(void 0, group.sponsoredUsd),
681
+ value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, group.sponsoredUsd),
667
682
  strike: true,
668
683
  tooltip: sponsoredTooltip
669
684
  });
@@ -837,6 +852,9 @@ function getInitialProcessingState(event, txHash) {
837
852
  }
838
853
  return null;
839
854
  }
855
+ function getSettledSourceTxHash(event, fallbackTxHash) {
856
+ return _nullishCoalesce(_optionalChain([event, 'optionalAccess', _66 => _66.data, 'optionalAccess', _67 => _67.source, 'optionalAccess', _68 => _68.transactionHash]), () => ( fallbackTxHash));
857
+ }
840
858
  function ProcessingStep({
841
859
  smartAccount,
842
860
  solanaDepositAddress,
@@ -850,6 +868,7 @@ function ProcessingStep({
850
868
  amountUsd,
851
869
  service,
852
870
  directTransfer,
871
+ sourceTxHashPending,
853
872
  initialEvent,
854
873
  flowLabel = "deposit",
855
874
  debug,
@@ -872,7 +891,7 @@ function ProcessingStep({
872
891
  const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
873
892
  const pollTimeoutRef = _react.useRef.call(void 0, null);
874
893
  const escalatedDelayRef = _react.useRef.call(void 0, false);
875
- const processingContextRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, {
894
+ const processingContextRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, {
876
895
  amount,
877
896
  sourceChain,
878
897
  sourceToken,
@@ -881,10 +900,10 @@ function ProcessingStep({
881
900
  targetChain,
882
901
  targetToken
883
902
  });
884
- const onDepositCompleteRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onDepositComplete);
885
- const onDepositFailedRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onDepositFailed);
886
- const onErrorRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onError);
887
- const explorerTxUrl = _chunk65MLWUQDcjs.useExplorerTxUrl.call(void 0, );
903
+ const onDepositCompleteRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onDepositComplete);
904
+ const onDepositFailedRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onDepositFailed);
905
+ const onErrorRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onError);
906
+ const explorerTxUrl = _chunkZMT4ATHRcjs.useExplorerTxUrl.call(void 0, );
888
907
  const initialTerminalEventRef = _react.useRef.call(void 0, null);
889
908
  const [state, setState] = _react.useState.call(void 0, () => {
890
909
  if (directTransfer) return { type: "complete" };
@@ -928,12 +947,12 @@ function ProcessingStep({
928
947
  completedAt,
929
948
  endedAt: completedAt
930
949
  }));
931
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
950
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
932
951
  txHash,
933
952
  flowLabel
934
953
  });
935
954
  const context = processingContextRef.current;
936
- _optionalChain([onDepositCompleteRef, 'access', _66 => _66.current, 'optionalCall', _67 => _67(txHash, void 0, {
955
+ _optionalChain([onDepositCompleteRef, 'access', _69 => _69.current, 'optionalCall', _70 => _70(txHash, void 0, {
937
956
  amount: context.amount,
938
957
  sourceChain: context.sourceChain,
939
958
  sourceToken: context.sourceToken,
@@ -959,28 +978,34 @@ function ProcessingStep({
959
978
  if (!outcome) return;
960
979
  if (outcome.type === "complete") {
961
980
  const context = processingContextRef.current;
962
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
981
+ const sourceTxHash2 = getSettledSourceTxHash(event, txHash);
982
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
963
983
  txHash,
984
+ sourceTxHash: sourceTxHash2,
964
985
  destinationTxHash: outcome.destinationTxHash,
965
986
  event: event.type
966
987
  });
967
- _optionalChain([onDepositCompleteRef, 'access', _68 => _68.current, 'optionalCall', _69 => _69(txHash, outcome.destinationTxHash, {
968
- amount: context.amount,
969
- sourceChain: context.sourceChain,
970
- sourceToken: context.sourceToken,
971
- sourceDecimals: context.sourceDecimals,
972
- amountUsd: context.amountUsd,
973
- targetChain: context.targetChain,
974
- targetToken: context.targetToken
975
- })]);
988
+ _optionalChain([onDepositCompleteRef, 'access', _71 => _71.current, 'optionalCall', _72 => _72(
989
+ sourceTxHash2,
990
+ outcome.destinationTxHash,
991
+ {
992
+ amount: context.amount,
993
+ sourceChain: context.sourceChain,
994
+ sourceToken: context.sourceToken,
995
+ sourceDecimals: context.sourceDecimals,
996
+ amountUsd: context.amountUsd,
997
+ targetChain: context.targetChain,
998
+ targetToken: context.targetToken
999
+ }
1000
+ )]);
976
1001
  return;
977
1002
  }
978
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
1003
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
979
1004
  txHash,
980
1005
  message: outcome.message,
981
1006
  event: event.type
982
1007
  });
983
- _optionalChain([onDepositFailedRef, 'access', _70 => _70.current, 'optionalCall', _71 => _71(txHash, outcome.message)]);
1008
+ _optionalChain([onDepositFailedRef, 'access', _73 => _73.current, 'optionalCall', _74 => _74(txHash, outcome.message)]);
984
1009
  }, [
985
1010
  debug,
986
1011
  onDepositCompleteRef,
@@ -1012,13 +1037,13 @@ function ProcessingStep({
1012
1037
  updatePhaseTimings(
1013
1038
  (previous) => syncPhaseTimings(previous, state.lastEvent)
1014
1039
  );
1015
- }, [_optionalChain([state, 'access', _72 => _72.lastEvent, 'optionalAccess', _73 => _73.time]), _optionalChain([state, 'access', _74 => _74.lastEvent, 'optionalAccess', _75 => _75.type]), updatePhaseTimings]);
1040
+ }, [_optionalChain([state, 'access', _75 => _75.lastEvent, 'optionalAccess', _76 => _76.time]), _optionalChain([state, 'access', _77 => _77.lastEvent, 'optionalAccess', _78 => _78.type]), updatePhaseTimings]);
1016
1041
  const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
1017
1042
  _react.useEffect.call(void 0, () => {
1018
1043
  let cancelled = false;
1019
1044
  let timeoutId;
1020
- const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _76 => _76.variant]) === "fiat";
1021
- const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _77 => _77.expectedOrderUuid]), () => ( null));
1045
+ const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _79 => _79.variant]) === "fiat";
1046
+ const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _80 => _80.expectedOrderUuid]), () => ( null));
1022
1047
  setSwappedFiatContext(null);
1023
1048
  if (isFiatSwappedOrder && !expectedOrderUuid) {
1024
1049
  return () => {
@@ -1068,8 +1093,8 @@ function ProcessingStep({
1068
1093
  smartAccount,
1069
1094
  txHash,
1070
1095
  isSwappedOrder,
1071
- _optionalChain([swappedContext, 'optionalAccess', _78 => _78.variant]),
1072
- _optionalChain([swappedContext, 'optionalAccess', _79 => _79.expectedOrderUuid])
1096
+ _optionalChain([swappedContext, 'optionalAccess', _81 => _81.variant]),
1097
+ _optionalChain([swappedContext, 'optionalAccess', _82 => _82.expectedOrderUuid])
1073
1098
  ]);
1074
1099
  _react.useEffect.call(void 0, () => {
1075
1100
  if (directTransfer) return;
@@ -1081,7 +1106,7 @@ function ProcessingStep({
1081
1106
  async function pollStatus() {
1082
1107
  try {
1083
1108
  const account = sourceChain === "solana" && solanaDepositAddress ? solanaDepositAddress : smartAccount;
1084
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
1109
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
1085
1110
  account,
1086
1111
  txHash,
1087
1112
  intervalMs: pollIntervalRef.current
@@ -1092,23 +1117,28 @@ function ProcessingStep({
1092
1117
  const eventForCurrentTx = eventMatchesTx ? lastEvent2 : void 0;
1093
1118
  if (lastEvent2) {
1094
1119
  const eventData = lastEvent2.data;
1095
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
1120
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
1096
1121
  type: lastEvent2.type,
1097
1122
  matchesTx: eventMatchesTx,
1098
- intentId: _optionalChain([eventData, 'optionalAccess', _80 => _80.intentId])
1123
+ intentId: _optionalChain([eventData, 'optionalAccess', _83 => _83.intentId])
1099
1124
  });
1100
1125
  }
1101
1126
  if (!isMounted) return;
1102
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _81 => _81.type]) === "bridge-complete") {
1127
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _84 => _84.type]) === "bridge-complete") {
1103
1128
  setState({ type: "complete", lastEvent: eventForCurrentTx });
1104
- const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _82 => _82.data, 'optionalAccess', _83 => _83.destination, 'optionalAccess', _84 => _84.transactionHash]);
1105
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "state:complete", {
1129
+ const sourceTxHash2 = getSettledSourceTxHash(
1130
+ eventForCurrentTx,
1131
+ txHash
1132
+ );
1133
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.destination, 'optionalAccess', _87 => _87.transactionHash]);
1134
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "state:complete", {
1106
1135
  txHash,
1136
+ sourceTxHash: sourceTxHash2,
1107
1137
  destinationTxHash: destinationTxHash2,
1108
1138
  event: eventForCurrentTx.type
1109
1139
  });
1110
1140
  const context = processingContextRef.current;
1111
- _optionalChain([onDepositCompleteRef, 'access', _85 => _85.current, 'optionalCall', _86 => _86(txHash, destinationTxHash2, {
1141
+ _optionalChain([onDepositCompleteRef, 'access', _88 => _88.current, 'optionalCall', _89 => _89(sourceTxHash2, destinationTxHash2, {
1112
1142
  amount: context.amount,
1113
1143
  sourceChain: context.sourceChain,
1114
1144
  sourceToken: context.sourceToken,
@@ -1119,33 +1149,33 @@ function ProcessingStep({
1119
1149
  })]);
1120
1150
  return;
1121
1151
  }
1122
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _87 => _87.type]) === "bridge-failed") {
1152
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _90 => _90.type]) === "bridge-failed") {
1123
1153
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
1124
1154
  setState({
1125
1155
  type: "failed",
1126
1156
  message: formatted.message,
1127
1157
  lastEvent: eventForCurrentTx
1128
1158
  });
1129
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
1159
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
1130
1160
  txHash,
1131
1161
  message: formatted.message,
1132
1162
  code: formatted.code
1133
1163
  });
1134
- _optionalChain([onDepositFailedRef, 'access', _88 => _88.current, 'optionalCall', _89 => _89(txHash, formatted.message)]);
1164
+ _optionalChain([onDepositFailedRef, 'access', _91 => _91.current, 'optionalCall', _92 => _92(txHash, formatted.message)]);
1135
1165
  return;
1136
1166
  }
1137
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _90 => _90.type]) === "error") {
1138
- const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _91 => _91.data, 'optionalAccess', _92 => _92.message]), () => ( "Unknown error"));
1167
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _93 => _93.type]) === "error") {
1168
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _94 => _94.data, 'optionalAccess', _95 => _95.message]), () => ( "Unknown error"));
1139
1169
  setState({
1140
1170
  type: "failed",
1141
1171
  message: errorMessage,
1142
1172
  lastEvent: eventForCurrentTx
1143
1173
  });
1144
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
1174
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
1145
1175
  txHash,
1146
1176
  message: errorMessage
1147
1177
  });
1148
- _optionalChain([onDepositFailedRef, 'access', _93 => _93.current, 'optionalCall', _94 => _94(txHash, errorMessage)]);
1178
+ _optionalChain([onDepositFailedRef, 'access', _96 => _96.current, 'optionalCall', _97 => _97(txHash, errorMessage)]);
1149
1179
  return;
1150
1180
  }
1151
1181
  setState((previous) => ({
@@ -1154,7 +1184,7 @@ function ProcessingStep({
1154
1184
  }));
1155
1185
  scheduleNextPoll();
1156
1186
  } catch (error) {
1157
- _chunk65MLWUQDcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
1187
+ _chunkZMT4ATHRcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
1158
1188
  smartAccount,
1159
1189
  txHash,
1160
1190
  intervalMs: pollIntervalRef.current
@@ -1169,7 +1199,7 @@ function ProcessingStep({
1169
1199
  pollIntervalRef.current * BACKOFF_MULTIPLIER,
1170
1200
  MAX_POLL_INTERVAL
1171
1201
  );
1172
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
1202
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
1173
1203
  nextIntervalMs: pollIntervalRef.current
1174
1204
  });
1175
1205
  pollStatus();
@@ -1202,11 +1232,11 @@ function ProcessingStep({
1202
1232
  escalatedDelayRef.current = true;
1203
1233
  setHasEscalatedDelay(true);
1204
1234
  const message = "Transfer is taking longer than expected. Your funds are safe and processing will continue automatically.";
1205
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
1235
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
1206
1236
  txHash,
1207
1237
  timeoutMs: ESCALATED_DELAY_MS
1208
1238
  });
1209
- _optionalChain([onErrorRef, 'access', _95 => _95.current, 'optionalCall', _96 => _96(message, "PROCESS_TIMEOUT")]);
1239
+ _optionalChain([onErrorRef, 'access', _98 => _98.current, 'optionalCall', _99 => _99(message, "PROCESS_TIMEOUT")]);
1210
1240
  }, ESCALATED_DELAY_MS);
1211
1241
  return () => clearTimeout(timeoutId);
1212
1242
  }, [debug, directTransfer, onErrorRef, state.type, txHash]);
@@ -1218,16 +1248,19 @@ function ProcessingStep({
1218
1248
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
1219
1249
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
1220
1250
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
1221
- const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _97 => _97.data, 'optionalAccess', _98 => _98.destination, 'optionalAccess', _99 => _99.transactionHash]) || null;
1251
+ const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _100 => _100.data, 'optionalAccess', _101 => _101.destination, 'optionalAccess', _102 => _102.transactionHash]) || null;
1252
+ const sourceTxHash = getSettledSourceTxHash(lastEvent, txHash);
1222
1253
  const sourceDetails = getEventSourceDetails(lastEvent);
1223
1254
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
1224
1255
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
1225
1256
  const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
1226
- const targetChainId = _chunkO7BCVQ6Lcjs.targetChainToChainId.call(void 0, targetChain);
1227
- const sourceExplorerUrl = explorerTxUrl(displaySourceChain, txHash);
1257
+ const targetChainId = _chunk4KCSH4T3cjs.targetChainToChainId.call(void 0, targetChain);
1258
+ const settledSourceTxHash = _optionalChain([lastEvent, 'optionalAccess', _103 => _103.data, 'optionalAccess', _104 => _104.source, 'optionalAccess', _105 => _105.transactionHash]);
1259
+ const sourceExplorerHash = _nullishCoalesce(settledSourceTxHash, () => ( (sourceTxHashPending ? null : sourceTxHash)));
1260
+ const sourceExplorerUrl = sourceExplorerHash ? explorerTxUrl(displaySourceChain, sourceExplorerHash) : null;
1228
1261
  const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainId, destinationTxHash) : null;
1229
1262
  const sourceDisplay = (() => {
1230
- const resolved = _chunk65MLWUQDcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
1263
+ const resolved = _chunkZMT4ATHRcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
1231
1264
  symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
1232
1265
  decimals: providedSourceDecimals
1233
1266
  });
@@ -1237,10 +1270,10 @@ function ProcessingStep({
1237
1270
  };
1238
1271
  })();
1239
1272
  const sourceSymbol = sourceDisplay.symbol;
1240
- const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(_chunk65MLWUQDcjs.formatRawTokenAmount.call(void 0, displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
1241
- _chunk65MLWUQDcjs.formatTokenAmount.call(void 0, Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
1273
+ const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(_chunkZMT4ATHRcjs.formatRawTokenAmount.call(void 0, displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
1274
+ _chunkZMT4ATHRcjs.formatTokenAmount.call(void 0, Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
1242
1275
  const eventDestination = getEventDestinationDetails(lastEvent);
1243
- const targetDisplay = _chunk65MLWUQDcjs.resolveTokenDisplay.call(void 0,
1276
+ const targetDisplay = _chunkZMT4ATHRcjs.resolveTokenDisplay.call(void 0,
1244
1277
  _nullishCoalesce(eventDestination.token, () => ( targetToken)),
1245
1278
  _nullishCoalesce(eventDestination.chainId, () => ( targetChainId)),
1246
1279
  // Dapp deposits default to USDC targets; mirror the source symbol last so
@@ -1248,7 +1281,7 @@ function ProcessingStep({
1248
1281
  { symbol: _nullishCoalesce(providedSourceSymbol, () => ( "USDC")) }
1249
1282
  );
1250
1283
  const targetSymbol = targetDisplay.symbol;
1251
- const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunk65MLWUQDcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
1284
+ const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunkZMT4ATHRcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
1252
1285
  const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
1253
1286
  const prices = useTokenPrices(service, [
1254
1287
  {
@@ -1263,17 +1296,17 @@ function ProcessingStep({
1263
1296
  }
1264
1297
  ]);
1265
1298
  const estimatedReceiveAmount = (() => {
1266
- const estimate = _chunk65MLWUQDcjs.estimateReceiveAmount.call(void 0, {
1267
- sourceAmount: _chunk65MLWUQDcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
1299
+ const estimate = _chunkZMT4ATHRcjs.estimateReceiveAmount.call(void 0, {
1300
+ sourceAmount: _chunkZMT4ATHRcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
1268
1301
  sourceSymbol: sourceDisplay.symbol,
1269
1302
  targetSymbol: targetDisplay.symbol,
1270
1303
  sourceAmountUsd: amountUsdNumber,
1271
- sourceTrusted: _chunk65MLWUQDcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
1304
+ sourceTrusted: _chunkZMT4ATHRcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
1272
1305
  prices
1273
1306
  });
1274
- return estimate !== void 0 ? _chunk65MLWUQDcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
1307
+ return estimate !== void 0 ? _chunkZMT4ATHRcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
1275
1308
  })();
1276
- const quotedReceive = quote ? _chunk65MLWUQDcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
1309
+ const quotedReceive = quote ? _chunkZMT4ATHRcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
1277
1310
  const receiveDisplay = formattedDestinationAmount ? (
1278
1311
  // The delivered amount, once the bridge reports it — actual, not an
1279
1312
  // estimate, so it wins over the quote and carries no "~".
@@ -1287,12 +1320,12 @@ function ProcessingStep({
1287
1320
  if (sourceSymbol.toUpperCase() !== targetSymbol.toUpperCase()) {
1288
1321
  return void 0;
1289
1322
  }
1290
- const sentValue = _chunk65MLWUQDcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals);
1291
- const receivedValue = eventDestination.amount !== void 0 ? _chunk65MLWUQDcjs.tokenAmountToNumber.call(void 0, eventDestination.amount, targetDisplay.decimals) : void 0;
1323
+ const sentValue = _chunkZMT4ATHRcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals);
1324
+ const receivedValue = eventDestination.amount !== void 0 ? _chunkZMT4ATHRcjs.tokenAmountToNumber.call(void 0, eventDestination.amount, targetDisplay.decimals) : void 0;
1292
1325
  if (sentValue === void 0 || receivedValue === void 0 || sentValue <= receivedValue) {
1293
1326
  return void 0;
1294
1327
  }
1295
- const formatted = _chunk65MLWUQDcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
1328
+ const formatted = _chunkZMT4ATHRcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
1296
1329
  if (formatted === void 0 || Number(formatted.replace(/,/g, "")) === 0) {
1297
1330
  return void 0;
1298
1331
  }
@@ -1304,13 +1337,13 @@ function ProcessingStep({
1304
1337
  const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
1305
1338
  void delayPhaseId;
1306
1339
  void hasEscalatedDelay;
1307
- const sourceChainIcon = _chunkO7BCVQ6Lcjs.getChainIcon.call(void 0, displaySourceChain);
1308
- const targetChainIcon = _chunkO7BCVQ6Lcjs.getChainIcon.call(void 0, targetChainId);
1309
- const sourceChainName = _chunkO7BCVQ6Lcjs.getChainName.call(void 0, displaySourceChain);
1310
- const targetChainName = _chunkO7BCVQ6Lcjs.getChainName.call(void 0, targetChainId);
1340
+ const sourceChainIcon = _chunk4KCSH4T3cjs.getChainIcon.call(void 0, displaySourceChain);
1341
+ const targetChainIcon = _chunk4KCSH4T3cjs.getChainIcon.call(void 0, targetChainId);
1342
+ const sourceChainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, displaySourceChain);
1343
+ const targetChainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, targetChainId);
1311
1344
  const timerText = formatTimer(elapsedSeconds);
1312
- const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _100 => _100.feeSponsored]), () => ( false));
1313
- const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _101 => _101.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
1345
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _106 => _106.feeSponsored]), () => ( false));
1346
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _107 => _107.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
1314
1347
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
1315
1348
  const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
1316
1349
  const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
@@ -1319,29 +1352,29 @@ function ProcessingStep({
1319
1352
  ] }) : isFailed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
1320
1353
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
1321
1354
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
1322
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.WalletIcon, {}), title: stateTitle });
1355
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.WalletIcon, {}), title: stateTitle });
1323
1356
  if (isComplete && isSwappedOrder) {
1324
- const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _102 => _102.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _103 => _103.paymentMethod]))), () => ( null));
1357
+ const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _108 => _108.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _109 => _109.paymentMethod]))), () => ( null));
1325
1358
  const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
1326
- const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _104 => _104.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
1359
+ const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _110 => _110.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
1327
1360
  _nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
1328
1361
  effectivePaymentMethod
1329
1362
  ) : null;
1330
- const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _105 => _105.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
1331
- const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _106 => _106.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
1363
+ const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _111 => _111.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
1364
+ const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _112 => _112.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
1332
1365
  const depositedAmount = receiveDisplay;
1333
- const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _107 => _107.onrampFeeUsd]), () => ( null));
1366
+ const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _113 => _113.onrampFeeUsd]), () => ( null));
1334
1367
  const sponsoredFeeTooltip = "This fee is sponsored for this deposit.";
1335
1368
  const feesTooltip = feeSponsored ? "On-ramp fees are charged by the payment provider. Market and network fees are sponsored for this deposit." : "Fees include on-ramp, market, and network costs for this deposit.";
1336
1369
  const { rows: quoteFeeRows, chargeableUsd } = buildQuoteFeeRows(
1337
- _optionalChain([quote, 'optionalAccess', _108 => _108.fees, 'access', _109 => _109.breakdown]),
1370
+ _optionalChain([quote, 'optionalAccess', _114 => _114.fees, 'access', _115 => _115.breakdown]),
1338
1371
  sponsoredFeeTooltip
1339
1372
  );
1340
1373
  const feeRows = [];
1341
1374
  if (onrampFeeUsd != null) {
1342
1375
  feeRows.push({
1343
1376
  label: "On-ramp fee",
1344
- value: _chunk65MLWUQDcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
1377
+ value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
1345
1378
  });
1346
1379
  }
1347
1380
  const hasFallbackFee = quoteFeeRows.length === 0 && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount));
@@ -1350,13 +1383,13 @@ function ProcessingStep({
1350
1383
  } else if (hasFallbackFee) {
1351
1384
  feeRows.push({
1352
1385
  label: "Network fee",
1353
- value: _chunk65MLWUQDcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
1386
+ value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
1354
1387
  strike: feeSponsored,
1355
1388
  tooltip: feeSponsored ? sponsoredFeeTooltip : void 0
1356
1389
  });
1357
1390
  }
1358
1391
  const fallbackChargeableUsd = hasFallbackFee && !feeSponsored ? Number(quotedFeeAmount) : 0;
1359
- const feesTotal = feeRows.length > 0 ? _chunk65MLWUQDcjs.formatFeeUsd.call(void 0,
1392
+ const feesTotal = feeRows.length > 0 ? _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0,
1360
1393
  (_nullishCoalesce(onrampFeeUsd, () => ( 0))) + chargeableUsd + fallbackChargeableUsd
1361
1394
  ) : null;
1362
1395
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1384,7 +1417,7 @@ function ProcessingStep({
1384
1417
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
1385
1418
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1386
1419
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
1387
- sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CdnIcon, { src: sourceChainIcon }) }),
1420
+ sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CdnIcon, { src: sourceChainIcon }) }),
1388
1421
  sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1389
1422
  "a",
1390
1423
  {
@@ -1393,7 +1426,7 @@ function ProcessingStep({
1393
1426
  rel: "noopener noreferrer",
1394
1427
  className: "rs-review-detail-link",
1395
1428
  "aria-label": "View source transaction",
1396
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.ExternalLinkIcon, {})
1429
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ExternalLinkIcon, {})
1397
1430
  }
1398
1431
  )
1399
1432
  ] })
@@ -1402,7 +1435,7 @@ function ProcessingStep({
1402
1435
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
1403
1436
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1404
1437
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
1405
- targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CdnIcon, { src: targetChainIcon }) }),
1438
+ targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CdnIcon, { src: targetChainIcon }) }),
1406
1439
  destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1407
1440
  "a",
1408
1441
  {
@@ -1411,7 +1444,7 @@ function ProcessingStep({
1411
1444
  rel: "noopener noreferrer",
1412
1445
  className: "rs-review-detail-link",
1413
1446
  "aria-label": "View destination transaction",
1414
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.ExternalLinkIcon, {})
1447
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ExternalLinkIcon, {})
1415
1448
  }
1416
1449
  )
1417
1450
  ] })
@@ -1421,7 +1454,7 @@ function ProcessingStep({
1421
1454
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
1422
1455
  ] }),
1423
1456
  isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1424
- _optionalChain([swappedFiatContext, 'optionalAccess', _110 => _110.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1457
+ _optionalChain([swappedFiatContext, 'optionalAccess', _116 => _116.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1425
1458
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
1426
1459
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1427
1460
  "$",
@@ -1433,7 +1466,7 @@ function ProcessingStep({
1433
1466
  ] })
1434
1467
  ] })
1435
1468
  ] }),
1436
- _optionalChain([swappedFiatContext, 'optionalAccess', _111 => _111.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1469
+ _optionalChain([swappedFiatContext, 'optionalAccess', _117 => _117.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1437
1470
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
1438
1471
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1439
1472
  "$",
@@ -1448,7 +1481,7 @@ function ProcessingStep({
1448
1481
  " ",
1449
1482
  sourceSymbol
1450
1483
  ] }),
1451
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.TokenIcon, { symbol: sourceSymbol }) })
1484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: sourceSymbol }) })
1452
1485
  ] })
1453
1486
  ] })
1454
1487
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -1459,14 +1492,14 @@ function ProcessingStep({
1459
1492
  " ",
1460
1493
  sourceSymbol
1461
1494
  ] }),
1462
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.TokenIcon, { symbol: sourceSymbol }) })
1495
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: sourceSymbol }) })
1463
1496
  ] })
1464
1497
  ] }),
1465
1498
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1466
1499
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
1467
1500
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1468
1501
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
1469
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.TokenIcon, { symbol: targetSymbol }) })
1502
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: targetSymbol }) })
1470
1503
  ] })
1471
1504
  ] }),
1472
1505
  isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -1495,12 +1528,12 @@ function ProcessingStep({
1495
1528
  {
1496
1529
  className: "rs-review-detail-info",
1497
1530
  "aria-label": "Fee info",
1498
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.InfoIcon, {})
1531
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.InfoIcon, {})
1499
1532
  }
1500
1533
  ) })
1501
1534
  ] })
1502
1535
  ] }) : (() => {
1503
- const { display, struck } = _chunk65MLWUQDcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _112 => _112.fees]));
1536
+ const { display, struck } = _chunkZMT4ATHRcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _118 => _118.fees]));
1504
1537
  if (display !== null) {
1505
1538
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1506
1539
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
@@ -1531,9 +1564,9 @@ function ProcessingStep({
1531
1564
  ] });
1532
1565
  })()
1533
1566
  ] }),
1534
- isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Callout, { variant: "error", children: failureMessage }),
1567
+ isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Callout, { variant: "error", children: failureMessage }),
1535
1568
  isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1536
- _chunk65MLWUQDcjs.Button,
1569
+ _chunkZMT4ATHRcjs.Button,
1537
1570
  {
1538
1571
  fullWidth: true,
1539
1572
  disabled: true,
@@ -1543,18 +1576,18 @@ function ProcessingStep({
1543
1576
  }
1544
1577
  ),
1545
1578
  isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
1546
- onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk65MLWUQDcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
1579
+ onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZMT4ATHRcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
1547
1580
  "New ",
1548
1581
  flowNoun
1549
1582
  ] }),
1550
- onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
1583
+ onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
1551
1584
  ] }),
1552
1585
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
1553
- onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
1554
- handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
1586
+ onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Button, { variant: "outline", onClick: onClose, fullWidth: true, children: "Cancel" }),
1587
+ handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
1555
1588
  ] })
1556
1589
  ] }),
1557
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.PoweredBy, {})
1590
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.PoweredBy, {})
1558
1591
  ] });
1559
1592
  }
1560
1593
 
@@ -1585,13 +1618,13 @@ function normalizeKeyToken(value) {
1585
1618
  }
1586
1619
  var SOLANA_ADDRESS_PATTERN = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
1587
1620
  function recipientMatchesTarget(recipient, targetChain) {
1588
- return _chunkO7BCVQ6Lcjs.targetChainToCaip2.call(void 0, targetChain).startsWith("solana:") ? SOLANA_ADDRESS_PATTERN.test(recipient) : _viem.isAddress.call(void 0, recipient);
1621
+ return _chunk4KCSH4T3cjs.targetChainToCaip2.call(void 0, targetChain).startsWith("solana:") ? SOLANA_ADDRESS_PATTERN.test(recipient) : _viem.isAddress.call(void 0, recipient);
1589
1622
  }
1590
1623
  function deriveAccountSalt(input) {
1591
1624
  return _viem.keccak256.call(void 0,
1592
1625
  _viem.concat.call(void 0, [
1593
1626
  _viem.keccak256.call(void 0, _viem.toHex.call(void 0, _nullishCoalesce(normalizeKeyToken(input.recipient), () => ( "")))),
1594
- _viem.keccak256.call(void 0, _viem.toHex.call(void 0, _chunkO7BCVQ6Lcjs.targetChainToCaip2.call(void 0, input.targetChain))),
1627
+ _viem.keccak256.call(void 0, _viem.toHex.call(void 0, _chunk4KCSH4T3cjs.targetChainToCaip2.call(void 0, input.targetChain))),
1595
1628
  _viem.keccak256.call(void 0, _viem.toHex.call(void 0, _nullishCoalesce(normalizeKeyToken(input.targetToken), () => ( ""))))
1596
1629
  ])
1597
1630
  );
@@ -1623,7 +1656,7 @@ var setupRequestDedupe = /* @__PURE__ */ new Map();
1623
1656
  function readDedupedAccountSetupResult(requestKey) {
1624
1657
  const now = Date.now();
1625
1658
  const existing = setupRequestDedupe.get(requestKey);
1626
- if (_optionalChain([existing, 'optionalAccess', _113 => _113.settled]) && existing.expiresAt > now && existing.result) {
1659
+ if (_optionalChain([existing, 'optionalAccess', _119 => _119.settled]) && existing.expiresAt > now && existing.result) {
1627
1660
  return existing.result;
1628
1661
  }
1629
1662
  return null;
@@ -1645,7 +1678,7 @@ async function runAccountSetup(input, deps) {
1645
1678
  }
1646
1679
  try {
1647
1680
  const salt = deriveAccountSalt(input);
1648
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
1681
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
1649
1682
  salt,
1650
1683
  recipient: input.recipient,
1651
1684
  targetChain: input.targetChain,
@@ -1654,10 +1687,10 @@ async function runAccountSetup(input, deps) {
1654
1687
  const result = await service.registerManagedAccount({
1655
1688
  salt,
1656
1689
  target: {
1657
- chain: _chunkO7BCVQ6Lcjs.targetChainToCaip2.call(void 0, input.targetChain),
1690
+ chain: _chunk4KCSH4T3cjs.targetChainToCaip2.call(void 0, input.targetChain),
1658
1691
  token: input.targetToken,
1659
1692
  recipient: input.recipient,
1660
- ..._optionalChain([input, 'access', _114 => _114.outputTokenRules, 'optionalAccess', _115 => _115.length]) && {
1693
+ ..._optionalChain([input, 'access', _120 => _120.outputTokenRules, 'optionalAccess', _121 => _121.length]) && {
1661
1694
  outputTokenRules: input.outputTokenRules
1662
1695
  },
1663
1696
  ...input.rejectUnmapped != null && {
@@ -1671,7 +1704,7 @@ async function runAccountSetup(input, deps) {
1671
1704
  cacheKey
1672
1705
  };
1673
1706
  } catch (error) {
1674
- _chunk65MLWUQDcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
1707
+ _chunkZMT4ATHRcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
1675
1708
  recipient: input.recipient
1676
1709
  });
1677
1710
  if (error instanceof SetupError) throw error;
@@ -1682,7 +1715,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
1682
1715
  const now = Date.now();
1683
1716
  const existing = setupRequestDedupe.get(requestKey);
1684
1717
  if (existing && (!existing.settled || existing.expiresAt > now)) {
1685
- _chunk65MLWUQDcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
1718
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
1686
1719
  recipient: input.recipient,
1687
1720
  forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
1688
1721
  });
@@ -1765,4 +1798,6 @@ function mapError(error) {
1765
1798
 
1766
1799
 
1767
1800
 
1768
- exports.getExchangeLogoSrc = getExchangeLogoSrc; exports.getExchangeLogo = getExchangeLogo; exports.Tooltip = Tooltip; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.fetchTokenPriceUsd = fetchTokenPriceUsd; exports.useTokenPrices = useTokenPrices; exports.ProcessingStep = ProcessingStep; exports.SetupError = SetupError; exports.deriveAccountSalt = deriveAccountSalt; exports.computeRequestKey = computeRequestKey; exports.computeCacheKey = computeCacheKey; exports.computeIsCacheable = computeIsCacheable; exports.readDedupedAccountSetupResult = readDedupedAccountSetupResult; exports.runAccountSetupDeduped = runAccountSetupDeduped; exports.warnRemovedProps = warnRemovedProps;
1801
+
1802
+
1803
+ exports.getExchangeLogoSrc = getExchangeLogoSrc; exports.getExchangeLogo = getExchangeLogo; exports.Tooltip = Tooltip; exports.markSubmissionUncertain = markSubmissionUncertain; exports.isSubmissionUncertain = isSubmissionUncertain; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.fetchTokenPriceUsd = fetchTokenPriceUsd; exports.useTokenPrices = useTokenPrices; exports.ProcessingStep = ProcessingStep; exports.SetupError = SetupError; exports.deriveAccountSalt = deriveAccountSalt; exports.computeRequestKey = computeRequestKey; exports.computeCacheKey = computeCacheKey; exports.computeIsCacheable = computeIsCacheable; exports.readDedupedAccountSetupResult = readDedupedAccountSetupResult; exports.runAccountSetupDeduped = runAccountSetupDeduped; exports.warnRemovedProps = warnRemovedProps;