@rhinestone/deposit-modal 0.1.66 → 0.1.68
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-RXIVPSEE.mjs → DepositModalReown-RYCOXWMH.mjs} +3 -3
- package/dist/{DepositModalReown-WFXQKZDH.cjs → DepositModalReown-WXFTSZSK.cjs} +4 -4
- package/dist/{WithdrawModalReown-MME7VSKX.mjs → WithdrawModalReown-6VYKKKJN.mjs} +3 -3
- package/dist/{WithdrawModalReown-PXS44GZO.cjs → WithdrawModalReown-WHPQDJJJ.cjs} +4 -4
- package/dist/{chunk-CULXRW6U.mjs → chunk-5FDIQNJJ.mjs} +22 -19
- package/dist/{chunk-JZWCK7C3.cjs → chunk-FLVSQDP4.cjs} +98 -91
- package/dist/{chunk-FWGLRTWF.mjs → chunk-IUW3SJQT.mjs} +61 -54
- package/dist/{chunk-5GN4QU67.cjs → chunk-J7ILKS5N.cjs} +1059 -447
- package/dist/{chunk-75LRORPO.cjs → chunk-LTLFJPHO.cjs} +106 -103
- package/dist/{chunk-R6U6BHCV.cjs → chunk-MUWVDVY4.cjs} +13 -1
- package/dist/{chunk-JDO7QPPH.mjs → chunk-OEB25YZ4.mjs} +1132 -520
- package/dist/{chunk-CIXHTOO3.mjs → chunk-SDZKKUCJ.mjs} +13 -1
- 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 +456 -32
- package/dist/{types-ymKENnUK.d.ts → types-DGQzvl6v.d.ts} +11 -1
- package/dist/{types-DjaZ9sa8.d.cts → types-DJ1fzNC7.d.cts} +11 -1
- 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 +5 -5
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OEB25YZ4.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-IUW3SJQT.mjs";
|
|
9
|
+
import "./chunk-SDZKKUCJ.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 _chunkJ7ILKS5Ncjs = require('./chunk-J7ILKS5N.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-FLVSQDP4.cjs');
|
|
9
|
+
require('./chunk-MUWVDVY4.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
|
+
_chunkJ7ILKS5Ncjs.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-5FDIQNJJ.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-IUW3SJQT.mjs";
|
|
9
|
+
import "./chunk-SDZKKUCJ.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 _chunkLTLFJPHOcjs = require('./chunk-LTLFJPHO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunkN2Y34LQOcjs = require('./chunk-N2Y34LQO.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-FLVSQDP4.cjs');
|
|
9
|
+
require('./chunk-MUWVDVY4.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
|
+
_chunkLTLFJPHOcjs.WithdrawModalInner,
|
|
24
24
|
{
|
|
25
25
|
...props,
|
|
26
26
|
reownWallet: reown,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
saveSessionOwnerToStorage,
|
|
22
22
|
toEvmCaip2,
|
|
23
23
|
useLatestRef
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-IUW3SJQT.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-SDZKKUCJ.mjs";
|
|
38
38
|
|
|
39
39
|
// src/WithdrawModal.tsx
|
|
40
40
|
import {
|
|
@@ -894,6 +894,11 @@ function WithdrawFlow({
|
|
|
894
894
|
const onStepChangeRef = useLatestRef(onStepChange);
|
|
895
895
|
const onTotalBalanceChangeRef = useLatestRef(onTotalBalanceChange);
|
|
896
896
|
const onEventRef = useLatestRef(onEvent);
|
|
897
|
+
const onConnectedRef = useLatestRef(onConnected);
|
|
898
|
+
const onWithdrawSubmittedRef = useLatestRef(onWithdrawSubmitted);
|
|
899
|
+
const onWithdrawCompleteRef = useLatestRef(onWithdrawComplete);
|
|
900
|
+
const onWithdrawFailedRef = useLatestRef(onWithdrawFailed);
|
|
901
|
+
const onErrorRef = useLatestRef(onError);
|
|
897
902
|
const [step, setStep] = useState2({ type: "form" });
|
|
898
903
|
const [isSubmitting, setIsSubmitting] = useState2(false);
|
|
899
904
|
const [totalBalanceUsd, setTotalBalanceUsd] = useState2(0);
|
|
@@ -1072,16 +1077,16 @@ function WithdrawFlow({
|
|
|
1072
1077
|
const handleConnected = useCallback2(
|
|
1073
1078
|
(addr, smartAccount) => {
|
|
1074
1079
|
logFlow("setup:connected", { address: addr, smartAccount });
|
|
1075
|
-
|
|
1080
|
+
onConnectedRef.current?.({ address: addr, smartAccount });
|
|
1076
1081
|
},
|
|
1077
|
-
[logFlow,
|
|
1082
|
+
[logFlow, onConnectedRef]
|
|
1078
1083
|
);
|
|
1079
1084
|
const handleError = useCallback2(
|
|
1080
1085
|
(message, code) => {
|
|
1081
1086
|
logFlowError("flow:error", message, { code });
|
|
1082
|
-
|
|
1087
|
+
onErrorRef.current?.({ message, code });
|
|
1083
1088
|
},
|
|
1084
|
-
[logFlowError,
|
|
1089
|
+
[logFlowError, onErrorRef]
|
|
1085
1090
|
);
|
|
1086
1091
|
const resolveSessionOwner = useCallback2(async (eoaAddress) => {
|
|
1087
1092
|
const localOwner = loadSessionOwnerFromStorage(eoaAddress);
|
|
@@ -1102,7 +1107,7 @@ function WithdrawFlow({
|
|
|
1102
1107
|
async (recipient, amountValue) => {
|
|
1103
1108
|
const tokenSymbol = getTokenSymbol(targetToken, targetChain);
|
|
1104
1109
|
const chainName = getChainName(targetChain);
|
|
1105
|
-
|
|
1110
|
+
onEventRef.current?.({
|
|
1106
1111
|
type: "withdraw_modal_select_amount_cta_click",
|
|
1107
1112
|
pred_balance: totalBalanceUsd,
|
|
1108
1113
|
selected_token: tokenSymbol,
|
|
@@ -1242,7 +1247,7 @@ function WithdrawFlow({
|
|
|
1242
1247
|
sourceChain,
|
|
1243
1248
|
sourceToken
|
|
1244
1249
|
});
|
|
1245
|
-
|
|
1250
|
+
onWithdrawSubmittedRef.current?.({
|
|
1246
1251
|
txHash: result.txHash,
|
|
1247
1252
|
sourceChain,
|
|
1248
1253
|
amount: amountUnits.toString(),
|
|
@@ -1284,20 +1289,20 @@ function WithdrawFlow({
|
|
|
1284
1289
|
safeAddress,
|
|
1285
1290
|
sourceToken,
|
|
1286
1291
|
sourceChain,
|
|
1287
|
-
onWithdrawSubmitted,
|
|
1288
1292
|
onSignTransaction,
|
|
1289
1293
|
isSourceNative,
|
|
1290
1294
|
handleError,
|
|
1291
1295
|
logFlow,
|
|
1292
1296
|
logFlowError,
|
|
1293
|
-
|
|
1294
|
-
totalBalanceUsd
|
|
1297
|
+
onEventRef,
|
|
1298
|
+
totalBalanceUsd,
|
|
1299
|
+
onWithdrawSubmittedRef
|
|
1295
1300
|
]
|
|
1296
1301
|
);
|
|
1297
1302
|
const handleWithdrawComplete = useCallback2(
|
|
1298
1303
|
(txHash, destinationTxHash, context) => {
|
|
1299
1304
|
logFlow("withdraw:complete", { txHash, destinationTxHash, ...context });
|
|
1300
|
-
|
|
1305
|
+
onWithdrawCompleteRef.current?.({
|
|
1301
1306
|
txHash,
|
|
1302
1307
|
destinationTxHash,
|
|
1303
1308
|
amount: context.amount,
|
|
@@ -1307,14 +1312,14 @@ function WithdrawFlow({
|
|
|
1307
1312
|
targetToken: context.targetToken
|
|
1308
1313
|
});
|
|
1309
1314
|
},
|
|
1310
|
-
[logFlow,
|
|
1315
|
+
[logFlow, onWithdrawCompleteRef]
|
|
1311
1316
|
);
|
|
1312
1317
|
const handleWithdrawFailed = useCallback2(
|
|
1313
1318
|
(txHash, error) => {
|
|
1314
1319
|
logFlowError("withdraw:failed", error, { txHash });
|
|
1315
|
-
|
|
1320
|
+
onWithdrawFailedRef.current?.({ txHash, error });
|
|
1316
1321
|
},
|
|
1317
|
-
[logFlowError,
|
|
1322
|
+
[logFlowError, onWithdrawFailedRef]
|
|
1318
1323
|
);
|
|
1319
1324
|
const allowedChainSet = useMemo2(
|
|
1320
1325
|
() => allowedRoutes?.sourceChains ? new Set(allowedRoutes.sourceChains) : null,
|
|
@@ -1475,7 +1480,7 @@ function WithdrawFlow({
|
|
|
1475
1480
|
// src/WithdrawModal.tsx
|
|
1476
1481
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1477
1482
|
var ReownWithdrawInner = lazy(
|
|
1478
|
-
() => import("./WithdrawModalReown-
|
|
1483
|
+
() => import("./WithdrawModalReown-6VYKKKJN.mjs").then((m) => ({
|
|
1479
1484
|
default: m.WithdrawModalReown
|
|
1480
1485
|
}))
|
|
1481
1486
|
);
|
|
@@ -1543,10 +1548,8 @@ function WithdrawModalInner({
|
|
|
1543
1548
|
applyTheme(modalRef.current, theme);
|
|
1544
1549
|
}
|
|
1545
1550
|
}, [isOpen, theme]);
|
|
1546
|
-
const hasCalledReady = useRef3(false);
|
|
1547
1551
|
useEffect3(() => {
|
|
1548
|
-
if (isOpen
|
|
1549
|
-
hasCalledReady.current = true;
|
|
1552
|
+
if (isOpen) {
|
|
1550
1553
|
onReadyRef.current?.();
|
|
1551
1554
|
}
|
|
1552
1555
|
}, [isOpen, onReadyRef]);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkMUWVDVY4cjs = require('./chunk-MUWVDVY4.cjs');
|
|
12
12
|
|
|
13
13
|
// src/components/ui/Modal.tsx
|
|
14
14
|
|
|
@@ -663,14 +663,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
663
663
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _22 => _22.balance, 'optionalAccess', _23 => _23.unlocked]), () => ( "0"));
|
|
664
664
|
const normalizedName = tokenData.tokenName.trim();
|
|
665
665
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
666
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
667
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
666
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkMUWVDVY4cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
667
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkMUWVDVY4cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
668
668
|
if (!resolvedTokenAddress) {
|
|
669
669
|
continue;
|
|
670
670
|
}
|
|
671
|
-
const registrySymbol =
|
|
671
|
+
const registrySymbol = _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
672
672
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
673
|
-
const decimals = registrySymbol !== "Token" ?
|
|
673
|
+
const decimals = registrySymbol !== "Token" ? _chunkMUWVDVY4cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
674
674
|
tokens.push({
|
|
675
675
|
chainId: chainBalance.chainId,
|
|
676
676
|
address: resolvedTokenAddress,
|
|
@@ -699,14 +699,14 @@ function normalizeDirectToken(token) {
|
|
|
699
699
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
700
700
|
token.token,
|
|
701
701
|
"address"
|
|
702
|
-
))), () => ( (typeof chainId === "number" ?
|
|
702
|
+
))), () => ( (typeof chainId === "number" ? _chunkMUWVDVY4cjs.getTokenAddress.call(void 0, symbol, chainId) : void 0)));
|
|
703
703
|
if (!address) return null;
|
|
704
704
|
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));
|
|
705
705
|
const isSolanaToken = chainId === "solana";
|
|
706
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
706
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, address, chainId);
|
|
707
707
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
708
708
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
709
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
709
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkMUWVDVY4cjs.getTokenDecimalsByAddress.call(void 0, address, chainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
710
710
|
return {
|
|
711
711
|
chainId,
|
|
712
712
|
address,
|
|
@@ -1023,13 +1023,14 @@ function ExternalLinkIcon() {
|
|
|
1023
1023
|
] });
|
|
1024
1024
|
}
|
|
1025
1025
|
function TransferIcon() {
|
|
1026
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { viewBox: "0 0
|
|
1026
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1027
1027
|
"path",
|
|
1028
1028
|
{
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1029
|
+
d: "M6.18056 9.99924H10V13.8187M3.13264 9.99924H3.125M6.95208 13.8187H6.94444M10.0076 16.8742H10M16.8826 9.99924H16.875M3.125 13.8187H4.27083M12.6736 9.99924H14.2014M3.125 16.8742H6.94444M10 2.36035V6.94369M14.2778 16.8742H15.6528C16.0806 16.8742 16.2945 16.8742 16.4579 16.791C16.6016 16.7177 16.7185 16.6009 16.7917 16.4572C16.875 16.2937 16.875 16.0798 16.875 15.652V14.277C16.875 13.8492 16.875 13.6353 16.7917 13.4719C16.7185 13.3282 16.6016 13.2113 16.4579 13.1381C16.2945 13.0548 16.0806 13.0548 15.6528 13.0548H14.2778C13.85 13.0548 13.6361 13.0548 13.4726 13.1381C13.3289 13.2113 13.2121 13.3282 13.1388 13.4719C13.0556 13.6353 13.0556 13.8492 13.0556 14.277V15.652C13.0556 16.0798 13.0556 16.2937 13.1388 16.4572C13.2121 16.6009 13.3289 16.7177 13.4726 16.791C13.6361 16.8742 13.85 16.8742 14.2778 16.8742ZM14.2778 6.94369H15.6528C16.0806 6.94369 16.2945 6.94369 16.4579 6.86043C16.6016 6.78719 16.7185 6.67033 16.7917 6.52659C16.875 6.36319 16.875 6.14928 16.875 5.72146V4.34646C16.875 3.91864 16.875 3.70474 16.7917 3.54133C16.7185 3.3976 16.6016 3.28074 16.4579 3.2075C16.2945 3.12424 16.0806 3.12424 15.6528 3.12424H14.2778C13.85 3.12424 13.6361 3.12424 13.4726 3.2075C13.3289 3.28074 13.2121 3.3976 13.1388 3.54133C13.0556 3.70474 13.0556 3.91864 13.0556 4.34646V5.72146C13.0556 6.14928 13.0556 6.36319 13.1388 6.52659C13.2121 6.67033 13.3289 6.78719 13.4726 6.86043C13.6361 6.94369 13.85 6.94369 14.2778 6.94369ZM4.34722 6.94369H5.72222C6.15004 6.94369 6.36395 6.94369 6.52735 6.86043C6.67109 6.78719 6.78795 6.67033 6.86119 6.52659C6.94444 6.36319 6.94444 6.14928 6.94444 5.72146V4.34646C6.94444 3.91864 6.94444 3.70474 6.86119 3.54133C6.78795 3.3976 6.67109 3.28074 6.52735 3.2075C6.36395 3.12424 6.15004 3.12424 5.72222 3.12424H4.34722C3.9194 3.12424 3.7055 3.12424 3.54209 3.2075C3.39836 3.28074 3.2815 3.3976 3.20826 3.54133C3.125 3.70474 3.125 3.91864 3.125 4.34646V5.72146C3.125 6.14928 3.125 6.36319 3.20826 6.52659C3.2815 6.67033 3.39836 6.78719 3.54209 6.86043C3.7055 6.94369 3.9194 6.94369 4.34722 6.94369Z",
|
|
1030
|
+
stroke: "currentColor",
|
|
1031
|
+
strokeWidth: "1.5",
|
|
1032
|
+
strokeLinecap: "round",
|
|
1033
|
+
strokeLinejoin: "round"
|
|
1033
1034
|
}
|
|
1034
1035
|
) });
|
|
1035
1036
|
}
|
|
@@ -1102,7 +1103,7 @@ function ConnectStep({
|
|
|
1102
1103
|
{
|
|
1103
1104
|
src: option.icon,
|
|
1104
1105
|
alt: option.label,
|
|
1105
|
-
style: { width:
|
|
1106
|
+
style: { width: 24, height: 24, borderRadius: 6 }
|
|
1106
1107
|
}
|
|
1107
1108
|
) : rowIcon(option.kind)
|
|
1108
1109
|
}
|
|
@@ -1591,6 +1592,18 @@ function ProcessingStep({
|
|
|
1591
1592
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
1592
1593
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
1593
1594
|
const escalatedDelayRef = _react.useRef.call(void 0, false);
|
|
1595
|
+
const processingContextRef = useLatestRef({
|
|
1596
|
+
amount,
|
|
1597
|
+
sourceChain,
|
|
1598
|
+
sourceToken,
|
|
1599
|
+
targetChain,
|
|
1600
|
+
targetToken,
|
|
1601
|
+
waitForFinalTx,
|
|
1602
|
+
hasPostBridgeActions
|
|
1603
|
+
});
|
|
1604
|
+
const onDepositCompleteRef = useLatestRef(onDepositComplete);
|
|
1605
|
+
const onDepositFailedRef = useLatestRef(onDepositFailed);
|
|
1606
|
+
const onErrorRef = useLatestRef(onError);
|
|
1594
1607
|
const [state, setState] = _react.useState.call(void 0,
|
|
1595
1608
|
directTransfer ? { type: "complete" } : { type: "processing" }
|
|
1596
1609
|
);
|
|
@@ -1616,23 +1629,20 @@ function ProcessingStep({
|
|
|
1616
1629
|
txHash,
|
|
1617
1630
|
flowLabel
|
|
1618
1631
|
});
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1632
|
+
const context = processingContextRef.current;
|
|
1633
|
+
_optionalChain([onDepositCompleteRef, 'access', _105 => _105.current, 'optionalCall', _106 => _106(txHash, void 0, {
|
|
1634
|
+
amount: context.amount,
|
|
1635
|
+
sourceChain: context.sourceChain,
|
|
1636
|
+
sourceToken: context.sourceToken,
|
|
1637
|
+
targetChain: context.targetChain,
|
|
1638
|
+
targetToken: context.targetToken
|
|
1625
1639
|
})]);
|
|
1626
1640
|
}, [
|
|
1627
|
-
amount,
|
|
1628
1641
|
debug,
|
|
1629
1642
|
directTransfer,
|
|
1630
1643
|
flowLabel,
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
sourceToken,
|
|
1634
|
-
targetChain,
|
|
1635
|
-
targetToken,
|
|
1644
|
+
onDepositCompleteRef,
|
|
1645
|
+
processingContextRef,
|
|
1636
1646
|
txHash
|
|
1637
1647
|
]);
|
|
1638
1648
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1657,7 +1667,7 @@ function ProcessingStep({
|
|
|
1657
1667
|
_react.useEffect.call(void 0, () => {
|
|
1658
1668
|
if (!state.lastEvent) return;
|
|
1659
1669
|
setPhaseTimings((previous) => syncPhaseTimings(previous, state.lastEvent));
|
|
1660
|
-
}, [_optionalChain([state, 'access',
|
|
1670
|
+
}, [_optionalChain([state, 'access', _107 => _107.lastEvent, 'optionalAccess', _108 => _108.time]), _optionalChain([state, 'access', _109 => _109.lastEvent, 'optionalAccess', _110 => _110.type])]);
|
|
1661
1671
|
_react.useEffect.call(void 0, () => {
|
|
1662
1672
|
savePhaseTimings(txHash, phaseTimings);
|
|
1663
1673
|
}, [txHash, phaseTimings]);
|
|
@@ -1684,29 +1694,30 @@ function ProcessingStep({
|
|
|
1684
1694
|
debugLog(debug, "processing", "poll:event", {
|
|
1685
1695
|
type: lastEvent2.type,
|
|
1686
1696
|
matchesTx: eventMatchesTx,
|
|
1687
|
-
intentId: _optionalChain([eventData, 'optionalAccess',
|
|
1697
|
+
intentId: _optionalChain([eventData, 'optionalAccess', _111 => _111.intentId])
|
|
1688
1698
|
});
|
|
1689
1699
|
}
|
|
1690
1700
|
if (!isMounted) return;
|
|
1691
|
-
const awaitingPostBridgeSwap = waitForFinalTx && hasPostBridgeActions;
|
|
1692
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1701
|
+
const awaitingPostBridgeSwap = processingContextRef.current.waitForFinalTx && processingContextRef.current.hasPostBridgeActions;
|
|
1702
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _112 => _112.type]) === "post-bridge-swap-complete") {
|
|
1693
1703
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1694
|
-
const swapTxHash = _optionalChain([eventForCurrentTx, 'access',
|
|
1704
|
+
const swapTxHash = _optionalChain([eventForCurrentTx, 'access', _113 => _113.data, 'optionalAccess', _114 => _114.swap, 'optionalAccess', _115 => _115.transactionHash]);
|
|
1695
1705
|
debugLog(debug, "processing", "state:complete", {
|
|
1696
1706
|
txHash,
|
|
1697
1707
|
destinationTxHash: swapTxHash,
|
|
1698
1708
|
event: eventForCurrentTx.type
|
|
1699
1709
|
});
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1710
|
+
const context = processingContextRef.current;
|
|
1711
|
+
_optionalChain([onDepositCompleteRef, 'access', _116 => _116.current, 'optionalCall', _117 => _117(txHash, swapTxHash, {
|
|
1712
|
+
amount: context.amount,
|
|
1713
|
+
sourceChain: context.sourceChain,
|
|
1714
|
+
sourceToken: context.sourceToken,
|
|
1715
|
+
targetChain: context.targetChain,
|
|
1716
|
+
targetToken: context.targetToken
|
|
1706
1717
|
})]);
|
|
1707
1718
|
return;
|
|
1708
1719
|
}
|
|
1709
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1720
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _118 => _118.type]) === "post-bridge-swap-failed") {
|
|
1710
1721
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
1711
1722
|
setState({
|
|
1712
1723
|
type: "failed",
|
|
@@ -1718,42 +1729,44 @@ function ProcessingStep({
|
|
|
1718
1729
|
message: formatted.message,
|
|
1719
1730
|
code: formatted.code
|
|
1720
1731
|
});
|
|
1721
|
-
_optionalChain([
|
|
1732
|
+
_optionalChain([onDepositFailedRef, 'access', _119 => _119.current, 'optionalCall', _120 => _120(txHash, formatted.message)]);
|
|
1722
1733
|
return;
|
|
1723
1734
|
}
|
|
1724
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1735
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _121 => _121.type]) === "bridge-complete" && !awaitingPostBridgeSwap) {
|
|
1725
1736
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1726
|
-
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access',
|
|
1737
|
+
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _122 => _122.data, 'optionalAccess', _123 => _123.destination, 'optionalAccess', _124 => _124.transactionHash]);
|
|
1727
1738
|
debugLog(debug, "processing", "state:complete", {
|
|
1728
1739
|
txHash,
|
|
1729
1740
|
destinationTxHash: destinationTxHash2,
|
|
1730
1741
|
event: eventForCurrentTx.type
|
|
1731
1742
|
});
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1743
|
+
const context = processingContextRef.current;
|
|
1744
|
+
_optionalChain([onDepositCompleteRef, 'access', _125 => _125.current, 'optionalCall', _126 => _126(txHash, destinationTxHash2, {
|
|
1745
|
+
amount: context.amount,
|
|
1746
|
+
sourceChain: context.sourceChain,
|
|
1747
|
+
sourceToken: context.sourceToken,
|
|
1748
|
+
targetChain: context.targetChain,
|
|
1749
|
+
targetToken: context.targetToken
|
|
1738
1750
|
})]);
|
|
1739
1751
|
return;
|
|
1740
1752
|
}
|
|
1741
|
-
if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1753
|
+
if (!waitForFinalTx && _optionalChain([eventForCurrentTx, 'optionalAccess', _127 => _127.type]) === "bridge-started") {
|
|
1742
1754
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
1743
1755
|
debugLog(debug, "processing", "state:early-complete", {
|
|
1744
1756
|
txHash,
|
|
1745
1757
|
event: eventForCurrentTx.type
|
|
1746
1758
|
});
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1759
|
+
const context = processingContextRef.current;
|
|
1760
|
+
_optionalChain([onDepositCompleteRef, 'access', _128 => _128.current, 'optionalCall', _129 => _129(txHash, void 0, {
|
|
1761
|
+
amount: context.amount,
|
|
1762
|
+
sourceChain: context.sourceChain,
|
|
1763
|
+
sourceToken: context.sourceToken,
|
|
1764
|
+
targetChain: context.targetChain,
|
|
1765
|
+
targetToken: context.targetToken
|
|
1753
1766
|
})]);
|
|
1754
1767
|
return;
|
|
1755
1768
|
}
|
|
1756
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1769
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _130 => _130.type]) === "bridge-failed") {
|
|
1757
1770
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
1758
1771
|
setState({
|
|
1759
1772
|
type: "failed",
|
|
@@ -1765,11 +1778,11 @@ function ProcessingStep({
|
|
|
1765
1778
|
message: formatted.message,
|
|
1766
1779
|
code: formatted.code
|
|
1767
1780
|
});
|
|
1768
|
-
_optionalChain([
|
|
1781
|
+
_optionalChain([onDepositFailedRef, 'access', _131 => _131.current, 'optionalCall', _132 => _132(txHash, formatted.message)]);
|
|
1769
1782
|
return;
|
|
1770
1783
|
}
|
|
1771
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
1772
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access',
|
|
1784
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _133 => _133.type]) === "error") {
|
|
1785
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _134 => _134.data, 'optionalAccess', _135 => _135.message]), () => ( "Unknown error"));
|
|
1773
1786
|
setState({
|
|
1774
1787
|
type: "failed",
|
|
1775
1788
|
message: errorMessage,
|
|
@@ -1779,7 +1792,7 @@ function ProcessingStep({
|
|
|
1779
1792
|
txHash,
|
|
1780
1793
|
message: errorMessage
|
|
1781
1794
|
});
|
|
1782
|
-
_optionalChain([
|
|
1795
|
+
_optionalChain([onDepositFailedRef, 'access', _136 => _136.current, 'optionalCall', _137 => _137(txHash, errorMessage)]);
|
|
1783
1796
|
return;
|
|
1784
1797
|
}
|
|
1785
1798
|
setState((previous) => ({
|
|
@@ -1817,21 +1830,15 @@ function ProcessingStep({
|
|
|
1817
1830
|
}
|
|
1818
1831
|
};
|
|
1819
1832
|
}, [
|
|
1820
|
-
amount,
|
|
1821
1833
|
debug,
|
|
1822
1834
|
directTransfer,
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1835
|
+
onDepositCompleteRef,
|
|
1836
|
+
onDepositFailedRef,
|
|
1837
|
+
processingContextRef,
|
|
1826
1838
|
service,
|
|
1827
1839
|
smartAccount,
|
|
1828
|
-
sourceChain,
|
|
1829
|
-
sourceToken,
|
|
1830
1840
|
state.type,
|
|
1831
|
-
|
|
1832
|
-
targetToken,
|
|
1833
|
-
txHash,
|
|
1834
|
-
waitForFinalTx
|
|
1841
|
+
txHash
|
|
1835
1842
|
]);
|
|
1836
1843
|
_react.useEffect.call(void 0, () => {
|
|
1837
1844
|
if (directTransfer || state.type !== "processing") return;
|
|
@@ -1844,32 +1851,32 @@ function ProcessingStep({
|
|
|
1844
1851
|
txHash,
|
|
1845
1852
|
timeoutMs: ESCALATED_DELAY_MS
|
|
1846
1853
|
});
|
|
1847
|
-
_optionalChain([
|
|
1854
|
+
_optionalChain([onErrorRef, 'access', _138 => _138.current, 'optionalCall', _139 => _139(message, "PROCESS_TIMEOUT")]);
|
|
1848
1855
|
}, ESCALATED_DELAY_MS);
|
|
1849
1856
|
return () => clearTimeout(timeoutId);
|
|
1850
|
-
}, [debug, directTransfer,
|
|
1857
|
+
}, [debug, directTransfer, onErrorRef, state.type, txHash]);
|
|
1851
1858
|
const isComplete = state.type === "complete";
|
|
1852
1859
|
const isFailed = state.type === "failed";
|
|
1853
1860
|
const isProcessing = state.type === "processing";
|
|
1854
1861
|
const lastEvent = state.lastEvent;
|
|
1855
1862
|
const failureMessage = state.type === "failed" ? state.message : void 0;
|
|
1856
|
-
const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess',
|
|
1863
|
+
const isEarlyComplete = !waitForFinalTx && _optionalChain([lastEvent, 'optionalAccess', _140 => _140.type]) === "bridge-started";
|
|
1857
1864
|
const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
|
|
1858
1865
|
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
1859
1866
|
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
1860
|
-
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess',
|
|
1861
|
-
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess',
|
|
1862
|
-
const bridgeTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess',
|
|
1867
|
+
const isPostBridgeSwapEvent = _optionalChain([lastEvent, 'optionalAccess', _141 => _141.type]) === "post-bridge-swap-complete" || _optionalChain([lastEvent, 'optionalAccess', _142 => _142.type]) === "post-bridge-swap-failed";
|
|
1868
|
+
const destinationTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _143 => _143.data, 'optionalAccess', _144 => _144.swap, 'optionalAccess', _145 => _145.transactionHash]) || null : _optionalChain([lastEvent, 'optionalAccess', _146 => _146.data, 'optionalAccess', _147 => _147.destination, 'optionalAccess', _148 => _148.transactionHash]) || null;
|
|
1869
|
+
const bridgeTxHash = isPostBridgeSwapEvent ? _optionalChain([lastEvent, 'optionalAccess', _149 => _149.data, 'optionalAccess', _150 => _150.bridge, 'optionalAccess', _151 => _151.transactionHash]) || null : null;
|
|
1863
1870
|
const sourceDetails = getEventSourceDetails(lastEvent);
|
|
1864
1871
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
1865
1872
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
1866
1873
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
1867
|
-
const sourceExplorerUrl =
|
|
1868
|
-
const bridgeExplorerUrl = bridgeTxHash ?
|
|
1869
|
-
const destExplorerUrl = destinationTxHash ?
|
|
1874
|
+
const sourceExplorerUrl = _chunkMUWVDVY4cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
1875
|
+
const bridgeExplorerUrl = bridgeTxHash ? _chunkMUWVDVY4cjs.getExplorerTxUrl.call(void 0, targetChain, bridgeTxHash) : null;
|
|
1876
|
+
const destExplorerUrl = destinationTxHash ? _chunkMUWVDVY4cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
1870
1877
|
const isEvmSourceToken = /^0x[a-fA-F0-9]{40}$/.test(displaySourceToken);
|
|
1871
|
-
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ?
|
|
1872
|
-
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ?
|
|
1878
|
+
const sourceSymbol = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceSymbol, () => ( "SOL")) : isEvmSourceToken ? _chunkMUWVDVY4cjs.getTokenSymbol.call(void 0, displaySourceToken, displaySourceChain) : _nullishCoalesce(providedSourceSymbol, () => ( "Token"));
|
|
1879
|
+
const sourceDecimals = displaySourceChain === "solana" ? _nullishCoalesce(providedSourceDecimals, () => ( 9)) : isEvmSourceToken ? _chunkMUWVDVY4cjs.getTokenDecimalsByAddress.call(void 0,
|
|
1873
1880
|
displaySourceToken,
|
|
1874
1881
|
displaySourceChain
|
|
1875
1882
|
) : _nullishCoalesce(providedSourceDecimals, () => ( 18));
|
|
@@ -1890,7 +1897,7 @@ function ProcessingStep({
|
|
|
1890
1897
|
const activePhaseElapsedMs = isProcessing && activePhaseStartedAt !== void 0 ? timelineNowMs - activePhaseStartedAt : 0;
|
|
1891
1898
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
1892
1899
|
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...`;
|
|
1893
|
-
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',
|
|
1900
|
+
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', _152 => _152.lastEvent, 'optionalAccess', _153 => _153.type]) === "deposit-received" ? "Transfer received. Preparing bridge execution." : _optionalChain([state, 'access', _154 => _154.lastEvent, 'optionalAccess', _155 => _155.type]) === "bridge-started" ? `Bridge started. Sending funds to ${_chunkMUWVDVY4cjs.getChainName.call(void 0, targetChain)}.` : "Filling your transaction on the blockchain.";
|
|
1894
1901
|
const showAlert = !isFailed && (delayPhaseId !== void 0 || hasEscalatedDelay);
|
|
1895
1902
|
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.";
|
|
1896
1903
|
const fillStatus = isComplete ? "Successful" : isFailed ? "Failed" : "Processing";
|
|
@@ -1972,15 +1979,15 @@ function ProcessingStep({
|
|
|
1972
1979
|
className: "rs-card-value",
|
|
1973
1980
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
1974
1981
|
children: [
|
|
1975
|
-
|
|
1982
|
+
_chunkMUWVDVY4cjs.getChainIcon.call(void 0, displaySourceChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1976
1983
|
"img",
|
|
1977
1984
|
{
|
|
1978
|
-
src:
|
|
1985
|
+
src: _chunkMUWVDVY4cjs.getChainIcon.call(void 0, displaySourceChain),
|
|
1979
1986
|
alt: "",
|
|
1980
1987
|
style: { width: 16, height: 16, borderRadius: 3 }
|
|
1981
1988
|
}
|
|
1982
1989
|
),
|
|
1983
|
-
|
|
1990
|
+
_chunkMUWVDVY4cjs.getChainName.call(void 0, displaySourceChain),
|
|
1984
1991
|
sourceExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1985
1992
|
"a",
|
|
1986
1993
|
{
|
|
@@ -2003,15 +2010,15 @@ function ProcessingStep({
|
|
|
2003
2010
|
className: "rs-card-value",
|
|
2004
2011
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
2005
2012
|
children: [
|
|
2006
|
-
|
|
2013
|
+
_chunkMUWVDVY4cjs.getChainIcon.call(void 0, targetChain) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2007
2014
|
"img",
|
|
2008
2015
|
{
|
|
2009
|
-
src:
|
|
2016
|
+
src: _chunkMUWVDVY4cjs.getChainIcon.call(void 0, targetChain),
|
|
2010
2017
|
alt: "",
|
|
2011
2018
|
style: { width: 16, height: 16, borderRadius: 3 }
|
|
2012
2019
|
}
|
|
2013
2020
|
),
|
|
2014
|
-
|
|
2021
|
+
_chunkMUWVDVY4cjs.getChainName.call(void 0, targetChain),
|
|
2015
2022
|
destExplorerUrl && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2016
2023
|
"a",
|
|
2017
2024
|
{
|
|
@@ -2035,10 +2042,10 @@ function ProcessingStep({
|
|
|
2035
2042
|
className: "rs-card-value",
|
|
2036
2043
|
style: { display: "flex", alignItems: "center", gap: 6 },
|
|
2037
2044
|
children: [
|
|
2038
|
-
|
|
2045
|
+
_chunkMUWVDVY4cjs.getTokenIcon.call(void 0, sourceSymbol) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2039
2046
|
"img",
|
|
2040
2047
|
{
|
|
2041
|
-
src:
|
|
2048
|
+
src: _chunkMUWVDVY4cjs.getTokenIcon.call(void 0, sourceSymbol),
|
|
2042
2049
|
alt: "",
|
|
2043
2050
|
style: { width: 16, height: 16, borderRadius: "50%" }
|
|
2044
2051
|
}
|
|
@@ -2170,7 +2177,7 @@ var clientCache = /* @__PURE__ */ new Map();
|
|
|
2170
2177
|
function getPublicClient(chainId) {
|
|
2171
2178
|
let client = clientCache.get(chainId);
|
|
2172
2179
|
if (!client) {
|
|
2173
|
-
const chain =
|
|
2180
|
+
const chain = _chunkMUWVDVY4cjs.CHAIN_BY_ID[chainId];
|
|
2174
2181
|
client = _viem.createPublicClient.call(void 0, {
|
|
2175
2182
|
chain,
|
|
2176
2183
|
transport: _viem.http.call(void 0, )
|
|
@@ -2210,4 +2217,4 @@ function getPublicClient(chainId) {
|
|
|
2210
2217
|
|
|
2211
2218
|
|
|
2212
2219
|
|
|
2213
|
-
exports.Modal = Modal; exports.Spinner = Spinner; exports.Button = Button; exports.ConnectStep = ConnectStep; exports.debugLog = debugLog; exports.debugError = debugError; exports.toEvmCaip2 = toEvmCaip2; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.PoweredBy = PoweredBy; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.formatUserError = formatUserError; exports.getEventTxHash = getEventTxHash; exports.isDepositEvent = isDepositEvent; exports.txRefsMatch = txRefsMatch; exports.
|
|
2220
|
+
exports.Modal = Modal; exports.Spinner = Spinner; exports.Button = Button; exports.ConnectStep = ConnectStep; exports.debugLog = debugLog; exports.debugError = debugError; exports.toEvmCaip2 = toEvmCaip2; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.PoweredBy = PoweredBy; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.formatUserError = formatUserError; exports.getEventTxHash = getEventTxHash; exports.isDepositEvent = isDepositEvent; exports.txRefsMatch = txRefsMatch; exports.useLatestRef = useLatestRef; exports.ProcessingStep = ProcessingStep; exports.getPublicClient = getPublicClient; exports.applyTheme = applyTheme;
|