@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
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkFKHPVLJYcjs = require('./chunk-FKHPVLJY.cjs');
7
6
 
7
+ var _chunkRAADLTSWcjs = require('./chunk-RAADLTSW.cjs');
8
8
 
9
9
 
10
10
 
@@ -37,8 +37,8 @@ var _chunkFKHPVLJYcjs = require('./chunk-FKHPVLJY.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunk65MLWUQDcjs = require('./chunk-65MLWUQD.cjs');
41
40
 
41
+ var _chunkZMT4ATHRcjs = require('./chunk-ZMT4ATHR.cjs');
42
42
 
43
43
 
44
44
 
@@ -46,7 +46,8 @@ var _chunk65MLWUQDcjs = require('./chunk-65MLWUQD.cjs');
46
46
 
47
47
 
48
48
 
49
- var _chunkO7BCVQ6Lcjs = require('./chunk-O7BCVQ6L.cjs');
49
+
50
+ var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
50
51
 
51
52
  // src/WithdrawModal.tsx
52
53
  var _react = require('react');
@@ -233,8 +234,8 @@ function WithdrawFormStep({
233
234
  const publicClientChainId = _optionalChain([publicClient, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]);
234
235
  useClickOutside(chainDropdownRef, () => setShowChainDropdown(false));
235
236
  useClickOutside(tokenDropdownRef, () => setShowTokenDropdown(false));
236
- const targetSymbol = _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
237
- const targetChainName = _chunkO7BCVQ6Lcjs.getChainName.call(void 0, targetChain);
237
+ const targetSymbol = _chunk4KCSH4T3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
238
+ const targetChainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, targetChain);
238
239
  const isBusy = submitting || isSubmitting;
239
240
  const seededRecipientRef = _react.useRef.call(void 0, _nullishCoalesce(defaultRecipient, () => ( "")));
240
241
  _react.useEffect.call(void 0, () => {
@@ -258,7 +259,7 @@ function WithdrawFormStep({
258
259
  return;
259
260
  }
260
261
  try {
261
- const bal = _chunk65MLWUQDcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
262
+ const bal = _chunkZMT4ATHRcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
262
263
  address: asset.token,
263
264
  abi: _viem.erc20Abi,
264
265
  functionName: "balanceOf",
@@ -363,7 +364,7 @@ function WithdrawFormStep({
363
364
  await onSubmit(recipient, amount);
364
365
  } catch (err) {
365
366
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
366
- setError(_chunk65MLWUQDcjs.formatUserError.call(void 0, raw));
367
+ setError(_chunkZMT4ATHRcjs.formatUserError.call(void 0, raw));
367
368
  } finally {
368
369
  setIsSubmitting(false);
369
370
  }
@@ -379,16 +380,16 @@ function WithdrawFormStep({
379
380
  if (isBalanceLoading) {
380
381
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
381
382
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
382
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Spinner, { className: "rs-spinner--lg" }),
383
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Spinner, { className: "rs-spinner--lg" }),
383
384
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
384
385
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: "Please wait before withdrawing." })
385
386
  ] }),
386
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.PoweredBy, {})
387
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.PoweredBy, {})
387
388
  ] });
388
389
  }
389
390
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
390
391
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
391
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
392
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
392
393
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
393
394
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
394
395
  "label",
@@ -448,7 +449,7 @@ function WithdrawFormStep({
448
449
  ) })
449
450
  ] }),
450
451
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
451
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunk65MLWUQDcjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
452
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkZMT4ATHRcjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
452
453
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
453
454
  "Balance: ",
454
455
  formattedBalance,
