@rhinestone/deposit-modal 0.1.26 → 0.1.28

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 _chunkXJ4G6RO6cjs = require('./chunk-XJ4G6RO6.cjs');
4
4
 
5
5
 
6
6
 
7
7
  var _chunk6VJ2ZTNQcjs = require('./chunk-6VJ2ZTNQ.cjs');
8
- require('./chunk-4Q6QCALP.cjs');
8
+ require('./chunk-VW3QQWEL.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
+ _chunkXJ4G6RO6cjs.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-YXTWMYHK.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
7
  } from "./chunk-LBEP3A2Z.mjs";
8
- import "./chunk-3FK5FAUL.mjs";
8
+ import "./chunk-RQSAANC3.mjs";
9
9
  import "./chunk-A6QLADED.mjs";
10
10
 
11
11
  // src/DepositModalReown.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 _chunkLP6DQCKVcjs = require('./chunk-LP6DQCKV.cjs');
4
4
 
5
5
 
6
6
 
7
7
  var _chunk6VJ2ZTNQcjs = require('./chunk-6VJ2ZTNQ.cjs');
8
- require('./chunk-4Q6QCALP.cjs');
8
+ require('./chunk-VW3QQWEL.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
+ _chunkLP6DQCKVcjs.WithdrawModalInner,
21
21
  {
22
22
  ...props,
23
23
  reownWallet: reown,
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  WithdrawModalInner
3
- } from "./chunk-DJAUNNEW.mjs";
3
+ } from "./chunk-XF7M4TTT.mjs";
4
4
  import {
5
5
  ReownWalletProvider,
6
6
  useReownWallet
7
7
  } from "./chunk-LBEP3A2Z.mjs";
8
- import "./chunk-3FK5FAUL.mjs";
8
+ import "./chunk-RQSAANC3.mjs";
9
9
  import "./chunk-A6QLADED.mjs";
10
10
 
11
11
  // src/WithdrawModalReown.tsx
@@ -16,12 +16,7 @@
16
16
 
17
17
 
18
18
 
19
-
20
-
21
-
22
-
23
- var _chunk4Q6QCALPcjs = require('./chunk-4Q6QCALP.cjs');
24
-
19
+ var _chunkVW3QQWELcjs = require('./chunk-VW3QQWEL.cjs');
25
20
 
26
21
 
27
22
 
@@ -115,7 +110,7 @@ function WithdrawFormStep({
115
110
  setIsSwitching(true);
116
111
  switchChain(asset.chainId).catch((err) => {
117
112
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
118
- setError(_chunk4Q6QCALPcjs.formatUserError.call(void 0, raw));
113
+ setError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw));
119
114
  }).finally(() => {
120
115
  setIsSwitching(false);
121
116
  });
@@ -132,7 +127,7 @@ function WithdrawFormStep({
132
127
  return;
133
128
  }
134
129
  try {
135
- const bal = _chunk4Q6QCALPcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
130
+ const bal = _chunkVW3QQWELcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
136
131
  address: asset.token,
137
132
  abi: _viem.erc20Abi,
138
133
  functionName: "balanceOf",
@@ -234,7 +229,7 @@ function WithdrawFormStep({
234
229
  await onSubmit(recipient, amount);
235
230
  } catch (err) {
236
231
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
237
- setError(_chunk4Q6QCALPcjs.formatUserError.call(void 0, raw));
232
+ setError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw));
238
233
  } finally {
239
234
  setIsSubmitting(false);
240
235
  }
@@ -246,7 +241,7 @@ function WithdrawFormStep({
246
241
  await switchChain(asset.chainId);
247
242
  } catch (err) {
248
243
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
249
- setError(_chunk4Q6QCALPcjs.formatUserError.call(void 0, raw));
244
+ setError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw));
250
245
  } finally {
251
246
  setIsSwitching(false);
252
247
  }
@@ -336,7 +331,7 @@ function WithdrawFormStep({
336
331
  ] })
337
332
  ] }),
338
333
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
339
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunk4Q6QCALPcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkVW3QQWELcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
340
335
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
341
336
  formattedBalance,
342
337
  " ",
@@ -513,7 +508,7 @@ function WithdrawFormStep({
513
508
  " to continue."
514
509
  ] }),
515
510
  switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
