@rhinestone/deposit-modal 0.4.2 → 0.5.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.
@@ -30,7 +30,9 @@
30
30
 
31
31
 
32
32
 
33
- var _chunkEDUWRMQIcjs = require('./chunk-EDUWRMQI.cjs');
33
+
34
+
35
+ var _chunkPPFG3VBDcjs = require('./chunk-PPFG3VBD.cjs');
34
36
 
35
37
 
36
38
 
@@ -200,6 +202,7 @@ function WithdrawFormStep({
200
202
  publicClient,
201
203
  connectedRecipient,
202
204
  safeAddress,
205
+ depositAddress,
203
206
  asset,
204
207
  defaultRecipient,
205
208
  defaultAmount,
@@ -260,7 +263,7 @@ function WithdrawFormStep({
260
263
  setIsSwitching(true);
261
264
  switchChain(asset.chainId).catch((err) => {
262
265
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
263
- setError(_chunkEDUWRMQIcjs.formatUserError.call(void 0, raw));
266
+ setError(_chunkPPFG3VBDcjs.formatUserError.call(void 0, raw));
264
267
  }).finally(() => {
265
268
  setIsSwitching(false);
266
269
  });
@@ -280,7 +283,7 @@ function WithdrawFormStep({
280
283
  return;
281
284
  }
282
285
  try {
283
- const bal = _chunkEDUWRMQIcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
286
+ const bal = _chunkPPFG3VBDcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
284
287
  address: asset.token,
285
288
  abi: _viem.erc20Abi,
286
289
  functionName: "balanceOf",
@@ -361,6 +364,13 @@ function WithdrawFormStep({
361
364
  setError("Enter a valid recipient address");
362
365
  return;
363
366
  }
367
+ const lowerRecipient = recipient.toLowerCase();
368
+ if (lowerRecipient === safeAddress.toLowerCase() || lowerRecipient === _optionalChain([depositAddress, 'optionalAccess', _7 => _7.toLowerCase, 'call', _8 => _8()])) {
369
+ setError(
370
+ "Recipient can't be your own account. Send to a different wallet."
371
+ );
372
+ return;
373
+ }
364
374
  const parsed = Number(amount);
365
375
  if (!amount || !Number.isFinite(parsed) || parsed <= 0) {
366
376
  setError("Enter a valid amount");
@@ -384,24 +394,32 @@ function WithdrawFormStep({
384
394
  await onSubmit(recipient, amount);
385
395
  } catch (err) {
386
396
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
387
- setError(_chunkEDUWRMQIcjs.formatUserError.call(void 0, raw));
397
+ setError(_chunkPPFG3VBDcjs.formatUserError.call(void 0, raw));
388
398
  } finally {
389
399
  setIsSubmitting(false);
390
400
  }
391
- }, [recipient, amount, balance, asset.decimals, onSubmit]);
401
+ }, [
402
+ recipient,
403
+ amount,
404
+ balance,
405
+ asset.decimals,
406
+ safeAddress,
407
+ depositAddress,
408
+ onSubmit
409
+ ]);
392
410
  if (isBalanceLoading) {
393
411
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
394
412
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-withdraw-loading", children: [
395
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.Spinner, { className: "rs-spinner--lg" }),
413
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.Spinner, { className: "rs-spinner--lg" }),
396
414
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-title", children: "Loading on-chain balance" }),
397
415
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-withdraw-loading-subtitle", children: chainMismatch ? `Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)} to continue.` : "Please wait before withdrawing." })
398
416
  ] }),
399
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.PoweredBy, {})
417
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.PoweredBy, {})
400
418
  ] });
401
419
  }
402
420
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
403
421
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
404
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
422
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
405
423
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-section", children: [
406
424
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
407
425
  "label",
@@ -423,7 +441,7 @@ function WithdrawFormStep({
423
441
  onChange: (e) => {
424
442
  const next = e.target.value.trim();
425
443
  setRecipient(next);
426
- _optionalChain([onRecipientChange, 'optionalCall', _7 => _7(next)]);
444
+ _optionalChain([onRecipientChange, 'optionalCall', _9 => _9(next)]);
427
445
  if (error) setError(null);
428
446
  }
429
447
  }
@@ -447,7 +465,7 @@ function WithdrawFormStep({
447
465
  ),
448
466
  isRecipientConnected ? null : "Use connected"
449
467
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
450
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
468
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
451
469
  isRecipientConnected ? null : "Use connected"
452
470
  ] })
453
471
  }
@@ -487,7 +505,7 @@ function WithdrawFormStep({
487
505
  ) })
488
506
  ] }),
489
507
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
490
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkEDUWRMQIcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
508
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkPPFG3VBDcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
491
509
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
492
510
  "Balance: ",
493
511
  formattedBalance,
@@ -528,7 +546,7 @@ function WithdrawFormStep({
528
546
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName })
529
547
  ] }),
