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

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.
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  DepositModalInner
3
- } from "./chunk-H7QMSMM5.mjs";
3
+ } from "./chunk-4BUMVXPS.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
- } from "./chunk-E46WOBZQ.mjs";
8
- import "./chunk-5ZS4ZJPW.mjs";
7
+ } from "./chunk-OISMGA2L.mjs";
8
+ import "./chunk-TJG2AFPS.mjs";
9
9
  import "./chunk-SZIYS42B.mjs";
10
10
 
11
11
  // src/DepositModalReown.tsx
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkGBFOGYMHcjs = require('./chunk-GBFOGYMH.cjs');
3
+ var _chunkZVG4JDKZcjs = require('./chunk-ZVG4JDKZ.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkPKD7W5JGcjs = require('./chunk-PKD7W5JG.cjs');
8
- require('./chunk-UELVNPGE.cjs');
7
+ var _chunkKIPKYPNFcjs = require('./chunk-KIPKYPNF.cjs');
8
+ require('./chunk-MMXUBBGK.cjs');
9
9
  require('./chunk-7JIDIX27.cjs');
10
10
 
11
11
  // src/DepositModalReown.tsx
@@ -14,7 +14,7 @@ var _react3 = require('@reown/appkit/react');
14
14
  var _react5 = require('@reown/appkit-adapter-solana/react');
15
15
  var _jsxruntime = require('react/jsx-runtime');
16
16
  function DepositModalWithReown(props) {
17
- const reown = _chunkPKD7W5JGcjs.useReownWallet.call(void 0, );
17
+ const reown = _chunkKIPKYPNFcjs.useReownWallet.call(void 0, );
18
18
  const enableSolana = _nullishCoalesce(props.enableSolana, () => ( true));
19
19
  const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
20
20
  enableSolana ? "solana" : "eip155"
@@ -35,7 +35,7 @@ function DepositModalWithReown(props) {
35
35
  reown.disconnect();
36
36
  }, [reown.disconnect]);
37
37
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
38
- _chunkGBFOGYMHcjs.DepositModalInner,
38
+ _chunkZVG4JDKZcjs.DepositModalInner,
39
39
  {
40
40
  ...props,
41
41
  reownWallet: reownWithSolana,
@@ -46,7 +46,7 @@ function DepositModalWithReown(props) {
46
46
  }
47
47
  function DepositModalReown(props) {
48
48
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
49
- _chunkPKD7W5JGcjs.ReownWalletProvider,
49
+ _chunkKIPKYPNFcjs.ReownWalletProvider,
50
50
  {
51
51
  projectId: props.reownAppId,
52
52
  theme: props.theme,
@@ -38,7 +38,7 @@ function QRCode({ value, size = 200, iconSrc, className }) {
38
38
  value,
39
39
  size,
40
40
  qrStyle: "dots",
41
- eyeRadius: [10, 10, 10],
41
+ eyeRadius: 50,
42
42
  ecLevel: "H",
43
43
  logoImage: iconSrc,
44
44
  logoWidth: size * 0.22,
@@ -38,7 +38,7 @@ function QRCode({ value, size = 200, iconSrc, className }) {
38
38
  value,
39
39
  size,
40
40
  qrStyle: "dots",
41
- eyeRadius: [10, 10, 10],
41
+ eyeRadius: 50,
42
42
  ecLevel: "H",
43
43
  logoImage: iconSrc,
44
44
  logoWidth: size * 0.22,
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkU3OLJZBTcjs = require('./chunk-U3OLJZBT.cjs');
3
+ var _chunkG5Q4QBWXcjs = require('./chunk-G5Q4QBWX.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkPKD7W5JGcjs = require('./chunk-PKD7W5JG.cjs');
8
- require('./chunk-UELVNPGE.cjs');
7
+ var _chunkKIPKYPNFcjs = require('./chunk-KIPKYPNF.cjs');
8
+ require('./chunk-MMXUBBGK.cjs');
9
9
  require('./chunk-7JIDIX27.cjs');
10
10
 
11
11
  // src/WithdrawModalReown.tsx
12
12
  var _react = require('react');
13
13
  var _jsxruntime = require('react/jsx-runtime');
14
14
  function WithdrawModalWithReown(props) {
15
- const reown = _chunkPKD7W5JGcjs.useReownWallet.call(void 0, );
15
+ const reown = _chunkKIPKYPNFcjs.useReownWallet.call(void 0, );
16
16
  const handleConnect = _react.useCallback.call(void 0, () => {
17
17
  reown.openConnect();
18
18
  }, [reown.openConnect]);
@@ -20,7 +20,7 @@ function WithdrawModalWithReown(props) {
20
20
  reown.disconnect();
21
21
  }, [reown.disconnect]);
22
22
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
23
- _chunkU3OLJZBTcjs.WithdrawModalInner,
23
+ _chunkG5Q4QBWXcjs.WithdrawModalInner,
24
24
  {
25
25
  ...props,
26
26
  reownWallet: reown,
@@ -30,7 +30,7 @@ function WithdrawModalWithReown(props) {
30
30
  );
31
31
  }
32
32
  function WithdrawModalReown(props) {
33
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkPKD7W5JGcjs.ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawModalWithReown, { ...props }) });
33
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKIPKYPNFcjs.ReownWalletProvider, { projectId: props.reownAppId, theme: props.theme, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawModalWithReown, { ...props }) });
34
34
  }
35
35
 
36
36
 
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WithdrawModalInner
3
- } from "./chunk-DW276H63.mjs";
3
+ } from "./chunk-KE4MRCFN.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
- } from "./chunk-E46WOBZQ.mjs";
8
- import "./chunk-5ZS4ZJPW.mjs";
7
+ } from "./chunk-OISMGA2L.mjs";
8
+ import "./chunk-TJG2AFPS.mjs";
9
9
  import "./chunk-SZIYS42B.mjs";
