@rhinestone/deposit-modal 0.1.28 → 0.1.29

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.
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunkCEIWN53Ncjs = require('./chunk-CEIWN53N.cjs');
11
+ var _chunkDLYVHOMEcjs = require('./chunk-DLYVHOME.cjs');
12
12
 
13
13
  // src/components/ui/Modal.tsx
14
14
 
@@ -361,24 +361,24 @@ function normalizeOrchestratorPortfolio(data) {
361
361
  const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _4 => _4.balance, 'optionalAccess', _5 => _5.unlocked]), () => ( "0"));
362
362
  const normalizedName = tokenData.tokenName.trim();
363
363
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
364
- const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkCEIWN53Ncjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
365
- const resolvedTokenAddress = isNativeSymbol ? _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
364
+ const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkDLYVHOMEcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
365
+ const resolvedTokenAddress = isNativeSymbol ? _chunkDLYVHOMEcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
366
366
  if (!resolvedTokenAddress) {
367
367
  continue;
368
368
  }
369
- if (!_chunkCEIWN53Ncjs.isSupportedTokenAddressForChain.call(void 0,
369
+ if (!_chunkDLYVHOMEcjs.isSupportedTokenAddressForChain.call(void 0,
370
370
  resolvedTokenAddress,
371
371
  chainBalance.chainId
372
372
  )) {
373
373
  continue;
374
374
  }
375
- const symbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
375
+ const symbol = _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
376
376
  tokens.push({
377
377
  chainId: chainBalance.chainId,
378
378
  address: resolvedTokenAddress,
379
379
  symbol,
380
380
  name: symbol,
381
- decimals: _chunkCEIWN53Ncjs.getTokenDecimalsByAddress.call(void 0,
381
+ decimals: _chunkDLYVHOMEcjs.getTokenDecimalsByAddress.call(void 0,
382
382
  resolvedTokenAddress,
383
383
  chainBalance.chainId
384
384
  ),
@@ -402,17 +402,17 @@ function normalizeDirectToken(token) {
402
402
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
403
403
  token.token,
404
404
  "address"
405
- ))), () => ( _chunkCEIWN53Ncjs.getTokenAddress.call(void 0, symbol, chainId)));
405
+ ))), () => ( _chunkDLYVHOMEcjs.getTokenAddress.call(void 0, symbol, chainId)));
406
406
  if (!address) return null;
407
407
  const addressAsToken = address;
408
- if (!_chunkCEIWN53Ncjs.isSupportedTokenAddressForChain.call(void 0, addressAsToken, chainId)) return null;
408
+ if (!_chunkDLYVHOMEcjs.isSupportedTokenAddressForChain.call(void 0, addressAsToken, chainId)) return null;
409
409
  const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
410
410
  return {
411
411
  chainId,
412
412
  address: addressAsToken,
413
- symbol: _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, addressAsToken, chainId),
414
- name: _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, addressAsToken, chainId),
415
- decimals: _chunkCEIWN53Ncjs.getTokenDecimalsByAddress.call(void 0, addressAsToken, chainId),
413
+ symbol: _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, addressAsToken, chainId),
414
+ name: _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, addressAsToken, chainId),
415
+ decimals: _chunkDLYVHOMEcjs.getTokenDecimalsByAddress.call(void 0, addressAsToken, chainId),
416
416
  balance: balanceValue,
417
417
  balanceUsd
418
418
  };
@@ -1179,8 +1179,8 @@ function ProcessingStep({
1179
1179
  const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
1180
1180
  const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
1181
1181
  const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _70 => _70.data, 'optionalAccess', _71 => _71.destination, 'optionalAccess', _72 => _72.transactionHash]) || null;
1182
- const sourceExplorerUrl = _chunkCEIWN53Ncjs.getExplorerTxUrl.call(void 0, sourceChain, txHash);
1183
- const destExplorerUrl = destinationTxHash ? _chunkCEIWN53Ncjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1182
+ const sourceExplorerUrl = _chunkDLYVHOMEcjs.getExplorerTxUrl.call(void 0, sourceChain, txHash);
1183
+ const destExplorerUrl = destinationTxHash ? _chunkDLYVHOMEcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1184
1184
  const truncateHash = (hash) => `${hash.slice(0, 10)}...${hash.slice(-8)}`;
