@rhinestone/deposit-modal 0.8.0 → 0.8.2
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-J5YFZKFS.cjs → DepositModalReown-A2W6R27Q.cjs} +9 -9
- package/dist/{DepositModalReown-RZ6VSMKP.mjs → DepositModalReown-IB5WUXVT.mjs} +6 -6
- package/dist/{WithdrawModalReown-4YUV2WWV.mjs → WithdrawModalReown-A4S4BJHG.mjs} +5 -5
- package/dist/{WithdrawModalReown-B6BGY52S.cjs → WithdrawModalReown-KUWNNA2X.cjs} +8 -8
- package/dist/{chunk-SX52FXKH.mjs → chunk-2O2FJYRY.mjs} +8 -1
- package/dist/{chunk-JRFPKFL6.cjs → chunk-3WIHTUQ6.cjs} +105 -98
- package/dist/{chunk-XLXJW44N.cjs → chunk-46BRQZ2P.cjs} +500 -458
- package/dist/{chunk-LXTAAHPC.mjs → chunk-4BLOPOVO.mjs} +2 -2
- package/dist/{chunk-VURI4G2Z.cjs → chunk-5E67UM3V.cjs} +7 -7
- package/dist/{chunk-IRI34U6N.cjs → chunk-DSXMWQYB.cjs} +262 -139
- package/dist/{chunk-5S5BQ2GM.mjs → chunk-KGZU3BL2.mjs} +59 -17
- package/dist/{chunk-4IOQIWDY.cjs → chunk-ORKEBFMR.cjs} +4 -4
- package/dist/{chunk-PUMTR35E.cjs → chunk-P5T4XSN2.cjs} +9 -2
- package/dist/{chunk-YLIPI3NU.mjs → chunk-RARNNVZO.mjs} +1 -1
- package/dist/{chunk-TYB6AA6D.mjs → chunk-RH6XQHMA.mjs} +1 -1
- package/dist/{chunk-RXWJ267K.mjs → chunk-TUSEN26M.mjs} +172 -49
- package/dist/{chunk-WL7AXYQ4.cjs → chunk-UNVVUULP.cjs} +3 -3
- package/dist/{chunk-7JJ4EFDY.mjs → chunk-XK5RH4FZ.mjs} +12 -5
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +7 -7
- package/dist/index.mjs +6 -6
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/styles.css +147 -1
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkP5T4XSN2cjs = require('./chunk-P5T4XSN2.cjs');
|
|
21
23
|
|
|
22
24
|
// src/components/ui/Modal.tsx
|
|
23
25
|
|
|
@@ -953,7 +955,7 @@ function createDepositService(baseUrl, options) {
|
|
|
953
955
|
},
|
|
954
956
|
async checkLiquidity(params) {
|
|
955
957
|
if (params.destinationChainId === "solana") {
|
|
956
|
-
const token =
|
|
958
|
+
const token = _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
957
959
|
return {
|
|
958
960
|
hasLiquidity: true,
|
|
959
961
|
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _25 => _25.symbol]), () => ( "Token")),
|
|
@@ -1010,7 +1012,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1010
1012
|
const body = {
|
|
1011
1013
|
account: params.account,
|
|
1012
1014
|
// HyperCore has its own CAIP-2 namespace — never the eip155 placeholder.
|
|
1013
|
-
sourceChainId: params.sourceChainId === "hypercore" ?
|
|
1015
|
+
sourceChainId: params.sourceChainId === "hypercore" ? _chunkP5T4XSN2cjs.HYPERCORE_MAINNET_CAIP2 : `eip155:${params.sourceChainId}`,
|
|
1014
1016
|
sourceToken: params.sourceToken,
|
|
1015
1017
|
amount: params.amount
|
|
1016
1018
|
};
|
|
@@ -1074,6 +1076,31 @@ function createDepositService(baseUrl, options) {
|
|
|
1074
1076
|
return {};
|
|
1075
1077
|
}
|
|
1076
1078
|
},
|
|
1079
|
+
async fetchPricesByAddress(caip2Ids) {
|
|
1080
|
+
const list = caip2Ids.filter((id) => id.length > 0);
|
|
1081
|
+
if (list.length === 0) return {};
|
|
1082
|
+
const url = apiUrl(
|
|
1083
|
+
`/prices?${new URLSearchParams({ addresses: list.join(",") }).toString()}`
|
|
1084
|
+
);
|
|
1085
|
+
try {
|
|
1086
|
+
const response = await fetch(url, {
|
|
1087
|
+
method: "GET",
|
|
1088
|
+
headers: { "Content-Type": "application/json" },
|
|
1089
|
+
cache: "no-store"
|
|
1090
|
+
});
|
|
1091
|
+
if (!response.ok) {
|
|
1092
|
+
debugError(debug, scope, "fetchPricesByAddress:failed", {
|
|
1093
|
+
status: response.status
|
|
1094
|
+
});
|
|
1095
|
+
return {};
|
|
1096
|
+
}
|
|
1097
|
+
const data = await response.json();
|
|
1098
|
+
return _nullishCoalesce(data.prices, () => ( {}));
|
|
1099
|
+
} catch (err) {
|
|
1100
|
+
debugError(debug, scope, "fetchPricesByAddress:error", err);
|
|
1101
|
+
return {};
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1077
1104
|
async getSwappedWidgetUrl(params) {
|
|
1078
1105
|
const url = apiUrl("/onramp/swapped/widget-url");
|
|
1079
1106
|
debugLog(debug, scope, "getSwappedWidgetUrl:request", {
|
|
@@ -1308,14 +1335,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1308
1335
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _32 => _32.balance, 'optionalAccess', _33 => _33.unlocked]), () => ( "0"));
|
|
1309
1336
|
const normalizedName = tokenData.tokenName.trim();
|
|
1310
1337
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
1311
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
1312
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
1338
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkP5T4XSN2cjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
1339
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
1313
1340
|
if (!resolvedTokenAddress) {
|
|
1314
1341
|
continue;
|
|
1315
1342
|
}
|
|
1316
|
-
const registrySymbol =
|
|
1343
|
+
const registrySymbol = _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
1317
1344
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
1318
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1345
|
+
const decimals = registrySymbol !== "Token" ? _chunkP5T4XSN2cjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
1319
1346
|
tokens.push({
|
|
1320
1347
|
chainId: chainBalance.chainId,
|
|
1321
1348
|
address: resolvedTokenAddress,
|
|
@@ -1335,13 +1362,13 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1335
1362
|
function normalizeDirectToken(token) {
|
|
1336
1363
|
const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
|
|
1337
1364
|
const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
|
|
1338
|
-
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ?
|
|
1365
|
+
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkP5T4XSN2cjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : (
|
|
1339
1366
|
// HyperCore (`hypercore:mainnet`) is a non-EVM source; keep its USDC
|
|
1340
1367
|
// instead of dropping it as an unparseable chain string.
|
|
1341
|
-
|
|
1368
|
+
_chunkP5T4XSN2cjs.isHyperCoreCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "hypercore" ? "hypercore" : _chunkP5T4XSN2cjs.parseEvmChainId.call(void 0, rawChainString)
|
|
1342
1369
|
) : null)));
|
|
1343
1370
|
if (chainId === null) return null;
|
|
1344
|
-
const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ?
|
|
1371
|
+
const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ? _chunkP5T4XSN2cjs.HYPERCORE_CHAIN_ID : void 0;
|
|
1345
1372
|
const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
|
|
1346
1373
|
if (!symbol) return null;
|
|
1347
1374
|
const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _34 => _34(token, "balance"), 'optionalAccess', _35 => _35.toString, 'call', _36 => _36()]))), () => ( _optionalChain([extractNumber, 'call', _37 => _37(token, "amount"), 'optionalAccess', _38 => _38.toString, 'call', _39 => _39()]))), () => ( _optionalChain([extractNumber, 'call', _40 => _40(token, "value"), 'optionalAccess', _41 => _41.toString, 'call', _42 => _42()]))), () => ( _optionalChain([extractNumber, 'call', _43 => _43(token, "rawBalance"), 'optionalAccess', _44 => _44.toString, 'call', _45 => _45()])));
|
|
@@ -1349,14 +1376,14 @@ function normalizeDirectToken(token) {
|
|
|
1349
1376
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
1350
1377
|
token.token,
|
|
1351
1378
|
"address"
|
|
1352
|
-
))), () => ( (registryChainId !== void 0 ?
|
|
1379
|
+
))), () => ( (registryChainId !== void 0 ? _chunkP5T4XSN2cjs.getTokenAddress.call(void 0, symbol, registryChainId) : void 0)));
|
|
1353
1380
|
if (!address) return null;
|
|
1354
1381
|
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));
|
|
1355
1382
|
const isSolanaToken = chainId === "solana";
|
|
1356
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1383
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, address, registryChainId);
|
|
1357
1384
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
1358
1385
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
1359
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1386
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkP5T4XSN2cjs.getTokenDecimalsByAddress.call(void 0, address, registryChainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
1360
1387
|
return {
|
|
1361
1388
|
chainId,
|
|
1362
1389
|
address,
|
|
@@ -1497,7 +1524,7 @@ function getPublicClient(chainId, rpcUrls) {
|
|
|
1497
1524
|
const cacheKey = `${chainId}|${_nullishCoalesce(url, () => ( ""))}`;
|
|
1498
1525
|
let client = clientCache.get(cacheKey);
|
|
1499
1526
|
if (!client) {
|
|
1500
|
-
const chain =
|
|
1527
|
+
const chain = _chunkP5T4XSN2cjs.CHAIN_BY_ID[chainId];
|
|
1501
1528
|
client = _viem.createPublicClient.call(void 0, {
|
|
1502
1529
|
chain,
|
|
1503
1530
|
transport: _viem.http.call(void 0, url)
|
|
@@ -2468,7 +2495,7 @@ var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fr
|
|
|
2468
2495
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
|
|
2469
2496
|
"+6"
|
|
2470
2497
|
] });
|
|
2471
|
-
var EXTRA_CHAIN_COUNT = Math.max(0,
|
|
2498
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunkP5T4XSN2cjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
2472
2499
|
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2473
2500
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
2474
2501
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
@@ -2497,7 +2524,8 @@ function ConnectStep({
|
|
|
2497
2524
|
onSelectDappImport,
|
|
2498
2525
|
title = "Deposit",
|
|
2499
2526
|
subtitle,
|
|
2500
|
-
defaultMethodTab = "crypto"
|
|
2527
|
+
defaultMethodTab = "crypto",
|
|
2528
|
+
onMethodTabChange
|
|
2501
2529
|
}) {
|
|
2502
2530
|
const rows = _nullishCoalesce(walletRows, () => ( []));
|
|
2503
2531
|
const handleConnect = _nullishCoalesce(onConnect, () => ( onRequestConnect));
|
|
@@ -2709,6 +2737,10 @@ function ConnectStep({
|
|
|
2709
2737
|
const hasCash = cashRows.length > 0;
|
|
2710
2738
|
const showToggle = hasCrypto && hasCash;
|
|
2711
2739
|
const [tab, setTab] = _react.useState.call(void 0, defaultMethodTab);
|
|
2740
|
+
const handleTabChange = (next) => {
|
|
2741
|
+
setTab(next);
|
|
2742
|
+
_optionalChain([onMethodTabChange, 'optionalCall', _75 => _75(next)]);
|
|
2743
|
+
};
|
|
2712
2744
|
const activeTab = showToggle ? tab : hasCash && !hasCrypto ? "cash" : "crypto";
|
|
2713
2745
|
const activeRows = activeTab === "cash" ? cashRows : cryptoRows;
|
|
2714
2746
|
_react.useEffect.call(void 0, () => {
|
|
@@ -2732,7 +2764,7 @@ function ConnectStep({
|
|
|
2732
2764
|
{
|
|
2733
2765
|
ariaLabel: "Deposit method type",
|
|
2734
2766
|
value: activeTab,
|
|
2735
|
-
onChange:
|
|
2767
|
+
onChange: handleTabChange,
|
|
2736
2768
|
options: [
|
|
2737
2769
|
{ value: "crypto", label: "Crypto" },
|
|
2738
2770
|
{ value: "cash", label: "Cash" }
|
|
@@ -2760,25 +2792,109 @@ ConnectStep.displayName = "ConnectStep";
|
|
|
2760
2792
|
// src/components/ui/TokenIcon.tsx
|
|
2761
2793
|
|
|
2762
2794
|
|
|
2795
|
+
function preconnectIconCdn() {
|
|
2796
|
+
if (typeof document === "undefined") return;
|
|
2797
|
+
if (document.getElementById("rs-icon-cdn-preconnect")) return;
|
|
2798
|
+
const link = document.createElement("link");
|
|
2799
|
+
link.id = "rs-icon-cdn-preconnect";
|
|
2800
|
+
link.rel = "preconnect";
|
|
2801
|
+
link.href = "https://s3.rhinestone.dev";
|
|
2802
|
+
link.crossOrigin = "anonymous";
|
|
2803
|
+
document.head.appendChild(link);
|
|
2804
|
+
}
|
|
2805
|
+
preconnectIconCdn();
|
|
2763
2806
|
function TokenIcon({ symbol, className, fallback }) {
|
|
2764
|
-
const [
|
|
2765
|
-
|
|
2807
|
+
const [loadedSymbol, setLoadedSymbol] = _react.useState.call(void 0, null);
|
|
2808
|
+
const [erroredSymbol, setErroredSymbol] = _react.useState.call(void 0, null);
|
|
2809
|
+
if (erroredSymbol === symbol) {
|
|
2766
2810
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: fallback });
|
|
2767
2811
|
}
|
|
2812
|
+
const loading = loadedSymbol !== symbol;
|
|
2768
2813
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2769
2814
|
"img",
|
|
2770
2815
|
{
|
|
2771
|
-
src:
|
|
2816
|
+
src: _chunkP5T4XSN2cjs.tokenIconUrl.call(void 0, symbol),
|
|
2772
2817
|
alt: "",
|
|
2773
|
-
className,
|
|
2774
|
-
loading: "lazy",
|
|
2818
|
+
className: `rs-token-icon ${_nullishCoalesce(className, () => ( ""))}`.trimEnd(),
|
|
2775
2819
|
decoding: "async",
|
|
2776
|
-
|
|
2777
|
-
|
|
2820
|
+
"data-loading": loading ? "" : void 0,
|
|
2821
|
+
onLoad: () => setLoadedSymbol(symbol),
|
|
2822
|
+
onError: () => setErroredSymbol(symbol)
|
|
2823
|
+
},
|
|
2824
|
+
symbol
|
|
2778
2825
|
);
|
|
2779
2826
|
}
|
|
2780
2827
|
TokenIcon.displayName = "TokenIcon";
|
|
2781
2828
|
|
|
2829
|
+
// src/core/useTokenPrices.ts
|
|
2830
|
+
|
|
2831
|
+
function isErc20(token) {
|
|
2832
|
+
return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !== _chunkP5T4XSN2cjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
2833
|
+
}
|
|
2834
|
+
function caip2For(token) {
|
|
2835
|
+
return `${_chunkP5T4XSN2cjs.toEvmCaip2.call(void 0, token.chainId)}:${token.address.toLowerCase()}`;
|
|
2836
|
+
}
|
|
2837
|
+
async function fetchTokenPriceUsd(service, token) {
|
|
2838
|
+
if (isErc20(token)) {
|
|
2839
|
+
const caip2 = caip2For(token);
|
|
2840
|
+
const prices2 = await service.fetchPricesByAddress([caip2]);
|
|
2841
|
+
const price2 = prices2[caip2];
|
|
2842
|
+
return typeof price2 === "number" && price2 > 0 ? price2 : null;
|
|
2843
|
+
}
|
|
2844
|
+
const symbol = token.symbol.toUpperCase();
|
|
2845
|
+
const prices = await service.fetchPrices([symbol]);
|
|
2846
|
+
const price = prices[symbol];
|
|
2847
|
+
return typeof price === "number" && price > 0 ? price : null;
|
|
2848
|
+
}
|
|
2849
|
+
function useTokenPrices(service, tokens) {
|
|
2850
|
+
const [prices, setPrices] = _react.useState.call(void 0, {});
|
|
2851
|
+
const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _76 => _76.symbol])));
|
|
2852
|
+
const entries = [
|
|
2853
|
+
...new Map(
|
|
2854
|
+
defined.map((token) => {
|
|
2855
|
+
const erc20 = isErc20(token);
|
|
2856
|
+
const caip2 = erc20 ? caip2For(token) : null;
|
|
2857
|
+
const symbol = token.symbol.toUpperCase();
|
|
2858
|
+
return [_nullishCoalesce(caip2, () => ( `sym:${symbol}`)), { symbol, caip2 }];
|
|
2859
|
+
})
|
|
2860
|
+
).values()
|
|
2861
|
+
].sort(
|
|
2862
|
+
(a, b) => (_nullishCoalesce(a.caip2, () => ( a.symbol))).localeCompare(_nullishCoalesce(b.caip2, () => ( b.symbol)))
|
|
2863
|
+
);
|
|
2864
|
+
const key = JSON.stringify(entries);
|
|
2865
|
+
_react.useEffect.call(void 0, () => {
|
|
2866
|
+
if (key === "[]") return;
|
|
2867
|
+
let cancelled = false;
|
|
2868
|
+
const parsed = JSON.parse(key);
|
|
2869
|
+
const symbols = [
|
|
2870
|
+
...new Set(parsed.filter((e) => !e.caip2).map((e) => e.symbol))
|
|
2871
|
+
];
|
|
2872
|
+
const caip2Ids = [
|
|
2873
|
+
...new Set(
|
|
2874
|
+
parsed.filter((e) => e.caip2).map((e) => e.caip2)
|
|
2875
|
+
)
|
|
2876
|
+
];
|
|
2877
|
+
Promise.all([
|
|
2878
|
+
symbols.length > 0 ? service.fetchPrices(symbols) : Promise.resolve({}),
|
|
2879
|
+
caip2Ids.length > 0 ? service.fetchPricesByAddress(caip2Ids) : Promise.resolve({})
|
|
2880
|
+
]).then(([bySymbol, byAddress]) => {
|
|
2881
|
+
if (cancelled) return;
|
|
2882
|
+
const merged = { ...bySymbol };
|
|
2883
|
+
for (const entry of parsed) {
|
|
2884
|
+
if (!entry.caip2) continue;
|
|
2885
|
+
const price = byAddress[entry.caip2];
|
|
2886
|
+
if (typeof price === "number") merged[entry.symbol] = price;
|
|
2887
|
+
}
|
|
2888
|
+
setPrices(merged);
|
|
2889
|
+
}).catch(() => {
|
|
2890
|
+
});
|
|
2891
|
+
return () => {
|
|
2892
|
+
cancelled = true;
|
|
2893
|
+
};
|
|
2894
|
+
}, [service, key]);
|
|
2895
|
+
return prices;
|
|
2896
|
+
}
|
|
2897
|
+
|
|
2782
2898
|
// src/components/steps/ProcessingStep.tsx
|
|
2783
2899
|
|
|
2784
2900
|
|
|
@@ -2851,8 +2967,8 @@ function Tooltip({ content, children, className }) {
|
|
|
2851
2967
|
function handleOutside(event) {
|
|
2852
2968
|
const target = event.target;
|
|
2853
2969
|
if (!target) return;
|
|
2854
|
-
if (_optionalChain([triggerRef, 'access',
|
|
2855
|
-
if (_optionalChain([bubbleRef, 'access',
|
|
2970
|
+
if (_optionalChain([triggerRef, 'access', _77 => _77.current, 'optionalAccess', _78 => _78.contains, 'call', _79 => _79(target)])) return;
|
|
2971
|
+
if (_optionalChain([bubbleRef, 'access', _80 => _80.current, 'optionalAccess', _81 => _81.contains, 'call', _82 => _82(target)])) return;
|
|
2856
2972
|
setOpen(false);
|
|
2857
2973
|
}
|
|
2858
2974
|
function handleKey(event) {
|
|
@@ -3047,7 +3163,7 @@ function asNumber(value) {
|
|
|
3047
3163
|
const trimmed = value.trim();
|
|
3048
3164
|
if (!trimmed) return void 0;
|
|
3049
3165
|
const caipMatch = trimmed.match(/^eip155:(\d+)$/);
|
|
3050
|
-
if (_optionalChain([caipMatch, 'optionalAccess',
|
|
3166
|
+
if (_optionalChain([caipMatch, 'optionalAccess', _83 => _83[1]])) {
|
|
3051
3167
|
const parsed2 = Number(caipMatch[1]);
|
|
3052
3168
|
return Number.isFinite(parsed2) ? parsed2 : void 0;
|
|
3053
3169
|
}
|
|
@@ -3066,24 +3182,24 @@ function asAddress(value) {
|
|
|
3066
3182
|
return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
|
|
3067
3183
|
}
|
|
3068
3184
|
function getEventTxHash(event) {
|
|
3069
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3185
|
+
if (!_optionalChain([event, 'optionalAccess', _84 => _84.type])) return void 0;
|
|
3070
3186
|
if (event.type === "deposit-received") {
|
|
3071
|
-
return asString(_optionalChain([event, 'access',
|
|
3187
|
+
return asString(_optionalChain([event, 'access', _85 => _85.data, 'optionalAccess', _86 => _86.transactionHash]));
|
|
3072
3188
|
}
|
|
3073
3189
|
if (event.type === "bridge-started" || event.type === "bridge-complete") {
|
|
3074
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
3075
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
3076
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
3190
|
+
const deposit = isRecord(_optionalChain([event, 'access', _87 => _87.data, 'optionalAccess', _88 => _88.deposit])) ? event.data.deposit : void 0;
|
|
3191
|
+
const source = isRecord(_optionalChain([event, 'access', _89 => _89.data, 'optionalAccess', _90 => _90.source])) ? event.data.source : void 0;
|
|
3192
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _91 => _91.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _92 => _92.transactionHash]))));
|
|
3077
3193
|
}
|
|
3078
3194
|
if (event.type === "bridge-failed" || event.type === "error") {
|
|
3079
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
3080
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
3081
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
3195
|
+
const deposit = isRecord(_optionalChain([event, 'access', _93 => _93.data, 'optionalAccess', _94 => _94.deposit])) ? event.data.deposit : void 0;
|
|
3196
|
+
const source = isRecord(_optionalChain([event, 'access', _95 => _95.data, 'optionalAccess', _96 => _96.source])) ? event.data.source : void 0;
|
|
3197
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _97 => _97.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _98 => _98.transactionHash]))));
|
|
3082
3198
|
}
|
|
3083
3199
|
return void 0;
|
|
3084
3200
|
}
|
|
3085
3201
|
function getEventSourceDetails(event) {
|
|
3086
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3202
|
+
if (!_optionalChain([event, 'optionalAccess', _99 => _99.type]) || !isRecord(event.data)) return {};
|
|
3087
3203
|
if (event.type === "deposit-received") {
|
|
3088
3204
|
return {
|
|
3089
3205
|
chainId: asNumber(event.data.chain),
|
|
@@ -3095,9 +3211,9 @@ function getEventSourceDetails(event) {
|
|
|
3095
3211
|
const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
|
|
3096
3212
|
if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") {
|
|
3097
3213
|
return {
|
|
3098
|
-
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess',
|
|
3099
|
-
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess',
|
|
3100
|
-
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess',
|
|
3214
|
+
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _100 => _100.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _101 => _101.chain])))),
|
|
3215
|
+
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _102 => _102.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _103 => _103.amount])))),
|
|
3216
|
+
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _104 => _104.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _105 => _105.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _106 => _106.token]))))
|
|
3101
3217
|
};
|
|
3102
3218
|
}
|
|
3103
3219
|
return {};
|
|
@@ -3111,7 +3227,7 @@ function asChain(value) {
|
|
|
3111
3227
|
return asNumber(value);
|
|
3112
3228
|
}
|
|
3113
3229
|
function getEventDestinationDetails(event) {
|
|
3114
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3230
|
+
if (!_optionalChain([event, 'optionalAccess', _107 => _107.type]) || !isRecord(event.data)) return {};
|
|
3115
3231
|
if (event.type !== "bridge-started" && event.type !== "bridge-complete") {
|
|
3116
3232
|
return {};
|
|
3117
3233
|
}
|
|
@@ -3121,14 +3237,14 @@ function getEventDestinationDetails(event) {
|
|
|
3121
3237
|
return {
|
|
3122
3238
|
chainId: asChain(destination.chain),
|
|
3123
3239
|
amount: asAmount(destination.amount),
|
|
3124
|
-
token: _optionalChain([token, 'optionalAccess',
|
|
3240
|
+
token: _optionalChain([token, 'optionalAccess', _108 => _108.trim, 'call', _109 => _109()]) || void 0
|
|
3125
3241
|
};
|
|
3126
3242
|
}
|
|
3127
3243
|
function isDepositEvent(event) {
|
|
3128
|
-
return _optionalChain([event, 'optionalAccess',
|
|
3244
|
+
return _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _113 => _113.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _114 => _114.type]) === "error";
|
|
3129
3245
|
}
|
|
3130
3246
|
function isFailedEvent(event) {
|
|
3131
|
-
return _optionalChain([event, 'optionalAccess',
|
|
3247
|
+
return _optionalChain([event, 'optionalAccess', _115 => _115.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _116 => _116.type]) === "error";
|
|
3132
3248
|
}
|
|
3133
3249
|
function isHexString(value) {
|
|
3134
3250
|
return value.startsWith("0x") || value.startsWith("0X");
|
|
@@ -3140,7 +3256,7 @@ function txRefsMatch(a, b) {
|
|
|
3140
3256
|
return a === b;
|
|
3141
3257
|
}
|
|
3142
3258
|
function formatBridgeFailedMessage(event) {
|
|
3143
|
-
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
3259
|
+
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _117 => _117.data]), () => ( {}));
|
|
3144
3260
|
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
3145
3261
|
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
3146
3262
|
function toUserFacingFailure(raw) {
|
|
@@ -3168,7 +3284,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
3168
3284
|
return { message: "Bridge failed" };
|
|
3169
3285
|
}
|
|
3170
3286
|
function failureMessageForEvent(event) {
|
|
3171
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3287
|
+
if (_optionalChain([event, 'optionalAccess', _118 => _118.type]) === "error") {
|
|
3172
3288
|
const message = isRecord(event.data) ? asString(event.data.message) : void 0;
|
|
3173
3289
|
return _nullishCoalesce(message, () => ( "Unknown error"));
|
|
3174
3290
|
}
|
|
@@ -3196,29 +3312,29 @@ var EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
|
|
|
3196
3312
|
function resolveTokenDisplay(token, chain, fallback) {
|
|
3197
3313
|
if (token !== void 0) {
|
|
3198
3314
|
if (chain === "solana") {
|
|
3199
|
-
const solanaToken =
|
|
3315
|
+
const solanaToken = _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, token);
|
|
3200
3316
|
if (solanaToken) {
|
|
3201
3317
|
return { symbol: solanaToken.symbol, decimals: solanaToken.decimals };
|
|
3202
3318
|
}
|
|
3203
3319
|
} else if (chain === "hypercore") {
|
|
3204
|
-
const t =
|
|
3320
|
+
const t = _chunkP5T4XSN2cjs.HYPERCORE_SOURCE_TOKENS.find(
|
|
3205
3321
|
(x) => x.address.toLowerCase() === token.toLowerCase()
|
|
3206
3322
|
);
|
|
3207
3323
|
if (t) return { symbol: t.symbol, decimals: t.decimals };
|
|
3208
3324
|
} else if (EVM_ADDRESS_RE.test(token)) {
|
|
3209
|
-
const symbol =
|
|
3210
|
-
const decimals =
|
|
3325
|
+
const symbol = _chunkP5T4XSN2cjs.getTokenSymbol.call(void 0, token, chain);
|
|
3326
|
+
const decimals = _chunkP5T4XSN2cjs.findTokenDecimals.call(void 0, token, chain);
|
|
3211
3327
|
if (symbol !== "Token" || decimals !== void 0) {
|
|
3212
3328
|
return {
|
|
3213
|
-
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
3214
|
-
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess',
|
|
3329
|
+
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _119 => _119.symbol]), () => ( symbol)),
|
|
3330
|
+
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _120 => _120.decimals])))
|
|
3215
3331
|
};
|
|
3216
3332
|
}
|
|
3217
3333
|
}
|
|
3218
3334
|
}
|
|
3219
3335
|
return {
|
|
3220
|
-
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
3221
|
-
decimals: _optionalChain([fallback, 'optionalAccess',
|
|
3336
|
+
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _121 => _121.symbol]), () => ( "Token")),
|
|
3337
|
+
decimals: _optionalChain([fallback, 'optionalAccess', _122 => _122.decimals])
|
|
3222
3338
|
};
|
|
3223
3339
|
}
|
|
3224
3340
|
function maxFractionDigitsFor(symbol) {
|
|
@@ -3246,18 +3362,38 @@ function formatRawTokenAmount(rawAmount, token) {
|
|
|
3246
3362
|
if (value === void 0) return void 0;
|
|
3247
3363
|
return formatTokenAmount(value, token.symbol);
|
|
3248
3364
|
}
|
|
3365
|
+
function isDisplayStablecoinSymbol(symbol) {
|
|
3366
|
+
return symbol !== void 0 && STABLECOIN_SYMBOLS.has(symbol.toUpperCase());
|
|
3367
|
+
}
|
|
3249
3368
|
function priceUsdFor(symbol, prices) {
|
|
3250
3369
|
if (!symbol) return void 0;
|
|
3251
|
-
const
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3370
|
+
const quoted = prices[symbol.toUpperCase()];
|
|
3371
|
+
return typeof quoted === "number" && quoted > 0 ? quoted : void 0;
|
|
3372
|
+
}
|
|
3373
|
+
function isRecognizedToken(address, chain) {
|
|
3374
|
+
if (address === void 0 || chain === void 0) return false;
|
|
3375
|
+
if (chain === "solana") return _chunkP5T4XSN2cjs.getSolanaTokenByMint.call(void 0, address) !== void 0;
|
|
3376
|
+
if (chain === "hypercore") {
|
|
3377
|
+
return _chunkP5T4XSN2cjs.HYPERCORE_SOURCE_TOKENS.some(
|
|
3378
|
+
(t) => t.address.toLowerCase() === address.toLowerCase()
|
|
3379
|
+
);
|
|
3380
|
+
}
|
|
3381
|
+
return EVM_ADDRESS_RE.test(address) && _chunkP5T4XSN2cjs.isRegistryTokenOnChain.call(void 0, address, chain);
|
|
3255
3382
|
}
|
|
3256
3383
|
function estimateReceiveAmount(params) {
|
|
3257
|
-
const {
|
|
3258
|
-
|
|
3384
|
+
const {
|
|
3385
|
+
sourceAmount,
|
|
3386
|
+
sourceSymbol,
|
|
3387
|
+
targetSymbol,
|
|
3388
|
+
sourceAmountUsd,
|
|
3389
|
+
prices,
|
|
3390
|
+
sourceTrusted
|
|
3391
|
+
} = params;
|
|
3392
|
+
const trusted = sourceTrusted !== false;
|
|
3393
|
+
if (trusted && sourceSymbol !== void 0 && sourceSymbol.toUpperCase() === targetSymbol.toUpperCase()) {
|
|
3259
3394
|
return sourceAmount;
|
|
3260
3395
|
}
|
|
3396
|
+
if (!trusted) return void 0;
|
|
3261
3397
|
const usdValue = sourceAmountUsd !== void 0 && Number.isFinite(sourceAmountUsd) ? sourceAmountUsd : sourceAmount !== void 0 ? (() => {
|
|
3262
3398
|
const sourcePrice = priceUsdFor(sourceSymbol, prices);
|
|
3263
3399
|
return sourcePrice !== void 0 ? sourceAmount * sourcePrice : void 0;
|
|
@@ -3293,31 +3429,6 @@ function formatReceiveEstimate(params) {
|
|
|
3293
3429
|
return sameSymbol ? `${formatted} ${params.targetSymbol}` : `~${formatted} ${params.targetSymbol}`;
|
|
3294
3430
|
}
|
|
3295
3431
|
|
|
3296
|
-
// src/core/useTokenPrices.ts
|
|
3297
|
-
|
|
3298
|
-
function useTokenPrices(service, symbols) {
|
|
3299
|
-
const [prices, setPrices] = _react.useState.call(void 0, {});
|
|
3300
|
-
const symbolsKey = [
|
|
3301
|
-
...new Set(
|
|
3302
|
-
symbols.filter((symbol) => Boolean(symbol)).map((symbol) => symbol.toUpperCase())
|
|
3303
|
-
)
|
|
3304
|
-
].sort().join(",");
|
|
3305
|
-
_react.useEffect.call(void 0, () => {
|
|
3306
|
-
if (!symbolsKey) return;
|
|
3307
|
-
let cancelled = false;
|
|
3308
|
-
service.fetchPrices(symbolsKey.split(",")).then((result) => {
|
|
3309
|
-
if (!cancelled && result && Object.keys(result).length > 0) {
|
|
3310
|
-
setPrices(result);
|
|
3311
|
-
}
|
|
3312
|
-
}).catch(() => {
|
|
3313
|
-
});
|
|
3314
|
-
return () => {
|
|
3315
|
-
cancelled = true;
|
|
3316
|
-
};
|
|
3317
|
-
}, [service, symbolsKey]);
|
|
3318
|
-
return prices;
|
|
3319
|
-
}
|
|
3320
|
-
|
|
3321
3432
|
// src/components/steps/ProcessingStep.tsx
|
|
3322
3433
|
|
|
3323
3434
|
function SuccessBadge() {
|
|
@@ -3419,7 +3530,7 @@ function normalizeFeeUsd(value) {
|
|
|
3419
3530
|
return Number.isFinite(value) ? Math.max(0, value) : null;
|
|
3420
3531
|
}
|
|
3421
3532
|
function formatUsdFee(value) {
|
|
3422
|
-
return `$${_nullishCoalesce(_optionalChain([normalizeFeeUsd, 'call',
|
|
3533
|
+
return `$${_nullishCoalesce(_optionalChain([normalizeFeeUsd, 'call', _123 => _123(value), 'optionalAccess', _124 => _124.toFixed, 'call', _125 => _125(2)]), () => ( "0.00"))}`;
|
|
3423
3534
|
}
|
|
3424
3535
|
function getMarketNetworkFees(breakdown) {
|
|
3425
3536
|
if (!breakdown) return null;
|
|
@@ -3473,12 +3584,12 @@ function isEventForTx(event, txHash) {
|
|
|
3473
3584
|
return txRefsMatch(eventTxHash, txHash);
|
|
3474
3585
|
}
|
|
3475
3586
|
function parseWebhookTimestamp(event) {
|
|
3476
|
-
if (typeof _optionalChain([event, 'optionalAccess',
|
|
3587
|
+
if (typeof _optionalChain([event, 'optionalAccess', _126 => _126.time]) !== "string") return void 0;
|
|
3477
3588
|
const timestamp = Date.parse(event.time);
|
|
3478
3589
|
return Number.isFinite(timestamp) ? timestamp : void 0;
|
|
3479
3590
|
}
|
|
3480
3591
|
function syncPhaseTimings(previous, event) {
|
|
3481
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3592
|
+
if (!_optionalChain([event, 'optionalAccess', _127 => _127.type])) return previous;
|
|
3482
3593
|
const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
|
|
3483
3594
|
const setReceived = (event.type === "deposit-received" || event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") && previous.receivedAt === void 0;
|
|
3484
3595
|
const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete") && previous.bridgingAt === void 0;
|
|
@@ -3540,46 +3651,46 @@ function getCurrentPhaseId(state, phaseTimings) {
|
|
|
3540
3651
|
if (state.type === "complete") {
|
|
3541
3652
|
return void 0;
|
|
3542
3653
|
}
|
|
3543
|
-
if (_optionalChain([state, 'access',
|
|
3654
|
+
if (_optionalChain([state, 'access', _128 => _128.lastEvent, 'optionalAccess', _129 => _129.type]) === "bridge-started" || _optionalChain([state, 'access', _130 => _130.lastEvent, 'optionalAccess', _131 => _131.type]) === "bridge-complete")
|
|
3544
3655
|
return "bridging";
|
|
3545
|
-
if (_optionalChain([state, 'access',
|
|
3656
|
+
if (_optionalChain([state, 'access', _132 => _132.lastEvent, 'optionalAccess', _133 => _133.type]) === "deposit-received") return "received";
|
|
3546
3657
|
return "confirming";
|
|
3547
3658
|
}
|
|
3548
3659
|
function getCompletionDestinationTxHash(event) {
|
|
3549
|
-
const eventData = _optionalChain([event, 'optionalAccess',
|
|
3550
|
-
const swapTxHash = _optionalChain([eventData, 'optionalAccess',
|
|
3551
|
-
const destinationTxHash = _optionalChain([eventData, 'optionalAccess',
|
|
3660
|
+
const eventData = _optionalChain([event, 'optionalAccess', _134 => _134.data]);
|
|
3661
|
+
const swapTxHash = _optionalChain([eventData, 'optionalAccess', _135 => _135.swap, 'optionalAccess', _136 => _136.transactionHash]);
|
|
3662
|
+
const destinationTxHash = _optionalChain([eventData, 'optionalAccess', _137 => _137.destination, 'optionalAccess', _138 => _138.transactionHash]);
|
|
3552
3663
|
return _nullishCoalesce(swapTxHash, () => ( destinationTxHash));
|
|
3553
3664
|
}
|
|
3554
3665
|
function getTerminalProcessingOutcome(event) {
|
|
3555
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3666
|
+
if (_optionalChain([event, 'optionalAccess', _139 => _139.type]) === "post-bridge-swap-complete") {
|
|
3556
3667
|
return {
|
|
3557
3668
|
type: "complete",
|
|
3558
3669
|
destinationTxHash: getCompletionDestinationTxHash(event)
|
|
3559
3670
|
};
|
|
3560
3671
|
}
|
|
3561
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3672
|
+
if (_optionalChain([event, 'optionalAccess', _140 => _140.type]) === "post-bridge-swap-failed") {
|
|
3562
3673
|
return {
|
|
3563
3674
|
type: "failed",
|
|
3564
3675
|
message: formatBridgeFailedMessage(event).message
|
|
3565
3676
|
};
|
|
3566
3677
|
}
|
|
3567
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3678
|
+
if (_optionalChain([event, 'optionalAccess', _141 => _141.type]) === "bridge-complete") {
|
|
3568
3679
|
return {
|
|
3569
3680
|
type: "complete",
|
|
3570
3681
|
destinationTxHash: getCompletionDestinationTxHash(event)
|
|
3571
3682
|
};
|
|
3572
3683
|
}
|
|
3573
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3684
|
+
if (_optionalChain([event, 'optionalAccess', _142 => _142.type]) === "bridge-failed") {
|
|
3574
3685
|
return {
|
|
3575
3686
|
type: "failed",
|
|
3576
3687
|
message: formatBridgeFailedMessage(event).message
|
|
3577
3688
|
};
|
|
3578
3689
|
}
|
|
3579
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3690
|
+
if (_optionalChain([event, 'optionalAccess', _143 => _143.type]) === "error") {
|
|
3580
3691
|
return {
|
|
3581
3692
|
type: "failed",
|
|
3582
|
-
message: _nullishCoalesce(_optionalChain([event, 'access',
|
|
3693
|
+
message: _nullishCoalesce(_optionalChain([event, 'access', _144 => _144.data, 'optionalAccess', _145 => _145.message]), () => ( "Unknown error"))
|
|
3583
3694
|
};
|
|
3584
3695
|
}
|
|
3585
3696
|
return null;
|
|
@@ -3587,10 +3698,10 @@ function getTerminalProcessingOutcome(event) {
|
|
|
3587
3698
|
function getInitialProcessingState(event, txHash) {
|
|
3588
3699
|
if (!event || !isEventForTx(event, txHash)) return null;
|
|
3589
3700
|
const terminal = getTerminalProcessingOutcome(event);
|
|
3590
|
-
if (_optionalChain([terminal, 'optionalAccess',
|
|
3701
|
+
if (_optionalChain([terminal, 'optionalAccess', _146 => _146.type]) === "complete") {
|
|
3591
3702
|
return { type: "complete", lastEvent: event };
|
|
3592
3703
|
}
|
|
3593
|
-
if (_optionalChain([terminal, 'optionalAccess',
|
|
3704
|
+
if (_optionalChain([terminal, 'optionalAccess', _147 => _147.type]) === "failed") {
|
|
3594
3705
|
return { type: "failed", message: terminal.message, lastEvent: event };
|
|
3595
3706
|
}
|
|
3596
3707
|
if (isDepositEvent(event)) {
|
|
@@ -3693,7 +3804,7 @@ function ProcessingStep({
|
|
|
3693
3804
|
flowLabel
|
|
3694
3805
|
});
|
|
3695
3806
|
const context = processingContextRef.current;
|
|
3696
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3807
|
+
_optionalChain([onDepositCompleteRef, 'access', _148 => _148.current, 'optionalCall', _149 => _149(txHash, void 0, {
|
|
3697
3808
|
amount: context.amount,
|
|
3698
3809
|
sourceChain: context.sourceChain,
|
|
3699
3810
|
sourceToken: context.sourceToken,
|
|
@@ -3724,7 +3835,7 @@ function ProcessingStep({
|
|
|
3724
3835
|
destinationTxHash: outcome.destinationTxHash,
|
|
3725
3836
|
event: event.type
|
|
3726
3837
|
});
|
|
3727
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3838
|
+
_optionalChain([onDepositCompleteRef, 'access', _150 => _150.current, 'optionalCall', _151 => _151(txHash, outcome.destinationTxHash, {
|
|
3728
3839
|
amount: context.amount,
|
|
3729
3840
|
sourceChain: context.sourceChain,
|
|
3730
3841
|
sourceToken: context.sourceToken,
|
|
@@ -3740,7 +3851,7 @@ function ProcessingStep({
|
|
|
3740
3851
|
message: outcome.message,
|
|
3741
3852
|
event: event.type
|
|
3742
3853
|
});
|
|
3743
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
3854
|
+
_optionalChain([onDepositFailedRef, 'access', _152 => _152.current, 'optionalCall', _153 => _153(txHash, outcome.message)]);
|
|
3744
3855
|
}, [
|
|
3745
3856
|
debug,
|
|
3746
3857
|
onDepositCompleteRef,
|
|
@@ -3772,13 +3883,13 @@ function ProcessingStep({
|
|
|
3772
3883
|
updatePhaseTimings(
|
|
3773
3884
|
(previous) => syncPhaseTimings(previous, state.lastEvent)
|
|
3774
3885
|
);
|
|
3775
|
-
}, [_optionalChain([state, 'access',
|
|
3886
|
+
}, [_optionalChain([state, 'access', _154 => _154.lastEvent, 'optionalAccess', _155 => _155.time]), _optionalChain([state, 'access', _156 => _156.lastEvent, 'optionalAccess', _157 => _157.type]), updatePhaseTimings]);
|
|
3776
3887
|
const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
|
|
3777
3888
|
_react.useEffect.call(void 0, () => {
|
|
3778
3889
|
let cancelled = false;
|
|
3779
3890
|
let timeoutId;
|
|
3780
|
-
const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess',
|
|
3781
|
-
const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess',
|
|
3891
|
+
const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _158 => _158.variant]) === "fiat";
|
|
3892
|
+
const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _159 => _159.expectedOrderUuid]), () => ( null));
|
|
3782
3893
|
setSwappedFiatContext(null);
|
|
3783
3894
|
if (isFiatSwappedOrder && !expectedOrderUuid) {
|
|
3784
3895
|
return () => {
|
|
@@ -3828,8 +3939,8 @@ function ProcessingStep({
|
|
|
3828
3939
|
smartAccount,
|
|
3829
3940
|
txHash,
|
|
3830
3941
|
isSwappedOrder,
|
|
3831
|
-
_optionalChain([swappedContext, 'optionalAccess',
|
|
3832
|
-
_optionalChain([swappedContext, 'optionalAccess',
|
|
3942
|
+
_optionalChain([swappedContext, 'optionalAccess', _160 => _160.variant]),
|
|
3943
|
+
_optionalChain([swappedContext, 'optionalAccess', _161 => _161.expectedOrderUuid])
|
|
3833
3944
|
]);
|
|
3834
3945
|
_react.useEffect.call(void 0, () => {
|
|
3835
3946
|
if (directTransfer) return;
|
|
@@ -3855,20 +3966,20 @@ function ProcessingStep({
|
|
|
3855
3966
|
debugLog(debug, "processing", "poll:event", {
|
|
3856
3967
|
type: lastEvent2.type,
|
|
3857
3968
|
matchesTx: eventMatchesTx,
|
|
3858
|
-
intentId: _optionalChain([eventData, 'optionalAccess',
|
|
3969
|
+
intentId: _optionalChain([eventData, 'optionalAccess', _162 => _162.intentId])
|
|
3859
3970
|
});
|
|
3860
3971
|
}
|
|
3861
3972
|
if (!isMounted) return;
|
|
3862
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3973
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _163 => _163.type]) === "bridge-complete") {
|
|
3863
3974
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
3864
|
-
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access',
|
|
3975
|
+
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _164 => _164.data, 'optionalAccess', _165 => _165.destination, 'optionalAccess', _166 => _166.transactionHash]);
|
|
3865
3976
|
debugLog(debug, "processing", "state:complete", {
|
|
3866
3977
|
txHash,
|
|
3867
3978
|
destinationTxHash: destinationTxHash2,
|
|
3868
3979
|
event: eventForCurrentTx.type
|
|
3869
3980
|
});
|
|
3870
3981
|
const context = processingContextRef.current;
|
|
3871
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3982
|
+
_optionalChain([onDepositCompleteRef, 'access', _167 => _167.current, 'optionalCall', _168 => _168(txHash, destinationTxHash2, {
|
|
3872
3983
|
amount: context.amount,
|
|
3873
3984
|
sourceChain: context.sourceChain,
|
|
3874
3985
|
sourceToken: context.sourceToken,
|
|
@@ -3879,7 +3990,7 @@ function ProcessingStep({
|
|
|
3879
3990
|
})]);
|
|
3880
3991
|
return;
|
|
3881
3992
|
}
|
|
3882
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3993
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _169 => _169.type]) === "bridge-failed") {
|
|
3883
3994
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
3884
3995
|
setState({
|
|
3885
3996
|
type: "failed",
|
|
@@ -3891,11 +4002,11 @@ function ProcessingStep({
|
|
|
3891
4002
|
message: formatted.message,
|
|
3892
4003
|
code: formatted.code
|
|
3893
4004
|
});
|
|
3894
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
4005
|
+
_optionalChain([onDepositFailedRef, 'access', _170 => _170.current, 'optionalCall', _171 => _171(txHash, formatted.message)]);
|
|
3895
4006
|
return;
|
|
3896
4007
|
}
|
|
3897
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3898
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access',
|
|
4008
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _172 => _172.type]) === "error") {
|
|
4009
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _173 => _173.data, 'optionalAccess', _174 => _174.message]), () => ( "Unknown error"));
|
|
3899
4010
|
setState({
|
|
3900
4011
|
type: "failed",
|
|
3901
4012
|
message: errorMessage,
|
|
@@ -3905,7 +4016,7 @@ function ProcessingStep({
|
|
|
3905
4016
|
txHash,
|
|
3906
4017
|
message: errorMessage
|
|
3907
4018
|
});
|
|
3908
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
4019
|
+
_optionalChain([onDepositFailedRef, 'access', _175 => _175.current, 'optionalCall', _176 => _176(txHash, errorMessage)]);
|
|
3909
4020
|
return;
|
|
3910
4021
|
}
|
|
3911
4022
|
setState((previous) => ({
|
|
@@ -3966,7 +4077,7 @@ function ProcessingStep({
|
|
|
3966
4077
|
txHash,
|
|
3967
4078
|
timeoutMs: ESCALATED_DELAY_MS
|
|
3968
4079
|
});
|
|
3969
|
-
_optionalChain([onErrorRef, 'access',
|
|
4080
|
+
_optionalChain([onErrorRef, 'access', _177 => _177.current, 'optionalCall', _178 => _178(message, "PROCESS_TIMEOUT")]);
|
|
3970
4081
|
}, ESCALATED_DELAY_MS);
|
|
3971
4082
|
return () => clearTimeout(timeoutId);
|
|
3972
4083
|
}, [debug, directTransfer, onErrorRef, state.type, txHash]);
|
|
@@ -3978,13 +4089,13 @@ function ProcessingStep({
|
|
|
3978
4089
|
const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
|
|
3979
4090
|
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
3980
4091
|
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
3981
|
-
const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess',
|
|
4092
|
+
const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _179 => _179.data, 'optionalAccess', _180 => _180.destination, 'optionalAccess', _181 => _181.transactionHash]) || null;
|
|
3982
4093
|
const sourceDetails = getEventSourceDetails(lastEvent);
|
|
3983
4094
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
3984
4095
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
3985
4096
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
3986
|
-
const sourceExplorerUrl =
|
|
3987
|
-
const destExplorerUrl = destinationTxHash ?
|
|
4097
|
+
const sourceExplorerUrl = _chunkP5T4XSN2cjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
4098
|
+
const destExplorerUrl = destinationTxHash ? _chunkP5T4XSN2cjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
3988
4099
|
const sourceDisplay = (() => {
|
|
3989
4100
|
const resolved = resolveTokenDisplay(displaySourceToken, displaySourceChain, {
|
|
3990
4101
|
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
@@ -4010,8 +4121,16 @@ function ProcessingStep({
|
|
|
4010
4121
|
const formattedDestinationAmount = eventDestination.amount !== void 0 ? formatRawTokenAmount(eventDestination.amount, targetDisplay) : void 0;
|
|
4011
4122
|
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
4012
4123
|
const prices = useTokenPrices(service, [
|
|
4013
|
-
|
|
4014
|
-
|
|
4124
|
+
{
|
|
4125
|
+
chainId: displaySourceChain,
|
|
4126
|
+
address: displaySourceToken,
|
|
4127
|
+
symbol: sourceDisplay.symbol
|
|
4128
|
+
},
|
|
4129
|
+
{
|
|
4130
|
+
chainId: _nullishCoalesce(eventDestination.chainId, () => ( targetChain)),
|
|
4131
|
+
address: _nullishCoalesce(eventDestination.token, () => ( targetToken)),
|
|
4132
|
+
symbol: targetDisplay.symbol
|
|
4133
|
+
}
|
|
4015
4134
|
]);
|
|
4016
4135
|
const estimatedReceiveAmount = (() => {
|
|
4017
4136
|
const estimate = estimateReceiveAmount({
|
|
@@ -4019,6 +4138,7 @@ function ProcessingStep({
|
|
|
4019
4138
|
sourceSymbol: sourceDisplay.symbol,
|
|
4020
4139
|
targetSymbol: targetDisplay.symbol,
|
|
4021
4140
|
sourceAmountUsd: amountUsdNumber,
|
|
4141
|
+
sourceTrusted: isRecognizedToken(displaySourceToken, displaySourceChain),
|
|
4022
4142
|
prices
|
|
4023
4143
|
});
|
|
4024
4144
|
return estimate !== void 0 ? formatTokenAmount(estimate, targetDisplay.symbol) : void 0;
|
|
@@ -4049,13 +4169,13 @@ function ProcessingStep({
|
|
|
4049
4169
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
4050
4170
|
void delayPhaseId;
|
|
4051
4171
|
void hasEscalatedDelay;
|
|
4052
|
-
const sourceChainIcon =
|
|
4053
|
-
const targetChainIcon =
|
|
4054
|
-
const sourceChainName =
|
|
4055
|
-
const targetChainName =
|
|
4172
|
+
const sourceChainIcon = _chunkP5T4XSN2cjs.getChainIcon.call(void 0, displaySourceChain);
|
|
4173
|
+
const targetChainIcon = _chunkP5T4XSN2cjs.getChainIcon.call(void 0, targetChain);
|
|
4174
|
+
const sourceChainName = _chunkP5T4XSN2cjs.getChainName.call(void 0, displaySourceChain);
|
|
4175
|
+
const targetChainName = _chunkP5T4XSN2cjs.getChainName.call(void 0, targetChain);
|
|
4056
4176
|
const timerText = formatTimer(elapsedSeconds);
|
|
4057
|
-
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
4058
|
-
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
4177
|
+
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _182 => _182.feeSponsored]), () => ( false));
|
|
4178
|
+
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _183 => _183.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
4059
4179
|
const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
|
|
4060
4180
|
const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
|
|
4061
4181
|
const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
@@ -4066,20 +4186,20 @@ function ProcessingStep({
|
|
|
4066
4186
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-body-header-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-body-header-title", children: stateTitle }) })
|
|
4067
4187
|
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
|
|
4068
4188
|
if (isComplete && isSwappedOrder) {
|
|
4069
|
-
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess',
|
|
4189
|
+
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _184 => _184.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _185 => _185.paymentMethod]))), () => ( null));
|
|
4070
4190
|
const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
|
|
4071
|
-
const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess',
|
|
4191
|
+
const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _186 => _186.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
|
|
4072
4192
|
_nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
|
|
4073
4193
|
effectivePaymentMethod
|
|
4074
4194
|
) : null;
|
|
4075
|
-
const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess',
|
|
4076
|
-
const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4195
|
+
const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _187 => _187.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
|
|
4196
|
+
const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _188 => _188.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
|
|
4077
4197
|
const depositedAmount = receiveDisplay;
|
|
4078
|
-
const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4198
|
+
const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _189 => _189.onrampFeeUsd]), () => ( null));
|
|
4079
4199
|
const quoteFees = getMarketNetworkFees(quoteFeeBreakdown);
|
|
4080
4200
|
const fallbackNetworkFeeUsd = quoteFees === null && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount)) ? Number(quotedFeeAmount) : null;
|
|
4081
|
-
const marketFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess',
|
|
4082
|
-
const networkFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess',
|
|
4201
|
+
const marketFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _190 => _190.marketUsd]), () => ( null));
|
|
4202
|
+
const networkFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _191 => _191.networkUsd]), () => ( fallbackNetworkFeeUsd));
|
|
4083
4203
|
const sponsoredFeeTooltip = "This fee is sponsored for this deposit.";
|
|
4084
4204
|
const feesTooltip = feeSponsored ? "On-ramp fees are charged by the payment provider. Market and network fees are sponsored for this deposit." : "Fees include on-ramp, market, and network costs for this deposit.";
|
|
4085
4205
|
const feeRows = [];
|
|
@@ -4169,7 +4289,7 @@ function ProcessingStep({
|
|
|
4169
4289
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
|
|
4170
4290
|
] }),
|
|
4171
4291
|
isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
4172
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4292
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _192 => _192.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4173
4293
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
|
|
4174
4294
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4175
4295
|
"$",
|
|
@@ -4181,7 +4301,7 @@ function ProcessingStep({
|
|
|
4181
4301
|
] })
|
|
4182
4302
|
] })
|
|
4183
4303
|
] }),
|
|
4184
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4304
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _193 => _193.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4185
4305
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
|
|
4186
4306
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4187
4307
|
"$",
|
|
@@ -4416,4 +4536,7 @@ function accountFromPrivateKey(privateKey) {
|
|
|
4416
4536
|
|
|
4417
4537
|
|
|
4418
4538
|
|
|
4419
|
-
|
|
4539
|
+
|
|
4540
|
+
|
|
4541
|
+
|
|
4542
|
+
exports.Modal = Modal; exports.WalletIcon = WalletIcon; exports.ExternalLinkIcon = ExternalLinkIcon; exports.CheckIcon = CheckIcon; exports.TransferCryptoIcon = TransferCryptoIcon; exports.ChevronLeftIcon = ChevronLeftIcon; exports.ChevronDownIcon = ChevronDownIcon; exports.CloseIcon = CloseIcon; exports.HandCoinsIcon = HandCoinsIcon; exports.HistoryIcon = HistoryIcon; exports.InfoIcon = InfoIcon; exports.CopyIcon = CopyIcon; exports.ArrowUpRightIcon = ArrowUpRightIcon; exports.AlertTriangleIcon = AlertTriangleIcon; exports.PercentIcon = PercentIcon; exports.ClockIcon = ClockIcon; exports.PlusCircleIcon = PlusCircleIcon; exports.CircleArrowOutUpLeftIcon = CircleArrowOutUpLeftIcon; exports.BankIcon = BankIcon; exports.UnplugIcon = UnplugIcon; exports.Callout = Callout; exports.BodyHeader = BodyHeader; exports.PoweredBy = PoweredBy; exports.Spinner = Spinner; exports.getExchangeLogo = getExchangeLogo; exports.ConnectStep = ConnectStep; exports.useLatestRef = useLatestRef; exports.Button = Button; exports.TokenIcon = TokenIcon; exports.debugLog = debugLog; exports.debugError = debugError; exports.getAssetId = getAssetId; exports.portfolioToAssets = portfolioToAssets; exports.isNativeAsset = isNativeAsset; exports.buildSessionDetails = buildSessionDetails; exports.createDepositService = createDepositService; exports.currencyFormatter = currencyFormatter; exports.tokenFormatter = tokenFormatter; exports.isUnsupportedChainSwitchError = isUnsupportedChainSwitchError; exports.formatUserError = formatUserError; exports.Tooltip = Tooltip; exports.formatTokenAmount = formatTokenAmount; exports.isDisplayStablecoinSymbol = isDisplayStablecoinSymbol; exports.isRecognizedToken = isRecognizedToken; exports.formatQuotedReceive = formatQuotedReceive; exports.formatReceiveEstimate = formatReceiveEstimate; exports.getEventTxHash = getEventTxHash; exports.getEventSourceDetails = getEventSourceDetails; exports.isDepositEvent = isDepositEvent; exports.isFailedEvent = isFailedEvent; exports.txRefsMatch = txRefsMatch; exports.failureMessageForEvent = failureMessageForEvent; exports.fetchTokenPriceUsd = fetchTokenPriceUsd; exports.useTokenPrices = useTokenPrices; exports.ProcessingStep = ProcessingStep; exports.rpcUrlFor = rpcUrlFor; exports.RpcUrlsProvider = RpcUrlsProvider; exports.useRpcUrls = useRpcUrls; exports.useStableRpcUrls = useStableRpcUrls; exports.getPublicClient = getPublicClient; exports.getHyperEvmReadClient = getHyperEvmReadClient; exports.loadSessionOwnerFromStorage = loadSessionOwnerFromStorage; exports.saveSessionOwnerToStorage = saveSessionOwnerToStorage; exports.createSessionOwnerKey = createSessionOwnerKey; exports.accountFromPrivateKey = accountFromPrivateKey; exports.applyTheme = applyTheme;
|