@rhinestone/deposit-modal 0.1.22 → 0.1.24

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.
@@ -21,11 +21,7 @@
21
21
 
22
22
 
23
23
 
24
-
25
-
26
-
27
-
28
- var _chunkBO745KABcjs = require('./chunk-BO745KAB.cjs');
24
+ var _chunkANQQMGNNcjs = require('./chunk-ANQQMGNN.cjs');
29
25
 
30
26
 
31
27
 
@@ -50,8 +46,6 @@ var _chunkCEIWN53Ncjs = require('./chunk-CEIWN53N.cjs');
50
46
 
51
47
 
52
48
 
53
-
54
-
55
49
  var _react = require('react');
56
50
 
57
51
  // src/DepositFlow.tsx
@@ -59,18 +53,17 @@ var _react = require('react');
59
53
 
60
54
  // src/components/steps/SetupStep.tsx
61
55
 
62
- var _sdk = require('@rhinestone/sdk');
63
56
  var _jsxruntime = require('react/jsx-runtime');
64
57
  async function resolveSessionOwner(eoaAddress) {
65
- const localOwner = _chunkBO745KABcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
58
+ const localOwner = _chunkANQQMGNNcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
66
59
  if (localOwner) {
67
60
  return {
68
- account: _chunkBO745KABcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
61
+ account: _chunkANQQMGNNcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
69
62
  address: localOwner.address
70
63
  };
71
64
  }
72
- const created = _chunkBO745KABcjs.createSessionOwnerKey.call(void 0, );
73
- _chunkBO745KABcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
65
+ const created = _chunkANQQMGNNcjs.createSessionOwnerKey.call(void 0, );
66
+ _chunkANQQMGNNcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
74
67
  return {
75
68
  account: created.account,
76
69
  address: created.address
@@ -80,9 +73,7 @@ function SetupStep({
80
73
  walletClient,
81
74
  address,
82
75
  targetChain,
83
- targetChainObj,
84
76
  targetToken,
85
- rhinestoneApiKey,
86
77
  signerAddress,
87
78
  sessionChainIds,
88
79
  recipient,
@@ -94,8 +85,18 @@ function SetupStep({
94
85
  }) {
95
86
  const [state, setState] = _react.useState.call(void 0, { type: "idle" });
96
87
  const setupInitiatedRef = _react.useRef.call(void 0, false);
88
+ const signSessionDetails = _react.useCallback.call(void 0,
89
+ async (sessionOwner, typedData) => {
90
+ const signer = sessionOwner.account;
91
+ if (!signer.signTypedData) {
92
+ throw new Error("Session owner cannot sign typed data");
93
+ }
94
+ return await signer.signTypedData(typedData);
95
+ },
96
+ []
97
+ );
97
98
  const runSetup = _react.useCallback.call(void 0, async () => {
98
- if (!address || !targetChainObj) {
99
+ if (!address) {
99
100
  return;
100
101
  }
101
102
  if (walletClient && !walletClient.account) {
@@ -103,14 +104,16 @@ function SetupStep({
103
104
  }
104
105
  try {
105
106
  setState({ type: "creating-account" });
106
- const signerAccount = walletClient ? _sdk.walletClientToAccount.call(void 0, walletClient) : _chunkBO745KABcjs.createViewOnlyAccount.call(void 0, address);
107
107
  const sessionOwner = await resolveSessionOwner(address);
108
- const account = await _chunkBO745KABcjs.createSmartAccount.call(void 0,
109
- signerAccount,
110
- sessionOwner.account,
111
- rhinestoneApiKey
112
- );
113
- const smartAccount = _chunkBO745KABcjs.getAccountAddress.call(void 0, account);
108
+ const prepared = await service.prepareAccount({
109
+ ownerAddress: address,
110
+ sessionOwnerAddress: sessionOwner.address,
111
+ targetChain,
112
+ targetToken,
113
+ signerAddress,
114
+ sessionChainIds
115
+ });
116
+ const smartAccount = prepared.smartAccount;
114
117
  setState({ type: "checking" });
115
118
  const checkResult = await service.checkAccount(smartAccount);
116
119
  if (checkResult.isRegistered && !forceRegister) {
@@ -123,21 +126,20 @@ function SetupStep({
123
126
  }
124
127
  }
125
128
  setState({ type: "signing-session" });
126
- const initData = _chunkBO745KABcjs.getAccountInitData.call(void 0, account);
127
- const sessionDetails = await _chunkBO745KABcjs.getSessionDetails.call(void 0,
128
- account,
129
- targetChainObj,
130
- signerAddress,
131
- sessionOwner.account,
132
- targetToken,
133
- sessionChainIds
129
+ const signature = await signSessionDetails(
130
+ sessionOwner,
131
+ prepared.sessionDetailsUnsigned.data
132
+ );
133
+ const sessionDetails = _chunkANQQMGNNcjs.buildSessionDetails.call(void 0,
134
+ prepared.sessionDetailsUnsigned,
135
+ signature
134
136
  );
135
137
  setState({ type: "registering" });
136
138
  await service.registerAccount({
137
139
  address: smartAccount,
138
140
  accountParams: {
139
- factory: initData.factory,
140
- factoryData: initData.factoryData,
141
+ factory: prepared.accountParams.factory,
142
+ factoryData: prepared.accountParams.factoryData,
141
143
  sessionDetails
142
144
  },
143
145
  eoaAddress: address,
@@ -159,10 +161,8 @@ function SetupStep({
159
161
  }, [
160
162
  address,
161
163
  walletClient,
162
- targetChainObj,
163
164
  targetChain,
164
165
  targetToken,
165
- rhinestoneApiKey,
166
166
  signerAddress,
167
167
  sessionChainIds,
168
168
  recipient,
@@ -170,15 +170,16 @@ function SetupStep({
170
170
  service,
171
171
  onSetupComplete,
172
172
  onError,
173
- onConnected
173
+ onConnected,
174
+ signSessionDetails
174
175
  ]);
175
176
  _react.useEffect.call(void 0, () => {
176
177
  const hasWallet = walletClient ? Boolean(walletClient.account) : true;
177
- if (address && hasWallet && targetChainObj && !setupInitiatedRef.current && state.type === "idle") {
178
+ if (address && hasWallet && !setupInitiatedRef.current && state.type === "idle") {
178
179
  setupInitiatedRef.current = true;
179
180
  runSetup();
180
181
  }
181
- }, [address, walletClient, targetChainObj, state.type, runSetup]);
182
+ }, [address, walletClient, state.type, runSetup]);
182
183
  const handleRetry = () => {
183
184
  setupInitiatedRef.current = false;
184
185
  setState({ type: "idle" });
@@ -206,7 +207,7 @@ function SetupStep({
206
207
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
207
208
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
208
209
  isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
209
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBO745KABcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
210
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANQQMGNNcjs.Spinner, { className: "rs-spinner--lg rs-text-accent" }),
210
211
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-text", children: [
211
212
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: renderStateMessage() }),
212
213
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-subtitle", children: "This may take a moment" })
@@ -243,7 +244,7 @@ function SetupStep({
243
244
  ] })
244
245
  ] })
245
246
  ] }),
246
- isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBO745KABcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
247
+ isError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANQQMGNNcjs.Button, { onClick: handleRetry, variant: "default", fullWidth: true, children: "Try Again" }) })
247
248
  ] });
248
249
  }
249
250
 
@@ -266,7 +267,7 @@ function AssetSelectStep({
266
267
  const [error, setError] = _react.useState.call(void 0, null);
267
268
  const defaultAssetId = _react.useMemo.call(void 0, () => {
268
269
  if (!defaultSourceChain || !defaultSourceToken) return null;
269
- return _chunkBO745KABcjs.getAssetId.call(void 0, {
270
+ return _chunkANQQMGNNcjs.getAssetId.call(void 0, {
270
271
  chainId: defaultSourceChain,
271
272
  token: defaultSourceToken
272
273
  });
@@ -283,7 +284,7 @@ function AssetSelectStep({
283
284
  try {
284
285
  const portfolio = await service.fetchPortfolio(address);
285
286
  if (!active) return;
286
- const portfolioAssets = _chunkBO745KABcjs.portfolioToAssets.call(void 0, portfolio.tokens);
287
+ const portfolioAssets = _chunkANQQMGNNcjs.portfolioToAssets.call(void 0, portfolio.tokens);
287
288
  setAssets(portfolioAssets);
288
289
  const hasNative = portfolioAssets.some(
289
290
  (asset) => asset.token.toLowerCase() === _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS
@@ -351,7 +352,7 @@ function AssetSelectStep({
351
352
  const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
352
353
  const numeric = Number(raw);
353
354
  if (!Number.isFinite(numeric)) return raw;
354
- return _chunkBO745KABcjs.tokenFormatter.format(numeric);
355
+ return _chunkANQQMGNNcjs.tokenFormatter.format(numeric);
355
356
  } catch (e3) {
356
357
  return asset.balance;
357
358
  }
@@ -365,7 +366,7 @@ function AssetSelectStep({
365
366
  style: { paddingTop: 4, overflow: "auto", maxHeight: 340 },
366
367
  children: [
367
368
  loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
368
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBO745KABcjs.Spinner, { className: "rs-text-tertiary" }),
369
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANQQMGNNcjs.Spinner, { className: "rs-text-tertiary" }),
369
370
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
370
371
  ] }),
371
372
  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 +456,7 @@ function AssetSelectStep({
455
456
  ] })
456
457
  ] })
457
458
  ] }),
458
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ? _chunkBO745KABcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 ? _chunkANQQMGNNcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
459
460
  ]
460
461
  },
461
462
  asset.id
@@ -465,7 +466,7 @@ function AssetSelectStep({
465
466
  }
466
467
  ),
467
468
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
468
- _chunkBO745KABcjs.Button,
469
+ _chunkANQQMGNNcjs.Button,
469
470
  {
470
471
  onClick: () => selectedAsset && onContinue(selectedAsset),
471
472
  disabled: !selectedAsset,
@@ -473,7 +474,7 @@ function AssetSelectStep({
473
474
  children: "Continue"
474
475
  }
475
476
  ) }),
476
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBO745KABcjs.PoweredBy, {})
477
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANQQMGNNcjs.PoweredBy, {})
477
478
  ] });
