@rhinestone/deposit-modal 0.1.53 → 0.1.54
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-LNZ46L4O.mjs → DepositModalReown-5QKEE7R3.mjs} +3 -3
- package/dist/{DepositModalReown-OXAW4Y7O.cjs → DepositModalReown-XKP2Z55X.cjs} +4 -4
- package/dist/{WithdrawModalReown-EE74V66X.mjs → WithdrawModalReown-DN6OKFGR.mjs} +3 -3
- package/dist/{WithdrawModalReown-V3ZJESQ5.cjs → WithdrawModalReown-ZQCNJLSP.cjs} +4 -4
- package/dist/{chunk-ZB5Y2ACC.mjs → chunk-AJUR6FAP.mjs} +23 -8
- package/dist/{chunk-ZJQZEIHA.mjs → chunk-CIXHTOO3.mjs} +1 -1
- package/dist/{chunk-DBBSH7HP.cjs → chunk-EAEDK474.cjs} +58 -32
- package/dist/{chunk-K57KO3SW.cjs → chunk-GOMHX544.cjs} +80 -74
- package/dist/{chunk-REDAO3MS.mjs → chunk-JQTV5JTB.mjs} +37 -11
- package/dist/{chunk-47WDWD6Z.cjs → chunk-QJVXCBUI.cjs} +231 -216
- package/dist/{chunk-NELAYNA3.cjs → chunk-R6U6BHCV.cjs} +1 -1
- package/dist/{chunk-4BL7RCZB.mjs → chunk-XXB2LVUB.mjs} +23 -17
- 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/reown.cjs +5 -5
- package/dist/reown.d.cts +1 -1
- package/dist/reown.d.ts +1 -1
- package/dist/reown.mjs +4 -4
- package/dist/styles.css +45 -55
- package/dist/{types-D1nvo2dK.d.ts → types-BPE95RUG.d.ts} +2 -0
- package/dist/{types-DgiqazTb.d.cts → types-Cm5vGVK2.d.cts} +2 -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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AJUR6FAP.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-MBURQ26S.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JQTV5JTB.mjs";
|
|
9
|
+
import "./chunk-CIXHTOO3.mjs";
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
12
12
|
import { useCallback, useMemo } from "react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQJVXCBUIcjs = require('./chunk-QJVXCBUI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-EAEDK474.cjs');
|
|
9
|
+
require('./chunk-R6U6BHCV.cjs');
|
|
10
10
|
|
|
11
11
|
// src/DepositModalReown.tsx
|
|
12
12
|
var _react = require('react');
|
|
@@ -32,7 +32,7 @@ function DepositModalWithReown(props) {
|
|
|
32
32
|
reown.disconnect();
|
|
33
33
|
}, [reown.disconnect]);
|
|
34
34
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
35
|
-
|
|
35
|
+
_chunkQJVXCBUIcjs.DepositModalInner,
|
|
36
36
|
{
|
|
37
37
|
...props,
|
|
38
38
|
reownWallet: reownWithSolana,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WithdrawModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XXB2LVUB.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ReownWalletProvider,
|
|
6
6
|
useReownWallet
|
|
7
7
|
} from "./chunk-MBURQ26S.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JQTV5JTB.mjs";
|
|
9
|
+
import "./chunk-CIXHTOO3.mjs";
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
12
12
|
import { useCallback } from "react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGOMHX544cjs = require('./chunk-GOMHX544.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-EAEDK474.cjs');
|
|
9
|
+
require('./chunk-R6U6BHCV.cjs');
|
|
10
10
|
|
|
11
11
|
// src/WithdrawModalReown.tsx
|
|
12
12
|
var _react = require('react');
|
|
@@ -20,7 +20,7 @@ function WithdrawModalWithReown(props) {
|
|
|
20
20
|
reown.disconnect();
|
|
21
21
|
}, [reown.disconnect]);
|
|
22
22
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
23
|
-
|
|
23
|
+
_chunkGOMHX544cjs.WithdrawModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
toEvmCaip2,
|
|
26
26
|
tokenFormatter,
|
|
27
27
|
txRefsMatch
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JQTV5JTB.mjs";
|
|
29
29
|
import {
|
|
30
30
|
DEFAULT_BACKEND_URL,
|
|
31
31
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
getTokenIcon,
|
|
42
42
|
getTokenSymbol,
|
|
43
43
|
isStablecoinSymbol
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CIXHTOO3.mjs";
|
|
45
45
|
|
|
46
46
|
// src/DepositModal.tsx
|
|
47
47
|
import {
|
|
@@ -1453,11 +1453,23 @@ function DepositAddressStep({
|
|
|
1453
1453
|
smartAccount,
|
|
1454
1454
|
solanaDepositAddress,
|
|
1455
1455
|
service,
|
|
1456
|
+
allowedRoutes,
|
|
1456
1457
|
onDepositDetected,
|
|
1457
1458
|
onError
|
|
1458
1459
|
}) {
|
|
1459
1460
|
const hasSolana = Boolean(solanaDepositAddress);
|
|
1460
|
-
const
|
|
1461
|
+
const allowedChainSet = useMemo4(
|
|
1462
|
+
() => allowedRoutes?.sourceChains ? new Set(allowedRoutes.sourceChains) : null,
|
|
1463
|
+
[allowedRoutes?.sourceChains]
|
|
1464
|
+
);
|
|
1465
|
+
const allowedTokenSet = useMemo4(
|
|
1466
|
+
() => allowedRoutes?.sourceTokens ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null,
|
|
1467
|
+
[allowedRoutes?.sourceTokens]
|
|
1468
|
+
);
|
|
1469
|
+
const evmChainIds = useMemo4(() => {
|
|
1470
|
+
const all = getSupportedChainIds();
|
|
1471
|
+
return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
|
|
1472
|
+
}, [allowedChainSet]);
|
|
1461
1473
|
const chainOptions = useMemo4(
|
|
1462
1474
|
() => hasSolana ? [...evmChainIds, "solana"] : evmChainIds,
|
|
1463
1475
|
[evmChainIds, hasSolana]
|
|
@@ -1466,10 +1478,10 @@ function DepositAddressStep({
|
|
|
1466
1478
|
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
1467
1479
|
const [sourceChainId, setSourceChainId] = useState6(defaultChainId);
|
|
1468
1480
|
const isSolana = sourceChainId === "solana";
|
|
1469
|
-
const tokensForChain = useMemo4(
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
);
|
|
1481
|
+
const tokensForChain = useMemo4(() => {
|
|
1482
|
+
const all = isSolana ? SOLANA_TOKENS.map((t) => t.symbol) : getTargetTokenSymbolsForChain(sourceChainId);
|
|
1483
|
+
return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
|
|
1484
|
+
}, [sourceChainId, isSolana, allowedTokenSet]);
|
|
1473
1485
|
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
|
|
1474
1486
|
const [sourceTokenSymbol, setSourceTokenSymbol] = useState6(defaultToken);
|
|
1475
1487
|
useEffect6(() => {
|
|
@@ -3298,6 +3310,7 @@ function DepositFlow({
|
|
|
3298
3310
|
smartAccount: step.smartAccount,
|
|
3299
3311
|
solanaDepositAddress: enableSolana ? step.solanaDepositAddress : void 0,
|
|
3300
3312
|
service,
|
|
3313
|
+
allowedRoutes,
|
|
3301
3314
|
onDepositDetected: handleDepositAddressDetected,
|
|
3302
3315
|
onError: handleError
|
|
3303
3316
|
}
|
|
@@ -3557,7 +3570,7 @@ function DepositFlow({
|
|
|
3557
3570
|
// src/DepositModal.tsx
|
|
3558
3571
|
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3559
3572
|
var ReownDepositInner = lazy(
|
|
3560
|
-
() => import("./DepositModalReown-
|
|
3573
|
+
() => import("./DepositModalReown-5QKEE7R3.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
3561
3574
|
);
|
|
3562
3575
|
function DepositModal(props) {
|
|
3563
3576
|
const needsReown = !!props.reownAppId;
|
|
@@ -3593,6 +3606,7 @@ function DepositModalInner({
|
|
|
3593
3606
|
isOpen,
|
|
3594
3607
|
onClose,
|
|
3595
3608
|
inline,
|
|
3609
|
+
closeOnOverlayClick,
|
|
3596
3610
|
sourceChain: sourceChainProp,
|
|
3597
3611
|
sourceToken,
|
|
3598
3612
|
defaultAmount,
|
|
@@ -3682,6 +3696,7 @@ function DepositModalInner({
|
|
|
3682
3696
|
onClose,
|
|
3683
3697
|
className,
|
|
3684
3698
|
inline,
|
|
3699
|
+
closeOnOverlayClick,
|
|
3685
3700
|
children: /* @__PURE__ */ jsxs11("div", { ref: modalRef, className: "rs-modal", children: [
|
|
3686
3701
|
/* @__PURE__ */ jsxs11("div", { className: "rs-modal-header--redesigned", children: [
|
|
3687
3702
|
/* @__PURE__ */ jsx11("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && /* @__PURE__ */ jsx11(
|
|
@@ -26,7 +26,7 @@ var SUPPORTED_TOKEN_MATRIX = {
|
|
|
26
26
|
ETH: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id, soneium.id],
|
|
27
27
|
WETH: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id, soneium.id],
|
|
28
28
|
USDC: [mainnet.id, base.id, arbitrum.id, optimism.id, polygon.id, soneium.id],
|
|
29
|
-
USDT: [mainnet.id, arbitrum.id, polygon.id, bsc.id, plasma.id]
|
|
29
|
+
USDT: [mainnet.id, arbitrum.id, optimism.id, polygon.id, bsc.id, plasma.id]
|
|
30
30
|
};
|
|
31
31
|
var CHAIN_DISPLAY_ORDER = [
|
|
32
32
|
mainnet.id,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkR6U6BHCVcjs = require('./chunk-R6U6BHCV.cjs');
|
|
12
12
|
|
|
13
13
|
// src/components/ui/Modal.tsx
|
|
14
14
|
|
|
@@ -31,7 +31,8 @@ function Modal({
|
|
|
31
31
|
onClose,
|
|
32
32
|
children,
|
|
33
33
|
className = "",
|
|
34
|
-
inline = false
|
|
34
|
+
inline = false,
|
|
35
|
+
closeOnOverlayClick = false
|
|
35
36
|
}) {
|
|
36
37
|
const overlayRef = _react.useRef.call(void 0, null);
|
|
37
38
|
const contentRef = _react.useRef.call(void 0, null);
|
|
@@ -95,11 +96,11 @@ function Modal({
|
|
|
95
96
|
);
|
|
96
97
|
const handleOverlayClick = _react.useCallback.call(void 0,
|
|
97
98
|
(event) => {
|
|
98
|
-
if (event.target === overlayRef.current) {
|
|
99
|
+
if (closeOnOverlayClick && event.target === overlayRef.current) {
|
|
99
100
|
onClose();
|
|
100
101
|
}
|
|
101
102
|
},
|
|
102
|
-
[onClose]
|
|
103
|
+
[closeOnOverlayClick, onClose]
|
|
103
104
|
);
|
|
104
105
|
if (!isOpen) return null;
|
|
105
106
|
if (inline) {
|
|
@@ -620,14 +621,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
620
621
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _17 => _17.balance, 'optionalAccess', _18 => _18.unlocked]), () => ( "0"));
|
|
621
622
|
const normalizedName = tokenData.tokenName.trim();
|
|
622
623
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
623
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
624
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
624
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkR6U6BHCVcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
625
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkR6U6BHCVcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
625
626
|
if (!resolvedTokenAddress) {
|
|
626
627
|
continue;
|
|
627
628
|
}
|
|
628
|
-
const registrySymbol =
|
|
629
|
+
const registrySymbol = _chunkR6U6BHCVcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
629
630
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
630
|
-
const decimals = registrySymbol !== "Token" ?
|
|
631
|
+
const decimals = registrySymbol !== "Token" ? _chunkR6U6BHCVcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
631
632
|
tokens.push({
|
|
632
633
|
chainId: chainBalance.chainId,
|
|
633
634
|
address: resolvedTokenAddress,
|
|
@@ -656,14 +657,14 @@ function normalizeDirectToken(token) {
|
|
|
656
657
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
657
658
|
token.token,
|
|
658
659
|
"address"
|
|
659
|
-
))), () => ( (typeof chainId === "number" ?
|
|
660
|
+
))), () => ( (typeof chainId === "number" ? _chunkR6U6BHCVcjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
|
|
660
661
|
if (!address) return null;
|
|
661
662
|
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));
|
|
662
663
|
const isSolanaToken = chainId === "solana";
|
|
663
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
664
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkR6U6BHCVcjs.getTokenSymbol.call(void 0, address, chainId);
|
|
664
665
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
665
666
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
666
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
667
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkR6U6BHCVcjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
667
668
|
return {
|
|
668
669
|
chainId,
|
|
669
670
|
address,
|
|
@@ -766,21 +767,46 @@ function formatUserError(raw) {
|
|
|
766
767
|
if (lower.includes("execution reverted")) {
|
|
767
768
|
return "Transaction would fail on-chain";
|
|
768
769
|
}
|
|
770
|
+
if (lower.includes("timed out") || lower.includes("took too long")) {
|
|
771
|
+
return "Request timed out \u2014 please try again";
|
|
772
|
+
}
|
|
773
|
+
if (lower.includes("econnrefused") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("fetch failed")) {
|
|
774
|
+
return "Service unavailable \u2014 please try again";
|
|
775
|
+
}
|
|
769
776
|
if (lower.includes("recent blockhash") || lower.includes("latest blockhash")) {
|
|
770
777
|
return "Solana RPC unavailable \u2014 please retry";
|
|
771
778
|
}
|
|
772
779
|
if (lower.includes("network") || lower.includes("disconnected")) {
|
|
773
780
|
return "Network error \u2014 check your connection";
|
|
774
781
|
}
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
782
|
+
if (lower.includes("rate limit") || lower.includes("429")) {
|
|
783
|
+
return "Rate limited \u2014 please try again shortly";
|
|
784
|
+
}
|
|
785
|
+
let cleaned = raw;
|
|
786
|
+
const stripMarkers = [
|
|
787
|
+
"\n\nRequest Arguments:",
|
|
788
|
+
"\nRaw Call Arguments:",
|
|
789
|
+
"\nRequest body:",
|
|
790
|
+
"\nContract Call:",
|
|
791
|
+
"\nDocs:",
|
|
792
|
+
"\nDetails:",
|
|
793
|
+
"\nVersion:",
|
|
794
|
+
"\nURL:"
|
|
795
|
+
];
|
|
796
|
+
for (const marker of stripMarkers) {
|
|
797
|
+
const idx = cleaned.indexOf(marker);
|
|
798
|
+
if (idx !== -1) {
|
|
799
|
+
cleaned = cleaned.slice(0, idx).trim();
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
cleaned = cleaned.replace(/https?:\/\/\S+/g, "").trim();
|
|
803
|
+
if (cleaned.length === 0) {
|
|
804
|
+
return "An unexpected error occurred";
|
|
779
805
|
}
|
|
780
|
-
if (
|
|
781
|
-
return
|
|
806
|
+
if (cleaned.length > 120) {
|
|
807
|
+
return cleaned.slice(0, 120) + "...";
|
|
782
808
|
}
|
|
783
|
-
return
|
|
809
|
+
return cleaned;
|
|
784
810
|
}
|
|
785
811
|
|
|
786
812
|
// src/core/theme.ts
|
|
@@ -1732,11 +1758,11 @@ function ProcessingStep({
|
|
|
1732
1758
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
1733
1759
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
1734
1760
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
1735
|
-
const sourceExplorerUrl =
|
|
1736
|
-
const destExplorerUrl = destinationTxHash ?
|
|
1761
|
+
const sourceExplorerUrl = _chunkR6U6BHCVcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
1762
|
+
const destExplorerUrl = destinationTxHash ? _chunkR6U6BHCVcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
1737
1763
|
const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
|
|
1738
|
-
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ?
|
|
1739
|
-
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ?
|
|
1764
|
+
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkR6U6BHCVcjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
|
|
1765
|
+
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkR6U6BHCVcjs.getTokenDecimalsByAddress.call(void 0,
|
|
1740
1766
|
displaySourceToken,
|
|
1741
1767
|
displaySourceChain
|
|
1742
1768
|
) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
|
|
@@ -1757,7 +1783,7 @@ function ProcessingStep({
|
|
|
1757
1783
|
const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
|
|
1758
1784
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
1759
1785
|
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...`;
|
|
1760
|
-
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', _114 => _114.lastEvent, 'optionalAccess', _115 => _115.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _116 => _116.lastEvent, 'optionalAccess', _117 => _117.type]) === "bridge-started" ? `Bridge started. Sending funds to ${
|
|
1786
|
+
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', _114 => _114.lastEvent, 'optionalAccess', _115 => _115.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _116 => _116.lastEvent, 'optionalAccess', _117 => _117.type]) === "bridge-started" ? `Bridge started. Sending funds to ${_chunkR6U6BHCVcjs.getChainName.call(void 0, targetChain)}.` : "Filling your transaction on the blockchain.";
|
|
1761
1787
|
const showAlert = !isFailed && (delayPhaseId !== void 0 || hasEscalatedDelay);
|
|
1762
1788
|
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.";
|
|
1763
1789
|
const fillStatus = isComplete ? "Successful" : isFailed ? "Failed" : "Processing";
|
|
@@ -1839,15 +1865,15 @@ function ProcessingStep({
|
|
|
1839
1865
|
className: "rs-card-value",
|
|
1840
1866
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1841
1867
|
children: [
|
|
1842
|
-
|
|
1868
|
+
_chunkR6U6BHCVcjs.getChainIcon.call(void 0, displaySourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1843
1869
|
"img",
|
|
1844
1870
|
{
|
|
1845
|
-
src:
|
|
1871
|
+
src: _chunkR6U6BHCVcjs.getChainIcon.call(void 0, displaySourceChain),
|
|
1846
1872
|
alt: "",
|
|
1847
1873
|
style: { width: 16, height: 16, borderRadius: 3 }
|
|
1848
1874
|
}
|
|
1849
1875
|
),
|
|
1850
|
-
|
|
1876
|
+
_chunkR6U6BHCVcjs.getChainName.call(void 0, displaySourceChain),
|
|
1851
1877
|
sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1852
1878
|
"a",
|
|
1853
1879
|
{
|
|
@@ -1870,15 +1896,15 @@ function ProcessingStep({
|
|
|
1870
1896
|
className: "rs-card-value",
|
|
1871
1897
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1872
1898
|
children: [
|
|
1873
|
-
|
|
1899
|
+
_chunkR6U6BHCVcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1874
1900
|
"img",
|
|
1875
1901
|
{
|
|
1876
|
-
src:
|
|
1902
|
+
src: _chunkR6U6BHCVcjs.getChainIcon.call(void 0, targetChain),
|
|
1877
1903
|
alt: "",
|
|
1878
1904
|
style: { width: 16, height: 16, borderRadius: 3 }
|
|
1879
1905
|
}
|
|
1880
1906
|
),
|
|
1881
|
-
|
|
1907
|
+
_chunkR6U6BHCVcjs.getChainName.call(void 0, targetChain),
|
|
1882
1908
|
destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1883
1909
|
"a",
|
|
1884
1910
|
{
|
|
@@ -1902,10 +1928,10 @@ function ProcessingStep({
|
|
|
1902
1928
|
className: "rs-card-value",
|
|
1903
1929
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1904
1930
|
children: [
|
|
1905
|
-
|
|
1931
|
+
_chunkR6U6BHCVcjs.getTokenIcon.call(void 0, sourceSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1906
1932
|
"img",
|
|
1907
1933
|
{
|
|
1908
|
-
src:
|
|
1934
|
+
src: _chunkR6U6BHCVcjs.getTokenIcon.call(void 0, sourceSymbol),
|
|
1909
1935
|
alt: "",
|
|
1910
1936
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
1911
1937
|
}
|
|
@@ -2020,7 +2046,7 @@ var clientCache = /* @__PURE__ */ new Map();
|
|
|
2020
2046
|
function getPublicClient(chainId) {
|
|
2021
2047
|
let client = clientCache.get(chainId);
|
|
2022
2048
|
if (!client) {
|
|
2023
|
-
const chain =
|
|
2049
|
+
const chain = _chunkR6U6BHCVcjs.CHAIN_BY_ID[chainId];
|
|
2024
2050
|
client = _viem.createPublicClient.call(void 0, {
|
|
2025
2051
|
chain,
|
|
2026
2052
|
transport: _viem.http.call(void 0, )
|