@rhinestone/deposit-modal 0.3.0-alpha.13 → 0.3.0-alpha.15
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-HBAWSK6K.mjs → DepositModalReown-CAX35NN2.mjs} +4 -4
- package/dist/{DepositModalReown-CXPRZRXL.cjs → DepositModalReown-P4QGKQRZ.cjs} +7 -7
- package/dist/{QRCode-KG47KTGX.cjs → QRCode-5DXFNKI2.cjs} +1 -1
- package/dist/{QRCode-YJ3EGWQS.mjs → QRCode-WUC652SH.mjs} +1 -1
- package/dist/{WithdrawModalReown-EEWQRENY.mjs → WithdrawModalReown-V4YYPNBE.mjs} +4 -4
- package/dist/{WithdrawModalReown-T3TPJIME.cjs → WithdrawModalReown-ZSFALZOB.cjs} +7 -7
- package/dist/{chunk-PWV2UJP3.cjs → chunk-6O4NGY2N.cjs} +5 -5
- package/dist/{chunk-SZIYS42B.mjs → chunk-7C4SPVM5.mjs} +6 -2
- package/dist/{chunk-6RCOF3XU.cjs → chunk-7LJYEGZZ.cjs} +93 -93
- package/dist/{chunk-DZNXG5JK.cjs → chunk-7NO7WVJV.cjs} +35 -28
- package/dist/{chunk-SEOQ66FW.cjs → chunk-AAQPYKBA.cjs} +397 -355
- package/dist/{chunk-7JIDIX27.cjs → chunk-DZ2RPLBM.cjs} +7 -3
- package/dist/{chunk-YB3JPWJW.mjs → chunk-H2WSFD53.mjs} +2 -2
- package/dist/{chunk-6K4JHM2D.mjs → chunk-IZMF2WHM.mjs} +12 -5
- package/dist/{chunk-HZBO2SIZ.mjs → chunk-KDJS56TQ.mjs} +97 -55
- package/dist/{chunk-EC63ZHY4.mjs → chunk-LDMY67HP.mjs} +3 -3
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +4 -4
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -4
- package/dist/styles.css +60 -65
- package/dist/{types-C8i2ebY1.d.cts → types-cXr3j4NV.d.cts} +26 -0
- package/dist/{types-C8i2ebY1.d.ts → types-cXr3j4NV.d.ts} +26 -0
- package/dist/withdraw.cjs +4 -4
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +3 -3
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkDZ2RPLBMcjs = require('./chunk-DZ2RPLBM.cjs');
|
|
15
15
|
|
|
16
16
|
// src/components/ui/Modal.tsx
|
|
17
17
|
|
|
@@ -897,7 +897,7 @@ function createDepositService(baseUrl, options) {
|
|
|
897
897
|
},
|
|
898
898
|
async checkLiquidity(params) {
|
|
899
899
|
if (params.destinationChainId === "solana") {
|
|
900
|
-
const token =
|
|
900
|
+
const token = _chunkDZ2RPLBMcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
901
901
|
return {
|
|
902
902
|
hasLiquidity: true,
|
|
903
903
|
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _23 => _23.symbol]), () => ( "Token")),
|
|
@@ -1150,14 +1150,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1150
1150
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _28 => _28.balance, 'optionalAccess', _29 => _29.unlocked]), () => ( "0"));
|
|
1151
1151
|
const normalizedName = tokenData.tokenName.trim();
|
|
1152
1152
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
1153
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
1154
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
1153
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkDZ2RPLBMcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
1154
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkDZ2RPLBMcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
1155
1155
|
if (!resolvedTokenAddress) {
|
|
1156
1156
|
continue;
|
|
1157
1157
|
}
|
|
1158
|
-
const registrySymbol =
|
|
1158
|
+
const registrySymbol = _chunkDZ2RPLBMcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
1159
1159
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
1160
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1160
|
+
const decimals = registrySymbol !== "Token" ? _chunkDZ2RPLBMcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
1161
1161
|
tokens.push({
|
|
1162
1162
|
chainId: chainBalance.chainId,
|
|
1163
1163
|
address: resolvedTokenAddress,
|
|
@@ -1186,14 +1186,14 @@ function normalizeDirectToken(token) {
|
|
|
1186
1186
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
1187
1187
|
token.token,
|
|
1188
1188
|
"address"
|
|
1189
|
-
))), () => ( (typeof chainId === "number" ?
|
|
1189
|
+
))), () => ( (typeof chainId === "number" ? _chunkDZ2RPLBMcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
|
|
1190
1190
|
if (!address) return null;
|
|
1191
1191
|
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));
|
|
1192
1192
|
const isSolanaToken = chainId === "solana";
|
|
1193
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1193
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkDZ2RPLBMcjs.getTokenSymbol.call(void 0, address, chainId);
|
|
1194
1194
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
1195
1195
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
1196
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1196
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkDZ2RPLBMcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
1197
1197
|
return {
|
|
1198
1198
|
chainId,
|
|
1199
1199
|
address,
|
|
@@ -2011,7 +2011,7 @@ var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fra
|
|
|
2011
2011
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
|
|
2012
2012
|
"+100 wallets"
|
|
2013
2013
|
] });
|
|
2014
|
-
var EXTRA_CHAIN_COUNT = Math.max(0,
|
|
2014
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunkDZ2RPLBMcjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
2015
2015
|
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2016
2016
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
2017
2017
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT} chains` : "All chains"
|
|
@@ -2063,11 +2063,9 @@ function ConnectStep({
|
|
|
2063
2063
|
{
|
|
2064
2064
|
leading: TRANSFER_CRYPTO_LEADING,
|
|
2065
2065
|
title: "Transfer crypto",
|
|
2066
|
-
subtitle: transferCryptoState === "
|
|
2066
|
+
subtitle: transferCryptoState === "error" ? _nullishCoalesce(transferCryptoErrorReason, () => ( "Couldn't prepare account \u2014 tap to retry")) : "Instant - No limit",
|
|
2067
2067
|
meta: CHAIN_BADGE_META,
|
|
2068
|
-
onClick: onSelectTransferCrypto
|
|
2069
|
-
disabled: transferCryptoState === "loading",
|
|
2070
|
-
trailing: transferCryptoState === "loading" ? SMALL_SPINNER : void 0
|
|
2068
|
+
onClick: onSelectTransferCrypto
|
|
2071
2069
|
}
|
|
2072
2070
|
),
|
|
2073
2071
|
fiatPaymentMethods && fiatPaymentMethods.length > 0 && onSelectFiatMethod ? fiatPaymentMethods.map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2705,6 +2703,7 @@ function ProcessingStep({
|
|
|
2705
2703
|
amount,
|
|
2706
2704
|
sourceSymbol: providedSourceSymbol,
|
|
2707
2705
|
sourceDecimals: providedSourceDecimals,
|
|
2706
|
+
amountUsd,
|
|
2708
2707
|
hasPostBridgeActions,
|
|
2709
2708
|
service,
|
|
2710
2709
|
directTransfer,
|
|
@@ -2730,6 +2729,8 @@ function ProcessingStep({
|
|
|
2730
2729
|
amount,
|
|
2731
2730
|
sourceChain,
|
|
2732
2731
|
sourceToken,
|
|
2732
|
+
sourceDecimals: providedSourceDecimals,
|
|
2733
|
+
amountUsd,
|
|
2733
2734
|
targetChain,
|
|
2734
2735
|
targetToken,
|
|
2735
2736
|
hasPostBridgeActions
|
|
@@ -2777,6 +2778,8 @@ function ProcessingStep({
|
|
|
2777
2778
|
amount: context.amount,
|
|
2778
2779
|
sourceChain: context.sourceChain,
|
|
2779
2780
|
sourceToken: context.sourceToken,
|
|
2781
|
+
sourceDecimals: context.sourceDecimals,
|
|
2782
|
+
amountUsd: context.amountUsd,
|
|
2780
2783
|
targetChain: context.targetChain,
|
|
2781
2784
|
targetToken: context.targetToken
|
|
2782
2785
|
})]);
|
|
@@ -2875,6 +2878,8 @@ function ProcessingStep({
|
|
|
2875
2878
|
amount: context.amount,
|
|
2876
2879
|
sourceChain: context.sourceChain,
|
|
2877
2880
|
sourceToken: context.sourceToken,
|
|
2881
|
+
sourceDecimals: context.sourceDecimals,
|
|
2882
|
+
amountUsd: context.amountUsd,
|
|
2878
2883
|
targetChain: context.targetChain,
|
|
2879
2884
|
targetToken: context.targetToken
|
|
2880
2885
|
})]);
|
|
@@ -2908,6 +2913,8 @@ function ProcessingStep({
|
|
|
2908
2913
|
amount: context.amount,
|
|
2909
2914
|
sourceChain: context.sourceChain,
|
|
2910
2915
|
sourceToken: context.sourceToken,
|
|
2916
|
+
sourceDecimals: context.sourceDecimals,
|
|
2917
|
+
amountUsd: context.amountUsd,
|
|
2911
2918
|
targetChain: context.targetChain,
|
|
2912
2919
|
targetToken: context.targetToken
|
|
2913
2920
|
})]);
|
|
@@ -3018,11 +3025,11 @@ function ProcessingStep({
|
|
|
3018
3025
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
3019
3026
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
3020
3027
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
3021
|
-
const sourceExplorerUrl =
|
|
3022
|
-
const destExplorerUrl = destinationTxHash ?
|
|
3028
|
+
const sourceExplorerUrl = _chunkDZ2RPLBMcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
3029
|
+
const destExplorerUrl = destinationTxHash ? _chunkDZ2RPLBMcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
3023
3030
|
const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
|
|
3024
|
-
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ?
|
|
3025
|
-
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ?
|
|
3031
|
+
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkDZ2RPLBMcjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
|
|
3032
|
+
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkDZ2RPLBMcjs.getTokenDecimalsByAddress.call(void 0,
|
|
3026
3033
|
displaySourceToken,
|
|
3027
3034
|
displaySourceChain
|
|
3028
3035
|
) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
|
|
@@ -3091,15 +3098,15 @@ function ProcessingStep({
|
|
|
3091
3098
|
void delayPhaseId;
|
|
3092
3099
|
void hasEscalatedDelay;
|
|
3093
3100
|
const targetSymbol = (() => {
|
|
3094
|
-
const resolved =
|
|
3101
|
+
const resolved = _chunkDZ2RPLBMcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChain);
|
|
3095
3102
|
return resolved !== "Token" ? resolved : _nullishCoalesce(providedSourceSymbol, () => ( "USDC"));
|
|
3096
3103
|
})();
|
|
3097
|
-
const targetTokenIcon =
|
|
3098
|
-
const sourceChainIcon =
|
|
3099
|
-
const targetChainIcon =
|
|
3100
|
-
const sourceTokenIcon =
|
|
3101
|
-
const sourceChainName =
|
|
3102
|
-
const targetChainName =
|
|
3104
|
+
const targetTokenIcon = _chunkDZ2RPLBMcjs.getTokenIcon.call(void 0, targetSymbol);
|
|
3105
|
+
const sourceChainIcon = _chunkDZ2RPLBMcjs.getChainIcon.call(void 0, displaySourceChain);
|
|
3106
|
+
const targetChainIcon = _chunkDZ2RPLBMcjs.getChainIcon.call(void 0, targetChain);
|
|
3107
|
+
const sourceTokenIcon = _chunkDZ2RPLBMcjs.getTokenIcon.call(void 0, sourceSymbol);
|
|
3108
|
+
const sourceChainName = _chunkDZ2RPLBMcjs.getChainName.call(void 0, displaySourceChain);
|
|
3109
|
+
const targetChainName = _chunkDZ2RPLBMcjs.getChainName.call(void 0, targetChain);
|
|
3103
3110
|
const timerText = formatTimer(elapsedSeconds);
|
|
3104
3111
|
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _163 => _163.feeSponsored]), () => ( false));
|
|
3105
3112
|
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _164 => _164.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
@@ -3322,7 +3329,7 @@ async function executeSafeEthTransfer(params) {
|
|
|
3322
3329
|
throw new Error("Wallet not connected");
|
|
3323
3330
|
}
|
|
3324
3331
|
if (chain.id !== chainId) {
|
|
3325
|
-
throw new Error(`Switch to ${
|
|
3332
|
+
throw new Error(`Switch to ${_chunkDZ2RPLBMcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
3326
3333
|
}
|
|
3327
3334
|
const isOwner = await publicClient.readContract({
|
|
3328
3335
|
address: safeAddress,
|
|
@@ -3405,7 +3412,7 @@ async function executeSafeErc20Transfer(params) {
|
|
|
3405
3412
|
throw new Error("Wallet not connected");
|
|
3406
3413
|
}
|
|
3407
3414
|
if (chain.id !== chainId) {
|
|
3408
|
-
throw new Error(`Switch to ${
|
|
3415
|
+
throw new Error(`Switch to ${_chunkDZ2RPLBMcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
3409
3416
|
}
|
|
3410
3417
|
const isOwner = await publicClient.readContract({
|
|
3411
3418
|
address: safeAddress,
|
|
@@ -3535,7 +3542,7 @@ var clientCache = /* @__PURE__ */ new Map();
|
|
|
3535
3542
|
function getPublicClient(chainId) {
|
|
3536
3543
|
let client = clientCache.get(chainId);
|
|
3537
3544
|
if (!client) {
|
|
3538
|
-
const chain =
|
|
3545
|
+
const chain = _chunkDZ2RPLBMcjs.CHAIN_BY_ID[chainId];
|
|
3539
3546
|
client = _viem.createPublicClient.call(void 0, {
|
|
3540
3547
|
chain,
|
|
3541
3548
|
transport: _viem.http.call(void 0, )
|