@rhinestone/deposit-modal 0.1.25 → 0.1.27

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
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkVBNFP3JFcjs = require('./chunk-VBNFP3JF.cjs');
3
+ var _chunk7MQU2SR7cjs = require('./chunk-7MQU2SR7.cjs');
4
4
 
5
5
 
6
6
 
7
7
  var _chunk6VJ2ZTNQcjs = require('./chunk-6VJ2ZTNQ.cjs');
8
- require('./chunk-CZWAKYDR.cjs');
8
+ require('./chunk-QWYZJL3L.cjs');
9
9
  require('./chunk-CEIWN53N.cjs');
10
10
 
11
11
  // src/DepositModalReown.tsx
@@ -17,7 +17,7 @@ function DepositModalWithReown(props) {
17
17
  reown.openConnect();
18
18
  }, [reown.openConnect]);
19
19
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
20
- _chunkVBNFP3JFcjs.DepositModalInner,
20
+ _chunk7MQU2SR7cjs.DepositModalInner,
21
21
  {
22
22
  ...props,
23
23
  reownWallet: reown,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  DepositModalInner
3
- } from "./chunk-JAR372KJ.mjs";
3
+ } from "./chunk-AJALMXW4.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
7
  } from "./chunk-LBEP3A2Z.mjs";
8
- import "./chunk-GAFLOODV.mjs";
8
+ import "./chunk-YOFGP4FV.mjs";
9
9
  import "./chunk-A6QLADED.mjs";
10
10
 
11
11
  // src/DepositModalReown.tsx
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WithdrawModalInner
3
- } from "./chunk-B3HMNWR4.mjs";
3
+ } from "./chunk-QCRZCGAE.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
7
  } from "./chunk-LBEP3A2Z.mjs";
8
- import "./chunk-GAFLOODV.mjs";
8
+ import "./chunk-YOFGP4FV.mjs";
9
9
  import "./chunk-A6QLADED.mjs";
10
10
 
11
11
  // src/WithdrawModalReown.tsx
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk4QDHXCPGcjs = require('./chunk-4QDHXCPG.cjs');
3
+ var _chunkXIS33BZ6cjs = require('./chunk-XIS33BZ6.cjs');
4
4
 
5
5
 
6
6
 
7
7
  var _chunk6VJ2ZTNQcjs = require('./chunk-6VJ2ZTNQ.cjs');
8
- require('./chunk-CZWAKYDR.cjs');
8
+ require('./chunk-QWYZJL3L.cjs');
9
9
  require('./chunk-CEIWN53N.cjs');
10
10
 
11
11
  // src/WithdrawModalReown.tsx
@@ -17,7 +17,7 @@ function WithdrawModalWithReown(props) {
17
17
  reown.openConnect();
18
18
  }, [reown.openConnect]);