1185
1185
  const formatElapsedTime = (seconds) => {
1186
1186
  if (seconds < 60) return `${seconds} second${seconds !== 1 ? "s" : ""}`;
@@ -1188,8 +1188,8 @@ function ProcessingStep({
1188
1188
  const secs = seconds % 60;
1189
1189
  return `${mins}m ${secs}s`;
1190
1190
  };
1191
- const targetSymbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1192
- const sourceDecimals = _chunkCEIWN53Ncjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1191
+ const targetSymbol = _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
1192
+ const sourceDecimals = _chunkDLYVHOMEcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
1193
1193
  const formattedReceivedAmount = (() => {
1194
1194
  try {
1195
1195
  const raw = _viem.formatUnits.call(void 0, BigInt(amount), sourceDecimals);
@@ -1260,15 +1260,15 @@ function ProcessingStep({
1260
1260
  className: "rs-card-value",
1261
1261
  style: { display: "flex", alignItems: "center", gap: 6 },
1262
1262
  children: [
1263
- _chunkCEIWN53Ncjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1263
+ _chunkDLYVHOMEcjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1264
1264
  "img",
1265
1265
  {
1266
- src: _chunkCEIWN53Ncjs.getChainIcon.call(void 0, sourceChain),
1266
+ src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, sourceChain),
1267
1267
  alt: "",
1268
1268
  style: { width: 14, height: 14, borderRadius: "50%" }
1269
1269
  }
1270
1270
  ),
1271
- _chunkCEIWN53Ncjs.getChainName.call(void 0, sourceChain)
1271
+ _chunkDLYVHOMEcjs.getChainName.call(void 0, sourceChain)
1272
1272
  ]
1273
1273
  }
1274
1274
  )
@@ -1281,15 +1281,15 @@ function ProcessingStep({
1281
1281
  className: "rs-card-value",
1282
1282
  style: { display: "flex", alignItems: "center", gap: 6 },
1283
1283
  children: [
1284
- _chunkCEIWN53Ncjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1284
+ _chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1285
1285
  "img",
1286
1286
  {
1287
- src: _chunkCEIWN53Ncjs.getChainIcon.call(void 0, targetChain),
1287
+ src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain),
1288
1288
  alt: "",
1289
1289
  style: { width: 14, height: 14, borderRadius: "50%" }
1290
1290
  }
1291
1291
  ),
1292
- _chunkCEIWN53Ncjs.getChainName.call(void 0, targetChain)
1292
+ _chunkDLYVHOMEcjs.getChainName.call(void 0, targetChain)
1293
1293
  ]
1294
1294
  }
1295
1295
  )
@@ -1411,7 +1411,7 @@ function ProcessingStep({
1411
1411
  {
1412
1412
  className: `rs-step-description ${isError ? "rs-text-error" : "rs-text-secondary"}`,
1413
1413
  children: [
1414
- state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _73 => _73.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _74 => _74.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${_chunkCEIWN53Ncjs.getChainName.call(void 0, targetChain)}.`),
1414
+ state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _73 => _73.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _74 => _74.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${_chunkDLYVHOMEcjs.getChainName.call(void 0, targetChain)}.`),
1415
1415
  state.type === "failed" && state.message,
1416
1416
  state.type === "error" && state.message
1417
1417
  ]
@@ -1467,15 +1467,15 @@ function ProcessingStep({
1467
1467
  className: "rs-card-value",
1468
1468
  style: { display: "flex", alignItems: "center", gap: 8 },
1469
1469
  children: [
1470
- _chunkCEIWN53Ncjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1470
+ _chunkDLYVHOMEcjs.getChainIcon.call(void 0, sourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1471
1471
  "img",
1472
1472
  {
1473
- src: _chunkCEIWN53Ncjs.getChainIcon.call(void 0, sourceChain),
1473
+ src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, sourceChain),
1474
1474
  alt: "",
1475
1475
  style: { width: 16, height: 16, borderRadius: "50%" }
1476
1476
  }
1477
1477
  ),
1478
- _chunkCEIWN53Ncjs.getChainName.call(void 0, sourceChain)
1478
+ _chunkDLYVHOMEcjs.getChainName.call(void 0, sourceChain)
1479
1479
  ]
1480
1480
  }
1481
1481
  )
@@ -1488,15 +1488,15 @@ function ProcessingStep({
1488
1488
  className: "rs-card-value",
1489
1489
  style: { display: "flex", alignItems: "center", gap: 8 },
1490
1490
  children: [
1491
- _chunkCEIWN53Ncjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1491
+ _chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1492
1492
  "img",
1493
1493
  {
1494
- src: _chunkCEIWN53Ncjs.getChainIcon.call(void 0, targetChain),
1494
+ src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain),
1495
1495
  alt: "",
1496
1496
  style: { width: 16, height: 16, borderRadius: "50%" }
1497
1497
  }
1498
1498
  ),
1499
- _chunkCEIWN53Ncjs.getChainName.call(void 0, targetChain)
1499
+ _chunkDLYVHOMEcjs.getChainName.call(void 0, targetChain)
1500
1500
  ]
1501
1501
  }
1502
1502
  )