@@ -479,9 +480,9 @@ function WithdrawFormStep({
479
480
  children: [
480
481
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
481
482
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
482
- _chunk65MLWUQDcjs.CdnIcon,
483
+ _chunkZMT4ATHRcjs.CdnIcon,
483
484
  {
484
- src: _chunkO7BCVQ6Lcjs.getChainIcon.call(void 0, targetChain),
485
+ src: _chunk4KCSH4T3cjs.getChainIcon.call(void 0, targetChain),
485
486
  alt: targetChainName,
486
487
  className: "rs-withdraw-dropdown-icon"
487
488
  }
@@ -489,7 +490,7 @@ function WithdrawFormStep({
489
490
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
490
491
  ] }),
491
492
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
492
- _chunk65MLWUQDcjs.ChevronDownIcon,
493
+ _chunkZMT4ATHRcjs.ChevronDownIcon,
493
494
  {
494
495
  className: "rs-withdraw-dropdown-arrow",
495
496
  style: {
@@ -511,9 +512,9 @@ function WithdrawFormStep({
511
512
  },
512
513
  children: [
513
514
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
514
- _chunk65MLWUQDcjs.CdnIcon,
515
+ _chunkZMT4ATHRcjs.CdnIcon,
515
516
  {
516
- src: _chunkO7BCVQ6Lcjs.getChainIcon.call(void 0, chain.id),
517
+ src: _chunk4KCSH4T3cjs.getChainIcon.call(void 0, chain.id),
517
518
  alt: chain.name,
518
519
  className: "rs-withdraw-dropdown-icon"
519
520
  }
@@ -548,7 +549,7 @@ function WithdrawFormStep({
548
549
  children: [
549
550
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
550
551
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
551
- _chunk65MLWUQDcjs.TokenIcon,
552
+ _chunkZMT4ATHRcjs.TokenIcon,
552
553
  {
553
554
  symbol: targetSymbol,
554
555
  className: "rs-withdraw-dropdown-icon"
@@ -557,7 +558,7 @@ function WithdrawFormStep({
557
558
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
558
559
  ] }),
559
560
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
560
- _chunk65MLWUQDcjs.ChevronDownIcon,
561
+ _chunkZMT4ATHRcjs.ChevronDownIcon,
561
562
  {
562
563
  className: "rs-withdraw-dropdown-arrow",
563
564
  style: {
@@ -579,7 +580,7 @@ function WithdrawFormStep({
579
580
  },
580
581
  children: [
581
582
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
582
- _chunk65MLWUQDcjs.TokenIcon,
583
+ _chunkZMT4ATHRcjs.TokenIcon,
583
584
  {
584
585
  symbol: option.symbol,
585
586
  className: "rs-withdraw-dropdown-icon"
@@ -595,10 +596,10 @@ function WithdrawFormStep({
595
596
  )
596
597
  ] })
597
598
  ] }),
598
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Callout, { variant: "error", children: error }),
599
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Callout, { variant: "error", children: registrationError }),
599
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Callout, { variant: "error", children: error }),
600
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Callout, { variant: "error", children: registrationError }),
600
601
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
601
- _chunk65MLWUQDcjs.Button,
602
+ _chunkZMT4ATHRcjs.Button,
602
603
  {
603
604
  onClick: handleWithdraw,
604
605
  fullWidth: true,
@@ -613,7 +614,7 @@ function WithdrawFormStep({
613
614
  }
614
615
  )
615
616
  ] }),
616
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.PoweredBy, {})
617
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.PoweredBy, {})
617
618
  ] });
618
619
  }
619
620
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -641,25 +642,26 @@ function WithdrawReviewStep({
641
642
  }) {
642
643
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
643
644
  const [error, setError] = _react.useState.call(void 0, null);
644
- const sourceChainName = _chunkO7BCVQ6Lcjs.getChainName.call(void 0, sourceChain);
645
- const sourceChainIcon = _chunkO7BCVQ6Lcjs.getChainIcon.call(void 0, sourceChain);
646
- const targetSymbol = _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
647
- const targetChainName = _chunkO7BCVQ6Lcjs.getChainName.call(void 0, targetChain);
648
- const targetChainIcon = _chunkO7BCVQ6Lcjs.getChainIcon.call(void 0, targetChain);
645
+ const sourceChainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, sourceChain);
646
+ const sourceChainIcon = _chunk4KCSH4T3cjs.getChainIcon.call(void 0, sourceChain);
647
+ const targetSymbol = _chunk4KCSH4T3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
648
+ const targetChainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, targetChain);
649
+ const targetChainIcon = _chunk4KCSH4T3cjs.getChainIcon.call(void 0, targetChain);
649
650
  const amountNumber = Number(amount);
