@rhinestone/deposit-modal 0.3.0-alpha.7 → 0.3.0-alpha.8

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.
@@ -31,7 +31,7 @@
31
31
 
32
32
 
33
33
 
34
- var _chunkENMIKNXScjs = require('./chunk-ENMIKNXS.cjs');
34
+ var _chunkUELVNPGEcjs = require('./chunk-UELVNPGE.cjs');
35
35
 
36
36
 
37
37
 
@@ -44,7 +44,7 @@ var _chunkENMIKNXScjs = require('./chunk-ENMIKNXS.cjs');
44
44
 
45
45
 
46
46
 
47
- var _chunkMHKHSCIAcjs = require('./chunk-MHKHSCIA.cjs');
47
+ var _chunk7JIDIX27cjs = require('./chunk-7JIDIX27.cjs');
48
48
 
49
49
  // src/WithdrawModal.tsx
50
50
 
@@ -235,8 +235,8 @@ function WithdrawFormStep({
235
235
  const chainMismatch = Boolean(
236
236
  _optionalChain([walletClient, 'optionalAccess', _3 => _3.chain, 'optionalAccess', _4 => _4.id]) && walletClient.chain.id !== asset.chainId
237
237
  );
238
- const targetSymbol = _chunkMHKHSCIAcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
239
- const targetChainName = _chunkMHKHSCIAcjs.getChainName.call(void 0, targetChain);
238
+ const targetSymbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
239
+ const targetChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, targetChain);
240
240
  const isBusy = submitting || isSubmitting;
241
241
  const seededRecipientRef = _react.useRef.call(void 0, _nullishCoalesce(defaultRecipient, () => ( "")));
242
242
  _react.useEffect.call(void 0, () => {
@@ -255,7 +255,7 @@ function WithdrawFormStep({
255
255
  setIsSwitching(true);
256
256
  switchChain(asset.chainId).catch((err) => {
257
257
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
258
- setError(_chunkENMIKNXScjs.formatUserError.call(void 0, raw));
258
+ setError(_chunkUELVNPGEcjs.formatUserError.call(void 0, raw));
259
259
  }).finally(() => {
260
260
  setIsSwitching(false);
261
261
  });
@@ -275,7 +275,7 @@ function WithdrawFormStep({
275
275
  return;
276
276
  }
277
277
  try {
278
- const bal = _chunkENMIKNXScjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
278
+ const bal = _chunkUELVNPGEcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
279
279
  address: asset.token,
280
280
  abi: _viem.erc20Abi,
281
281
  functionName: "balanceOf",
@@ -379,7 +379,7 @@ function WithdrawFormStep({
379
379
  await onSubmit(recipient, amount);
380
380
  } catch (err) {
381
381
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
382
- setError(_chunkENMIKNXScjs.formatUserError.call(void 0, raw));
382
+ setError(_chunkUELVNPGEcjs.formatUserError.call(void 0, raw));
383
383
  } finally {
384
384
  setIsSubmitting(false);
385
385
  }
@@ -387,16 +387,16 @@ function WithdrawFormStep({
387
387
  if (isBalanceLoading) {
388
388
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
389
389
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
390
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.Spinner, { className: "rs-spinner--lg" }),
390
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.Spinner, { className: "rs-spinner--lg" }),
391
391
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
392
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkMHKHSCIAcjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
392
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
393
393
  ] }),
394
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.PoweredBy, {})
394
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.PoweredBy, {})
395
395
  ] });
396
396
  }
397
397
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
398
398
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
399
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
399
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
400
400
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
401
401
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: "rs-withdraw-label", children: "Recipient address" }),
402
402
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-input-row", children: [
@@ -434,7 +434,7 @@ function WithdrawFormStep({
434
434
  ),
435
435
  isRecipientConnected ? null : "Use connected"
436
436
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
437
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
437
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
438
438
  isRecipientConnected ? null : "Use connected"
439
439
  ] })
440
440
  }
@@ -473,7 +473,7 @@ function WithdrawFormStep({
473
473
  ) })
474
474
  ] }),
