@rhinestone/deposit-modal 0.11.0 → 0.12.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 (45) hide show
  1. package/dist/{DepositModalReown-6RVLEM3B.mjs → DepositModalReown-MVVRUXO4.mjs} +7 -7
  2. package/dist/{DepositModalReown-TXTLVZIQ.cjs → DepositModalReown-PZXHTPIS.cjs} +17 -17
  3. package/dist/{chunk-VRNRRN2U.mjs → chunk-2AMRKYJ4.mjs} +4 -4
  4. package/dist/{chunk-JYKMR6QI.cjs → chunk-2PQ34KU3.cjs} +3 -3
  5. package/dist/{chunk-TENL4H64.cjs → chunk-4R2ZHSDQ.cjs} +4 -9
  6. package/dist/{chunk-XVKBCDZI.cjs → chunk-4SRVZRZF.cjs} +1 -1
  7. package/dist/{chunk-MZ53PDIX.mjs → chunk-53IGTENZ.mjs} +1 -1
  8. package/dist/{chunk-ITAYM7SB.mjs → chunk-5IP67CL5.mjs} +45 -17
  9. package/dist/{chunk-HCQWFL3A.cjs → chunk-6ZJTZ7DS.cjs} +81 -80
  10. package/dist/{chunk-BLJMYCBF.cjs → chunk-BK54FZAE.cjs} +83 -83
  11. package/dist/{chunk-G4FVZQOM.mjs → chunk-EUIPQ3T4.mjs} +7 -7
  12. package/dist/{chunk-QRR3Y7EK.mjs → chunk-GZNMBZHY.mjs} +1 -1
  13. package/dist/{chunk-NPSC5R22.cjs → chunk-LBJFACLH.cjs} +125 -97
  14. package/dist/{chunk-7RNEYPI4.cjs → chunk-LTPVHQXJ.cjs} +555 -549
  15. package/dist/{chunk-TRD2FCAR.mjs → chunk-Q5MFRAWD.mjs} +417 -411
  16. package/dist/{chunk-WLDTBKRA.mjs → chunk-QF5T6HXC.mjs} +5 -4
  17. package/dist/{chunk-DYTRG4C7.mjs → chunk-RMYUE6HJ.mjs} +1 -1
  18. package/dist/{chunk-GWA6GFTI.cjs → chunk-WZJMJFP7.cjs} +62 -62
  19. package/dist/{chunk-JPRV36DT.cjs → chunk-XJB3VG4C.cjs} +2 -2
  20. package/dist/{chunk-53IFZGSF.mjs → chunk-YR43AAX5.mjs} +0 -5
  21. package/dist/claim.cjs +6 -6
  22. package/dist/claim.d.cts +2 -2
  23. package/dist/claim.d.ts +2 -2
  24. package/dist/claim.mjs +5 -5
  25. package/dist/constants.cjs +3 -3
  26. package/dist/constants.d.cts +1 -1
  27. package/dist/constants.d.ts +1 -1
  28. package/dist/constants.mjs +2 -2
  29. package/dist/deposit.cjs +8 -8
  30. package/dist/deposit.d.cts +2 -2
  31. package/dist/deposit.d.ts +2 -2
  32. package/dist/deposit.mjs +7 -7
  33. package/dist/index.cjs +10 -10
  34. package/dist/index.d.cts +1 -1
  35. package/dist/index.d.ts +1 -1
  36. package/dist/index.mjs +9 -9
  37. package/dist/polymarket.cjs +5 -5
  38. package/dist/polymarket.mjs +2 -2
  39. package/dist/{types-C7wag_iL.d.cts → types-BO4iP6fG.d.cts} +6 -1
  40. package/dist/{types-D4b6Cjox.d.ts → types-oFblf65g.d.ts} +6 -1
  41. package/dist/withdraw.cjs +6 -6
  42. package/dist/withdraw.d.cts +2 -2
  43. package/dist/withdraw.d.ts +2 -2
  44. package/dist/withdraw.mjs +5 -5
  45. package/package.json +1 -1
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkHCQWFL3Acjs = require('./chunk-HCQWFL3A.cjs');
6
+ var _chunk6ZJTZ7DScjs = require('./chunk-6ZJTZ7DS.cjs');
7
7
 