516
- _chunk4Q6QCALPcjs.Button,
511
+ _chunkVW3QQWELcjs.Button,
517
512
  {
518
513
  variant: "outline",
519
514
  size: "small",
@@ -545,7 +540,7 @@ function WithdrawFormStep({
545
540
  ] })
546
541
  ] }),
547
542
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
548
- _chunk4Q6QCALPcjs.Button,
543
+ _chunkVW3QQWELcjs.Button,
549
544
  {
550
545
  onClick: handleWithdraw,
551
546
  fullWidth: true,
@@ -554,14 +549,11 @@ function WithdrawFormStep({
554
549
  children: isBusy ? "Preparing..." : "Withdraw"
555
550
  }
556
551
  ) }),
557
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4Q6QCALPcjs.PoweredBy, {})
552
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVW3QQWELcjs.PoweredBy, {})
558
553
  ] });
559
554
  }
560
555
  WithdrawFormStep.displayName = "WithdrawFormStep";
561
556
 
562
- // src/WithdrawFlow.tsx
563
- var _sdk = require('@rhinestone/sdk');
564
-
565
557
  // src/core/safe.ts
566
558
 
567
559
 
@@ -862,7 +854,6 @@ function WithdrawFlow({
862
854
  recipient: defaultRecipient,
863
855
  amount: defaultAmount,
864
856
  service,
865
- rhinestoneApiKey,
866
857
  signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
867
858
  sessionChainIds,
868
859
  forceRegister = false,
@@ -892,7 +883,6 @@ function WithdrawFlow({
892
883
  setTargetChain(targetChainProp);
893
884
  setTargetToken(targetTokenProp);
894
885
  }, [targetChainProp, targetTokenProp]);
895
- const targetChainObj = _react.useMemo.call(void 0, () => _chunkCEIWN53Ncjs.CHAIN_BY_ID[targetChain], [targetChain]);
896
886
  const hasCustomSigner = Boolean(dappAddress && onSignTransaction);
897
887
  const dappSwitchChain = _react.useMemo.call(void 0, () => {
898
888
  if (!_optionalChain([dappWalletClient, 'optionalAccess', _6 => _6.switchChain])) return void 0;
@@ -933,14 +923,14 @@ function WithdrawFlow({
933
923
  return {
934
924
  ownerAddress: dappAddress,
935
925
  walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
936
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4Q6QCALPcjs.getPublicClient.call(void 0, sourceChain))),
926
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain))),
937
927
  switchChain: dappSwitchChain
938
928
  };
939
929
  }
940
930
  return {
941
931
  ownerAddress: dappWalletClient.account.address,
942
932
  walletClient: dappWalletClient,
943
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4Q6QCALPcjs.getPublicClient.call(void 0, sourceChain))),
933
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain))),
944
934
  switchChain: dappSwitchChain
945
935
  };
946
936
  }
@@ -949,7 +939,7 @@ function WithdrawFlow({
949
939
  return {
950
940
  ownerAddress: dappWalletClient.account.address,
951
941
  walletClient: dappWalletClient,
952
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk4Q6QCALPcjs.getPublicClient.call(void 0, sourceChain))),
942
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain))),
953
943
  switchChain: dappSwitchChain
954
944
  };
955
945
  }