475
475
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
476
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkENMIKNXScjs.currencyFormatter.format(amountUsd) : "$0.00" }),
476
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkUELVNPGEcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
477
477
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
478
478
  "Balance: ",
479
479
  formattedBalance,
@@ -502,10 +502,10 @@ function WithdrawFormStep({
502
502
  },
503
503
  children: [
504
504
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
505
- _chunkMHKHSCIAcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
505
+ _chunk7JIDIX27cjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
506
506
  "img",
507
507
  {
508
- src: _chunkMHKHSCIAcjs.getChainIcon.call(void 0, targetChain),
508
+ src: _chunk7JIDIX27cjs.getChainIcon.call(void 0, targetChain),
509
509
  alt: targetChainName,
510
510
  className: "rs-withdraw-dropdown-icon"
511
511
  }
@@ -513,7 +513,7 @@ function WithdrawFormStep({
513
513
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
514
514
  ] }),
515
515
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
516
- _chunkENMIKNXScjs.ChevronDownIcon,
516
+ _chunkUELVNPGEcjs.ChevronDownIcon,
517
517
  {
518
518
  className: "rs-withdraw-dropdown-arrow",
519
519
  style: {
@@ -534,10 +534,10 @@ function WithdrawFormStep({
534
534
  setShowChainDropdown(false);
535
535
  },
536
536
  children: [
537
- _chunkMHKHSCIAcjs.getChainIcon.call(void 0, chain.id) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
537
+ _chunk7JIDIX27cjs.getChainIcon.call(void 0, chain.id) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
538
538
  "img",
539
539
  {
540
- src: _chunkMHKHSCIAcjs.getChainIcon.call(void 0, chain.id),
540
+ src: _chunk7JIDIX27cjs.getChainIcon.call(void 0, chain.id),
541
541
  alt: chain.name,
542
542
  className: "rs-withdraw-dropdown-icon"
543
543
  }
@@ -570,10 +570,10 @@ function WithdrawFormStep({
570
570
  },
571
571
  children: [
572
572
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
573
- _chunkMHKHSCIAcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
573
+ _chunk7JIDIX27cjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
574
574
  "img",
575
575
  {
576
- src: _chunkMHKHSCIAcjs.getTokenIcon.call(void 0, targetSymbol),
576
+ src: _chunk7JIDIX27cjs.getTokenIcon.call(void 0, targetSymbol),
577
577
  alt: targetSymbol,
578
578
  className: "rs-withdraw-dropdown-icon"
579
579
  }
@@ -581,7 +581,7 @@ function WithdrawFormStep({
581
581
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
582
582
  ] }),
583
583
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
584
- _chunkENMIKNXScjs.ChevronDownIcon,
584
+ _chunkUELVNPGEcjs.ChevronDownIcon,
585
585
  {
586
586
  className: "rs-withdraw-dropdown-arrow",
587
587
  style: {
@@ -602,10 +602,10 @@ function WithdrawFormStep({
602
602
  setShowTokenDropdown(false);
603
603
  },
604
604
  children: [
605
- _chunkMHKHSCIAcjs.getTokenIcon.call(void 0, option.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
605
+ _chunk7JIDIX27cjs.getTokenIcon.call(void 0, option.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
606
606
  "img",
607
607
  {
608
- src: _chunkMHKHSCIAcjs.getTokenIcon.call(void 0, option.symbol),
608
+ src: _chunk7JIDIX27cjs.getTokenIcon.call(void 0, option.symbol),
609
609
  alt: option.symbol,
610
610
  className: "rs-withdraw-dropdown-icon"
611
611
  }
@@ -620,11 +620,11 @@ function WithdrawFormStep({
620
620
  )
621
621
  ] })
622
622
  ] }),
623
- chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunkMHKHSCIAcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch to ${_chunkMHKHSCIAcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
624
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.Callout, { variant: "error", children: error }),
625
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.Callout, { variant: "error", children: registrationError }),
623
+ chainMismatch && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-chain-switch-text", children: isSwitching ? `Switching to ${_chunk7JIDIX27cjs.getChainName.call(void 0, asset.chainId)}...` : `Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
624
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.Callout, { variant: "error", children: error }),
625
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.Callout, { variant: "error", children: registrationError }),
626
626
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
627
- _chunkENMIKNXScjs.Button,
627
+ _chunkUELVNPGEcjs.Button,
628
628
  {
629
629
  onClick: handleWithdraw,
630
630
  fullWidth: true,
@@ -634,7 +634,7 @@ function WithdrawFormStep({
634
634
  }
635
635
  )
636
636
  ] }),
637
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.PoweredBy, {})
637
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.PoweredBy, {})
638
638
  ] });