650
- const formattedSendAmount = _nullishCoalesce(_chunk65MLWUQDcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
651
- const prices = _chunkFKHPVLJYcjs.useTokenPrices.call(void 0, service, [
651
+ const formattedSendAmount = _nullishCoalesce(_chunkZMT4ATHRcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
652
+ const prices = _chunkRAADLTSWcjs.useTokenPrices.call(void 0, service, [
652
653
  { chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
653
654
  { chainId: targetChain, address: targetToken, symbol: targetSymbol }
654
655
  ]);
655
- const receiveDisplay = _nullishCoalesce(_chunk65MLWUQDcjs.formatReceiveEstimate.call(void 0, {
656
+ const receiveDisplay = _nullishCoalesce(_chunkZMT4ATHRcjs.formatReceiveEstimate.call(void 0, {
656
657
  sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
657
658
  sourceSymbol,
658
659
  targetSymbol,
659
- sourceTrusted: _chunk65MLWUQDcjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
660
+ sourceTrusted: _chunkZMT4ATHRcjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
660
661
  prices
661
662
  }), () => ( // No price for the target token — an honest dash beats a wrong number.
662
663
  "\u2014"));
664
+ const [submissionUncertain, setSubmissionUncertain] = _react.useState.call(void 0, false);
663
665
  const handleConfirm = async () => {
664
666
  setError(null);
665
667
  setIsSubmitting(true);
@@ -667,20 +669,22 @@ function WithdrawReviewStep({
667
669
  await onConfirm();
668
670
  } catch (err) {
669
671
  const raw = err instanceof Error ? err.message : "Withdraw failed";
670
- const message = _chunk65MLWUQDcjs.formatUserError.call(void 0, raw);
672
+ const uncertain = _chunkRAADLTSWcjs.isSubmissionUncertain.call(void 0, err);
673
+ const message = uncertain ? "Withdrawal status is uncertain. Check your activity before trying again." : _chunkZMT4ATHRcjs.formatUserError.call(void 0, raw);
674
+ if (uncertain) setSubmissionUncertain(true);
671
675
  setError(message);
672
676
  _optionalChain([onError, 'optionalCall', _7 => _7(message, "WITHDRAW_REVIEW_ERROR", raw)]);
673
677
  } finally {
674
678
  setIsSubmitting(false);
675
679
  }
676
680
  };
677
- const disabled = isSubmitting || registrationPending || Boolean(registrationError);
681
+ const disabled = isSubmitting || submissionUncertain || registrationPending || Boolean(registrationError);
678
682
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
679
683
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
680
684
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
681
- _chunk65MLWUQDcjs.BodyHeader,
685
+ _chunkZMT4ATHRcjs.BodyHeader,
682
686
  {
683
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CircleArrowOutUpLeftIcon, {}),
687
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CircleArrowOutUpLeftIcon, {}),
684
688
  title: "Review withdrawal"
685
689
  }
686
690
  ),
@@ -693,14 +697,14 @@ function WithdrawReviewStep({
693
697
  " ",
694
698
  sourceSymbol
695
699
  ] }),
696
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.TokenIcon, { symbol: sourceSymbol }) })
700
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: sourceSymbol }) })
697
701
  ] })
698
702
  ] }),
699
703
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
700
704
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
701
705
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
702
706
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
703
- sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CdnIcon, { src: sourceChainIcon }) })
707
+ sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CdnIcon, { src: sourceChainIcon }) })
704
708
  ] })