@@ -1549,7 +1549,7 @@ var clientCache = /* @__PURE__ */ new Map();
1549
1549
  function getPublicClient(chainId) {
1550
1550
  let client = clientCache.get(chainId);
1551
1551
  if (!client) {
1552
- const chain = _chunkCEIWN53Ncjs.CHAIN_BY_ID[chainId];
1552
+ const chain = _chunkDLYVHOMEcjs.CHAIN_BY_ID[chainId];
1553
1553
  client = _viem.createPublicClient.call(void 0, {
1554
1554
  chain,
1555
1555
  transport: _viem.http.call(void 0, )
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- var _chunkVW3QQWELcjs = require('./chunk-VW3QQWEL.cjs');
19
+ var _chunk7ZCUANBTcjs = require('./chunk-7ZCUANBT.cjs');
20
20
 
21
21
 
22
22
 
@@ -29,7 +29,7 @@ var _chunkVW3QQWELcjs = require('./chunk-VW3QQWEL.cjs');
29
29
 
30
30
 
31
31
 
32
- var _chunkCEIWN53Ncjs = require('./chunk-CEIWN53N.cjs');
32
+ var _chunkDLYVHOMEcjs = require('./chunk-DLYVHOME.cjs');
33
33
 
34
34
  // src/WithdrawModal.tsx
35
35
 
@@ -101,8 +101,8 @@ function WithdrawFormStep({
101
101
  const chainMismatch = Boolean(
102
102
  _optionalChain([walletClient, 'optionalAccess', _3 => _3.chain, 'optionalAccess', _4 => _4.id]) && walletClient.chain.id !== asset.chainId
103
103
  );
104
- const targetSymbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, targetToken, targetChain);
105
- const targetChainName = _chunkCEIWN53Ncjs.getChainName.call(void 0, targetChain);
104
+ const targetSymbol = _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, targetToken, targetChain);
105
+ const targetChainName = _chunkDLYVHOMEcjs.getChainName.call(void 0, targetChain);
106
106
  const isBusy = submitting || isSubmitting;
107
107
  _react.useEffect.call(void 0, () => {
108
108
  if (chainMismatch && switchChain && !hasAttemptedSwitch.current) {
@@ -110,7 +110,7 @@ function WithdrawFormStep({
110
110
  setIsSwitching(true);
111
111
  switchChain(asset.chainId).catch((err) => {
112
112
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
113
- setError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw));
113
+ setError(_chunk7ZCUANBTcjs.formatUserError.call(void 0, raw));
114
114
  }).finally(() => {
115
115
  setIsSwitching(false);
116
116
  });
@@ -127,7 +127,7 @@ function WithdrawFormStep({
127
127
  return;
128
128
  }
129
129
  try {
130
- const bal = _chunkVW3QQWELcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
130
+ const bal = _chunk7ZCUANBTcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: safeAddress }) : await publicClient.readContract({
131
131
  address: asset.token,
132
132
  abi: _viem.erc20Abi,
133
133
  functionName: "balanceOf",
@@ -229,7 +229,7 @@ function WithdrawFormStep({
229
229
  await onSubmit(recipient, amount);
230
230
  } catch (err) {
231
231
  const raw = err instanceof Error ? err.message : "Withdrawal failed";
232
- setError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw));
232
+ setError(_chunk7ZCUANBTcjs.formatUserError.call(void 0, raw));
233
233
  } finally {
234
234
  setIsSubmitting(false);
235
235
  }
@@ -241,7 +241,7 @@ function WithdrawFormStep({
241
241
  await switchChain(asset.chainId);
242
242
  } catch (err) {
243
243
  const raw = err instanceof Error ? err.message : "Failed to switch chain";
244
- setError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw));
244
+ setError(_chunk7ZCUANBTcjs.formatUserError.call(void 0, raw));
245
245
  } finally {
246
246
  setIsSwitching(false);
247
247
  }
@@ -331,7 +331,7 @@ function WithdrawFormStep({
331
331
  ] })
332
332
  ] }),
333
333
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-amount-info", children: [
334
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunkVW3QQWELcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
334
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-withdraw-usd", children: amountUsd !== null ? _chunk7ZCUANBTcjs.currencyFormatter.format(amountUsd) : "$0.00" }),
335
335
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-withdraw-balance", children: [
336
336
  formattedBalance,
337
337
  " ",
@@ -359,10 +359,10 @@ function WithdrawFormStep({
359
359
  },
360
360
  children: [
361
361
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
362
- _chunkCEIWN53Ncjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
362
+ _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, targetSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
363
363
  "img",
364
364
  {
365
- src: _chunkCEIWN53Ncjs.getTokenIcon.call(void 0, targetSymbol),
365
+ src: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, targetSymbol),
366
366
  alt: targetSymbol,
367
367
  className: "rs-withdraw-dropdown-icon"
368
368
  }
@@ -403,10 +403,10 @@ function WithdrawFormStep({
403
403
  setShowTokenDropdown(false);
404
404
  },
405
405
  children: [
406
- _chunkCEIWN53Ncjs.getTokenIcon.call(void 0, option.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
406
+ _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, option.symbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
407
407
  "img",
408
408
  {
409
- src: _chunkCEIWN53Ncjs.getTokenIcon.call(void 0, option.symbol),
409
+ src: _chunkDLYVHOMEcjs.getTokenIcon.call(void 0, option.symbol),
410
410
  alt: option.symbol,
411
411
  className: "rs-withdraw-dropdown-icon"
412
412
  }
@@ -439,10 +439,10 @@ function WithdrawFormStep({
439
439
  },
440
440
  children: [
441
441
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-withdraw-dropdown-value", children: [
442
- _chunkCEIWN53Ncjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
442
+ _chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
443
443
  "img",
444
444
  {
445
- src: _chunkCEIWN53Ncjs.getChainIcon.call(void 0, targetChain),
445
+ src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, targetChain),
446
446
  alt: targetChainName,
447
447
  className: "rs-withdraw-dropdown-icon"
448
448
  }
@@ -483,10 +483,10 @@ function WithdrawFormStep({
483
483
  setShowChainDropdown(false);
484
484
  },
485
485
  children: [
486
- _chunkCEIWN53Ncjs.getChainIcon.call(void 0, chain.id) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
486
+ _chunkDLYVHOMEcjs.getChainIcon.call(void 0, chain.id) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
487
487
  "img",
488
488
  {
489
- src: _chunkCEIWN53Ncjs.getChainIcon.call(void 0, chain.id),
489
+ src: _chunkDLYVHOMEcjs.getChainIcon.call(void 0, chain.id),
490
490
  alt: chain.name,
491
491
  className: "rs-withdraw-dropdown-icon"
492
492
  }
@@ -504,11 +504,11 @@ function WithdrawFormStep({
504
504
  chainMismatch && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch", children: [
505
505
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-chain-switch-text", children: [
506
506
  "Switch to ",
507
- _chunkCEIWN53Ncjs.getChainName.call(void 0, asset.chainId),
507
+ _chunkDLYVHOMEcjs.getChainName.call(void 0, asset.chainId),
508
508
  " to continue."
509
509
  ] }),
510
510
  switchChain && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
511
- _chunkVW3QQWELcjs.Button,
511
+ _chunk7ZCUANBTcjs.Button,
512
512
  {
513
513
  variant: "outline",
514
514
  size: "small",
@@ -540,7 +540,7 @@ function WithdrawFormStep({
540
540
  ] })
541
541
  ] }),
542
542
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step-footer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
543
- _chunkVW3QQWELcjs.Button,
543
+ _chunk7ZCUANBTcjs.Button,
544
544
  {
545
545
  onClick: handleWithdraw,
546
546
  fullWidth: true,
@@ -549,7 +549,7 @@ function WithdrawFormStep({
549
549
  children: isBusy ? "Preparing..." : "Withdraw"
550
550
  }
551
551
  ) }),
552
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVW3QQWELcjs.PoweredBy, {})
552
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7ZCUANBTcjs.PoweredBy, {})
553
553
  ] });