8
8
 
9
9
 
@@ -37,7 +37,7 @@ var _chunkHCQWFL3Acjs = require('./chunk-HCQWFL3A.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunkNPSC5R22cjs = require('./chunk-NPSC5R22.cjs');
40
+ var _chunkLBJFACLHcjs = require('./chunk-LBJFACLH.cjs');
41
41
 
42
42
 
43
43
 
@@ -46,7 +46,7 @@ var _chunkNPSC5R22cjs = require('./chunk-NPSC5R22.cjs');
46
46
 
47
47
 
48
48
 
49
- var _chunkTENL4H64cjs = require('./chunk-TENL4H64.cjs');
49
+ var _chunk4R2ZHSDQcjs = require('./chunk-4R2ZHSDQ.cjs');
50
50
 
51
51
  // src/WithdrawModal.tsx
52
52
  var _react = require('react');
@@ -233,8 +233,8 @@ function WithdrawFormStep({
233
233
  const publicClientChainId = _optionalChain([publicClient, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]);
234
234
  useClickOutside(chainDropdownRef, () => setShowChainDropdown(false));
235
235
  useClickOutside(tokenDropdownRef, () => setShowTokenDropdown(false));
236
- const targetSymbol = _chunkTENL4H64cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
237
- const targetChainName = _chunkTENL4H64cjs.getChainName.call(void 0, targetChain);
236
+ const targetSymbol = _chunk4R2ZHSDQcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
237
+ const targetChainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChain);
238
238
  const isBusy = submitting || isSubmitting;
239
239
  const seededRecipientRef = _react.useRef.call(void 0, _nullishCoalesce(defaultRecipient, () => ( "")));
240
240
  _react.useEffect.call(void 0, () => {
@@ -258,7 +258,7 @@ function WithdrawFormStep({
258
258
  return;
259
259
  }
260
260
  try {
261
- const bal = _chunkNPSC5R22cjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
261
+ const bal = _chunkLBJFACLHcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
262
262
  address: asset.token,
263
263
  abi: _viem.erc20Abi,
264
264
  functionName: "balanceOf",
@@ -363,7 +363,7 @@ function WithdrawFormStep({
363
363
  await onSubmit(recipient, amount);
364
364
  } catch (err) {
365
365
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
366
- setError(_chunkNPSC5R22cjs.formatUserError.call(void 0, raw));
366
+ setError(_chunkLBJFACLHcjs.formatUserError.call(void 0, raw));
367
367
  } finally {
368
368
  setIsSubmitting(false);
369
369
  }
@@ -379,16 +379,16 @@ function WithdrawFormStep({
379
379
  if (isBalanceLoading) {
380
380
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
381
381
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
382
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.Spinner, { className: "rs-spinner--lg" }),
382
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, { className: "rs-spinner--lg" }),
383
383
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
384
384
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: "Please wait before withdrawing." })
385
385
  ] }),
386
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.PoweredBy, {})
386
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
387
387
  ] });
388
388
  }
389
389
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
390
390
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
391
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
391
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
392
392
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
393
393
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
394
394
  "label",
@@ -448,7 +448,7 @@ function WithdrawFormStep({
448
448
  ) })
449
449
  ] }),
