@rhinestone/deposit-modal 0.16.0 → 0.17.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.
@@ -44,7 +44,7 @@
44
44
 
45
45
 
46
46
 
47
- var _chunkH4O22O7Ycjs = require('./chunk-H4O22O7Y.cjs');
47
+ var _chunkQGNJFDEOcjs = require('./chunk-QGNJFDEO.cjs');
48
48
 
49
49
 
50
50
 
@@ -238,7 +238,7 @@ function WithdrawFormStep({
238
238
  const chainDropdownRef = _react.useRef.call(void 0, null);
239
239
  const tokenDropdownRef = _react.useRef.call(void 0, null);
240
240
  const publicClientChainId = _optionalChain([publicClient, 'access', _ => _.chain, 'optionalAccess', _2 => _2.id]);
241
- const onFrictionRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onFriction);
241
+ const onFrictionRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onFriction);
242
242
  useClickOutside(chainDropdownRef, () => setShowChainDropdown(false));
243
243
  useClickOutside(tokenDropdownRef, () => setShowTokenDropdown(false));
244
244
  const targetSymbol = _chunkOY5N3E6Lcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
@@ -266,7 +266,7 @@ function WithdrawFormStep({
266
266
  return;
267
267
  }
268
268
  try {
269
- const bal = _chunkH4O22O7Ycjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
269
+ const bal = _chunkQGNJFDEOcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: accountAddress }) : await publicClient.readContract({
270
270
  address: asset.token,
271
271
  abi: _viem.erc20Abi,
272
272
  functionName: "balanceOf",
@@ -368,7 +368,7 @@ function WithdrawFormStep({
368
368
  await onSubmit(recipient, amount);
369
369
  } catch (err) {
370
370
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
371
- setError(_chunkH4O22O7Ycjs.formatUserError.call(void 0, raw));
371
+ setError(_chunkQGNJFDEOcjs.formatUserError.call(void 0, raw));
372
372
  } finally {
373
373
  setIsSubmitting(false);
374
374
  }
@@ -385,16 +385,16 @@ function WithdrawFormStep({
385
385
  if (isBalanceLoading) {
386
386
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
387
387
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
388
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, { className: "rs-spinner--lg" }),
388
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.Spinner, { className: "rs-spinner--lg" }),
389
389
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
390
390
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: "Please wait before withdrawing." })
391
391
  ] }),
392
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
392
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.PoweredBy, {})
393
393
  ] });
394
394
  }
395
395
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
396
396
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
397
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
397
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
398
398
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
399
399
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
400
400
  "label",
@@ -454,7 +454,7 @@ function WithdrawFormStep({
454
454
  ) })
455
455
  ] }),
456
456
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkH4O22O7Ycjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? `~${_chunkQGNJFDEOcjs.currencyFormatter.format(amountUsd)}` : "$0.00" }),
458
458
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
459
459
  "Balance: ",
460
460
  formattedBalance,