639
639
  }
640
640
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -660,13 +660,13 @@ function WithdrawReviewStep({
660
660
  }) {
661
661
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
662
662
  const [error, setError] = _react.useState.call(void 0, null);
663
- const sourceChainName = _chunkMHKHSCIAcjs.getChainName.call(void 0, sourceChain);
664
- const sourceChainIcon = _chunkMHKHSCIAcjs.getChainIcon.call(void 0, sourceChain);
665
- const targetSymbol = _chunkMHKHSCIAcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
666
- const targetChainName = _chunkMHKHSCIAcjs.getChainName.call(void 0, targetChain);
667
- const targetChainIcon = _chunkMHKHSCIAcjs.getChainIcon.call(void 0, targetChain);
668
- const sourceTokenIcon = _chunkMHKHSCIAcjs.getTokenIcon.call(void 0, sourceSymbol);
669
- const targetTokenIcon = _chunkMHKHSCIAcjs.getTokenIcon.call(void 0, targetSymbol);
663
+ const sourceChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, sourceChain);
664
+ const sourceChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, sourceChain);
665
+ const targetSymbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
666
+ const targetChainName = _chunk7JIDIX27cjs.getChainName.call(void 0, targetChain);
667
+ const targetChainIcon = _chunk7JIDIX27cjs.getChainIcon.call(void 0, targetChain);
668
+ const sourceTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, sourceSymbol);
669
+ const targetTokenIcon = _chunk7JIDIX27cjs.getTokenIcon.call(void 0, targetSymbol);
670
670
  const handleConfirm = async () => {
671
671
  setError(null);
672
672
  setIsSubmitting(true);
@@ -674,7 +674,7 @@ function WithdrawReviewStep({
674
674
  await onConfirm();
675
675
  } catch (err) {
676
676
  const raw = err instanceof Error ? err.message : "Withdraw failed";
677
- const message = _chunkENMIKNXScjs.formatUserError.call(void 0, raw);
677
+ const message = _chunkUELVNPGEcjs.formatUserError.call(void 0, raw);
678
678
  setError(message);
679
679
  _optionalChain([onError, 'optionalCall', _8 => _8(message, "WITHDRAW_REVIEW_ERROR")]);
680
680
  } finally {
@@ -685,9 +685,9 @@ function WithdrawReviewStep({
685
685
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
686
686
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
687
687
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
688
- _chunkENMIKNXScjs.BodyHeader,
688
+ _chunkUELVNPGEcjs.BodyHeader,
689
689
  {
690
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.CircleArrowOutUpLeftIcon, {}),
690
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.CircleArrowOutUpLeftIcon, {}),
691
691
  title: "Review withdrawal"
692
692
  }
693
693
  ),
@@ -737,10 +737,10 @@ function WithdrawReviewStep({
737
737
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
738
738
  ] })
739
739
  ] }),
740
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.Callout, { variant: "error", children: error }),
741
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.Callout, { variant: "error", children: registrationError }),
740
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.Callout, { variant: "error", children: error }),
741
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.Callout, { variant: "error", children: registrationError }),
742
742
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
743
- _chunkENMIKNXScjs.Button,
743
+ _chunkUELVNPGEcjs.Button,
744
744
  {
745
745
  onClick: handleConfirm,
746
746
  loading: isSubmitting,
@@ -751,7 +751,7 @@ function WithdrawReviewStep({
751
751
  }
752
752
  )
753
753
  ] }),
754
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.PoweredBy, {})
754
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.PoweredBy, {})
755
755
  ] });
756
756
  }
