@rhinestone/deposit-modal 0.2.2 → 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.
- package/dist/{DepositModalReown-WGRUAIY3.cjs → DepositModalReown-2UMPITRN.cjs} +4 -4
- package/dist/{DepositModalReown-3H4EAZIF.mjs → DepositModalReown-CY5MSQGK.mjs} +3 -3
- package/dist/{WithdrawModalReown-RUJZCQ4C.mjs → WithdrawModalReown-YSRO5ZTA.mjs} +3 -3
- package/dist/{WithdrawModalReown-KGKKBTC7.cjs → WithdrawModalReown-Z5BUZQ4Z.cjs} +4 -4
- package/dist/{chunk-OPCYL3OI.cjs → chunk-ARGMXV6E.cjs} +272 -218
- package/dist/{chunk-UTQ7EYXO.mjs → chunk-HFQV7EHS.mjs} +86 -32
- package/dist/{chunk-MKO5TNVQ.mjs → chunk-KJEHVIPZ.mjs} +3 -3
- package/dist/{chunk-T2KOQH57.cjs → chunk-NFXJEOE6.cjs} +23 -23
- package/dist/{chunk-5EU7N73M.cjs → chunk-QUOP5C6V.cjs} +73 -73
- package/dist/{chunk-MUWVDVY4.cjs → chunk-R2HP743T.cjs} +14 -1
- package/dist/{chunk-SDZKKUCJ.mjs → chunk-WHW3ZMOT.mjs} +14 -1
- package/dist/{chunk-JRNGXHWQ.mjs → chunk-WNFGZS56.mjs} +1 -1
- 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
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
tokenFormatter,
|
|
29
29
|
txRefsMatch,
|
|
30
30
|
useLatestRef
|
|
31
|
-
} from "./chunk-
|
|
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-
|
|
50
|
+
} from "./chunk-WHW3ZMOT.mjs";
|
|
51
51
|
|
|
52
52
|
// src/DepositModal.tsx
|
|
53
53
|
import {
|
|
@@ -3780,7 +3780,7 @@ function DepositFlow({
|
|
|
3780
3780
|
setStep({ type: "setup" });
|
|
3781
3781
|
}, []);
|
|
3782
3782
|
const handleNewDeposit = useCallback5(() => {
|
|
3783
|
-
onSmartAccountChangeRef.current?.(null);
|
|
3783
|
+
onSmartAccountChangeRef.current?.({ evm: null, solana: null });
|
|
3784
3784
|
setFlowMode(null);
|
|
3785
3785
|
setStep({ type: "setup" });
|
|
3786
3786
|
setIsConnectSelectionConfirmed(false);
|
|
@@ -3794,7 +3794,10 @@ function DepositFlow({
|
|
|
3794
3794
|
hasSolanaDepositAddress: Boolean(solanaDepositAddress),
|
|
3795
3795
|
flowMode: isDepositAddressMode ? "deposit-address" : isSolanaWalletMode ? "solana-wallet" : "wallet"
|
|
3796
3796
|
});
|
|
3797
|
-
onSmartAccountChangeRef.current?.(
|
|
3797
|
+
onSmartAccountChangeRef.current?.({
|
|
3798
|
+
evm: smartAccount,
|
|
3799
|
+
solana: solanaDepositAddress ?? null
|
|
3800
|
+
});
|
|
3798
3801
|
if (isDepositAddressMode) {
|
|
3799
3802
|
setStep({
|
|
3800
3803
|
type: "deposit-address",
|
|
@@ -4697,8 +4700,15 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
4697
4700
|
// src/DepositModal.tsx
|
|
4698
4701
|
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4699
4702
|
var ReownDepositInner = lazy(
|
|
4700
|
-
() => import("./DepositModalReown-
|
|
4703
|
+
() => import("./DepositModalReown-CY5MSQGK.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
4701
4704
|
);
|
|
4705
|
+
function sortByCreatedAtDesc(items) {
|
|
4706
|
+
return [...items].sort((a, b) => {
|
|
4707
|
+
const at = a.createdAt ? Date.parse(a.createdAt) : 0;
|
|
4708
|
+
const bt = b.createdAt ? Date.parse(b.createdAt) : 0;
|
|
4709
|
+
return bt - at;
|
|
4710
|
+
});
|
|
4711
|
+
}
|
|
4702
4712
|
function DepositModal(props) {
|
|
4703
4713
|
const needsReown = !!props.reownAppId;
|
|
4704
4714
|
const hasDappWalletClientProp = Object.prototype.hasOwnProperty.call(
|
|
@@ -4773,13 +4783,18 @@ function DepositModalInner({
|
|
|
4773
4783
|
const [totalBalanceUsd, setTotalBalanceUsd] = useState12(null);
|
|
4774
4784
|
const backHandlerRef = useRef8(void 0);
|
|
4775
4785
|
const showHistoryButton = uiConfig?.showHistoryButton ?? false;
|
|
4776
|
-
const [
|
|
4786
|
+
const [activeEvmAccount, setActiveEvmAccount] = useState12(null);
|
|
4787
|
+
const [activeSolanaAccount, setActiveSolanaAccount] = useState12(
|
|
4788
|
+
null
|
|
4789
|
+
);
|
|
4777
4790
|
const [historyOpen, setHistoryOpen] = useState12(false);
|
|
4778
4791
|
const [historyDeposits, setHistoryDeposits] = useState12([]);
|
|
4779
|
-
const [
|
|
4792
|
+
const [hasMoreHistory, setHasMoreHistory] = useState12(false);
|
|
4780
4793
|
const [historyLoading, setHistoryLoading] = useState12(false);
|
|
4781
4794
|
const [historyLoadingMore, setHistoryLoadingMore] = useState12(false);
|
|
4782
4795
|
const [historyError, setHistoryError] = useState12(null);
|
|
4796
|
+
const evmCursorRef = useRef8(null);
|
|
4797
|
+
const solanaCursorRef = useRef8(null);
|
|
4783
4798
|
const historyStaleRef = useRef8(false);
|
|
4784
4799
|
const historyLoadedRef = useRef8(false);
|
|
4785
4800
|
const targetChain = getChainId(targetChainProp);
|
|
@@ -4823,18 +4838,19 @@ function DepositModalInner({
|
|
|
4823
4838
|
backHandlerRef.current?.();
|
|
4824
4839
|
}, []);
|
|
4825
4840
|
const handleSmartAccountChange = useCallback7(
|
|
4826
|
-
(
|
|
4827
|
-
|
|
4828
|
-
|
|
4841
|
+
({ evm, solana }) => {
|
|
4842
|
+
setActiveEvmAccount(evm);
|
|
4843
|
+
setActiveSolanaAccount(solana);
|
|
4844
|
+
if (!evm && !solana) {
|
|
4829
4845
|
historyStaleRef.current = true;
|
|
4830
4846
|
}
|
|
4831
4847
|
},
|
|
4832
4848
|
[]
|
|
4833
4849
|
);
|
|
4834
4850
|
const fetchHistory = useCallback7(
|
|
4835
|
-
async (
|
|
4836
|
-
if (!
|
|
4837
|
-
const isInitial =
|
|
4851
|
+
async (mode = "initial") => {
|
|
4852
|
+
if (!activeEvmAccount && !activeSolanaAccount) return;
|
|
4853
|
+
const isInitial = mode === "initial";
|
|
4838
4854
|
if (isInitial) {
|
|
4839
4855
|
setHistoryLoading(true);
|
|
4840
4856
|
} else {
|
|
@@ -4842,17 +4858,54 @@ function DepositModalInner({
|
|
|
4842
4858
|
}
|
|
4843
4859
|
setHistoryError(null);
|
|
4844
4860
|
try {
|
|
4845
|
-
const
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4861
|
+
const evmCursor = isInitial ? null : evmCursorRef.current;
|
|
4862
|
+
const solanaCursor = isInitial ? null : solanaCursorRef.current;
|
|
4863
|
+
const requests = [];
|
|
4864
|
+
if (activeEvmAccount && (isInitial || evmCursor)) {
|
|
4865
|
+
requests.push(
|
|
4866
|
+
service.fetchDepositHistory({
|
|
4867
|
+
account: activeEvmAccount,
|
|
4868
|
+
limit: 20,
|
|
4869
|
+
cursor: evmCursor ?? void 0
|
|
4870
|
+
}).then((r) => ({
|
|
4871
|
+
deposits: r.deposits,
|
|
4872
|
+
nextCursor: r.nextCursor ?? null,
|
|
4873
|
+
source: "evm"
|
|
4874
|
+
}))
|
|
4875
|
+
);
|
|
4876
|
+
}
|
|
4877
|
+
if (activeSolanaAccount && (isInitial || solanaCursor)) {
|
|
4878
|
+
requests.push(
|
|
4879
|
+
service.fetchDepositHistory({
|
|
4880
|
+
account: activeSolanaAccount,
|
|
4881
|
+
limit: 20,
|
|
4882
|
+
cursor: solanaCursor ?? void 0
|
|
4883
|
+
}).then((r) => ({
|
|
4884
|
+
deposits: r.deposits,
|
|
4885
|
+
nextCursor: r.nextCursor ?? null,
|
|
4886
|
+
source: "solana"
|
|
4887
|
+
}))
|
|
4888
|
+
);
|
|
4889
|
+
}
|
|
4890
|
+
const results = await Promise.all(requests);
|
|
4891
|
+
let nextEvm = isInitial ? null : evmCursor;
|
|
4892
|
+
let nextSolana = isInitial ? null : solanaCursor;
|
|
4893
|
+
const incoming = [];
|
|
4894
|
+
for (const r of results) {
|
|
4895
|
+
incoming.push(...r.deposits);
|
|
4896
|
+
if (r.source === "evm") nextEvm = r.nextCursor;
|
|
4897
|
+
else nextSolana = r.nextCursor;
|
|
4898
|
+
}
|
|
4850
4899
|
if (isInitial) {
|
|
4851
|
-
setHistoryDeposits(
|
|
4900
|
+
setHistoryDeposits(sortByCreatedAtDesc(incoming));
|
|
4852
4901
|
} else {
|
|
4853
|
-
setHistoryDeposits(
|
|
4902
|
+
setHistoryDeposits(
|
|
4903
|
+
(prev) => sortByCreatedAtDesc([...prev, ...incoming])
|
|
4904
|
+
);
|
|
4854
4905
|
}
|
|
4855
|
-
|
|
4906
|
+
evmCursorRef.current = nextEvm;
|
|
4907
|
+
solanaCursorRef.current = nextSolana;
|
|
4908
|
+
setHasMoreHistory(Boolean(nextEvm || nextSolana));
|
|
4856
4909
|
historyStaleRef.current = false;
|
|
4857
4910
|
historyLoadedRef.current = true;
|
|
4858
4911
|
} catch (err) {
|
|
@@ -4867,26 +4920,24 @@ function DepositModalInner({
|
|
|
4867
4920
|
}
|
|
4868
4921
|
}
|
|
4869
4922
|
},
|
|
4870
|
-
[
|
|
4923
|
+
[activeEvmAccount, activeSolanaAccount, service]
|
|
4871
4924
|
);
|
|
4872
4925
|
const handleHistoryOpen = useCallback7(() => {
|
|
4873
4926
|
setHistoryOpen(true);
|
|
4874
4927
|
if (!historyLoadedRef.current || historyStaleRef.current) {
|
|
4875
|
-
fetchHistory();
|
|
4928
|
+
fetchHistory("initial");
|
|
4876
4929
|
}
|
|
4877
4930
|
}, [fetchHistory]);
|
|
4878
4931
|
const handleHistoryClose = useCallback7(() => {
|
|
4879
4932
|
setHistoryOpen(false);
|
|
4880
4933
|
}, []);
|
|
4881
4934
|
const handleHistoryLoadMore = useCallback7(() => {
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
}
|
|
4885
|
-
}, [fetchHistory, historyNextCursor]);
|
|
4935
|
+
fetchHistory("more");
|
|
4936
|
+
}, [fetchHistory]);
|
|
4886
4937
|
const markHistoryStale = useCallback7(() => {
|
|
4887
4938
|
historyStaleRef.current = true;
|
|
4888
4939
|
if (historyOpen) {
|
|
4889
|
-
fetchHistory();
|
|
4940
|
+
fetchHistory("initial");
|
|
4890
4941
|
}
|
|
4891
4942
|
}, [historyOpen, fetchHistory]);
|
|
4892
4943
|
const onDepositSubmittedRef = useLatestRef(onDepositSubmitted);
|
|
@@ -4917,9 +4968,12 @@ function DepositModalInner({
|
|
|
4917
4968
|
if (!isOpen) {
|
|
4918
4969
|
setHistoryOpen(false);
|
|
4919
4970
|
setHistoryDeposits([]);
|
|
4920
|
-
|
|
4971
|
+
setHasMoreHistory(false);
|
|
4921
4972
|
setHistoryError(null);
|
|
4922
|
-
|
|
4973
|
+
setActiveEvmAccount(null);
|
|
4974
|
+
setActiveSolanaAccount(null);
|
|
4975
|
+
evmCursorRef.current = null;
|
|
4976
|
+
solanaCursorRef.current = null;
|
|
4923
4977
|
historyStaleRef.current = false;
|
|
4924
4978
|
historyLoadedRef.current = false;
|
|
4925
4979
|
}
|
|
@@ -5036,7 +5090,7 @@ function DepositModalInner({
|
|
|
5036
5090
|
className: "rs-modal-header-history",
|
|
5037
5091
|
"aria-label": "Deposit history",
|
|
5038
5092
|
onClick: handleHistoryOpen,
|
|
5039
|
-
disabled: !
|
|
5093
|
+
disabled: !activeEvmAccount && !activeSolanaAccount,
|
|
5040
5094
|
children: /* @__PURE__ */ jsx14(
|
|
5041
5095
|
"svg",
|
|
5042
5096
|
{
|
|
@@ -5132,7 +5186,7 @@ function DepositModalInner({
|
|
|
5132
5186
|
deposits: historyDeposits,
|
|
5133
5187
|
isLoading: historyLoading,
|
|
5134
5188
|
error: historyError,
|
|
5135
|
-
hasMore:
|
|
5189
|
+
hasMore: hasMoreHistory,
|
|
5136
5190
|
isLoadingMore: historyLoadingMore,
|
|
5137
5191
|
onLoadMore: handleHistoryLoadMore,
|
|
5138
5192
|
onClose: handleHistoryClose
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
saveSessionOwnerToStorage,
|
|
22
22
|
toEvmCaip2,
|
|
23
23
|
useLatestRef
|
|
24
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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
|
|
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))), () => (
|
|
779
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
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 =
|
|
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" ?
|
|
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" ?
|
|
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" :
|
|
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" ?
|
|
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 =
|
|
1991
|
-
const bridgeExplorerUrl = bridgeTxHash ?
|
|
1992
|
-
const destExplorerUrl = destinationTxHash ?
|
|
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 ?
|
|
1995
|
-
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ?
|
|
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 ${
|
|
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
|
-
|
|
2098
|
+
_chunkR2HP743Tcjs.getChainIcon.call(void 0, displaySourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2099
2099
|
"img",
|
|
2100
2100
|
{
|
|
2101
|
-
src:
|
|
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
|
-
|
|
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
|
-
|
|
2129
|
+
_chunkR2HP743Tcjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2130
2130
|
"img",
|
|
2131
2131
|
{
|
|
2132
|
-
src:
|
|
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
|
-
|
|
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
|
-
|
|
2161
|
+
_chunkR2HP743Tcjs.getTokenIcon.call(void 0, sourceSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2162
2162
|
"img",
|
|
2163
2163
|
{
|
|
2164
|
-
src:
|
|
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 =
|
|
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, )
|