530
548
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
531
- _chunkEDUWRMQIcjs.ChevronDownIcon,
549
+ _chunkPPFG3VBDcjs.ChevronDownIcon,
532
550
  {
533
551
  className: "rs-withdraw-dropdown-arrow",
534
552
  style: {
@@ -597,7 +615,7 @@ function WithdrawFormStep({
597
615
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetSymbol })
598
616
  ] }),
599
617
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
600
- _chunkEDUWRMQIcjs.ChevronDownIcon,
618
+ _chunkPPFG3VBDcjs.ChevronDownIcon,
601
619
  {
602
620
  className: "rs-withdraw-dropdown-arrow",
603
621
  style: {
@@ -637,10 +655,10 @@ function WithdrawFormStep({
637
655
  ] })
638
656
  ] }),
639
657
  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 ${_chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)}...` : `Switch to ${_chunkABVRVW3Pcjs.getChainName.call(void 0, asset.chainId)} to continue.` }) }),
640
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: error }),
641
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: registrationError }),
658
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.Callout, { variant: "error", children: error }),
659
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.Callout, { variant: "error", children: registrationError }),
642
660
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
643
- _chunkEDUWRMQIcjs.Button,
661
+ _chunkPPFG3VBDcjs.Button,
644
662
  {
645
663
  onClick: handleWithdraw,
646
664
  fullWidth: true,
@@ -650,7 +668,7 @@ function WithdrawFormStep({
650
668
  }
651
669
  )
652
670
  ] }),
653
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.PoweredBy, {})
671
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.PoweredBy, {})
654
672
  ] });
655
673
  }
656
674
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -685,9 +703,9 @@ function WithdrawReviewStep({
685
703
  const sourceTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, sourceSymbol);
686
704
  const targetTokenIcon = _chunkABVRVW3Pcjs.getTokenIcon.call(void 0, targetSymbol);
687
705
  const amountNumber = Number(amount);
688
- const formattedSendAmount = _nullishCoalesce(_chunkEDUWRMQIcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
689
- const prices = _chunkEDUWRMQIcjs.useTokenPrices.call(void 0, service, [sourceSymbol, targetSymbol]);
690
- const receiveDisplay = _nullishCoalesce(_chunkEDUWRMQIcjs.formatReceiveEstimate.call(void 0, {
706
+ const formattedSendAmount = _nullishCoalesce(_chunkPPFG3VBDcjs.formatTokenAmount.call(void 0, amountNumber, sourceSymbol), () => ( amount));
707
+ const prices = _chunkPPFG3VBDcjs.useTokenPrices.call(void 0, service, [sourceSymbol, targetSymbol]);
708
+ const receiveDisplay = _nullishCoalesce(_chunkPPFG3VBDcjs.formatReceiveEstimate.call(void 0, {
691
709
  sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
692
710
  sourceSymbol,
693
711
  targetSymbol,
@@ -701,9 +719,9 @@ function WithdrawReviewStep({
701
719
  await onConfirm();
702
720
  } catch (err) {
703
721
  const raw = err instanceof Error ? err.message : "Withdraw failed";
704
- const message = _chunkEDUWRMQIcjs.formatUserError.call(void 0, raw);
722
+ const message = _chunkPPFG3VBDcjs.formatUserError.call(void 0, raw);
705
723
  setError(message);
706
- _optionalChain([onError, 'optionalCall', _8 => _8(message, "WITHDRAW_REVIEW_ERROR")]);
724
+ _optionalChain([onError, 'optionalCall', _10 => _10(message, "WITHDRAW_REVIEW_ERROR")]);
707
725
  } finally {
708
726
  setIsSubmitting(false);
709
727
  }
@@ -712,9 +730,9 @@ function WithdrawReviewStep({
712
730
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
713
731
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
714
732
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
715
- _chunkEDUWRMQIcjs.BodyHeader,
733
+ _chunkPPFG3VBDcjs.BodyHeader,
716
734
  {
717
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.CircleArrowOutUpLeftIcon, {}),
735
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.CircleArrowOutUpLeftIcon, {}),
718
736
  title: "Review withdrawal"
719
737
  }
720
738
  ),
@@ -760,10 +778,10 @@ function WithdrawReviewStep({
760
778
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: estimatedTime })
761
779
  ] })
762
780
  ] }),
763
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: error }),
764
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.Callout, { variant: "error", children: registrationError }),
781
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.Callout, { variant: "error", children: error }),
782
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.Callout, { variant: "error", children: registrationError }),
765
783
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
766
- _chunkEDUWRMQIcjs.Button,
784
+ _chunkPPFG3VBDcjs.Button,
767
785
  {
768
786
  onClick: handleConfirm,
769
787
  loading: isSubmitting,
@@ -774,7 +792,7 @@ function WithdrawReviewStep({
774
792
  }
775
793
  )
776
794
  ] }),
777
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.PoweredBy, {})
795
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.PoweredBy, {})
778
796
  ] });
779
797
  }
780
798
  WithdrawReviewStep.displayName = "WithdrawReviewStep";
@@ -786,20 +804,20 @@ var ADDR_REGEX = /^0x[a-fA-F0-9]{40}$/;
786
804
  var REGISTRATION_DEBOUNCE_MS = 600;
787
805
  var WITHDRAW_INDEXING_DELAY_MS = 2e3;
788
806
  function resolveSessionOwner(eoaAddress) {
789
- const localOwner = _chunkEDUWRMQIcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
807
+ const localOwner = _chunkPPFG3VBDcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
790
808
  if (localOwner) {
791
809
  return {
792
- account: _chunkEDUWRMQIcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
810
+ account: _chunkPPFG3VBDcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
793
811
  address: localOwner.address
794
812
  };
795
813
  }
796
- const created = _chunkEDUWRMQIcjs.createSessionOwnerKey.call(void 0, );
797
- _chunkEDUWRMQIcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
814
+ const created = _chunkPPFG3VBDcjs.createSessionOwnerKey.call(void 0, );
815
+ _chunkPPFG3VBDcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
798
816
  return { account: created.account, address: created.address };
799
817
  }
800
818
  function targetsEqual(a, b) {
801
819
  if (!a) return false;
802
- return a.chain === b.chain && a.token.toLowerCase() === b.token.toLowerCase() && (_nullishCoalesce(_optionalChain([a, 'access', _9 => _9.recipient, 'optionalAccess', _10 => _10.toLowerCase, 'call', _11 => _11()]), () => ( ""))) === (_nullishCoalesce(_optionalChain([b, 'access', _12 => _12.recipient, 'optionalAccess', _13 => _13.toLowerCase, 'call', _14 => _14()]), () => ( "")));
820
+ return a.chain === b.chain && a.token.toLowerCase() === b.token.toLowerCase() && (_nullishCoalesce(_optionalChain([a, 'access', _11 => _11.recipient, 'optionalAccess', _12 => _12.toLowerCase, 'call', _13 => _13()]), () => ( ""))) === (_nullishCoalesce(_optionalChain([b, 'access', _14 => _14.recipient, 'optionalAccess', _15 => _15.toLowerCase, 'call', _16 => _16()]), () => ( "")));
803
821
  }
804
822
  function WithdrawFlow({
805
823
  dappWalletClient,
@@ -829,10 +847,11 @@ function WithdrawFlow({
829
847
  onError,
830
848
  debug
831
849
  }) {
832
- const onStepChangeRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onStepChange);
833
- const onEventRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onEvent);
834
- const onLifecycleRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onLifecycle);
835
- const onErrorRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onError);
850
+ const rpcUrls = _chunkPPFG3VBDcjs.useRpcUrls.call(void 0, );
851
+ const onStepChangeRef = _chunkPPFG3VBDcjs.useLatestRef.call(void 0, onStepChange);
852
+ const onEventRef = _chunkPPFG3VBDcjs.useLatestRef.call(void 0, onEvent);
853
+ const onLifecycleRef = _chunkPPFG3VBDcjs.useLatestRef.call(void 0, onLifecycle);
854
+ const onErrorRef = _chunkPPFG3VBDcjs.useLatestRef.call(void 0, onError);
836
855
  const isFlowActiveRef = _react.useRef.call(void 0, true);
837
856
  const submitGenerationRef = _react.useRef.call(void 0, 0);
838
857
  _react.useEffect.call(void 0, () => {
@@ -843,13 +862,13 @@ function WithdrawFlow({
843
862
  }, []);
844
863
  const logFlow = _react.useCallback.call(void 0,
845
864
  (message, data) => {
846
- _chunkEDUWRMQIcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
865
+ _chunkPPFG3VBDcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
847
866
  },
848
867
  [debug]
849
868
  );
850
869
  const logFlowError = _react.useCallback.call(void 0,
851
870
  (message, error, data) => {
852
- _chunkEDUWRMQIcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
871
+ _chunkPPFG3VBDcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
853
872
  },
854
873
  [debug]
855
874
  );
@@ -869,15 +888,15 @@ function WithdrawFlow({
869
888
  }, [defaultRecipient]);
870
889
  const hasCustomSigner = Boolean(dappAddress && onSignTransaction);
871
890
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
872
- if (!_optionalChain([dappWalletClient, 'optionalAccess', _15 => _15.switchChain])) return void 0;
891
+ if (!_optionalChain([dappWalletClient, 'optionalAccess', _17 => _17.switchChain])) return void 0;
873
892
  return async (chainId) => {
874
- await _optionalChain([dappWalletClient, 'access', _16 => _16.switchChain, 'optionalCall', _17 => _17({ id: chainId })]);
893
+ await _optionalChain([dappWalletClient, 'access', _18 => _18.switchChain, 'optionalCall', _19 => _19({ id: chainId })]);
875
894
  };
876
895
  }, [dappWalletClient]);
877
896
  const walletOptions = _react.useMemo.call(void 0, () => {
878
897
  const options = [];
879
898
  const seen = /* @__PURE__ */ new Set();
880
- if (_optionalChain([dappWalletClient, 'optionalAccess', _18 => _18.account]) && dappAddress) {
899
+ if (_optionalChain([dappWalletClient, 'optionalAccess', _20 => _20.account]) && dappAddress) {
881
900
  const id = `evm:${dappWalletClient.account.address.toLowerCase()}`;
882
901
  options.push({
883
902
  id,
@@ -887,7 +906,7 @@ function WithdrawFlow({
887
906
  });
888
907
  seen.add(id);
889
908
  }
890
- if (_optionalChain([reownWallet, 'optionalAccess', _19 => _19.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient) {
909
+ if (_optionalChain([reownWallet, 'optionalAccess', _21 => _21.address]) && reownWallet.isConnected && reownWallet.walletClient && reownWallet.publicClient) {
891
910
  const id = `evm:${reownWallet.address.toLowerCase()}`;
892
911
  if (!seen.has(id)) {
893
912
  options.push({
@@ -903,13 +922,13 @@ function WithdrawFlow({
903
922
  }, [
904
923
  dappWalletClient,
905
924
  dappAddress,
906
- _optionalChain([reownWallet, 'optionalAccess', _20 => _20.address]),
907
- _optionalChain([reownWallet, 'optionalAccess', _21 => _21.isConnected]),
908
- _optionalChain([reownWallet, 'optionalAccess', _22 => _22.walletClient]),
909
- _optionalChain([reownWallet, 'optionalAccess', _23 => _23.publicClient]),
910
- _optionalChain([reownWallet, 'optionalAccess', _24 => _24.icon])
925
+ _optionalChain([reownWallet, 'optionalAccess', _22 => _22.address]),
926
+ _optionalChain([reownWallet, 'optionalAccess', _23 => _23.isConnected]),
927
+ _optionalChain([reownWallet, 'optionalAccess', _24 => _24.walletClient]),
928
+ _optionalChain([reownWallet, 'optionalAccess', _25 => _25.publicClient]),
929
+ _optionalChain([reownWallet, 'optionalAccess', _26 => _26.icon])
911
930
  ]);
912
- const canAutoLock = hasCustomSigner || Boolean(_optionalChain([dappWalletClient, 'optionalAccess', _25 => _25.account]) && dappAddress) && !reownWallet;
931
+ const canAutoLock = hasCustomSigner || Boolean(_optionalChain([dappWalletClient, 'optionalAccess', _27 => _27.account]) && dappAddress) && !reownWallet;
913
932
  const storeApi = useWithdrawStoreApi();
914
933
  const selectedWalletId = useWithdrawStore((s) => s.selectedWalletId);
915
934
  const registration = useWithdrawStore((s) => s.registration);
@@ -925,29 +944,29 @@ function WithdrawFlow({
925
944
  return {
926
945
  ownerAddress: dappAddress,
927
946
  walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
928
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain))),
947
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPPFG3VBDcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
929
948
  switchChain: dappSwitchChain
930
949
  };
931
950
  }
932
951
  return {
933
952
  ownerAddress: dappWalletClient.account.address,
934
953
  walletClient: dappWalletClient,
935
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain))),
954
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPPFG3VBDcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
936
955
  switchChain: dappSwitchChain
937
956
  };
938
957
  }
939
958
  if (!isConnectSelectionConfirmed || !selectedWalletId) return null;
940
959
  const selectedOption = walletOptions.find((o) => o.id === selectedWalletId);
941
960
  if (!selectedOption || !selectedOption.address) return null;
942
- if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _26 => _26.account]) && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
961
+ if (selectedOption.kind === "connected" && _optionalChain([dappWalletClient, 'optionalAccess', _28 => _28.account]) && dappWalletClient.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
943
962
  return {
944
963
  ownerAddress: dappWalletClient.account.address,
945
964
  walletClient: dappWalletClient,
946
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain))),
965
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkPPFG3VBDcjs.getPublicClient.call(void 0, sourceChain, rpcUrls))),
947
966
  switchChain: dappSwitchChain
948
967
  };
949
968
  }
950
- if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _27 => _27.address, 'optionalAccess', _28 => _28.toLowerCase, 'call', _29 => _29()]) === selectedOption.address.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
969
+ if (selectedOption.kind === "external" && _optionalChain([reownWallet, 'optionalAccess', _29 => _29.address, 'optionalAccess', _30 => _30.toLowerCase, 'call', _31 => _31()]) === selectedOption.address.toLowerCase() && reownWallet.walletClient && reownWallet.publicClient) {
951
970
  return {
952
971
  ownerAddress: reownWallet.address,
953
972
  walletClient: reownWallet.walletClient,
@@ -967,9 +986,10 @@ function WithdrawFlow({
967
986
  dappSwitchChain,
968
987
  dappAddress,
969
988
  reownWallet,
970
- sourceChain
989
+ sourceChain,
990
+ rpcUrls
971
991
  ]);
972
- const ownerAddress = _optionalChain([signerContext, 'optionalAccess', _30 => _30.ownerAddress]);
992
+ const ownerAddress = _optionalChain([signerContext, 'optionalAccess', _32 => _32.ownerAddress]);
973
993
  const recipientForRegistration = _react.useMemo.call(void 0, () => {
974
994
  if (!recipientInput) return void 0;
975
995
  return ADDR_REGEX.test(recipientInput) ? recipientInput : void 0;
@@ -1025,7 +1045,7 @@ function WithdrawFlow({
1025
1045
  message: typedData.message
1026
1046
  });
1027
1047
  if (cancelled) return;
1028
- const sessionDetails = _chunkEDUWRMQIcjs.buildSessionDetails.call(void 0,
1048
+ const sessionDetails = _chunkPPFG3VBDcjs.buildSessionDetails.call(void 0,
1029
1049
  setup.sessionDetailsUnsigned,
1030
1050
  signature
1031
1051
  );
@@ -1054,7 +1074,7 @@ function WithdrawFlow({
1054
1074
  smartAccount: setup.smartAccount,
1055
1075
  registeredTarget: desiredTarget
1056
1076
  });
1057
- _optionalChain([onLifecycleRef, 'access', _31 => _31.current, 'optionalCall', _32 => _32({
1077
+ _optionalChain([onLifecycleRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34({
1058
1078
  type: "connected",
1059
1079
  address: ownerAddress,
1060
1080
  smartAccount: setup.smartAccount
@@ -1062,7 +1082,7 @@ function WithdrawFlow({
1062
1082
  } catch (err) {
1063
1083
  if (cancelled) return;
1064
1084
  const raw = err instanceof Error ? err.message : "Registration failed";
1065
- const message = _chunkEDUWRMQIcjs.formatUserError.call(void 0, raw);
1085
+ const message = _chunkPPFG3VBDcjs.formatUserError.call(void 0, raw);
1066
1086
  logFlowError("auto-register:failed", err, {
1067
1087
  ownerAddress,
1068
1088
  targetChain,
@@ -1072,7 +1092,7 @@ function WithdrawFlow({
1072
1092
  type: "registration/failed",
1073
1093
  error: message
1074
1094
  });
1075
- _optionalChain([onErrorRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34({ message, code: "WITHDRAW_REGISTER_FAILED" })]);
1095
+ _optionalChain([onErrorRef, 'access', _35 => _35.current, 'optionalCall', _36 => _36({ message, code: "WITHDRAW_REGISTER_FAILED" })]);
1076
1096
  }
1077
1097
  }, REGISTRATION_DEBOUNCE_MS);
1078
1098
  return () => {
@@ -1098,7 +1118,7 @@ function WithdrawFlow({
1098
1118
  const symbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
1099
1119
  const decimals = _chunkABVRVW3Pcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1100
1120
  return {
1101
- id: _chunkEDUWRMQIcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1121
+ id: _chunkPPFG3VBDcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1102
1122
  chainId: sourceChain,
1103
1123
  token: sourceToken,
1104
1124
  symbol,
@@ -1119,7 +1139,7 @@ function WithdrawFlow({
1119
1139
  storeApi.dispatch({ type: "review/back" });
1120
1140
  }, [storeApi]);
1121
1141
  _react.useEffect.call(void 0, () => {
1122
- _optionalChain([onStepChangeRef, 'access', _35 => _35.current, 'optionalCall', _36 => _36(
1142
+ _optionalChain([onStepChangeRef, 'access', _37 => _37.current, 'optionalCall', _38 => _38(
1123
1143
  flowStep === "review" ? reviewBackHandler : void 0
1124
1144
  )]);
1125
1145
  }, [flowStep, reviewBackHandler, onStepChangeRef]);
@@ -1133,7 +1153,7 @@ function WithdrawFlow({
1133
1153
  lastStepOpenEventKeyRef.current = "form";
1134
1154
  const tokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1135
1155
  const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
1136
- _optionalChain([onEventRef, 'access', _37 => _37.current, 'optionalCall', _38 => _38({
1156
+ _optionalChain([onEventRef, 'access', _39 => _39.current, 'optionalCall', _40 => _40({
1137
1157
  type: "withdraw_modal_select_amount_open",
1138
1158
  pred_balance: totalBalanceUsd,
1139
1159
  default_token: tokenSymbol,
@@ -1163,7 +1183,7 @@ function WithdrawFlow({
1163
1183
  const handleError = _react.useCallback.call(void 0,
1164
1184
  (message, code) => {
1165
1185
  logFlowError("flow:error", message, { code });
1166
- _optionalChain([onErrorRef, 'access', _39 => _39.current, 'optionalCall', _40 => _40({ message, code })]);
1186
+ _optionalChain([onErrorRef, 'access', _41 => _41.current, 'optionalCall', _42 => _42({ message, code })]);
1167
1187
  },
1168
1188
  [logFlowError, onErrorRef]
1169
1189
  );
@@ -1171,7 +1191,7 @@ function WithdrawFlow({
1171
1191
  (recipient, amountValue) => {
1172
1192
  const tokenSymbol = _chunkABVRVW3Pcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1173
1193
  const chainName = _chunkABVRVW3Pcjs.getChainName.call(void 0, targetChain);
1174
- _optionalChain([onEventRef, 'access', _41 => _41.current, 'optionalCall', _42 => _42({
1194
+ _optionalChain([onEventRef, 'access', _43 => _43.current, 'optionalCall', _44 => _44({
1175
1195
  type: "withdraw_modal_select_amount_cta_click",
1176
1196
  pred_balance: totalBalanceUsd,
1177
1197
  selected_token: tokenSymbol,
@@ -1209,7 +1229,13 @@ function WithdrawFlow({
1209
1229
  throw new Error("Withdrawal target is still being prepared");
1210
1230
  }
1211
1231
  const smartAccount = matchingRegistration.smartAccount;
1212
- if (!onSignTransaction && !_optionalChain([signerContext, 'optionalAccess', _43 => _43.walletClient])) {
1232
+ const lowerRecipient = recipient.toLowerCase();
1233
+ if (lowerRecipient === safeAddress.toLowerCase() || lowerRecipient === smartAccount.toLowerCase()) {
1234
+ throw new Error(
1235
+ "Recipient can't be your own account. Send to a different wallet."
1236
+ );
1237
+ }
1238
+ if (!onSignTransaction && !_optionalChain([signerContext, 'optionalAccess', _45 => _45.walletClient])) {
1213
1239
  throw new Error("Wallet not connected");
1214
1240
  }
1215
1241
  const submitGeneration = submitGenerationRef.current += 1;
@@ -1232,7 +1258,7 @@ function WithdrawFlow({
1232
1258
  targetToken
1233
1259
  });
1234
1260
  const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
1235
- const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain)));
1261
+ const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _46 => _46.publicClient]), () => ( _chunkPPFG3VBDcjs.getPublicClient.call(void 0, sourceChain, rpcUrls)));
1236
1262
  let result;
1237
1263
  if (onSignTransaction) {
1238
1264
  const transferTarget = isSameRoute ? recipient : smartAccount;
@@ -1304,7 +1330,7 @@ function WithdrawFlow({
1304
1330
  sourceChain,
1305
1331
  sourceToken
1306
1332
  });
1307
- _optionalChain([onLifecycleRef, 'access', _45 => _45.current, 'optionalCall', _46 => _46({
1333
+ _optionalChain([onLifecycleRef, 'access', _47 => _47.current, 'optionalCall', _48 => _48({
1308
1334
  type: "submitted",
1309
1335
  txHash: result.txHash,
1310
1336
  sourceChain,
@@ -1320,7 +1346,7 @@ function WithdrawFlow({
1320
1346
  targetChain,
1321
1347
  targetToken
1322
1348
  });
1323
- handleError(_chunkEDUWRMQIcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1349
+ handleError(_chunkPPFG3VBDcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1324
1350
  throw err;
1325
1351
  }
1326
1352
  },
@@ -1340,13 +1366,14 @@ function WithdrawFlow({
1340
1366
  logFlow,
1341
1367
  logFlowError,
1342
1368
  onLifecycleRef,
1343
- storeApi
1369
+ storeApi,
1370
+ rpcUrls
1344
1371
  ]
1345
1372
  );
1346
1373
  const handleWithdrawComplete = _react.useCallback.call(void 0,
1347
1374
  (txHash, destinationTxHash, context) => {
1348
1375
  logFlow("withdraw:complete", { txHash, destinationTxHash, ...context });
1349
- _optionalChain([onLifecycleRef, 'access', _47 => _47.current, 'optionalCall', _48 => _48({
1376
+ _optionalChain([onLifecycleRef, 'access', _49 => _49.current, 'optionalCall', _50 => _50({
1350
1377
  type: "complete",
1351
1378
  txHash,
1352
1379
  destinationTxHash,
@@ -1367,7 +1394,7 @@ function WithdrawFlow({
1367
1394
  const handleWithdrawFailed = _react.useCallback.call(void 0,
1368
1395
  (txHash, error) => {
1369
1396
  logFlowError("withdraw:failed", error, { txHash });
1370
- _optionalChain([onLifecycleRef, 'access', _49 => _49.current, 'optionalCall', _50 => _50({
1397
+ _optionalChain([onLifecycleRef, 'access', _51 => _51.current, 'optionalCall', _52 => _52({
1371
1398
  type: "failed",
1372
1399
  txHash,
1373
1400
  error
@@ -1377,12 +1404,12 @@ function WithdrawFlow({
1377
1404
  [logFlowError, onLifecycleRef, storeApi]
1378
1405
  );
1379
1406
  const allowedChainSet = _react.useMemo.call(void 0,
1380
- () => _optionalChain([allowedRoutes, 'optionalAccess', _51 => _51.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
1381
- [_optionalChain([allowedRoutes, 'optionalAccess', _52 => _52.sourceChains])]
1407
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _53 => _53.sourceChains]) ? new Set(allowedRoutes.sourceChains) : null,
1408
+ [_optionalChain([allowedRoutes, 'optionalAccess', _54 => _54.sourceChains])]
1382
1409
  );
1383
1410
  const allowedTokenSet = _react.useMemo.call(void 0,
1384
- () => _optionalChain([allowedRoutes, 'optionalAccess', _53 => _53.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
1385
- [_optionalChain([allowedRoutes, 'optionalAccess', _54 => _54.sourceTokens])]
1411
+ () => _optionalChain([allowedRoutes, 'optionalAccess', _55 => _55.sourceTokens]) ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
1412
+ [_optionalChain([allowedRoutes, 'optionalAccess', _56 => _56.sourceTokens])]
1386
1413
  );
1387
1414
  const targetChainOptions = _react.useMemo.call(void 0, () => {
1388
1415
  return _chunkABVRVW3Pcjs.SOURCE_CHAINS.filter((chain) => {
@@ -1445,10 +1472,10 @@ function WithdrawFlow({
1445
1472
  const selectedWalletIcon = _react.useMemo.call(void 0, () => {
1446
1473
  if (!ownerAddress) return void 0;
1447
1474
  const selected = walletOptions.find(
1448
- (o) => _optionalChain([o, 'access', _55 => _55.address, 'optionalAccess', _56 => _56.toLowerCase, 'call', _57 => _57()]) === ownerAddress.toLowerCase()
1475
+ (o) => _optionalChain([o, 'access', _57 => _57.address, 'optionalAccess', _58 => _58.toLowerCase, 'call', _59 => _59()]) === ownerAddress.toLowerCase()
1449
1476
  );
1450
- return _optionalChain([selected, 'optionalAccess', _58 => _58.kind]) === "external" ? _nullishCoalesce(selected.icon, () => ( _optionalChain([reownWallet, 'optionalAccess', _59 => _59.icon]))) : void 0;
1451
- }, [walletOptions, ownerAddress, _optionalChain([reownWallet, 'optionalAccess', _60 => _60.icon])]);
1477
+ return _optionalChain([selected, 'optionalAccess', _60 => _60.kind]) === "external" ? _nullishCoalesce(selected.icon, () => ( _optionalChain([reownWallet, 'optionalAccess', _61 => _61.icon]))) : void 0;
1478
+ }, [walletOptions, ownerAddress, _optionalChain([reownWallet, 'optionalAccess', _62 => _62.icon])]);
1452
1479
  if (showConnectStep) {
1453
1480
  const withdrawRows = walletOptions.map((option) => ({
1454
1481
  id: option.id,
@@ -1459,7 +1486,7 @@ function WithdrawFlow({
1459
1486
  state: "ready"
1460
1487
  }));
1461
1488
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1462
- _chunkEDUWRMQIcjs.ConnectStep,
1489
+ _chunkPPFG3VBDcjs.ConnectStep,
1463
1490
  {
1464
1491
  walletRows: withdrawRows,
1465
1492
  onConfirmWallet: (walletId) => {
@@ -1476,8 +1503,9 @@ function WithdrawFlow({
1476
1503
  }
1477
1504
  if (!signerContext) return null;
1478
1505
  if (!onSignTransaction && !signerContext.walletClient) return null;
1479
- const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _61 => _61.kind]) === "external" ? selectedWalletOption.address : void 0;
1480
- const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkEDUWRMQIcjs.getPublicClient.call(void 0, sourceChain)));
1506
+ const resolvedConnectedRecipient = _optionalChain([selectedWalletOption, 'optionalAccess', _63 => _63.kind]) === "external" ? selectedWalletOption.address : void 0;
1507
+ const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkPPFG3VBDcjs.getPublicClient.call(void 0, sourceChain, rpcUrls)));
1508
+ const depositAddress = registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : void 0;
1481
1509
  const stepView = deriveStepView(flowStep, registration);
1482
1510
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
1483
1511
  stepView === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1487,6 +1515,7 @@ function WithdrawFlow({
1487
1515
  publicClient: formPublicClient,
1488
1516
  connectedRecipient: resolvedConnectedRecipient,
1489
1517
  safeAddress,
1518
+ depositAddress,
1490
1519
  asset,
1491
1520
  defaultRecipient,
1492
1521
  defaultAmount,
@@ -1522,7 +1551,7 @@ function WithdrawFlow({
1522
1551
  }
1523
1552
  ),
1524
1553
  stepView === "processing" && registration.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1525
- _chunkEDUWRMQIcjs.ProcessingStep,
1554
+ _chunkPPFG3VBDcjs.ProcessingStep,
1526
1555
  {
1527
1556
  smartAccount: registration.kind === "ready" || registration.kind === "stale" ? registration.smartAccount : "0x0",
1528
1557
  txHash: _nullishCoalesce(storeApi.getState().txHash, () => ( "0x0")),
@@ -1564,7 +1593,7 @@ function deriveStepView(step, _registration) {
1564
1593
  // src/WithdrawModal.tsx
1565
1594
 
1566
1595
  var ReownWithdrawInner = _react.lazy.call(void 0,
1567
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-AZ27OBAV.cjs"))).then((m) => ({
1596
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-LIP6FHCB.cjs"))).then((m) => ({
1568
1597
  default: m.WithdrawModalReown
1569
1598
  }))
1570
1599
  );
@@ -1593,6 +1622,7 @@ function WithdrawModalInner({
1593
1622
  closeOnOverlayClick,
1594
1623
  allowedRoutes,
1595
1624
  backendUrl = _chunkABVRVW3Pcjs.DEFAULT_BACKEND_URL,
1625
+ rpcUrls,
1596
1626
  signerAddress = _chunkABVRVW3Pcjs.DEFAULT_SIGNER_ADDRESS,
1597
1627
  sessionChainIds,
1598
1628
  forceRegister = false,
@@ -1611,21 +1641,21 @@ function WithdrawModalInner({
1611
1641
  debug
1612
1642
  }) {
1613
1643
  const modalRef = _react.useRef.call(void 0, null);
1614
- const onReadyRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onReady);
1644
+ const onReadyRef = _chunkPPFG3VBDcjs.useLatestRef.call(void 0, onReady);
1615
1645
  const [backHandler, setBackHandler] = _react.useState.call(void 0,
1616
1646
  void 0
1617
1647
  );
1618
1648
  const targetChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, targetChainProp);
1619
1649
  const sourceChain = _chunkABVRVW3Pcjs.getChainId.call(void 0, sourceChainProp);
1620
1650
  const service = _react.useMemo.call(void 0,
1621
- () => _chunkEDUWRMQIcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1651
+ () => _chunkPPFG3VBDcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1622
1652
  [backendUrl, debug]
1623
1653
  );
1624
1654
  const store = _react.useMemo.call(void 0, () => createWithdrawStore(), []);
1625
- const onErrorRef = _chunkEDUWRMQIcjs.useLatestRef.call(void 0, onError);
1655
+ const onErrorRef = _chunkPPFG3VBDcjs.useLatestRef.call(void 0, onError);
1626
1656
  _react.useEffect.call(void 0, () => {
1627
1657
  if (isOpen && onSignTransaction && !dappAddress) {
1628
- _optionalChain([onErrorRef, 'access', _62 => _62.current, 'optionalCall', _63 => _63({
1658
+ _optionalChain([onErrorRef, 'access', _64 => _64.current, 'optionalCall', _65 => _65({
1629
1659
  message: "WithdrawModal requires `dappAddress` when `onSignTransaction` is provided.",
1630
1660
  code: "WITHDRAW_MISSING_DAPP_ADDRESS"
1631
1661
  })]);
@@ -1633,12 +1663,12 @@ function WithdrawModalInner({
1633
1663
  }, [isOpen, onSignTransaction, dappAddress, onErrorRef]);
1634
1664
  _react.useEffect.call(void 0, () => {
1635
1665
  if (isOpen && modalRef.current) {
1636
- _chunkEDUWRMQIcjs.applyTheme.call(void 0, modalRef.current, theme);
1666
+ _chunkPPFG3VBDcjs.applyTheme.call(void 0, modalRef.current, theme);
1637
1667
  }
1638
1668
  }, [isOpen, theme]);
1639
1669
  _react.useEffect.call(void 0, () => {
1640
1670
  if (isOpen) {
1641
- _optionalChain([onReadyRef, 'access', _64 => _64.current, 'optionalCall', _65 => _65()]);
1671
+ _optionalChain([onReadyRef, 'access', _66 => _66.current, 'optionalCall', _67 => _67()]);
1642
1672
  }
1643
1673
  }, [isOpen, onReadyRef]);
1644
1674
  _react.useEffect.call(void 0, () => {
@@ -1649,10 +1679,10 @@ function WithdrawModalInner({
1649
1679
  const handleStepChange = _react.useCallback.call(void 0, (onBack) => {
1650
1680
  setBackHandler(() => onBack);
1651
1681
  }, []);
1652
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _66 => _66.showBackButton]), () => ( true));
1682
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _68 => _68.showBackButton]), () => ( true));
1653
1683
  const canGoBack = backHandler !== void 0;
1654
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1655
- _chunkEDUWRMQIcjs.Modal,
1684
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1685
+ _chunkPPFG3VBDcjs.Modal,
1656
1686
  {
1657
1687
  isOpen,
1658
1688
  onClose,
@@ -1668,7 +1698,7 @@ function WithdrawModalInner({
1668
1698
  className: "rs-modal-header-back",
1669
1699
  "aria-label": "Go back",
1670
1700
  onClick: backHandler,
1671
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.ChevronLeftIcon, {})
1701
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.ChevronLeftIcon, {})
1672
1702
  }
1673
1703
  ) }),
1674
1704
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1678,7 +1708,7 @@ function WithdrawModalInner({
1678
1708
  onClick: onClose,
1679
1709
  className: "rs-modal-close",
1680
1710
  "aria-label": "Close",
1681
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEDUWRMQIcjs.CloseIcon, {})
1711
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPPFG3VBDcjs.CloseIcon, {})
1682
1712
  }
1683
1713
  ) })
1684
1714
  ] }),
@@ -1715,7 +1745,7 @@ function WithdrawModalInner({
1715
1745
  )
1716
1746
  ] })
1717
1747
  }
1718
- ) });
1748
+ ) }) });
1719
1749
  }
1720
1750
 
1721
1751