10
10
 
11
11
  // src/WithdrawModalReown.tsx
@@ -47,7 +47,7 @@ import {
47
47
  tokenFormatter,
48
48
  txRefsMatch,
49
49
  useLatestRef
50
- } from "./chunk-5ZS4ZJPW.mjs";
50
+ } from "./chunk-TJG2AFPS.mjs";
51
51
  import {
52
52
  DEFAULT_BACKEND_URL,
53
53
  DEFAULT_SIGNER_ADDRESS,
@@ -1316,7 +1316,7 @@ function DepositNotification({
1316
1316
  // src/components/steps/DepositAddressStep.tsx
1317
1317
  import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1318
1318
  var QRCode = lazy(
1319
- () => import("./QRCode-YMQTKSSK.mjs").then((m) => ({ default: m.QRCode }))
1319
+ () => import("./QRCode-YJ3EGWQS.mjs").then((m) => ({ default: m.QRCode }))
1320
1320
  );
1321
1321
  var POLL_INTERVAL_MS = 4e3;
1322
1322
  function isRecord(value) {
@@ -4925,13 +4925,16 @@ function DepositFlow({
4925
4925
  );
4926
4926
  const connectStepDappImports = useMemo6(
4927
4927
  () => enabledDappImportProviders.map((provider) => {
4928
- const availabilityEntry = dappImportOwner && dappImportAvailabilityOwner?.toLowerCase() === dappImportOwner.toLowerCase() ? dappImportAvailability[provider.id] : void 0;
4929
- const dappImportSetup = readSetupForOwner(setupSlice, dappImportOwner);
4930
4928
  const baseRow = {
4931
4929
  id: provider.id,
4932
4930
  label: provider.label,
4933
4931
  icon: provider.icon
4934
4932
  };
4933
+ if (!dappImportOwner) {
4934
+ return { ...baseRow, status: "needs-connect" };
4935
+ }
4936
+ const availabilityEntry = dappImportAvailabilityOwner?.toLowerCase() === dappImportOwner.toLowerCase() ? dappImportAvailability[provider.id] : void 0;
4937
+ const dappImportSetup = readSetupForOwner(setupSlice, dappImportOwner);
4935
4938
  if (availabilityEntry === "loading" || availabilityEntry === void 0) {
4936
4939
  return { ...baseRow, status: "loading" };
4937
4940
  }
@@ -6040,7 +6043,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
6040
6043
  // src/DepositModal.tsx
6041
6044
  import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
6042
6045
  var ReownDepositInner = lazy2(
6043
- () => import("./DepositModalReown-TYHATVOM.mjs").then((m) => ({ default: m.DepositModalReown }))
6046
+ () => import("./DepositModalReown-I7I3KLD2.mjs").then((m) => ({ default: m.DepositModalReown }))
6044
6047
  );
6045
6048
  function sortByCreatedAtDesc(items) {
6046
6049
  return [...items].sort((a, b) => {
@@ -31,7 +31,7 @@
31
31
 
32
32
 
33
33
 
34
- var _chunkUELVNPGEcjs = require('./chunk-UELVNPGE.cjs');
34
+ var _chunkMMXUBBGKcjs = require('./chunk-MMXUBBGK.cjs');
35
35
 
36
36
 
37
37
 
@@ -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(_chunkUELVNPGEcjs.formatUserError.call(void 0, raw));
258
+ setError(_chunkMMXUBBGKcjs.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 = _chunkUELVNPGEcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
278
+ const bal = _chunkMMXUBBGKcjs.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(_chunkUELVNPGEcjs.formatUserError.call(void 0, raw));
382
+ setError(_chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.Spinner, { className: "rs-spinner--lg" }),
390
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.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
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, _chunkUELVNPGEcjs.PoweredBy, {})
394
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.CircleArrowOutUpLeftIcon, {}), title: "Withdraw" }),
399
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.WalletIcon, { className: "rs-withdraw-use-connected-icon" }),
437
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.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 ? _chunkUELVNPGEcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
476
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkMMXUBBGKcjs.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,
@@ -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
- _chunkUELVNPGEcjs.ChevronDownIcon,
516
+ _chunkMMXUBBGKcjs.ChevronDownIcon,
517
517
  {
518
518
  className: "rs-withdraw-dropdown-arrow",
519
519
  style: {
@@ -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
- _chunkUELVNPGEcjs.ChevronDownIcon,
584
+ _chunkMMXUBBGKcjs.ChevronDownIcon,
585
585
  {
586
586
  className: "rs-withdraw-dropdown-arrow",
587
587
  style: {
@@ -621,10 +621,10 @@ function WithdrawFormStep({
621
621
  ] })
622
622
  ] }),
623
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 }),
624
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.Callout, { variant: "error", children: error }),
625
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.Callout, { variant: "error", children: registrationError }),
626
626
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
627
- _chunkUELVNPGEcjs.Button,
627
+ _chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.PoweredBy, {})
637
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.PoweredBy, {})
638
638
  ] });
