@rhinestone/deposit-modal 0.13.0 → 0.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +47 -12
  2. package/bridge-transcript.json +653 -0
  3. package/dist/ClaimModal-GDFENSLV.mjs +13 -0
  4. package/dist/ClaimModal-L3FUBI5U.cjs +13 -0
  5. package/dist/{DepositModalReown-3H75G3XQ.mjs → DepositModalReown-2EVV64OA.mjs} +30 -27
  6. package/dist/{DepositModalReown-YNNHLAV2.cjs → DepositModalReown-GAD45GIC.cjs} +77 -74
  7. package/dist/WithdrawModal-FAQH35NG.cjs +12 -0
  8. package/dist/WithdrawModal-IKUHF5CF.mjs +12 -0
  9. package/dist/{chunk-RAADLTSW.cjs → chunk-4J5ADVIN.cjs} +184 -139
  10. package/dist/{chunk-DSIZNRWA.mjs → chunk-5Q5CSVKF.mjs} +1049 -388
  11. package/dist/{chunk-HOGZKHHY.cjs → chunk-62UCV2LG.cjs} +3 -3
  12. package/dist/{chunk-CVGNCUVU.cjs → chunk-7AZFT2MV.cjs} +22 -13
  13. package/dist/{chunk-7N77GIP4.cjs → chunk-A6JPBMYY.cjs} +465 -171
  14. package/dist/{chunk-GACIGCSN.cjs → chunk-AQVJUXSG.cjs} +1 -1
  15. package/dist/{chunk-LTMMETAB.mjs → chunk-GZ4GQ5MC.mjs} +404 -110
  16. package/dist/{chunk-ZMT4ATHR.cjs → chunk-HAQOFI3D.cjs} +594 -41
  17. package/dist/{chunk-FZ5FZFIG.mjs → chunk-LMG46EP2.mjs} +1 -1
  18. package/dist/{chunk-2G2EIN4A.cjs → chunk-NQMC5VKQ.cjs} +1343 -682
  19. package/dist/{chunk-OLCD75JK.mjs → chunk-QACOOLOE.mjs} +451 -131
  20. package/dist/{chunk-XYJFEN5D.mjs → chunk-R5UQ3TN4.mjs} +1 -1
  21. package/dist/{chunk-EOMT5LKX.mjs → chunk-UX35GYLM.mjs} +556 -3
  22. package/dist/{chunk-YREVFB64.mjs → chunk-VALXN5IO.mjs} +16 -7
  23. package/dist/{chunk-COCBCQQC.mjs → chunk-XCTRKCNM.mjs} +51 -6
  24. package/dist/{chunk-5NUIKYSF.cjs → chunk-YP7QVKQ6.cjs} +458 -138
  25. package/dist/claim.cjs +6 -6
  26. package/dist/claim.d.cts +3 -3
  27. package/dist/claim.d.ts +3 -3
  28. package/dist/claim.mjs +5 -5
  29. package/dist/constants.cjs +2 -2
  30. package/dist/constants.d.cts +1 -1
  31. package/dist/constants.d.ts +1 -1
  32. package/dist/constants.mjs +1 -1
  33. package/dist/deposit.cjs +6 -6
  34. package/dist/deposit.d.cts +2 -2
  35. package/dist/deposit.d.ts +2 -2
  36. package/dist/deposit.mjs +5 -5
  37. package/dist/embed.cjs +310 -102
  38. package/dist/embed.d.cts +7 -1
  39. package/dist/embed.d.ts +7 -1
  40. package/dist/embed.mjs +285 -77
  41. package/dist/index.cjs +9 -9
  42. package/dist/index.d.cts +1 -1
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.mjs +8 -8
  45. package/dist/types-Bho4OA03.d.ts +982 -0
  46. package/dist/types-DP_3KwlD.d.cts +982 -0
  47. package/dist/withdraw.cjs +5 -5
  48. package/dist/withdraw.d.cts +3 -3
  49. package/dist/withdraw.d.ts +3 -3
  50. package/dist/withdraw.mjs +4 -4
  51. package/package.json +29 -7
  52. package/dist/ClaimModal-CREZO27I.mjs +0 -11
  53. package/dist/ClaimModal-JRIA32U2.cjs +0 -11
  54. package/dist/WithdrawModal-NVRX44IZ.mjs +0 -10
  55. package/dist/WithdrawModal-YYSBPCJJ.cjs +0 -10
  56. package/dist/types-B89I8_8H.d.ts +0 -638
  57. package/dist/types-nnDR4tqA.d.cts +0 -638
@@ -24,7 +24,7 @@
24
24
 
25
25
 
26
26
 
27
- var _chunkZMT4ATHRcjs = require('./chunk-ZMT4ATHR.cjs');
27
+ var _chunkHAQOFI3Dcjs = require('./chunk-HAQOFI3D.cjs');
28
28
 
29
29
 
30
30
 
@@ -97,6 +97,32 @@ function warnRemovedProps(component, props) {
97
97
  }
98
98
  }
99
99
 
100
+ // src/core/analytics-target.ts
101
+ var HEX_TOKEN = /^0x(?:[0-9a-f]{32}|[0-9a-f]{40})$/i;
102
+ var BASE58_TOKEN = /^[1-9A-HJ-NP-Za-km-z]{32,44}$/;
103
+ function analyticsTargetProperties(input) {
104
+ const properties = {};
105
+ const chain = resolveChain(input.targetChain);
106
+ const token = resolveToken(input.targetToken);
107
+ if (chain) properties.target_chain = chain;
108
+ if (token) properties.target_token = token;
109
+ return properties;
110
+ }
111
+ function resolveChain(targetChain) {
112
+ if (targetChain === void 0) return void 0;
113
+ if (typeof targetChain === "number" && !(targetChain > 0 && Number.isInteger(targetChain))) {
114
+ return void 0;
115
+ }
116
+ return _chunk4KCSH4T3cjs.targetChainToCaip2.call(void 0, targetChain);
117
+ }
118
+ function resolveToken(targetToken) {
119
+ const raw = _optionalChain([targetToken, 'optionalAccess', _ => _.trim, 'call', _2 => _2()]);
120
+ if (!raw) return void 0;
121
+ if (HEX_TOKEN.test(raw)) return raw.toLowerCase();
122
+ if (BASE58_TOKEN.test(raw)) return raw;
123
+ return raw.toLowerCase() === "native" ? "native" : void 0;
124
+ }
125
+
100
126
  // src/core/submission-uncertainty.ts
101
127
  var MARKER = "__rhinestoneSubmissionUncertain";
102
128
  function markSubmissionUncertain(error) {
@@ -148,8 +174,8 @@ function Tooltip({ content, children, className }) {
148
174
  function handleOutside(event) {
149
175
  const target = event.target;
150
176
  if (!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;
177
+ if (_optionalChain([triggerRef, 'access', _3 => _3.current, 'optionalAccess', _4 => _4.contains, 'call', _5 => _5(target)])) return;
178
+ if (_optionalChain([bubbleRef, 'access', _6 => _6.current, 'optionalAccess', _7 => _7.contains, 'call', _8 => _8(target)])) return;
153
179
  setOpen(false);
154
180
  }
155
181
  function handleKey(event) {
@@ -226,7 +252,7 @@ function FeesAccordion({ total, rows, tooltip }) {
226
252
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-fees-accordion-summary", children: [
227
253
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-fees-accordion-label", children: [
228
254
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
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, {}) }) })
255
+ 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, _chunkHAQOFI3Dcjs.InfoIcon, {}) }) })
230
256
  ] }),