19
19
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
20
- _chunk4QDHXCPGcjs.WithdrawModalInner,
20
+ _chunkXIS33BZ6cjs.WithdrawModalInner,
21
21
  {
22
22
  ...props,
23
23
  reownWallet: reown,
@@ -21,12 +21,7 @@
21
21
 
22
22
 
23
23
 
24
-
25
-
26
-
27
-
28
- var _chunkCZWAKYDRcjs = require('./chunk-CZWAKYDR.cjs');
29
-
24
+ var _chunkQWYZJL3Lcjs = require('./chunk-QWYZJL3L.cjs');
30
25
 
31
26
 
32
27
 
@@ -59,18 +54,17 @@ var _react = require('react');
59
54
 
60
55
  // src/components/steps/SetupStep.tsx
61
56
 
62
- var _sdk = require('@rhinestone/sdk');
63
57
  var _jsxruntime = require('react/jsx-runtime');
64
58
  async function resolveSessionOwner(eoaAddress) {
65
- const localOwner = _chunkCZWAKYDRcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
59
+ const localOwner = _chunkQWYZJL3Lcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
66
60
  if (localOwner) {
67
61
  return {
68
- account: _chunkCZWAKYDRcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
62
+ account: _chunkQWYZJL3Lcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
69
63
  address: localOwner.address
70
64
  };
71
65
  }
72
- const created = _chunkCZWAKYDRcjs.createSessionOwnerKey.call(void 0, );
73
- _chunkCZWAKYDRcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
66
+ const created = _chunkQWYZJL3Lcjs.createSessionOwnerKey.call(void 0, );
67
+ _chunkQWYZJL3Lcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
74
68
  return {
75
69
  account: created.account,
76
70
  address: created.address
@@ -80,9 +74,7 @@ function SetupStep({
80
74
  walletClient,
81
75
  address,
82
76
  targetChain,
83
- targetChainObj,
84
77
  targetToken,
85
- rhinestoneApiKey,
86
78
  signerAddress,
87
79
  sessionChainIds,
88
80
  recipient,
@@ -95,7 +87,7 @@ function SetupStep({
95
87
  const [state, setState] = _react.useState.call(void 0, { type: "idle" });
96
88
  const setupInitiatedRef = _react.useRef.call(void 0, false);
97
89
  const runSetup = _react.useCallback.call(void 0, async () => {
98
- if (!address || !targetChainObj) {
90
+ if (!address) {
99
91
  return;
100
92
  }
101
93
  if (walletClient && !walletClient.account) {
@@ -103,14 +95,9 @@ function SetupStep({
103
95
  }
104
96
  try {
105
97
  setState({ type: "creating-account" });
106
- const signerAccount = walletClient ? _sdk.walletClientToAccount.call(void 0, walletClient) : _chunkCZWAKYDRcjs.createViewOnlyAccount.call(void 0, address);
107
98
  const sessionOwner = await resolveSessionOwner(address);
108
- const account = await _chunkCZWAKYDRcjs.createSmartAccount.call(void 0,
109
- signerAccount,
110
- sessionOwner.account,
111
- rhinestoneApiKey
112
- );
113
- const smartAccount = _chunkCZWAKYDRcjs.getAccountAddress.call(void 0, account);
99
+ const computed = await service.computeAddress(address, sessionOwner.address);
100
+ const smartAccount = computed.smartAccount;
114
101
  setState({ type: "checking" });
115
102
  const checkResult = await service.checkAccount(smartAccount);
116
103
  if (checkResult.isRegistered && !forceRegister) {
@@ -123,21 +110,34 @@ function SetupStep({
123
110
  }
124
111
  }
125
112
  setState({ type: "signing-session" });
126
- const initData = _chunkCZWAKYDRcjs.getAccountInitData.call(void 0, account);
127
- const sessionDetails = await _chunkCZWAKYDRcjs.getSessionDetails.call(void 0,
128
- account,
129
- targetChainObj,
130
- signerAddress,
131
- sessionOwner.account,
113
+ const prepared = await service.prepareAccount({
114
+ ownerAddress: address,
115
+ sessionOwnerAddress: sessionOwner.address,
116
+ targetChain,
132
117
  targetToken,
118
+ signerAddress,
133
119
  sessionChainIds
120
+ });
121
+ if (!sessionOwner.account.signTypedData) {
122
+ throw new Error("Session owner account does not support signTypedData");
123
+ }
124
+ const typedData = prepared.sessionDetailsUnsigned.data;
125
+ const signature = await sessionOwner.account.signTypedData({
126
+ domain: typedData.domain,
127
+ types: typedData.types,
128
+ primaryType: typedData.primaryType,
129
+ message: typedData.message
130
+ });
131
+ const sessionDetails = _chunkQWYZJL3Lcjs.buildSessionDetails.call(void 0,
132
+ prepared.sessionDetailsUnsigned,
133
+ signature
134
134
  );
135
135
  setState({ type: "registering" });
136
136
  await service.registerAccount({
137
137
  address: smartAccount,
138
138
  accountParams: {
139
- factory: initData.factory,
140
- factoryData: initData.factoryData,
139
+ factory: prepared.accountParams.factory,
140
+ factoryData: prepared.accountParams.factoryData,
141
141
  sessionDetails
142
142
  },
143
143
  eoaAddress: address,
@@ -159,10 +159,8 @@ function SetupStep({
159
159
  }, [
160
160
  address,
161
161
  walletClient,
162
- targetChainObj,
163
162
  targetChain,
164
163
  targetToken,
165
- rhinestoneApiKey,
166
164
  signerAddress,
167
165
  sessionChainIds,
168
166
  recipient,
@@ -174,11 +172,11 @@ function SetupStep({
174
172
  ]);
175
173
  _react.useEffect.call(void 0, () => {
176
174
  const hasWallet = walletClient ? Boolean(walletClient.account) : true;
177
- if (address && hasWallet && targetChainObj && !setupInitiatedRef.current && state.type === "idle") {
175
+ if (address && hasWallet && !setupInitiatedRef.current && state.type === "idle") {
178
176
  setupInitiatedRef.current = true;
179
177
  runSetup();
180
178
  }
181
- }, [address, walletClient, targetChainObj, state.type, runSetup]);
179
+ }, [address, walletClient, state.type, runSetup]);
182
180
  const handleRetry = () => {
183
181
  setupInitiatedRef.current = false;
184
182
  setState({ type: "idle" });
@@ -206,7 +204,7 @@ function SetupStep({
206
204
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
207
205
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
208
206
  isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
209
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCZWAKYDRcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
207
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
210
208
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
211
209
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
212
210
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
@@ -243,7 +241,7 @@ function SetupStep({
243
241
  ] })
244
242
  ] })
245
243
  ] }),
246
- isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCZWAKYDRcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
244
+ isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
247
245
  ] });
248
246
  }
249
247
 
@@ -266,7 +264,7 @@ function AssetSelectStep({
266
264
  const [error, setError] = _react.useState.call(void 0, null);
267
265
  const defaultAssetId = _react.useMemo.call(void 0, () => {
268
266
  if (!defaultSourceChain || !defaultSourceToken) return null;
269
- return _chunkCZWAKYDRcjs.getAssetId.call(void 0, {
267
+ return _chunkQWYZJL3Lcjs.getAssetId.call(void 0, {
270
268
  chainId: defaultSourceChain,
271
269
  token: defaultSourceToken
272
270
  });
@@ -283,7 +281,7 @@ function AssetSelectStep({
283
281
  try {
284
282
  const portfolio = await service.fetchPortfolio(address);
285
283
  if (!active) return;
286
- const portfolioAssets = _chunkCZWAKYDRcjs.portfolioToAssets.call(void 0, portfolio.tokens);
284
+ const portfolioAssets = _chunkQWYZJL3Lcjs.portfolioToAssets.call(void 0, portfolio.tokens);
287
285
  setAssets(portfolioAssets);
288
286
  const hasNative = portfolioAssets.some(
289
287
  (asset) => asset.token.toLowerCase() === _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS
@@ -351,7 +349,7 @@ function AssetSelectStep({
351
349
  const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
352
350
  const numeric = Number(raw);
353
351
  if (!Number.isFinite(numeric)) return raw;
354
- return _chunkCZWAKYDRcjs.tokenFormatter.format(numeric);
352
+ return _chunkQWYZJL3Lcjs.tokenFormatter.format(numeric);
355
353
  } catch (e3) {
356
354
  return asset.balance;
357
355
  }
@@ -365,7 +363,7 @@ function AssetSelectStep({
365
363
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
366
364
  children: [
367
365
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
368
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCZWAKYDRcjs.Spinner, { className: "rs-text-tertiary" }),
366
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.Spinner, { className: "rs-text-tertiary" }),
369
367
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
370
368
  ] }),
371
369
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-alert rs-alert--error", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-alert-text", children: error }) }),
@@ -455,7 +453,7 @@ function AssetSelectStep({
455
453
  ] })
456
454
  ] })
457
455
  ] }),
458
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ? _chunkCZWAKYDRcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ? _chunkQWYZJL3Lcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
459
457
  ]
460
458
  },
461
459
  asset.id
@@ -465,7 +463,7 @@ function AssetSelectStep({
465
463
  }
466
464
  ),
467
465
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
468
- _chunkCZWAKYDRcjs.Button,
466
+ _chunkQWYZJL3Lcjs.Button,
469
467
  {
470
468
  onClick: () => selectedAsset && onContinue(selectedAsset),
471
469
  disabled: !selectedAsset,
@@ -473,7 +471,7 @@ function AssetSelectStep({
473
471
  children: "Continue"
474
472
  }
475
473
  ) }),
476
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCZWAKYDRcjs.PoweredBy, {})
474
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.PoweredBy, {})
477
475
  ] });