705
709
  ] }),
706
710
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -711,14 +715,14 @@ function WithdrawReviewStep({
711
715
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
712
716
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
713
717
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
714
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.TokenIcon, { symbol: targetSymbol }) })
718
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.TokenIcon, { symbol: targetSymbol }) })
715
719
  ] })
716
720
  ] }),
717
721
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
718
722
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
719
723
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
720
724
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
721
- targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CdnIcon, { src: targetChainIcon }) })
725
+ targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CdnIcon, { src: targetChainIcon }) })
722
726
  ] })
723
727
  ] }),
724
728
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -726,10 +730,10 @@ function WithdrawReviewStep({
726
730
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
727
731
  ] })
728
732
  ] }),
729
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Callout, { variant: "error", children: error }),
730
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.Callout, { variant: "error", children: registrationError }),
733
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Callout, { variant: "error", children: error }),
734
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.Callout, { variant: "error", children: registrationError }),
731
735
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
732
- _chunk65MLWUQDcjs.Button,
736
+ _chunkZMT4ATHRcjs.Button,
733
737
  {
734
738
  onClick: handleConfirm,
735
739
  loading: isSubmitting,
@@ -740,7 +744,7 @@ function WithdrawReviewStep({
740
744
  }
741
745
  )
742
746
  ] }),
743
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.PoweredBy, {})
747
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.PoweredBy, {})
744
748
  ] });
745
749
  }
746
750
  WithdrawReviewStep.displayName = "WithdrawReviewStep";
@@ -773,11 +777,11 @@ function WithdrawFlow({
773
777
  onError,
774
778
  debug
775
779
  }) {
776
- const rpcUrls = _chunk65MLWUQDcjs.useRpcUrls.call(void 0, );
777
- const onStepChangeRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onStepChange);
778
- const onEventRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onEvent);
779
- const onLifecycleRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onLifecycle);
780
- const onErrorRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onError);
780
+ const rpcUrls = _chunkZMT4ATHRcjs.useRpcUrls.call(void 0, );
781
+ const onStepChangeRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onStepChange);
782
+ const onEventRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onEvent);
783
+ const onLifecycleRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onLifecycle);
784
+ const onErrorRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onError);
781
785
  const isFlowActiveRef = _react.useRef.call(void 0, true);
782
786
  const submitGenerationRef = _react.useRef.call(void 0, 0);