@@ -485,7 +485,7 @@ function WithdrawFormStep({
485
485
  children: [
486
486
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
487
487
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
488
- _chunkH4O22O7Ycjs.CdnIcon,
488
+ _chunkQGNJFDEOcjs.CdnIcon,
489
489
  {
490
490
  src: _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, targetChain),
491
491
  alt: targetChainName,
@@ -495,7 +495,7 @@ function WithdrawFormStep({
495
495
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
496
496
  ] }),
497
497
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
498
- _chunkH4O22O7Ycjs.ChevronDownIcon,
498
+ _chunkQGNJFDEOcjs.ChevronDownIcon,
499
499
  {
500
500
  className: "rs-withdraw-dropdown-arrow",
501
501
  style: {
@@ -517,7 +517,7 @@ function WithdrawFormStep({
517
517
  },
518
518
  children: [
519
519
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
520
- _chunkH4O22O7Ycjs.CdnIcon,
520
+ _chunkQGNJFDEOcjs.CdnIcon,
521
521
  {
522
522
  src: _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, chain.id),
523
523
  alt: chain.name,
@@ -554,7 +554,7 @@ function WithdrawFormStep({
554
554
  children: [
555
555
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
556
556
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
557
- _chunkH4O22O7Ycjs.TokenIcon,
557
+ _chunkQGNJFDEOcjs.TokenIcon,
558
558
  {
559
559
  symbol: targetSymbol,
560
560
  className: "rs-withdraw-dropdown-icon"
@@ -563,7 +563,7 @@ function WithdrawFormStep({
563
563
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
564
564
  ] }),
565
565
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
566
- _chunkH4O22O7Ycjs.ChevronDownIcon,
566
+ _chunkQGNJFDEOcjs.ChevronDownIcon,
567
567
  {
568
568
  className: "rs-withdraw-dropdown-arrow",
569
569
  style: {
@@ -585,7 +585,7 @@ function WithdrawFormStep({
585
585
  },
586
586
  children: [
587
587
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
588
- _chunkH4O22O7Ycjs.TokenIcon,
588
+ _chunkQGNJFDEOcjs.TokenIcon,
589
589
  {
590
590
  symbol: option.symbol,
591
591
  className: "rs-withdraw-dropdown-icon"
@@ -601,10 +601,10 @@ function WithdrawFormStep({
601
601
  )
602
602
  ] })
603
603
  ] }),
604
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
605
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: registrationError }),
604
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.Callout, { variant: "error", children: error }),
605
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.Callout, { variant: "error", children: registrationError }),
606
606
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
607
- _chunkH4O22O7Ycjs.Button,
607
+ _chunkQGNJFDEOcjs.Button,
608
608
  {
609
609
  onClick: handleWithdraw,
610
610
  fullWidth: true,
@@ -619,7 +619,7 @@ function WithdrawFormStep({
619
619
  }
620
620
  )
621
621
  ] }),
622
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
622
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.PoweredBy, {})
623
623
  ] });
624
624
  }
625
625
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -660,16 +660,16 @@ function WithdrawReviewStep({
660
660
  const targetChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, targetChain);
661
661
  const targetChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, targetChain);
662
662
  const amountNumber = Number(amount);
663
- const formattedSendAmount = _nullishCoalesce(_chunkH4O22O7Ycjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
664
- const prices = _chunkH4O22O7Ycjs.useTokenPrices.call(void 0, service, [
663
+ const formattedSendAmount = _nullishCoalesce(_chunkQGNJFDEOcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
664
+ const prices = _chunkQGNJFDEOcjs.useTokenPrices.call(void 0, service, [
665
665
  { chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
666
666
  { chainId: targetChain, address: targetToken, symbol: targetSymbol }
667
667
  ]);
668
- const receiveDisplay = _nullishCoalesce(_chunkH4O22O7Ycjs.formatReceiveEstimate.call(void 0, {
668
+ const receiveDisplay = _nullishCoalesce(_chunkQGNJFDEOcjs.formatReceiveEstimate.call(void 0, {
669
669
  sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
670
670
  sourceSymbol,
671
671
  targetSymbol,
672
- sourceTrusted: _chunkH4O22O7Ycjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
672
+ sourceTrusted: _chunkQGNJFDEOcjs.isRecognizedToken.call(void 0, sourceToken, sourceChain),
673
673
  prices
674
674
  }), () => ( // No price for the target token — an honest dash beats a wrong number.
675
675
  "\u2014"));
@@ -681,8 +681,8 @@ function WithdrawReviewStep({
681
681
  await onConfirm();
682
682
  } catch (err) {
683
683
  const raw = err instanceof Error ? err.message : "Withdraw failed";
684
- const uncertain = _chunkH4O22O7Ycjs.isSubmissionUncertain.call(void 0, err);
685
- const message = uncertain ? "Withdrawal status is uncertain. Check your activity before trying again." : _chunkH4O22O7Ycjs.formatUserError.call(void 0, raw);
684
+ const uncertain = _chunkQGNJFDEOcjs.isSubmissionUncertain.call(void 0, err);
685
+ const message = uncertain ? "Withdrawal status is uncertain. Check your activity before trying again." : _chunkQGNJFDEOcjs.formatUserError.call(void 0, raw);
686
686
  if (uncertain) setSubmissionUncertain(true);
687
687
  setError(message);
688
688
  _optionalChain([onError, 'optionalCall', _19 => _19(message, "WITHDRAW_REVIEW_ERROR", raw)]);
@@ -694,9 +694,9 @@ function WithdrawReviewStep({
694
694
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
695
695
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
696
696
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
697
- _chunkH4O22O7Ycjs.BodyHeader,
697
+ _chunkQGNJFDEOcjs.BodyHeader,
698
698
  {
699
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CircleArrowOutUpLeftIcon, {}),
699
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.CircleArrowOutUpLeftIcon, {}),
700
700
  title: "Review withdrawal"
701
701
  }
702
702
  ),
@@ -709,14 +709,14 @@ function WithdrawReviewStep({
709
709
  " ",
710
710
  sourceSymbol
711
711
  ] }),
712
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: sourceSymbol }) })
712
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.TokenIcon, { symbol: sourceSymbol }) })
713
713
  ] })