554
554
  }
555
555
  WithdrawFormStep.displayName = "WithdrawFormStep";
@@ -632,7 +632,7 @@ async function executeSafeEthTransfer(params) {
632
632
  throw new Error("Wallet not connected");
633
633
  }
634
634
  if (chain.id !== chainId) {
635
- throw new Error(`Switch to ${_chunkCEIWN53Ncjs.getChainName.call(void 0, chainId)} to sign`);
635
+ throw new Error(`Switch to ${_chunkDLYVHOMEcjs.getChainName.call(void 0, chainId)} to sign`);
636
636
  }
637
637
  const isOwner = await publicClient.readContract({
638
638
  address: safeAddress,
@@ -715,7 +715,7 @@ async function executeSafeErc20Transfer(params) {
715
715
  throw new Error("Wallet not connected");
716
716
  }
717
717
  if (chain.id !== chainId) {
718
- throw new Error(`Switch to ${_chunkCEIWN53Ncjs.getChainName.call(void 0, chainId)} to sign`);
718
+ throw new Error(`Switch to ${_chunkDLYVHOMEcjs.getChainName.call(void 0, chainId)} to sign`);
719
719
  }
720
720
  const isOwner = await publicClient.readContract({
721
721
  address: safeAddress,
@@ -854,7 +854,7 @@ function WithdrawFlow({
854
854
  recipient: defaultRecipient,
855
855
  amount: defaultAmount,
856
856
  service,
857
- signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
857
+ signerAddress = _chunkDLYVHOMEcjs.DEFAULT_SIGNER_ADDRESS,
858
858
  sessionChainIds,
859
859
  forceRegister = false,
860
860
  waitForFinalTx = true,
@@ -923,14 +923,14 @@ function WithdrawFlow({
923
923
  return {
924
924
  ownerAddress: dappAddress,
925
925
  walletClient: _nullishCoalesce(dappWalletClient, () => ( void 0)),
926
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain))),
926
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, sourceChain))),
927
927
  switchChain: dappSwitchChain
928
928
  };
929
929
  }
930
930
  return {
931
931
  ownerAddress: dappWalletClient.account.address,
932
932
  walletClient: dappWalletClient,
933
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain))),
933
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, sourceChain))),
934
934
  switchChain: dappSwitchChain