231
257
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
232
258
  "button",
@@ -244,7 +270,7 @@ function FeesAccordion({ total, rows, tooltip }) {
244
270
  {
245
271
  className: `rs-fees-accordion-chevron${open ? " rs-fees-accordion-chevron--open" : ""}`,
246
272
  "aria-hidden": "true",
247
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ChevronDownIcon, {})
273
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.ChevronDownIcon, {})
248
274
  }
249
275
  )
250
276
  ]
@@ -266,7 +292,7 @@ function FeesAccordion({ total, rows, tooltip }) {
266
292
  {
267
293
  className: "rs-review-detail-info",
268
294
  "aria-label": `${row.label} info`,
269
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.InfoIcon, {})
295
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.InfoIcon, {})
270
296
  }
271
297
  ) })
272
298
  ] })
@@ -292,13 +318,13 @@ function SwappedReceipt({
292
318
  }) {
293
319
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
294
320
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
295
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CheckIcon, {}), title: "Deposit successful" }),
321
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CheckIcon, {}), title: "Deposit successful" }),
296
322
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
297
323
  onrampMethod && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
298
324
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Onramp method" }),
299
325
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
300
326
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: onrampMethod }),
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 }) })
327
+ 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, _chunkHAQOFI3Dcjs.CdnIcon, { src: onrampMethodIcon }) })
302
328
  ] })
303
329
  ] }),
304
330
  amountPaid && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -309,7 +335,7 @@ function SwappedReceipt({
309
335
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
310
336
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
311
337
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
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 }) })
338
+ depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.TokenIcon, { symbol: depositedSymbol }) })
313
339
  ] })
314
340
  ] }),
315
341
  feesTotal != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -322,11 +348,11 @@ function SwappedReceipt({
322
348
  )
323
349
  ] }),
324
350
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
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" })
351
+ onNewDeposit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: newLabel }),
352
+ onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
327
353
  ] })
328
354
  ] }),
329
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.PoweredBy, {})
355
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.PoweredBy, {})
330
356
  ] });
331
357
  }
332
358
  SwappedReceipt.displayName = "SwappedReceipt";
@@ -362,7 +388,7 @@ function getExchangeLogoSrc(name, connection) {
362
388
  }
363
389
  function getExchangeLogo(name, connection) {
364
390
  const src = getExchangeLogoSrc(name, connection);
365
- return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CdnIcon, { src }) : null;
391
+ return src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CdnIcon, { src }) : null;
366
392
  }
367
393
 
368
394
  // src/core/webhook.ts
@@ -378,7 +404,7 @@ function asNumber(value) {
378
404
  const trimmed = value.trim();
379
405
  if (!trimmed) return void 0;
380
406
  const caipMatch = trimmed.match(/^eip155:(\d+)$/);
381
- if (_optionalChain([caipMatch, 'optionalAccess', _7 => _7[1]])) {
407
+ if (_optionalChain([caipMatch, 'optionalAccess', _9 => _9[1]])) {
382
408
  const parsed2 = Number(caipMatch[1]);
383
409
  return Number.isFinite(parsed2) ? parsed2 : void 0;
384
410
  }
@@ -397,24 +423,24 @@ function asAddress(value) {
397
423
  return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
398
424
  }
399
425
  function getEventTxHash(event) {
400
- if (!_optionalChain([event, 'optionalAccess', _8 => _8.type])) return void 0;
426
+ if (!_optionalChain([event, 'optionalAccess', _10 => _10.type])) return void 0;
401
427
  if (event.type === "deposit-received") {
402
- return asString(_optionalChain([event, 'access', _9 => _9.data, 'optionalAccess', _10 => _10.transactionHash]));
428
+ return asString(_optionalChain([event, 'access', _11 => _11.data, 'optionalAccess', _12 => _12.transactionHash]));
403
429
  }
404
430
  if (event.type === "bridge-started" || event.type === "bridge-complete") {
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]))));
431
+ const deposit = isRecord(_optionalChain([event, 'access', _13 => _13.data, 'optionalAccess', _14 => _14.deposit])) ? event.data.deposit : void 0;
432
+ const source = isRecord(_optionalChain([event, 'access', _15 => _15.data, 'optionalAccess', _16 => _16.source])) ? event.data.source : void 0;
433
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _17 => _17.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _18 => _18.transactionHash]))));
408
434
  }
409
435
  if (event.type === "bridge-failed" || event.type === "error") {
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]))));
436
+ const deposit = isRecord(_optionalChain([event, 'access', _19 => _19.data, 'optionalAccess', _20 => _20.deposit])) ? event.data.deposit : void 0;
437
+ const source = isRecord(_optionalChain([event, 'access', _21 => _21.data, 'optionalAccess', _22 => _22.source])) ? event.data.source : void 0;
438
+ return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _23 => _23.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _24 => _24.transactionHash]))));
413
439
  }
414
440
  return void 0;
415
441
  }
416
442
  function getEventSourceDetails(event) {
417
- if (!_optionalChain([event, 'optionalAccess', _23 => _23.type]) || !isRecord(event.data)) return {};
443
+ if (!_optionalChain([event, 'optionalAccess', _25 => _25.type]) || !isRecord(event.data)) return {};
418
444
  if (event.type === "deposit-received") {
419
445
  return {
420
446
  chainId: asNumber(event.data.chain),
@@ -426,9 +452,9 @@ function getEventSourceDetails(event) {
426
452
  const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
427
453
  if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") {
428
454
  return {
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]))))
455
+ chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _26 => _26.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _27 => _27.chain])))),
456
+ amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _28 => _28.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _29 => _29.amount])))),
457
+ token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _30 => _30.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _31 => _31.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _32 => _32.token]))))
432
458
  };
433
459
  }
434
460
  return {};
@@ -442,7 +468,7 @@ function asChain(value) {
442
468
  return asNumber(value);
443
469
  }
444
470
  function getEventDestinationDetails(event) {
445
- if (!_optionalChain([event, 'optionalAccess', _31 => _31.type]) || !isRecord(event.data)) return {};
471
+ if (!_optionalChain([event, 'optionalAccess', _33 => _33.type]) || !isRecord(event.data)) return {};
446
472
  if (event.type !== "bridge-started" && event.type !== "bridge-complete") {
447
473
  return {};
448
474
  }
@@ -452,14 +478,14 @@ function getEventDestinationDetails(event) {
452
478
  return {
453
479
  chainId: asChain(destination.chain),
454
480
  amount: asAmount(destination.amount),
455
- token: _optionalChain([token, 'optionalAccess', _32 => _32.trim, 'call', _33 => _33()]) || void 0
481
+ token: _optionalChain([token, 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]) || void 0
456
482
  };
457
483
  }
458
484
  function isDepositEvent(event) {
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";
485
+ return _optionalChain([event, 'optionalAccess', _36 => _36.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _37 => _37.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _38 => _38.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _39 => _39.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _40 => _40.type]) === "error";
460
486
  }
461
487
  function isFailedEvent(event) {
462
- return _optionalChain([event, 'optionalAccess', _39 => _39.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _40 => _40.type]) === "error";
488
+ return _optionalChain([event, 'optionalAccess', _41 => _41.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _42 => _42.type]) === "error";
463
489
  }
464
490
  function isHexString(value) {
465
491
  return value.startsWith("0x") || value.startsWith("0X");
@@ -471,7 +497,7 @@ function txRefsMatch(a, b) {
471
497
  return a === b;
472
498
  }
473
499
  function formatBridgeFailedMessage(event) {
474
- const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _41 => _41.data]), () => ( {}));
500
+ const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _43 => _43.data]), () => ( {}));
475
501
  const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
