@rhinestone/deposit-modal 0.2.3 → 0.2.4

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.
@@ -28,7 +28,7 @@ import {
28
28
  tokenFormatter,
29
29
  txRefsMatch,
30
30
  useLatestRef
31
- } from "./chunk-JRNGXHWQ.mjs";
31
+ } from "./chunk-WNFGZS56.mjs";
32
32
  import {
33
33
  DEFAULT_BACKEND_URL,
34
34
  DEFAULT_SIGNER_ADDRESS,
@@ -47,7 +47,7 @@ import {
47
47
  getTokenIcon,
48
48
  getTokenSymbol,
49
49
  isStablecoinSymbol
50
- } from "./chunk-SDZKKUCJ.mjs";
50
+ } from "./chunk-WHW3ZMOT.mjs";
51
51
 
52
52
  // src/DepositModal.tsx
53
53
  import {
@@ -4700,7 +4700,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
4700
4700
  // src/DepositModal.tsx
4701
4701
  import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
4702
4702
  var ReownDepositInner = lazy(
4703
- () => import("./DepositModalReown-SJHEU6RQ.mjs").then((m) => ({ default: m.DepositModalReown }))
4703
+ () => import("./DepositModalReown-CY5MSQGK.mjs").then((m) => ({ default: m.DepositModalReown }))
4704
4704
  );
4705
4705
  function sortByCreatedAtDesc(items) {
4706
4706
  return [...items].sort((a, b) => {
@@ -21,7 +21,7 @@ import {
21
21
  saveSessionOwnerToStorage,
22
22
  toEvmCaip2,
23
23
  useLatestRef
24
- } from "./chunk-JRNGXHWQ.mjs";
24
+ } from "./chunk-WNFGZS56.mjs";
25
25
  import {
26
26
  DEFAULT_BACKEND_URL,
27
27
  DEFAULT_SIGNER_ADDRESS,
@@ -34,7 +34,7 @@ import {
34
34
  getTokenDecimalsByAddress,
35
35
  getTokenIcon,
36
36
  getTokenSymbol
37
- } from "./chunk-SDZKKUCJ.mjs";
37
+ } from "./chunk-WHW3ZMOT.mjs";
38
38
 
39
39
  // src/WithdrawModal.tsx
40
40
  import {
@@ -1485,7 +1485,7 @@ function WithdrawFlow({
1485
1485
  // src/WithdrawModal.tsx
1486
1486
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1487
1487
  var ReownWithdrawInner = lazy(
1488
- () => import("./WithdrawModalReown-RUJZCQ4C.mjs").then((m) => ({
1488
+ () => import("./WithdrawModalReown-YSRO5ZTA.mjs").then((m) => ({
1489
1489
  default: m.WithdrawModalReown
1490
1490
  }))
1491
1491
  );
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunkMUWVDVY4cjs = require('./chunk-MUWVDVY4.cjs');
11
+ var _chunkR2HP743Tcjs = require('./chunk-R2HP743T.cjs');
12
12
 
13
13
  // src/components/ui/Modal.tsx
14
14
 
@@ -775,14 +775,14 @@ function normalizeOrchestratorPortfolio(data) {
775
775
  const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _24 => _24.balance, 'optionalAccess', _25 => _25.unlocked]), () => ( "0"));
776
776
  const normalizedName = tokenData.tokenName.trim();
777
777
  const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
778
- const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkMUWVDVY4cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
779
- const resolvedTokenAddress = isNativeSymbol ? _chunkMUWVDVY4cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
778
+ const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkR2HP743Tcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
779
+ const resolvedTokenAddress = isNativeSymbol ? _chunkR2HP743Tcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
780
780
  if (!resolvedTokenAddress) {
781
781
  continue;
782
782
  }
783
- const registrySymbol = _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
783
+ const registrySymbol = _chunkR2HP743Tcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
784
784
  const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
785
- const decimals = registrySymbol !== "Token" ? _chunkMUWVDVY4cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
785
+ const decimals = registrySymbol !== "Token" ? _chunkR2HP743Tcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
786
786
  tokens.push({
787
787
  chainId: chainBalance.chainId,
788
788
  address: resolvedTokenAddress,
@@ -811,14 +811,14 @@ function normalizeDirectToken(token) {
811
811
  const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
812
812
  token.token,
813
813
  "address"
814
- ))), () => ( (typeof chainId === "number" ? _chunkMUWVDVY4cjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
814
+ ))), () => ( (typeof chainId === "number" ? _chunkR2HP743Tcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
815
815
  if (!address) return null;
816
816
  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));
817
817
  const isSolanaToken = chainId === "solana";
818
- const registrySymbol = isSolanaToken ? "Token" : _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, address, chainId);
818
+ const registrySymbol = isSolanaToken ? "Token" : _chunkR2HP743Tcjs.getTokenSymbol.call(void 0, address, chainId);
819
819
  const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
820
820
  const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
821
- const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkMUWVDVY4cjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
821
+ const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkR2HP743Tcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
822
822
  return {
823
823
  chainId,
824
824
  address,
@@ -1987,12 +1987,12 @@ function ProcessingStep({
1987
1987
  const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
1988
1988
  const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
1989
1989
  const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
1990
- const sourceExplorerUrl = _chunkMUWVDVY4cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
1991
- const bridgeExplorerUrl = bridgeTxHash ? _chunkMUWVDVY4cjs.getExplorerTxUrl.call(void 0, targetChain, bridgeTxHash) : null;
1992
- const destExplorerUrl = destinationTxHash ? _chunkMUWVDVY4cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1990
+ const sourceExplorerUrl = _chunkR2HP743Tcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
1991
+ const bridgeExplorerUrl = bridgeTxHash ? _chunkR2HP743Tcjs.getExplorerTxUrl.call(void 0, targetChain, bridgeTxHash) : null;
1992
+ const destExplorerUrl = destinationTxHash ? _chunkR2HP743Tcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
1993
1993
  const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
1994
- const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
1995
- const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkMUWVDVY4cjs.getTokenDecimalsByAddress.call(void 0,
1994
+ const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkR2HP743Tcjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
1995
+ const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkR2HP743Tcjs.getTokenDecimalsByAddress.call(void 0,
1996
1996
  displaySourceToken,
1997
1997
  displaySourceChain
1998
1998
  ) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
@@ -2013,7 +2013,7 @@ function ProcessingStep({
2013
2013
  const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
2014
2014
  const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
2015
2015
  const headerTitle = isFailed ? `${flowCapitalized} could not be completed` : isComplete ? isEarlyComplete ? `${flowCapitalized} confirmed` : `${flowCapitalized} successful` : delayPhaseId === "received" ? "Bridge pending" : delayPhaseId === "bridging" ? "Bridge delayed" : delayPhaseId === "confirming" ? `Confirming ${flowNoun}` : `Submitting transaction...`;
2016
- const headerDescription = isFailed ? _nullishCoalesce(failureMessage, () => ( "The transfer could not be completed.")) : isComplete ? directTransfer ? "Your transfer is complete." : isEarlyComplete ? "The bridge has started. Funds will arrive shortly." : "Your funds were successfully deposited." : delayPhaseId === "received" ? "Funds are in. We are still waiting for the bridge transaction to begin." : delayPhaseId === "bridging" ? "The bridge has started but settlement is taking longer than expected." : delayPhaseId === "confirming" ? "The source transaction has not been picked up yet, but we are still polling automatically." : _optionalChain([state, 'access', _154 => _154.lastEvent, 'optionalAccess', _155 => _155.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _156 => _156.lastEvent, 'optionalAccess', _157 => _157.type]) === "bridge-started" ? `Bridge started. Sending funds to ${_chunkMUWVDVY4cjs.getChainName.call(void 0, targetChain)}.` : "Filling your transaction on the blockchain.";
2016
+ const headerDescription = isFailed ? _nullishCoalesce(failureMessage, () => ( "The transfer could not be completed.")) : isComplete ? directTransfer ? "Your transfer is complete." : isEarlyComplete ? "The bridge has started. Funds will arrive shortly." : "Your funds were successfully deposited." : delayPhaseId === "received" ? "Funds are in. We are still waiting for the bridge transaction to begin." : delayPhaseId === "bridging" ? "The bridge has started but settlement is taking longer than expected." : delayPhaseId === "confirming" ? "The source transaction has not been picked up yet, but we are still polling automatically." : _optionalChain([state, 'access', _154 => _154.lastEvent, 'optionalAccess', _155 => _155.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _156 => _156.lastEvent, 'optionalAccess', _157 => _157.type]) === "bridge-started" ? `Bridge started. Sending funds to ${_chunkR2HP743Tcjs.getChainName.call(void 0, targetChain)}.` : "Filling your transaction on the blockchain.";
2017
2017
  const showAlert = !isFailed && (delayPhaseId !== void 0 || hasEscalatedDelay);
2018
2018
  const alertMessage = hasEscalatedDelay ? "Taking longer than expected. You can close this window \u2014 processing continues in the background." : "This step is slower than usual but still processing.";
2019
2019
  const fillStatus = isComplete ? "Successful" : isFailed ? "Failed" : "Processing";
@@ -2095,15 +2095,15 @@ function ProcessingStep({
2095
2095
  className: "rs-card-value",
2096
2096
  style: { display: "flex", alignItems: "center", gap: 6 },
2097
2097
  children: [
2098
- _chunkMUWVDVY4cjs.getChainIcon.call(void 0, displaySourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2098
+ _chunkR2HP743Tcjs.getChainIcon.call(void 0, displaySourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2099
2099
  "img",
2100
2100
  {
2101
- src: _chunkMUWVDVY4cjs.getChainIcon.call(void 0, displaySourceChain),
2101
+ src: _chunkR2HP743Tcjs.getChainIcon.call(void 0, displaySourceChain),
2102
2102
  alt: "",
2103
2103
  style: { width: 16, height: 16, borderRadius: 3 }
2104
2104
  }
2105
2105
  ),
2106
- _chunkMUWVDVY4cjs.getChainName.call(void 0, displaySourceChain),
2106
+ _chunkR2HP743Tcjs.getChainName.call(void 0, displaySourceChain),
2107
2107
  sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2108
2108
  "a",
2109
2109
  {
@@ -2126,15 +2126,15 @@ function ProcessingStep({
2126
2126
  className: "rs-card-value",
2127
2127
  style: { display: "flex", alignItems: "center", gap: 6 },
2128
2128
  children: [
2129
- _chunkMUWVDVY4cjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2129
+ _chunkR2HP743Tcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2130
2130
  "img",
2131
2131
  {
2132
- src: _chunkMUWVDVY4cjs.getChainIcon.call(void 0, targetChain),
2132
+ src: _chunkR2HP743Tcjs.getChainIcon.call(void 0, targetChain),
2133
2133
  alt: "",
2134
2134
  style: { width: 16, height: 16, borderRadius: 3 }
2135
2135
  }
2136
2136
  ),
2137
- _chunkMUWVDVY4cjs.getChainName.call(void 0, targetChain),
2137
+ _chunkR2HP743Tcjs.getChainName.call(void 0, targetChain),
2138
2138
  destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2139
2139
  "a",
2140
2140
  {
@@ -2158,10 +2158,10 @@ function ProcessingStep({
2158
2158
  className: "rs-card-value",
2159
2159
  style: { display: "flex", alignItems: "center", gap: 6 },
2160
2160
  children: [
2161
- _chunkMUWVDVY4cjs.getTokenIcon.call(void 0, sourceSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2161
+ _chunkR2HP743Tcjs.getTokenIcon.call(void 0, sourceSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2162
2162
  "img",
2163
2163
  {
2164
- src: _chunkMUWVDVY4cjs.getTokenIcon.call(void 0, sourceSymbol),
2164
+ src: _chunkR2HP743Tcjs.getTokenIcon.call(void 0, sourceSymbol),
2165
2165
  alt: "",
2166
2166
  style: { width: 16, height: 16, borderRadius: "50%" }
2167
2167
  }
@@ -2293,7 +2293,7 @@ var clientCache = /* @__PURE__ */ new Map();
2293
2293
  function getPublicClient(chainId) {
2294
2294
  let client = clientCache.get(chainId);
2295
2295
  if (!client) {
2296
- const chain = _chunkMUWVDVY4cjs.CHAIN_BY_ID[chainId];
2296
+ const chain = _chunkR2HP743Tcjs.CHAIN_BY_ID[chainId];
2297
2297
  client = _viem.createPublicClient.call(void 0, {
2298
2298
  chain,
2299
2299
  transport: _viem.http.call(void 0, )