714
714
  ] }),
715
715
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
716
716
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
717
717
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
718
718
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
719
- sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: sourceChainIcon }) })
719
+ sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.CdnIcon, { src: sourceChainIcon }) })
720
720
  ] })
721
721
  ] }),
722
722
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -727,14 +727,14 @@ function WithdrawReviewStep({
727
727
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
728
728
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
729
729
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
730
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: targetSymbol }) })
730
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.TokenIcon, { symbol: targetSymbol }) })
731
731
  ] })
732
732
  ] }),
733
733
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
734
734
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
735
735
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
736
736
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
737
- targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: targetChainIcon }) })
737
+ targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.CdnIcon, { src: targetChainIcon }) })
738
738
  ] })
739
739
  ] }),
740
740
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
@@ -742,10 +742,10 @@ function WithdrawReviewStep({
742
742
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
743
743
  ] })
744
744
  ] }),
745
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
746
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: registrationError }),
745
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.Callout, { variant: "error", children: error }),
746
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.Callout, { variant: "error", children: registrationError }),
747
747
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
748
- _chunkH4O22O7Ycjs.Button,
748
+ _chunkQGNJFDEOcjs.Button,
749
749
  {
750
750
  onClick: handleConfirm,
751
751
  loading: isSubmitting,
@@ -756,7 +756,7 @@ function WithdrawReviewStep({
756
756
  }
757
757
  )
758
758
  ] }),
759
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
759
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.PoweredBy, {})
760
760
  ] });
761
761
  }
762
762
  WithdrawReviewStep.displayName = "WithdrawReviewStep";
@@ -772,7 +772,7 @@ WithdrawReviewStep.displayName = "WithdrawReviewStep";
772
772
 
773
773
 
774
774
  function withdrawFailureReasonForError(error) {
775
- if (_chunkH4O22O7Ycjs.isSubmissionUncertain.call(void 0, error)) return "submission_uncertain";
775
+ if (_chunkQGNJFDEOcjs.isSubmissionUncertain.call(void 0, error)) return "submission_uncertain";
776
776
  const message = (error instanceof Error ? error.message : String(_nullishCoalesce(error, () => ( "")))).toLowerCase();
777
777
  if (message.includes("changed before submission")) {
778
778
  return "registration_target_changed";
@@ -931,7 +931,7 @@ function WithdrawAnalyticsControllerProvider({
931
931
  children,
932
932
  controllerRef
933
933
  }) {
934
- const emit = _chunkH4O22O7Ycjs.useWithdrawAnalyticsEmitter.call(void 0, );
934
+ const emit = _chunkQGNJFDEOcjs.useWithdrawAnalyticsEmitter.call(void 0, );
935
935
  const controller = _react.useMemo.call(void 0,
936
936
  () => createWithdrawAnalyticsController(emit),
937
937
  [emit]
@@ -971,11 +971,11 @@ function WithdrawFlow({
971
971
  onError,
972
972
  debug
973
973
  }) {
974
- const rpcUrls = _chunkH4O22O7Ycjs.useRpcUrls.call(void 0, );
975
- const onStepChangeRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onStepChange);
974
+ const rpcUrls = _chunkQGNJFDEOcjs.useRpcUrls.call(void 0, );
975
+ const onStepChangeRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onStepChange);
976
976
  const analytics = useWithdrawAnalyticsController();
977
- const onLifecycleRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onLifecycle);
978
- const onErrorRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onError);
977
+ const onLifecycleRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onLifecycle);
978
+ const onErrorRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onError);
979
979
  const isFlowActiveRef = _react.useRef.call(void 0, true);