639
639
  }
640
640
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -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 = _chunkUELVNPGEcjs.formatUserError.call(void 0, raw);
677
+ const message = _chunkMMXUBBGKcjs.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
- _chunkUELVNPGEcjs.BodyHeader,
688
+ _chunkMMXUBBGKcjs.BodyHeader,
689
689
  {
690
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.CircleArrowOutUpLeftIcon, {}),
690
+ icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.Callout, { variant: "error", children: error }),
741
- !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkUELVNPGEcjs.Callout, { variant: "error", children: registrationError }),
740
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.Callout, { variant: "error", children: error }),
741
+ !error && registrationError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.Callout, { variant: "error", children: registrationError }),
742
742
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
743
- _chunkUELVNPGEcjs.Button,
743
+ _chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.PoweredBy, {})
754
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.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 = _chunkUELVNPGEcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
765
+ const localOwner = _chunkMMXUBBGKcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
766
766
  if (localOwner) {
767
767
  return {
768
- account: _chunkUELVNPGEcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
768
+ account: _chunkMMXUBBGKcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
769
769
  address: localOwner.address
770
770
  };
771
771
  }
772
- const created = _chunkUELVNPGEcjs.createSessionOwnerKey.call(void 0, );
773
- _chunkUELVNPGEcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
772
+ const created = _chunkMMXUBBGKcjs.createSessionOwnerKey.call(void 0, );
773
+ _chunkMMXUBBGKcjs.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) {
@@ -806,19 +806,19 @@ function WithdrawFlow({
806
806
  onError,
807
807
  debug
808
808
  }) {
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);
809
+ const onStepChangeRef = _chunkMMXUBBGKcjs.useLatestRef.call(void 0, onStepChange);
810
+ const onEventRef = _chunkMMXUBBGKcjs.useLatestRef.call(void 0, onEvent);
811
+ const onLifecycleRef = _chunkMMXUBBGKcjs.useLatestRef.call(void 0, onLifecycle);
812
+ const onErrorRef = _chunkMMXUBBGKcjs.useLatestRef.call(void 0, onError);
813
813
  const logFlow = _react.useCallback.call(void 0,
814
814
  (message, data) => {
815
- _chunkUELVNPGEcjs.debugLog.call(void 0, debug, "withdraw-flow", message, data);
815
+ _chunkMMXUBBGKcjs.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
- _chunkUELVNPGEcjs.debugError.call(void 0, debug, "withdraw-flow", message, error, data);
821
+ _chunkMMXUBBGKcjs.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, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain))),
896
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkMMXUBBGKcjs.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, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain))),
903
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkMMXUBBGKcjs.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, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain))),
914
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkMMXUBBGKcjs.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: _chunkUELVNPGEcjs.toEvmCaip2.call(void 0, targetChain),
971
+ targetChain: _chunkMMXUBBGKcjs.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 = _chunkUELVNPGEcjs.buildSessionDetails.call(void 0,
996
+ const sessionDetails = _chunkMMXUBBGKcjs.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: _chunkUELVNPGEcjs.toEvmCaip2.call(void 0, targetChain),
1010
+ chain: _chunkMMXUBBGKcjs.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 = _chunkUELVNPGEcjs.formatUserError.call(void 0, raw);
1033
+ const message = _chunkMMXUBBGKcjs.formatUserError.call(void 0, raw);
1034
1034
  logFlowError("auto-register:failed", err, {
1035
1035
  ownerAddress,
1036
1036
  targetChain,
@@ -1066,7 +1066,7 @@ function WithdrawFlow({
1066
1066
  const symbol = _chunk7JIDIX27cjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
1067
1067
  const decimals = _chunk7JIDIX27cjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1068
1068
  return {
1069
- id: _chunkUELVNPGEcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1069
+ id: _chunkMMXUBBGKcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
1070
1070
  chainId: sourceChain,
1071
1071
  token: sourceToken,
1072
1072
  symbol,
@@ -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]), () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain)));
1177
+ const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _44 => _44.publicClient]), () => ( _chunkMMXUBBGKcjs.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 _chunkUELVNPGEcjs.buildSafeTransaction.call(void 0, {
1190
+ const request = await _chunkMMXUBBGKcjs.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: _chunkUELVNPGEcjs.toEvmCaip2.call(void 0, sourceChain),
1201
+ chainId: _chunkMMXUBBGKcjs.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 _chunkUELVNPGEcjs.executeSafeEthTransfer.call(void 0, {
1211
+ result = await _chunkMMXUBBGKcjs.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 _chunkUELVNPGEcjs.executeSafeErc20Transfer.call(void 0, {
1220
+ result = await _chunkMMXUBBGKcjs.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(_chunkUELVNPGEcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1253
+ handleError(_chunkMMXUBBGKcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1254
1254
  throw err;
1255
1255
  }
1256
1256
  },
@@ -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
- _chunkUELVNPGEcjs.ConnectStep,
1392
+ _chunkMMXUBBGKcjs.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, () => ( _chunkUELVNPGEcjs.getPublicClient.call(void 0, sourceChain)));
1410
+ const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkMMXUBBGKcjs.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
- _chunkUELVNPGEcjs.ProcessingStep,
1454
+ _chunkMMXUBBGKcjs.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-FCWED55P.cjs"))).then((m) => ({
1488
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-JATYMQYP.cjs"))).then((m) => ({
1489
1489
  default: m.WithdrawModalReown
1490
1490
  }))
1491
1491
  );
@@ -1533,18 +1533,18 @@ function WithdrawModalInner({
1533
1533
  debug
1534
1534
  }) {
1535
1535
  const modalRef = _react.useRef.call(void 0, null);
1536
- const onReadyRef = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onReady);
1536
+ const onReadyRef = _chunkMMXUBBGKcjs.useLatestRef.call(void 0, onReady);
1537
1537
  const [backHandler, setBackHandler] = _react.useState.call(void 0,
1538
1538
  void 0
1539
1539
  );
1540
1540
  const targetChain = _chunk7JIDIX27cjs.getChainId.call(void 0, targetChainProp);
1541
1541
  const sourceChain = _chunk7JIDIX27cjs.getChainId.call(void 0, sourceChainProp);
1542
1542
  const service = _react.useMemo.call(void 0,
1543
- () => _chunkUELVNPGEcjs.createDepositService.call(void 0, backendUrl, { debug, debugScope: "service:withdraw" }),
1543
+ () => _chunkMMXUBBGKcjs.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 = _chunkUELVNPGEcjs.useLatestRef.call(void 0, onError);
1547
+ const onErrorRef = _chunkMMXUBBGKcjs.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
- _chunkUELVNPGEcjs.applyTheme.call(void 0, modalRef.current, theme);
1558
+ _chunkMMXUBBGKcjs.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
- _chunkUELVNPGEcjs.Modal,
1577
+ _chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.ChevronLeftIcon, {})
1593
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.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, _chunkUELVNPGEcjs.CloseIcon, {})
1603
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMXUBBGKcjs.CloseIcon, {})
1604
1604
  }