478
476
  }
479
477
  async function fetchNativeAssets(address, publicClient, existing) {
@@ -481,7 +479,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
481
479
  const connectedChainId = _optionalChain([publicClient, 'access', _8 => _8.chain, 'optionalAccess', _9 => _9.id]);
482
480
  if (!connectedChainId) return [];
483
481
  if (!_chunkCEIWN53Ncjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
484
- const id = _chunkCZWAKYDRcjs.getAssetId.call(void 0, {
482
+ const id = _chunkQWYZJL3Lcjs.getAssetId.call(void 0, {
485
483
  chainId: connectedChainId,
486
484
  token: _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS
487
485
  });
@@ -561,7 +559,7 @@ function AmountStep({
561
559
  const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
562
560
  if (!balanceTarget || !publicClient) return;
563
561
  try {
564
- const bal = _chunkCZWAKYDRcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
562
+ const bal = _chunkQWYZJL3Lcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
565
563
  address: asset.token,
566
564
  abi: _viem.erc20Abi,
567
565
  functionName: "balanceOf",
@@ -622,7 +620,7 @@ function AmountStep({
622
620
  const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
623
621
  const numeric = Number(raw);
624
622
  if (!Number.isFinite(numeric)) return raw;
625
- return _chunkCZWAKYDRcjs.tokenFormatter.format(numeric);
623
+ return _chunkQWYZJL3Lcjs.tokenFormatter.format(numeric);
626
624
  } catch (e8) {
627
625
  return "...";
628
626
  }
@@ -636,7 +634,7 @@ function AmountStep({
636
634
  }, [amountUsd, tokenPriceUsd]);
637
635
  const formattedTokenAmount = _react.useMemo.call(void 0, () => {
638
636
  if (tokenAmount === null) return "0.00";
639
- return _chunkCZWAKYDRcjs.tokenFormatter.format(tokenAmount);
637
+ return _chunkQWYZJL3Lcjs.tokenFormatter.format(tokenAmount);
640
638
  }, [tokenAmount]);
641
639
  const targetSymbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, targetToken, targetChain);
642
640
  const handlePresetClick = (percentage) => {
@@ -653,13 +651,13 @@ function AmountStep({
653
651
  }
654
652
  if (_optionalChain([uiConfig, 'optionalAccess', _13 => _13.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
655
653
  setError(
656
- `Maximum deposit is ${_chunkCZWAKYDRcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
654
+ `Maximum deposit is ${_chunkQWYZJL3Lcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
657
655
  );
658
656
  return;
659
657
  }
660
658
  if (_optionalChain([uiConfig, 'optionalAccess', _14 => _14.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
661
659
  setError(
662
- `Minimum deposit is ${_chunkCZWAKYDRcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
660
+ `Minimum deposit is ${_chunkQWYZJL3Lcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
663
661
  );
664
662
  return;
665
663
  }
@@ -729,7 +727,7 @@ function AmountStep({
729
727
  balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
730
728
  " ",
731
729
  "(",
732
- _chunkCZWAKYDRcjs.currencyFormatter.format(balanceUsd),
730
+ _chunkQWYZJL3Lcjs.currencyFormatter.format(balanceUsd),
733
731
  ")"
734
732
  ] })
735
733
  ] }) })
@@ -872,7 +870,7 @@ function AmountStep({
872
870
  " to continue."
873
871
  ] }),
874
872
  switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
875
- _chunkCZWAKYDRcjs.Button,
873
+ _chunkQWYZJL3Lcjs.Button,
876
874
  {
877
875
  variant: "outline",
878
876
  size: "small",
@@ -905,7 +903,7 @@ function AmountStep({
905
903
  ] })
906
904
  ] }),
907
905
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
908
- _chunkCZWAKYDRcjs.Button,
906
+ _chunkQWYZJL3Lcjs.Button,
909
907
  {
910
908
  onClick: handleContinue,
911
909
  fullWidth: true,
@@ -913,7 +911,7 @@ function AmountStep({
913
911
  children: "Continue"
914
912
  }
915
913
  ) }),
916
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCZWAKYDRcjs.PoweredBy, {})
914
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.PoweredBy, {})
917
915
  ] });