450
450
  /* @__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 ? `~${_chunkNPSC5R22cjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
451
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkLBJFACLHcjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
452
452
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
453
453
  "Balance: ",
454
454
  formattedBalance,
@@ -479,9 +479,9 @@ function WithdrawFormStep({
479
479
  children: [
480
480
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
481
481
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
482
- _chunkNPSC5R22cjs.CdnIcon,
482
+ _chunkLBJFACLHcjs.CdnIcon,
483
483
  {
484
- src: _chunkTENL4H64cjs.getChainIcon.call(void 0, targetChain),
484
+ src: _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, targetChain),
485
485
  alt: targetChainName,
486
486
  className: "rs-withdraw-dropdown-icon"
487
487
  }
@@ -489,7 +489,7 @@ function WithdrawFormStep({
489
489
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
490
490
  ] }),
491
491
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
492
- _chunkNPSC5R22cjs.ChevronDownIcon,
492
+ _chunkLBJFACLHcjs.ChevronDownIcon,
493
493
  {
494
494
  className: "rs-withdraw-dropdown-arrow",
495
495
  style: {
@@ -511,9 +511,9 @@ function WithdrawFormStep({
511
511
  },
512
512
  children: [
513
513
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
514
- _chunkNPSC5R22cjs.CdnIcon,
514
+ _chunkLBJFACLHcjs.CdnIcon,
515
515
  {
516
- src: _chunkTENL4H64cjs.getChainIcon.call(void 0, chain.id),
516
+ src: _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, chain.id),
517
517
  alt: chain.name,
518
518
  className: "rs-withdraw-dropdown-icon"
519
519
  }
@@ -548,7 +548,7 @@ function WithdrawFormStep({
548
548
  children: [
549
549
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
550
550
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
551
- _chunkNPSC5R22cjs.TokenIcon,
551
+ _chunkLBJFACLHcjs.TokenIcon,
552
552
  {
553
553
  symbol: targetSymbol,
554
554
  className: "rs-withdraw-dropdown-icon"
@@ -557,7 +557,7 @@ function WithdrawFormStep({
557
557
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
558
558
  ] }),
559
559
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
560
- _chunkNPSC5R22cjs.ChevronDownIcon,
560
+ _chunkLBJFACLHcjs.ChevronDownIcon,
561
561
  {
562
562
  className: "rs-withdraw-dropdown-arrow",
563
563
  style: {
@@ -579,7 +579,7 @@ function WithdrawFormStep({
579
579
  },
580
580
  children: [
581
581
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
582
- _chunkNPSC5R22cjs.TokenIcon,
582
+ _chunkLBJFACLHcjs.TokenIcon,
583
583
  {
584
584
  symbol: option.symbol,
585
585
  className: "rs-withdraw-dropdown-icon"
@@ -595,10 +595,10 @@ function WithdrawFormStep({
595
595
  )
596
596
  ] })
597
597
  ] }),
598
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.Callout, { variant: "error", children: error }),
599
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.Callout, { variant: "error", children: registrationError }),
598
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
599
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: registrationError }),
600
600
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
601
- _chunkNPSC5R22cjs.Button,
601
+ _chunkLBJFACLHcjs.Button,
602
602
  {
603
603
  onClick: handleWithdraw,
604
604
  fullWidth: true,
@@ -613,7 +613,7 @@ function WithdrawFormStep({
613
613
  }
614
614
  )
615
615
  ] }),
616
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.PoweredBy, {})
616
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
617
617
  ] });
618
618
  }
619
619
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -641,22 +641,22 @@ function WithdrawReviewStep({
641
641
  }) {
642
642
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
643
643
  const [error, setError] = _react.useState.call(void 0, null);
644
- const sourceChainName = _chunkTENL4H64cjs.getChainName.call(void 0, sourceChain);
645
- const sourceChainIcon = _chunkTENL4H64cjs.getChainIcon.call(void 0, sourceChain);
646
- const targetSymbol = _chunkTENL4H64cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
647
- const targetChainName = _chunkTENL4H64cjs.getChainName.call(void 0, targetChain);
648
- const targetChainIcon = _chunkTENL4H64cjs.getChainIcon.call(void 0, targetChain);
644
+ const sourceChainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, sourceChain);
645
+ const sourceChainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, sourceChain);
646
+ const targetSymbol = _chunk4R2ZHSDQcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
647
+ const targetChainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChain);
648
+ const targetChainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, targetChain);
649
649
  const amountNumber = Number(amount);
650
- const formattedSendAmount = _nullishCoalesce(_chunkNPSC5R22cjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
651
- const prices = _chunkHCQWFL3Acjs.useTokenPrices.call(void 0, service, [
650
+ const formattedSendAmount = _nullishCoalesce(_chunkLBJFACLHcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
651
+ const prices = _chunk6ZJTZ7DScjs.useTokenPrices.call(void 0, service, [
652
652
  { chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
653
653
  { chainId: targetChain, address: targetToken, symbol: targetSymbol }
654
654
  ]);
655
- const receiveDisplay = _nullishCoalesce(_chunkNPSC5R22cjs.formatReceiveEstimate.call(void 0, {
655
+ const receiveDisplay = _nullishCoalesce(_chunkLBJFACLHcjs.formatReceiveEstimate.call(void 0, {
656
656
  sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
657
657
  sourceSymbol,
658
658
  targetSymbol,
659
- sourceTrusted: _chunkNPSC5R22cjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
659
+ sourceTrusted: _chunkLBJFACLHcjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
660
660
  prices
661
661
  }), () => ( // No price for the target token — an honest dash beats a wrong number.
662
662
  "\u2014"));
@@ -667,9 +667,9 @@ function WithdrawReviewStep({
667
667
  await onConfirm();
668
668
  } catch (err) {
669
669
  const raw = err instanceof Error ? err.message : "Withdraw failed";
670
- const message = _chunkNPSC5R22cjs.formatUserError.call(void 0, raw);
670
+ const message = _chunkLBJFACLHcjs.formatUserError.call(void 0, raw);
671
671
  setError(message);
672
- _optionalChain([onError, 'optionalCall', _7 => _7(message, "WITHDRAW_REVIEW_ERROR")]);
672
+ _optionalChain([onError, 'optionalCall', _7 => _7(message, "WITHDRAW_REVIEW_ERROR", raw)]);
673
673
  } finally {
674
674
  setIsSubmitting(false);
675
675
  }
@@ -678,9 +678,9 @@ function WithdrawReviewStep({
678
678
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
679
679
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
680
680
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
681
- _chunkNPSC5R22cjs.BodyHeader,
681
+ _chunkLBJFACLHcjs.BodyHeader,
682
682
  {
683
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.CircleArrowOutUpLeftIcon, {}),
683
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CircleArrowOutUpLeftIcon, {}),
684
684
  title: "Review withdrawal"
685
685
  }
686
686
  ),
@@ -693,14 +693,14 @@ function WithdrawReviewStep({
693
693
  " ",
694
694
  sourceSymbol
695
695
  ] }),
696
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.TokenIcon, { symbol: sourceSymbol }) })
696
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: sourceSymbol }) })
697
697
  ] })
698
698
  ] }),
699
699
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
700
700
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
701
701
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
702
702
  /* @__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, _chunkNPSC5R22cjs.CdnIcon, { src: sourceChainIcon }) })
703
+ sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: sourceChainIcon }) })
704
704
  ] })
705
705
  ] }),
706
706
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -711,14 +711,14 @@ function WithdrawReviewStep({
711
711
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
712
712
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
713
713
  /* @__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, _chunkNPSC5R22cjs.TokenIcon, { symbol: targetSymbol }) })
714
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: targetSymbol }) })
715
715
  ] })
716
716
  ] }),
717
717
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
718
718
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
719
719
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
720
720
  /* @__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, _chunkNPSC5R22cjs.CdnIcon, { src: targetChainIcon }) })
721
+ targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: targetChainIcon }) })
722
722
  ] })
723
723
  ] }),
724
724
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -726,10 +726,10 @@ function WithdrawReviewStep({
726
726
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
727
727
  ] })
728
728
  ] }),
729
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.Callout, { variant: "error", children: error }),
730
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.Callout, { variant: "error", children: registrationError }),
729
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
730
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: registrationError }),
731
731
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
732
- _chunkNPSC5R22cjs.Button,
732
+ _chunkLBJFACLHcjs.Button,
733
733
  {
734
734
  onClick: handleConfirm,
735
735
  loading: isSubmitting,
@@ -740,7 +740,7 @@ function WithdrawReviewStep({
740
740
  }
741
741
  )
742
742
  ] }),
743
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.PoweredBy, {})
743
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
744
744
  ] });
745
745
  }
746
746
  WithdrawReviewStep.displayName = "WithdrawReviewStep";
@@ -773,11 +773,11 @@ function WithdrawFlow({
773
773
  onError,
774
774
  debug
775
775
  }) {
776
- const rpcUrls = _chunkNPSC5R22cjs.useRpcUrls.call(void 0, );
777
- const onStepChangeRef = _chunkNPSC5R22cjs.useLatestRef.call(void 0, onStepChange);
778
- const onEventRef = _chunkNPSC5R22cjs.useLatestRef.call(void 0, onEvent);
779
- const onLifecycleRef = _chunkNPSC5R22cjs.useLatestRef.call(void 0, onLifecycle);
780
- const onErrorRef = _chunkNPSC5R22cjs.useLatestRef.call(void 0, onError);
776
+ const rpcUrls = _chunkLBJFACLHcjs.useRpcUrls.call(void 0, );
777
+ const onStepChangeRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onStepChange);
778
+ const onEventRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onEvent);
779
+ const onLifecycleRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onLifecycle);
780
+ const onErrorRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onError);
781
781
  const isFlowActiveRef = _react.useRef.call(void 0, true);
782
782
  const submitGenerationRef = _react.useRef.call(void 0, 0);
783
783
  _react.useEffect.call(void 0, () => {
@@ -788,13 +788,13 @@ function WithdrawFlow({
788
788
  }, []);
789
789
  const logFlow = _react.useCallback.call(void 0,
790
790
  (message, data) => {
791
- _chunkNPSC5R22cjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
791
+ _chunkLBJFACLHcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
792
792
  },
793
793
  [debug]
794
794
  );
795
795
  const logFlowError = _react.useCallback.call(void 0,
796
796
  (message, error, data) => {
797
- _chunkNPSC5R22cjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
797
+ _chunkLBJFACLHcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
798
798
  },
799
799
  [debug]
800
800
  );
@@ -818,7 +818,7 @@ function WithdrawFlow({
818
818
  const flowStep = useWithdrawStore((s) => s.step);
819
819
  const reviewedRecipient = useWithdrawStore((s) => s.recipient);
820
820
  const publicClient = _react.useMemo.call(void 0,
821
- () => _chunkNPSC5R22cjs.getPublicClient.call(void 0, sourceChain, rpcUrls),
821
+ () => _chunkLBJFACLHcjs.getPublicClient.call(void 0, sourceChain, rpcUrls),
822
822
  [sourceChain, rpcUrls]
823
823
  );
824
824
  const recipientForRegistration = _react.useMemo.call(void 0, () => {
@@ -846,7 +846,7 @@ function WithdrawFlow({
846
846
  targetToken,
847
847
  recipient: recipientForRegistration
848
848
  });
849
- const salt = _chunkHCQWFL3Acjs.deriveAccountSalt.call(void 0, {
849
+ const salt = _chunk6ZJTZ7DScjs.deriveAccountSalt.call(void 0, {
850
850
  recipient: recipientForRegistration,
851
851
  targetChain,
852
852
  targetToken
@@ -854,7 +854,7 @@ function WithdrawFlow({
854
854
  const { evmDepositAddress } = await service.registerManagedAccount({
855
855
  salt,
856
856
  target: {
857
- chain: _chunkTENL4H64cjs.targetChainToCaip2.call(void 0, targetChain),
857
+ chain: _chunk4R2ZHSDQcjs.targetChainToCaip2.call(void 0, targetChain),
858
858
  token: targetToken,
859
859
  recipient: recipientForRegistration
860
860
  }
@@ -876,7 +876,7 @@ function WithdrawFlow({
876
876
  } catch (err) {
877
877
  if (cancelled) return;
878
878
  const raw = err instanceof Error ? err.message : "Registration failed";
879
- const message = _chunkNPSC5R22cjs.formatUserError.call(void 0, raw);
879
+ const message = _chunkLBJFACLHcjs.formatUserError.call(void 0, raw);
880
880
  logFlowError("auto-register:failed", err, {
881
881
  accountAddress,
882
882
  targetChain,
@@ -907,10 +907,10 @@ function WithdrawFlow({
907
907
  onErrorRef
908
908
  ]);
909
909
  const asset = _react.useMemo.call(void 0, () => {
910
- const symbol = _chunkTENL4H64cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
911
- const decimals = _chunkTENL4H64cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
910
+ const symbol = _chunk4R2ZHSDQcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
911
+ const decimals = _chunk4R2ZHSDQcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
912
912
  return {
913
- id: _chunkNPSC5R22cjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
913
+ id: _chunkLBJFACLHcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
914
914
  chainId: sourceChain,
915
915
  token: sourceToken,
916
916
  symbol,
@@ -918,7 +918,7 @@ function WithdrawFlow({
918
918
  decimals
919
919
  };
920
920
  }, [sourceChain, sourceToken]);
921
- const isSourceNative = sourceToken.toLowerCase() === _chunkTENL4H64cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
921
+ const isSourceNative = sourceToken.toLowerCase() === _chunk4R2ZHSDQcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
922
922
  const isSameRoute = targetChain === sourceChain && targetToken.toLowerCase() === sourceToken.toLowerCase();
923
923
  const reviewedTarget = reviewedRecipient ? {
924
924
  chain: targetChain,
@@ -943,8 +943,8 @@ function WithdrawFlow({
943
943
  }
944
944
  if (lastStepOpenEventKeyRef.current === "form") return;
945
945
  lastStepOpenEventKeyRef.current = "form";
946
- const tokenSymbol = _chunkTENL4H64cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
947
- const chainName = _chunkTENL4H64cjs.getChainName.call(void 0, targetChain);
946
+ const tokenSymbol = _chunk4R2ZHSDQcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
947
+ const chainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChain);
948
948
  _optionalChain([onEventRef, 'access', _20 => _20.current, 'optionalCall', _21 => _21({
949
949
  type: "withdraw_modal_select_amount_open",
950
950
  pred_balance: totalBalanceUsd,
@@ -971,16 +971,16 @@ function WithdrawFlow({
971
971
  registration.kind
972
972
  ]);
973
973
  const handleError = _react.useCallback.call(void 0,
974
- (message, code) => {
975
- logFlowError("flow:error", message, { code });
976
- _optionalChain([onErrorRef, 'access', _22 => _22.current, 'optionalCall', _23 => _23({ message, code })]);
974
+ (message, code, cause) => {
975
+ logFlowError("flow:error", _nullishCoalesce(cause, () => ( message)), { code });
976
+ _optionalChain([onErrorRef, 'access', _22 => _22.current, 'optionalCall', _23 => _23({ message, code, cause })]);
977
977
  },
978
978
  [logFlowError, onErrorRef]
979
979
  );
980
980
  const handleFormContinue = _react.useCallback.call(void 0,
981
981
  (recipient, amountValue) => {
982
- const tokenSymbol = _chunkTENL4H64cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
983
- const chainName = _chunkTENL4H64cjs.getChainName.call(void 0, targetChain);
982
+ const tokenSymbol = _chunk4R2ZHSDQcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
983
+ const chainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChain);
984
984
  _optionalChain([onEventRef, 'access', _24 => _24.current, 'optionalCall', _25 => _25({
985
985
  type: "withdraw_modal_select_amount_cta_click",
986
986
  pred_balance: totalBalanceUsd,
@@ -1090,7 +1090,7 @@ function WithdrawFlow({
1090
1090
  targetChain,
1091
1091
  targetToken
1092
1092
  });
1093
- handleError(_chunkNPSC5R22cjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1093
+ handleError(_chunkLBJFACLHcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1094
1094
  throw err;
1095
1095
  }
1096
1096
  },
@@ -1143,8 +1143,8 @@ function WithdrawFlow({
1143
1143
  },
1144
1144
  [logFlowError, onLifecycleRef, storeApi]
1145
1145
  );
1146
- const targetChainOptions = _chunkNPSC5R22cjs.useDestinationChains.call(void 0, );
1147
- const targetTokensFor = _chunkNPSC5R22cjs.useTargetTokens.call(void 0, );
1146
+ const targetChainOptions = _chunkLBJFACLHcjs.useDestinationChains.call(void 0, );
1147
+ const targetTokensFor = _chunkLBJFACLHcjs.useTargetTokens.call(void 0, );
1148
1148
  const targetTokenOptions = _react.useMemo.call(void 0,
1149
1149
  () => targetTokensFor(targetChain),
1150
1150
  [targetChain, targetTokensFor]
@@ -1216,7 +1216,7 @@ function WithdrawFlow({
1216
1216
  }
1217
1217
  ),
1218
1218
  stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1219
- _chunkHCQWFL3Acjs.ProcessingStep,
1219
+ _chunk6ZJTZ7DScjs.ProcessingStep,
1220
1220
  {
1221
1221
  smartAccount: _nullishCoalesce(storeApi.getState().processingSmartAccount, () => ( (registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0"))),
1222
1222
  txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
@@ -1286,22 +1286,22 @@ function WithdrawModal({
1286
1286
  // one only ever applied to the deposit flow.
1287
1287
  ...removedProps
1288
1288
  }) {
1289
- _chunkHCQWFL3Acjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
1290
- _chunkNPSC5R22cjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
1289
+ _chunk6ZJTZ7DScjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
1290
+ _chunkLBJFACLHcjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
1291
1291
  const modalRef = _react.useRef.call(void 0, null);
1292
- const onReadyRef = _chunkNPSC5R22cjs.useLatestRef.call(void 0, onReady);
1292
+ const onReadyRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onReady);
1293
1293
  const [backHandler, setBackHandler] = _react.useState.call(void 0,
1294
1294
  void 0
1295
1295
  );
1296
- const targetChain = _chunkTENL4H64cjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
1297
- const sourceChain = _chunkTENL4H64cjs.getChainId.call(void 0, sourceChainProp);
1298
- const rpcUrls = _chunkNPSC5R22cjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
1296
+ const targetChain = _chunk4R2ZHSDQcjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
1297
+ const sourceChain = _chunk4R2ZHSDQcjs.getChainId.call(void 0, sourceChainProp);
1298
+ const rpcUrls = _chunkLBJFACLHcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
1299
1299
  const service = _react.useMemo.call(void 0,
1300
- () => _chunkNPSC5R22cjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1300
+ () => _chunkLBJFACLHcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1301
1301
  [backendUrl, debug]
1302
1302
  );
1303
1303
  const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
1304
- const onErrorRef = _chunkNPSC5R22cjs.useLatestRef.call(void 0, onError);
1304
+ const onErrorRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onError);
1305
1305
  _react.useEffect.call(void 0, () => {
1306
1306
  if (isOpen && typeof onSendTransaction !== "function") {
1307
1307
  _optionalChain([onErrorRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34({
@@ -1312,7 +1312,7 @@ function WithdrawModal({
1312
1312
  }, [isOpen, onSendTransaction, onErrorRef]);
1313
1313
  _react.useEffect.call(void 0, () => {
1314
1314
  if (isOpen && modalRef.current) {
1315
- _chunkNPSC5R22cjs.applyTheme.call(void 0, modalRef.current, theme);
1315
+ _chunkLBJFACLHcjs.applyTheme.call(void 0, modalRef.current, theme);
1316
1316
  }
1317
1317
  }, [isOpen, theme]);
1318
1318
  _react.useEffect.call(void 0, () => {
@@ -1330,8 +1330,8 @@ function WithdrawModal({
1330
1330
  }, []);
1331
1331
  const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _37 => _37.showBackButton]), () => ( true));
1332
1332
  const canGoBack = backHandler !== void 0;
1333
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1334
- _chunkNPSC5R22cjs.Modal,
1333
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1334
+ _chunkLBJFACLHcjs.Modal,
1335
1335
  {
1336
1336
  isOpen,
1337
1337
  onClose,
@@ -1347,7 +1347,7 @@ function WithdrawModal({
1347
1347
  className: "rs-modal-header-back",
1348
1348
  "aria-label": "Go back",
1349
1349
  onClick: backHandler,
1350
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.ChevronLeftIcon, {})
1350
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronLeftIcon, {})
1351
1351
  }
1352
1352
  ) }),
1353
1353
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1357,7 +1357,7 @@ function WithdrawModal({
1357
1357
  onClick: onClose,
1358
1358
  className: "rs-modal-close",
1359
1359
  "aria-label": "Close",
1360
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.CloseIcon, {})
1360
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CloseIcon, {})
1361
1361
  }
1362
1362
  ) })
1363
1363
  ] }),
@@ -3,7 +3,7 @@ import {
3
3
  deriveAccountSalt,
4
4
  useTokenPrices,
5
5
  warnRemovedProps
6
- } from "./chunk-WLDTBKRA.mjs";
6
+ } from "./chunk-QF5T6HXC.mjs";
7
7
  import {
8
8
  BodyHeader,
9
9
  Button,
@@ -37,7 +37,7 @@ import {
37
37
  useRpcUrls,
38
38
  useStableRpcUrls,
39
39
  useTargetTokens
40
- } from "./chunk-ITAYM7SB.mjs";
40
+ } from "./chunk-5IP67CL5.mjs";
41
41
  import {
42
42
  NATIVE_TOKEN_ADDRESS,
43
43
  getChainIcon,
@@ -46,7 +46,7 @@ import {
46
46
  getTokenDecimalsByAddress,
47
47
  getTokenSymbol,
48
48
  targetChainToCaip2
49
- } from "./chunk-53IFZGSF.mjs";
49
+ } from "./chunk-YR43AAX5.mjs";
50
50
 
51
51
  // src/WithdrawModal.tsx
52
52
  import { useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo3, useRef as useRef3, useState as useState4 } from "react";
@@ -669,7 +669,7 @@ function WithdrawReviewStep({
669
669
  const raw = err instanceof Error ? err.message : "Withdraw failed";
670
670
  const message = formatUserError(raw);
671
671
  setError(message);
672
- onError?.(message, "WITHDRAW_REVIEW_ERROR");
672
+ onError?.(message, "WITHDRAW_REVIEW_ERROR", raw);
673
673
  } finally {
674
674
  setIsSubmitting(false);
675
675
  }
@@ -971,9 +971,9 @@ function WithdrawFlow({
971
971
  registration.kind
972
972
  ]);
973
973
  const handleError = useCallback2(
974
- (message, code) => {
975
- logFlowError("flow:error", message, { code });
976
- onErrorRef.current?.({ message, code });
974
+ (message, code, cause) => {
975
+ logFlowError("flow:error", cause ?? message, { code });
976
+ onErrorRef.current?.({ message, code, cause });
977
977
  },
978
978
  [logFlowError, onErrorRef]
979
979
  );
@@ -1,5 +1,5 @@
1
1
  // src/core/version.ts
2
- var MODAL_VERSION = "0.11.0";
2
+ var MODAL_VERSION = "0.12.0";
3
3
  var SERVICE_HEADERS = {
4
4
  "Content-Type": "application/json",
5
5
  "x-deposit-modal-version": MODAL_VERSION