1605
1605
  ) })
1606
1606
  ] }),
@@ -31,7 +31,7 @@ import {
31
31
  saveSessionOwnerToStorage,
32
32
  toEvmCaip2,
33
33
  useLatestRef
34
- } from "./chunk-5ZS4ZJPW.mjs";
34
+ } from "./chunk-TJG2AFPS.mjs";
35
35
  import {
36
36
  DEFAULT_BACKEND_URL,
37
37
  DEFAULT_SIGNER_ADDRESS,
@@ -1485,7 +1485,7 @@ function deriveStepView(step, _registration) {
1485
1485
  // src/WithdrawModal.tsx
1486
1486
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1487
1487
  var ReownWithdrawInner = lazy(
1488
- () => import("./WithdrawModalReown-H7HA3JP3.mjs").then((m) => ({
1488
+ () => import("./WithdrawModalReown-KN2DGOXR.mjs").then((m) => ({
1489
1489
  default: m.WithdrawModalReown
1490
1490
  }))
1491
1491
  );
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkUELVNPGEcjs = require('./chunk-UELVNPGE.cjs');
3
+ var _chunkMMXUBBGKcjs = require('./chunk-MMXUBBGK.cjs');
4
4
 
5
5
 
6
6
 
@@ -154,7 +154,7 @@ function useReownWallet() {
154
154
  await switchChainAsync({ chainId });
155
155
  }
156
156
  } catch (err) {
157
- if (_chunkUELVNPGEcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
157
+ if (_chunkMMXUBBGKcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
158
158
  throw new Error(
159
159
  `Switch to ${_chunk7JIDIX27cjs.getChainName.call(void 0, chainId)} in your wallet to continue`
160
160
  );