918
916
  }
919
917
 
@@ -1023,7 +1021,7 @@ function ConfirmStep({
1023
1021
  throw new Error("Wallet not properly connected");
1024
1022
  }
1025
1023
  const transferTo = sameRoute ? recipient : smartAccount;
1026
- const hash = _chunkCZWAKYDRcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1024
+ const hash = _chunkQWYZJL3Lcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1027
1025
  account,
1028
1026
  chain,
1029
1027
  to: transferTo,
@@ -1040,7 +1038,7 @@ function ConfirmStep({
1040
1038
  onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
1041
1039
  } catch (err) {
1042
1040
  const raw = err instanceof Error ? err.message : "Transfer failed";
1043
- const message = _chunkCZWAKYDRcjs.formatUserError.call(void 0, raw);
1041
+ const message = _chunkQWYZJL3Lcjs.formatUserError.call(void 0, raw);
1044
1042
  setError(message);
1045
1043
  _optionalChain([onError, 'optionalCall', _18 => _18(message, "TRANSFER_ERROR")]);
1046
1044
  } finally {
@@ -1054,7 +1052,7 @@ function ConfirmStep({
1054
1052
  await switchChain(asset.chainId);
1055
1053
  } catch (err) {
1056
1054
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
1057
- setError(_chunkCZWAKYDRcjs.formatUserError.call(void 0, raw));
1055
+ setError(_chunkQWYZJL3Lcjs.formatUserError.call(void 0, raw));
1058
1056
  } finally {
1059
1057
  setIsSwitching(false);
1060
1058
  }
@@ -1159,7 +1157,7 @@ function ConfirmStep({
1159
1157
  ] }),
1160
1158
  receiveAmountUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-card-row", children: [
1161
1159
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-label", children: "Value" }),
1162
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-value", children: _chunkCZWAKYDRcjs.currencyFormatter.format(receiveAmountUsd) })
1160
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-value", children: _chunkQWYZJL3Lcjs.currencyFormatter.format(receiveAmountUsd) })
1163
1161
  ] })