476
502
  const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
477
503
  function toUserFacingFailure(raw) {
@@ -499,7 +525,7 @@ function formatBridgeFailedMessage(event) {
499
525
  return { message: "Bridge failed" };
500
526
  }
501
527
  function failureMessageForEvent(event) {
502
- if (_optionalChain([event, 'optionalAccess', _42 => _42.type]) === "error") {
528
+ if (_optionalChain([event, 'optionalAccess', _44 => _44.type]) === "error") {
503
529
  const message = isRecord(event.data) ? asString(event.data.message) : void 0;
504
530
  return _nullishCoalesce(message, () => ( "Unknown error"));
505
531
  }
@@ -538,7 +564,7 @@ async function fetchTokenPriceUsd(service, token) {
538
564
  }
539
565
  function useTokenPrices(service, tokens) {
540
566
  const [prices, setPrices] = _react.useState.call(void 0, {});
541
- const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _43 => _43.symbol])));
567
+ const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _45 => _45.symbol])));
542
568
  const entries = [
543
569
  ...new Map(
544
570
  defined.flatMap((token) => {
@@ -671,14 +697,14 @@ function buildQuoteFeeRows(breakdown, sponsoredTooltip) {
671
697
  if (!breakdown) return { rows: [], chargeableUsd: 0 };
672
698
  const rows = [];
673
699
  let chargeableUsd = 0;
674
- for (const group of _chunkZMT4ATHRcjs.quoteFeeGroups.call(void 0, breakdown)) {
700
+ for (const group of _chunkHAQOFI3Dcjs.quoteFeeGroups.call(void 0, breakdown)) {
675
701
  if (group.chargedUsd > 0) {
676
702
  chargeableUsd += group.chargedUsd;
677
- rows.push({ label: group.label, value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, group.chargedUsd) });
703
+ rows.push({ label: group.label, value: _chunkHAQOFI3Dcjs.formatFeeUsd.call(void 0, group.chargedUsd) });
678
704
  } else if (group.sponsoredUsd > 0) {
679
705
  rows.push({
680
706
  label: group.label,
681
- value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, group.sponsoredUsd),
707
+ value: _chunkHAQOFI3Dcjs.formatFeeUsd.call(void 0, group.sponsoredUsd),
682
708
  strike: true,
683
709
  tooltip: sponsoredTooltip
684
710
  });
@@ -727,12 +753,12 @@ function isEventForTx(event, txHash) {
727
753
  return txRefsMatch(eventTxHash, txHash);
728
754
  }
729
755
  function parseWebhookTimestamp(event) {
730
- if (typeof _optionalChain([event, 'optionalAccess', _44 => _44.time]) !== "string") return void 0;
756
+ if (typeof _optionalChain([event, 'optionalAccess', _46 => _46.time]) !== "string") return void 0;
731
757
  const timestamp = Date.parse(event.time);
732
758
  return Number.isFinite(timestamp) ? timestamp : void 0;
733
759
  }
734
760
  function syncPhaseTimings(previous, event) {
735
- if (!_optionalChain([event, 'optionalAccess', _45 => _45.type])) return previous;
761
+ if (!_optionalChain([event, 'optionalAccess', _47 => _47.type])) return previous;
736
762
  const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
737
763
  const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") && previous.receivedAt === void 0;
738
764
  const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete") && previous.bridgingAt === void 0;
@@ -794,46 +820,46 @@ function getCurrentPhaseId(state, phaseTimings) {
794
820
  if (state.type === "complete") {
795
821
  return void 0;
796
822
  }
797
- if (_optionalChain([state, 'access', _46 => _46.lastEvent, 'optionalAccess', _47 => _47.type]) === "bridge-started" || _optionalChain([state, 'access', _48 => _48.lastEvent, 'optionalAccess', _49 => _49.type]) === "bridge-complete")
823
+ if (_optionalChain([state, 'access', _48 => _48.lastEvent, 'optionalAccess', _49 => _49.type]) === "bridge-started" || _optionalChain([state, 'access', _50 => _50.lastEvent, 'optionalAccess', _51 => _51.type]) === "bridge-complete")
798
824
  return "bridging";
799
- if (_optionalChain([state, 'access', _50 => _50.lastEvent, 'optionalAccess', _51 => _51.type]) === "deposit-received") return "received";
825
+ if (_optionalChain([state, 'access', _52 => _52.lastEvent, 'optionalAccess', _53 => _53.type]) === "deposit-received") return "received";
800
826
  return "confirming";
801
827
  }
802
828
  function getCompletionDestinationTxHash(event) {
803
- const eventData = _optionalChain([event, 'optionalAccess', _52 => _52.data]);
804
- const swapTxHash = _optionalChain([eventData, 'optionalAccess', _53 => _53.swap, 'optionalAccess', _54 => _54.transactionHash]);
805
- const destinationTxHash = _optionalChain([eventData, 'optionalAccess', _55 => _55.destination, 'optionalAccess', _56 => _56.transactionHash]);
829
+ const eventData = _optionalChain([event, 'optionalAccess', _54 => _54.data]);
830
+ const swapTxHash = _optionalChain([eventData, 'optionalAccess', _55 => _55.swap, 'optionalAccess', _56 => _56.transactionHash]);
831
+ const destinationTxHash = _optionalChain([eventData, 'optionalAccess', _57 => _57.destination, 'optionalAccess', _58 => _58.transactionHash]);
806
832
  return _nullishCoalesce(swapTxHash, () => ( destinationTxHash));
807
833
  }
808
834
  function getTerminalProcessingOutcome(event) {
809
- if (_optionalChain([event, 'optionalAccess', _57 => _57.type]) === "post-bridge-swap-complete") {
835
+ if (_optionalChain([event, 'optionalAccess', _59 => _59.type]) === "post-bridge-swap-complete") {
810
836
  return {
811
837
  type: "complete",
812
838
  destinationTxHash: getCompletionDestinationTxHash(event)
813
839
  };
814
840
  }
815
- if (_optionalChain([event, 'optionalAccess', _58 => _58.type]) === "post-bridge-swap-failed") {
841
+ if (_optionalChain([event, 'optionalAccess', _60 => _60.type]) === "post-bridge-swap-failed") {
816
842
  return {
817
843
  type: "failed",
818
844
  message: formatBridgeFailedMessage(event).message
819
845
  };
820
846
  }
821
- if (_optionalChain([event, 'optionalAccess', _59 => _59.type]) === "bridge-complete") {
847
+ if (_optionalChain([event, 'optionalAccess', _61 => _61.type]) === "bridge-complete") {
822
848
  return {
823
849
  type: "complete",
824
850
  destinationTxHash: getCompletionDestinationTxHash(event)
825
851
  };
826
852
  }
827
- if (_optionalChain([event, 'optionalAccess', _60 => _60.type]) === "bridge-failed") {
853
+ if (_optionalChain([event, 'optionalAccess', _62 => _62.type]) === "bridge-failed") {
828
854
  return {
829
855
  type: "failed",
830
856
  message: formatBridgeFailedMessage(event).message
831
857
  };
832
858
  }
833
- if (_optionalChain([event, 'optionalAccess', _61 => _61.type]) === "error") {
859
+ if (_optionalChain([event, 'optionalAccess', _63 => _63.type]) === "error") {
834
860
  return {
835
861
  type: "failed",
836
- message: _nullishCoalesce(_optionalChain([event, 'access', _62 => _62.data, 'optionalAccess', _63 => _63.message]), () => ( "Unknown error"))
862
+ message: _nullishCoalesce(_optionalChain([event, 'access', _64 => _64.data, 'optionalAccess', _65 => _65.message]), () => ( "Unknown error"))
837
863
  };
838
864
  }
839
865
  return null;
@@ -841,10 +867,10 @@ function getTerminalProcessingOutcome(event) {
841
867
  function getInitialProcessingState(event, txHash) {
842
868
  if (!event || !isEventForTx(event, txHash)) return null;
843
869
  const terminal = getTerminalProcessingOutcome(event);
844
- if (_optionalChain([terminal, 'optionalAccess', _64 => _64.type]) === "complete") {
870
+ if (_optionalChain([terminal, 'optionalAccess', _66 => _66.type]) === "complete") {
845
871
  return { type: "complete", lastEvent: event };
846
872
  }
847
- if (_optionalChain([terminal, 'optionalAccess', _65 => _65.type]) === "failed") {
873
+ if (_optionalChain([terminal, 'optionalAccess', _67 => _67.type]) === "failed") {
848
874
  return { type: "failed", message: terminal.message, lastEvent: event };
849
875
  }
850
876
  if (isDepositEvent(event)) {
@@ -853,7 +879,7 @@ function getInitialProcessingState(event, txHash) {
853
879
  return null;
854
880
  }
855
881
  function getSettledSourceTxHash(event, fallbackTxHash) {
856
- return _nullishCoalesce(_optionalChain([event, 'optionalAccess', _66 => _66.data, 'optionalAccess', _67 => _67.source, 'optionalAccess', _68 => _68.transactionHash]), () => ( fallbackTxHash));
882
+ return _nullishCoalesce(_optionalChain([event, 'optionalAccess', _68 => _68.data, 'optionalAccess', _69 => _69.source, 'optionalAccess', _70 => _70.transactionHash]), () => ( fallbackTxHash));
857
883
  }
858
884
  function ProcessingStep({
859
885
  smartAccount,
@@ -885,13 +911,14 @@ function ProcessingStep({
885
911
  onRetry,
886
912
  onDepositComplete,
887
913
  onDepositFailed,
914
+ onSourceTransactionObserved,
888
915
  onError
889
916
  }) {
890
917
  const startTimeRef = _react.useRef.call(void 0, Date.now());
891
918
  const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
892
919
  const pollTimeoutRef = _react.useRef.call(void 0, null);
893
920
  const escalatedDelayRef = _react.useRef.call(void 0, false);
894
- const processingContextRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, {
921
+ const processingContextRef = _chunkHAQOFI3Dcjs.useLatestRef.call(void 0, {
895
922
  amount,
896
923
  sourceChain,
897
924
  sourceToken,
@@ -900,11 +927,12 @@ function ProcessingStep({
900
927
  targetChain,
901
928
  targetToken
902
929
  });
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, );
930
+ const onDepositCompleteRef = _chunkHAQOFI3Dcjs.useLatestRef.call(void 0, onDepositComplete);
931
+ const onDepositFailedRef = _chunkHAQOFI3Dcjs.useLatestRef.call(void 0, onDepositFailed);
932
+ const onErrorRef = _chunkHAQOFI3Dcjs.useLatestRef.call(void 0, onError);
933
+ const explorerTxUrl = _chunkHAQOFI3Dcjs.useExplorerTxUrl.call(void 0, );
907
934
  const initialTerminalEventRef = _react.useRef.call(void 0, null);
935
+ const completedDirectTransferTxHashRef = _react.useRef.call(void 0, null);
908
936
  const [state, setState] = _react.useState.call(void 0, () => {
909
937
  if (directTransfer) return { type: "complete" };
910
938
  const initial = getInitialProcessingState(
@@ -940,19 +968,22 @@ function ProcessingStep({
940
968
  [txHash]
941
969
  );
942
970
  _react.useEffect.call(void 0, () => {
943
- if (!directTransfer) return;
971
+ if (!directTransfer || completedDirectTransferTxHashRef.current === txHash) {
972
+ return;
973
+ }
974
+ completedDirectTransferTxHashRef.current = txHash;
944
975
  const completedAt = Date.now();
945
976
  updatePhaseTimings(() => ({
946
977
  startedAt: startTimeRef.current,
947
978
  completedAt,
948
979
  endedAt: completedAt
949
980
  }));
950
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
981
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "direct-transfer:complete", {
951
982
  txHash,
952
983
  flowLabel
953
984
  });
954
985
  const context = processingContextRef.current;
955
- _optionalChain([onDepositCompleteRef, 'access', _69 => _69.current, 'optionalCall', _70 => _70(txHash, void 0, {
986
+ _optionalChain([onDepositCompleteRef, 'access', _71 => _71.current, 'optionalCall', _72 => _72(txHash, void 0, {
956
987
  amount: context.amount,
957
988
  sourceChain: context.sourceChain,
958
989
  sourceToken: context.sourceToken,
@@ -979,13 +1010,13 @@ function ProcessingStep({
979
1010
  if (outcome.type === "complete") {
980
1011
  const context = processingContextRef.current;
981
1012
  const sourceTxHash2 = getSettledSourceTxHash(event, txHash);
982
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
1013
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "initial-event:complete", {
983
1014
  txHash,
984
1015
  sourceTxHash: sourceTxHash2,
985
1016
  destinationTxHash: outcome.destinationTxHash,
986
1017
  event: event.type
987
1018
  });
988
- _optionalChain([onDepositCompleteRef, 'access', _71 => _71.current, 'optionalCall', _72 => _72(
1019
+ _optionalChain([onDepositCompleteRef, 'access', _73 => _73.current, 'optionalCall', _74 => _74(
989
1020
  sourceTxHash2,
990
1021
  outcome.destinationTxHash,
991
1022
  {
@@ -1000,12 +1031,12 @@ function ProcessingStep({
1000
1031
  )]);
1001
1032
  return;
1002
1033
  }
1003
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
1034
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "initial-event:failed", {
1004
1035
  txHash,
1005
1036
  message: outcome.message,
1006
1037
  event: event.type
1007
1038
  });
1008
- _optionalChain([onDepositFailedRef, 'access', _73 => _73.current, 'optionalCall', _74 => _74(txHash, outcome.message)]);
1039
+ _optionalChain([onDepositFailedRef, 'access', _75 => _75.current, 'optionalCall', _76 => _76(txHash, outcome.message)]);
1009
1040
  }, [
1010
1041
  debug,
1011
1042
  onDepositCompleteRef,
@@ -1037,13 +1068,13 @@ function ProcessingStep({
1037
1068
  updatePhaseTimings(
1038
1069
  (previous) => syncPhaseTimings(previous, state.lastEvent)
1039
1070
  );
1040
- }, [_optionalChain([state, 'access', _75 => _75.lastEvent, 'optionalAccess', _76 => _76.time]), _optionalChain([state, 'access', _77 => _77.lastEvent, 'optionalAccess', _78 => _78.type]), updatePhaseTimings]);
1071
+ }, [_optionalChain([state, 'access', _77 => _77.lastEvent, 'optionalAccess', _78 => _78.time]), _optionalChain([state, 'access', _79 => _79.lastEvent, 'optionalAccess', _80 => _80.type]), updatePhaseTimings]);
1041
1072
  const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
1042
1073
  _react.useEffect.call(void 0, () => {
1043
1074
  let cancelled = false;
1044
1075
  let timeoutId;
1045
- const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _79 => _79.variant]) === "fiat";
1046
- const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _80 => _80.expectedOrderUuid]), () => ( null));
1076
+ const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _81 => _81.variant]) === "fiat";
1077
+ const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _82 => _82.expectedOrderUuid]), () => ( null));
1047
1078
  setSwappedFiatContext(null);
1048
1079
  if (isFiatSwappedOrder && !expectedOrderUuid) {
1049
1080
  return () => {
@@ -1093,8 +1124,8 @@ function ProcessingStep({
1093
1124
  smartAccount,
1094
1125
  txHash,
1095
1126
  isSwappedOrder,
1096
- _optionalChain([swappedContext, 'optionalAccess', _81 => _81.variant]),
1097
- _optionalChain([swappedContext, 'optionalAccess', _82 => _82.expectedOrderUuid])
1127
+ _optionalChain([swappedContext, 'optionalAccess', _83 => _83.variant]),
1128
+ _optionalChain([swappedContext, 'optionalAccess', _84 => _84.expectedOrderUuid])
1098
1129
  ]);
1099
1130
  _react.useEffect.call(void 0, () => {
1100
1131
  if (directTransfer) return;
@@ -1106,7 +1137,7 @@ function ProcessingStep({
1106
1137
  async function pollStatus() {
1107
1138
  try {
1108
1139
  const account = sourceChain === "solana" && solanaDepositAddress ? solanaDepositAddress : smartAccount;
1109
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
1140
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "poll:request", {
1110
1141
  account,
1111
1142
  txHash,
1112
1143
  intervalMs: pollIntervalRef.current
@@ -1117,28 +1148,28 @@ function ProcessingStep({
1117
1148
  const eventForCurrentTx = eventMatchesTx ? lastEvent2 : void 0;
1118
1149
  if (lastEvent2) {
1119
1150
  const eventData = lastEvent2.data;
1120
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
1151
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "poll:event", {
1121
1152
  type: lastEvent2.type,
1122
1153
  matchesTx: eventMatchesTx,
1123
- intentId: _optionalChain([eventData, 'optionalAccess', _83 => _83.intentId])
1154
+ intentId: _optionalChain([eventData, 'optionalAccess', _85 => _85.intentId])
1124
1155
  });
1125
1156
  }
1126
1157
  if (!isMounted) return;
1127
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _84 => _84.type]) === "bridge-complete") {
1158
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _86 => _86.type]) === "bridge-complete") {
1128
1159
  setState({ type: "complete", lastEvent: eventForCurrentTx });
1129
1160
  const sourceTxHash2 = getSettledSourceTxHash(
1130
1161
  eventForCurrentTx,
1131
1162
  txHash
1132
1163
  );
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", {
1164
+ const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _87 => _87.data, 'optionalAccess', _88 => _88.destination, 'optionalAccess', _89 => _89.transactionHash]);
1165
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "state:complete", {
1135
1166
  txHash,
1136
1167
  sourceTxHash: sourceTxHash2,
1137
1168
  destinationTxHash: destinationTxHash2,
1138
1169
  event: eventForCurrentTx.type
1139
1170
  });
1140
1171
  const context = processingContextRef.current;
1141
- _optionalChain([onDepositCompleteRef, 'access', _88 => _88.current, 'optionalCall', _89 => _89(sourceTxHash2, destinationTxHash2, {
1172
+ _optionalChain([onDepositCompleteRef, 'access', _90 => _90.current, 'optionalCall', _91 => _91(sourceTxHash2, destinationTxHash2, {
1142
1173
  amount: context.amount,
1143
1174
  sourceChain: context.sourceChain,
1144
1175
  sourceToken: context.sourceToken,
@@ -1149,33 +1180,33 @@ function ProcessingStep({
1149
1180
  })]);
1150
1181
  return;
1151
1182
  }
1152
- if (_optionalChain([eventForCurrentTx, 'optionalAccess', _90 => _90.type]) === "bridge-failed") {
1183
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _92 => _92.type]) === "bridge-failed") {
1153
1184
  const formatted = formatBridgeFailedMessage(eventForCurrentTx);
1154
1185
  setState({
1155
1186
  type: "failed",
1156
1187
  message: formatted.message,
1157
1188
  lastEvent: eventForCurrentTx
1158
1189
  });
1159
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
1190
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "state:failed", {
1160
1191
  txHash,
1161
1192
  message: formatted.message,
1162
1193
  code: formatted.code
1163
1194
  });
1164
- _optionalChain([onDepositFailedRef, 'access', _91 => _91.current, 'optionalCall', _92 => _92(txHash, formatted.message)]);
1195
+ _optionalChain([onDepositFailedRef, 'access', _93 => _93.current, 'optionalCall', _94 => _94(txHash, formatted.message)]);
1165
1196
  return;
1166
1197
  }
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"));
1198
+ if (_optionalChain([eventForCurrentTx, 'optionalAccess', _95 => _95.type]) === "error") {
1199
+ const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _96 => _96.data, 'optionalAccess', _97 => _97.message]), () => ( "Unknown error"));
1169
1200
  setState({
1170
1201
  type: "failed",
1171
1202
  message: errorMessage,
1172
1203
  lastEvent: eventForCurrentTx
1173
1204
  });
1174
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
1205
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "state:error-event", {
1175
1206
  txHash,
1176
1207
  message: errorMessage
1177
1208
  });
1178
- _optionalChain([onDepositFailedRef, 'access', _96 => _96.current, 'optionalCall', _97 => _97(txHash, errorMessage)]);
1209
+ _optionalChain([onDepositFailedRef, 'access', _98 => _98.current, 'optionalCall', _99 => _99(txHash, errorMessage)]);
1179
1210
  return;
1180
1211
  }
1181
1212
  setState((previous) => ({
@@ -1184,7 +1215,7 @@ function ProcessingStep({
1184
1215
  }));
1185
1216
  scheduleNextPoll();
1186
1217
  } catch (error) {
1187
- _chunkZMT4ATHRcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
1218
+ _chunkHAQOFI3Dcjs.debugError.call(void 0, debug, "processing", "poll:failure", error, {
1188
1219
  smartAccount,
1189
1220
  txHash,
1190
1221
  intervalMs: pollIntervalRef.current
@@ -1199,7 +1230,7 @@ function ProcessingStep({
1199
1230
  pollIntervalRef.current * BACKOFF_MULTIPLIER,
1200
1231
  MAX_POLL_INTERVAL
1201
1232
  );
1202
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
1233
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "poll:scheduled", {
1203
1234
  nextIntervalMs: pollIntervalRef.current
1204
1235
  });
1205
1236
  pollStatus();
@@ -1232,11 +1263,11 @@ function ProcessingStep({
1232
1263
  escalatedDelayRef.current = true;
1233
1264
  setHasEscalatedDelay(true);
1234
1265
  const message = "Transfer is taking longer than expected. Your funds are safe and processing will continue automatically.";
1235
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
1266
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "processing", "state:delay-escalated", {
1236
1267
  txHash,
1237
1268
  timeoutMs: ESCALATED_DELAY_MS
1238
1269
  });
1239
- _optionalChain([onErrorRef, 'access', _98 => _98.current, 'optionalCall', _99 => _99(message, "PROCESS_TIMEOUT")]);
1270
+ _optionalChain([onErrorRef, 'access', _100 => _100.current, 'optionalCall', _101 => _101(message, "PROCESS_TIMEOUT")]);
1240
1271
  }, ESCALATED_DELAY_MS);
1241
1272
  return () => clearTimeout(timeoutId);
1242
1273
  }, [debug, directTransfer, onErrorRef, state.type, txHash]);
@@ -1248,19 +1279,24 @@ function ProcessingStep({
1248
1279
  const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
1249
1280
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
1250
1281
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
1251
- const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _100 => _100.data, 'optionalAccess', _101 => _101.destination, 'optionalAccess', _102 => _102.transactionHash]) || null;
1282
+ const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _102 => _102.data, 'optionalAccess', _103 => _103.destination, 'optionalAccess', _104 => _104.transactionHash]) || null;
1252
1283
  const sourceTxHash = getSettledSourceTxHash(lastEvent, txHash);
1253
1284
  const sourceDetails = getEventSourceDetails(lastEvent);
1254
1285
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
1255
1286
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
1256
1287
  const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
1257
1288
  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]);
1289
+ const settledSourceTxHash = _optionalChain([lastEvent, 'optionalAccess', _105 => _105.data, 'optionalAccess', _106 => _106.source, 'optionalAccess', _107 => _107.transactionHash]);
1259
1290
  const sourceExplorerHash = _nullishCoalesce(settledSourceTxHash, () => ( (sourceTxHashPending ? null : sourceTxHash)));
1291
+ _react.useEffect.call(void 0, () => {
1292
+ if (sourceTxHashPending && settledSourceTxHash) {
1293
+ _optionalChain([onSourceTransactionObserved, 'optionalCall', _108 => _108(settledSourceTxHash)]);
1294
+ }
1295
+ }, [onSourceTransactionObserved, settledSourceTxHash, sourceTxHashPending]);
1260
1296
  const sourceExplorerUrl = sourceExplorerHash ? explorerTxUrl(displaySourceChain, sourceExplorerHash) : null;
1261
1297
  const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainId, destinationTxHash) : null;
1262
1298
  const sourceDisplay = (() => {
1263
- const resolved = _chunkZMT4ATHRcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
1299
+ const resolved = _chunkHAQOFI3Dcjs.resolveTokenDisplay.call(void 0, displaySourceToken, displaySourceChain, {
1264
1300
  symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
1265
1301
  decimals: providedSourceDecimals
1266
1302
  });
@@ -1270,10 +1306,10 @@ function ProcessingStep({
1270
1306
  };
1271
1307
  })();
1272
1308
  const sourceSymbol = sourceDisplay.symbol;
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));
1309
+ const formattedSentAmount = _nullishCoalesce(_nullishCoalesce(_chunkHAQOFI3Dcjs.formatRawTokenAmount.call(void 0, displayAmount, sourceDisplay), () => ( // Not raw base units (e.g. a decimal string) — render the number as-is.
1310
+ _chunkHAQOFI3Dcjs.formatTokenAmount.call(void 0, Number(displayAmount), sourceDisplay.symbol))), () => ( displayAmount));
1275
1311
  const eventDestination = getEventDestinationDetails(lastEvent);
1276
- const targetDisplay = _chunkZMT4ATHRcjs.resolveTokenDisplay.call(void 0,
1312
+ const targetDisplay = _chunkHAQOFI3Dcjs.resolveTokenDisplay.call(void 0,
1277
1313
  _nullishCoalesce(eventDestination.token, () => ( targetToken)),
1278
1314
  _nullishCoalesce(eventDestination.chainId, () => ( targetChainId)),
1279
1315
  // Dapp deposits default to USDC targets; mirror the source symbol last so
@@ -1281,7 +1317,7 @@ function ProcessingStep({
1281
1317
  { symbol: _nullishCoalesce(providedSourceSymbol, () => ( "USDC")) }
1282
1318
  );
1283
1319
  const targetSymbol = targetDisplay.symbol;
1284
- const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunkZMT4ATHRcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
1320
+ const formattedDestinationAmount = eventDestination.amount !== void 0 ? _chunkHAQOFI3Dcjs.formatRawTokenAmount.call(void 0, eventDestination.amount, targetDisplay) : void 0;
1285
1321
  const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
1286
1322
  const prices = useTokenPrices(service, [
1287
1323
  {
@@ -1296,17 +1332,17 @@ function ProcessingStep({
1296
1332
  }
1297
1333
  ]);
1298
1334
  const estimatedReceiveAmount = (() => {
1299
- const estimate = _chunkZMT4ATHRcjs.estimateReceiveAmount.call(void 0, {
1300
- sourceAmount: _chunkZMT4ATHRcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
1335
+ const estimate = _chunkHAQOFI3Dcjs.estimateReceiveAmount.call(void 0, {
1336
+ sourceAmount: _chunkHAQOFI3Dcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals),
1301
1337
  sourceSymbol: sourceDisplay.symbol,
1302
1338
  targetSymbol: targetDisplay.symbol,
1303
1339
  sourceAmountUsd: amountUsdNumber,
1304
- sourceTrusted: _chunkZMT4ATHRcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
1340
+ sourceTrusted: _chunkHAQOFI3Dcjs.isRecognizedToken.call(void 0, displaySourceToken, displaySourceChain),
1305
1341
  prices
1306
1342
  });
1307
- return estimate !== void 0 ? _chunkZMT4ATHRcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
1343
+ return estimate !== void 0 ? _chunkHAQOFI3Dcjs.formatTokenAmount.call(void 0, estimate, targetDisplay.symbol) : void 0;
1308
1344
  })();
1309
- const quotedReceive = quote ? _chunkZMT4ATHRcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
1345
+ const quotedReceive = quote ? _chunkHAQOFI3Dcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol) : void 0;
1310
1346
  const receiveDisplay = formattedDestinationAmount ? (
1311
1347
  // The delivered amount, once the bridge reports it — actual, not an
1312
1348
  // estimate, so it wins over the quote and carries no "~".
@@ -1320,12 +1356,12 @@ function ProcessingStep({
1320
1356
  if (sourceSymbol.toUpperCase() !== targetSymbol.toUpperCase()) {
1321
1357
  return void 0;
1322
1358
  }
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;
1359
+ const sentValue = _chunkHAQOFI3Dcjs.tokenAmountToNumber.call(void 0, displayAmount, sourceDisplay.decimals);
1360
+ const receivedValue = eventDestination.amount !== void 0 ? _chunkHAQOFI3Dcjs.tokenAmountToNumber.call(void 0, eventDestination.amount, targetDisplay.decimals) : void 0;
1325
1361
  if (sentValue === void 0 || receivedValue === void 0 || sentValue <= receivedValue) {
1326
1362
  return void 0;
1327
1363
  }
1328
- const formatted = _chunkZMT4ATHRcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
1364
+ const formatted = _chunkHAQOFI3Dcjs.formatTokenAmount.call(void 0, sentValue - receivedValue, sourceSymbol);
1329
1365
  if (formatted === void 0 || Number(formatted.replace(/,/g, "")) === 0) {
1330
1366
  return void 0;
1331
1367
  }
@@ -1342,8 +1378,8 @@ function ProcessingStep({
1342
1378
  const sourceChainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, displaySourceChain);
1343
1379
  const targetChainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, targetChainId);
1344
1380
  const timerText = formatTimer(elapsedSeconds);
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.")));
1381
+ const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _109 => _109.feeSponsored]), () => ( false));
1382
+ const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _110 => _110.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
1347
1383
  const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
1348
1384
  const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
1349
1385
  const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
@@ -1352,29 +1388,29 @@ function ProcessingStep({
1352
1388
  ] }) : isFailed ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
1353
1389
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FailedBadge, {}),
1354
1390
  /* @__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 }) })
1355
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.WalletIcon, {}), title: stateTitle });
1391
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.WalletIcon, {}), title: stateTitle });
1356
1392
  if (isComplete && isSwappedOrder) {
1357
- const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _108 => _108.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _109 => _109.paymentMethod]))), () => ( null));
1393
+ const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _111 => _111.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _112 => _112.paymentMethod]))), () => ( null));
1358
1394
  const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
1359
- const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _110 => _110.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
1395
+ const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _113 => _113.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
1360
1396
  _nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
1361
1397
  effectivePaymentMethod
1362
1398
  ) : 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)));
1399
+ const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _114 => _114.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
1400
+ const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _115 => _115.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
1365
1401
  const depositedAmount = receiveDisplay;
1366
- const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _113 => _113.onrampFeeUsd]), () => ( null));
1402
+ const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _116 => _116.onrampFeeUsd]), () => ( null));
1367
1403
  const sponsoredFeeTooltip = "This fee is sponsored for this deposit.";
1368
1404
  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.";
1369
1405
  const { rows: quoteFeeRows, chargeableUsd } = buildQuoteFeeRows(
1370
- _optionalChain([quote, 'optionalAccess', _114 => _114.fees, 'access', _115 => _115.breakdown]),
1406
+ _optionalChain([quote, 'optionalAccess', _117 => _117.fees, 'access', _118 => _118.breakdown]),
1371
1407
  sponsoredFeeTooltip
1372
1408
  );
1373
1409
  const feeRows = [];
1374
1410
  if (onrampFeeUsd != null) {
1375
1411
  feeRows.push({
1376
1412
  label: "On-ramp fee",
1377
- value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
1413
+ value: _chunkHAQOFI3Dcjs.formatFeeUsd.call(void 0, onrampFeeUsd)
1378
1414
  });
1379
1415
  }
1380
1416
  const hasFallbackFee = quoteFeeRows.length === 0 && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount));
@@ -1383,13 +1419,13 @@ function ProcessingStep({
1383
1419
  } else if (hasFallbackFee) {
1384
1420
  feeRows.push({
1385
1421
  label: "Network fee",
1386
- value: _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
1422
+ value: _chunkHAQOFI3Dcjs.formatFeeUsd.call(void 0, Number(quotedFeeAmount)),
1387
1423
  strike: feeSponsored,
1388
1424
  tooltip: feeSponsored ? sponsoredFeeTooltip : void 0
1389
1425
  });
1390
1426
  }
1391
1427
  const fallbackChargeableUsd = hasFallbackFee && !feeSponsored ? Number(quotedFeeAmount) : 0;
1392
- const feesTotal = feeRows.length > 0 ? _chunkZMT4ATHRcjs.formatFeeUsd.call(void 0,
1428
+ const feesTotal = feeRows.length > 0 ? _chunkHAQOFI3Dcjs.formatFeeUsd.call(void 0,
1393
1429
  (_nullishCoalesce(onrampFeeUsd, () => ( 0))) + chargeableUsd + fallbackChargeableUsd
1394
1430
  ) : null;
1395
1431
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1405,7 +1441,7 @@ function ProcessingStep({
1405
1441
  feesTooltip,
1406
1442
  newLabel: `New ${flowNoun}`,
1407
1443
  onNewDeposit,
1408
- onClose
1444
+ onClose: onClose ? () => onClose("success_done") : void 0
1409
1445
  }
1410
1446
  );
1411
1447
  }
@@ -1417,7 +1453,7 @@ function ProcessingStep({
1417
1453
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
1418
1454
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1419
1455
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
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 }) }),
1456
+ sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CdnIcon, { src: sourceChainIcon }) }),
1421
1457
  sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1422
1458
  "a",
1423
1459
  {
@@ -1426,7 +1462,7 @@ function ProcessingStep({
1426
1462
  rel: "noopener noreferrer",
1427
1463
  className: "rs-review-detail-link",
1428
1464
  "aria-label": "View source transaction",
1429
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ExternalLinkIcon, {})
1465
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.ExternalLinkIcon, {})
1430
1466
  }
1431
1467
  )
1432
1468
  ] })
@@ -1435,7 +1471,7 @@ function ProcessingStep({
1435
1471
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
1436
1472
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1437
1473
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
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 }) }),
1474
+ targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CdnIcon, { src: targetChainIcon }) }),
1439
1475
  destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1440
1476
  "a",
1441
1477
  {
@@ -1444,7 +1480,7 @@ function ProcessingStep({
1444
1480
  rel: "noopener noreferrer",
1445
1481
  className: "rs-review-detail-link",
1446
1482
  "aria-label": "View destination transaction",
1447
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ExternalLinkIcon, {})
1483
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.ExternalLinkIcon, {})
1448
1484
  }
1449
1485
  )
1450
1486
  ] })
@@ -1454,7 +1490,7 @@ function ProcessingStep({
1454
1490
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
1455
1491
  ] }),
1456
1492
  isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1457
- _optionalChain([swappedFiatContext, 'optionalAccess', _116 => _116.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1493
+ _optionalChain([swappedFiatContext, 'optionalAccess', _119 => _119.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1458
1494
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
1459
1495
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1460
1496
  "$",
@@ -1466,7 +1502,7 @@ function ProcessingStep({
1466
1502
  ] })
1467
1503
  ] })
1468
1504
  ] }),
1469
- _optionalChain([swappedFiatContext, 'optionalAccess', _117 => _117.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1505
+ _optionalChain([swappedFiatContext, 'optionalAccess', _120 => _120.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1470
1506
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
1471
1507
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1472
1508
  "$",
@@ -1481,7 +1517,7 @@ function ProcessingStep({
1481
1517
  " ",
1482
1518
  sourceSymbol
1483
1519
  ] }),
1484
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: sourceSymbol }) })
1520
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.TokenIcon, { symbol: sourceSymbol }) })
1485
1521
  ] })
1486
1522
  ] })
1487
1523
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -1492,14 +1528,14 @@ function ProcessingStep({
1492
1528
  " ",
1493
1529
  sourceSymbol
1494
1530
  ] }),
1495
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: sourceSymbol }) })
1531
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.TokenIcon, { symbol: sourceSymbol }) })
1496
1532
  ] })
1497
1533
  ] }),
1498
1534
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1499
1535
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
1500
1536
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
1501
1537
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
1502
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: targetSymbol }) })
1538
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.TokenIcon, { symbol: targetSymbol }) })
1503
1539
  ] })
1504
1540
  ] }),
1505
1541
  isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -1528,12 +1564,12 @@ function ProcessingStep({
1528
1564
  {
1529
1565
  className: "rs-review-detail-info",
1530
1566
  "aria-label": "Fee info",
1531
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.InfoIcon, {})
1567
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.InfoIcon, {})
1532
1568
  }
1533
1569
  ) })
1534
1570
  ] })
1535
1571
  ] }) : (() => {
1536
- const { display, struck } = _chunkZMT4ATHRcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _118 => _118.fees]));
1572
+ const { display, struck } = _chunkHAQOFI3Dcjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'optionalAccess', _121 => _121.fees]));
1537
1573
  if (display !== null) {
1538
1574
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
1539
1575
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
@@ -1564,9 +1600,9 @@ function ProcessingStep({
1564
1600
  ] });
1565
1601
  })()
1566
1602
  ] }),
1567
- isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Callout, { variant: "error", children: failureMessage }),
1603
+ isFailed && failureMessage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.Callout, { variant: "error", children: failureMessage }),
1568
1604
  isProcessing && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1569
- _chunkZMT4ATHRcjs.Button,
1605
+ _chunkHAQOFI3Dcjs.Button,
1570
1606
  {
1571
1607
  fullWidth: true,
1572
1608
  disabled: true,
@@ -1576,18 +1612,26 @@ function ProcessingStep({
1576
1612
  }
1577
1613
  ),
1578
1614
  isComplete && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
1579
- onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkZMT4ATHRcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
1615
+ onNewDeposit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkHAQOFI3Dcjs.Button, { variant: "outline", onClick: onNewDeposit, fullWidth: true, children: [
1580
1616
  "New ",
1581
1617
  flowNoun
1582
1618
  ] }),
1583
- onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Button, { onClick: onClose, fullWidth: true, children: "Done" })
1619
+ onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.Button, { onClick: () => onClose("success_done"), fullWidth: true, children: "Done" })
1584
1620
  ] }),
1585
1621
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-button-row", children: [
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" })
1622
+ onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1623
+ _chunkHAQOFI3Dcjs.Button,
1624
+ {
1625
+ variant: "outline",
1626
+ onClick: () => onClose("failure_cancel"),
1627
+ fullWidth: true,
1628
+ children: "Cancel"
1629
+ }
1630
+ ),
1631
+ handleRetry && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.Button, { onClick: handleRetry, fullWidth: true, children: "Try again" })
1588
1632
  ] })
1589
1633
  ] }),
1590
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.PoweredBy, {})
1634
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.PoweredBy, {})
1591
1635
  ] });
1592
1636
  }
1593
1637
 
@@ -1656,7 +1700,7 @@ var setupRequestDedupe = /* @__PURE__ */ new Map();
1656
1700
  function readDedupedAccountSetupResult(requestKey) {
1657
1701
  const now = Date.now();
1658
1702
  const existing = setupRequestDedupe.get(requestKey);
1659
- if (_optionalChain([existing, 'optionalAccess', _119 => _119.settled]) && existing.expiresAt > now && existing.result) {
1703
+ if (_optionalChain([existing, 'optionalAccess', _122 => _122.settled]) && existing.expiresAt > now && existing.result) {
1660
1704
  return existing.result;
1661
1705
  }
1662
1706
  return null;
@@ -1678,7 +1722,7 @@ async function runAccountSetup(input, deps) {
1678
1722
  }
1679
1723
  try {
1680
1724
  const salt = deriveAccountSalt(input);
1681
- _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
1725
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, debug, "account-setup", "setup:start", {
1682
1726
  salt,
1683
1727
  recipient: input.recipient,
1684
1728
  targetChain: input.targetChain,
@@ -1690,7 +1734,7 @@ async function runAccountSetup(input, deps) {
1690
1734
  chain: _chunk4KCSH4T3cjs.targetChainToCaip2.call(void 0, input.targetChain),
1691
1735
  token: input.targetToken,
1692
1736
  recipient: input.recipient,
1693
- ..._optionalChain([input, 'access', _120 => _120.outputTokenRules, 'optionalAccess', _121 => _121.length]) && {
1737
+ ..._optionalChain([input, 'access', _123 => _123.outputTokenRules, 'optionalAccess', _124 => _124.length]) && {
1694
1738
  outputTokenRules: input.outputTokenRules
1695
1739
  },
1696
1740
  ...input.rejectUnmapped != null && {
@@ -1704,7 +1748,7 @@ async function runAccountSetup(input, deps) {
1704
1748
  cacheKey
1705
1749
  };
1706
1750
  } catch (error) {
1707
- _chunkZMT4ATHRcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
1751
+ _chunkHAQOFI3Dcjs.debugError.call(void 0, debug, "account-setup", "setup:failed", error, {
1708
1752
  recipient: input.recipient
1709
1753
  });
1710
1754
  if (error instanceof SetupError) throw error;
@@ -1715,7 +1759,7 @@ function runAccountSetupDeduped(input, deps, requestKey) {
1715
1759
  const now = Date.now();
1716
1760
  const existing = setupRequestDedupe.get(requestKey);
1717
1761
  if (existing && (!existing.settled || existing.expiresAt > now)) {
1718
- _chunkZMT4ATHRcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
1762
+ _chunkHAQOFI3Dcjs.debugLog.call(void 0, deps.debug, "account-setup", "setup:dedupe-hit", {
1719
1763
  recipient: input.recipient,
1720
1764
  forceRegister: _nullishCoalesce(input.forceRegister, () => ( false))
1721
1765
  });
@@ -1800,4 +1844,5 @@ function mapError(error) {
1800
1844
 
1801
1845
 
1802
1846
 
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;
1847
+
1848
+ 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; exports.analyticsTargetProperties = analyticsTargetProperties;