757
757
  WithdrawReviewStep.displayName = "WithdrawReviewStep";
@@ -762,15 +762,15 @@ WithdrawReviewStep.displayName = "WithdrawReviewStep";
762
762
  var ADDR_REGEX = /^0x[a-fA-F0-9]{40}$/;
763
763
  var REGISTRATION_DEBOUNCE_MS = 600;
764
764
  function resolveSessionOwner(eoaAddress) {
765
- const localOwner = _chunkENMIKNXScjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
765
+ const localOwner = _chunkUELVNPGEcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
766
766
  if (localOwner) {
767
767
  return {
768
- account: _chunkENMIKNXScjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
768
+ account: _chunkUELVNPGEcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
769
769
  address: localOwner.address
770
770
  };
771
771
  }
772
- const created = _chunkENMIKNXScjs.createSessionOwnerKey.call(void 0, );
773
- _chunkENMIKNXScjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
772
+ const created = _chunkUELVNPGEcjs.createSessionOwnerKey.call(void 0, );
773
+ _chunkUELVNPGEcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
774
774
  return { account: created.account, address: created.address };
775
775
  }
776
776
  function targetsEqual(a, b) {
@@ -790,7 +790,7 @@ function WithdrawFlow({
790
790
  amount: defaultAmount,
791
791
  service,
792
792
  allowedRoutes,
793
- signerAddress = _chunkMHKHSCIAcjs.DEFAULT_SIGNER_ADDRESS,
793
+ signerAddress = _chunk7JIDIX27cjs.DEFAULT_SIGNER_ADDRESS,
794
794
  sessionChainIds,
795
795
  forceRegister = false,
796
796
  waitForFinalTx = true,
@@ -806,19 +806,19 @@ function WithdrawFlow({
806
806
  onError,
807
807
  debug
808
808
  }) {
809
- const onStepChangeRef = _chunkENMIKNXScjs.useLatestRef.call(void 0, onStepChange);
810
- const onEventRef = _chunkENMIKNXScjs.useLatestRef.call(void 0, onEvent);
811
- const onLifecycleRef = _chunkENMIKNXScjs.useLatestRef.call(void 0, onLifecycle);
812
- const onErrorRef = _chunkENMIKNXScjs.useLatestRef.call(void 0, onError);
809
+ const onStepChangeRef = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onStepChange);
810
+ const onEventRef = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onEvent);
811
+ const onLifecycleRef = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onLifecycle);
812
+ const onErrorRef = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onError);
813
813
  const logFlow = _react.useCallback.call(void 0,
814
814
  (message, data) => {
815
- _chunkENMIKNXScjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
815
+ _chunkUELVNPGEcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
816
816
  },
817
817
  [debug]
818
818
  );
819
819
  const logFlowError = _react.useCallback.call(void 0,
820
820
  (message, error, data) => {
821
- _chunkENMIKNXScjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
821
+ _chunkUELVNPGEcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
822
822
  },
823
823
  [debug]
824
824
  );
@@ -893,14 +893,14 @@ function WithdrawFlow({
893
893
  return {
894
894
  ownerAddress: dappAddress,
895
895
  walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
896
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkENMIKNXScjs.getPublicClient.call(void 0, sourceChain))),
896
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain))),
897
897
  switchChain: dappSwitchChain
898
898
  };
899
899
  }
900
900
  return {
901
901
  ownerAddress: dappWalletClient.account.address,
902
902
  walletClient: dappWalletClient,
903
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkENMIKNXScjs.getPublicClient.call(void 0, sourceChain))),
903
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain))),
904
904
  switchChain: dappSwitchChain
905
905
  };
906
906
  }
@@ -911,7 +911,7 @@ function WithdrawFlow({
911
911
  return {
912
912
  ownerAddress: dappWalletClient.account.address,
913
913
  walletClient: dappWalletClient,
914
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkENMIKNXScjs.getPublicClient.call(void 0, sourceChain))),
914
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain))),
915
915
  switchChain: dappSwitchChain
916
916
  };
917
917
  }