1164
1162
  ] }),
1165
1163
  chainMismatch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch", children: [
@@ -1169,7 +1167,7 @@ function ConfirmStep({
1169
1167
  " to sign."
1170
1168
  ] }),
1171
1169
  switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1172
- _chunkCZWAKYDRcjs.Button,
1170
+ _chunkQWYZJL3Lcjs.Button,
1173
1171
  {
1174
1172
  variant: "outline",
1175
1173
  size: "small",
@@ -1202,7 +1200,7 @@ function ConfirmStep({
1202
1200
  ] })
1203
1201
  ] }),
1204
1202
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1205
- _chunkCZWAKYDRcjs.Button,
1203
+ _chunkQWYZJL3Lcjs.Button,
1206
1204
  {
1207
1205
  onClick: handleConfirm,
1208
1206
  loading: isSubmitting,
@@ -1211,7 +1209,7 @@ function ConfirmStep({
1211
1209
  children: "Confirm Order"
1212
1210
  }
1213
1211
  ) }),
1214
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCZWAKYDRcjs.PoweredBy, {})
1212
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.PoweredBy, {})
1215
1213
  ] });
1216
1214
  }
1217
1215
 
@@ -1416,7 +1414,7 @@ function DepositAddressStep({
1416
1414
  const status = await service.fetchLatestStatus(smartAccount);
1417
1415
  if (cancelled || depositHandledRef.current) return;
1418
1416
  const event = status.lastEvent;
1419
- const eventTxHash = _chunkCZWAKYDRcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunkCZWAKYDRcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _22 => _22.toLowerCase, 'call', _23 => _23()]), () => ( null)) : null;
1417
+ const eventTxHash = _chunkQWYZJL3Lcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunkQWYZJL3Lcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _22 => _22.toLowerCase, 'call', _23 => _23()]), () => ( null)) : null;
1420
1418
  if (baselineTxHash === void 0) {
1421
1419
  baselineTxHash = eventTxHash;
1422
1420
  } else if (eventTxHash && eventTxHash !== baselineTxHash) {
@@ -1629,7 +1627,7 @@ function DepositAddressStep({
1629
1627
  ] }),
1630
1628
  pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
1631
1629
  ] }) }),
1632
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkCZWAKYDRcjs.PoweredBy, {})
1630
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQWYZJL3Lcjs.PoweredBy, {})
1633
1631
  ] });
1634
1632
  }
1635
1633
  DepositAddressStep.displayName = "DepositAddressStep";
