@rhinestone/deposit-modal 0.4.0 → 0.4.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-KFTMS2WX.cjs → DepositModalReown-MCDIOJLT.cjs} +6 -6
- package/dist/{DepositModalReown-PC7EX5VK.mjs → DepositModalReown-ORSBSEMO.mjs} +3 -3
- package/dist/{WithdrawModalReown-Z2YF2FSJ.cjs → WithdrawModalReown-AZ27OBAV.cjs} +6 -6
- package/dist/{WithdrawModalReown-BE23LUMT.mjs → WithdrawModalReown-L4SWLONE.mjs} +3 -3
- package/dist/{chunk-7MP2UWIQ.cjs → chunk-36R7XKXP.cjs} +421 -599
- package/dist/{chunk-GKC22JC4.mjs → chunk-7EQQD7B4.mjs} +387 -285
- package/dist/{chunk-WCIGOV34.mjs → chunk-7JVBUMFE.mjs} +56 -8
- package/dist/{chunk-3PVDRSJ7.mjs → chunk-ANPDY6NJ.mjs} +372 -550
- package/dist/{chunk-OQVLEVNR.cjs → chunk-EDUWRMQI.cjs} +196 -94
- package/dist/{chunk-AE5LHTPM.cjs → chunk-PNN2YBPF.cjs} +108 -60
- package/dist/{chunk-3MXWIYAT.cjs → chunk-PQDHZZ2B.cjs} +2 -2
- package/dist/{chunk-UFKFSGT3.mjs → chunk-V72YVCR6.mjs} +1 -1
- package/dist/deposit.cjs +3 -3
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/styles.css +74 -34
- package/dist/{types-CFRuisqK.d.cts → types-CUOqIIvZ.d.cts} +7 -0
- package/dist/{types-CFRuisqK.d.ts → types-CUOqIIvZ.d.ts} +7 -0
- package/dist/withdraw.cjs +3 -3
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +2 -2
- package/package.json +1 -1
|
@@ -45,12 +45,14 @@ import {
|
|
|
45
45
|
debugError,
|
|
46
46
|
debugLog,
|
|
47
47
|
failureMessageForEvent,
|
|
48
|
+
formatQuotedReceive,
|
|
48
49
|
formatReceiveEstimate,
|
|
49
50
|
formatTokenAmount,
|
|
50
51
|
formatUserError,
|
|
51
52
|
getAssetId,
|
|
52
53
|
getEventSourceDetails,
|
|
53
54
|
getEventTxHash,
|
|
55
|
+
getExchangeLogo,
|
|
54
56
|
getHyperEvmReadClient,
|
|
55
57
|
getPublicClient,
|
|
56
58
|
isDepositEvent,
|
|
@@ -62,7 +64,7 @@ import {
|
|
|
62
64
|
tokenFormatter,
|
|
63
65
|
txRefsMatch,
|
|
64
66
|
useLatestRef
|
|
65
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-7EQQD7B4.mjs";
|
|
66
68
|
import {
|
|
67
69
|
SAFE_ABI
|
|
68
70
|
} from "./chunk-F7P4MV72.mjs";
|
|
@@ -118,7 +120,6 @@ import {
|
|
|
118
120
|
useLayoutEffect as useLayoutEffect2,
|
|
119
121
|
useRef as useRef8
|
|
120
122
|
} from "react";
|
|
121
|
-
import { formatUnits as formatUnits7 } from "viem";
|
|
122
123
|
|
|
123
124
|
// src/components/steps/AssetSelectStep.tsx
|
|
124
125
|
import { useEffect, useMemo, useState } from "react";
|
|
@@ -133,7 +134,6 @@ function AssetSelectStep({
|
|
|
133
134
|
service,
|
|
134
135
|
onContinue,
|
|
135
136
|
onTotalBalanceComputed,
|
|
136
|
-
onAssetsLoaded,
|
|
137
137
|
onDisconnect
|
|
138
138
|
}) {
|
|
139
139
|
const [assets, setAssets] = useState([]);
|
|
@@ -148,7 +148,6 @@ function AssetSelectStep({
|
|
|
148
148
|
});
|
|
149
149
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
150
150
|
const onTotalBalanceComputedRef = useLatestRef(onTotalBalanceComputed);
|
|
151
|
-
const onAssetsLoadedRef = useLatestRef(onAssetsLoaded);
|
|
152
151
|
useEffect(() => {
|
|
153
152
|
let active = true;
|
|
154
153
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -157,7 +156,6 @@ function AssetSelectStep({
|
|
|
157
156
|
0
|
|
158
157
|
);
|
|
159
158
|
onTotalBalanceComputedRef.current?.(total);
|
|
160
|
-
if (currentAssets.length > 0) onAssetsLoadedRef.current?.(currentAssets);
|
|
161
159
|
}
|
|
162
160
|
async function loadPortfolio() {
|
|
163
161
|
if (!address) {
|
|
@@ -201,7 +199,7 @@ function AssetSelectStep({
|
|
|
201
199
|
return () => {
|
|
202
200
|
active = false;
|
|
203
201
|
};
|
|
204
|
-
}, [address, publicClient, service, onTotalBalanceComputedRef
|
|
202
|
+
}, [address, publicClient, service, onTotalBalanceComputedRef]);
|
|
205
203
|
useEffect(() => {
|
|
206
204
|
if (!defaultAssetId || selectedAssetId) return;
|
|
207
205
|
if (assets.some((asset) => asset.id === defaultAssetId)) {
|
|
@@ -705,32 +703,34 @@ function AmountStep({
|
|
|
705
703
|
}
|
|
706
704
|
setError(null);
|
|
707
705
|
onCtaClick?.("continue");
|
|
708
|
-
setIsCheckingLiquidity(true);
|
|
709
706
|
let liquidityWarning;
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
707
|
+
if (uiConfig?.checkLiquidity) {
|
|
708
|
+
setIsCheckingLiquidity(true);
|
|
709
|
+
try {
|
|
710
|
+
const liquidity = await service.checkLiquidity({
|
|
711
|
+
sourceChainId: liquiditySource?.chainId ?? asset.chainId,
|
|
712
|
+
sourceToken: liquiditySource?.token ?? asset.token,
|
|
713
|
+
destinationChainId: targetChain,
|
|
714
|
+
destinationToken: targetToken,
|
|
715
|
+
amount: amountInUnits.toString()
|
|
716
|
+
});
|
|
717
|
+
if (liquidity.unlimited || liquidity.hasLiquidity) {
|
|
718
|
+
liquidityWarning = void 0;
|
|
719
|
+
} else if (liquidity.maxAmount !== null) {
|
|
720
|
+
liquidityWarning = {
|
|
721
|
+
kind: "low",
|
|
722
|
+
maxAmount: liquidity.maxAmount,
|
|
723
|
+
decimals: liquidity.decimals,
|
|
724
|
+
symbol: liquidity.symbol
|
|
725
|
+
};
|
|
726
|
+
} else {
|
|
727
|
+
liquidityWarning = { kind: "unavailable" };
|
|
728
|
+
}
|
|
729
|
+
} catch {
|
|
730
|
+
liquidityWarning = { kind: "check-failed" };
|
|
731
|
+
} finally {
|
|
732
|
+
setIsCheckingLiquidity(false);
|
|
729
733
|
}
|
|
730
|
-
} catch {
|
|
731
|
-
liquidityWarning = { kind: "check-failed" };
|
|
732
|
-
} finally {
|
|
733
|
-
setIsCheckingLiquidity(false);
|
|
734
734
|
}
|
|
735
735
|
onContinue(
|
|
736
736
|
sourceAmount.toString(),
|
|
@@ -881,6 +881,10 @@ function ConfirmStep({
|
|
|
881
881
|
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? formatTokenAmount(Number(amount), asset.symbol) ?? "0" : "0";
|
|
882
882
|
const receiveDisplay = (() => {
|
|
883
883
|
if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
|
|
884
|
+
if (quote) {
|
|
885
|
+
const quoted = formatQuotedReceive(quote.output, targetSymbol);
|
|
886
|
+
if (quoted !== void 0) return quoted;
|
|
887
|
+
}
|
|
884
888
|
const usdValue = Number(targetAmount);
|
|
885
889
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
886
890
|
const estimate = formatReceiveEstimate({
|
|
@@ -891,7 +895,7 @@ function ConfirmStep({
|
|
|
891
895
|
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
|
|
892
896
|
});
|
|
893
897
|
if (estimate !== void 0) return estimate;
|
|
894
|
-
return
|
|
898
|
+
return targetSymbol;
|
|
895
899
|
})();
|
|
896
900
|
const feeSponsored = uiConfig?.feeSponsored ?? false;
|
|
897
901
|
const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
|
|
@@ -2417,43 +2421,33 @@ function SwappedIframeStep({
|
|
|
2417
2421
|
);
|
|
2418
2422
|
}
|
|
2419
2423
|
return /* @__PURE__ */ jsxs9("div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
2420
|
-
/* @__PURE__ */
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
title: "Deposit",
|
|
2426
|
-
subtitle: "Add money to your balance"
|
|
2427
|
-
}
|
|
2428
|
-
),
|
|
2429
|
-
/* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-iframe-wrap", children: [
|
|
2430
|
-
loadError && /* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-error", children: [
|
|
2431
|
-
/* @__PURE__ */ jsx9("div", { children: loadError }),
|
|
2432
|
-
/* @__PURE__ */ jsx9(
|
|
2433
|
-
"button",
|
|
2434
|
-
{
|
|
2435
|
-
type: "button",
|
|
2436
|
-
className: "rs-fiat-onramp-retry",
|
|
2437
|
-
onClick: () => setRetryToken((n) => n + 1),
|
|
2438
|
-
children: "Retry"
|
|
2439
|
-
}
|
|
2440
|
-
)
|
|
2441
|
-
] }),
|
|
2442
|
-
!loadError && !iframeLoaded && /* @__PURE__ */ jsx9("div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ jsx9(Spinner, {}) }),
|
|
2443
|
-
widgetUrl && !loadError && /* @__PURE__ */ jsx9(
|
|
2444
|
-
"iframe",
|
|
2424
|
+
/* @__PURE__ */ jsx9("div", { className: "rs-screen-body rs-fiat-onramp-body", children: /* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-iframe-wrap", children: [
|
|
2425
|
+
loadError && /* @__PURE__ */ jsxs9("div", { className: "rs-fiat-onramp-error", children: [
|
|
2426
|
+
/* @__PURE__ */ jsx9("div", { children: loadError }),
|
|
2427
|
+
/* @__PURE__ */ jsx9(
|
|
2428
|
+
"button",
|
|
2445
2429
|
{
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
onLoad: () => setIframeLoaded(true)
|
|
2452
|
-
},
|
|
2453
|
-
retryToken
|
|
2430
|
+
type: "button",
|
|
2431
|
+
className: "rs-fiat-onramp-retry",
|
|
2432
|
+
onClick: () => setRetryToken((n) => n + 1),
|
|
2433
|
+
children: "Retry"
|
|
2434
|
+
}
|
|
2454
2435
|
)
|
|
2455
|
-
] })
|
|
2456
|
-
|
|
2436
|
+
] }),
|
|
2437
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ jsx9("div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ jsx9(Spinner, {}) }),
|
|
2438
|
+
widgetUrl && !loadError && /* @__PURE__ */ jsx9(
|
|
2439
|
+
"iframe",
|
|
2440
|
+
{
|
|
2441
|
+
src: widgetUrl,
|
|
2442
|
+
title: iframeTitle,
|
|
2443
|
+
className: "rs-fiat-onramp-iframe",
|
|
2444
|
+
sandbox: "allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation",
|
|
2445
|
+
allow: "payment; camera; microphone; clipboard-write; geolocation",
|
|
2446
|
+
onLoad: () => setIframeLoaded(true)
|
|
2447
|
+
},
|
|
2448
|
+
retryToken
|
|
2449
|
+
)
|
|
2450
|
+
] }) }),
|
|
2457
2451
|
/* @__PURE__ */ jsx9(PoweredBy, {})
|
|
2458
2452
|
] });
|
|
2459
2453
|
}
|
|
@@ -2614,117 +2608,13 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
2614
2608
|
|
|
2615
2609
|
// src/components/steps/ExchangeSelectStep.tsx
|
|
2616
2610
|
import { useCallback as useCallback5, useEffect as useEffect7, useState as useState7 } from "react";
|
|
2617
|
-
|
|
2618
|
-
// src/components/ui/ExchangeLogos.tsx
|
|
2619
2611
|
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2620
|
-
var HTX_LOGO_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXYAAACQCAMAAAAr6rB8AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAACNUExURQAAAAAAPgAAPgAAPgAAQAAAPQAAPgAAPQAAPQAAPgAAOAAAPgAAPQAAPQAAPAAAOgAAPgAAPQAAPQAAQAAAQACK1QCM1QCNzwCL1gCL1gCM1QCM1gCL1gAAPgCL1wCK1ACL1QCL0wCM1gCM1QCM1ACL1AAAPQCM1gAAPgCM1gAAOgCM1gAAPgCM1v///6KyLqIAAAAsdFJOUwCAj88Qn6BQv+8g33CvQDCQT2AgUCBgEN+AkL/eb58wcECw71Cgvs/O7zGgm66ePgAAAAFiS0dELlTTEIcAAAAHdElNRQfoDAUMAwII1OX3AAAI7ElEQVR42u2dbWPaOBCEQ8Ml4UyAg5IQ0ru8kLS9Vv7/f+9CaArYs7sjg/GtrfmKjeXHYjVarcXZGa/ep4iDk46lXjjvN92GDqoXEvcG9IY9/NF0I7qnizfsodd0Kzqnd+zhsulmdE1X79gHfzbdjo5pgz1cNd2OjinbYA/DphvSLf2iHgbJRZ5Q/Q/s4brppnRJo9/Yw6jptnRIl1vsaVQ9nXohdfcGdL2D/bzpxnRHVyF19wY02MWeovuJNA4hdffT63Ife+rup9FkH3tIU9WT6LyAPSXeT6F+gXoYNN2iTuiyiD0NqqfQRQn7pOkmdUFZSFHm9BqHkKLM6TUB2CdNN6r9ygD2lA+rWyjGpBlT7bqA2P9qulktVz+D2CdNt6vlmkLqKR1Ws3BnT869XgmdPYRUl1enMgl7GlNrlNjZw7TpprVZYmdPVqZGyZ09vdtRn/pyZ08Osj71ZOopK1ObZgr1kDXdutYqS9gbkBZiEva6pIaYhL0m9bOEvQF9Cgn76dUzqCffXofGFvX07lgNmmUm9vSG6tFlDadrpUqZo+vcpp5KB44uy8QcPqKOpyUxv56+ddpseiSN1982Qp98pm5wfoOknmKamLUOW+XoVXuOYAa3n38e2Q3n9F7BPxugj5hB7XaRA90dTP3ApVQf2EGFeeB2d1ki6veHUz/QtTvBDss/iZT3DaL+Za6c8TfXrAMXsL1gx5bO2pxxDkOMFtmnXKsOzQx4wS5MG43h/x5R/+dw6uUBVfsBecZ+NkSf6uH9LjbEjAdco0qd/SF/bCn2/ff+mcbOEfX86XDq5c5+Y7gjx9hjXWS0dyQSMRuVI/uz5Ur9YscuMoylNkLv+OUI1IFnX5mzAb/YsYvMhOQI9I65HNh56pPSuS/ELMwv9hgXOY8NMUz6a/Ocy539mbCmfrELLhKmR6B3VKanTPpLutx27H5oJXbeRcZ6R3JyGmDJ6evvKyxI/+4MO3aRX5X+x01PZ3R7wFCya5m+tRM7dpHF8I69ozw9ZVaTfgn8svYG72UrsQsuspAkwN5RDgB8YEc7yew/Y2U65hg75SKf4qanbCYGlwsUnOritkHsiq4OOPdMCgiF8A5G1LvIb4RPF6WAigGNCTP+sAsuspAkKPlHZXrKLWyshWbE5SdMhBmH2AUXuY9kviqwUKanNHUU2MG0TF288osdu8hCeH9hQ4ywp0AgW/ma5xW6u0vslItckh2QHvxh8gdOEBbtxC64yP3/idn17trSBvzpAOEVlW8Iu52b8Ykdu8gCmIcVg4Hu7LAsB6c57ejuFDvlIh8/KGirp2xkhztu4jQnEd2dYhfW3wou8tkOMayNwVBeBepmd/eKHbvIQpLgV3jXuh7Z2eE8CU+GNzKmqm6xUy7yyfCOxjuQW+EChYWM/bGt2LGLLCRNlur0lB5Q8VbKS5m6FWX8YheQlZIE6sIDF2Nw85QQY0YZx9gpFzl/VL+CijE4sM8XKnb9up6xYxf5PeI1Cy7G4MD+qlJXTatv7IKLjPizcCr3iAP7jU49/7e92CkXGdmUknBxrxFi8lwfU3xjx9z4P5Nlah4rhZjcyMvwKX5LjWDHLvIrebb9zq8UYl5M6voik3PsnIuUdBlMCe8PmCEmz5/bjB27SLkeNfbmcYi5s6nrFTPusWMXmVEu8tq6J6Fhc4K6bmXcYz/7Ud1FmkYmqzqertVu7IKLZMK7WeSLx1Oqs+sOsgXYq7tIKzUgjKf3CftaP2B7vtsnWreEX3C35qddwS6kEe3wbtxRdfP4Lq3WvQXYh1KLzCRBpTt6Iqm3vLfPxBm+6SKNO8KjAxnZ245dGRetJIGeksG5qQeWeruxqzdguEjdyeABlfPsa1VutQPsn9U2DfQkge7bYYgiPXve7lmq9TKpHt7V5ACOMax7bHdOxpzeqy5yop2JA9Q3GnvsXkGDjND/AzvRaS6V04faidB+8jEmOt/uZ3WJqaTTkgRqvh2e8chjf2krdu6dI+V2+sppeEMsPsboL2R7xk7WL/bkb1CeG9zCNyLGtLZygH6tUU4SKA9ugo4nllA/pK7pOcY+Y7c6Ulyk8uTgb2TJY4/e4dMJdhggerD/int+K8EdYqfzMUaZjF/s0Dt+FYZZMUkg+36YGuCpt7TiFyYF1kufsIJDdJGy8UdPik+DWS+NOcWOkwLvPXSIPpHqUeUog4IMnWq3YoxX7DCb0hO/X04SiFFmAg7mEzJ6va9X7DA2fKzBYYsjuEix1Bo1ialKojq7T+w4KfA7fkdtfy3ZUDRLpbG38r1U063AzKJwW9Kgiv5inMZubjrgETv05rtfEeMi+1J3Z/d9qxDZXWKHU8v9sjkc3vFSk9TdwQ7tLHZ7ezx/2KkRcwgfDXSRUh5zUj6UdDLE5qf+sOOkQPEo6DDxZYSsO8DAZcLsbU0cYle941Yx4R1790H5t8HlfZmt8bxhp+f+EUkCIZcJnP6KoE7tr+wMu5IUKAq6SFyPOoTYJ+UDiQwkt+2pM+wRITsmSYBLtcvH2Uup5Ca/vrDjwC6kuSKSBPhHVD7UTEGuGt5auRbsRlKgKGzw4UOCr0pOysdZS9jUTrPOsPc577hVRJJgCI4EXsaYMDW+bX4d2OEGyFpVb4yL7FFH3q6OQt0TdiIpUBR8vWZAJwkACWURe8VTd4Qdj5DG/2cO4aPCYzBAUR5U5RnTiv2DCF/YYcCYVLiYuNRUZgFQSNGd/XsIZ9jJpECpofz8Cl2j3N2F6P6T2bXdH3a8+Ea8expVSTAkWKAp0+oxCrob7LO48pddxSw1la8DZlflDMF95P9HusFuLigp+o7OlSoJZoUrARjFreEXakm1Z+w4sJObJEVVErz51Mw6bq9cZhFhG51hx0kBekuwIXxoYj3qfodHNLZuZnUXN5R6wh6dFCgqrh717e52E51oAHmtHNQ/rjAqidl5qF8+bcZechx7LrjYmyJusj9F0l7iG23Bg8zM2e0mJfazIvQkUbOLTPlZve9H+Bz9pUmERhvyqLuv/wohbl6aFKHx9Dob4NexlzE5mKSt/gNCZI6GyUmWNAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyNC0xMi0wNVQxMjowMzowMiswMDowMLpM60QAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjQtMTItMDVUMTI6MDM6MDIrMDA6MDDLEVP4AAAAKHRFWHRkYXRlOnRpbWVzdGFtcAAyMDI0LTEyLTA1VDEyOjAzOjAyKzAwOjAwnARyJwAAAABJRU5ErkJggg==";
|
|
2621
|
-
function Tile({
|
|
2622
|
-
bg,
|
|
2623
|
-
children,
|
|
2624
|
-
fg = "#fff"
|
|
2625
|
-
}) {
|
|
2626
|
-
return /* @__PURE__ */ jsxs10("svg", { viewBox: "0 0 40 40", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
2627
|
-
/* @__PURE__ */ jsx12("rect", { width: "40", height: "40", fill: bg }),
|
|
2628
|
-
/* @__PURE__ */ jsx12("g", { color: fg, children })
|
|
2629
|
-
] });
|
|
2630
|
-
}
|
|
2631
|
-
function Icon({
|
|
2632
|
-
children,
|
|
2633
|
-
x = 8,
|
|
2634
|
-
y = 8,
|
|
2635
|
-
size = 24,
|
|
2636
|
-
viewBox = "0 0 24 24"
|
|
2637
|
-
}) {
|
|
2638
|
-
return /* @__PURE__ */ jsx12("svg", { x, y, width: size, height: size, viewBox, children });
|
|
2639
|
-
}
|
|
2640
|
-
var LOGOS = {
|
|
2641
|
-
coinbase: () => /* @__PURE__ */ jsx12(Tile, { bg: "#0052FF", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, viewBox: "0 0 512 512", children: /* @__PURE__ */ jsx12(
|
|
2642
|
-
"path",
|
|
2643
|
-
{
|
|
2644
|
-
fill: "#fff",
|
|
2645
|
-
d: "M256.737 338.138c-45.081 0-81.512-36.531-81.512-81.513 0-44.98 36.53-81.512 81.512-81.512 40.356 0 73.863 29.387 80.306 67.925h82.113C412.212 159.313 342.175 93.5 256.637 93.5c-90.069 0-163.125 73.063-163.125 163.125 0 90.07 73.056 163.125 163.125 163.125 85.538 0 155.575-65.812 162.519-149.537h-82.213c-6.443 38.537-39.85 67.925-80.206 67.925z"
|
|
2646
|
-
}
|
|
2647
|
-
) }) }),
|
|
2648
|
-
binance: () => /* @__PURE__ */ jsx12(Tile, { bg: "#181A20", children: /* @__PURE__ */ jsx12(Icon, { children: /* @__PURE__ */ jsx12(
|
|
2649
|
-
"path",
|
|
2650
|
-
{
|
|
2651
|
-
fill: "#F0B90B",
|
|
2652
|
-
d: "m16.624 13.920 2.718 2.716-7.353 7.353-7.353-7.353 2.717-2.716 4.636 4.66zm4.637-4.636L24 12l-2.715 2.716L18.568 12zm-9.272.001 2.716 2.691-2.716 2.717L9.272 12zm-9.273-.001L5.409 12l-2.692 2.692L0 12zM11.989.012l7.353 7.329-2.718 2.715-4.635-4.636-4.636 4.66-2.717-2.716z"
|
|
2653
|
-
}
|
|
2654
|
-
) }) }),
|
|
2655
|
-
bitfinex: () => /* @__PURE__ */ jsx12(Tile, { bg: "#101914", children: /* @__PURE__ */ jsxs10(Icon, { x: 5, y: 8, size: 30, viewBox: "780 0 116 100", children: [
|
|
2656
|
-
/* @__PURE__ */ jsx12(
|
|
2657
|
-
"path",
|
|
2658
|
-
{
|
|
2659
|
-
fill: "#97C554",
|
|
2660
|
-
d: "m792.54 88.414c4.795 5.078 31.135 29.418 72.478 1.17C894.913 66.302 894.166 15.827 891.294.584c-1 2.219-35.724 78.26-98.754 87.83Z"
|
|
2661
|
-
}
|
|
2662
|
-
),
|
|
2663
|
-
/* @__PURE__ */ jsx12(
|
|
2664
|
-
"path",
|
|
2665
|
-
{
|
|
2666
|
-
fill: "#709B30",
|
|
2667
|
-
d: "M891.29.572c-.366-.152-38.827-5.395-76.85 19.094-23.61 15.207-26.731 37.464-25.654 52.295 55.273-6.185 101.25-69.646 102.504-71.39Z"
|
|
2668
|
-
}
|
|
2669
|
-
)
|
|
2670
|
-
] }) }),
|
|
2671
|
-
bybit: () => /* @__PURE__ */ jsx12(Tile, { bg: "#16171A", children: /* @__PURE__ */ jsx12(Icon, { x: 4, y: 4, size: 32, children: /* @__PURE__ */ jsxs10("g", { fill: "none", children: [
|
|
2672
|
-
/* @__PURE__ */ jsx12("path", { fill: "#F6A500", d: "M15.829 13.626V9h.93v4.626z" }),
|
|
2673
|
-
/* @__PURE__ */ jsx12(
|
|
2674
|
-
"path",
|
|
2675
|
-
{
|
|
2676
|
-
fill: "#fff",
|
|
2677
|
-
d: "M4.993 15H3v-4.626h1.913c.93 0 1.471.507 1.471 1.3 0 .513-.348.845-.588.955.287.13.655.423.655 1.04 0 .863-.609 1.33-1.458 1.33m-.154-3.82h-.91v1.065h.91c.395 0 .615-.214.615-.533 0-.317-.22-.532-.615-.532m.06 1.877h-.97v1.137h.97c.42 0 .622-.259.622-.571s-.201-.565-.622-.565zm4.388.046V15h-.923v-1.898l-1.431-2.728h1.01l.889 1.864.877-1.864h1.01zM13.355 15h-1.993v-4.626h1.913c.93 0 1.47.507 1.47 1.3 0 .513-.347.845-.588.955.287.13.655.423.655 1.04 0 .863-.608 1.33-1.457 1.33m-.155-3.82h-.91v1.065h.91c.395 0 .616-.214.616-.533 0-.317-.22-.532-.616-.532m.06 1.877h-.97v1.137h.97c.422 0 .622-.259.622-.571s-.2-.565-.622-.565zm6.495-1.876V15h-.929v-3.82h-1.245v-.806H21v.806z"
|
|
2678
|
-
}
|
|
2679
|
-
)
|
|
2680
|
-
] }) }) }),
|
|
2681
|
-
btcturk: () => /* @__PURE__ */ jsx12(Tile, { bg: "#FFFFFF", fg: "#0D0D17", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, children: /* @__PURE__ */ jsx12(
|
|
2682
|
-
"path",
|
|
2683
|
-
{
|
|
2684
|
-
fill: "currentColor",
|
|
2685
|
-
d: "M14.126 18.743c-1.05.742-1.67 1.67-1.38 2.072s1.365.128 2.414-.612 1.667-1.668 1.379-2.072c-.089-.12-.256-.186-.474-.186-.48 0-1.218.29-1.94.798m-5.76-1.584c-2.028.842-3.433 2.088-3.141 2.796.291.709 2.17.607 4.2-.23 2.03-.836 3.428-2.084 3.137-2.797-.13-.317-.576-.47-1.21-.47-.787 0-1.865.24-2.987.701m9.293-.84c-.36.683-.47 1.33-.251 1.44.22.11.685-.345 1.043-1.028s.47-1.33.25-1.44a.15.15 0 0 0-.074-.017c-.24 0-.648.433-.968 1.045m-2.927-1.891c-.695.4-1.058 1.073-.812 1.5s1.008.448 1.703.047c.695-.4 1.057-1.073.811-1.5-.128-.222-.396-.335-.72-.335-.346.01-.684.11-.981.288m2.568-.91c-.202.348-.188.735.03.86.218.127.56-.053.76-.404.202-.35.19-.735-.03-.861a.3.3 0 0 0-.155-.041c-.204 0-.447.17-.6.445m-2.592-1.499c0 .418.384.758.858.758s.858-.34.858-.758c0-.417-.384-.757-.858-.757s-.858.339-.858.757m-5.728 0c0 .938 1.057 1.697 2.361 1.697s2.36-.755 2.36-1.697-1.055-1.698-2.36-1.698-2.361.761-2.361 1.698m8.369-2.4c-.218.12-.232.513-.03.862.201.35.541.531.76.404.22-.127.232-.51.03-.861-.158-.274-.401-.446-.6-.446a.3.3 0 0 0-.155.041m-3.413-1.545c-.24.427.12 1.099.811 1.5.691.4 1.457.38 1.703-.047s-.12-1.098-.811-1.5a2 2 0 0 0-.983-.287c-.325 0-.593.112-.72.334m3.456-1.833c-.218.12-.107.762.25 1.44.358.678.825 1.144 1.045 1.029.22-.116.105-.762-.252-1.44-.32-.612-.73-1.046-.969-1.046a.2.2 0 0 0-.074.017M5.225 4.05c-.292.708 1.115 1.96 3.14 2.797s3.902.94 4.197.233-1.115-1.962-3.14-2.798c-1.123-.464-2.196-.702-2.988-.702-.633 0-1.08.154-1.21.47m7.51-.864c-.284.403.337 1.33 1.386 2.071s2.13 1.016 2.413.612c.283-.403-.336-1.33-1.387-2.071C14.427 3.289 13.692 3 13.21 3c-.219 0-.385.06-.48.186"
|
|
2686
|
-
}
|
|
2687
|
-
) }) }),
|
|
2688
|
-
gate: () => /* @__PURE__ */ jsx12(Tile, { bg: "#FFFFFF", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, children: /* @__PURE__ */ jsxs10("g", { fill: "none", children: [
|
|
2689
|
-
/* @__PURE__ */ jsx12("path", { fill: "#2354E6", d: "M12 16.95a4.95 4.95 0 1 1 0-9.9V3a9 9 0 1 0 9 9h-4.05A4.95 4.95 0 0 1 12 16.95" }),
|
|
2690
|
-
/* @__PURE__ */ jsx12("path", { fill: "#17E6A1", d: "M16.95 7.05H12V12h4.95z" })
|
|
2691
|
-
] }) }) }),
|
|
2692
|
-
gateio: () => LOGOS.gate(),
|
|
2693
|
-
htx: () => /* @__PURE__ */ jsxs10("svg", { viewBox: "0 0 40 40", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: [
|
|
2694
|
-
/* @__PURE__ */ jsx12("rect", { width: "40", height: "40", fill: "#fff" }),
|
|
2695
|
-
/* @__PURE__ */ jsx12("image", { href: HTX_LOGO_DATA_URI, x: "3", y: "12", width: "34", height: "13.1", preserveAspectRatio: "xMidYMid meet" })
|
|
2696
|
-
] }),
|
|
2697
|
-
kraken: () => /* @__PURE__ */ jsx12(Tile, { bg: "#7133F5", children: /* @__PURE__ */ jsx12(Icon, { x: 6, y: 6, size: 28, children: /* @__PURE__ */ jsx12(
|
|
2698
|
-
"path",
|
|
2699
|
-
{
|
|
2700
|
-
fill: "#fff",
|
|
2701
|
-
d: "M11.998 4.5C7.028 4.5 3 8.774 3 14.047v4.09c0 .753.575 1.363 1.285 1.363s1.288-.61 1.288-1.362v-4.091c0-.755.573-1.365 1.285-1.365.71 0 1.284.61 1.284 1.365v4.09c0 .753.575 1.363 1.285 1.363.712 0 1.286-.61 1.286-1.362v-4.091c0-.755.575-1.365 1.285-1.365.712 0 1.289.61 1.289 1.365v4.09c0 .753.574 1.363 1.284 1.363s1.285-.61 1.285-1.362v-4.091c0-.755.574-1.365 1.288-1.365.71 0 1.285.61 1.285 1.365v4.09c0 .753.575 1.363 1.287 1.363.71 0 1.284-.61 1.284-1.362v-4.091C21 8.774 16.97 4.5 11.998 4.5"
|
|
2702
|
-
}
|
|
2703
|
-
) }) }),
|
|
2704
|
-
kucoin: () => /* @__PURE__ */ jsx12(Tile, { bg: "#01BC8D", children: /* @__PURE__ */ jsx12(Icon, { x: 7, y: 7, size: 26, children: /* @__PURE__ */ jsx12(
|
|
2705
|
-
"path",
|
|
2706
|
-
{
|
|
2707
|
-
fill: "#fff",
|
|
2708
|
-
d: "m7.928 11.996 7.122 7.122 4.49-4.49a2.004 2.004 0 0 1 2.865 0 2.004 2.004 0 0 1 0 2.865l-5.918 5.918a2.058 2.058 0 0 1-2.883 0l-8.541-8.542v5.07a2.034 2.034 0 1 1-4.07 0V4.043a2.034 2.034 0 1 1 4.07 0v5.088L13.604.589a2.058 2.058 0 0 1 2.883 0l5.918 5.918c.785.803.785 2.088 0 2.865-.804.785-2.089.785-2.865 0l-4.49-4.49zM15.05 9.96a2.038 2.038 0 0 0-2.053 2.035c0 1.133.902 2.052 2.035 2.052a2.038 2.038 0 0 0 2.053-2.035v-.018a2.07 2.07 0 0 0-2.035-2.034z"
|
|
2709
|
-
}
|
|
2710
|
-
) }) })
|
|
2711
|
-
};
|
|
2712
|
-
function normalize(value) {
|
|
2713
|
-
return value.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
2714
|
-
}
|
|
2715
|
-
function getExchangeLogo(name, connection) {
|
|
2716
|
-
const render = LOGOS[normalize(name)] ?? LOGOS[normalize(connection ?? "")];
|
|
2717
|
-
return render ? render() : null;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
// src/components/steps/ExchangeSelectStep.tsx
|
|
2721
|
-
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2722
2612
|
function ExchangeLogo({ exchange }) {
|
|
2723
2613
|
const [failed, setFailed] = useState7(false);
|
|
2724
2614
|
if (!exchange.logoUrl || failed) {
|
|
2725
|
-
return /* @__PURE__ */
|
|
2615
|
+
return /* @__PURE__ */ jsx12(BankIcon, {});
|
|
2726
2616
|
}
|
|
2727
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ jsx12(
|
|
2728
2618
|
"img",
|
|
2729
2619
|
{
|
|
2730
2620
|
src: exchange.logoUrl,
|
|
@@ -2765,20 +2655,20 @@ function ExchangeSelectStep({
|
|
|
2765
2655
|
cancelled = true;
|
|
2766
2656
|
};
|
|
2767
2657
|
}, [service, retryToken, onError]);
|
|
2768
|
-
return /* @__PURE__ */
|
|
2769
|
-
/* @__PURE__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
2658
|
+
return /* @__PURE__ */ jsxs10("div", { className: "rs-screen rs-exchange-select", children: [
|
|
2659
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2660
|
+
/* @__PURE__ */ jsx12(
|
|
2771
2661
|
BodyHeader,
|
|
2772
2662
|
{
|
|
2773
|
-
icon: /* @__PURE__ */
|
|
2663
|
+
icon: /* @__PURE__ */ jsx12(UnplugIcon, {}),
|
|
2774
2664
|
title: "Connect exchange",
|
|
2775
2665
|
subtitle: "Select an exchange to connect"
|
|
2776
2666
|
}
|
|
2777
2667
|
),
|
|
2778
|
-
loading && /* @__PURE__ */
|
|
2779
|
-
!loading && error && /* @__PURE__ */
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
/* @__PURE__ */
|
|
2668
|
+
loading && /* @__PURE__ */ jsx12("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ jsx12(Spinner, {}) }),
|
|
2669
|
+
!loading && error && /* @__PURE__ */ jsxs10("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2670
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
2671
|
+
/* @__PURE__ */ jsx12(
|
|
2782
2672
|
"button",
|
|
2783
2673
|
{
|
|
2784
2674
|
type: "button",
|
|
@@ -2788,9 +2678,9 @@ function ExchangeSelectStep({
|
|
|
2788
2678
|
}
|
|
2789
2679
|
)
|
|
2790
2680
|
] }),
|
|
2791
|
-
!loading && !error && exchanges.length === 0 && /* @__PURE__ */
|
|
2792
|
-
/* @__PURE__ */
|
|
2793
|
-
/* @__PURE__ */
|
|
2681
|
+
!loading && !error && exchanges.length === 0 && /* @__PURE__ */ jsxs10("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2682
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-exchange-select-state-title", children: "No exchanges available" }),
|
|
2683
|
+
/* @__PURE__ */ jsx12(
|
|
2794
2684
|
"button",
|
|
2795
2685
|
{
|
|
2796
2686
|
type: "button",
|
|
@@ -2800,9 +2690,9 @@ function ExchangeSelectStep({
|
|
|
2800
2690
|
}
|
|
2801
2691
|
)
|
|
2802
2692
|
] }),
|
|
2803
|
-
!loading && !error && exchanges.length > 0 && /* @__PURE__ */
|
|
2693
|
+
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ jsx12("div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
2804
2694
|
const brand = getExchangeLogo(exchange.name, exchange.connection);
|
|
2805
|
-
return /* @__PURE__ */
|
|
2695
|
+
return /* @__PURE__ */ jsxs10(
|
|
2806
2696
|
"button",
|
|
2807
2697
|
{
|
|
2808
2698
|
type: "button",
|
|
@@ -2810,27 +2700,27 @@ function ExchangeSelectStep({
|
|
|
2810
2700
|
onClick: () => onSelectExchange(exchange.connection),
|
|
2811
2701
|
"aria-label": `Select ${exchange.name}`,
|
|
2812
2702
|
children: [
|
|
2813
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ jsx12(
|
|
2814
2704
|
"span",
|
|
2815
2705
|
{
|
|
2816
2706
|
className: `rs-exchange-card-logo${brand ? " rs-exchange-card-logo--brand" : ""}`,
|
|
2817
|
-
children: brand ?? /* @__PURE__ */
|
|
2707
|
+
children: brand ?? /* @__PURE__ */ jsx12(ExchangeLogo, { exchange })
|
|
2818
2708
|
}
|
|
2819
2709
|
),
|
|
2820
|
-
/* @__PURE__ */
|
|
2710
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-exchange-card-name", children: exchange.name })
|
|
2821
2711
|
]
|
|
2822
2712
|
},
|
|
2823
2713
|
exchange.connection
|
|
2824
2714
|
);
|
|
2825
2715
|
}) })
|
|
2826
2716
|
] }),
|
|
2827
|
-
/* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ jsx12(PoweredBy, {})
|
|
2828
2718
|
] });
|
|
2829
2719
|
}
|
|
2830
2720
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
2831
2721
|
|
|
2832
2722
|
// src/components/steps/DepositAddressSkeleton.tsx
|
|
2833
|
-
import { jsx as
|
|
2723
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2834
2724
|
var BASE_CHAIN_ID = 8453;
|
|
2835
2725
|
function DepositAddressSkeleton({
|
|
2836
2726
|
uiConfig,
|
|
@@ -2851,15 +2741,15 @@ function DepositAddressSkeleton({
|
|
|
2851
2741
|
const chainName = getChainName(defaultChainId);
|
|
2852
2742
|
const chainIcon = getChainIcon(defaultChainId);
|
|
2853
2743
|
const tokenIcon = getTokenIcon(defaultToken);
|
|
2854
|
-
return /* @__PURE__ */
|
|
2855
|
-
/* @__PURE__ */
|
|
2856
|
-
/* @__PURE__ */
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
/* @__PURE__ */
|
|
2859
|
-
/* @__PURE__ */
|
|
2860
|
-
/* @__PURE__ */
|
|
2861
|
-
/* @__PURE__ */
|
|
2862
|
-
chainIcon && /* @__PURE__ */
|
|
2744
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2745
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2746
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body", children: [
|
|
2747
|
+
/* @__PURE__ */ jsx13(BodyHeader, { icon: /* @__PURE__ */ jsx13(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2748
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2749
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown", children: [
|
|
2750
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2751
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2752
|
+
chainIcon && /* @__PURE__ */ jsx13(
|
|
2863
2753
|
"img",
|
|
2864
2754
|
{
|
|
2865
2755
|
src: chainIcon,
|
|
@@ -2867,17 +2757,17 @@ function DepositAddressSkeleton({
|
|
|
2867
2757
|
className: "rs-deposit-address-dropdown-icon"
|
|
2868
2758
|
}
|
|
2869
2759
|
),
|
|
2870
|
-
/* @__PURE__ */
|
|
2871
|
-
/* @__PURE__ */
|
|
2760
|
+
/* @__PURE__ */ jsx13("span", { children: chainName }),
|
|
2761
|
+
/* @__PURE__ */ jsx13(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2872
2762
|
] })
|
|
2873
2763
|
] }),
|
|
2874
|
-
/* @__PURE__ */
|
|
2875
|
-
/* @__PURE__ */
|
|
2876
|
-
/* @__PURE__ */
|
|
2877
|
-
/* @__PURE__ */
|
|
2764
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown", children: [
|
|
2765
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
2766
|
+
/* @__PURE__ */ jsx13("span", { children: "Supported token" }),
|
|
2767
|
+
/* @__PURE__ */ jsxs11("span", { className: "rs-deposit-address-min", children: [
|
|
2878
2768
|
"Min.$",
|
|
2879
2769
|
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
2880
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ jsx13(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx13(
|
|
2881
2771
|
InfoIcon,
|
|
2882
2772
|
{
|
|
2883
2773
|
className: "rs-deposit-address-min-icon",
|
|
@@ -2886,8 +2776,8 @@ function DepositAddressSkeleton({
|
|
|
2886
2776
|
) })
|
|
2887
2777
|
] })
|
|
2888
2778
|
] }),
|
|
2889
|
-
/* @__PURE__ */
|
|
2890
|
-
tokenIcon && /* @__PURE__ */
|
|
2779
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2780
|
+
tokenIcon && /* @__PURE__ */ jsx13(
|
|
2891
2781
|
"img",
|
|
2892
2782
|
{
|
|
2893
2783
|
src: tokenIcon,
|
|
@@ -2895,21 +2785,21 @@ function DepositAddressSkeleton({
|
|
|
2895
2785
|
className: "rs-deposit-address-dropdown-icon"
|
|
2896
2786
|
}
|
|
2897
2787
|
),
|
|
2898
|
-
/* @__PURE__ */
|
|
2899
|
-
/* @__PURE__ */
|
|
2788
|
+
/* @__PURE__ */ jsx13("span", { children: defaultToken }),
|
|
2789
|
+
/* @__PURE__ */ jsx13(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2900
2790
|
] })
|
|
2901
2791
|
] })
|
|
2902
2792
|
] }),
|
|
2903
|
-
/* @__PURE__ */
|
|
2793
|
+
/* @__PURE__ */ jsxs11(
|
|
2904
2794
|
"div",
|
|
2905
2795
|
{
|
|
2906
2796
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
2907
2797
|
children: [
|
|
2908
|
-
/* @__PURE__ */
|
|
2909
|
-
/* @__PURE__ */
|
|
2910
|
-
/* @__PURE__ */
|
|
2798
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-deposit-address-well", children: [
|
|
2799
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx13("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
2800
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
2911
2801
|
] }),
|
|
2912
|
-
/* @__PURE__ */
|
|
2802
|
+
/* @__PURE__ */ jsxs11(
|
|
2913
2803
|
"button",
|
|
2914
2804
|
{
|
|
2915
2805
|
type: "button",
|
|
@@ -2917,7 +2807,7 @@ function DepositAddressSkeleton({
|
|
|
2917
2807
|
disabled: true,
|
|
2918
2808
|
"aria-hidden": "true",
|
|
2919
2809
|
children: [
|
|
2920
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ jsx13(CopyIcon, {}),
|
|
2921
2811
|
"Copy address"
|
|
2922
2812
|
]
|
|
2923
2813
|
}
|
|
@@ -2925,20 +2815,20 @@ function DepositAddressSkeleton({
|
|
|
2925
2815
|
]
|
|
2926
2816
|
}
|
|
2927
2817
|
),
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
/* @__PURE__ */
|
|
2932
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs11("div", { className: "rs-price-impact-header", children: [
|
|
2819
|
+
/* @__PURE__ */ jsxs11("span", { className: "rs-price-impact-header-left", children: [
|
|
2820
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2821
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx13("strong", { children: "0.00%" }) }),
|
|
2822
|
+
/* @__PURE__ */ jsx13(
|
|
2933
2823
|
Tooltip,
|
|
2934
2824
|
{
|
|
2935
2825
|
className: "rs-price-impact-info",
|
|
2936
2826
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2937
|
-
children: /* @__PURE__ */
|
|
2827
|
+
children: /* @__PURE__ */ jsx13(InfoIcon, { "aria-hidden": "true" })
|
|
2938
2828
|
}
|
|
2939
2829
|
)
|
|
2940
2830
|
] }),
|
|
2941
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ jsx13(
|
|
2942
2832
|
ChevronDownIcon,
|
|
2943
2833
|
{
|
|
2944
2834
|
className: "rs-price-impact-chevron",
|
|
@@ -2947,7 +2837,7 @@ function DepositAddressSkeleton({
|
|
|
2947
2837
|
)
|
|
2948
2838
|
] }) })
|
|
2949
2839
|
] }),
|
|
2950
|
-
/* @__PURE__ */
|
|
2840
|
+
/* @__PURE__ */ jsx13(PoweredBy, {})
|
|
2951
2841
|
] });
|
|
2952
2842
|
}
|
|
2953
2843
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2955,7 +2845,7 @@ DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
|
2955
2845
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
2956
2846
|
import { useState as useState8, useEffect as useEffect8, useMemo as useMemo5 } from "react";
|
|
2957
2847
|
import { formatUnits as formatUnits4 } from "viem";
|
|
2958
|
-
import { jsx as
|
|
2848
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2959
2849
|
function SolanaTokenSelectStep({
|
|
2960
2850
|
solanaAddress,
|
|
2961
2851
|
service,
|
|
@@ -3061,30 +2951,30 @@ function SolanaTokenSelectStep({
|
|
|
3061
2951
|
};
|
|
3062
2952
|
const chainIcon = getChainIcon("solana");
|
|
3063
2953
|
const chainName = getChainName("solana");
|
|
3064
|
-
return /* @__PURE__ */
|
|
3065
|
-
/* @__PURE__ */
|
|
3066
|
-
/* @__PURE__ */
|
|
2954
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-screen", children: [
|
|
2955
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-screen-body", children: [
|
|
2956
|
+
/* @__PURE__ */ jsx14(
|
|
3067
2957
|
BodyHeader,
|
|
3068
2958
|
{
|
|
3069
|
-
icon: /* @__PURE__ */
|
|
2959
|
+
icon: /* @__PURE__ */ jsx14(WalletIcon, {}),
|
|
3070
2960
|
title: "Your assets",
|
|
3071
2961
|
subtitle: "Select source assets to transfer"
|
|
3072
2962
|
}
|
|
3073
2963
|
),
|
|
3074
|
-
loading && /* @__PURE__ */
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
2964
|
+
loading && /* @__PURE__ */ jsxs12("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
2965
|
+
/* @__PURE__ */ jsx14(Spinner, { className: "rs-text-tertiary" }),
|
|
2966
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
3077
2967
|
] }),
|
|
3078
|
-
error && /* @__PURE__ */
|
|
3079
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3081
|
-
/* @__PURE__ */
|
|
3082
|
-
/* @__PURE__ */
|
|
2968
|
+
error && /* @__PURE__ */ jsx14(Callout, { variant: "error", children: error }),
|
|
2969
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs12("div", { className: "rs-empty-state", children: [
|
|
2970
|
+
/* @__PURE__ */ jsx14(WalletIcon, { className: "rs-empty-icon" }),
|
|
2971
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
2972
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-empty-address", children: [
|
|
3083
2973
|
solanaAddress.slice(0, 6),
|
|
3084
2974
|
"...",
|
|
3085
2975
|
solanaAddress.slice(-4)
|
|
3086
2976
|
] }),
|
|
3087
|
-
onDisconnect && /* @__PURE__ */
|
|
2977
|
+
onDisconnect && /* @__PURE__ */ jsx14(
|
|
3088
2978
|
"button",
|
|
3089
2979
|
{
|
|
3090
2980
|
type: "button",
|
|
@@ -3094,11 +2984,11 @@ function SolanaTokenSelectStep({
|
|
|
3094
2984
|
}
|
|
3095
2985
|
)
|
|
3096
2986
|
] }),
|
|
3097
|
-
!loading && !error && rows.length > 0 && /* @__PURE__ */
|
|
2987
|
+
!loading && !error && rows.length > 0 && /* @__PURE__ */ jsx14("div", { className: "rs-asset-list", children: rows.map((entry) => {
|
|
3098
2988
|
const isSelected = selectedSymbol === entry.token.symbol;
|
|
3099
2989
|
const tokenAmount = formatBalance(entry);
|
|
3100
2990
|
const tokenIcon = getTokenIcon(entry.token.symbol);
|
|
3101
|
-
return /* @__PURE__ */
|
|
2991
|
+
return /* @__PURE__ */ jsxs12(
|
|
3102
2992
|
"button",
|
|
3103
2993
|
{
|
|
3104
2994
|
type: "button",
|
|
@@ -3106,33 +2996,33 @@ function SolanaTokenSelectStep({
|
|
|
3106
2996
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
3107
2997
|
"aria-pressed": isSelected,
|
|
3108
2998
|
children: [
|
|
3109
|
-
/* @__PURE__ */
|
|
3110
|
-
/* @__PURE__ */
|
|
3111
|
-
tokenIcon ? /* @__PURE__ */
|
|
3112
|
-
chainIcon && /* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-info", children: [
|
|
3000
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3001
|
+
tokenIcon ? /* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx14("img", { src: tokenIcon, alt: entry.token.symbol }) }) : /* @__PURE__ */ jsx14("span", { className: "rs-asset-icon", children: entry.token.symbol.slice(0, 4) }),
|
|
3002
|
+
chainIcon && /* @__PURE__ */ jsx14("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx14("img", { src: chainIcon, alt: chainName }) })
|
|
3113
3003
|
] }),
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
/* @__PURE__ */
|
|
3117
|
-
/* @__PURE__ */
|
|
3004
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-text", children: [
|
|
3005
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-name-row", children: [
|
|
3006
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-asset-name", children: entry.token.symbol }),
|
|
3007
|
+
/* @__PURE__ */ jsxs12("span", { className: "rs-asset-chain", children: [
|
|
3118
3008
|
"on ",
|
|
3119
3009
|
chainName
|
|
3120
3010
|
] })
|
|
3121
3011
|
] }),
|
|
3122
|
-
/* @__PURE__ */
|
|
3012
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-asset-balance-small", children: [
|
|
3123
3013
|
tokenAmount,
|
|
3124
3014
|
" ",
|
|
3125
3015
|
entry.token.symbol
|
|
3126
3016
|
] })
|
|
3127
3017
|
] })
|
|
3128
3018
|
] }),
|
|
3129
|
-
/* @__PURE__ */
|
|
3019
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
3130
3020
|
]
|
|
3131
3021
|
},
|
|
3132
3022
|
entry.token.symbol
|
|
3133
3023
|
);
|
|
3134
3024
|
}) }),
|
|
3135
|
-
/* @__PURE__ */
|
|
3025
|
+
/* @__PURE__ */ jsx14(
|
|
3136
3026
|
Button,
|
|
3137
3027
|
{
|
|
3138
3028
|
onClick: () => selectedEntry && onContinue(
|
|
@@ -3146,14 +3036,14 @@ function SolanaTokenSelectStep({
|
|
|
3146
3036
|
}
|
|
3147
3037
|
)
|
|
3148
3038
|
] }),
|
|
3149
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ jsx14(PoweredBy, {})
|
|
3150
3040
|
] });
|
|
3151
3041
|
}
|
|
3152
3042
|
|
|
3153
3043
|
// src/components/steps/SolanaAmountStep.tsx
|
|
3154
3044
|
import { useCallback as useCallback6, useEffect as useEffect9, useMemo as useMemo6, useRef as useRef7, useState as useState9 } from "react";
|
|
3155
3045
|
import { formatUnits as formatUnits5, parseUnits as parseUnits3 } from "viem";
|
|
3156
|
-
import { Fragment as Fragment2, jsx as
|
|
3046
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3157
3047
|
var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
|
|
3158
3048
|
var PRESETS2 = [
|
|
3159
3049
|
{ value: 25, label: "25%" },
|
|
@@ -3354,12 +3244,12 @@ function SolanaAmountStep({
|
|
|
3354
3244
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
3355
3245
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
3356
3246
|
const sourceTokenIcon = getTokenIcon(token.symbol);
|
|
3357
|
-
return /* @__PURE__ */
|
|
3358
|
-
/* @__PURE__ */
|
|
3359
|
-
/* @__PURE__ */
|
|
3360
|
-
/* @__PURE__ */
|
|
3361
|
-
/* @__PURE__ */
|
|
3362
|
-
/* @__PURE__ */
|
|
3247
|
+
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen", children: [
|
|
3248
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3249
|
+
/* @__PURE__ */ jsx15(BodyHeader, { icon: /* @__PURE__ */ jsx15(WalletIcon, {}), title: "Wallet deposit" }),
|
|
3250
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-section", children: [
|
|
3251
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-display", children: [
|
|
3252
|
+
/* @__PURE__ */ jsx15(
|
|
3363
3253
|
AnimatedAmountInput,
|
|
3364
3254
|
{
|
|
3365
3255
|
value: amount,
|
|
@@ -3368,25 +3258,25 @@ function SolanaAmountStep({
|
|
|
3368
3258
|
autoFocus: true
|
|
3369
3259
|
}
|
|
3370
3260
|
),
|
|
3371
|
-
/* @__PURE__ */
|
|
3372
|
-
/* @__PURE__ */
|
|
3261
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-meta", children: [
|
|
3262
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-meta-balance", children: [
|
|
3373
3263
|
formattedBalance,
|
|
3374
3264
|
" ",
|
|
3375
3265
|
token.symbol,
|
|
3376
3266
|
" available",
|
|
3377
|
-
computedBalanceUsd !== null && /* @__PURE__ */
|
|
3267
|
+
computedBalanceUsd !== null && /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
3378
3268
|
" (~",
|
|
3379
3269
|
currencyFormatter.format(computedBalanceUsd),
|
|
3380
3270
|
")"
|
|
3381
3271
|
] })
|
|
3382
3272
|
] }),
|
|
3383
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
3273
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs13("span", { className: "rs-amount-meta-minimum", children: [
|
|
3384
3274
|
"Min. deposit ",
|
|
3385
3275
|
currencyFormatter.format(minDepositUsd)
|
|
3386
3276
|
] })
|
|
3387
3277
|
] })
|
|
3388
3278
|
] }),
|
|
3389
|
-
/* @__PURE__ */
|
|
3279
|
+
/* @__PURE__ */ jsx15("div", { className: "rs-amount-presets", children: PRESETS2.map((preset) => /* @__PURE__ */ jsx15(
|
|
3390
3280
|
"button",
|
|
3391
3281
|
{
|
|
3392
3282
|
type: "button",
|
|
@@ -3397,36 +3287,36 @@ function SolanaAmountStep({
|
|
|
3397
3287
|
preset.value
|
|
3398
3288
|
)) })
|
|
3399
3289
|
] }),
|
|
3400
|
-
/* @__PURE__ */
|
|
3401
|
-
/* @__PURE__ */
|
|
3402
|
-
/* @__PURE__ */
|
|
3403
|
-
/* @__PURE__ */
|
|
3404
|
-
/* @__PURE__ */
|
|
3290
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-details", children: [
|
|
3291
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
3292
|
+
/* @__PURE__ */ jsx15("span", { children: "You send" }),
|
|
3293
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-detail-value", children: [
|
|
3294
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
3405
3295
|
"Solana ",
|
|
3406
3296
|
token.symbol
|
|
3407
3297
|
] }),
|
|
3408
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
3298
|
+
sourceTokenIcon && /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15("img", { src: sourceTokenIcon, alt: "" }) })
|
|
3409
3299
|
] })
|
|
3410
3300
|
] }),
|
|
3411
|
-
targetChainName && targetTokenSymbol && /* @__PURE__ */
|
|
3412
|
-
/* @__PURE__ */
|
|
3413
|
-
/* @__PURE__ */
|
|
3414
|
-
/* @__PURE__ */
|
|
3301
|
+
targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
3302
|
+
/* @__PURE__ */ jsx15("span", { children: "Receive" }),
|
|
3303
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-detail-value", children: [
|
|
3304
|
+
/* @__PURE__ */ jsxs13("span", { children: [
|
|
3415
3305
|
targetChainName,
|
|
3416
3306
|
" ",
|
|
3417
3307
|
targetTokenSymbol
|
|
3418
3308
|
] }),
|
|
3419
|
-
targetTokenIcon && /* @__PURE__ */
|
|
3309
|
+
targetTokenIcon && /* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx15("img", { src: targetTokenIcon, alt: "" }) })
|
|
3420
3310
|
] })
|
|
3421
3311
|
] }),
|
|
3422
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
3423
|
-
/* @__PURE__ */
|
|
3424
|
-
/* @__PURE__ */
|
|
3312
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
3313
|
+
/* @__PURE__ */ jsx15("span", { children: "Balance after deposit" }),
|
|
3314
|
+
/* @__PURE__ */ jsx15("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
3425
3315
|
] })
|
|
3426
3316
|
] }),
|
|
3427
|
-
targetChain === HYPERCORE_CHAIN_ID && /* @__PURE__ */
|
|
3428
|
-
error && /* @__PURE__ */
|
|
3429
|
-
/* @__PURE__ */
|
|
3317
|
+
targetChain === HYPERCORE_CHAIN_ID && /* @__PURE__ */ jsx15(Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
3318
|
+
error && /* @__PURE__ */ jsx15(Callout, { variant: "error", children: error }),
|
|
3319
|
+
/* @__PURE__ */ jsx15(
|
|
3430
3320
|
Button,
|
|
3431
3321
|
{
|
|
3432
3322
|
onClick: handleContinue,
|
|
@@ -3436,7 +3326,7 @@ function SolanaAmountStep({
|
|
|
3436
3326
|
}
|
|
3437
3327
|
)
|
|
3438
3328
|
] }),
|
|
3439
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx15(PoweredBy, {})
|
|
3440
3330
|
] });
|
|
3441
3331
|
}
|
|
3442
3332
|
|
|
@@ -3549,7 +3439,7 @@ async function sendSolanaTransaction(provider, _connection, transaction) {
|
|
|
3549
3439
|
}
|
|
3550
3440
|
|
|
3551
3441
|
// src/components/steps/SolanaConfirmStep.tsx
|
|
3552
|
-
import { jsx as
|
|
3442
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3553
3443
|
function SolanaConfirmStep({
|
|
3554
3444
|
smartAccount,
|
|
3555
3445
|
solanaAddress,
|
|
@@ -3593,7 +3483,7 @@ function SolanaConfirmStep({
|
|
|
3593
3483
|
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
|
|
3594
3484
|
});
|
|
3595
3485
|
if (estimate !== void 0) return estimate;
|
|
3596
|
-
return
|
|
3486
|
+
return targetSymbol;
|
|
3597
3487
|
})();
|
|
3598
3488
|
const handleConfirm = async () => {
|
|
3599
3489
|
if (!solanaProvider) {
|
|
@@ -3684,62 +3574,62 @@ function SolanaConfirmStep({
|
|
|
3684
3574
|
setIsSubmitting(false);
|
|
3685
3575
|
}
|
|
3686
3576
|
};
|
|
3687
|
-
return /* @__PURE__ */
|
|
3688
|
-
/* @__PURE__ */
|
|
3689
|
-
/* @__PURE__ */
|
|
3690
|
-
/* @__PURE__ */
|
|
3691
|
-
/* @__PURE__ */
|
|
3692
|
-
/* @__PURE__ */
|
|
3693
|
-
/* @__PURE__ */
|
|
3694
|
-
/* @__PURE__ */
|
|
3695
|
-
sourceChainIcon && /* @__PURE__ */
|
|
3577
|
+
return /* @__PURE__ */ jsxs14("div", { className: "rs-screen", children: [
|
|
3578
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3579
|
+
/* @__PURE__ */ jsx16(BodyHeader, { icon: /* @__PURE__ */ jsx16(WalletIcon, {}), title: "Review deposit" }),
|
|
3580
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-details", children: [
|
|
3581
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3582
|
+
/* @__PURE__ */ jsx16("span", { children: "Source chain" }),
|
|
3583
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3584
|
+
/* @__PURE__ */ jsx16("span", { children: sourceChainName }),
|
|
3585
|
+
sourceChainIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: sourceChainIcon, alt: "" }) })
|
|
3696
3586
|
] })
|
|
3697
3587
|
] }),
|
|
3698
|
-
/* @__PURE__ */
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3702
|
-
targetChainIcon && /* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3589
|
+
/* @__PURE__ */ jsx16("span", { children: "Destination chain" }),
|
|
3590
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3591
|
+
/* @__PURE__ */ jsx16("span", { children: targetChainName }),
|
|
3592
|
+
targetChainIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: targetChainIcon, alt: "" }) })
|
|
3703
3593
|
] })
|
|
3704
3594
|
] }),
|
|
3705
|
-
/* @__PURE__ */
|
|
3706
|
-
/* @__PURE__ */
|
|
3707
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3596
|
+
/* @__PURE__ */ jsx16("span", { children: "Estimated time" }),
|
|
3597
|
+
/* @__PURE__ */ jsx16("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
3708
3598
|
] }),
|
|
3709
|
-
/* @__PURE__ */
|
|
3710
|
-
/* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3712
|
-
/* @__PURE__ */
|
|
3599
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3600
|
+
/* @__PURE__ */ jsx16("span", { children: "You send" }),
|
|
3601
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3602
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
3713
3603
|
formattedAmount,
|
|
3714
3604
|
" ",
|
|
3715
3605
|
token.symbol
|
|
3716
3606
|
] }),
|
|
3717
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
3607
|
+
sourceTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: sourceTokenIcon, alt: "" }) })
|
|
3718
3608
|
] })
|
|
3719
3609
|
] }),
|
|
3720
|
-
/* @__PURE__ */
|
|
3721
|
-
/* @__PURE__ */
|
|
3722
|
-
/* @__PURE__ */
|
|
3723
|
-
/* @__PURE__ */
|
|
3724
|
-
targetTokenIcon && /* @__PURE__ */
|
|
3610
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3611
|
+
/* @__PURE__ */ jsx16("span", { children: "Receive" }),
|
|
3612
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3613
|
+
/* @__PURE__ */ jsx16("span", { children: receiveDisplay }),
|
|
3614
|
+
targetTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: targetTokenIcon, alt: "" }) })
|
|
3725
3615
|
] })
|
|
3726
3616
|
] }),
|
|
3727
|
-
/* @__PURE__ */
|
|
3728
|
-
/* @__PURE__ */
|
|
3729
|
-
/* @__PURE__ */
|
|
3730
|
-
/* @__PURE__ */
|
|
3617
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-review-detail-row", children: [
|
|
3618
|
+
/* @__PURE__ */ jsx16("span", { children: "Fees" }),
|
|
3619
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-review-detail-value", children: [
|
|
3620
|
+
/* @__PURE__ */ jsx16(
|
|
3731
3621
|
"span",
|
|
3732
3622
|
{
|
|
3733
3623
|
style: feeSponsored ? { textDecoration: "line-through" } : void 0,
|
|
3734
3624
|
children: "$0.04"
|
|
3735
3625
|
}
|
|
3736
3626
|
),
|
|
3737
|
-
/* @__PURE__ */
|
|
3627
|
+
/* @__PURE__ */ jsx16(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx16("span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ jsx16(InfoIcon, {}) }) })
|
|
3738
3628
|
] })
|
|
3739
3629
|
] })
|
|
3740
3630
|
] }),
|
|
3741
|
-
error && /* @__PURE__ */
|
|
3742
|
-
/* @__PURE__ */
|
|
3631
|
+
error && /* @__PURE__ */ jsx16(Callout, { variant: "error", children: error }),
|
|
3632
|
+
/* @__PURE__ */ jsx16(
|
|
3743
3633
|
Button,
|
|
3744
3634
|
{
|
|
3745
3635
|
onClick: handleConfirm,
|
|
@@ -3751,28 +3641,28 @@ function SolanaConfirmStep({
|
|
|
3751
3641
|
}
|
|
3752
3642
|
)
|
|
3753
3643
|
] }),
|
|
3754
|
-
/* @__PURE__ */
|
|
3644
|
+
/* @__PURE__ */ jsx16(PoweredBy, {})
|
|
3755
3645
|
] });
|
|
3756
3646
|
}
|
|
3757
3647
|
|
|
3758
3648
|
// src/components/steps/DappImportAssetSelectStep.tsx
|
|
3759
|
-
import { jsx as
|
|
3649
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3760
3650
|
function DappImportAssetSelectStep({
|
|
3761
3651
|
sourceLabel,
|
|
3762
3652
|
assets,
|
|
3763
3653
|
onSelect
|
|
3764
3654
|
}) {
|
|
3765
|
-
return /* @__PURE__ */
|
|
3766
|
-
/* @__PURE__ */
|
|
3767
|
-
/* @__PURE__ */
|
|
3655
|
+
return /* @__PURE__ */ jsxs15("div", { className: "rs-screen", children: [
|
|
3656
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3657
|
+
/* @__PURE__ */ jsx17(
|
|
3768
3658
|
BodyHeader,
|
|
3769
3659
|
{
|
|
3770
|
-
icon: /* @__PURE__ */
|
|
3660
|
+
icon: /* @__PURE__ */ jsx17(WalletIcon, {}),
|
|
3771
3661
|
title: `Transfer from ${sourceLabel}`,
|
|
3772
3662
|
subtitle: "Pick the balance to import"
|
|
3773
3663
|
}
|
|
3774
3664
|
),
|
|
3775
|
-
/* @__PURE__ */
|
|
3665
|
+
/* @__PURE__ */ jsx17("div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
3776
3666
|
const tokenAmount = asset.balance ? tokenFormatter.format(
|
|
3777
3667
|
Number(asset.balance) / 10 ** asset.decimals
|
|
3778
3668
|
) : "0";
|
|
@@ -3780,23 +3670,23 @@ function DappImportAssetSelectStep({
|
|
|
3780
3670
|
const tokenIcon = asset.icon ?? getTokenIcon(asset.symbol);
|
|
3781
3671
|
const chainIcon = getChainIcon(asset.chainId);
|
|
3782
3672
|
const badge = getChainBadge(asset.chainId);
|
|
3783
|
-
return /* @__PURE__ */
|
|
3673
|
+
return /* @__PURE__ */ jsxs15(
|
|
3784
3674
|
"button",
|
|
3785
3675
|
{
|
|
3786
3676
|
type: "button",
|
|
3787
3677
|
className: "rs-asset-row",
|
|
3788
3678
|
onClick: () => onSelect(asset),
|
|
3789
3679
|
children: [
|
|
3790
|
-
/* @__PURE__ */
|
|
3791
|
-
/* @__PURE__ */
|
|
3792
|
-
/* @__PURE__ */
|
|
3793
|
-
chainIcon ? /* @__PURE__ */
|
|
3680
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-info", children: [
|
|
3681
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3682
|
+
/* @__PURE__ */ jsx17("span", { className: "rs-asset-icon", children: tokenIcon ? /* @__PURE__ */ jsx17("img", { src: tokenIcon, alt: asset.symbol }) : asset.symbol.slice(0, 4) }),
|
|
3683
|
+
chainIcon ? /* @__PURE__ */ jsx17("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx17(
|
|
3794
3684
|
"img",
|
|
3795
3685
|
{
|
|
3796
3686
|
src: chainIcon,
|
|
3797
3687
|
alt: getChainName(asset.chainId)
|
|
3798
3688
|
}
|
|
3799
|
-
) }) : /* @__PURE__ */
|
|
3689
|
+
) }) : /* @__PURE__ */ jsx17(
|
|
3800
3690
|
"span",
|
|
3801
3691
|
{
|
|
3802
3692
|
className: "rs-asset-chain-badge",
|
|
@@ -3805,86 +3695,86 @@ function DappImportAssetSelectStep({
|
|
|
3805
3695
|
}
|
|
3806
3696
|
)
|
|
3807
3697
|
] }),
|
|
3808
|
-
/* @__PURE__ */
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
/* @__PURE__ */
|
|
3811
|
-
/* @__PURE__ */
|
|
3698
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-text", children: [
|
|
3699
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-name-row", children: [
|
|
3700
|
+
/* @__PURE__ */ jsx17("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
3701
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-asset-chain", children: [
|
|
3812
3702
|
"on ",
|
|
3813
3703
|
asset.sourceLabel
|
|
3814
3704
|
] })
|
|
3815
3705
|
] }),
|
|
3816
|
-
/* @__PURE__ */
|
|
3706
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-balance-small", children: [
|
|
3817
3707
|
tokenAmount,
|
|
3818
3708
|
" ",
|
|
3819
3709
|
asset.symbol
|
|
3820
3710
|
] })
|
|
3821
3711
|
] })
|
|
3822
3712
|
] }),
|
|
3823
|
-
/* @__PURE__ */
|
|
3713
|
+
/* @__PURE__ */ jsx17("div", { className: "rs-asset-balance", children: balanceUsd })
|
|
3824
3714
|
]
|
|
3825
3715
|
},
|
|
3826
3716
|
asset.id
|
|
3827
3717
|
);
|
|
3828
3718
|
}) })
|
|
3829
3719
|
] }),
|
|
3830
|
-
/* @__PURE__ */
|
|
3720
|
+
/* @__PURE__ */ jsx17(PoweredBy, {})
|
|
3831
3721
|
] });
|
|
3832
3722
|
}
|
|
3833
3723
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
3834
3724
|
|
|
3835
3725
|
// src/components/steps/DappImportAssetSelectSkeleton.tsx
|
|
3836
|
-
import { jsx as
|
|
3726
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3837
3727
|
function DappImportAssetSelectSkeleton({
|
|
3838
3728
|
sourceLabel,
|
|
3839
3729
|
rowCount = 3,
|
|
3840
3730
|
error = false,
|
|
3841
3731
|
onRetry
|
|
3842
3732
|
}) {
|
|
3843
|
-
return /* @__PURE__ */
|
|
3844
|
-
/* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsxs16("div", { className: "rs-screen", "aria-busy": error ? "false" : "true", children: [
|
|
3734
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
3735
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3736
|
+
/* @__PURE__ */ jsx18(
|
|
3847
3737
|
BodyHeader,
|
|
3848
3738
|
{
|
|
3849
|
-
icon: /* @__PURE__ */
|
|
3739
|
+
icon: /* @__PURE__ */ jsx18(WalletIcon, {}),
|
|
3850
3740
|
title: `Transfer from ${sourceLabel}`,
|
|
3851
3741
|
subtitle: "Pick the balance to import"
|
|
3852
3742
|
}
|
|
3853
3743
|
),
|
|
3854
|
-
error ? /* @__PURE__ */
|
|
3855
|
-
/* @__PURE__ */
|
|
3856
|
-
/* @__PURE__ */
|
|
3857
|
-
] }) }) : /* @__PURE__ */
|
|
3744
|
+
error ? /* @__PURE__ */ jsx18("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsxs16("div", { className: "rs-loading-text", children: [
|
|
3745
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t load your balances" }),
|
|
3746
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-loading-subtitle", children: "Check your connection and try again." })
|
|
3747
|
+
] }) }) : /* @__PURE__ */ jsx18("div", { className: "rs-asset-list", "aria-hidden": "true", children: Array.from({ length: rowCount }, (_, index) => /* @__PURE__ */ jsxs16(
|
|
3858
3748
|
"div",
|
|
3859
3749
|
{
|
|
3860
3750
|
className: "rs-asset-row rs-asset-row--skeleton",
|
|
3861
3751
|
children: [
|
|
3862
|
-
/* @__PURE__ */
|
|
3863
|
-
/* @__PURE__ */
|
|
3864
|
-
/* @__PURE__ */
|
|
3865
|
-
/* @__PURE__ */
|
|
3752
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-info", children: [
|
|
3753
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3754
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-fill" }) }),
|
|
3755
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-fill" }) })
|
|
3866
3756
|
] }),
|
|
3867
|
-
/* @__PURE__ */
|
|
3868
|
-
/* @__PURE__ */
|
|
3869
|
-
/* @__PURE__ */
|
|
3757
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-text", children: [
|
|
3758
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-name-row", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--name" }) }),
|
|
3759
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-balance-small", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--balance" }) })
|
|
3870
3760
|
] })
|
|
3871
3761
|
] }),
|
|
3872
|
-
/* @__PURE__ */
|
|
3762
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-balance", children: /* @__PURE__ */ jsx18("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--usd" }) })
|
|
3873
3763
|
]
|
|
3874
3764
|
},
|
|
3875
3765
|
index
|
|
3876
3766
|
)) })
|
|
3877
3767
|
] }),
|
|
3878
|
-
error && onRetry && /* @__PURE__ */
|
|
3768
|
+
error && onRetry && /* @__PURE__ */ jsx18("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx18(
|
|
3879
3769
|
"button",
|
|
3880
3770
|
{
|
|
3881
3771
|
type: "button",
|
|
3882
3772
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
3883
3773
|
onClick: onRetry,
|
|
3884
|
-
children: /* @__PURE__ */
|
|
3774
|
+
children: /* @__PURE__ */ jsx18("span", { children: "Try again" })
|
|
3885
3775
|
}
|
|
3886
3776
|
) }),
|
|
3887
|
-
/* @__PURE__ */
|
|
3777
|
+
/* @__PURE__ */ jsx18(PoweredBy, {})
|
|
3888
3778
|
] });
|
|
3889
3779
|
}
|
|
3890
3780
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -5244,28 +5134,27 @@ function mapError(error) {
|
|
|
5244
5134
|
}
|
|
5245
5135
|
|
|
5246
5136
|
// src/DepositFlow.tsx
|
|
5247
|
-
import { Fragment as Fragment3, jsx as
|
|
5137
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5248
5138
|
function AccountPreparingSkeleton({
|
|
5249
5139
|
errorMessage,
|
|
5250
5140
|
onRetry
|
|
5251
5141
|
}) {
|
|
5252
|
-
return /* @__PURE__ */
|
|
5253
|
-
/* @__PURE__ */
|
|
5254
|
-
/* @__PURE__ */
|
|
5255
|
-
/* @__PURE__ */
|
|
5256
|
-
] }) : /* @__PURE__ */
|
|
5257
|
-
errorMessage && onRetry && /* @__PURE__ */
|
|
5142
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-step", children: [
|
|
5143
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-text", children: errorMessage ? /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
5144
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t prepare account" }),
|
|
5145
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-subtitle", children: errorMessage })
|
|
5146
|
+
] }) : /* @__PURE__ */ jsx19("div", { className: "rs-loading-title", children: "Preparing\u2026" }) }) }) }),
|
|
5147
|
+
errorMessage && onRetry && /* @__PURE__ */ jsx19("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx19(
|
|
5258
5148
|
"button",
|
|
5259
5149
|
{
|
|
5260
5150
|
type: "button",
|
|
5261
5151
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
5262
5152
|
onClick: onRetry,
|
|
5263
|
-
children: /* @__PURE__ */
|
|
5153
|
+
children: /* @__PURE__ */ jsx19("span", { children: "Try again" })
|
|
5264
5154
|
}
|
|
5265
5155
|
) })
|
|
5266
5156
|
] });
|
|
5267
5157
|
}
|
|
5268
|
-
var QR_AUTO_ADVANCE_HYDRATION_GRACE_MS = 1e3;
|
|
5269
5158
|
var DAPP_IMPORT_RESOLVE_TIMEOUT_MS = 1e4;
|
|
5270
5159
|
function isSameRoute2(sourceChain, sourceToken, targetChain, targetToken) {
|
|
5271
5160
|
return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
|
|
@@ -5473,12 +5362,6 @@ function DepositFlow({
|
|
|
5473
5362
|
const onEventRef = useLatestRef(onEvent);
|
|
5474
5363
|
const onLifecycleRef = useLatestRef(onLifecycle);
|
|
5475
5364
|
const onErrorRef = useLatestRef(onError);
|
|
5476
|
-
const hasInitialReownSession = Boolean(
|
|
5477
|
-
enableSolana ? reownWallet?.isConnected || reownWallet?.address : reownWallet?.address
|
|
5478
|
-
);
|
|
5479
|
-
const hasInitialWalletHydrationPending = Boolean(
|
|
5480
|
-
dappAddress && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasInitialReownSession && !reownWallet.isReady)
|
|
5481
|
-
);
|
|
5482
5365
|
const storeApi = useDepositStoreApi();
|
|
5483
5366
|
const flowSlice = useDepositStore((s) => s.flow);
|
|
5484
5367
|
const depositSlice = useDepositStore((s) => s.deposit);
|
|
@@ -5488,11 +5371,8 @@ function DepositFlow({
|
|
|
5488
5371
|
const exchangeSlice = useDepositStore((s) => s.exchange);
|
|
5489
5372
|
const flowMode = flowSlice.mode;
|
|
5490
5373
|
const isConnectSelectionConfirmed = flowSlice.isConnectSelectionConfirmed;
|
|
5491
|
-
const hasNavigatedBack = flowSlice.hasNavigatedBack;
|
|
5492
5374
|
const selectedWalletId = useDepositStore(selectedWalletIdSelector);
|
|
5493
5375
|
const [totalBalanceUsd, setTotalBalanceUsd] = useState11(0);
|
|
5494
|
-
const [hasQrAutoAdvanceGraceElapsed, setHasQrAutoAdvanceGraceElapsed] = useState11(() => !hasInitialWalletHydrationPending);
|
|
5495
|
-
const portfolioAssetsRef = useRef8([]);
|
|
5496
5376
|
const stableWalletSignerRef = useRef8(null);
|
|
5497
5377
|
const stableWalletSelectionKeyRef = useRef8(null);
|
|
5498
5378
|
const logFlow = useCallback7(
|
|
@@ -5507,24 +5387,6 @@ function DepositFlow({
|
|
|
5507
5387
|
},
|
|
5508
5388
|
[debug]
|
|
5509
5389
|
);
|
|
5510
|
-
const handleAssetsLoaded = useCallback7((assets) => {
|
|
5511
|
-
portfolioAssetsRef.current = assets;
|
|
5512
|
-
}, []);
|
|
5513
|
-
const getTokenPriceUsd = useCallback7((symbol) => {
|
|
5514
|
-
const sym = symbol.toLowerCase();
|
|
5515
|
-
for (const asset of portfolioAssetsRef.current) {
|
|
5516
|
-
if (asset.symbol.toLowerCase() === sym && asset.balanceUsd && asset.balance) {
|
|
5517
|
-
try {
|
|
5518
|
-
const balanceUnits = Number(
|
|
5519
|
-
formatUnits7(BigInt(asset.balance), asset.decimals)
|
|
5520
|
-
);
|
|
5521
|
-
if (balanceUnits > 0) return asset.balanceUsd / balanceUnits;
|
|
5522
|
-
} catch {
|
|
5523
|
-
}
|
|
5524
|
-
}
|
|
5525
|
-
}
|
|
5526
|
-
return null;
|
|
5527
|
-
}, []);
|
|
5528
5390
|
const dappSwitchChain = useMemo7(() => {
|
|
5529
5391
|
if (!dappWalletClient?.switchChain) return void 0;
|
|
5530
5392
|
return async (chainId) => {
|
|
@@ -5589,24 +5451,10 @@ function DepositFlow({
|
|
|
5589
5451
|
const hasReownSession = Boolean(
|
|
5590
5452
|
enableSolana ? reownWallet?.isConnected || reownWallet?.address : reownWallet?.address
|
|
5591
5453
|
);
|
|
5592
|
-
const isWalletHydrationPending = Boolean(
|
|
5593
|
-
dappAddress && !hasWalletOptions && (hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady)
|
|
5594
|
-
);
|
|
5595
5454
|
const isDappImportWalletHydrating = Boolean(
|
|
5596
5455
|
hasDappWalletClientProp && dappWalletClient === void 0 || reownWallet && !hasReownSession && !reownWallet.isReady
|
|
5597
5456
|
);
|
|
5598
5457
|
const showConnectStep = flowMode === null && !isConnectSelectionConfirmed;
|
|
5599
|
-
useEffect10(() => {
|
|
5600
|
-
if (!isWalletHydrationPending) {
|
|
5601
|
-
setHasQrAutoAdvanceGraceElapsed(true);
|
|
5602
|
-
return;
|
|
5603
|
-
}
|
|
5604
|
-
setHasQrAutoAdvanceGraceElapsed(false);
|
|
5605
|
-
const timeout = window.setTimeout(() => {
|
|
5606
|
-
setHasQrAutoAdvanceGraceElapsed(true);
|
|
5607
|
-
}, QR_AUTO_ADVANCE_HYDRATION_GRACE_MS);
|
|
5608
|
-
return () => window.clearTimeout(timeout);
|
|
5609
|
-
}, [isWalletHydrationPending]);
|
|
5610
5458
|
const walletSelectionKey = useMemo7(() => {
|
|
5611
5459
|
if (flowMode !== "wallet" && flowMode !== "dapp-import") return null;
|
|
5612
5460
|
if (canAutoLock) {
|
|
@@ -5850,14 +5698,10 @@ function DepositFlow({
|
|
|
5850
5698
|
);
|
|
5851
5699
|
const step = effectiveStep;
|
|
5852
5700
|
const handleBack = useCallback7(() => {
|
|
5853
|
-
const stepBeforeBack = storeApi.getState().flow.step;
|
|
5854
5701
|
storeApi.dispatch({
|
|
5855
5702
|
type: "back/requested",
|
|
5856
5703
|
hasWalletOptions: hasWalletOptions || Boolean(reownWallet)
|
|
5857
5704
|
});
|
|
5858
|
-
if (stepBeforeBack === "deposit-address" || stepBeforeBack === "select-asset" || stepBeforeBack === "solana-token-select") {
|
|
5859
|
-
portfolioAssetsRef.current = [];
|
|
5860
|
-
}
|
|
5861
5705
|
}, [storeApi, hasWalletOptions, reownWallet]);
|
|
5862
5706
|
const canGoBackFromHere = effectiveStep.type === "deposit-address" || effectiveStep.type === "solana-token-select" || effectiveStep.type === "solana-amount" || effectiveStep.type === "solana-confirm" || effectiveStep.type === "amount" || effectiveStep.type === "confirm" || // Escape hatch from a slow or stuck pre-routed resolve. Mode-gated so
|
|
5863
5707
|
// the chevron doesn't linger if a disconnect cleared the mode out from
|
|
@@ -6256,7 +6100,6 @@ function DepositFlow({
|
|
|
6256
6100
|
solana: null
|
|
6257
6101
|
});
|
|
6258
6102
|
storeApi.dispatch({ type: "flow/reset" });
|
|
6259
|
-
portfolioAssetsRef.current = [];
|
|
6260
6103
|
stableWalletSignerRef.current = null;
|
|
6261
6104
|
stableWalletSelectionKeyRef.current = null;
|
|
6262
6105
|
}, [onLifecycleRef, storeApi]);
|
|
@@ -6430,7 +6273,7 @@ function DepositFlow({
|
|
|
6430
6273
|
(token, sourceAmount, inputAmountUsd) => {
|
|
6431
6274
|
const targetSym = getTargetTokenSymbol(targetToken, targetChain);
|
|
6432
6275
|
const isTargetStable = isStablecoinSymbol(targetSym);
|
|
6433
|
-
const targetTokenPriceUsd = isTargetStable ? 1 :
|
|
6276
|
+
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
6434
6277
|
logFlow("solana:amount:continue", {
|
|
6435
6278
|
token: token.symbol,
|
|
6436
6279
|
sourceAmount,
|
|
@@ -6446,7 +6289,7 @@ function DepositFlow({
|
|
|
6446
6289
|
targetTokenPriceUsd
|
|
6447
6290
|
});
|
|
6448
6291
|
},
|
|
6449
|
-
[targetToken, targetChain,
|
|
6292
|
+
[targetToken, targetChain, logFlow, storeApi]
|
|
6450
6293
|
);
|
|
6451
6294
|
const handleSolanaConfirmed = useCallback7(
|
|
6452
6295
|
(txHash, amountUnits) => {
|
|
@@ -6507,7 +6350,7 @@ function DepositFlow({
|
|
|
6507
6350
|
if (entry.status !== "ready") return;
|
|
6508
6351
|
const targetSym = getTargetTokenSymbol(targetToken, targetChain);
|
|
6509
6352
|
const isTargetStable = isStablecoinSymbol(targetSym);
|
|
6510
|
-
const targetTokenPriceUsd = isTargetStable ? 1 :
|
|
6353
|
+
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
6511
6354
|
storeApi.dispatch({
|
|
6512
6355
|
type: "amount/entered",
|
|
6513
6356
|
amount,
|
|
@@ -6517,7 +6360,7 @@ function DepositFlow({
|
|
|
6517
6360
|
liquidityWarning
|
|
6518
6361
|
});
|
|
6519
6362
|
},
|
|
6520
|
-
[targetToken, targetChain,
|
|
6363
|
+
[targetToken, targetChain, storeApi, activeOwner]
|
|
6521
6364
|
);
|
|
6522
6365
|
const handleDepositSubmitted = useCallback7(
|
|
6523
6366
|
(txHash, chainId, amount, token) => {
|
|
@@ -6648,26 +6491,6 @@ function DepositFlow({
|
|
|
6648
6491
|
storeApi.dispatch({ type: "flow/step-set", step: "connect" });
|
|
6649
6492
|
}
|
|
6650
6493
|
}, [enableSolana, flowMode, storeApi]);
|
|
6651
|
-
useEffect10(() => {
|
|
6652
|
-
if (hasNavigatedBack || isConnectSelectionConfirmed || flowMode || enableFiatOnramp || enableExchangeConnect || initialDappImportProvider) {
|
|
6653
|
-
return;
|
|
6654
|
-
}
|
|
6655
|
-
if (enableQrTransfer && !hasWalletOptions && dappAddress && !hasReownSession && !dappWalletClient && hasQrAutoAdvanceGraceElapsed) {
|
|
6656
|
-
handleSelectTransferCrypto();
|
|
6657
|
-
}
|
|
6658
|
-
}, [
|
|
6659
|
-
enableQrTransfer,
|
|
6660
|
-
hasWalletOptions,
|
|
6661
|
-
hasReownSession,
|
|
6662
|
-
hasQrAutoAdvanceGraceElapsed,
|
|
6663
|
-
isConnectSelectionConfirmed,
|
|
6664
|
-
flowMode,
|
|
6665
|
-
hasNavigatedBack,
|
|
6666
|
-
dappAddress,
|
|
6667
|
-
dappWalletClient,
|
|
6668
|
-
initialDappImportProvider,
|
|
6669
|
-
handleSelectTransferCrypto
|
|
6670
|
-
]);
|
|
6671
6494
|
const walletRows = useMemo7(() => {
|
|
6672
6495
|
return walletOptions.map((option) => {
|
|
6673
6496
|
const ownerForRow = option.kind === "solana" ? dappAddress : option.address ?? null;
|
|
@@ -6696,7 +6519,7 @@ function DepositFlow({
|
|
|
6696
6519
|
[storeApi]
|
|
6697
6520
|
);
|
|
6698
6521
|
if (showConnectStep) {
|
|
6699
|
-
return /* @__PURE__ */
|
|
6522
|
+
return /* @__PURE__ */ jsx19("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx19(
|
|
6700
6523
|
ConnectStep,
|
|
6701
6524
|
{
|
|
6702
6525
|
walletRows,
|
|
@@ -6752,21 +6575,21 @@ function DepositFlow({
|
|
|
6752
6575
|
}
|
|
6753
6576
|
if (isDepositAddressMode) {
|
|
6754
6577
|
if (!dappAddress) return null;
|
|
6755
|
-
return /* @__PURE__ */
|
|
6756
|
-
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */
|
|
6578
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-modal-body", children: [
|
|
6579
|
+
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */ jsx19(
|
|
6757
6580
|
AccountPreparingSkeleton,
|
|
6758
6581
|
{
|
|
6759
6582
|
errorMessage: activeEntry.message ?? void 0,
|
|
6760
6583
|
onRetry: () => handleRetrySetup(dappAddress)
|
|
6761
6584
|
}
|
|
6762
|
-
) : /* @__PURE__ */
|
|
6585
|
+
) : /* @__PURE__ */ jsx19(
|
|
6763
6586
|
DepositAddressSkeleton,
|
|
6764
6587
|
{
|
|
6765
6588
|
uiConfig,
|
|
6766
6589
|
allowedRoutes
|
|
6767
6590
|
}
|
|
6768
6591
|
)),
|
|
6769
|
-
effectiveStep.type === "deposit-address" && /* @__PURE__ */
|
|
6592
|
+
effectiveStep.type === "deposit-address" && /* @__PURE__ */ jsx19(
|
|
6770
6593
|
DepositAddressStep,
|
|
6771
6594
|
{
|
|
6772
6595
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -6799,21 +6622,21 @@ function DepositFlow({
|
|
|
6799
6622
|
}
|
|
6800
6623
|
if (isFiatOnrampMode) {
|
|
6801
6624
|
if (!dappAddress) return null;
|
|
6802
|
-
return /* @__PURE__ */
|
|
6625
|
+
return /* @__PURE__ */ jsxs17(
|
|
6803
6626
|
"div",
|
|
6804
6627
|
{
|
|
6805
6628
|
className: "rs-modal-body",
|
|
6806
6629
|
"data-flow-mode": "fiat-onramp",
|
|
6807
6630
|
"data-step-type": step.type,
|
|
6808
6631
|
children: [
|
|
6809
|
-
step.type === "setup" && /* @__PURE__ */
|
|
6632
|
+
step.type === "setup" && /* @__PURE__ */ jsx19(
|
|
6810
6633
|
AccountPreparingSkeleton,
|
|
6811
6634
|
{
|
|
6812
6635
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6813
6636
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6814
6637
|
}
|
|
6815
6638
|
),
|
|
6816
|
-
step.type === "fiat-onramp" && /* @__PURE__ */
|
|
6639
|
+
step.type === "fiat-onramp" && /* @__PURE__ */ jsx19(
|
|
6817
6640
|
FiatOnrampStep,
|
|
6818
6641
|
{
|
|
6819
6642
|
smartAccount: step.smartAccount,
|
|
@@ -6826,7 +6649,7 @@ function DepositFlow({
|
|
|
6826
6649
|
onError: handleError
|
|
6827
6650
|
}
|
|
6828
6651
|
),
|
|
6829
|
-
step.type === "processing" && /* @__PURE__ */
|
|
6652
|
+
step.type === "processing" && /* @__PURE__ */ jsx19(
|
|
6830
6653
|
ProcessingStep,
|
|
6831
6654
|
{
|
|
6832
6655
|
smartAccount: step.smartAccount,
|
|
@@ -6858,21 +6681,21 @@ function DepositFlow({
|
|
|
6858
6681
|
}
|
|
6859
6682
|
if (isExchangeConnectMode) {
|
|
6860
6683
|
if (!dappAddress) return null;
|
|
6861
|
-
return /* @__PURE__ */
|
|
6684
|
+
return /* @__PURE__ */ jsxs17(
|
|
6862
6685
|
"div",
|
|
6863
6686
|
{
|
|
6864
6687
|
className: "rs-modal-body",
|
|
6865
6688
|
"data-flow-mode": "exchange-connect",
|
|
6866
6689
|
"data-step-type": step.type,
|
|
6867
6690
|
children: [
|
|
6868
|
-
step.type === "setup" && /* @__PURE__ */
|
|
6691
|
+
step.type === "setup" && /* @__PURE__ */ jsx19(
|
|
6869
6692
|
AccountPreparingSkeleton,
|
|
6870
6693
|
{
|
|
6871
6694
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6872
6695
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6873
6696
|
}
|
|
6874
6697
|
),
|
|
6875
|
-
step.type === "exchange-select" && /* @__PURE__ */
|
|
6698
|
+
step.type === "exchange-select" && /* @__PURE__ */ jsx19(
|
|
6876
6699
|
ExchangeSelectStep,
|
|
6877
6700
|
{
|
|
6878
6701
|
service,
|
|
@@ -6880,7 +6703,7 @@ function DepositFlow({
|
|
|
6880
6703
|
onError: handleError
|
|
6881
6704
|
}
|
|
6882
6705
|
),
|
|
6883
|
-
step.type === "exchange-connect" && /* @__PURE__ */
|
|
6706
|
+
step.type === "exchange-connect" && /* @__PURE__ */ jsx19(
|
|
6884
6707
|
ExchangeConnectStep,
|
|
6885
6708
|
{
|
|
6886
6709
|
smartAccount: step.smartAccount,
|
|
@@ -6893,7 +6716,7 @@ function DepositFlow({
|
|
|
6893
6716
|
onError: handleError
|
|
6894
6717
|
}
|
|
6895
6718
|
),
|
|
6896
|
-
step.type === "processing" && /* @__PURE__ */
|
|
6719
|
+
step.type === "processing" && /* @__PURE__ */ jsx19(
|
|
6897
6720
|
ProcessingStep,
|
|
6898
6721
|
{
|
|
6899
6722
|
smartAccount: step.smartAccount,
|
|
@@ -6927,15 +6750,15 @@ function DepositFlow({
|
|
|
6927
6750
|
if (!dappAddress) return null;
|
|
6928
6751
|
const solanaAddr = reownWallet?.solanaAddress;
|
|
6929
6752
|
const solanaProvider = reownWallet?.solanaProvider;
|
|
6930
|
-
return /* @__PURE__ */
|
|
6931
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
6753
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-modal-body", children: [
|
|
6754
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx19(
|
|
6932
6755
|
AccountPreparingSkeleton,
|
|
6933
6756
|
{
|
|
6934
6757
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6935
6758
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6936
6759
|
}
|
|
6937
6760
|
),
|
|
6938
|
-
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */
|
|
6761
|
+
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */ jsx19(
|
|
6939
6762
|
SolanaTokenSelectStep,
|
|
6940
6763
|
{
|
|
6941
6764
|
solanaAddress: solanaAddr,
|
|
@@ -6949,7 +6772,7 @@ function DepositFlow({
|
|
|
6949
6772
|
debug
|
|
6950
6773
|
}
|
|
6951
6774
|
),
|
|
6952
|
-
effectiveStep.type === "solana-amount" && /* @__PURE__ */
|
|
6775
|
+
effectiveStep.type === "solana-amount" && /* @__PURE__ */ jsx19(
|
|
6953
6776
|
SolanaAmountStep,
|
|
6954
6777
|
{
|
|
6955
6778
|
token: effectiveStep.token,
|
|
@@ -6968,7 +6791,7 @@ function DepositFlow({
|
|
|
6968
6791
|
debug
|
|
6969
6792
|
}
|
|
6970
6793
|
),
|
|
6971
|
-
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */
|
|
6794
|
+
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */ jsx19(
|
|
6972
6795
|
SolanaConfirmStep,
|
|
6973
6796
|
{
|
|
6974
6797
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -6989,16 +6812,16 @@ function DepositFlow({
|
|
|
6989
6812
|
onError: handleError,
|
|
6990
6813
|
debug
|
|
6991
6814
|
}
|
|
6992
|
-
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */
|
|
6993
|
-
/* @__PURE__ */
|
|
6994
|
-
/* @__PURE__ */
|
|
6815
|
+
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */ jsxs17("div", { className: "rs-step", children: [
|
|
6816
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-loading-state", children: [
|
|
6817
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx19(
|
|
6995
6818
|
"svg",
|
|
6996
6819
|
{
|
|
6997
6820
|
viewBox: "0 0 24 24",
|
|
6998
6821
|
fill: "none",
|
|
6999
6822
|
stroke: "currentColor",
|
|
7000
6823
|
strokeWidth: "2",
|
|
7001
|
-
children: /* @__PURE__ */
|
|
6824
|
+
children: /* @__PURE__ */ jsx19(
|
|
7002
6825
|
"path",
|
|
7003
6826
|
{
|
|
7004
6827
|
strokeLinecap: "round",
|
|
@@ -7008,22 +6831,22 @@ function DepositFlow({
|
|
|
7008
6831
|
)
|
|
7009
6832
|
}
|
|
7010
6833
|
) }),
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7013
|
-
/* @__PURE__ */
|
|
6834
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-loading-text", children: [
|
|
6835
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
|
|
6836
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
|
|
7014
6837
|
] })
|
|
7015
6838
|
] }),
|
|
7016
|
-
/* @__PURE__ */
|
|
6839
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx19(
|
|
7017
6840
|
"button",
|
|
7018
6841
|
{
|
|
7019
6842
|
type: "button",
|
|
7020
6843
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
7021
6844
|
onClick: handleBack,
|
|
7022
|
-
children: /* @__PURE__ */
|
|
6845
|
+
children: /* @__PURE__ */ jsx19("span", { children: "Go Back" })
|
|
7023
6846
|
}
|
|
7024
6847
|
) })
|
|
7025
6848
|
] }) : null,
|
|
7026
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
6849
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx19(
|
|
7027
6850
|
ProcessingStep,
|
|
7028
6851
|
{
|
|
7029
6852
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -7051,13 +6874,13 @@ function DepositFlow({
|
|
|
7051
6874
|
] });
|
|
7052
6875
|
}
|
|
7053
6876
|
if (isDappImportMode && effectiveStep.type === "dapp-import-resolving") {
|
|
7054
|
-
return /* @__PURE__ */
|
|
6877
|
+
return /* @__PURE__ */ jsx19(
|
|
7055
6878
|
"div",
|
|
7056
6879
|
{
|
|
7057
6880
|
className: "rs-modal-body",
|
|
7058
6881
|
"data-flow-mode": "dapp-import",
|
|
7059
6882
|
"data-step-type": effectiveStep.type,
|
|
7060
|
-
children: /* @__PURE__ */
|
|
6883
|
+
children: /* @__PURE__ */ jsx19(
|
|
7061
6884
|
DappImportAssetSelectSkeleton,
|
|
7062
6885
|
{
|
|
7063
6886
|
sourceLabel: activeDappImportProvider?.sourceLabel ?? "",
|
|
@@ -7069,7 +6892,7 @@ function DepositFlow({
|
|
|
7069
6892
|
);
|
|
7070
6893
|
}
|
|
7071
6894
|
if (!signerContext?.walletClient || !signerContext?.publicClient) {
|
|
7072
|
-
return /* @__PURE__ */
|
|
6895
|
+
return /* @__PURE__ */ jsx19("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx19("div", { className: "rs-step", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-text", children: /* @__PURE__ */ jsx19("div", { className: "rs-loading-title", children: "Connecting wallet\u2026" }) }) }) }) });
|
|
7073
6896
|
}
|
|
7074
6897
|
const ownerAddress = signerContext.ownerAddress;
|
|
7075
6898
|
const ownerChainId = signerContext.walletClient?.chain?.id ?? signerContext.publicClient.chain?.id ?? setupChainId;
|
|
@@ -7079,15 +6902,15 @@ function DepositFlow({
|
|
|
7079
6902
|
}
|
|
7080
6903
|
return getPublicClient(chainId);
|
|
7081
6904
|
};
|
|
7082
|
-
return /* @__PURE__ */
|
|
7083
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
6905
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-modal-body", children: [
|
|
6906
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx19(
|
|
7084
6907
|
AccountPreparingSkeleton,
|
|
7085
6908
|
{
|
|
7086
6909
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
7087
6910
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(ownerAddress) : void 0
|
|
7088
6911
|
}
|
|
7089
6912
|
),
|
|
7090
|
-
effectiveStep.type === "select-asset" && /* @__PURE__ */
|
|
6913
|
+
effectiveStep.type === "select-asset" && /* @__PURE__ */ jsx19(
|
|
7091
6914
|
AssetSelectStep,
|
|
7092
6915
|
{
|
|
7093
6916
|
address: ownerAddress,
|
|
@@ -7098,14 +6921,13 @@ function DepositFlow({
|
|
|
7098
6921
|
service,
|
|
7099
6922
|
onContinue: handleAssetContinue,
|
|
7100
6923
|
onTotalBalanceComputed: handleTotalBalanceComputed,
|
|
7101
|
-
onAssetsLoaded: handleAssetsLoaded,
|
|
7102
6924
|
onDisconnect: onDisconnect ? () => {
|
|
7103
6925
|
onDisconnect();
|
|
7104
6926
|
handleBack();
|
|
7105
6927
|
} : void 0
|
|
7106
6928
|
}
|
|
7107
6929
|
),
|
|
7108
|
-
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */
|
|
6930
|
+
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */ jsx19(
|
|
7109
6931
|
DappImportAssetSelectStep,
|
|
7110
6932
|
{
|
|
7111
6933
|
sourceLabel: activeDappImportAvailability.assets[0]?.sourceLabel ?? activeDappImportProvider.sourceLabel,
|
|
@@ -7113,7 +6935,7 @@ function DepositFlow({
|
|
|
7113
6935
|
onSelect: handleDappImportAssetSelected
|
|
7114
6936
|
}
|
|
7115
6937
|
),
|
|
7116
|
-
effectiveStep.type === "amount" && /* @__PURE__ */
|
|
6938
|
+
effectiveStep.type === "amount" && /* @__PURE__ */ jsx19(
|
|
7117
6939
|
AmountStep,
|
|
7118
6940
|
{
|
|
7119
6941
|
walletClient: signerContext.walletClient,
|
|
@@ -7145,7 +6967,7 @@ function DepositFlow({
|
|
|
7145
6967
|
}
|
|
7146
6968
|
}
|
|
7147
6969
|
),
|
|
7148
|
-
effectiveStep.type === "confirm" && /* @__PURE__ */
|
|
6970
|
+
effectiveStep.type === "confirm" && /* @__PURE__ */ jsx19(
|
|
7149
6971
|
ConfirmStep,
|
|
7150
6972
|
{
|
|
7151
6973
|
walletClient: signerContext.walletClient,
|
|
@@ -7186,7 +7008,7 @@ function DepositFlow({
|
|
|
7186
7008
|
onError: handleError
|
|
7187
7009
|
}
|
|
7188
7010
|
),
|
|
7189
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
7011
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx19(
|
|
7190
7012
|
ProcessingStep,
|
|
7191
7013
|
{
|
|
7192
7014
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -7218,7 +7040,7 @@ function DepositFlow({
|
|
|
7218
7040
|
|
|
7219
7041
|
// src/components/history/DepositHistoryPanel.tsx
|
|
7220
7042
|
import { useCallback as useCallback8, useMemo as useMemo8, useState as useState12 } from "react";
|
|
7221
|
-
import { jsx as
|
|
7043
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7222
7044
|
function shortenHash(hash) {
|
|
7223
7045
|
if (hash.length <= 14) return hash;
|
|
7224
7046
|
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
@@ -7345,7 +7167,7 @@ function DepositHistoryPanel({
|
|
|
7345
7167
|
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
7346
7168
|
);
|
|
7347
7169
|
}, [deposits]);
|
|
7348
|
-
return /* @__PURE__ */
|
|
7170
|
+
return /* @__PURE__ */ jsxs18(
|
|
7349
7171
|
"div",
|
|
7350
7172
|
{
|
|
7351
7173
|
className: "rs-history-panel",
|
|
@@ -7353,55 +7175,55 @@ function DepositHistoryPanel({
|
|
|
7353
7175
|
"aria-label": "Deposit history",
|
|
7354
7176
|
onKeyDown: handleKeyDown,
|
|
7355
7177
|
children: [
|
|
7356
|
-
/* @__PURE__ */
|
|
7357
|
-
/* @__PURE__ */
|
|
7178
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-modal-header--redesigned", children: [
|
|
7179
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-modal-header-nav-left", children: /* @__PURE__ */ jsx20(
|
|
7358
7180
|
"button",
|
|
7359
7181
|
{
|
|
7360
7182
|
type: "button",
|
|
7361
7183
|
className: "rs-modal-header-back",
|
|
7362
7184
|
"aria-label": "Back",
|
|
7363
7185
|
onClick: onClose,
|
|
7364
|
-
children: /* @__PURE__ */
|
|
7186
|
+
children: /* @__PURE__ */ jsx20(ChevronLeftIcon, {})
|
|
7365
7187
|
}
|
|
7366
7188
|
) }),
|
|
7367
|
-
/* @__PURE__ */
|
|
7189
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ jsx20(
|
|
7368
7190
|
"button",
|
|
7369
7191
|
{
|
|
7370
7192
|
type: "button",
|
|
7371
7193
|
className: "rs-modal-close",
|
|
7372
7194
|
"aria-label": "Close",
|
|
7373
7195
|
onClick: onCloseModal,
|
|
7374
|
-
children: /* @__PURE__ */
|
|
7196
|
+
children: /* @__PURE__ */ jsx20(CloseIcon, {})
|
|
7375
7197
|
}
|
|
7376
7198
|
) })
|
|
7377
7199
|
] }),
|
|
7378
|
-
/* @__PURE__ */
|
|
7379
|
-
/* @__PURE__ */
|
|
7380
|
-
/* @__PURE__ */
|
|
7381
|
-
isLoading && deposits.length === 0 && /* @__PURE__ */
|
|
7382
|
-
/* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7384
|
-
/* @__PURE__ */
|
|
7385
|
-
/* @__PURE__ */
|
|
7200
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-screen", children: [
|
|
7201
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-screen-body", children: [
|
|
7202
|
+
/* @__PURE__ */ jsx20(BodyHeader, { icon: /* @__PURE__ */ jsx20(HistoryIcon, {}), title: "History" }),
|
|
7203
|
+
isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs18("div", { className: "rs-history-empty", children: [
|
|
7204
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(HistoryIcon, {}) }),
|
|
7205
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-empty-text", children: [
|
|
7206
|
+
/* @__PURE__ */ jsx20(Spinner, { className: "rs-spinner--sm" }),
|
|
7207
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
7386
7208
|
] })
|
|
7387
7209
|
] }),
|
|
7388
|
-
error && !isLoading && /* @__PURE__ */
|
|
7389
|
-
/* @__PURE__ */
|
|
7390
|
-
/* @__PURE__ */
|
|
7391
|
-
/* @__PURE__ */
|
|
7392
|
-
/* @__PURE__ */
|
|
7210
|
+
error && !isLoading && /* @__PURE__ */ jsxs18("div", { className: "rs-history-empty", children: [
|
|
7211
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(AlertTriangleIcon, {}) }),
|
|
7212
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-empty-text", children: [
|
|
7213
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
7214
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-hint", children: error })
|
|
7393
7215
|
] })
|
|
7394
7216
|
] }),
|
|
7395
|
-
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */
|
|
7396
|
-
/* @__PURE__ */
|
|
7397
|
-
/* @__PURE__ */
|
|
7398
|
-
/* @__PURE__ */
|
|
7399
|
-
/* @__PURE__ */
|
|
7217
|
+
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ jsxs18("div", { className: "rs-history-empty", children: [
|
|
7218
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx20(HistoryIcon, {}) }),
|
|
7219
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-empty-text", children: [
|
|
7220
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
7221
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
7400
7222
|
] })
|
|
7401
7223
|
] }),
|
|
7402
|
-
visibleDeposits.length > 0 && /* @__PURE__ */
|
|
7403
|
-
visibleDeposits.map((deposit, i) => /* @__PURE__ */
|
|
7404
|
-
hasMore && /* @__PURE__ */
|
|
7224
|
+
visibleDeposits.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "rs-history-list", children: [
|
|
7225
|
+
visibleDeposits.map((deposit, i) => /* @__PURE__ */ jsx20(HistoryCard, { deposit }, deposit.txHash || i)),
|
|
7226
|
+
hasMore && /* @__PURE__ */ jsx20(
|
|
7405
7227
|
"button",
|
|
7406
7228
|
{
|
|
7407
7229
|
type: "button",
|
|
@@ -7413,7 +7235,7 @@ function DepositHistoryPanel({
|
|
|
7413
7235
|
)
|
|
7414
7236
|
] })
|
|
7415
7237
|
] }),
|
|
7416
|
-
/* @__PURE__ */
|
|
7238
|
+
/* @__PURE__ */ jsx20(PoweredBy, {})
|
|
7417
7239
|
] })
|
|
7418
7240
|
]
|
|
7419
7241
|
}
|
|
@@ -7439,7 +7261,7 @@ function HistoryCard({ deposit }) {
|
|
|
7439
7261
|
const date = deposit.createdAt ? formatDate(deposit.createdAt) : null;
|
|
7440
7262
|
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
7441
7263
|
const srcTxUrl = deposit.sourceTxHash ? getTxExplorerUrl(deposit.sourceTxHash, sourceChainId) : null;
|
|
7442
|
-
return /* @__PURE__ */
|
|
7264
|
+
return /* @__PURE__ */ jsxs18(
|
|
7443
7265
|
"button",
|
|
7444
7266
|
{
|
|
7445
7267
|
type: "button",
|
|
@@ -7447,38 +7269,38 @@ function HistoryCard({ deposit }) {
|
|
|
7447
7269
|
onClick: () => setExpanded((v) => !v),
|
|
7448
7270
|
"aria-expanded": expanded,
|
|
7449
7271
|
children: [
|
|
7450
|
-
/* @__PURE__ */
|
|
7451
|
-
/* @__PURE__ */
|
|
7452
|
-
/* @__PURE__ */
|
|
7453
|
-
sourceChainIcon && /* @__PURE__ */
|
|
7272
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-row", children: [
|
|
7273
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-icons", children: [
|
|
7274
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-token", children: sourceTokenIcon ? /* @__PURE__ */ jsx20("img", { src: sourceTokenIcon, alt: "" }) : sourceSymbol.slice(0, 2) }),
|
|
7275
|
+
sourceChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx20("img", { src: sourceChainIcon, alt: "" }) })
|
|
7454
7276
|
] }),
|
|
7455
|
-
/* @__PURE__ */
|
|
7456
|
-
/* @__PURE__ */
|
|
7457
|
-
date && /* @__PURE__ */
|
|
7277
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-text", children: [
|
|
7278
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
7279
|
+
date && /* @__PURE__ */ jsx20("span", { className: "rs-history-card-date", children: date })
|
|
7458
7280
|
] }),
|
|
7459
|
-
/* @__PURE__ */
|
|
7460
|
-
/* @__PURE__ */
|
|
7461
|
-
/* @__PURE__ */
|
|
7281
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-history-card-side", children: [
|
|
7282
|
+
/* @__PURE__ */ jsx20("span", { className: "rs-history-card-amount", children: displayAmount }),
|
|
7283
|
+
/* @__PURE__ */ jsx20("span", { className: `rs-history-badge rs-history-badge--${status}`, children: STATUS_LABEL[status] })
|
|
7462
7284
|
] })
|
|
7463
7285
|
] }),
|
|
7464
|
-
/* @__PURE__ */
|
|
7465
|
-
sourceChainName && /* @__PURE__ */
|
|
7466
|
-
/* @__PURE__ */
|
|
7467
|
-
/* @__PURE__ */
|
|
7468
|
-
/* @__PURE__ */
|
|
7469
|
-
sourceChainIcon && /* @__PURE__ */
|
|
7286
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-history-card-panel", children: /* @__PURE__ */ jsx20("div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */ jsxs18("div", { className: "rs-history-card-details", children: [
|
|
7287
|
+
sourceChainName && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
|
|
7288
|
+
/* @__PURE__ */ jsx20("span", { children: "Source chain" }),
|
|
7289
|
+
/* @__PURE__ */ jsxs18("span", { className: "rs-amount-detail-value", children: [
|
|
7290
|
+
/* @__PURE__ */ jsx20("span", { children: sourceChainName }),
|
|
7291
|
+
sourceChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20("img", { src: sourceChainIcon, alt: "" }) })
|
|
7470
7292
|
] })
|
|
7471
7293
|
] }),
|
|
7472
|
-
targetChainName && /* @__PURE__ */
|
|
7473
|
-
/* @__PURE__ */
|
|
7474
|
-
/* @__PURE__ */
|
|
7475
|
-
/* @__PURE__ */
|
|
7476
|
-
targetChainIcon && /* @__PURE__ */
|
|
7294
|
+
targetChainName && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
|
|
7295
|
+
/* @__PURE__ */ jsx20("span", { children: "Destination chain" }),
|
|
7296
|
+
/* @__PURE__ */ jsxs18("span", { className: "rs-amount-detail-value", children: [
|
|
7297
|
+
/* @__PURE__ */ jsx20("span", { children: targetChainName }),
|
|
7298
|
+
targetChainIcon && /* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20("img", { src: targetChainIcon, alt: "" }) })
|
|
7477
7299
|
] })
|
|
7478
7300
|
] }),
|
|
7479
|
-
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */
|
|
7480
|
-
/* @__PURE__ */
|
|
7481
|
-
/* @__PURE__ */
|
|
7301
|
+
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */ jsxs18("div", { className: "rs-amount-detail-row", children: [
|
|
7302
|
+
/* @__PURE__ */ jsx20("span", { children: "Transaction details" }),
|
|
7303
|
+
/* @__PURE__ */ jsxs18(
|
|
7482
7304
|
"a",
|
|
7483
7305
|
{
|
|
7484
7306
|
href: srcTxUrl,
|
|
@@ -7487,8 +7309,8 @@ function HistoryCard({ deposit }) {
|
|
|
7487
7309
|
className: "rs-history-card-link",
|
|
7488
7310
|
onClick: (e) => e.stopPropagation(),
|
|
7489
7311
|
children: [
|
|
7490
|
-
/* @__PURE__ */
|
|
7491
|
-
/* @__PURE__ */
|
|
7312
|
+
/* @__PURE__ */ jsx20("span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
7313
|
+
/* @__PURE__ */ jsx20(ArrowUpRightIcon, {})
|
|
7492
7314
|
]
|
|
7493
7315
|
}
|
|
7494
7316
|
)
|
|
@@ -7501,9 +7323,9 @@ function HistoryCard({ deposit }) {
|
|
|
7501
7323
|
DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
7502
7324
|
|
|
7503
7325
|
// src/DepositModal.tsx
|
|
7504
|
-
import { jsx as
|
|
7326
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7505
7327
|
var ReownDepositInner = lazy2(
|
|
7506
|
-
() => import("./DepositModalReown-
|
|
7328
|
+
() => import("./DepositModalReown-ORSBSEMO.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7507
7329
|
);
|
|
7508
7330
|
function sortByCreatedAtDesc(items) {
|
|
7509
7331
|
return [...items].sort((a, b) => {
|
|
@@ -7519,7 +7341,7 @@ function DepositModal(props) {
|
|
|
7519
7341
|
"dappWalletClient"
|
|
7520
7342
|
);
|
|
7521
7343
|
if (needsReown) {
|
|
7522
|
-
return /* @__PURE__ */
|
|
7344
|
+
return /* @__PURE__ */ jsx21(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx21(
|
|
7523
7345
|
ReownDepositInner,
|
|
7524
7346
|
{
|
|
7525
7347
|
...props,
|
|
@@ -7527,7 +7349,7 @@ function DepositModal(props) {
|
|
|
7527
7349
|
}
|
|
7528
7350
|
) });
|
|
7529
7351
|
}
|
|
7530
|
-
return /* @__PURE__ */
|
|
7352
|
+
return /* @__PURE__ */ jsx21(
|
|
7531
7353
|
DepositModalInner,
|
|
7532
7354
|
{
|
|
7533
7355
|
...props,
|
|
@@ -7757,7 +7579,7 @@ function DepositModalInner({
|
|
|
7757
7579
|
}, [isOpen, store]);
|
|
7758
7580
|
const showBackButton = uiConfig?.showBackButton ?? true;
|
|
7759
7581
|
const canGoBack = backHandler !== void 0;
|
|
7760
|
-
return /* @__PURE__ */
|
|
7582
|
+
return /* @__PURE__ */ jsx21(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx21(
|
|
7761
7583
|
Modal,
|
|
7762
7584
|
{
|
|
7763
7585
|
isOpen,
|
|
@@ -7765,20 +7587,20 @@ function DepositModalInner({
|
|
|
7765
7587
|
className,
|
|
7766
7588
|
inline,
|
|
7767
7589
|
closeOnOverlayClick,
|
|
7768
|
-
children: /* @__PURE__ */
|
|
7769
|
-
/* @__PURE__ */
|
|
7770
|
-
/* @__PURE__ */
|
|
7590
|
+
children: /* @__PURE__ */ jsxs19("div", { ref: modalRef, className: "rs-modal", children: [
|
|
7591
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-modal-header--redesigned", children: [
|
|
7592
|
+
/* @__PURE__ */ jsx21("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ jsx21(
|
|
7771
7593
|
"button",
|
|
7772
7594
|
{
|
|
7773
7595
|
type: "button",
|
|
7774
7596
|
className: "rs-modal-header-back",
|
|
7775
7597
|
"aria-label": "Go back",
|
|
7776
7598
|
onClick: backHandler,
|
|
7777
|
-
children: /* @__PURE__ */
|
|
7599
|
+
children: /* @__PURE__ */ jsx21(ChevronLeftIcon, {})
|
|
7778
7600
|
}
|
|
7779
7601
|
) }),
|
|
7780
|
-
/* @__PURE__ */
|
|
7781
|
-
historyButtonVisible && /* @__PURE__ */
|
|
7602
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-modal-header-nav-right", children: [
|
|
7603
|
+
historyButtonVisible && /* @__PURE__ */ jsx21(
|
|
7782
7604
|
"button",
|
|
7783
7605
|
{
|
|
7784
7606
|
type: "button",
|
|
@@ -7786,22 +7608,22 @@ function DepositModalInner({
|
|
|
7786
7608
|
"aria-label": "Deposit history",
|
|
7787
7609
|
onClick: handleHistoryOpen,
|
|
7788
7610
|
disabled: !recipient,
|
|
7789
|
-
children: /* @__PURE__ */
|
|
7611
|
+
children: /* @__PURE__ */ jsx21(HistoryIcon, {})
|
|
7790
7612
|
}
|
|
7791
7613
|
),
|
|
7792
|
-
/* @__PURE__ */
|
|
7614
|
+
/* @__PURE__ */ jsx21(
|
|
7793
7615
|
"button",
|
|
7794
7616
|
{
|
|
7795
7617
|
type: "button",
|
|
7796
7618
|
onClick: onClose,
|
|
7797
7619
|
className: "rs-modal-close",
|
|
7798
7620
|
"aria-label": "Close",
|
|
7799
|
-
children: /* @__PURE__ */
|
|
7621
|
+
children: /* @__PURE__ */ jsx21(CloseIcon, {})
|
|
7800
7622
|
}
|
|
7801
7623
|
)
|
|
7802
7624
|
] })
|
|
7803
7625
|
] }),
|
|
7804
|
-
recipientIsContract ? /* @__PURE__ */
|
|
7626
|
+
recipientIsContract ? /* @__PURE__ */ jsx21("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx21(Callout, { variant: "error", children: "HyperCore deposits require an EOA recipient. The configured recipient is a smart contract, which is not supported." }) }) : /* @__PURE__ */ jsx21(
|
|
7805
7627
|
DepositFlow,
|
|
7806
7628
|
{
|
|
7807
7629
|
dappWalletClient,
|
|
@@ -7843,7 +7665,7 @@ function DepositModalInner({
|
|
|
7843
7665
|
debug
|
|
7844
7666
|
}
|
|
7845
7667
|
),
|
|
7846
|
-
showHistoryButton && historyOpen && /* @__PURE__ */
|
|
7668
|
+
showHistoryButton && historyOpen && /* @__PURE__ */ jsx21(
|
|
7847
7669
|
DepositHistoryPanel,
|
|
7848
7670
|
{
|
|
7849
7671
|
deposits: historyDeposits,
|