@rhinestone/deposit-modal 0.1.44 → 0.1.45
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.
- package/dist/{DepositModalReown-C7NWCRTI.cjs → DepositModalReown-2QKLWRRU.cjs} +7 -7
- package/dist/{DepositModalReown-AY4LO4QK.mjs → DepositModalReown-DXQJUYVY.mjs} +4 -4
- package/dist/{WithdrawModalReown-GCOVYZN2.cjs → WithdrawModalReown-CT6E2F2J.cjs} +7 -7
- package/dist/{WithdrawModalReown-7CSCY55U.mjs → WithdrawModalReown-FM2TJFOV.mjs} +4 -4
- package/dist/{chunk-37CTMJMO.cjs → chunk-2EGNK737.cjs} +60 -60
- package/dist/{chunk-KWAFKVV6.mjs → chunk-4MKJ5R6Q.mjs} +3 -3
- package/dist/{chunk-LT3QKJI2.cjs → chunk-55QIUUIS.cjs} +26 -26
- package/dist/{chunk-ZJQZEIHA.mjs → chunk-AVASFOLP.mjs} +5 -7
- package/dist/{chunk-COA6XZYE.cjs → chunk-B5H3CVAN.cjs} +153 -153
- package/dist/{chunk-MBOH6XW3.mjs → chunk-JGB6XSYS.mjs} +2 -1
- package/dist/{chunk-IBPVZH5W.mjs → chunk-RVN4K6C7.mjs} +3 -3
- package/dist/{chunk-QIK6ONMQ.mjs → chunk-U6KOKXWY.mjs} +1 -1
- package/dist/{chunk-PWPW7GFB.cjs → chunk-XLRQCIYD.cjs} +2 -1
- package/dist/{chunk-NELAYNA3.cjs → chunk-ZNHU72LI.cjs} +5 -7
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +4 -4
- package/dist/reown.cjs +5 -5
- package/dist/reown.mjs +4 -4
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.mjs +3 -3
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkZNHU72LIcjs = require('./chunk-ZNHU72LI.cjs');
|
|
11
11
|
|
|
12
12
|
// src/components/ui/Modal.tsx
|
|
13
13
|
|
|
@@ -619,14 +619,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
619
619
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _17 => _17.balance, 'optionalAccess', _18 => _18.unlocked]), () => ( "0"));
|
|
620
620
|
const normalizedName = tokenData.tokenName.trim();
|
|
621
621
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
622
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
623
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
622
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkZNHU72LIcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
623
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkZNHU72LIcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
624
624
|
if (!resolvedTokenAddress) {
|
|
625
625
|
continue;
|
|
626
626
|
}
|
|
627
|
-
const registrySymbol =
|
|
627
|
+
const registrySymbol = _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
628
628
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
629
|
-
const decimals = registrySymbol !== "Token" ?
|
|
629
|
+
const decimals = registrySymbol !== "Token" ? _chunkZNHU72LIcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
630
630
|
tokens.push({
|
|
631
631
|
chainId: chainBalance.chainId,
|
|
632
632
|
address: resolvedTokenAddress,
|
|
@@ -655,14 +655,14 @@ function normalizeDirectToken(token) {
|
|
|
655
655
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
656
656
|
token.token,
|
|
657
657
|
"address"
|
|
658
|
-
))), () => ( (typeof chainId === "number" ?
|
|
658
|
+
))), () => ( (typeof chainId === "number" ? _chunkZNHU72LIcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
|
|
659
659
|
if (!address) return null;
|
|
660
660
|
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));
|
|
661
661
|
const isSolanaToken = chainId === "solana";
|
|
662
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
662
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, address, chainId);
|
|
663
663
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
664
664
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
665
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
665
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkZNHU72LIcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
666
666
|
return {
|
|
667
667
|
chainId,
|
|
668
668
|
address,
|
|
@@ -1599,8 +1599,8 @@ function ProcessingStep({
|
|
|
1599
1599
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
1600
1600
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
1601
1601
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
1602
|
-
const sourceExplorerUrl =
|
|
1603
|
-
const destExplorerUrl = destinationTxHash ?
|
|
1602
|
+
const sourceExplorerUrl = _chunkZNHU72LIcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
1603
|
+
const destExplorerUrl = destinationTxHash ? _chunkZNHU72LIcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
1604
1604
|
const truncateHash = (hash) => `${hash.slice(0, 10)}...${hash.slice(-8)}`;
|
|
1605
1605
|
const formatElapsedTime = (seconds) => {
|
|
1606
1606
|
if (seconds < 60) return `${seconds} second${seconds !== 1 ? "s" : ""}`;
|
|
@@ -1609,8 +1609,8 @@ function ProcessingStep({
|
|
|
1609
1609
|
return `${mins}m ${secs}s`;
|
|
1610
1610
|
};
|
|
1611
1611
|
const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
|
|
1612
|
-
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ?
|
|
1613
|
-
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ?
|
|
1612
|
+
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkZNHU72LIcjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
|
|
1613
|
+
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkZNHU72LIcjs.getTokenDecimalsByAddress.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
|
|
1614
1614
|
const formattedReceivedAmount = (() => {
|
|
1615
1615
|
try {
|
|
1616
1616
|
const raw = _viem.formatUnits.call(void 0, BigInt(displayAmount), sourceDecimals);
|
|
@@ -1681,15 +1681,15 @@ function ProcessingStep({
|
|
|
1681
1681
|
className: "rs-card-value",
|
|
1682
1682
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1683
1683
|
children: [
|
|
1684
|
-
|
|
1684
|
+
_chunkZNHU72LIcjs.getChainIcon.call(void 0, displaySourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1685
1685
|
"img",
|
|
1686
1686
|
{
|
|
1687
|
-
src:
|
|
1687
|
+
src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, displaySourceChain),
|
|
1688
1688
|
alt: "",
|
|
1689
1689
|
style: { width: 14, height: 14, borderRadius: "50%" }
|
|
1690
1690
|
}
|
|
1691
1691
|
),
|
|
1692
|
-
|
|
1692
|
+
_chunkZNHU72LIcjs.getChainName.call(void 0, displaySourceChain)
|
|
1693
1693
|
]
|
|
1694
1694
|
}
|
|
1695
1695
|
)
|
|
@@ -1702,15 +1702,15 @@ function ProcessingStep({
|
|
|
1702
1702
|
className: "rs-card-value",
|
|
1703
1703
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1704
1704
|
children: [
|
|
1705
|
-
|
|
1705
|
+
_chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1706
1706
|
"img",
|
|
1707
1707
|
{
|
|
1708
|
-
src:
|
|
1708
|
+
src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain),
|
|
1709
1709
|
alt: "",
|
|
1710
1710
|
style: { width: 14, height: 14, borderRadius: "50%" }
|
|
1711
1711
|
}
|
|
1712
1712
|
),
|
|
1713
|
-
|
|
1713
|
+
_chunkZNHU72LIcjs.getChainName.call(void 0, targetChain)
|
|
1714
1714
|
]
|
|
1715
1715
|
}
|
|
1716
1716
|
)
|
|
@@ -1832,7 +1832,7 @@ function ProcessingStep({
|
|
|
1832
1832
|
{
|
|
1833
1833
|
className: `rs-step-description ${isError ? "rs-text-error" : "rs-text-secondary"}`,
|
|
1834
1834
|
children: [
|
|
1835
|
-
state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _104 => _104.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _105 => _105.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${
|
|
1835
|
+
state.type === "processing" && (_optionalChain([lastEvent, 'optionalAccess', _104 => _104.type]) === "deposit-received" ? "Transfer received. Preparing bridge..." : _optionalChain([lastEvent, 'optionalAccess', _105 => _105.type]) === "bridge-started" ? "Transfer confirmed. Funds arriving shortly..." : `Bridging your ${flowNoun} to ${_chunkZNHU72LIcjs.getChainName.call(void 0, targetChain)}.`),
|
|
1836
1836
|
state.type === "failed" && state.message,
|
|
1837
1837
|
state.type === "error" && state.message
|
|
1838
1838
|
]
|
|
@@ -1888,15 +1888,15 @@ function ProcessingStep({
|
|
|
1888
1888
|
className: "rs-card-value",
|
|
1889
1889
|
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
1890
1890
|
children: [
|
|
1891
|
-
|
|
1891
|
+
_chunkZNHU72LIcjs.getChainIcon.call(void 0, displaySourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1892
1892
|
"img",
|
|
1893
1893
|
{
|
|
1894
|
-
src:
|
|
1894
|
+
src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, displaySourceChain),
|
|
1895
1895
|
alt: "",
|
|
1896
1896
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1897
1897
|
}
|
|
1898
1898
|
),
|
|
1899
|
-
|
|
1899
|
+
_chunkZNHU72LIcjs.getChainName.call(void 0, displaySourceChain)
|
|
1900
1900
|
]
|
|
1901
1901
|
}
|
|
1902
1902
|
)
|
|
@@ -1909,15 +1909,15 @@ function ProcessingStep({
|
|
|
1909
1909
|
className: "rs-card-value",
|
|
1910
1910
|
style: { display: "flex", alignItems: "center", gap: 8 },
|
|
1911
1911
|
children: [
|
|
1912
|
-
|
|
1912
|
+
_chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1913
1913
|
"img",
|
|
1914
1914
|
{
|
|
1915
|
-
src:
|
|
1915
|
+
src: _chunkZNHU72LIcjs.getChainIcon.call(void 0, targetChain),
|
|
1916
1916
|
alt: "",
|
|
1917
1917
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1918
1918
|
}
|
|
1919
1919
|
),
|
|
1920
|
-
|
|
1920
|
+
_chunkZNHU72LIcjs.getChainName.call(void 0, targetChain)
|
|
1921
1921
|
]
|
|
1922
1922
|
}
|
|
1923
1923
|
)
|
|
@@ -1970,7 +1970,7 @@ var clientCache = /* @__PURE__ */ new Map();
|
|
|
1970
1970
|
function getPublicClient(chainId) {
|
|
1971
1971
|
let client = clientCache.get(chainId);
|
|
1972
1972
|
if (!client) {
|
|
1973
|
-
const chain =
|
|
1973
|
+
const chain = _chunkZNHU72LIcjs.CHAIN_BY_ID[chainId];
|
|
1974
1974
|
client = _viem.createPublicClient.call(void 0, {
|
|
1975
1975
|
chain,
|
|
1976
1976
|
transport: _viem.http.call(void 0, )
|
|
@@ -23,10 +23,10 @@ var ALL_CHAINS_BY_ID = {
|
|
|
23
23
|
[soneium.id]: soneium
|
|
24
24
|
};
|
|
25
25
|
var SUPPORTED_TOKEN_MATRIX = {
|
|
26
|
-
ETH: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id
|
|
27
|
-
WETH: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id
|
|
28
|
-
USDC: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id
|
|
29
|
-
USDT: [mainnet.id, arbitrum.id, polygon.id, bsc.id
|
|
26
|
+
ETH: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id],
|
|
27
|
+
WETH: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id],
|
|
28
|
+
USDC: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id],
|
|
29
|
+
USDT: [mainnet.id, arbitrum.id, polygon.id, bsc.id]
|
|
30
30
|
};
|
|
31
31
|
var CHAIN_DISPLAY_ORDER = [
|
|
32
32
|
mainnet.id,
|
|
@@ -34,9 +34,7 @@ var CHAIN_DISPLAY_ORDER = [
|
|
|
34
34
|
arbitrum.id,
|
|
35
35
|
optimism.id,
|
|
36
36
|
polygon.id,
|
|
37
|
-
bsc.id
|
|
38
|
-
plasma.id,
|
|
39
|
-
soneium.id
|
|
37
|
+
bsc.id
|
|
40
38
|
];
|
|
41
39
|
var supportedChainSet = /* @__PURE__ */ new Set();
|
|
42
40
|
for (const chainIds of Object.values(SUPPORTED_TOKEN_MATRIX)) {
|