@@ -1650,7 +1648,6 @@ function DepositFlow({
1650
1648
  sourceToken: defaultSourceToken,
1651
1649
  amount: defaultAmount,
1652
1650
  recipient,
1653
- rhinestoneApiKey,
1654
1651
  signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
1655
1652
  sessionChainIds,
1656
1653
  forceRegister = false,
@@ -1675,7 +1672,6 @@ function DepositFlow({
1675
1672
  const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, 0);
1676
1673
  const [isConnectSelectionConfirmed, setIsConnectSelectionConfirmed] = _react.useState.call(void 0, false);
1677
1674
  const [selectedConnectAddress, setSelectedConnectAddress] = _react.useState.call(void 0, null);
1678
- const targetChainObj = _react.useMemo.call(void 0, () => _chunkCEIWN53Ncjs.CHAIN_BY_ID[targetChain], [targetChain]);
1679
1675
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
1680
1676
  if (!_optionalChain([dappWalletClient, 'optionalAccess', _25 => _25.switchChain])) return void 0;
1681
1677
  return async (chainId) => {
@@ -1716,7 +1712,7 @@ function DepositFlow({
1716
1712
  return {
1717
1713
  ownerAddress: dappAddress,
1718
1714
  walletClient: void 0,
1719
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkCZWAKYDRcjs.getPublicClient.call(void 0, targetChain))),
1715
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, targetChain))),
1720
1716
  switchChain: void 0
1721
1717
  };
1722
1718
  }
@@ -1725,7 +1721,7 @@ function DepositFlow({
1725
1721
  return {
1726
1722
  ownerAddress: dappWalletClient.account.address,
1727
1723
  walletClient: dappWalletClient,
1728
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkCZWAKYDRcjs.getPublicClient.call(void 0, fallbackChainId))),
1724
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, fallbackChainId))),
1729
1725
  switchChain: dappSwitchChain
1730
1726
  };
1731
1727
  }
@@ -1735,7 +1731,7 @@ function DepositFlow({
1735
1731
  return {
1736
1732
  ownerAddress: dappWalletClient.account.address,
1737
1733
  walletClient: dappWalletClient,
1738
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkCZWAKYDRcjs.getPublicClient.call(void 0, fallbackChainId))),
1734
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, fallbackChainId))),
1739
1735
  switchChain: dappSwitchChain
1740
1736
  };
1741
1737
  }
@@ -1943,7 +1939,7 @@ function DepositFlow({
1943
1939
  }, [walletOptionsKey, selectedConnectAddressEffective]);