783
787
  _react.useEffect.call(void 0, () => {
@@ -788,13 +792,13 @@ function WithdrawFlow({
788
792
  }, []);
789
793
  const logFlow = _react.useCallback.call(void 0,
790
794
  (message, data) => {
791
- _chunk65MLWUQDcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
795
+ _chunkZMT4ATHRcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
792
796
  },
793
797
  [debug]
794
798
  );
795
799
  const logFlowError = _react.useCallback.call(void 0,
796
800
  (message, error, data) => {
797
- _chunk65MLWUQDcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
801
+ _chunkZMT4ATHRcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
798
802
  },
799
803
  [debug]
800
804
  );
@@ -817,10 +821,7 @@ function WithdrawFlow({
817
821
  const registration = useWithdrawStore((s) => s.registration);
818
822
  const flowStep = useWithdrawStore((s) => s.step);
819
823
  const reviewedRecipient = useWithdrawStore((s) => s.recipient);
820
- const publicClient = _react.useMemo.call(void 0,
821
- () => _chunk65MLWUQDcjs.getPublicClient.call(void 0, sourceChain, rpcUrls),
822
- [sourceChain, rpcUrls]
823
- );
824
+ const publicClient = _chunkZMT4ATHRcjs.useReadClient.call(void 0, sourceChain, rpcUrls);
824
825
  const recipientForRegistration = _react.useMemo.call(void 0, () => {
825
826
  if (!recipientInput) return void 0;
826
827
  return ADDR_REGEX.test(recipientInput) ? recipientInput : void 0;
@@ -846,7 +847,7 @@ function WithdrawFlow({
846
847
  targetToken,
847
848
  recipient: recipientForRegistration
848
849
  });
849
- const salt = _chunkFKHPVLJYcjs.deriveAccountSalt.call(void 0, {
850
+ const salt = _chunkRAADLTSWcjs.deriveAccountSalt.call(void 0, {
850
851
  recipient: recipientForRegistration,
851
852
  targetChain,
852
853
  targetToken
@@ -854,7 +855,7 @@ function WithdrawFlow({
854
855
  const { evmDepositAddress } = await service.registerManagedAccount({
855
856
  salt,
856
857
  target: {
857
- chain: _chunkO7BCVQ6Lcjs.targetChainToCaip2.call(void 0, targetChain),
858
+ chain: _chunk4KCSH4T3cjs.targetChainToCaip2.call(void 0, targetChain),
858
859
  token: targetToken,
859
860
  recipient: recipientForRegistration
860
861
  }
@@ -876,7 +877,7 @@ function WithdrawFlow({
876
877
  } catch (err) {
877
878
  if (cancelled) return;
878
879
  const raw = err instanceof Error ? err.message : "Registration failed";
879
- const message = _chunk65MLWUQDcjs.formatUserError.call(void 0, raw);
880
+ const message = _chunkZMT4ATHRcjs.formatUserError.call(void 0, raw);
880
881
  logFlowError("auto-register:failed", err, {
881
882
  accountAddress,
882
883
  targetChain,
@@ -907,10 +908,10 @@ function WithdrawFlow({
907
908
  onErrorRef
908
909
  ]);
909
910
  const asset = _react.useMemo.call(void 0, () => {
910
- const symbol = _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
911
- const decimals = _chunkO7BCVQ6Lcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
911
+ const symbol = _chunk4KCSH4T3cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
912
+ const decimals = _chunk4KCSH4T3cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
912
913
  return {
913
- id: _chunk65MLWUQDcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
914
+ id: _chunkZMT4ATHRcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
914
915
  chainId: sourceChain,
915
916
  token: sourceToken,
916
917
  symbol,
@@ -918,7 +919,7 @@ function WithdrawFlow({
918
919
  decimals
919
920
  };
920
921
  }, [sourceChain, sourceToken]);
921
- const isSourceNative = sourceToken.toLowerCase() === _chunkO7BCVQ6Lcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
922
+ const isSourceNative = sourceToken.toLowerCase() === _chunk4KCSH4T3cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
922
923
  const isSameRoute = targetChain === sourceChain && targetToken.toLowerCase() === sourceToken.toLowerCase();
923
924
  const reviewedTarget = reviewedRecipient ? {
924
925
  chain: targetChain,
@@ -932,7 +933,8 @@ function WithdrawFlow({
932
933
  }, [storeApi]);
933
934
  _react.useEffect.call(void 0, () => {
934
935
  _optionalChain([onStepChangeRef, 'access', _18 => _18.current, 'optionalCall', _19 => _19(
935
- flowStep === "review" ? reviewBackHandler : void 0
936
+ flowStep === "review" ? reviewBackHandler : void 0,
937
+ flowStep
936
938
  )]);
937
939
  }, [flowStep, reviewBackHandler, onStepChangeRef]);
938
940
  const lastStepOpenEventKeyRef = _react.useRef.call(void 0, null);
@@ -943,8 +945,8 @@ function WithdrawFlow({
943
945
  }
944
946
  if (lastStepOpenEventKeyRef.current === "form") return;
945
947
  lastStepOpenEventKeyRef.current = "form";
946
- const tokenSymbol = _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
947
- const chainName = _chunkO7BCVQ6Lcjs.getChainName.call(void 0, targetChain);
948
+ const tokenSymbol = _chunk4KCSH4T3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
949
+ const chainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, targetChain);
948
950
  _optionalChain([onEventRef, 'access', _20 => _20.current, 'optionalCall', _21 => _21({
949
951
  type: "withdraw_modal_select_amount_open",
950
952
  pred_balance: totalBalanceUsd,
@@ -979,8 +981,8 @@ function WithdrawFlow({
979
981
  );
980
982
  const handleFormContinue = _react.useCallback.call(void 0,
981
983
  (recipient, amountValue) => {
982
- const tokenSymbol = _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
983
- const chainName = _chunkO7BCVQ6Lcjs.getChainName.call(void 0, targetChain);
984
+ const tokenSymbol = _chunk4KCSH4T3cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
985
+ const chainName = _chunk4KCSH4T3cjs.getChainName.call(void 0, targetChain);
984
986
  _optionalChain([onEventRef, 'access', _24 => _24.current, 'optionalCall', _25 => _25({
985
987
  type: "withdraw_modal_select_amount_cta_click",
986
988
  pred_balance: totalBalanceUsd,
@@ -1090,7 +1092,7 @@ function WithdrawFlow({
1090
1092
  targetChain,
1091
1093
  targetToken
1092
1094
  });
1093
- handleError(_chunk65MLWUQDcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1095
+ handleError(_chunkZMT4ATHRcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1094
1096
  throw err;
1095
1097
  }
1096
1098
  },
@@ -1143,8 +1145,8 @@ function WithdrawFlow({
1143
1145
  },
1144
1146
  [logFlowError, onLifecycleRef, storeApi]
1145
1147
  );
1146
- const targetChainOptions = _chunk65MLWUQDcjs.useDestinationChains.call(void 0, );
1147
- const targetTokensFor = _chunk65MLWUQDcjs.useTargetTokens.call(void 0, );
1148
+ const targetChainOptions = _chunkZMT4ATHRcjs.useDestinationChains.call(void 0, );
1149
+ const targetTokensFor = _chunkZMT4ATHRcjs.useTargetTokens.call(void 0, );
1148
1150
  const targetTokenOptions = _react.useMemo.call(void 0,
1149
1151
  () => targetTokensFor(targetChain),
1150
1152
  [targetChain, targetTokensFor]
@@ -1216,7 +1218,7 @@ function WithdrawFlow({
1216
1218
  }
1217
1219
  ),
1218
1220
  stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1219
- _chunkFKHPVLJYcjs.ProcessingStep,
1221
+ _chunkRAADLTSWcjs.ProcessingStep,
1220
1222
  {
1221
1223
  smartAccount: _nullishCoalesce(storeApi.getState().processingSmartAccount, () => ( (registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0"))),
1222
1224
  txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
@@ -1284,24 +1286,29 @@ function WithdrawModal({
1284
1286
  // Every prop 0.9.0 removed lands here, since none of them is named above.
1285
1287
  // `uiConfig` is destructured, so its removed nested key isn't scanned — that
1286
1288
  // one only ever applied to the deposit flow.
1289
+ // Before the rest element, or it lands in `removedProps` and gets warned
1290
+ // about as a prop 0.9.0 removed.
1291
+ onUiState,
1287
1292
  ...removedProps
1288
1293
  }) {
1289
- _chunkFKHPVLJYcjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
1290
- _chunk65MLWUQDcjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
1294
+ _chunkRAADLTSWcjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
1295
+ _chunkZMT4ATHRcjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
1291
1296
  const modalRef = _react.useRef.call(void 0, null);
1292
- const onReadyRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onReady);
1297
+ const onReadyRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onReady);
1293
1298
  const [backHandler, setBackHandler] = _react.useState.call(void 0,
1294
1299
  void 0
1295
1300
  );
1296
- const targetChain = _chunkO7BCVQ6Lcjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
1297
- const sourceChain = _chunkO7BCVQ6Lcjs.getChainId.call(void 0, sourceChainProp);
1298
- const rpcUrls = _chunk65MLWUQDcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
1301
+ const [screen, setScreen] = _react.useState.call(void 0, "form");
1302
+ const onUiStateRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onUiState);
1303
+ const targetChain = _chunk4KCSH4T3cjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
1304
+ const sourceChain = _chunk4KCSH4T3cjs.getChainId.call(void 0, sourceChainProp);
1305
+ const rpcUrls = _chunkZMT4ATHRcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
1299
1306
  const service = _react.useMemo.call(void 0,
1300
- () => _chunk65MLWUQDcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1307
+ () => _chunkZMT4ATHRcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1301
1308
  [backendUrl, debug]
1302
1309
  );
1303
1310
  const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
1304
- const onErrorRef = _chunk65MLWUQDcjs.useLatestRef.call(void 0, onError);
1311
+ const onErrorRef = _chunkZMT4ATHRcjs.useLatestRef.call(void 0, onError);
1305
1312
  _react.useEffect.call(void 0, () => {
1306
1313
  if (isOpen && typeof onSendTransaction !== "function") {
1307
1314
  _optionalChain([onErrorRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34({
@@ -1311,9 +1318,8 @@ function WithdrawModal({
1311
1318
  }
1312
1319
  }, [isOpen, onSendTransaction, onErrorRef]);
1313
1320
  _react.useEffect.call(void 0, () => {
1314
- if (isOpen && modalRef.current) {
1315
- _chunk65MLWUQDcjs.applyTheme.call(void 0, modalRef.current, theme);
1316
- }
1321
+ if (!isOpen || !modalRef.current) return;
1322
+ return _chunkZMT4ATHRcjs.applyTheme.call(void 0, modalRef.current, theme);
1317
1323
  }, [isOpen, theme]);
1318
1324
  _react.useEffect.call(void 0, () => {
1319
1325
  if (isOpen) {
@@ -1325,13 +1331,21 @@ function WithdrawModal({
1325
1331
  store.dispatch({ type: "modal/reset" });
1326
1332
  }
1327
1333
  }, [isOpen, store]);
1328
- const handleStepChange = _react.useCallback.call(void 0, (onBack) => {
1334
+ const handleStepChange = _react.useCallback.call(void 0, (onBack, next) => {
1329
1335
  setBackHandler(() => onBack);
1336
+ if (next) setScreen(next);
1330
1337
  }, []);
1331
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _37 => _37.showBackButton]), () => ( true));
1338
+ _react.useEffect.call(void 0, () => {
1339
+ _optionalChain([onUiStateRef, 'access', _37 => _37.current, 'optionalCall', _38 => _38({
1340
+ screen,
1341
+ back: backHandler,
1342
+ submitting: false
1343
+ })]);
1344
+ }, [screen, backHandler, onUiStateRef]);
1345
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _39 => _39.showBackButton]), () => ( true));
1332
1346
  const canGoBack = backHandler !== void 0;
1333
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1334
- _chunk65MLWUQDcjs.Modal,
1347
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1348
+ _chunkZMT4ATHRcjs.Modal,
1335
1349
  {
1336
1350
  isOpen,
1337
1351
  onClose,
@@ -1347,7 +1361,7 @@ function WithdrawModal({
1347
1361
  className: "rs-modal-header-back",
1348
1362
  "aria-label": "Go back",
1349
1363
  onClick: backHandler,
1350
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.ChevronLeftIcon, {})
1364
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.ChevronLeftIcon, {})
1351
1365
  }
1352
1366
  ) }),
1353
1367
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1357,7 +1371,7 @@ function WithdrawModal({
1357
1371
  onClick: onClose,
1358
1372
  className: "rs-modal-close",
1359
1373
  "aria-label": "Close",
1360
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk65MLWUQDcjs.CloseIcon, {})
1374
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMT4ATHRcjs.CloseIcon, {})
1361
1375
  }
1362
1376
  ) })
1363
1377
  ] }),