478
479
  }
479
480
  async function fetchNativeAssets(address, publicClient, existing) {
@@ -481,7 +482,7 @@ async function fetchNativeAssets(address, publicClient, existing) {
481
482
  const connectedChainId = _optionalChain([publicClient, 'access', _8 => _8.chain, 'optionalAccess', _9 => _9.id]);
482
483
  if (!connectedChainId) return [];
483
484
  if (!_chunkCEIWN53Ncjs.SOURCE_CHAINS.some((chain) => chain.id === connectedChainId)) return [];
484
- const id = _chunkBO745KABcjs.getAssetId.call(void 0, {
485
+ const id = _chunkANQQMGNNcjs.getAssetId.call(void 0, {
485
486
  chainId: connectedChainId,
486
487
  token: _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS
487
488
  });
@@ -561,7 +562,7 @@ function AmountStep({
561
562
  const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
562
563
  if (!balanceTarget || !publicClient) return;
563
564
  try {
564
- const bal = _chunkBO745KABcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
565
+ const bal = _chunkANQQMGNNcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
565
566
  address: asset.token,
566
567
  abi: _viem.erc20Abi,
567
568
  functionName: "balanceOf",
@@ -622,7 +623,7 @@ function AmountStep({
622
623
  const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
623
624
  const numeric = Number(raw);
624
625
  if (!Number.isFinite(numeric)) return raw;
625
- return _chunkBO745KABcjs.tokenFormatter.format(numeric);
626
+ return _chunkANQQMGNNcjs.tokenFormatter.format(numeric);
626
627
  } catch (e8) {
627
628
  return "...";
628
629
  }
@@ -636,7 +637,7 @@ function AmountStep({
636
637
  }, [amountUsd, tokenPriceUsd]);
637
638
  const formattedTokenAmount = _react.useMemo.call(void 0, () => {
638
639
  if (tokenAmount === null) return "0.00";
639
- return _chunkBO745KABcjs.tokenFormatter.format(tokenAmount);
640
+ return _chunkANQQMGNNcjs.tokenFormatter.format(tokenAmount);
640
641
  }, [tokenAmount]);
641
642
  const targetSymbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, targetToken, targetChain);
642
643
  const handlePresetClick = (percentage) => {
@@ -653,13 +654,13 @@ function AmountStep({
653
654
  }
654
655
  if (_optionalChain([uiConfig, 'optionalAccess', _13 => _13.maxDepositUsd]) && usdValue > uiConfig.maxDepositUsd) {
655
656
  setError(
656
- `Maximum deposit is ${_chunkBO745KABcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
657
+ `Maximum deposit is ${_chunkANQQMGNNcjs.currencyFormatter.format(uiConfig.maxDepositUsd)}`
657
658
  );
658
659
  return;
659
660
  }
660
661
  if (_optionalChain([uiConfig, 'optionalAccess', _14 => _14.minDepositUsd]) && usdValue < uiConfig.minDepositUsd) {
661
662
  setError(
662
- `Minimum deposit is ${_chunkBO745KABcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
663
+ `Minimum deposit is ${_chunkANQQMGNNcjs.currencyFormatter.format(uiConfig.minDepositUsd)}`
663
664
  );
664
665
  return;
665
666
  }
@@ -729,7 +730,7 @@ function AmountStep({
729
730
  balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: "var(--rs-muted-foreground)" }, children: [
730
731
  " ",
731
732
  "(",
732
- _chunkBO745KABcjs.currencyFormatter.format(balanceUsd),
733
+ _chunkANQQMGNNcjs.currencyFormatter.format(balanceUsd),
733
734
  ")"
734
735
  ] })
735
736
  ] }) })
@@ -872,7 +873,7 @@ function AmountStep({
872
873
  " to continue."
873
874
  ] }),
874
875
  switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
875
- _chunkBO745KABcjs.Button,
876
+ _chunkANQQMGNNcjs.Button,
876
877
  {
877
878
  variant: "outline",
878
879
  size: "small",
@@ -905,7 +906,7 @@ function AmountStep({
905
906
  ] })
906
907
  ] }),