1944
1940
  if (showConnectStep) {
1945
1941
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1946
- _chunkCZWAKYDRcjs.ConnectStep,
1942
+ _chunkQWYZJL3Lcjs.ConnectStep,
1947
1943
  {
1948
1944
  walletOptions,
1949
1945
  selectedAddress: selectedConnectAddressEffective,
@@ -1968,14 +1964,12 @@ function DepositFlow({
1968
1964
  if (isDepositAddressMode) {
1969
1965
  if (!dappAddress || !sessionKeyAddress) return null;
1970
1966
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
1971
- step.type === "setup" && targetChainObj && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1967
+ step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1972
1968
  SetupStep,
1973
1969
  {
1974
1970
  address: sessionKeyAddress,
1975
1971
  targetChain,
1976
- targetChainObj,
1977
1972
  targetToken,
1978
- rhinestoneApiKey,
1979
1973
  signerAddress,
1980
1974
  sessionChainIds,
1981
1975
  recipient,
@@ -1996,7 +1990,7 @@ function DepositFlow({
1996
1990
  }
1997
1991
  ),
1998
1992
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1999
- _chunkCZWAKYDRcjs.ProcessingStep,
1993
+ _chunkQWYZJL3Lcjs.ProcessingStep,
2000
1994
  {
2001
1995
  smartAccount: step.smartAccount,
2002
1996
  txHash: step.txHash,
@@ -2027,18 +2021,16 @@ function DepositFlow({
2027
2021
  if (_optionalChain([signerContext, 'access', _58 => _58.publicClient, 'access', _59 => _59.chain, 'optionalAccess', _60 => _60.id]) === chainId) {
2028
2022
  return signerContext.publicClient;
2029
2023
  }
2030
- return _chunkCZWAKYDRcjs.getPublicClient.call(void 0, chainId);
2024
+ return _chunkQWYZJL3Lcjs.getPublicClient.call(void 0, chainId);
2031
2025
  };
2032
2026
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
2033
- step.type === "setup" && targetChainObj && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2027
+ step.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2034
2028
  SetupStep,
2035
2029
  {
2036
2030
  walletClient: signerContext.walletClient,
2037
2031
  address: ownerAddress,
2038
2032
  targetChain,
2039
- targetChainObj,
2040
2033
  targetToken,
2041
- rhinestoneApiKey,
2042
2034
  signerAddress,
2043
2035
  sessionChainIds,
2044
2036
  recipient,
@@ -2095,7 +2087,7 @@ function DepositFlow({
2095
2087
  }
2096
2088
  ),
2097
2089
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2098
- _chunkCZWAKYDRcjs.ProcessingStep,
2090
+ _chunkQWYZJL3Lcjs.ProcessingStep,
2099
2091
  {
2100
2092
  smartAccount: step.smartAccount,
2101
2093
  txHash: step.txHash,
@@ -2120,7 +2112,7 @@ function DepositFlow({
2120
2112
  // src/DepositModal.tsx
2121
2113
 
2122
2114
  var ReownDepositInner = _react.lazy.call(void 0,
2123
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-QQ6WI265.cjs"))).then((m) => ({ default: m.DepositModalReown }))
2115
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-NGYZ4G7Q.cjs"))).then((m) => ({ default: m.DepositModalReown }))
2124
2116
  );
2125
2117
  function DepositModal(props) {
2126
2118
  const needsReown = !!props.reownAppId;
@@ -2144,7 +2136,6 @@ function DepositModalInner({
2144
2136
  defaultAmount,
2145
2137
  recipient,
2146
2138
  backendUrl = _chunkCEIWN53Ncjs.DEFAULT_BACKEND_URL,
2147
- rhinestoneApiKey,
2148
2139
  signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
2149
2140
  sessionChainIds,
2150
2141
  forceRegister = false,
@@ -2171,10 +2162,10 @@ function DepositModalInner({
2171
2162
  const backHandlerRef = _react.useRef.call(void 0, void 0);
2172
2163
  const targetChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, targetChainProp);
2173
2164
  const sourceChain = sourceChainProp ? _chunkCEIWN53Ncjs.getChainId.call(void 0, sourceChainProp) : void 0;
2174
- const service = _react.useMemo.call(void 0, () => _chunkCZWAKYDRcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
2165
+ const service = _react.useMemo.call(void 0, () => _chunkQWYZJL3Lcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
2175
2166
  _react.useEffect.call(void 0, () => {
2176
2167
  if (isOpen && modalRef.current) {
2177
- _chunkCZWAKYDRcjs.applyTheme.call(void 0, modalRef.current, theme);
2168
+ _chunkQWYZJL3Lcjs.applyTheme.call(void 0, modalRef.current, theme);
2178
2169
  }
2179
2170
  }, [isOpen, theme]);
2180
2171
  const hasCalledReady = _react.useRef.call(void 0, false);
@@ -2210,7 +2201,7 @@ function DepositModalInner({
2210
2201
  const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _69 => _69.title]), () => ( "Deposit"));
2211
2202
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
2212
2203
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2213
- _chunkCZWAKYDRcjs.Modal,
2204
+ _chunkQWYZJL3Lcjs.Modal,
2214
2205
  {
2215
2206
  isOpen,
2216
2207
  onClose,
@@ -2271,7 +2262,7 @@ function DepositModalInner({
2271
2262
  balanceTitle,
2272
2263
  ":"
2273
2264
  ] }),
2274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkCZWAKYDRcjs.currencyFormatter.format(totalBalanceUsd) })
2265
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkQWYZJL3Lcjs.currencyFormatter.format(totalBalanceUsd) })
2275
2266
  ] })
2276
2267
  ] }),
2277
2268
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2314,7 +2305,6 @@ function DepositModalInner({
2314
2305
  sourceToken,
2315
2306
  amount: defaultAmount,
2316
2307
  recipient,
2317
- rhinestoneApiKey,
2318
2308
  signerAddress,
2319
2309
  sessionChainIds,
2320
2310
  forceRegister,