@rhinestone/deposit-modal 0.7.0 → 0.8.1
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-T4RRW5FM.mjs → DepositModalReown-4BSHOQ5Y.mjs} +6 -6
- package/dist/{DepositModalReown-CHVDFNEX.cjs → DepositModalReown-UND3DEJH.cjs} +9 -9
- package/dist/{WithdrawModalReown-Q6MUMZTX.mjs → WithdrawModalReown-FVXSSGY5.mjs} +5 -5
- package/dist/{WithdrawModalReown-YZMZTN6E.cjs → WithdrawModalReown-TVZWJKQI.cjs} +8 -8
- package/dist/caip-C_ZYFIGa.d.cts +77 -0
- package/dist/caip-C_ZYFIGa.d.ts +77 -0
- package/dist/{chunk-J52W34Y7.mjs → chunk-2JPB3PLB.mjs} +2 -2
- package/dist/{chunk-XOBLFIGV.cjs → chunk-4NN7UTWQ.cjs} +4 -4
- package/dist/{chunk-UZENNYHS.mjs → chunk-7KHEIMWD.mjs} +102 -59
- package/dist/{chunk-UN6MEOOA.cjs → chunk-7OKA6GNA.cjs} +293 -137
- package/dist/{chunk-QSMPJQTX.cjs → chunk-D3Y7ZBED.cjs} +403 -360
- package/dist/{chunk-4JLYWRQA.mjs → chunk-DABKCJVL.mjs} +1 -1
- package/dist/{chunk-KUURQOTT.cjs → chunk-HQWZCOMS.cjs} +109 -106
- package/dist/{chunk-OYPFPEIT.mjs → chunk-NASHLEVQ.mjs} +304 -148
- package/dist/{chunk-CPMHRMPH.mjs → chunk-O5OKA27M.mjs} +55 -23
- package/dist/{chunk-6P3WNDED.cjs → chunk-Q3W53BKR.cjs} +7 -7
- package/dist/{chunk-CLUR2J72.mjs → chunk-T43VUEJH.mjs} +21 -18
- package/dist/{chunk-HH46H6ZI.cjs → chunk-U7SVYWVD.cjs} +56 -24
- package/dist/{chunk-K6J3RDDK.mjs → chunk-WK5AFRSP.mjs} +1 -1
- package/dist/{chunk-RLMXWLF4.cjs → chunk-XRWQMIBY.cjs} +3 -3
- package/dist/constants.cjs +4 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +5 -3
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +11 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +12 -8
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/styles.css +29 -0
- package/dist/{types-6ROxwyfG.d.cts → types--LQWg_4W.d.cts} +1 -1
- package/dist/{types-6ROxwyfG.d.ts → types--LQWg_4W.d.ts} +1 -1
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
- package/dist/caip-CsslyHGL.d.cts +0 -62
- package/dist/caip-CsslyHGL.d.ts +0 -62
|
@@ -13,7 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
|
|
17
23
|
|
|
18
24
|
// src/components/ui/Modal.tsx
|
|
19
25
|
|
|
@@ -949,7 +955,7 @@ function createDepositService(baseUrl, options) {
|
|
|
949
955
|
},
|
|
950
956
|
async checkLiquidity(params) {
|
|
951
957
|
if (params.destinationChainId === "solana") {
|
|
952
|
-
const token =
|
|
958
|
+
const token = _chunkU7SVYWVDcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
953
959
|
return {
|
|
954
960
|
hasLiquidity: true,
|
|
955
961
|
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _25 => _25.symbol]), () => ( "Token")),
|
|
@@ -1005,7 +1011,8 @@ function createDepositService(baseUrl, options) {
|
|
|
1005
1011
|
const url = apiUrl("/quotes/preview");
|
|
1006
1012
|
const body = {
|
|
1007
1013
|
account: params.account,
|
|
1008
|
-
|
|
1014
|
+
// HyperCore has its own CAIP-2 namespace — never the eip155 placeholder.
|
|
1015
|
+
sourceChainId: params.sourceChainId === "hypercore" ? _chunkU7SVYWVDcjs.HYPERCORE_MAINNET_CAIP2 : `eip155:${params.sourceChainId}`,
|
|
1009
1016
|
sourceToken: params.sourceToken,
|
|
1010
1017
|
amount: params.amount
|
|
1011
1018
|
};
|
|
@@ -1069,6 +1076,31 @@ function createDepositService(baseUrl, options) {
|
|
|
1069
1076
|
return {};
|
|
1070
1077
|
}
|
|
1071
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
|
+
},
|
|
1072
1104
|
async getSwappedWidgetUrl(params) {
|
|
1073
1105
|
const url = apiUrl("/onramp/swapped/widget-url");
|
|
1074
1106
|
debugLog(debug, scope, "getSwappedWidgetUrl:request", {
|
|
@@ -1303,14 +1335,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1303
1335
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _32 => _32.balance, 'optionalAccess', _33 => _33.unlocked]), () => ( "0"));
|
|
1304
1336
|
const normalizedName = tokenData.tokenName.trim();
|
|
1305
1337
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
1306
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
1307
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
1338
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkU7SVYWVDcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
1339
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkU7SVYWVDcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
1308
1340
|
if (!resolvedTokenAddress) {
|
|
1309
1341
|
continue;
|
|
1310
1342
|
}
|
|
1311
|
-
const registrySymbol =
|
|
1343
|
+
const registrySymbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
1312
1344
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
1313
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1345
|
+
const decimals = registrySymbol !== "Token" ? _chunkU7SVYWVDcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
1314
1346
|
tokens.push({
|
|
1315
1347
|
chainId: chainBalance.chainId,
|
|
1316
1348
|
address: resolvedTokenAddress,
|
|
@@ -1330,8 +1362,13 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1330
1362
|
function normalizeDirectToken(token) {
|
|
1331
1363
|
const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
|
|
1332
1364
|
const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
|
|
1333
|
-
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ?
|
|
1365
|
+
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkU7SVYWVDcjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : (
|
|
1366
|
+
// HyperCore (`hypercore:mainnet`) is a non-EVM source; keep its USDC
|
|
1367
|
+
// instead of dropping it as an unparseable chain string.
|
|
1368
|
+
_chunkU7SVYWVDcjs.isHyperCoreCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "hypercore" ? "hypercore" : _chunkU7SVYWVDcjs.parseEvmChainId.call(void 0, rawChainString)
|
|
1369
|
+
) : null)));
|
|
1334
1370
|
if (chainId === null) return null;
|
|
1371
|
+
const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ? _chunkU7SVYWVDcjs.HYPERCORE_CHAIN_ID : void 0;
|
|
1335
1372
|
const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
|
|
1336
1373
|
if (!symbol) return null;
|
|
1337
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()])));
|
|
@@ -1339,14 +1376,14 @@ function normalizeDirectToken(token) {
|
|
|
1339
1376
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
1340
1377
|
token.token,
|
|
1341
1378
|
"address"
|
|
1342
|
-
))), () => ( (
|
|
1379
|
+
))), () => ( (registryChainId !== void 0 ? _chunkU7SVYWVDcjs.getTokenAddress.call(void 0, symbol, registryChainId) : void 0)));
|
|
1343
1380
|
if (!address) return null;
|
|
1344
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));
|
|
1345
1382
|
const isSolanaToken = chainId === "solana";
|
|
1346
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1383
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, address, registryChainId);
|
|
1347
1384
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
1348
1385
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
1349
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1386
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkU7SVYWVDcjs.getTokenDecimalsByAddress.call(void 0, address, registryChainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
1350
1387
|
return {
|
|
1351
1388
|
chainId,
|
|
1352
1389
|
address,
|
|
@@ -1487,7 +1524,7 @@ function getPublicClient(chainId, rpcUrls) {
|
|
|
1487
1524
|
const cacheKey = `${chainId}|${_nullishCoalesce(url, () => ( ""))}`;
|
|
1488
1525
|
let client = clientCache.get(cacheKey);
|
|
1489
1526
|
if (!client) {
|
|
1490
|
-
const chain =
|
|
1527
|
+
const chain = _chunkU7SVYWVDcjs.CHAIN_BY_ID[chainId];
|
|
1491
1528
|
client = _viem.createPublicClient.call(void 0, {
|
|
1492
1529
|
chain,
|
|
1493
1530
|
transport: _viem.http.call(void 0, url)
|
|
@@ -2458,7 +2495,7 @@ var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fr
|
|
|
2458
2495
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
|
|
2459
2496
|
"+6"
|
|
2460
2497
|
] });
|
|
2461
|
-
var EXTRA_CHAIN_COUNT = Math.max(0,
|
|
2498
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunkU7SVYWVDcjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
2462
2499
|
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2463
2500
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
2464
2501
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
@@ -2747,6 +2784,112 @@ function ConnectStep({
|
|
|
2747
2784
|
}
|
|
2748
2785
|
ConnectStep.displayName = "ConnectStep";
|
|
2749
2786
|
|
|
2787
|
+
// src/components/ui/TokenIcon.tsx
|
|
2788
|
+
|
|
2789
|
+
|
|
2790
|
+
function preconnectIconCdn() {
|
|
2791
|
+
if (typeof document === "undefined") return;
|
|
2792
|
+
if (document.getElementById("rs-icon-cdn-preconnect")) return;
|
|
2793
|
+
const link = document.createElement("link");
|
|
2794
|
+
link.id = "rs-icon-cdn-preconnect";
|
|
2795
|
+
link.rel = "preconnect";
|
|
2796
|
+
link.href = "https://s3.rhinestone.dev";
|
|
2797
|
+
link.crossOrigin = "anonymous";
|
|
2798
|
+
document.head.appendChild(link);
|
|
2799
|
+
}
|
|
2800
|
+
preconnectIconCdn();
|
|
2801
|
+
function TokenIcon({ symbol, className, fallback }) {
|
|
2802
|
+
const [loadedSymbol, setLoadedSymbol] = _react.useState.call(void 0, null);
|
|
2803
|
+
const [erroredSymbol, setErroredSymbol] = _react.useState.call(void 0, null);
|
|
2804
|
+
if (erroredSymbol === symbol) {
|
|
2805
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: fallback });
|
|
2806
|
+
}
|
|
2807
|
+
const loading = loadedSymbol !== symbol;
|
|
2808
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2809
|
+
"img",
|
|
2810
|
+
{
|
|
2811
|
+
src: _chunkU7SVYWVDcjs.tokenIconUrl.call(void 0, symbol),
|
|
2812
|
+
alt: "",
|
|
2813
|
+
className: `rs-token-icon ${_nullishCoalesce(className, () => ( ""))}`.trimEnd(),
|
|
2814
|
+
decoding: "async",
|
|
2815
|
+
"data-loading": loading ? "" : void 0,
|
|
2816
|
+
onLoad: () => setLoadedSymbol(symbol),
|
|
2817
|
+
onError: () => setErroredSymbol(symbol)
|
|
2818
|
+
},
|
|
2819
|
+
symbol
|
|
2820
|
+
);
|
|
2821
|
+
}
|
|
2822
|
+
TokenIcon.displayName = "TokenIcon";
|
|
2823
|
+
|
|
2824
|
+
// src/core/useTokenPrices.ts
|
|
2825
|
+
|
|
2826
|
+
function isErc20(token) {
|
|
2827
|
+
return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !== _chunkU7SVYWVDcjs.NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
2828
|
+
}
|
|
2829
|
+
function caip2For(token) {
|
|
2830
|
+
return `${_chunkU7SVYWVDcjs.toEvmCaip2.call(void 0, token.chainId)}:${token.address.toLowerCase()}`;
|
|
2831
|
+
}
|
|
2832
|
+
async function fetchTokenPriceUsd(service, token) {
|
|
2833
|
+
if (isErc20(token)) {
|
|
2834
|
+
const caip2 = caip2For(token);
|
|
2835
|
+
const prices2 = await service.fetchPricesByAddress([caip2]);
|
|
2836
|
+
const price2 = prices2[caip2];
|
|
2837
|
+
return typeof price2 === "number" && price2 > 0 ? price2 : null;
|
|
2838
|
+
}
|
|
2839
|
+
const symbol = token.symbol.toUpperCase();
|
|
2840
|
+
const prices = await service.fetchPrices([symbol]);
|
|
2841
|
+
const price = prices[symbol];
|
|
2842
|
+
return typeof price === "number" && price > 0 ? price : null;
|
|
2843
|
+
}
|
|
2844
|
+
function useTokenPrices(service, tokens) {
|
|
2845
|
+
const [prices, setPrices] = _react.useState.call(void 0, {});
|
|
2846
|
+
const defined = tokens.filter((t) => Boolean(_optionalChain([t, 'optionalAccess', _75 => _75.symbol])));
|
|
2847
|
+
const entries = [
|
|
2848
|
+
...new Map(
|
|
2849
|
+
defined.map((token) => {
|
|
2850
|
+
const erc20 = isErc20(token);
|
|
2851
|
+
const caip2 = erc20 ? caip2For(token) : null;
|
|
2852
|
+
const symbol = token.symbol.toUpperCase();
|
|
2853
|
+
return [_nullishCoalesce(caip2, () => ( `sym:${symbol}`)), { symbol, caip2 }];
|
|
2854
|
+
})
|
|
2855
|
+
).values()
|
|
2856
|
+
].sort(
|
|
2857
|
+
(a, b) => (_nullishCoalesce(a.caip2, () => ( a.symbol))).localeCompare(_nullishCoalesce(b.caip2, () => ( b.symbol)))
|
|
2858
|
+
);
|
|
2859
|
+
const key = JSON.stringify(entries);
|
|
2860
|
+
_react.useEffect.call(void 0, () => {
|
|
2861
|
+
if (key === "[]") return;
|
|
2862
|
+
let cancelled = false;
|
|
2863
|
+
const parsed = JSON.parse(key);
|
|
2864
|
+
const symbols = [
|
|
2865
|
+
...new Set(parsed.filter((e) => !e.caip2).map((e) => e.symbol))
|
|
2866
|
+
];
|
|
2867
|
+
const caip2Ids = [
|
|
2868
|
+
...new Set(
|
|
2869
|
+
parsed.filter((e) => e.caip2).map((e) => e.caip2)
|
|
2870
|
+
)
|
|
2871
|
+
];
|
|
2872
|
+
Promise.all([
|
|
2873
|
+
symbols.length > 0 ? service.fetchPrices(symbols) : Promise.resolve({}),
|
|
2874
|
+
caip2Ids.length > 0 ? service.fetchPricesByAddress(caip2Ids) : Promise.resolve({})
|
|
2875
|
+
]).then(([bySymbol, byAddress]) => {
|
|
2876
|
+
if (cancelled) return;
|
|
2877
|
+
const merged = { ...bySymbol };
|
|
2878
|
+
for (const entry of parsed) {
|
|
2879
|
+
if (!entry.caip2) continue;
|
|
2880
|
+
const price = byAddress[entry.caip2];
|
|
2881
|
+
if (typeof price === "number") merged[entry.symbol] = price;
|
|
2882
|
+
}
|
|
2883
|
+
setPrices(merged);
|
|
2884
|
+
}).catch(() => {
|
|
2885
|
+
});
|
|
2886
|
+
return () => {
|
|
2887
|
+
cancelled = true;
|
|
2888
|
+
};
|
|
2889
|
+
}, [service, key]);
|
|
2890
|
+
return prices;
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2750
2893
|
// src/components/steps/ProcessingStep.tsx
|
|
2751
2894
|
|
|
2752
2895
|
|
|
@@ -2819,8 +2962,8 @@ function Tooltip({ content, children, className }) {
|
|
|
2819
2962
|
function handleOutside(event) {
|
|
2820
2963
|
const target = event.target;
|
|
2821
2964
|
if (!target) return;
|
|
2822
|
-
if (_optionalChain([triggerRef, 'access',
|
|
2823
|
-
if (_optionalChain([bubbleRef, 'access',
|
|
2965
|
+
if (_optionalChain([triggerRef, 'access', _76 => _76.current, 'optionalAccess', _77 => _77.contains, 'call', _78 => _78(target)])) return;
|
|
2966
|
+
if (_optionalChain([bubbleRef, 'access', _79 => _79.current, 'optionalAccess', _80 => _80.contains, 'call', _81 => _81(target)])) return;
|
|
2824
2967
|
setOpen(false);
|
|
2825
2968
|
}
|
|
2826
2969
|
function handleKey(event) {
|
|
@@ -2953,7 +3096,7 @@ function SwappedReceipt({
|
|
|
2953
3096
|
onrampMethodIcon,
|
|
2954
3097
|
amountPaid,
|
|
2955
3098
|
depositedAmount,
|
|
2956
|
-
|
|
3099
|
+
depositedSymbol,
|
|
2957
3100
|
feesTotal,
|
|
2958
3101
|
feeRows,
|
|
2959
3102
|
feesTooltip,
|
|
@@ -2980,7 +3123,7 @@ function SwappedReceipt({
|
|
|
2980
3123
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Deposited amount" }),
|
|
2981
3124
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
2982
3125
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: depositedAmount }),
|
|
2983
|
-
|
|
3126
|
+
depositedSymbol && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenIcon, { symbol: depositedSymbol }) })
|
|
2984
3127
|
] })
|
|
2985
3128
|
] }),
|
|
2986
3129
|
feesTotal != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3015,7 +3158,7 @@ function asNumber(value) {
|
|
|
3015
3158
|
const trimmed = value.trim();
|
|
3016
3159
|
if (!trimmed) return void 0;
|
|
3017
3160
|
const caipMatch = trimmed.match(/^eip155:(\d+)$/);
|
|
3018
|
-
if (_optionalChain([caipMatch, 'optionalAccess',
|
|
3161
|
+
if (_optionalChain([caipMatch, 'optionalAccess', _82 => _82[1]])) {
|
|
3019
3162
|
const parsed2 = Number(caipMatch[1]);
|
|
3020
3163
|
return Number.isFinite(parsed2) ? parsed2 : void 0;
|
|
3021
3164
|
}
|
|
@@ -3034,24 +3177,24 @@ function asAddress(value) {
|
|
|
3034
3177
|
return /^0x[a-fA-F0-9]{40}$/.test(value) ? value : void 0;
|
|
3035
3178
|
}
|
|
3036
3179
|
function getEventTxHash(event) {
|
|
3037
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3180
|
+
if (!_optionalChain([event, 'optionalAccess', _83 => _83.type])) return void 0;
|
|
3038
3181
|
if (event.type === "deposit-received") {
|
|
3039
|
-
return asString(_optionalChain([event, 'access',
|
|
3182
|
+
return asString(_optionalChain([event, 'access', _84 => _84.data, 'optionalAccess', _85 => _85.transactionHash]));
|
|
3040
3183
|
}
|
|
3041
3184
|
if (event.type === "bridge-started" || event.type === "bridge-complete") {
|
|
3042
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
3043
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
3044
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
3185
|
+
const deposit = isRecord(_optionalChain([event, 'access', _86 => _86.data, 'optionalAccess', _87 => _87.deposit])) ? event.data.deposit : void 0;
|
|
3186
|
+
const source = isRecord(_optionalChain([event, 'access', _88 => _88.data, 'optionalAccess', _89 => _89.source])) ? event.data.source : void 0;
|
|
3187
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _90 => _90.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _91 => _91.transactionHash]))));
|
|
3045
3188
|
}
|
|
3046
3189
|
if (event.type === "bridge-failed" || event.type === "error") {
|
|
3047
|
-
const deposit = isRecord(_optionalChain([event, 'access',
|
|
3048
|
-
const source = isRecord(_optionalChain([event, 'access',
|
|
3049
|
-
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess',
|
|
3190
|
+
const deposit = isRecord(_optionalChain([event, 'access', _92 => _92.data, 'optionalAccess', _93 => _93.deposit])) ? event.data.deposit : void 0;
|
|
3191
|
+
const source = isRecord(_optionalChain([event, 'access', _94 => _94.data, 'optionalAccess', _95 => _95.source])) ? event.data.source : void 0;
|
|
3192
|
+
return _nullishCoalesce(asString(_optionalChain([deposit, 'optionalAccess', _96 => _96.transactionHash])), () => ( asString(_optionalChain([source, 'optionalAccess', _97 => _97.transactionHash]))));
|
|
3050
3193
|
}
|
|
3051
3194
|
return void 0;
|
|
3052
3195
|
}
|
|
3053
3196
|
function getEventSourceDetails(event) {
|
|
3054
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3197
|
+
if (!_optionalChain([event, 'optionalAccess', _98 => _98.type]) || !isRecord(event.data)) return {};
|
|
3055
3198
|
if (event.type === "deposit-received") {
|
|
3056
3199
|
return {
|
|
3057
3200
|
chainId: asNumber(event.data.chain),
|
|
@@ -3063,21 +3206,23 @@ function getEventSourceDetails(event) {
|
|
|
3063
3206
|
const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
|
|
3064
3207
|
if (event.type === "bridge-started" || event.type === "bridge-complete" || event.type === "bridge-failed" || event.type === "error") {
|
|
3065
3208
|
return {
|
|
3066
|
-
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess',
|
|
3067
|
-
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess',
|
|
3068
|
-
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess',
|
|
3209
|
+
chainId: _nullishCoalesce(asNumber(_optionalChain([source, 'optionalAccess', _99 => _99.chain])), () => ( asNumber(_optionalChain([deposit, 'optionalAccess', _100 => _100.chain])))),
|
|
3210
|
+
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _101 => _101.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _102 => _102.amount])))),
|
|
3211
|
+
token: _nullishCoalesce(_nullishCoalesce(asAddress(_optionalChain([source, 'optionalAccess', _103 => _103.asset])), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _104 => _104.asset])))), () => ( asAddress(_optionalChain([deposit, 'optionalAccess', _105 => _105.token]))))
|
|
3069
3212
|
};
|
|
3070
3213
|
}
|
|
3071
3214
|
return {};
|
|
3072
3215
|
}
|
|
3073
3216
|
function asChain(value) {
|
|
3074
|
-
if (typeof value === "string"
|
|
3075
|
-
|
|
3217
|
+
if (typeof value === "string") {
|
|
3218
|
+
const trimmed = value.trim();
|
|
3219
|
+
if (trimmed.startsWith("solana")) return "solana";
|
|
3220
|
+
if (trimmed.startsWith("hypercore")) return "hypercore";
|
|
3076
3221
|
}
|
|
3077
3222
|
return asNumber(value);
|
|
3078
3223
|
}
|
|
3079
3224
|
function getEventDestinationDetails(event) {
|
|
3080
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3225
|
+
if (!_optionalChain([event, 'optionalAccess', _106 => _106.type]) || !isRecord(event.data)) return {};
|
|
3081
3226
|
if (event.type !== "bridge-started" && event.type !== "bridge-complete") {
|
|
3082
3227
|
return {};
|
|
3083
3228
|
}
|
|
@@ -3087,14 +3232,14 @@ function getEventDestinationDetails(event) {
|
|
|
3087
3232
|
return {
|
|
3088
3233
|
chainId: asChain(destination.chain),
|
|
3089
3234
|
amount: asAmount(destination.amount),
|
|
3090
|
-
token: _optionalChain([token, 'optionalAccess',
|
|
3235
|
+
token: _optionalChain([token, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0
|
|
3091
3236
|
};
|
|
3092
3237
|
}
|
|
3093
3238
|
function isDepositEvent(event) {
|
|
3094
|
-
return _optionalChain([event, 'optionalAccess',
|
|
3239
|
+
return _optionalChain([event, 'optionalAccess', _109 => _109.type]) === "deposit-received" || _optionalChain([event, 'optionalAccess', _110 => _110.type]) === "bridge-started" || _optionalChain([event, 'optionalAccess', _111 => _111.type]) === "bridge-complete" || _optionalChain([event, 'optionalAccess', _112 => _112.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _113 => _113.type]) === "error";
|
|
3095
3240
|
}
|
|
3096
3241
|
function isFailedEvent(event) {
|
|
3097
|
-
return _optionalChain([event, 'optionalAccess',
|
|
3242
|
+
return _optionalChain([event, 'optionalAccess', _114 => _114.type]) === "bridge-failed" || _optionalChain([event, 'optionalAccess', _115 => _115.type]) === "error";
|
|
3098
3243
|
}
|
|
3099
3244
|
function isHexString(value) {
|
|
3100
3245
|
return value.startsWith("0x") || value.startsWith("0X");
|
|
@@ -3106,7 +3251,7 @@ function txRefsMatch(a, b) {
|
|
|
3106
3251
|
return a === b;
|
|
3107
3252
|
}
|
|
3108
3253
|
function formatBridgeFailedMessage(event) {
|
|
3109
|
-
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
3254
|
+
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _116 => _116.data]), () => ( {}));
|
|
3110
3255
|
const code = typeof eventData.errorCode === "string" ? eventData.errorCode : void 0;
|
|
3111
3256
|
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
3112
3257
|
function toUserFacingFailure(raw) {
|
|
@@ -3134,7 +3279,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
3134
3279
|
return { message: "Bridge failed" };
|
|
3135
3280
|
}
|
|
3136
3281
|
function failureMessageForEvent(event) {
|
|
3137
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3282
|
+
if (_optionalChain([event, 'optionalAccess', _117 => _117.type]) === "error") {
|
|
3138
3283
|
const message = isRecord(event.data) ? asString(event.data.message) : void 0;
|
|
3139
3284
|
return _nullishCoalesce(message, () => ( "Unknown error"));
|
|
3140
3285
|
}
|
|
@@ -3162,24 +3307,29 @@ var EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
|
|
|
3162
3307
|
function resolveTokenDisplay(token, chain, fallback) {
|
|
3163
3308
|
if (token !== void 0) {
|
|
3164
3309
|
if (chain === "solana") {
|
|
3165
|
-
const solanaToken =
|
|
3310
|
+
const solanaToken = _chunkU7SVYWVDcjs.getSolanaTokenByMint.call(void 0, token);
|
|
3166
3311
|
if (solanaToken) {
|
|
3167
3312
|
return { symbol: solanaToken.symbol, decimals: solanaToken.decimals };
|
|
3168
3313
|
}
|
|
3314
|
+
} else if (chain === "hypercore") {
|
|
3315
|
+
const t = _chunkU7SVYWVDcjs.HYPERCORE_SOURCE_TOKENS.find(
|
|
3316
|
+
(x) => x.address.toLowerCase() === token.toLowerCase()
|
|
3317
|
+
);
|
|
3318
|
+
if (t) return { symbol: t.symbol, decimals: t.decimals };
|
|
3169
3319
|
} else if (EVM_ADDRESS_RE.test(token)) {
|
|
3170
|
-
const symbol =
|
|
3171
|
-
const decimals =
|
|
3320
|
+
const symbol = _chunkU7SVYWVDcjs.getTokenSymbol.call(void 0, token, chain);
|
|
3321
|
+
const decimals = _chunkU7SVYWVDcjs.findTokenDecimals.call(void 0, token, chain);
|
|
3172
3322
|
if (symbol !== "Token" || decimals !== void 0) {
|
|
3173
3323
|
return {
|
|
3174
|
-
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
3175
|
-
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess',
|
|
3324
|
+
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _118 => _118.symbol]), () => ( symbol)),
|
|
3325
|
+
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _119 => _119.decimals])))
|
|
3176
3326
|
};
|
|
3177
3327
|
}
|
|
3178
3328
|
}
|
|
3179
3329
|
}
|
|
3180
3330
|
return {
|
|
3181
|
-
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
3182
|
-
decimals: _optionalChain([fallback, 'optionalAccess',
|
|
3331
|
+
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _120 => _120.symbol]), () => ( "Token")),
|
|
3332
|
+
decimals: _optionalChain([fallback, 'optionalAccess', _121 => _121.decimals])
|
|
3183
3333
|
};
|
|
3184
3334
|
}
|
|
3185
3335
|
function maxFractionDigitsFor(symbol) {
|
|
@@ -3207,18 +3357,38 @@ function formatRawTokenAmount(rawAmount, token) {
|
|
|
3207
3357
|
if (value === void 0) return void 0;
|
|
3208
3358
|
return formatTokenAmount(value, token.symbol);
|
|
3209
3359
|
}
|
|
3360
|
+
function isDisplayStablecoinSymbol(symbol) {
|
|
3361
|
+
return symbol !== void 0 && STABLECOIN_SYMBOLS.has(symbol.toUpperCase());
|
|
3362
|
+
}
|
|
3210
3363
|
function priceUsdFor(symbol, prices) {
|
|
3211
3364
|
if (!symbol) return void 0;
|
|
3212
|
-
const
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3365
|
+
const quoted = prices[symbol.toUpperCase()];
|
|
3366
|
+
return typeof quoted === "number" && quoted > 0 ? quoted : void 0;
|
|
3367
|
+
}
|
|
3368
|
+
function isRecognizedToken(address, chain) {
|
|
3369
|
+
if (address === void 0 || chain === void 0) return false;
|
|
3370
|
+
if (chain === "solana") return _chunkU7SVYWVDcjs.getSolanaTokenByMint.call(void 0, address) !== void 0;
|
|
3371
|
+
if (chain === "hypercore") {
|
|
3372
|
+
return _chunkU7SVYWVDcjs.HYPERCORE_SOURCE_TOKENS.some(
|
|
3373
|
+
(t) => t.address.toLowerCase() === address.toLowerCase()
|
|
3374
|
+
);
|
|
3375
|
+
}
|
|
3376
|
+
return EVM_ADDRESS_RE.test(address) && _chunkU7SVYWVDcjs.isRegistryTokenOnChain.call(void 0, address, chain);
|
|
3216
3377
|
}
|
|
3217
3378
|
function estimateReceiveAmount(params) {
|
|
3218
|
-
const {
|
|
3219
|
-
|
|
3379
|
+
const {
|
|
3380
|
+
sourceAmount,
|
|
3381
|
+
sourceSymbol,
|
|
3382
|
+
targetSymbol,
|
|
3383
|
+
sourceAmountUsd,
|
|
3384
|
+
prices,
|
|
3385
|
+
sourceTrusted
|
|
3386
|
+
} = params;
|
|
3387
|
+
const trusted = sourceTrusted !== false;
|
|
3388
|
+
if (trusted && sourceSymbol !== void 0 && sourceSymbol.toUpperCase() === targetSymbol.toUpperCase()) {
|
|
3220
3389
|
return sourceAmount;
|
|
3221
3390
|
}
|
|
3391
|
+
if (!trusted) return void 0;
|
|
3222
3392
|
const usdValue = sourceAmountUsd !== void 0 && Number.isFinite(sourceAmountUsd) ? sourceAmountUsd : sourceAmount !== void 0 ? (() => {
|
|
3223
3393
|
const sourcePrice = priceUsdFor(sourceSymbol, prices);
|
|
3224
3394
|
return sourcePrice !== void 0 ? sourceAmount * sourcePrice : void 0;
|
|
@@ -3254,31 +3424,6 @@ function formatReceiveEstimate(params) {
|
|
|
3254
3424
|
return sameSymbol ? `${formatted} ${params.targetSymbol}` : `~${formatted} ${params.targetSymbol}`;
|
|
3255
3425
|
}
|
|
3256
3426
|
|
|
3257
|
-
// src/core/useTokenPrices.ts
|
|
3258
|
-
|
|
3259
|
-
function useTokenPrices(service, symbols) {
|
|
3260
|
-
const [prices, setPrices] = _react.useState.call(void 0, {});
|
|
3261
|
-
const symbolsKey = [
|
|
3262
|
-
...new Set(
|
|
3263
|
-
symbols.filter((symbol) => Boolean(symbol)).map((symbol) => symbol.toUpperCase())
|
|
3264
|
-
)
|
|
3265
|
-
].sort().join(",");
|
|
3266
|
-
_react.useEffect.call(void 0, () => {
|
|
3267
|
-
if (!symbolsKey) return;
|
|
3268
|
-
let cancelled = false;
|
|
3269
|
-
service.fetchPrices(symbolsKey.split(",")).then((result) => {
|
|
3270
|
-
if (!cancelled && result && Object.keys(result).length > 0) {
|
|
3271
|
-
setPrices(result);
|
|
3272
|
-
}
|
|
3273
|
-
}).catch(() => {
|
|
3274
|
-
});
|
|
3275
|
-
return () => {
|
|
3276
|
-
cancelled = true;
|
|
3277
|
-
};
|
|
3278
|
-
}, [service, symbolsKey]);
|
|
3279
|
-
return prices;
|
|
3280
|
-
}
|
|
3281
|
-
|
|
3282
3427
|
// src/components/steps/ProcessingStep.tsx
|
|
3283
3428
|
|
|
3284
3429
|
function SuccessBadge() {
|
|
@@ -3380,7 +3525,7 @@ function normalizeFeeUsd(value) {
|
|
|
3380
3525
|
return Number.isFinite(value) ? Math.max(0, value) : null;
|
|
3381
3526
|
}
|
|
3382
3527
|
function formatUsdFee(value) {
|
|
3383
|
-
return `$${_nullishCoalesce(_optionalChain([normalizeFeeUsd, 'call',
|
|
3528
|
+
return `$${_nullishCoalesce(_optionalChain([normalizeFeeUsd, 'call', _122 => _122(value), 'optionalAccess', _123 => _123.toFixed, 'call', _124 => _124(2)]), () => ( "0.00"))}`;
|
|
3384
3529
|
}
|
|
3385
3530
|
function getMarketNetworkFees(breakdown) {
|
|
3386
3531
|
if (!breakdown) return null;
|
|
@@ -3434,12 +3579,12 @@ function isEventForTx(event, txHash) {
|
|
|
3434
3579
|
return txRefsMatch(eventTxHash, txHash);
|
|
3435
3580
|
}
|
|
3436
3581
|
function parseWebhookTimestamp(event) {
|
|
3437
|
-
if (typeof _optionalChain([event, 'optionalAccess',
|
|
3582
|
+
if (typeof _optionalChain([event, 'optionalAccess', _125 => _125.time]) !== "string") return void 0;
|
|
3438
3583
|
const timestamp = Date.parse(event.time);
|
|
3439
3584
|
return Number.isFinite(timestamp) ? timestamp : void 0;
|
|
3440
3585
|
}
|
|
3441
3586
|
function syncPhaseTimings(previous, event) {
|
|
3442
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
3587
|
+
if (!_optionalChain([event, 'optionalAccess', _126 => _126.type])) return previous;
|
|
3443
3588
|
const timestamp = _nullishCoalesce(parseWebhookTimestamp(event), () => ( Date.now()));
|
|
3444
3589
|
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;
|
|
3445
3590
|
const setBridging = (event.type === "bridge-started" || event.type === "bridge-complete") && previous.bridgingAt === void 0;
|
|
@@ -3501,46 +3646,46 @@ function getCurrentPhaseId(state, phaseTimings) {
|
|
|
3501
3646
|
if (state.type === "complete") {
|
|
3502
3647
|
return void 0;
|
|
3503
3648
|
}
|
|
3504
|
-
if (_optionalChain([state, 'access',
|
|
3649
|
+
if (_optionalChain([state, 'access', _127 => _127.lastEvent, 'optionalAccess', _128 => _128.type]) === "bridge-started" || _optionalChain([state, 'access', _129 => _129.lastEvent, 'optionalAccess', _130 => _130.type]) === "bridge-complete")
|
|
3505
3650
|
return "bridging";
|
|
3506
|
-
if (_optionalChain([state, 'access',
|
|
3651
|
+
if (_optionalChain([state, 'access', _131 => _131.lastEvent, 'optionalAccess', _132 => _132.type]) === "deposit-received") return "received";
|
|
3507
3652
|
return "confirming";
|
|
3508
3653
|
}
|
|
3509
3654
|
function getCompletionDestinationTxHash(event) {
|
|
3510
|
-
const eventData = _optionalChain([event, 'optionalAccess',
|
|
3511
|
-
const swapTxHash = _optionalChain([eventData, 'optionalAccess',
|
|
3512
|
-
const destinationTxHash = _optionalChain([eventData, 'optionalAccess',
|
|
3655
|
+
const eventData = _optionalChain([event, 'optionalAccess', _133 => _133.data]);
|
|
3656
|
+
const swapTxHash = _optionalChain([eventData, 'optionalAccess', _134 => _134.swap, 'optionalAccess', _135 => _135.transactionHash]);
|
|
3657
|
+
const destinationTxHash = _optionalChain([eventData, 'optionalAccess', _136 => _136.destination, 'optionalAccess', _137 => _137.transactionHash]);
|
|
3513
3658
|
return _nullishCoalesce(swapTxHash, () => ( destinationTxHash));
|
|
3514
3659
|
}
|
|
3515
3660
|
function getTerminalProcessingOutcome(event) {
|
|
3516
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3661
|
+
if (_optionalChain([event, 'optionalAccess', _138 => _138.type]) === "post-bridge-swap-complete") {
|
|
3517
3662
|
return {
|
|
3518
3663
|
type: "complete",
|
|
3519
3664
|
destinationTxHash: getCompletionDestinationTxHash(event)
|
|
3520
3665
|
};
|
|
3521
3666
|
}
|
|
3522
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3667
|
+
if (_optionalChain([event, 'optionalAccess', _139 => _139.type]) === "post-bridge-swap-failed") {
|
|
3523
3668
|
return {
|
|
3524
3669
|
type: "failed",
|
|
3525
3670
|
message: formatBridgeFailedMessage(event).message
|
|
3526
3671
|
};
|
|
3527
3672
|
}
|
|
3528
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3673
|
+
if (_optionalChain([event, 'optionalAccess', _140 => _140.type]) === "bridge-complete") {
|
|
3529
3674
|
return {
|
|
3530
3675
|
type: "complete",
|
|
3531
3676
|
destinationTxHash: getCompletionDestinationTxHash(event)
|
|
3532
3677
|
};
|
|
3533
3678
|
}
|
|
3534
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3679
|
+
if (_optionalChain([event, 'optionalAccess', _141 => _141.type]) === "bridge-failed") {
|
|
3535
3680
|
return {
|
|
3536
3681
|
type: "failed",
|
|
3537
3682
|
message: formatBridgeFailedMessage(event).message
|
|
3538
3683
|
};
|
|
3539
3684
|
}
|
|
3540
|
-
if (_optionalChain([event, 'optionalAccess',
|
|
3685
|
+
if (_optionalChain([event, 'optionalAccess', _142 => _142.type]) === "error") {
|
|
3541
3686
|
return {
|
|
3542
3687
|
type: "failed",
|
|
3543
|
-
message: _nullishCoalesce(_optionalChain([event, 'access',
|
|
3688
|
+
message: _nullishCoalesce(_optionalChain([event, 'access', _143 => _143.data, 'optionalAccess', _144 => _144.message]), () => ( "Unknown error"))
|
|
3544
3689
|
};
|
|
3545
3690
|
}
|
|
3546
3691
|
return null;
|
|
@@ -3548,10 +3693,10 @@ function getTerminalProcessingOutcome(event) {
|
|
|
3548
3693
|
function getInitialProcessingState(event, txHash) {
|
|
3549
3694
|
if (!event || !isEventForTx(event, txHash)) return null;
|
|
3550
3695
|
const terminal = getTerminalProcessingOutcome(event);
|
|
3551
|
-
if (_optionalChain([terminal, 'optionalAccess',
|
|
3696
|
+
if (_optionalChain([terminal, 'optionalAccess', _145 => _145.type]) === "complete") {
|
|
3552
3697
|
return { type: "complete", lastEvent: event };
|
|
3553
3698
|
}
|
|
3554
|
-
if (_optionalChain([terminal, 'optionalAccess',
|
|
3699
|
+
if (_optionalChain([terminal, 'optionalAccess', _146 => _146.type]) === "failed") {
|
|
3555
3700
|
return { type: "failed", message: terminal.message, lastEvent: event };
|
|
3556
3701
|
}
|
|
3557
3702
|
if (isDepositEvent(event)) {
|
|
@@ -3654,7 +3799,7 @@ function ProcessingStep({
|
|
|
3654
3799
|
flowLabel
|
|
3655
3800
|
});
|
|
3656
3801
|
const context = processingContextRef.current;
|
|
3657
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3802
|
+
_optionalChain([onDepositCompleteRef, 'access', _147 => _147.current, 'optionalCall', _148 => _148(txHash, void 0, {
|
|
3658
3803
|
amount: context.amount,
|
|
3659
3804
|
sourceChain: context.sourceChain,
|
|
3660
3805
|
sourceToken: context.sourceToken,
|
|
@@ -3685,7 +3830,7 @@ function ProcessingStep({
|
|
|
3685
3830
|
destinationTxHash: outcome.destinationTxHash,
|
|
3686
3831
|
event: event.type
|
|
3687
3832
|
});
|
|
3688
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3833
|
+
_optionalChain([onDepositCompleteRef, 'access', _149 => _149.current, 'optionalCall', _150 => _150(txHash, outcome.destinationTxHash, {
|
|
3689
3834
|
amount: context.amount,
|
|
3690
3835
|
sourceChain: context.sourceChain,
|
|
3691
3836
|
sourceToken: context.sourceToken,
|
|
@@ -3701,7 +3846,7 @@ function ProcessingStep({
|
|
|
3701
3846
|
message: outcome.message,
|
|
3702
3847
|
event: event.type
|
|
3703
3848
|
});
|
|
3704
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
3849
|
+
_optionalChain([onDepositFailedRef, 'access', _151 => _151.current, 'optionalCall', _152 => _152(txHash, outcome.message)]);
|
|
3705
3850
|
}, [
|
|
3706
3851
|
debug,
|
|
3707
3852
|
onDepositCompleteRef,
|
|
@@ -3733,13 +3878,13 @@ function ProcessingStep({
|
|
|
3733
3878
|
updatePhaseTimings(
|
|
3734
3879
|
(previous) => syncPhaseTimings(previous, state.lastEvent)
|
|
3735
3880
|
);
|
|
3736
|
-
}, [_optionalChain([state, 'access',
|
|
3881
|
+
}, [_optionalChain([state, 'access', _153 => _153.lastEvent, 'optionalAccess', _154 => _154.time]), _optionalChain([state, 'access', _155 => _155.lastEvent, 'optionalAccess', _156 => _156.type]), updatePhaseTimings]);
|
|
3737
3882
|
const [swappedFiatContext, setSwappedFiatContext] = _react.useState.call(void 0, null);
|
|
3738
3883
|
_react.useEffect.call(void 0, () => {
|
|
3739
3884
|
let cancelled = false;
|
|
3740
3885
|
let timeoutId;
|
|
3741
|
-
const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess',
|
|
3742
|
-
const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess',
|
|
3886
|
+
const isFiatSwappedOrder = isSwappedOrder && _optionalChain([swappedContext, 'optionalAccess', _157 => _157.variant]) === "fiat";
|
|
3887
|
+
const expectedOrderUuid = _nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _158 => _158.expectedOrderUuid]), () => ( null));
|
|
3743
3888
|
setSwappedFiatContext(null);
|
|
3744
3889
|
if (isFiatSwappedOrder && !expectedOrderUuid) {
|
|
3745
3890
|
return () => {
|
|
@@ -3789,8 +3934,8 @@ function ProcessingStep({
|
|
|
3789
3934
|
smartAccount,
|
|
3790
3935
|
txHash,
|
|
3791
3936
|
isSwappedOrder,
|
|
3792
|
-
_optionalChain([swappedContext, 'optionalAccess',
|
|
3793
|
-
_optionalChain([swappedContext, 'optionalAccess',
|
|
3937
|
+
_optionalChain([swappedContext, 'optionalAccess', _159 => _159.variant]),
|
|
3938
|
+
_optionalChain([swappedContext, 'optionalAccess', _160 => _160.expectedOrderUuid])
|
|
3794
3939
|
]);
|
|
3795
3940
|
_react.useEffect.call(void 0, () => {
|
|
3796
3941
|
if (directTransfer) return;
|
|
@@ -3816,20 +3961,20 @@ function ProcessingStep({
|
|
|
3816
3961
|
debugLog(debug, "processing", "poll:event", {
|
|
3817
3962
|
type: lastEvent2.type,
|
|
3818
3963
|
matchesTx: eventMatchesTx,
|
|
3819
|
-
intentId: _optionalChain([eventData, 'optionalAccess',
|
|
3964
|
+
intentId: _optionalChain([eventData, 'optionalAccess', _161 => _161.intentId])
|
|
3820
3965
|
});
|
|
3821
3966
|
}
|
|
3822
3967
|
if (!isMounted) return;
|
|
3823
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3968
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _162 => _162.type]) === "bridge-complete") {
|
|
3824
3969
|
setState({ type: "complete", lastEvent: eventForCurrentTx });
|
|
3825
|
-
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access',
|
|
3970
|
+
const destinationTxHash2 = _optionalChain([eventForCurrentTx, 'access', _163 => _163.data, 'optionalAccess', _164 => _164.destination, 'optionalAccess', _165 => _165.transactionHash]);
|
|
3826
3971
|
debugLog(debug, "processing", "state:complete", {
|
|
3827
3972
|
txHash,
|
|
3828
3973
|
destinationTxHash: destinationTxHash2,
|
|
3829
3974
|
event: eventForCurrentTx.type
|
|
3830
3975
|
});
|
|
3831
3976
|
const context = processingContextRef.current;
|
|
3832
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
3977
|
+
_optionalChain([onDepositCompleteRef, 'access', _166 => _166.current, 'optionalCall', _167 => _167(txHash, destinationTxHash2, {
|
|
3833
3978
|
amount: context.amount,
|
|
3834
3979
|
sourceChain: context.sourceChain,
|
|
3835
3980
|
sourceToken: context.sourceToken,
|
|
@@ -3840,7 +3985,7 @@ function ProcessingStep({
|
|
|
3840
3985
|
})]);
|
|
3841
3986
|
return;
|
|
3842
3987
|
}
|
|
3843
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3988
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _168 => _168.type]) === "bridge-failed") {
|
|
3844
3989
|
const formatted = formatBridgeFailedMessage(eventForCurrentTx);
|
|
3845
3990
|
setState({
|
|
3846
3991
|
type: "failed",
|
|
@@ -3852,11 +3997,11 @@ function ProcessingStep({
|
|
|
3852
3997
|
message: formatted.message,
|
|
3853
3998
|
code: formatted.code
|
|
3854
3999
|
});
|
|
3855
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
4000
|
+
_optionalChain([onDepositFailedRef, 'access', _169 => _169.current, 'optionalCall', _170 => _170(txHash, formatted.message)]);
|
|
3856
4001
|
return;
|
|
3857
4002
|
}
|
|
3858
|
-
if (_optionalChain([eventForCurrentTx, 'optionalAccess',
|
|
3859
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access',
|
|
4003
|
+
if (_optionalChain([eventForCurrentTx, 'optionalAccess', _171 => _171.type]) === "error") {
|
|
4004
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForCurrentTx, 'access', _172 => _172.data, 'optionalAccess', _173 => _173.message]), () => ( "Unknown error"));
|
|
3860
4005
|
setState({
|
|
3861
4006
|
type: "failed",
|
|
3862
4007
|
message: errorMessage,
|
|
@@ -3866,7 +4011,7 @@ function ProcessingStep({
|
|
|
3866
4011
|
txHash,
|
|
3867
4012
|
message: errorMessage
|
|
3868
4013
|
});
|
|
3869
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
4014
|
+
_optionalChain([onDepositFailedRef, 'access', _174 => _174.current, 'optionalCall', _175 => _175(txHash, errorMessage)]);
|
|
3870
4015
|
return;
|
|
3871
4016
|
}
|
|
3872
4017
|
setState((previous) => ({
|
|
@@ -3927,7 +4072,7 @@ function ProcessingStep({
|
|
|
3927
4072
|
txHash,
|
|
3928
4073
|
timeoutMs: ESCALATED_DELAY_MS
|
|
3929
4074
|
});
|
|
3930
|
-
_optionalChain([onErrorRef, 'access',
|
|
4075
|
+
_optionalChain([onErrorRef, 'access', _176 => _176.current, 'optionalCall', _177 => _177(message, "PROCESS_TIMEOUT")]);
|
|
3931
4076
|
}, ESCALATED_DELAY_MS);
|
|
3932
4077
|
return () => clearTimeout(timeoutId);
|
|
3933
4078
|
}, [debug, directTransfer, onErrorRef, state.type, txHash]);
|
|
@@ -3939,13 +4084,13 @@ function ProcessingStep({
|
|
|
3939
4084
|
const timelineNowMs = _nullishCoalesce(phaseTimings.endedAt, () => ( Date.now()));
|
|
3940
4085
|
const flowNoun = flowLabel === "withdraw" ? "withdrawal" : "deposit";
|
|
3941
4086
|
const flowCapitalized = flowLabel === "withdraw" ? "Withdrawal" : "Deposit";
|
|
3942
|
-
const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess',
|
|
4087
|
+
const destinationTxHash = _optionalChain([lastEvent, 'optionalAccess', _178 => _178.data, 'optionalAccess', _179 => _179.destination, 'optionalAccess', _180 => _180.transactionHash]) || null;
|
|
3943
4088
|
const sourceDetails = getEventSourceDetails(lastEvent);
|
|
3944
4089
|
const displaySourceChain = _nullishCoalesce(sourceDetails.chainId, () => ( sourceChain));
|
|
3945
4090
|
const displaySourceToken = _nullishCoalesce(sourceDetails.token, () => ( sourceToken));
|
|
3946
4091
|
const displayAmount = _nullishCoalesce(sourceDetails.amount, () => ( amount));
|
|
3947
|
-
const sourceExplorerUrl =
|
|
3948
|
-
const destExplorerUrl = destinationTxHash ?
|
|
4092
|
+
const sourceExplorerUrl = _chunkU7SVYWVDcjs.getExplorerTxUrl.call(void 0, displaySourceChain, txHash);
|
|
4093
|
+
const destExplorerUrl = destinationTxHash ? _chunkU7SVYWVDcjs.getExplorerTxUrl.call(void 0, targetChain, destinationTxHash) : null;
|
|
3949
4094
|
const sourceDisplay = (() => {
|
|
3950
4095
|
const resolved = resolveTokenDisplay(displaySourceToken, displaySourceChain, {
|
|
3951
4096
|
symbol: _nullishCoalesce(providedSourceSymbol, () => ( (displaySourceChain === "solana" ? "SOL" : "Token"))),
|
|
@@ -3971,8 +4116,16 @@ function ProcessingStep({
|
|
|
3971
4116
|
const formattedDestinationAmount = eventDestination.amount !== void 0 ? formatRawTokenAmount(eventDestination.amount, targetDisplay) : void 0;
|
|
3972
4117
|
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
3973
4118
|
const prices = useTokenPrices(service, [
|
|
3974
|
-
|
|
3975
|
-
|
|
4119
|
+
{
|
|
4120
|
+
chainId: displaySourceChain,
|
|
4121
|
+
address: displaySourceToken,
|
|
4122
|
+
symbol: sourceDisplay.symbol
|
|
4123
|
+
},
|
|
4124
|
+
{
|
|
4125
|
+
chainId: _nullishCoalesce(eventDestination.chainId, () => ( targetChain)),
|
|
4126
|
+
address: _nullishCoalesce(eventDestination.token, () => ( targetToken)),
|
|
4127
|
+
symbol: targetDisplay.symbol
|
|
4128
|
+
}
|
|
3976
4129
|
]);
|
|
3977
4130
|
const estimatedReceiveAmount = (() => {
|
|
3978
4131
|
const estimate = estimateReceiveAmount({
|
|
@@ -3980,6 +4133,7 @@ function ProcessingStep({
|
|
|
3980
4133
|
sourceSymbol: sourceDisplay.symbol,
|
|
3981
4134
|
targetSymbol: targetDisplay.symbol,
|
|
3982
4135
|
sourceAmountUsd: amountUsdNumber,
|
|
4136
|
+
sourceTrusted: isRecognizedToken(displaySourceToken, displaySourceChain),
|
|
3983
4137
|
prices
|
|
3984
4138
|
});
|
|
3985
4139
|
return estimate !== void 0 ? formatTokenAmount(estimate, targetDisplay.symbol) : void 0;
|
|
@@ -4010,15 +4164,13 @@ function ProcessingStep({
|
|
|
4010
4164
|
const delayPhaseId = isProcessing && currentPhaseId && activePhaseElapsedMs >= SOFT_DELAY_MS[currentPhaseId] ? currentPhaseId : void 0;
|
|
4011
4165
|
void delayPhaseId;
|
|
4012
4166
|
void hasEscalatedDelay;
|
|
4013
|
-
const
|
|
4014
|
-
const
|
|
4015
|
-
const
|
|
4016
|
-
const
|
|
4017
|
-
const sourceChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, displaySourceChain);
|
|
4018
|
-
const targetChainName = _chunkHH46H6ZIcjs.getChainName.call(void 0, targetChain);
|
|
4167
|
+
const sourceChainIcon = _chunkU7SVYWVDcjs.getChainIcon.call(void 0, displaySourceChain);
|
|
4168
|
+
const targetChainIcon = _chunkU7SVYWVDcjs.getChainIcon.call(void 0, targetChain);
|
|
4169
|
+
const sourceChainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, displaySourceChain);
|
|
4170
|
+
const targetChainName = _chunkU7SVYWVDcjs.getChainName.call(void 0, targetChain);
|
|
4019
4171
|
const timerText = formatTimer(elapsedSeconds);
|
|
4020
|
-
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
4021
|
-
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
4172
|
+
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _181 => _181.feeSponsored]), () => ( false));
|
|
4173
|
+
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _182 => _182.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
4022
4174
|
const stateTitle = isComplete ? `${flowCapitalized} successful` : isFailed ? `${flowCapitalized} failed` : "Processing...";
|
|
4023
4175
|
const handleRetry = _nullishCoalesce(onRetry, () => ( onNewDeposit));
|
|
4024
4176
|
const headerContent = isComplete ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-body-header", children: [
|
|
@@ -4029,20 +4181,20 @@ function ProcessingStep({
|
|
|
4029
4181
|
/* @__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 }) })
|
|
4030
4182
|
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletIcon, {}), title: stateTitle });
|
|
4031
4183
|
if (isComplete && isSwappedOrder) {
|
|
4032
|
-
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess',
|
|
4184
|
+
const effectivePaymentMethod = _nullishCoalesce(_nullishCoalesce(_optionalChain([swappedContext, 'optionalAccess', _183 => _183.method]), () => ( _optionalChain([swappedFiatContext, 'optionalAccess', _184 => _184.paymentMethod]))), () => ( null));
|
|
4033
4185
|
const onrampMethod = effectivePaymentMethod ? formatPaymentMethod(effectivePaymentMethod) : null;
|
|
4034
|
-
const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess',
|
|
4186
|
+
const onrampMethodIcon = _optionalChain([swappedContext, 'optionalAccess', _185 => _185.variant]) === "connect" && effectivePaymentMethod ? getExchangeLogoSrc(
|
|
4035
4187
|
_nullishCoalesce(onrampMethod, () => ( effectivePaymentMethod)),
|
|
4036
4188
|
effectivePaymentMethod
|
|
4037
4189
|
) : null;
|
|
4038
|
-
const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess',
|
|
4039
|
-
const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4190
|
+
const connectPaidAmount = _optionalChain([swappedContext, 'optionalAccess', _186 => _186.variant]) === "connect" ? `${formattedSentAmount} ${sourceSymbol}` : null;
|
|
4191
|
+
const amountPaid = _nullishCoalesce(connectPaidAmount, () => ( (_optionalChain([swappedFiatContext, 'optionalAccess', _187 => _187.paidAmountUsd]) != null ? `$${swappedFiatContext.paidAmountUsd.toFixed(2)}` : null)));
|
|
4040
4192
|
const depositedAmount = receiveDisplay;
|
|
4041
|
-
const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4193
|
+
const onrampFeeUsd = _nullishCoalesce(_optionalChain([swappedFiatContext, 'optionalAccess', _188 => _188.onrampFeeUsd]), () => ( null));
|
|
4042
4194
|
const quoteFees = getMarketNetworkFees(quoteFeeBreakdown);
|
|
4043
4195
|
const fallbackNetworkFeeUsd = quoteFees === null && quotedFeeAmount !== void 0 && Number.isFinite(Number(quotedFeeAmount)) ? Number(quotedFeeAmount) : null;
|
|
4044
|
-
const marketFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess',
|
|
4045
|
-
const networkFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess',
|
|
4196
|
+
const marketFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _189 => _189.marketUsd]), () => ( null));
|
|
4197
|
+
const networkFeeUsd = _nullishCoalesce(_optionalChain([quoteFees, 'optionalAccess', _190 => _190.networkUsd]), () => ( fallbackNetworkFeeUsd));
|
|
4046
4198
|
const sponsoredFeeTooltip = "This fee is sponsored for this deposit.";
|
|
4047
4199
|
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.";
|
|
4048
4200
|
const feeRows = [];
|
|
@@ -4077,7 +4229,7 @@ function ProcessingStep({
|
|
|
4077
4229
|
onrampMethodIcon,
|
|
4078
4230
|
amountPaid,
|
|
4079
4231
|
depositedAmount,
|
|
4080
|
-
|
|
4232
|
+
depositedSymbol: targetSymbol,
|
|
4081
4233
|
feesTotal,
|
|
4082
4234
|
feeRows,
|
|
4083
4235
|
feesTooltip,
|
|
@@ -4132,7 +4284,7 @@ function ProcessingStep({
|
|
|
4132
4284
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-value", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Ticker, { value: timerText }) })
|
|
4133
4285
|
] }),
|
|
4134
4286
|
isSwappedOrder ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
4135
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4287
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _191 => _191.paidAmountUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4136
4288
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "You pay" }),
|
|
4137
4289
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4138
4290
|
"$",
|
|
@@ -4144,7 +4296,7 @@ function ProcessingStep({
|
|
|
4144
4296
|
] })
|
|
4145
4297
|
] })
|
|
4146
4298
|
] }),
|
|
4147
|
-
_optionalChain([swappedFiatContext, 'optionalAccess',
|
|
4299
|
+
_optionalChain([swappedFiatContext, 'optionalAccess', _192 => _192.onrampFeeUsd]) != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4148
4300
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "On-ramp fee" }),
|
|
4149
4301
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4150
4302
|
"$",
|
|
@@ -4159,7 +4311,7 @@ function ProcessingStep({
|
|
|
4159
4311
|
" ",
|
|
4160
4312
|
sourceSymbol
|
|
4161
4313
|
] }),
|
|
4162
|
-
|
|
4314
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenIcon, { symbol: sourceSymbol }) })
|
|
4163
4315
|
] })
|
|
4164
4316
|
] })
|
|
4165
4317
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -4170,14 +4322,14 @@ function ProcessingStep({
|
|
|
4170
4322
|
" ",
|
|
4171
4323
|
sourceSymbol
|
|
4172
4324
|
] }),
|
|
4173
|
-
|
|
4325
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenIcon, { symbol: sourceSymbol }) })
|
|
4174
4326
|
] })
|
|
4175
4327
|
] }),
|
|
4176
4328
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4177
4329
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: isProcessing ? "Receive" : "Received" }),
|
|
4178
4330
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4179
4331
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
4180
|
-
|
|
4332
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenIcon, { symbol: targetSymbol }) })
|
|
4181
4333
|
] })
|
|
4182
4334
|
] }),
|
|
4183
4335
|
isFailed && balanceAfterUsd !== void 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -4378,4 +4530,8 @@ function accountFromPrivateKey(privateKey) {
|
|
|
4378
4530
|
|
|
4379
4531
|
|
|
4380
4532
|
|
|
4381
|
-
|
|
4533
|
+
|
|
4534
|
+
|
|
4535
|
+
|
|
4536
|
+
|
|
4537
|
+
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;
|