@@ -978,7 +968,7 @@ function WithdrawFlow({
978
968
  const symbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
979
969
  const decimals = _chunkCEIWN53Ncjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
980
970
  return {
981
- id: _chunk4Q6QCALPcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
971
+ id: _chunkVW3QQWELcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
982
972
  chainId: sourceChain,
983
973
  token: sourceToken,
984
974
  symbol,
@@ -1008,15 +998,15 @@ function WithdrawFlow({
1008
998
  [onError]
1009
999
  );
1010
1000
  const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
1011
- const localOwner = _chunk4Q6QCALPcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
1001
+ const localOwner = _chunkVW3QQWELcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
1012
1002
  if (localOwner) {
1013
1003
  return {
1014
- account: _chunk4Q6QCALPcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
1004
+ account: _chunkVW3QQWELcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
1015
1005
  address: localOwner.address
1016
1006
  };
1017
1007
  }
1018
- const created = _chunk4Q6QCALPcjs.createSessionOwnerKey.call(void 0, );
1019
- _chunk4Q6QCALPcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
1008
+ const created = _chunkVW3QQWELcjs.createSessionOwnerKey.call(void 0, );
1009
+ _chunkVW3QQWELcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
1020
1010
  return {
1021
1011
  account: created.account,
1022
1012
  address: created.address
@@ -1031,36 +1021,41 @@ function WithdrawFlow({
1031
1021
  if (!onSignTransaction && !_optionalChain([signerContext, 'optionalAccess', _23 => _23.walletClient])) {
1032
1022
  throw new Error("Wallet not connected");
1033
1023
  }
1034
- if (!targetChainObj) {
1035
- throw new Error("Unsupported target chain");
1036
- }
1037
1024
  setIsSubmitting(true);
1038
1025
  try {
1039
- const signerAccount = _optionalChain([signerContext, 'optionalAccess', _24 => _24.walletClient]) ? _sdk.walletClientToAccount.call(void 0, signerContext.walletClient) : _chunk4Q6QCALPcjs.createViewOnlyAccount.call(void 0, ownerAddress2);
1040
1026
  const sessionOwner = await resolveSessionOwner(ownerAddress2);
1041
- const account = await _chunk4Q6QCALPcjs.createSmartAccount.call(void 0,
1042
- signerAccount,
1043
- sessionOwner.account,
1044
- rhinestoneApiKey
1045
- );
1046
- const smartAccount = _chunk4Q6QCALPcjs.getAccountAddress.call(void 0, account);
1047
- const checkResult = await service.checkAccount(smartAccount);
1048
- const targetMatches = checkResult.targetChain === targetChain && _optionalChain([checkResult, 'access', _25 => _25.targetToken, 'optionalAccess', _26 => _26.toLowerCase, 'call', _27 => _27()]) === targetToken.toLowerCase();
1049
- if (!checkResult.isRegistered || forceRegister || !targetMatches) {
1050
- const initData = _chunk4Q6QCALPcjs.getAccountInitData.call(void 0, account);
1051
- const sessionDetails = await _chunk4Q6QCALPcjs.getSessionDetails.call(void 0,
1052
- account,
1053
- targetChainObj,
1054
- signerAddress,
1055
- sessionOwner.account,
1056
- targetToken,
1057
- sessionChainIds
1058
- );
1027
+ const setup = await service.setupAccount({
1028
+ ownerAddress: ownerAddress2,
1029
+ sessionOwnerAddress: sessionOwner.address,
1030
+ targetChain,
1031
+ targetToken,
1032
+ signerAddress,
1033
+ sessionChainIds,
1034
+ forceRegister
1035
+ });
1036
+ const smartAccount = setup.smartAccount;
1037
+ if (setup.needsRegistration) {
1038
+ if (!setup.accountParams || !setup.sessionDetailsUnsigned) {
1039
+ throw new Error("Missing registration payload from setup-account");
1040
+ }
1041
+ const typedData = setup.sessionDetailsUnsigned.data;
1042
+ if (!sessionOwner.account.signTypedData) {
1043
+ throw new Error(
1044
+ "Session owner account does not support signTypedData"
1045
+ );
1046
+ }
1047
+ const signature = await sessionOwner.account.signTypedData({
1048
+ domain: typedData.domain,
1049
+ types: typedData.types,
1050
+ primaryType: typedData.primaryType,
1051
+ message: typedData.message
1052
+ });
1053
+ const sessionDetails = _chunkVW3QQWELcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
1059
1054
  await service.registerAccount({
1060
1055
  address: smartAccount,
1061
1056
  accountParams: {
1062
- factory: initData.factory,
1063
- factoryData: initData.factoryData,
1057
+ factory: setup.accountParams.factory,
1058
+ factoryData: setup.accountParams.factoryData,
1064
1059
  sessionDetails
1065
1060
  },
1066
1061
  eoaAddress: ownerAddress2,
@@ -1074,7 +1069,7 @@ function WithdrawFlow({
1074
1069
  }
1075
1070
  handleConnected(ownerAddress2, smartAccount);
1076
1071
  const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
1077
- const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _28 => _28.publicClient]), () => ( _chunk4Q6QCALPcjs.getPublicClient.call(void 0, sourceChain)));
1072
+ const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _24 => _24.publicClient]), () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain)));
1078
1073
  let result;
1079
1074
  if (onSignTransaction) {
1080
1075
  const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
@@ -1126,7 +1121,7 @@ function WithdrawFlow({
1126
1121
  chainId: sourceChain
1127
1122
  });
1128
1123
  }
1129
- _optionalChain([onWithdrawSubmitted, 'optionalCall', _29 => _29({
1124
+ _optionalChain([onWithdrawSubmitted, 'optionalCall', _25 => _25({
1130
1125
  txHash: result.txHash,
1131
1126
  sourceChain,
1132
1127
  amount: amountUnits.toString(),
@@ -1142,7 +1137,7 @@ function WithdrawFlow({
1142
1137
  });
1143
1138
  } catch (err) {
1144
1139
  const raw = err instanceof Error ? err.message : "Withdraw failed";
1145
- handleError(_chunk4Q6QCALPcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1140
+ handleError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1146
1141
  throw err;
1147
1142
  } finally {
1148
1143
  setIsSubmitting(false);
@@ -1150,7 +1145,6 @@ function WithdrawFlow({
1150
1145
  },
1151
1146
  [
1152
1147
  signerContext,
1153
- targetChainObj,
1154
1148
  resolveSessionOwner,
1155
1149
  signerAddress,
1156
1150
  sessionChainIds,
@@ -1158,7 +1152,6 @@ function WithdrawFlow({
1158
1152
  targetChain,
1159
1153
  targetToken,
1160
1154
  service,
1161
- rhinestoneApiKey,
1162
1155
  handleConnected,
1163
1156
  asset.decimals,
1164
1157
  safeAddress,
@@ -1172,13 +1165,13 @@ function WithdrawFlow({
1172
1165
  );
1173
1166
  const handleWithdrawComplete = _react.useCallback.call(void 0,
1174
1167
  (txHash, destinationTxHash) => {
1175
- _optionalChain([onWithdrawComplete, 'optionalCall', _30 => _30({ txHash, destinationTxHash })]);
1168
+ _optionalChain([onWithdrawComplete, 'optionalCall', _26 => _26({ txHash, destinationTxHash })]);
1176
1169
  },
1177
1170
  [onWithdrawComplete]
1178
1171
  );
1179
1172
  const handleWithdrawFailed = _react.useCallback.call(void 0,
1180
1173
  (txHash, error) => {
1181
- _optionalChain([onWithdrawFailed, 'optionalCall', _31 => _31({ txHash, error })]);
1174
+ _optionalChain([onWithdrawFailed, 'optionalCall', _27 => _27({ txHash, error })]);
1182
1175
  },
1183
1176
  [onWithdrawFailed]
1184
1177
  );
@@ -1236,7 +1229,7 @@ function WithdrawFlow({
1236
1229
  }, [walletOptionsKey, selectedConnectAddressEffective]);
1237
1230
  if (showConnectStep) {
1238
1231
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1239
- _chunk4Q6QCALPcjs.ConnectStep,
1232
+ _chunkVW3QQWELcjs.ConnectStep,
1240
1233
  {
1241
1234
  walletOptions,
1242
1235
  selectedAddress: selectedConnectAddressEffective,
@@ -1256,7 +1249,7 @@ function WithdrawFlow({
1256
1249
  if (!signerContext) return null;
1257
1250
  if (!onSignTransaction && !signerContext.walletClient) return null;
1258
1251
  const ownerAddress = signerContext.ownerAddress;
1259
- const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunk4Q6QCALPcjs.getPublicClient.call(void 0, sourceChain)));
1252
+ const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain)));
1260
1253
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
1261
1254
  step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1262
1255
  WithdrawFormStep,
@@ -1281,7 +1274,7 @@ function WithdrawFlow({
1281
1274
  }
1282
1275
  ),
1283
1276
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1284
- _chunk4Q6QCALPcjs.ProcessingStep,
1277
+ _chunkVW3QQWELcjs.ProcessingStep,
1285
1278
  {
1286
1279
  smartAccount: step.smartAccount,
1287
1280
  txHash: step.txHash,
@@ -1307,7 +1300,7 @@ function WithdrawFlow({
1307
1300
  // src/WithdrawModal.tsx
1308
1301
 
1309
1302
  var ReownWithdrawInner = _react.lazy.call(void 0,
1310
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-GL4TM22D.cjs"))).then((m) => ({
1303
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-GMIE6AWA.cjs"))).then((m) => ({
1311
1304
  default: m.WithdrawModalReown
1312
1305
  }))
1313
1306
  );
@@ -1334,7 +1327,6 @@ function WithdrawModalInner({
1334
1327
  onClose,
1335
1328
  inline,
1336
1329
  backendUrl = _chunkCEIWN53Ncjs.DEFAULT_BACKEND_URL,
1337
- rhinestoneApiKey,
1338
1330
  signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
1339
1331
  sessionChainIds,
1340
1332
  forceRegister = false,
@@ -1362,17 +1354,17 @@ function WithdrawModalInner({
1362
1354
  const backHandlerRef = _react.useRef.call(void 0, void 0);
1363
1355
  const targetChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, targetChainProp);
1364
1356
  const sourceChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, sourceChainProp);
1365
- const service = _react.useMemo.call(void 0, () => _chunk4Q6QCALPcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
1357
+ const service = _react.useMemo.call(void 0, () => _chunkVW3QQWELcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
1366
1358
  _react.useEffect.call(void 0, () => {
1367
1359
  if (isOpen && modalRef.current) {
1368
- _chunk4Q6QCALPcjs.applyTheme.call(void 0, modalRef.current, theme);
1360
+ _chunkVW3QQWELcjs.applyTheme.call(void 0, modalRef.current, theme);
1369
1361
  }
1370
1362
  }, [isOpen, theme]);
1371
1363
  const hasCalledReady = _react.useRef.call(void 0, false);
1372
1364
  _react.useEffect.call(void 0, () => {
1373
1365
  if (isOpen && !hasCalledReady.current) {
1374
1366
  hasCalledReady.current = true;
1375
- _optionalChain([onReady, 'optionalCall', _32 => _32()]);
1367
+ _optionalChain([onReady, 'optionalCall', _28 => _28()]);
1376
1368
  }
1377
1369
  }, [isOpen, onReady]);
1378
1370
  _react.useEffect.call(void 0, () => {
@@ -1391,17 +1383,17 @@ function WithdrawModalInner({
1391
1383
  setTotalBalanceUsd(balance);
1392
1384
  }, []);
1393
1385
  const handleBack = _react.useCallback.call(void 0, () => {
1394
- _optionalChain([backHandlerRef, 'access', _33 => _33.current, 'optionalCall', _34 => _34()]);
1386
+ _optionalChain([backHandlerRef, 'access', _29 => _29.current, 'optionalCall', _30 => _30()]);
1395
1387
  }, []);
1396
- const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _35 => _35.showLogo]), () => ( false));
1397
- const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _36 => _36.showStepper]), () => ( false));
1398
- const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _37 => _37.showBackButton]), () => ( true));
1399
- const balanceTitle = _optionalChain([uiConfig, 'optionalAccess', _38 => _38.balanceTitle]);
1400
- const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _39 => _39.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
1401
- const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _40 => _40.title]), () => ( "Withdraw"));
1388
+ const showLogo = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _31 => _31.showLogo]), () => ( false));
1389
+ const showStepper = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _32 => _32.showStepper]), () => ( false));
1390
+ const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _33 => _33.showBackButton]), () => ( true));
1391
+ const balanceTitle = _optionalChain([uiConfig, 'optionalAccess', _34 => _34.balanceTitle]);
1392
+ const logoUrl = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _35 => _35.logoUrl]), () => ( "https://github.com/rhinestonewtf.png"));
1393
+ const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _36 => _36.title]), () => ( "Withdraw"));
1402
1394
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
1403
1395
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1404
- _chunk4Q6QCALPcjs.Modal,
1396
+ _chunkVW3QQWELcjs.Modal,
1405
1397
  {
1406
1398
  isOpen,
1407
1399
  onClose,
@@ -1459,7 +1451,7 @@ function WithdrawModalInner({
1459
1451
  ] }),
1460
1452
  balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
1461
1453
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balanceTitle }),
1462
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunk4Q6QCALPcjs.currencyFormatter.format(totalBalanceUsd) })
1454
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkVW3QQWELcjs.currencyFormatter.format(totalBalanceUsd) })
1463
1455
  ] })
1464
1456
  ] }),
1465
1457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1503,7 +1495,6 @@ function WithdrawModalInner({
1503
1495
  recipient,
1504
1496
  amount: defaultAmount,
1505
1497
  service,
1506
- rhinestoneApiKey,
1507
1498
  signerAddress,
1508
1499
  sessionChainIds,
1509
1500
  forceRegister,