935
935
  };
936
936
  }
@@ -939,7 +939,7 @@ function WithdrawFlow({
939
939
  return {
940
940
  ownerAddress: dappWalletClient.account.address,
941
941
  walletClient: dappWalletClient,
942
- publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain))),
942
+ publicClient: _nullishCoalesce(dappPublicClient, () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, sourceChain))),
943
943
  switchChain: dappSwitchChain
944
944
  };
945
945
  }
@@ -965,10 +965,10 @@ function WithdrawFlow({
965
965
  sourceChain
966
966
  ]);
967
967
  const asset = _react.useMemo.call(void 0, () => {
968
- const symbol = _chunkCEIWN53Ncjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
969
- const decimals = _chunkCEIWN53Ncjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
968
+ const symbol = _chunkDLYVHOMEcjs.getTokenSymbol.call(void 0, sourceToken, sourceChain);
969
+ const decimals = _chunkDLYVHOMEcjs.getTokenDecimalsByAddress.call(void 0, sourceToken, sourceChain);
970
970
  return {
971
- id: _chunkVW3QQWELcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
971
+ id: _chunk7ZCUANBTcjs.getAssetId.call(void 0, { chainId: sourceChain, token: sourceToken }),
972
972
  chainId: sourceChain,
973
973
  token: sourceToken,
974
974
  symbol,
@@ -976,7 +976,7 @@ function WithdrawFlow({
976
976
  decimals
977
977
  };
978
978
  }, [sourceChain, sourceToken]);
979
- const isSourceNative = sourceToken.toLowerCase() === _chunkCEIWN53Ncjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
979
+ const isSourceNative = sourceToken.toLowerCase() === _chunkDLYVHOMEcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
980
980
  const stepIndex = step.type === "form" ? 0 : 1;
981
981
  const currentBackHandler = void 0;
982
982
  _react.useEffect.call(void 0, () => {
@@ -998,15 +998,15 @@ function WithdrawFlow({
998
998
  [onError]
999
999
  );
1000
1000
  const resolveSessionOwner = _react.useCallback.call(void 0, async (eoaAddress) => {
1001
- const localOwner = _chunkVW3QQWELcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
1001
+ const localOwner = _chunk7ZCUANBTcjs.loadSessionOwnerFromStorage.call(void 0, eoaAddress);
1002
1002
  if (localOwner) {
1003
1003
  return {
1004
- account: _chunkVW3QQWELcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
1004
+ account: _chunk7ZCUANBTcjs.accountFromPrivateKey.call(void 0, localOwner.privateKey),
1005
1005
  address: localOwner.address
1006
1006
  };
1007
1007
  }
1008
- const created = _chunkVW3QQWELcjs.createSessionOwnerKey.call(void 0, );
1009
- _chunkVW3QQWELcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
1008
+ const created = _chunk7ZCUANBTcjs.createSessionOwnerKey.call(void 0, );
1009
+ _chunk7ZCUANBTcjs.saveSessionOwnerToStorage.call(void 0, eoaAddress, created.privateKey, created.address);
1010
1010
  return {
1011
1011
  account: created.account,
1012
1012
  address: created.address
@@ -1050,7 +1050,7 @@ function WithdrawFlow({
1050
1050
  primaryType: typedData.primaryType,
1051
1051
  message: typedData.message
1052
1052
  });
1053
- const sessionDetails = _chunkVW3QQWELcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
1053
+ const sessionDetails = _chunk7ZCUANBTcjs.buildSessionDetails.call(void 0, setup.sessionDetailsUnsigned, signature);
1054
1054
  await service.registerAccount({
1055
1055
  address: smartAccount,
1056
1056
  accountParams: {
@@ -1069,7 +1069,7 @@ function WithdrawFlow({
1069
1069
  }
1070
1070
  handleConnected(ownerAddress2, smartAccount);
1071
1071
  const amountUnits = _viem.parseUnits.call(void 0, amountValue, asset.decimals);
1072
- const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _24 => _24.publicClient]), () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain)));
1072
+ const pc = _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _24 => _24.publicClient]), () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, sourceChain)));
1073
1073
  let result;
1074
1074
  if (onSignTransaction) {
1075
1075
  const transferData = isSourceNative ? { to: smartAccount, value: amountUnits, data: "0x" } : {
@@ -1137,7 +1137,7 @@ function WithdrawFlow({
1137
1137
  });
1138
1138
  } catch (err) {
1139
1139
  const raw = err instanceof Error ? err.message : "Withdraw failed";
1140
- handleError(_chunkVW3QQWELcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1140
+ handleError(_chunk7ZCUANBTcjs.formatUserError.call(void 0, raw), "WITHDRAW_FLOW_ERROR");
1141
1141
  throw err;
1142
1142
  } finally {
1143
1143
  setIsSubmitting(false);
@@ -1176,12 +1176,12 @@ function WithdrawFlow({
1176
1176
  [onWithdrawFailed]
1177
1177
  );
1178
1178
  const targetChainOptions = _react.useMemo.call(void 0, () => {
1179
- return _chunkCEIWN53Ncjs.SOURCE_CHAINS.filter(
1180
- (chain) => _chunkCEIWN53Ncjs.getSupportedTargetTokens.call(void 0, chain.id).length > 0
1179
+ return _chunkDLYVHOMEcjs.SOURCE_CHAINS.filter(
1180
+ (chain) => _chunkDLYVHOMEcjs.getSupportedTargetTokens.call(void 0, chain.id).length > 0
1181
1181
  );
1182
1182
  }, []);
1183
1183
  const targetTokenOptions = _react.useMemo.call(void 0,
1184
- () => _chunkCEIWN53Ncjs.getSupportedTargetTokens.call(void 0, targetChain),
1184
+ () => _chunkDLYVHOMEcjs.getSupportedTargetTokens.call(void 0, targetChain),
1185
1185
  [targetChain]
1186
1186
  );
1187
1187
  _react.useEffect.call(void 0, () => {
@@ -1196,7 +1196,7 @@ function WithdrawFlow({
1196
1196
  const handleTargetChainChange = _react.useCallback.call(void 0,
1197
1197
  (chainId) => {
1198
1198
  setTargetChain(chainId);
1199
- const options = _chunkCEIWN53Ncjs.getSupportedTargetTokens.call(void 0, chainId);
1199
+ const options = _chunkDLYVHOMEcjs.getSupportedTargetTokens.call(void 0, chainId);
1200
1200
  if (options.length === 0) {
1201
1201
  return;
1202
1202
  }
@@ -1229,7 +1229,7 @@ function WithdrawFlow({
1229
1229
  }, [walletOptionsKey, selectedConnectAddressEffective]);
1230
1230
  if (showConnectStep) {
1231
1231
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1232
- _chunkVW3QQWELcjs.ConnectStep,
1232
+ _chunk7ZCUANBTcjs.ConnectStep,
1233
1233
  {
1234
1234
  walletOptions,
1235
1235
  selectedAddress: selectedConnectAddressEffective,
@@ -1249,7 +1249,7 @@ function WithdrawFlow({
1249
1249
  if (!signerContext) return null;
1250
1250
  if (!onSignTransaction && !signerContext.walletClient) return null;
1251
1251
  const ownerAddress = signerContext.ownerAddress;
1252
- const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunkVW3QQWELcjs.getPublicClient.call(void 0, sourceChain)));
1252
+ const formPublicClient = _nullishCoalesce(signerContext.publicClient, () => ( _chunk7ZCUANBTcjs.getPublicClient.call(void 0, sourceChain)));
1253
1253
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
1254
1254
  step.type === "form" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1255
1255
  WithdrawFormStep,
@@ -1274,7 +1274,7 @@ function WithdrawFlow({
1274
1274
  }
1275
1275
  ),
1276
1276
  step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1277
- _chunkVW3QQWELcjs.ProcessingStep,
1277
+ _chunk7ZCUANBTcjs.ProcessingStep,
1278
1278
  {
1279
1279
  smartAccount: step.smartAccount,
1280
1280
  txHash: step.txHash,
@@ -1300,7 +1300,7 @@ function WithdrawFlow({
1300
1300
  // src/WithdrawModal.tsx
1301
1301
 
1302
1302
  var ReownWithdrawInner = _react.lazy.call(void 0,
1303
- () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-GMIE6AWA.cjs"))).then((m) => ({
1303
+ () => Promise.resolve().then(() => _interopRequireWildcard(require("./WithdrawModalReown-YREQR7DV.cjs"))).then((m) => ({
1304
1304
  default: m.WithdrawModalReown
1305
1305
  }))
1306
1306
  );
@@ -1326,8 +1326,8 @@ function WithdrawModalInner({
1326
1326
  isOpen,
1327
1327
  onClose,
1328
1328
  inline,
1329
- backendUrl = _chunkCEIWN53Ncjs.DEFAULT_BACKEND_URL,
1330
- signerAddress = _chunkCEIWN53Ncjs.DEFAULT_SIGNER_ADDRESS,
1329
+ backendUrl = _chunkDLYVHOMEcjs.DEFAULT_BACKEND_URL,
1330
+ signerAddress = _chunkDLYVHOMEcjs.DEFAULT_SIGNER_ADDRESS,
1331
1331
  sessionChainIds,
1332
1332
  forceRegister = false,
1333
1333
  waitForFinalTx = true,
@@ -1352,12 +1352,12 @@ function WithdrawModalInner({
1352
1352
  const [currentStepIndex, setCurrentStepIndex] = _react.useState.call(void 0, 0);
1353
1353
  const [totalBalanceUsd, setTotalBalanceUsd] = _react.useState.call(void 0, null);
1354
1354
  const backHandlerRef = _react.useRef.call(void 0, void 0);
1355
- const targetChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, targetChainProp);
1356
- const sourceChain = _chunkCEIWN53Ncjs.getChainId.call(void 0, sourceChainProp);
1357
- const service = _react.useMemo.call(void 0, () => _chunkVW3QQWELcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
1355
+ const targetChain = _chunkDLYVHOMEcjs.getChainId.call(void 0, targetChainProp);
1356
+ const sourceChain = _chunkDLYVHOMEcjs.getChainId.call(void 0, sourceChainProp);
1357
+ const service = _react.useMemo.call(void 0, () => _chunk7ZCUANBTcjs.createDepositService.call(void 0, backendUrl), [backendUrl]);
1358
1358
  _react.useEffect.call(void 0, () => {
1359
1359
  if (isOpen && modalRef.current) {
1360
- _chunkVW3QQWELcjs.applyTheme.call(void 0, modalRef.current, theme);
1360
+ _chunk7ZCUANBTcjs.applyTheme.call(void 0, modalRef.current, theme);
1361
1361
  }
1362
1362
  }, [isOpen, theme]);
1363
1363
  const hasCalledReady = _react.useRef.call(void 0, false);
@@ -1393,7 +1393,7 @@ function WithdrawModalInner({
1393
1393
  const title = _nullishCoalesce(_optionalChain([branding, 'optionalAccess', _36 => _36.title]), () => ( "Withdraw"));
1394
1394
  const canGoBack = currentStepIndex > 0 && currentStepIndex < 3 && backHandlerRef.current;
1395
1395
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1396
- _chunkVW3QQWELcjs.Modal,
1396
+ _chunk7ZCUANBTcjs.Modal,
1397
1397
  {
1398
1398
  isOpen,
1399
1399
  onClose,
@@ -1451,7 +1451,7 @@ function WithdrawModalInner({
1451
1451
  ] }),
1452
1452
  balanceTitle && totalBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-balance", children: [
1453
1453
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-label", children: balanceTitle }),
1454
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunkVW3QQWELcjs.currencyFormatter.format(totalBalanceUsd) })
1454
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-modal-header-balance-value", children: _chunk7ZCUANBTcjs.currencyFormatter.format(totalBalanceUsd) })
1455
1455
  ] })
1456
1456
  ] }),
1457
1457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,