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