907
908
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
908
- _chunkBO745KABcjs.Button,
909
+ _chunkANQQMGNNcjs.Button,
909
910
  {
910
911
  onClick: handleContinue,
911
912
  fullWidth: true,
@@ -913,7 +914,7 @@ function AmountStep({
913
914
  children: "Continue"
914
915
  }
915
916
  ) }),
916
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBO745KABcjs.PoweredBy, {})
917
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANQQMGNNcjs.PoweredBy, {})
917
918
  ] });
918
919
  }
919
920
 
@@ -1023,7 +1024,7 @@ function ConfirmStep({
1023
1024
  throw new Error("Wallet not properly connected");
1024
1025
  }
1025
1026
  const transferTo = sameRoute ? recipient : smartAccount;
1026
- const hash = _chunkBO745KABcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1027
+ const hash = _chunkANQQMGNNcjs.isNativeAsset.call(void 0, asset) ? await walletClient.sendTransaction({
1027
1028
  account,
1028
1029
  chain,
1029
1030
  to: transferTo,
@@ -1040,7 +1041,7 @@ function ConfirmStep({
1040
1041
  onConfirm(hash, asset.chainId, amountUnits.toString(), asset.token);
1041
1042
  } catch (err) {
1042
1043
  const raw = err instanceof Error ? err.message : "Transfer failed";
1043
- const message = _chunkBO745KABcjs.formatUserError.call(void 0, raw);
1044
+ const message = _chunkANQQMGNNcjs.formatUserError.call(void 0, raw);
1044
1045
  setError(message);
1045
1046
  _optionalChain([onError, 'optionalCall', _18 => _18(message, "TRANSFER_ERROR")]);
1046
1047
  } finally {
@@ -1054,7 +1055,7 @@ function ConfirmStep({
1054
1055
  await switchChain(asset.chainId);
1055
1056
  } catch (err) {
1056
1057
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
1057
- setError(_chunkBO745KABcjs.formatUserError.call(void 0, raw));
1058
+ setError(_chunkANQQMGNNcjs.formatUserError.call(void 0, raw));
1058
1059
  } finally {
1059
1060
  setIsSwitching(false);
1060
1061
  }
@@ -1159,7 +1160,7 @@ function ConfirmStep({
1159
1160
  ] }),
1160
1161
  receiveAmountUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-card-row", children: [
1161
1162
  /* @__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: _chunkBO745KABcjs.currencyFormatter.format(receiveAmountUsd) })
1163
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-card-value", children: _chunkANQQMGNNcjs.currencyFormatter.format(receiveAmountUsd) })
1163
1164
  ] })
1164
1165
  ] }),
1165
1166
  chainMismatch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch", children: [
@@ -1169,7 +1170,7 @@ function ConfirmStep({
1169
1170
  " to sign."
1170
1171
  ] }),
1171
1172
  switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1172
- _chunkBO745KABcjs.Button,
1173
+ _chunkANQQMGNNcjs.Button,
1173
1174
  {
1174
1175
  variant: "outline",
1175
1176
  size: "small",
@@ -1202,7 +1203,7 @@ function ConfirmStep({
1202
1203
  ] })
1203
1204
  ] }),
1204
1205
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1205
- _chunkBO745KABcjs.Button,
1206
+ _chunkANQQMGNNcjs.Button,
1206
1207
  {
1207
1208
  onClick: handleConfirm,
1208
1209
  loading: isSubmitting,
@@ -1211,7 +1212,7 @@ function ConfirmStep({
1211
1212
  children: "Confirm Order"
1212
1213
  }
1213
1214
  ) }),
1214
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBO745KABcjs.PoweredBy, {})
1215
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANQQMGNNcjs.PoweredBy, {})
1215
1216
  ] });
1216
1217
  }
1217
1218
 
@@ -1416,7 +1417,7 @@ function DepositAddressStep({
1416
1417
  const status = await service.fetchLatestStatus(smartAccount);
1417
1418
  if (cancelled || depositHandledRef.current) return;
1418
1419
  const event = status.lastEvent;
1419
- const eventTxHash = _chunkBO745KABcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunkBO745KABcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _22 => _22.toLowerCase, 'call', _23 => _23()]), () => ( null)) : null;
1420
+ const eventTxHash = _chunkANQQMGNNcjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_optionalChain([_chunkANQQMGNNcjs.getEventTxHash.call(void 0, event), 'optionalAccess', _22 => _22.toLowerCase, 'call', _23 => _23()]), () => ( null)) : null;
1420
1421
  if (baselineTxHash === void 0) {
1421
1422
  baselineTxHash = eventTxHash;
1422
1423
  } else if (eventTxHash && eventTxHash !== baselineTxHash) {
@@ -1629,7 +1630,7 @@ function DepositAddressStep({
1629
1630
  ] }),
1630
1631
  pollingError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-error", children: pollingError })
1631
1632
  ] }) }),
1632
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBO745KABcjs.PoweredBy, {})
1633
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANQQMGNNcjs.PoweredBy, {})
1633
1634
  ] });
1634
1635
  }
1635
1636
  DepositAddressStep.displayName = "DepositAddressStep";
@@ -1650,7 +1651,6 @@ function DepositFlow({
1650
1651
  sourceToken: defaultSourceToken,
1651
1652
  amount: defaultAmount,
1652
1653
  recipient,
1653
- rhinestoneApiKey,
1654
1654
  signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
1655
1655
  sessionChainIds,
1656
1656
  forceRegister = false,
@@ -1716,7 +1716,7 @@ function DepositFlow({
1716
1716
  return {
1717
1717
  ownerAddress: dappAddress,
1718
1718
  walletClient: void 0,
1719
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkBO745KABcjs.getPublicClient.call(void 0, targetChain))),
1719
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkANQQMGNNcjs.getPublicClient.call(void 0, targetChain))),
1720
1720
  switchChain: void 0
1721
1721
  };
1722
1722
  }
@@ -1725,7 +1725,7 @@ function DepositFlow({
1725
1725
  return {
1726
1726
  ownerAddress: dappWalletClient.account.address,
1727
1727
  walletClient: dappWalletClient,
1728
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkBO745KABcjs.getPublicClient.call(void 0, fallbackChainId))),
1728
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkANQQMGNNcjs.getPublicClient.call(void 0, fallbackChainId))),
1729
1729
  switchChain: dappSwitchChain
1730
1730
  };
1731
1731
  }
@@ -1735,7 +1735,7 @@ function DepositFlow({
1735
1735
  return {
1736
1736
  ownerAddress: dappWalletClient.account.address,
1737
1737
  walletClient: dappWalletClient,
1738
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkBO745KABcjs.getPublicClient.call(void 0, fallbackChainId))),
1738
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkANQQMGNNcjs.getPublicClient.call(void 0, fallbackChainId))),
1739
1739
  switchChain: dappSwitchChain
1740
1740
  };
1741
1741
  }
@@ -1943,7 +1943,7 @@ function DepositFlow({
1943
1943
  }, [walletOptionsKey, selectedConnectAddressEffective]);
1944
1944
  if (showConnectStep) {
1945
1945
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1946
- _chunkBO745KABcjs.ConnectStep,
1946
+ _chunkANQQMGNNcjs.ConnectStep,
1947
1947
  {
1948
1948
  walletOptions,
1949
1949
  selectedAddress: selectedConnectAddressEffective,
@@ -1973,9 +1973,7 @@ function DepositFlow({
1973
1973
  {
1974
1974
  address: sessionKeyAddress,
1975
1975
  targetChain,
1976
- targetChainObj,
1977
1976
  targetToken,
1978
- rhinestoneApiKey,
1979
1977
  signerAddress,
1980
1978
  sessionChainIds,
1981
1979
  recipient,
@@ -1996,7 +1994,7 @@ function DepositFlow({
1996
1994
  }
1997
1995
  ),
1998
1996
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1999
- _chunkBO745KABcjs.ProcessingStep,
1997
+ _chunkANQQMGNNcjs.ProcessingStep,
2000
1998
  {
2001
1999
  smartAccount: step.smartAccount,
2002
2000
  txHash: step.txHash,
@@ -2027,7 +2025,7 @@ function DepositFlow({
2027
2025
  if (_optionalChain([signerContext, 'access', _58 => _58.publicClient, 'access', _59 => _59.chain, 'optionalAccess', _60 => _60.id]) === chainId) {
2028
2026
  return signerContext.publicClient;
2029
2027
  }
2030
- return _chunkBO745KABcjs.getPublicClient.call(void 0, chainId);
2028
+ return _chunkANQQMGNNcjs.getPublicClient.call(void 0, chainId);
2031
2029
  };
2032
2030
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
2033
2031
  step.type === "setup" && targetChainObj && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2036,9 +2034,7 @@ function DepositFlow({
2036
2034
  walletClient: signerContext.walletClient,
2037
2035
  address: ownerAddress,
2038
2036
  targetChain,
2039
- targetChainObj,
2040
2037
  targetToken,
2041
- rhinestoneApiKey,
2042
2038
  signerAddress,
2043
2039
  sessionChainIds,
2044
2040
  recipient,
@@ -2095,7 +2091,7 @@ function DepositFlow({
2095
2091
  }
2096
2092
  ),
2097
2093
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2098
- _chunkBO745KABcjs.ProcessingStep,
2094
+ _chunkANQQMGNNcjs.ProcessingStep,
2099
2095
  {
2100
2096
  smartAccount: step.smartAccount,
2101
2097
  txHash: step.txHash,
@@ -2119,13 +2115,11 @@ function DepositFlow({
2119
2115
 
2120
2116
  // src/DepositModal.tsx
2121
2117
 
2122
- var ReownDepositInner = _react.lazy.call(void 0,
2123
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-324WTBDE.cjs"))).then((m) => ({ default: m.DepositModalReown }))
2124
- );
2125
2118
  function DepositModal(props) {
2126
- const needsReown = !!props.reownAppId;
2127
- if (needsReown) {
2128
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Suspense, { fallback: null, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ReownDepositInner, { ...props }) });
2119
+ if (props.reownAppId) {
2120
+ throw new Error(
2121
+ 'Reown support moved to "@rhinestone/deposit-modal/reown". Use that entrypoint when passing reownAppId.'
2122
+ );
2129
2123
  }
2130
2124
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositModalInner, { ...props });
2131
2125
  }
@@ -2144,7 +2138,6 @@ function DepositModalInner({
2144
2138
  defaultAmount,
2145
2139
  recipient,
2146
2140
  backendUrl = _chunkCEIWN53Ncjs.DEFAULT_BACKEND_URL,
2147
- rhinestoneApiKey,
2148
2141
  signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
2149
2142
  sessionChainIds,
2150
2143
  forceRegister = false,
@@ -2171,10 +2164,10 @@ function DepositModalInner({
2171
2164
  const backHandlerRef = _react.useRef.call(void 0, void 0);
2172
2165
  const targetChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, targetChainProp);
2173
2166
  const sourceChain = sourceChainProp ? _chunkCEIWN53Ncjs.getChainId.call(void 0, sourceChainProp) : void 0;
2174
- const service = _react.useMemo.call(void 0, () => _chunkBO745KABcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
2167
+ const service = _react.useMemo.call(void 0, () => _chunkANQQMGNNcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
2175
2168
  _react.useEffect.call(void 0, () => {
2176
2169
  if (isOpen && modalRef.current) {
2177
- _chunkBO745KABcjs.applyTheme.call(void 0, modalRef.current, theme);
2170
+ _chunkANQQMGNNcjs.applyTheme.call(void 0, modalRef.current, theme);
2178
2171
  }
2179
2172
  }, [isOpen, theme]);
2180
2173
  const hasCalledReady = _react.useRef.call(void 0, false);
@@ -2210,7 +2203,7 @@ function DepositModalInner({
2210
2203
  const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _69 => _69.title]), () => ( "Deposit"));
2211
2204
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 4 && backHandlerRef.current !== void 0;
2212
2205
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2213
- _chunkBO745KABcjs.Modal,
2206
+ _chunkANQQMGNNcjs.Modal,
2214
2207
  {
2215
2208
  isOpen,
2216
2209
  onClose,
@@ -2271,7 +2264,7 @@ function DepositModalInner({
2271
2264
  balanceTitle,
2272
2265
  ":"
2273
2266
  ] }),
2274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkBO745KABcjs.currencyFormatter.format(totalBalanceUsd) })
2267
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkANQQMGNNcjs.currencyFormatter.format(totalBalanceUsd) })
2275
2268
  ] })
2276
2269
  ] }),
2277
2270
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2314,7 +2307,6 @@ function DepositModalInner({
2314
2307
  sourceToken,
2315
2308
  amount: defaultAmount,
2316
2309
  recipient,
2317
- rhinestoneApiKey,
2318
2310
  signerAddress,
2319
2311
  sessionChainIds,
2320
2312
  forceRegister,