@@ -968,7 +968,7 @@ function WithdrawFlow({
968
968
  const setup = await service.setupAccount({
969
969
  ownerAddress,
970
970
  sessionOwnerAddress: sessionOwner.address,
971
- targetChain: _chunkENMIKNXScjs.toEvmCaip2.call(void 0, targetChain),
971
+ targetChain: _chunkUELVNPGEcjs.toEvmCaip2.call(void 0, targetChain),
972
972
  targetToken,
973
973
  recipient: recipientForRegistration,
974
974
  signerAddress,
@@ -993,7 +993,7 @@ function WithdrawFlow({
993
993
  message: typedData.message
994
994
  });
995
995
  if (cancelled) return;
996
- const sessionDetails = _chunkENMIKNXScjs.buildSessionDetails.call(void 0,
996
+ const sessionDetails = _chunkUELVNPGEcjs.buildSessionDetails.call(void 0,
997
997
  setup.sessionDetailsUnsigned,
998
998
  signature
999
999
  );
@@ -1007,7 +1007,7 @@ function WithdrawFlow({
1007
1007
  eoaAddress: ownerAddress,
1008
1008
  sessionOwner: sessionOwner.address,
1009
1009
  target: {
1010
- chain: _chunkENMIKNXScjs.toEvmCaip2.call(void 0, targetChain),
1010
+ chain: _chunkUELVNPGEcjs.toEvmCaip2.call(void 0, targetChain),
1011
1011
  token: targetToken,
1012
1012
  recipient: recipientForRegistration
1013
1013
  }
@@ -1030,7 +1030,7 @@ function WithdrawFlow({
1030
1030
  } catch (err) {
1031
1031
  if (cancelled) return;
1032
1032
  const raw = err instanceof Error ? err.message : "Registration failed";
1033
- const message = _chunkENMIKNXScjs.formatUserError.call(void 0, raw);
1033
+ const message = _chunkUELVNPGEcjs.formatUserError.call(void 0, raw);
1034
1034
  logFlowError("auto-register:failed", err, {
1035
1035
  ownerAddress,
1036
1036
  targetChain,
@@ -1063,10 +1063,10 @@ function WithdrawFlow({
1063
1063
  onErrorRef
1064
1064
  ]);
1065
1065
  const asset = _react.useMemo.call(void 0, () => {
1066
- const symbol = _chunkMHKHSCIAcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
1067
- const decimals = _chunkMHKHSCIAcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1066
+ const symbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
1067
+ const decimals = _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1068
1068
  return {
1069
- id: _chunkENMIKNXScjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1069
+ id: _chunkUELVNPGEcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1070
1070
  chainId: sourceChain,
1071
1071
  token: sourceToken,
1072
1072
  symbol,
@@ -1074,7 +1074,7 @@ function WithdrawFlow({
1074
1074
  decimals
1075
1075
  };
1076
1076
  }, [sourceChain, sourceToken]);
1077
- const isSourceNative = sourceToken.toLowerCase() === _chunkMHKHSCIAcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
1077
+ const isSourceNative = sourceToken.toLowerCase() === _chunk7JIDIX27cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
1078
1078
  const isSameRoute = targetChain === sourceChain && targetToken.toLowerCase() === sourceToken.toLowerCase();
1079
1079
  const reviewBackHandler = _react.useCallback.call(void 0, () => {
1080
1080
  storeApi.dispatch({ type: "review/back" });
@@ -1092,8 +1092,8 @@ function WithdrawFlow({
1092
1092
  }
1093
1093
  if (lastStepOpenEventKeyRef.current === "form") return;
1094
1094
  lastStepOpenEventKeyRef.current = "form";
1095
- const tokenSymbol = _chunkMHKHSCIAcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1096
- const chainName = _chunkMHKHSCIAcjs.getChainName.call(void 0, targetChain);
1095
+ const tokenSymbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1096
+ const chainName = _chunk7JIDIX27cjs.getChainName.call(void 0, targetChain);
1097
1097
  _optionalChain([onEventRef, 'access', _37 => _37.current, 'optionalCall', _38 => _38({
1098
1098
  type: "withdraw_modal_select_amount_open",
1099
1099
  pred_balance: totalBalanceUsd,
@@ -1130,8 +1130,8 @@ function WithdrawFlow({
1130
1130
  );
1131
1131
  const handleFormContinue = _react.useCallback.call(void 0,
1132
1132
  (recipient, amountValue) => {
1133
- const tokenSymbol = _chunkMHKHSCIAcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1134
- const chainName = _chunkMHKHSCIAcjs.getChainName.call(void 0, targetChain);
1133
+ const tokenSymbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1134
+ const chainName = _chunk7JIDIX27cjs.getChainName.call(void 0, targetChain);
1135
1135
  _optionalChain([onEventRef, 'access', _41 => _41.current, 'optionalCall', _42 => _42({
1136
1136
  type: "withdraw_modal_select_amount_cta_click",
1137
1137
  pred_balance: totalBalanceUsd,
@@ -1174,7 +1174,7 @@ function WithdrawFlow({
1174
1174
  targetToken
1175
1175
  });
1176
1176
  const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
1177
- const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => ( _chunkENMIKNXScjs.getPublicClient.call(void 0, sourceChain)));
1177
+ const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain)));
1178
1178
  let result;
1179
1179
  if (onSignTransaction) {
1180
1180
  const transferTarget = isSameRoute ? recipient : smartAccount;
@@ -1187,7 +1187,7 @@ function WithdrawFlow({
1187
1187
  args: [transferTarget, amountUnits]
1188
1188
  })
1189
1189
  };
1190
- const request = await _chunkENMIKNXScjs.buildSafeTransaction.call(void 0, {
1190
+ const request = await _chunkUELVNPGEcjs.buildSafeTransaction.call(void 0, {
1191
1191
  publicClient: pc,
1192
1192
  safeAddress,
1193
1193
  to: transferData.to,
@@ -1198,7 +1198,7 @@ function WithdrawFlow({
1198
1198
  const { signature } = await onSignTransaction(request);
1199
1199
  const relayResult = await service.relayWithdraw({
1200
1200
  smartAccount,
1201
- chainId: _chunkENMIKNXScjs.toEvmCaip2.call(void 0, sourceChain),
1201
+ chainId: _chunkUELVNPGEcjs.toEvmCaip2.call(void 0, sourceChain),
1202
1202
  safeAddress,
1203
1203
  safeTransaction: request.typedData.message,
1204
1204
  signature
@@ -1208,7 +1208,7 @@ function WithdrawFlow({
1208
1208
  }
1209
1209
  result = { txHash: relayResult.txHash };
1210
1210
  } else if (isSourceNative) {
1211
- result = await _chunkENMIKNXScjs.executeSafeEthTransfer.call(void 0, {
1211
+ result = await _chunkUELVNPGEcjs.executeSafeEthTransfer.call(void 0, {
1212
1212
  walletClient: signerContext.walletClient,
1213
1213
  publicClient: pc,
1214
1214
  safeAddress,
@@ -1217,7 +1217,7 @@ function WithdrawFlow({
1217
1217
  chainId: sourceChain
1218
1218
  });
1219
1219
  } else {
1220
- result = await _chunkENMIKNXScjs.executeSafeErc20Transfer.call(void 0, {
1220
+ result = await _chunkUELVNPGEcjs.executeSafeErc20Transfer.call(void 0, {
1221
1221
  walletClient: signerContext.walletClient,
1222
1222
  publicClient: pc,
1223
1223
  safeAddress,
@@ -1250,7 +1250,7 @@ function WithdrawFlow({
1250
1250
  targetChain,
1251
1251
  targetToken
1252
1252
  });
1253
- handleError(_chunkENMIKNXScjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1253
+ handleError(_chunkUELVNPGEcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1254
1254
  throw err;
1255
1255
  }
1256
1256
  },
@@ -1315,9 +1315,9 @@ function WithdrawFlow({
1315
1315
  [_optionalChain([allowedRoutes, 'optionalAccess', _54 => _54.sourceTokens])]
1316
1316
  );
1317
1317
  const targetChainOptions = _react.useMemo.call(void 0, () => {
1318
- return _chunkMHKHSCIAcjs.SOURCE_CHAINS.filter((chain) => {
1318
+ return _chunk7JIDIX27cjs.SOURCE_CHAINS.filter((chain) => {
1319
1319
  if (allowedChainSet && !allowedChainSet.has(chain.id)) return false;
1320
- const tokens = _chunkMHKHSCIAcjs.getSupportedTargetTokens.call(void 0, chain.id);
1320
+ const tokens = _chunk7JIDIX27cjs.getSupportedTargetTokens.call(void 0, chain.id);
1321
1321
  if (allowedTokenSet) {
1322
1322
  return tokens.some((t) => allowedTokenSet.has(t.symbol.toUpperCase()));
1323
1323
  }
@@ -1325,7 +1325,7 @@ function WithdrawFlow({
1325
1325
  });
1326
1326
  }, [allowedChainSet, allowedTokenSet]);
1327
1327
  const targetTokenOptions = _react.useMemo.call(void 0, () => {
1328
- const tokens = _chunkMHKHSCIAcjs.getSupportedTargetTokens.call(void 0, targetChain);
1328
+ const tokens = _chunk7JIDIX27cjs.getSupportedTargetTokens.call(void 0, targetChain);
1329
1329
  if (!allowedTokenSet) return tokens;
1330
1330
  return tokens.filter((t) => allowedTokenSet.has(t.symbol.toUpperCase()));
1331
1331
  }, [targetChain, allowedTokenSet]);
@@ -1339,7 +1339,7 @@ function WithdrawFlow({
1339
1339
  const handleTargetChainChange = _react.useCallback.call(void 0,
1340
1340
  (chainId) => {
1341
1341
  setTargetChain(chainId);
1342
- let options = _chunkMHKHSCIAcjs.getSupportedTargetTokens.call(void 0, chainId);
1342
+ let options = _chunk7JIDIX27cjs.getSupportedTargetTokens.call(void 0, chainId);
1343
1343
  if (allowedTokenSet) {
1344
1344
  options = options.filter(
1345
1345
  (t) => allowedTokenSet.has(t.symbol.toUpperCase())
@@ -1389,7 +1389,7 @@ function WithdrawFlow({
1389
1389
  state: "ready"
1390
1390
  }));
1391
1391
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1392
- _chunkENMIKNXScjs.ConnectStep,
1392
+ _chunkUELVNPGEcjs.ConnectStep,
1393
1393
  {
1394
1394
  walletRows: withdrawRows,
1395
1395
  onConfirmWallet: (walletId) => {
@@ -1407,7 +1407,7 @@ function WithdrawFlow({
1407
1407
  if (!signerContext) return null;
1408
1408
  if (!onSignTransaction && !signerContext.walletClient) return null;
1409
1409
  const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _61 => _61.kind]) === "external" ? selectedWalletOption.address : void 0;
1410
- const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkENMIKNXScjs.getPublicClient.call(void 0, sourceChain)));
1410
+ const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain)));
1411
1411
  const stepView = deriveStepView(flowStep, registration);
1412
1412
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
1413
1413
  stepView === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1451,7 +1451,7 @@ function WithdrawFlow({
1451
1451
  }
1452
1452
  ),
1453
1453
  stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1454
- _chunkENMIKNXScjs.ProcessingStep,
1454
+ _chunkUELVNPGEcjs.ProcessingStep,
1455
1455
  {
1456
1456
  smartAccount: registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0",
1457
1457
  txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
@@ -1485,7 +1485,7 @@ function deriveStepView(step, _registration) {
1485
1485
  // src/WithdrawModal.tsx
1486
1486
 
1487
1487
  var ReownWithdrawInner = _react.lazy.call(void 0,
1488
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-FJP3XTQ5.cjs"))).then((m) => ({
1488
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-FCWED55P.cjs"))).then((m) => ({
1489
1489
  default: m.WithdrawModalReown
1490
1490
  }))
1491
1491
  );
@@ -1513,8 +1513,8 @@ function WithdrawModalInner({
1513
1513
  inline,
1514
1514
  closeOnOverlayClick,
1515
1515
  allowedRoutes,
1516
- backendUrl = _chunkMHKHSCIAcjs.DEFAULT_BACKEND_URL,
1517
- signerAddress = _chunkMHKHSCIAcjs.DEFAULT_SIGNER_ADDRESS,
1516
+ backendUrl = _chunk7JIDIX27cjs.DEFAULT_BACKEND_URL,
1517
+ signerAddress = _chunk7JIDIX27cjs.DEFAULT_SIGNER_ADDRESS,
1518
1518
  sessionChainIds,
1519
1519
  forceRegister = false,
1520
1520
  waitForFinalTx = true,
@@ -1533,18 +1533,18 @@ function WithdrawModalInner({
1533
1533
  debug
1534
1534
  }) {
1535
1535
  const modalRef = _react.useRef.call(void 0, null);
1536
- const onReadyRef = _chunkENMIKNXScjs.useLatestRef.call(void 0, onReady);
1536
+ const onReadyRef = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onReady);
1537
1537
  const [backHandler, setBackHandler] = _react.useState.call(void 0,
1538
1538
  void 0
1539
1539
  );
1540
- const targetChain = _chunkMHKHSCIAcjs.getChainId.call(void 0, targetChainProp);
1541
- const sourceChain = _chunkMHKHSCIAcjs.getChainId.call(void 0, sourceChainProp);
1540
+ const targetChain = _chunk7JIDIX27cjs.getChainId.call(void 0, targetChainProp);
1541
+ const sourceChain = _chunk7JIDIX27cjs.getChainId.call(void 0, sourceChainProp);
1542
1542
  const service = _react.useMemo.call(void 0,
1543
- () => _chunkENMIKNXScjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1543
+ () => _chunkUELVNPGEcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1544
1544
  [backendUrl, debug]
1545
1545
  );
1546
1546
  const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
1547
- const onErrorRef = _chunkENMIKNXScjs.useLatestRef.call(void 0, onError);
1547
+ const onErrorRef = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onError);
1548
1548
  _react.useEffect.call(void 0, () => {
1549
1549
  if (isOpen && onSignTransaction && !dappAddress) {
1550
1550
  _optionalChain([onErrorRef, 'access', _62 => _62.current, 'optionalCall', _63 => _63({
@@ -1555,7 +1555,7 @@ function WithdrawModalInner({
1555
1555
  }, [isOpen, onSignTransaction, dappAddress, onErrorRef]);
1556
1556
  _react.useEffect.call(void 0, () => {
1557
1557
  if (isOpen && modalRef.current) {
1558
- _chunkENMIKNXScjs.applyTheme.call(void 0, modalRef.current, theme);
1558
+ _chunkUELVNPGEcjs.applyTheme.call(void 0, modalRef.current, theme);
1559
1559
  }
1560
1560
  }, [isOpen, theme]);
1561
1561
  _react.useEffect.call(void 0, () => {
@@ -1574,7 +1574,7 @@ function WithdrawModalInner({
1574
1574
  const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _66 => _66.showBackButton]), () => ( true));
1575
1575
  const canGoBack = backHandler !== void 0;
1576
1576
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1577
- _chunkENMIKNXScjs.Modal,
1577
+ _chunkUELVNPGEcjs.Modal,
1578
1578
  {
1579
1579
  isOpen,
1580
1580
  onClose,
@@ -1590,7 +1590,7 @@ function WithdrawModalInner({
1590
1590
  className: "rs-modal-header-back",
1591
1591
  "aria-label": "Go back",
1592
1592
  onClick: backHandler,
1593
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.ChevronLeftIcon, {})
1593
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.ChevronLeftIcon, {})
1594
1594
  }
1595
1595
  ) }),
1596
1596
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1600,7 +1600,7 @@ function WithdrawModalInner({
1600
1600
  onClick: onClose,
1601
1601
  className: "rs-modal-close",
1602
1602
  "aria-label": "Close",
1603
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkENMIKNXScjs.CloseIcon, {})
1603
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.CloseIcon, {})
1604
1604
  }
1605
1605
  ) })
1606
1606
  ] }),