980
980
  const submitGenerationRef = _react.useRef.call(void 0, 0);
981
981
  const lastSubmitFailureRef = _react.useRef.call(void 0,
@@ -989,13 +989,13 @@ function WithdrawFlow({
989
989
  }, []);
990
990
  const logFlow = _react.useCallback.call(void 0,
991
991
  (message, data) => {
992
- _chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
992
+ _chunkQGNJFDEOcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
993
993
  },
994
994
  [debug]
995
995
  );
996
996
  const logFlowError = _react.useCallback.call(void 0,
997
997
  (message, error, data) => {
998
- _chunkH4O22O7Ycjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
998
+ _chunkQGNJFDEOcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
999
999
  },
1000
1000
  [debug]
1001
1001
  );
@@ -1017,12 +1017,12 @@ function WithdrawFlow({
1017
1017
  const registration = useWithdrawStore((s) => s.registration);
1018
1018
  const flowStep = useWithdrawStore((s) => s.step);
1019
1019
  const reviewedRecipient = useWithdrawStore((s) => s.recipient);
1020
- const publicClient = _chunkH4O22O7Ycjs.useReadClient.call(void 0, sourceChain, rpcUrls);
1020
+ const publicClient = _chunkQGNJFDEOcjs.useReadClient.call(void 0, sourceChain, rpcUrls);
1021
1021
  const recipientForRegistration = _react.useMemo.call(void 0, () => {
1022
1022
  if (!recipientInput) return void 0;
1023
1023
  return ADDR_REGEX.test(recipientInput) ? recipientInput : void 0;
1024
1024
  }, [recipientInput]);
1025
- const onDestinationChangeRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onDestinationChange);
1025
+ const onDestinationChangeRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onDestinationChange);
1026
1026
  const reportedDestinationRef = _react.useRef.call(void 0, void 0);
1027
1027
  _react.useEffect.call(void 0, () => {
1028
1028
  if (reportedDestinationRef.current === recipientForRegistration) return;
@@ -1058,7 +1058,7 @@ function WithdrawFlow({
1058
1058
  targetToken,
1059
1059
  recipient: recipientForRegistration
1060
1060
  });
1061
- const salt = _chunkH4O22O7Ycjs.deriveAccountSalt.call(void 0, {
1061
+ const salt = _chunkQGNJFDEOcjs.deriveAccountSalt.call(void 0, {
1062
1062
  recipient: recipientForRegistration,
1063
1063
  targetChain,
1064
1064
  targetToken
@@ -1088,7 +1088,7 @@ function WithdrawFlow({
1088
1088
  } catch (err) {
1089
1089
  if (cancelled) return;
1090
1090
  const raw = err instanceof Error ? err.message : "Registration failed";
1091
- const message = _chunkH4O22O7Ycjs.formatUserError.call(void 0, raw);
1091
+ const message = _chunkQGNJFDEOcjs.formatUserError.call(void 0, raw);
1092
1092
  logFlowError("auto-register:failed", err, {
1093
1093
  accountAddress,
1094
1094
  targetChain,
@@ -1122,7 +1122,7 @@ function WithdrawFlow({
1122
1122
  const symbol = _chunkOY5N3E6Lcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
1123
1123
  const decimals = _chunkOY5N3E6Lcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1124
1124
  return {
1125
- id: _chunkH4O22O7Ycjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1125
+ id: _chunkQGNJFDEOcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1126
1126
  chainId: sourceChain,
1127
1127
  token: sourceToken,
1128
1128
  symbol,
@@ -1320,7 +1320,7 @@ function WithdrawFlow({
1320
1320
  targetChain,
1321
1321
  targetToken
1322
1322
  });
1323
- handleError(_chunkH4O22O7Ycjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1323
+ handleError(_chunkQGNJFDEOcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1324
1324
  throw err;
1325
1325
  }
1326
1326
  },
@@ -1379,8 +1379,8 @@ function WithdrawFlow({
1379
1379
  },
1380
1380
  [analytics, logFlowError, onLifecycleRef, storeApi]
1381
1381
  );
1382
- const targetChainOptions = _chunkH4O22O7Ycjs.useDestinationChains.call(void 0, );
1383
- const targetTokensFor = _chunkH4O22O7Ycjs.useTargetTokens.call(void 0, );
1382
+ const targetChainOptions = _chunkQGNJFDEOcjs.useDestinationChains.call(void 0, );
1383
+ const targetTokensFor = _chunkQGNJFDEOcjs.useTargetTokens.call(void 0, );
1384
1384
  const targetTokenOptions = _react.useMemo.call(void 0,
1385
1385
  () => targetTokensFor(targetChain),
1386
1386
  [targetChain, targetTokensFor]
@@ -1459,7 +1459,7 @@ function WithdrawFlow({
1459
1459
  }
1460
1460
  ),
1461
1461
  stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1462
- _chunkH4O22O7Ycjs.ProcessingStep,
1462
+ _chunkQGNJFDEOcjs.ProcessingStep,
1463
1463
  {
1464
1464
  smartAccount: _nullishCoalesce(storeApi.getState().processingSmartAccount, () => ( (registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0"))),
1465
1465
  txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
@@ -1529,7 +1529,7 @@ function buildWithdrawAnalyticsSessionProperties({
1529
1529
  recipient: recipient !== void 0,
1530
1530
  amount: defaultAmount !== void 0
1531
1531
  },
1532
- ..._chunkH4O22O7Ycjs.analyticsTargetProperties.call(void 0, {
1532
+ ..._chunkQGNJFDEOcjs.analyticsTargetProperties.call(void 0, {
1533
1533
  targetChain: seedTargetChain,
1534
1534
  targetToken: seedTargetToken
1535
1535
  })
@@ -1570,10 +1570,10 @@ function WithdrawModal({
1570
1570
  onUiState,
1571
1571
  ...removedProps
1572
1572
  }) {
1573
- _chunkH4O22O7Ycjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
1574
- _chunkH4O22O7Ycjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
1573
+ _chunkQGNJFDEOcjs.warnRemovedProps.call(void 0, "WithdrawModal", removedProps);
1574
+ _chunkQGNJFDEOcjs.checkBackendUrl.call(void 0, "WithdrawModal", backendUrl);
1575
1575
  const modalRef = _react.useRef.call(void 0, null);
1576
- const onReadyRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onReady);
1576
+ const onReadyRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onReady);
1577
1577
  const analyticsControllerRef = _react.useRef.call(void 0,
1578
1578
  null
1579
1579
  );
@@ -1587,23 +1587,23 @@ function WithdrawModal({
1587
1587
  const [historyRecipient, setHistoryRecipient] = _react.useState.call(void 0,
1588
1588
  recipient
1589
1589
  );
1590
- const onUiStateRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onUiState);
1590
+ const onUiStateRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onUiState);
1591
1591
  const targetChain = _chunkOY5N3E6Lcjs.getChainId.call(void 0, _nullishCoalesce(targetChainProp, () => ( sourceChainProp)));
1592
1592
  const sourceChain = _chunkOY5N3E6Lcjs.getChainId.call(void 0, sourceChainProp);
1593
- const rpcUrls = _chunkH4O22O7Ycjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
1593
+ const rpcUrls = _chunkQGNJFDEOcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
1594
1594
  const service = _react.useMemo.call(void 0,
1595
- () => _chunkH4O22O7Ycjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1595
+ () => _chunkQGNJFDEOcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1596
1596
  [backendUrl, debug]
1597
1597
  );
1598
1598
  const historyAnalytics = _react.useMemo.call(void 0,
1599
- () => _chunkH4O22O7Ycjs.createHistoryAnalytics.call(void 0, {
1599
+ () => _chunkQGNJFDEOcjs.createHistoryAnalytics.call(void 0, {
1600
1600
  modal: "withdraw",
1601
1601
  controllerRef: analyticsControllerRef,
1602
1602
  sessionIdRef: analyticsSessionIdRef
1603
1603
  }),
1604
1604
  []
1605
1605
  );
1606
- const history = _chunkH4O22O7Ycjs.useHistoryPanel.call(void 0, {
1606
+ const history = _chunkQGNJFDEOcjs.useHistoryPanel.call(void 0, {
1607
1607
  isOpen,
1608
1608
  recipient: historyRecipient,
1609
1609
  service,
@@ -1611,13 +1611,13 @@ function WithdrawModal({
1611
1611
  analytics: historyAnalytics
1612
1612
  });
1613
1613
  const { markStale: markHistoryStale, recoverySubmitting } = history;
1614
- const historyButtonVisible = _chunkH4O22O7Ycjs.isHistoryEntryVisible.call(void 0, {
1614
+ const historyButtonVisible = _chunkQGNJFDEOcjs.isHistoryEntryVisible.call(void 0, {
1615
1615
  screen,
1616
1616
  submitting,
1617
1617
  settled: false
1618
1618
  });
1619
1619
  const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
1620
- const onErrorRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onError);
1620
+ const onErrorRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onError);
1621
1621
  _react.useEffect.call(void 0, () => {
1622
1622
  if (isOpen && typeof onSendTransaction !== "function") {
1623
1623
  _optionalChain([onErrorRef, 'access', _43 => _43.current, 'optionalCall', _44 => _44({
@@ -1659,7 +1659,7 @@ function WithdrawModal({
1659
1659
  }, [isOpen]);
1660
1660
  _react.useEffect.call(void 0, () => {
1661
1661
  if (!isOpen || !modalRef.current) return;
1662
- return _chunkH4O22O7Ycjs.applyTheme.call(void 0, modalRef.current, theme);
1662
+ return _chunkQGNJFDEOcjs.applyTheme.call(void 0, modalRef.current, theme);
1663
1663
  }, [isOpen, theme]);
1664
1664
  _react.useEffect.call(void 0, () => {
1665
1665
  if (isOpen) {
@@ -1685,7 +1685,7 @@ function WithdrawModal({
1685
1685
  submitting: submitting || recoverySubmitting
1686
1686
  })]);
1687
1687
  }, [screen, backHandler, submitting, recoverySubmitting, onUiStateRef]);
1688
- const onLifecycleRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onLifecycle);
1688
+ const onLifecycleRef = _chunkQGNJFDEOcjs.useLatestRef.call(void 0, onLifecycle);
1689
1689
  const handleLifecycle = _react.useCallback.call(void 0,
1690
1690
  (event) => {
1691
1691
  _optionalChain([onLifecycleRef, 'access', _60 => _60.current, 'optionalCall', _61 => _61(event)]);
@@ -1707,8 +1707,8 @@ function WithdrawModal({
1707
1707
  });
1708
1708
  const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _62 => _62.showBackButton]), () => ( true));
1709
1709
  const canGoBack = backHandler !== void 0 && !submitting;
1710
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1711
- _chunkH4O22O7Ycjs.Modal,
1710
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1711
+ _chunkQGNJFDEOcjs.Modal,
1712
1712
  {
1713
1713
  isOpen,
1714
1714
  onClose: handleModalDismiss,
@@ -1717,7 +1717,7 @@ function WithdrawModal({
1717
1717
  closeOnOverlayClick,
1718
1718
  ariaLabel: "Withdraw",
1719
1719
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1720
- _chunkH4O22O7Ycjs.AnalyticsSession,
1720
+ _chunkQGNJFDEOcjs.AnalyticsSession,
1721
1721
  {
1722
1722
  modal: "withdraw",
1723
1723
  sessionProperties: analyticsSessionProperties,
@@ -1739,12 +1739,12 @@ function WithdrawModal({
1739
1739
  className: "rs-modal-header-back",
1740
1740
  "aria-label": "Go back",
1741
1741
  onClick: backHandler,
1742
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronLeftIcon, {})
1742
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.ChevronLeftIcon, {})
1743
1743
  }
1744
1744
  ) }),
1745
1745
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
1746
1746
  historyButtonVisible && historyRecipient && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1747
- _chunkH4O22O7Ycjs.HistoryEntryButton,
1747
+ _chunkQGNJFDEOcjs.HistoryEntryButton,
1748
1748
  {
1749
1749
  badge: history.badge,
1750
1750
  onClick: history.openPanel
@@ -1757,7 +1757,7 @@ function WithdrawModal({
1757
1757
  onClick: () => closeWithSource("header_button"),
1758
1758
  className: "rs-modal-close",
1759
1759
  "aria-label": "Close",
1760
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CloseIcon, {})
1760
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQGNJFDEOcjs.CloseIcon, {})
1761
1761
  }
1762
1762
  )
1763
1763
  ] })
@@ -1785,7 +1785,7 @@ function WithdrawModal({
1785
1785
  }
1786
1786
  ),
1787
1787
  history.isPanelOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1788
- _chunkH4O22O7Ycjs.HistoryOverlay,
1788
+ _chunkQGNJFDEOcjs.HistoryOverlay,
1789
1789
  {
1790
1790
  controller: history,
1791
1791
  backLabel: "Withdraw",
@@ -49,6 +49,7 @@ import {
49
49
  debugLog,
50
50
  failureMessageForEvent,
51
51
  fetchTokenPriceUsd,
52
+ formatExpectedDuration,
52
53
  formatQuotedReceive,
53
54
  formatReceiveEstimate,
54
55
  formatTokenAmount,
@@ -86,7 +87,7 @@ import {
86
87
  useRpcUrls,
87
88
  useStableRpcUrls,
88
89
  warnRemovedProps
89
- } from "./chunk-EA5CE2UZ.mjs";
90
+ } from "./chunk-QMGEK623.mjs";
90
91
  import {
91
92
  MULTICALL3_ADDRESS,
92
93
  POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
@@ -1722,7 +1723,8 @@ function ConfirmStep({
1722
1723
  if (estimate !== void 0) return estimate;
1723
1724
  return targetSymbol;
1724
1725
  })();
1725
- const estimatedTimeDisplay = quote && Number.isFinite(quote.estimatedFillTimeSeconds) ? quote.estimatedFillTimeSeconds < 60 ? "< 1 min" : `~${Math.round(quote.estimatedFillTimeSeconds / 60)} min` : estimatedTime;
1726
+ const servedExpectedSeconds = quote?.timing?.expectedSeconds ?? (quote && Number.isFinite(quote.estimatedFillTimeSeconds) ? quote.estimatedFillTimeSeconds : void 0);
1727
+ const estimatedTimeDisplay = servedExpectedSeconds !== void 0 ? formatExpectedDuration(servedExpectedSeconds) : estimatedTime;
1726
1728
  useEffect4(() => {
1727
1729
  if (chainMismatch && switchChain && !hasAttemptedSwitch.current) {
1728
1730
  hasAttemptedSwitch.current = true;
@@ -2095,7 +2097,8 @@ function QrReviewStep({
2095
2097
  });
2096
2098
  return estimate ?? targetSymbol;
2097
2099
  })();
2098
- const estimatedTime = quote.value && Number.isFinite(quote.value.estimatedFillTimeSeconds) ? quote.value.estimatedFillTimeSeconds < 60 ? "< 1 min" : `~${Math.round(quote.value.estimatedFillTimeSeconds / 60)} min` : quote.state === "loading" ? "\u2026" : "\u2014";
2100
+ const expectedSeconds = quote.value?.timing?.expectedSeconds ?? (quote.value && Number.isFinite(quote.value.estimatedFillTimeSeconds) ? quote.value.estimatedFillTimeSeconds : void 0);
2101
+ const estimatedTime = expectedSeconds !== void 0 ? formatExpectedDuration(expectedSeconds) : quote.state === "loading" ? "\u2026" : "\u2014";
2099
2102
  const { display: quotedFee, struck } = quoteFeeRow(quote.value?.fees);
2100
2103
  const feeDisplay = quote.state === "unavailable" ? "\u2014" : quotedFee;
2101
2104
  return /* @__PURE__ */ jsxs9("div", { className: "rs-screen", children: [
@@ -9643,7 +9646,7 @@ function DepositFlow({
9643
9646
  import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
9644
9647
  var ReownDepositInner = lazy2(async () => {
9645
9648
  await loadReownDependencies();
9646
- const module = await import("./DepositModalReown-R7UROJPJ.mjs");
9649
+ const module = await import("./DepositModalReown-ELDSTIME.mjs");
9647
9650
  return { default: module.DepositModalReown };
9648
9651
  });
9649
9652
  function buildDepositAnalyticsSessionProperties({
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/core/version.ts
2
- var MODAL_VERSION = "0.16.0";
2
+ var MODAL_VERSION = "0.17.0";
3
3
  var SERVICE_HEADERS = {
4
4
  "Content-Type": "application/json",
5
5
  "x-deposit-modal-version": MODAL_VERSION