@rhinestone/deposit-modal 0.3.1 → 0.4.0
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-MECHBE6P.cjs → DepositModalReown-KFTMS2WX.cjs} +9 -9
- package/dist/{DepositModalReown-G7UX4IBZ.mjs → DepositModalReown-PC7EX5VK.mjs} +6 -6
- package/dist/{WithdrawModalReown-CUJAFUQM.mjs → WithdrawModalReown-BE23LUMT.mjs} +5 -5
- package/dist/{WithdrawModalReown-WJ6VBZKK.cjs → WithdrawModalReown-Z2YF2FSJ.cjs} +8 -8
- package/dist/{chunk-ULEAK63T.cjs → chunk-3MXWIYAT.cjs} +16 -6
- package/dist/{chunk-QYSCCX4K.mjs → chunk-3PVDRSJ7.mjs} +539 -412
- package/dist/{chunk-SPUZLWQS.cjs → chunk-7MP2UWIQ.cjs} +519 -392
- package/dist/{chunk-MILJQWPT.cjs → chunk-ABVRVW3P.cjs} +133 -8
- package/dist/{chunk-LEL6GMEQ.cjs → chunk-AE5LHTPM.cjs} +121 -101
- package/dist/{chunk-TQ2AYMWS.mjs → chunk-F7P4MV72.mjs} +1 -1
- package/dist/{chunk-BAEB5AFZ.mjs → chunk-FJWLC4AM.mjs} +1 -1
- package/dist/{chunk-3C35DVPE.mjs → chunk-GKC22JC4.mjs} +901 -428
- package/dist/{chunk-R5CPOBCF.cjs → chunk-NRNJAQUA.cjs} +4 -4
- package/dist/{chunk-MQIJZNTP.cjs → chunk-OQVLEVNR.cjs} +760 -287
- package/dist/{chunk-AJHFNHG3.cjs → chunk-UEKPBRBY.cjs} +3 -3
- package/dist/{chunk-R5WDHHVM.mjs → chunk-UFKFSGT3.mjs} +14 -4
- package/dist/{chunk-DZQD3DAV.mjs → chunk-WCIGOV34.mjs} +32 -12
- package/dist/{chunk-6YRDD462.mjs → chunk-WJX3TJFK.mjs} +135 -10
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +6 -6
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/styles.css +218 -9
- package/dist/{types-RzfAD14B.d.ts → types-CFRuisqK.d.cts} +1 -1
- package/dist/{types-RzfAD14B.d.cts → types-CFRuisqK.d.ts} +1 -1
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
executePolymarketSafeTransfer,
|
|
8
8
|
fetchPolymarketProxyWallet,
|
|
9
9
|
readPolymarketBalances
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FJWLC4AM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AlertTriangleIcon,
|
|
13
13
|
ArrowUpRightIcon,
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
Spinner,
|
|
35
35
|
Tooltip,
|
|
36
36
|
TransferCryptoIcon,
|
|
37
|
+
UnplugIcon,
|
|
37
38
|
WalletIcon,
|
|
38
39
|
accountFromPrivateKey,
|
|
39
40
|
applyTheme,
|
|
@@ -44,6 +45,8 @@ import {
|
|
|
44
45
|
debugError,
|
|
45
46
|
debugLog,
|
|
46
47
|
failureMessageForEvent,
|
|
48
|
+
formatReceiveEstimate,
|
|
49
|
+
formatTokenAmount,
|
|
47
50
|
formatUserError,
|
|
48
51
|
getAssetId,
|
|
49
52
|
getEventSourceDetails,
|
|
@@ -59,10 +62,10 @@ import {
|
|
|
59
62
|
tokenFormatter,
|
|
60
63
|
txRefsMatch,
|
|
61
64
|
useLatestRef
|
|
62
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-GKC22JC4.mjs";
|
|
63
66
|
import {
|
|
64
67
|
SAFE_ABI
|
|
65
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-F7P4MV72.mjs";
|
|
66
69
|
import {
|
|
67
70
|
DEFAULT_BACKEND_URL,
|
|
68
71
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -92,7 +95,7 @@ import {
|
|
|
92
95
|
isVirtualDestination,
|
|
93
96
|
parseEvmChainId,
|
|
94
97
|
targetChainToCaip2
|
|
95
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-WJX3TJFK.mjs";
|
|
96
99
|
|
|
97
100
|
// src/DepositModal.tsx
|
|
98
101
|
import {
|
|
@@ -875,25 +878,21 @@ function ConfirmStep({
|
|
|
875
878
|
const targetChainIcon = getChainIcon(targetChain);
|
|
876
879
|
const sourceTokenIcon = getTokenIcon(asset.symbol);
|
|
877
880
|
const targetTokenIcon = getTokenIcon(targetSymbol);
|
|
878
|
-
const formattedSendAmount = amount &&
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
});
|
|
893
|
-
}
|
|
894
|
-
return formattedSendAmount;
|
|
881
|
+
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? formatTokenAmount(Number(amount), asset.symbol) ?? "0" : "0";
|
|
882
|
+
const receiveDisplay = (() => {
|
|
883
|
+
if (sameRoute) return `${formattedSendAmount} ${asset.symbol}`;
|
|
884
|
+
const usdValue = Number(targetAmount);
|
|
885
|
+
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
886
|
+
const estimate = formatReceiveEstimate({
|
|
887
|
+
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
888
|
+
sourceSymbol: asset.symbol,
|
|
889
|
+
targetSymbol,
|
|
890
|
+
sourceAmountUsd,
|
|
891
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
|
|
892
|
+
});
|
|
893
|
+
if (estimate !== void 0) return estimate;
|
|
894
|
+
return sourceAmountUsd !== void 0 ? `~$${sourceAmountUsd.toFixed(2)}` : `${formattedSendAmount} ${asset.symbol}`;
|
|
895
895
|
})();
|
|
896
|
-
const receiveAmount = sameRoute ? formattedReceiveAmount : `~${formattedReceiveAmount}`;
|
|
897
896
|
const feeSponsored = uiConfig?.feeSponsored ?? false;
|
|
898
897
|
const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
|
|
899
898
|
const feeDisplay = quote ? `$${quote.fees.totalUsd.toFixed(2)}` : null;
|
|
@@ -1047,11 +1046,7 @@ function ConfirmStep({
|
|
|
1047
1046
|
/* @__PURE__ */ jsxs4("div", { className: "rs-review-detail-row", children: [
|
|
1048
1047
|
/* @__PURE__ */ jsx4("span", { children: "Receive" }),
|
|
1049
1048
|
/* @__PURE__ */ jsxs4("span", { className: "rs-review-detail-value", children: [
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
receiveAmount,
|
|
1052
|
-
" ",
|
|
1053
|
-
targetSymbol
|
|
1054
|
-
] }),
|
|
1049
|
+
/* @__PURE__ */ jsx4("span", { children: receiveDisplay }),
|
|
1055
1050
|
targetTokenIcon && /* @__PURE__ */ jsx4("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx4("img", { src: targetTokenIcon, alt: "" }) })
|
|
1056
1051
|
] })
|
|
1057
1052
|
] }),
|
|
@@ -2053,12 +2048,28 @@ import { useCallback as useCallback3 } from "react";
|
|
|
2053
2048
|
// src/components/steps/SwappedIframeStep.tsx
|
|
2054
2049
|
import { useState as useState6, useEffect as useEffect6, useRef as useRef6, useMemo as useMemo4 } from "react";
|
|
2055
2050
|
|
|
2056
|
-
// src/components/steps/
|
|
2051
|
+
// src/components/steps/FinalisingDepositStep.tsx
|
|
2057
2052
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2053
|
+
function FinalisingDepositStep() {
|
|
2054
|
+
return /* @__PURE__ */ jsxs7("div", { className: "rs-screen rs-finalising", children: [
|
|
2055
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-screen-body rs-finalising-body", children: [
|
|
2056
|
+
/* @__PURE__ */ jsx7("span", { className: "rs-finalising-spinner", children: /* @__PURE__ */ jsx7(Spinner, {}) }),
|
|
2057
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-finalising-text", children: [
|
|
2058
|
+
/* @__PURE__ */ jsx7("h2", { className: "rs-finalising-title", children: "Finalising deposit" }),
|
|
2059
|
+
/* @__PURE__ */ jsx7("p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
2060
|
+
] })
|
|
2061
|
+
] }),
|
|
2062
|
+
/* @__PURE__ */ jsx7(PoweredBy, {})
|
|
2063
|
+
] });
|
|
2064
|
+
}
|
|
2065
|
+
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
2066
|
+
|
|
2067
|
+
// src/components/steps/SwappedOrderTracker.tsx
|
|
2068
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2058
2069
|
var STEP_LABELS = [
|
|
2059
2070
|
"Payment received",
|
|
2060
2071
|
null,
|
|
2061
|
-
"Processing
|
|
2072
|
+
"Processing deposit",
|
|
2062
2073
|
"Deposit successful"
|
|
2063
2074
|
];
|
|
2064
2075
|
function SwappedOrderTracker({
|
|
@@ -2077,23 +2088,23 @@ function SwappedOrderTracker({
|
|
|
2077
2088
|
STEP_LABELS[2],
|
|
2078
2089
|
STEP_LABELS[3]
|
|
2079
2090
|
];
|
|
2080
|
-
return /* @__PURE__ */
|
|
2081
|
-
/* @__PURE__ */
|
|
2082
|
-
/* @__PURE__ */
|
|
2083
|
-
/* @__PURE__ */
|
|
2091
|
+
return /* @__PURE__ */ jsxs8("div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
2092
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2093
|
+
/* @__PURE__ */ jsx8(BodyHeader, { icon: /* @__PURE__ */ jsx8(HandCoinsIcon, {}), title }),
|
|
2094
|
+
/* @__PURE__ */ jsx8("ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
2084
2095
|
const status = stepStates[idx];
|
|
2085
|
-
return /* @__PURE__ */
|
|
2096
|
+
return /* @__PURE__ */ jsxs8(
|
|
2086
2097
|
"li",
|
|
2087
2098
|
{
|
|
2088
2099
|
className: `rs-swapped-tracker-step rs-swapped-tracker-step--${status}`,
|
|
2089
2100
|
children: [
|
|
2090
|
-
/* @__PURE__ */
|
|
2091
|
-
/* @__PURE__ */
|
|
2101
|
+
/* @__PURE__ */ jsx8("span", { className: "rs-swapped-tracker-step-label", children: label }),
|
|
2102
|
+
/* @__PURE__ */ jsx8(
|
|
2092
2103
|
"span",
|
|
2093
2104
|
{
|
|
2094
2105
|
className: "rs-swapped-tracker-step-marker",
|
|
2095
2106
|
"aria-hidden": "true",
|
|
2096
|
-
children: status === "complete" ? /* @__PURE__ */
|
|
2107
|
+
children: status === "complete" ? /* @__PURE__ */ jsx8(CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ jsx8(CloseIcon, {}) : status === "active" ? /* @__PURE__ */ jsx8(Spinner, {}) : null
|
|
2097
2108
|
}
|
|
2098
2109
|
)
|
|
2099
2110
|
]
|
|
@@ -2101,13 +2112,13 @@ function SwappedOrderTracker({
|
|
|
2101
2112
|
label
|
|
2102
2113
|
);
|
|
2103
2114
|
}) }),
|
|
2104
|
-
terminal && /* @__PURE__ */
|
|
2115
|
+
terminal && /* @__PURE__ */ jsxs8(
|
|
2105
2116
|
"div",
|
|
2106
2117
|
{
|
|
2107
2118
|
className: `rs-swapped-tracker-terminal rs-swapped-tracker-terminal--${terminal.kind}`,
|
|
2108
2119
|
children: [
|
|
2109
|
-
/* @__PURE__ */
|
|
2110
|
-
terminal.kind === "cancelled" && onRetry && /* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ jsx8("p", { className: "rs-swapped-tracker-terminal-message", children: terminal.message }),
|
|
2121
|
+
terminal.kind === "cancelled" && onRetry && /* @__PURE__ */ jsx8(
|
|
2111
2122
|
"button",
|
|
2112
2123
|
{
|
|
2113
2124
|
type: "button",
|
|
@@ -2120,7 +2131,7 @@ function SwappedOrderTracker({
|
|
|
2120
2131
|
}
|
|
2121
2132
|
)
|
|
2122
2133
|
] }),
|
|
2123
|
-
/* @__PURE__ */
|
|
2134
|
+
/* @__PURE__ */ jsx8(PoweredBy, {})
|
|
2124
2135
|
] });
|
|
2125
2136
|
}
|
|
2126
2137
|
function formatTrackerAmount(amount) {
|
|
@@ -2132,7 +2143,7 @@ function formatTrackerAmount(amount) {
|
|
|
2132
2143
|
SwappedOrderTracker.displayName = "SwappedOrderTracker";
|
|
2133
2144
|
|
|
2134
2145
|
// src/components/steps/SwappedIframeStep.tsx
|
|
2135
|
-
import { jsx as
|
|
2146
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2136
2147
|
var STATUS_POLL_INTERVAL_MS = 2e3;
|
|
2137
2148
|
var DEPOSIT_POLL_INTERVAL_MS = 2e3;
|
|
2138
2149
|
var DEPOSIT_POLL_FAST_INITIAL_DELAY_MS = 1e3;
|
|
@@ -2389,7 +2400,11 @@ function SwappedIframeStep({
|
|
|
2389
2400
|
);
|
|
2390
2401
|
}, [latestEvent]);
|
|
2391
2402
|
if (phase === "tracker") {
|
|
2392
|
-
|
|
2403
|
+
const paymentReceived = stepStates[0] === "complete";
|
|
2404
|
+
if (variant === "connect" && !terminalState && paymentReceived) {
|
|
2405
|
+
return /* @__PURE__ */ jsx9(FinalisingDepositStep, {});
|
|
2406
|
+
}
|
|
2407
|
+
return /* @__PURE__ */ jsx9(
|
|
2393
2408
|
SwappedOrderTracker,
|
|
2394
2409
|
{
|
|
2395
2410
|
amount: orderState?.orderCryptoAmount ?? null,
|
|
@@ -2401,20 +2416,20 @@ function SwappedIframeStep({
|
|
|
2401
2416
|
}
|
|
2402
2417
|
);
|
|
2403
2418
|
}
|
|
2404
|
-
return /* @__PURE__ */
|
|
2405
|
-
/* @__PURE__ */
|
|
2406
|
-
/* @__PURE__ */
|
|
2419
|
+
return /* @__PURE__ */ jsxs9("div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
2420
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2421
|
+
/* @__PURE__ */ jsx9(
|
|
2407
2422
|
BodyHeader,
|
|
2408
2423
|
{
|
|
2409
|
-
icon: /* @__PURE__ */
|
|
2424
|
+
icon: /* @__PURE__ */ jsx9(HandCoinsIcon, {}),
|
|
2410
2425
|
title: "Deposit",
|
|
2411
2426
|
subtitle: "Add money to your balance"
|
|
2412
2427
|
}
|
|
2413
2428
|
),
|
|
2414
|
-
/* @__PURE__ */
|
|
2415
|
-
loadError && /* @__PURE__ */
|
|
2416
|
-
/* @__PURE__ */
|
|
2417
|
-
/* @__PURE__ */
|
|
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(
|
|
2418
2433
|
"button",
|
|
2419
2434
|
{
|
|
2420
2435
|
type: "button",
|
|
@@ -2424,8 +2439,8 @@ function SwappedIframeStep({
|
|
|
2424
2439
|
}
|
|
2425
2440
|
)
|
|
2426
2441
|
] }),
|
|
2427
|
-
!loadError && !iframeLoaded && /* @__PURE__ */
|
|
2428
|
-
widgetUrl && !loadError && /* @__PURE__ */
|
|
2442
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ jsx9("div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ jsx9(Spinner, {}) }),
|
|
2443
|
+
widgetUrl && !loadError && /* @__PURE__ */ jsx9(
|
|
2429
2444
|
"iframe",
|
|
2430
2445
|
{
|
|
2431
2446
|
src: widgetUrl,
|
|
@@ -2439,7 +2454,7 @@ function SwappedIframeStep({
|
|
|
2439
2454
|
)
|
|
2440
2455
|
] })
|
|
2441
2456
|
] }),
|
|
2442
|
-
/* @__PURE__ */
|
|
2457
|
+
/* @__PURE__ */ jsx9(PoweredBy, {})
|
|
2443
2458
|
] });
|
|
2444
2459
|
}
|
|
2445
2460
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
@@ -2466,7 +2481,7 @@ function deriveStepStates(swappedStatus, latestEvent) {
|
|
|
2466
2481
|
SwappedIframeStep.displayName = "SwappedIframeStep";
|
|
2467
2482
|
|
|
2468
2483
|
// src/components/steps/FiatOnrampStep.tsx
|
|
2469
|
-
import { jsx as
|
|
2484
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
2470
2485
|
function fiatBannerForStatus(status, context) {
|
|
2471
2486
|
if (context.currencyMismatch) {
|
|
2472
2487
|
return {
|
|
@@ -2507,14 +2522,9 @@ function FiatOnrampStep({
|
|
|
2507
2522
|
smartAccount,
|
|
2508
2523
|
method: paymentMethod
|
|
2509
2524
|
});
|
|
2510
|
-
if (res.currencyCode !== "USDC_BASE") {
|
|
2511
|
-
console.warn(
|
|
2512
|
-
`[FiatOnrampStep] Expected backend to return currencyCode=USDC_BASE, got ${res.currencyCode}. Swapped purchases may not bridge as expected.`
|
|
2513
|
-
);
|
|
2514
|
-
}
|
|
2515
2525
|
return res;
|
|
2516
2526
|
}, [service, smartAccount, paymentMethod]);
|
|
2517
|
-
return /* @__PURE__ */
|
|
2527
|
+
return /* @__PURE__ */ jsx10(
|
|
2518
2528
|
SwappedIframeStep,
|
|
2519
2529
|
{
|
|
2520
2530
|
smartAccount,
|
|
@@ -2536,7 +2546,7 @@ FiatOnrampStep.displayName = "FiatOnrampStep";
|
|
|
2536
2546
|
|
|
2537
2547
|
// src/components/steps/ExchangeConnectStep.tsx
|
|
2538
2548
|
import { useCallback as useCallback4 } from "react";
|
|
2539
|
-
import { jsx as
|
|
2549
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2540
2550
|
function connectBannerForStatus(status, context) {
|
|
2541
2551
|
if (context.currencyMismatch) {
|
|
2542
2552
|
return {
|
|
@@ -2580,14 +2590,9 @@ function ExchangeConnectStep({
|
|
|
2580
2590
|
smartAccount,
|
|
2581
2591
|
connection
|
|
2582
2592
|
});
|
|
2583
|
-
if (res.currencyCode !== "USDC_BASE") {
|
|
2584
|
-
console.warn(
|
|
2585
|
-
`[ExchangeConnectStep] Expected backend to return currencyCode=USDC_BASE, got ${res.currencyCode}. Swapped Connect pulls may not bridge as expected.`
|
|
2586
|
-
);
|
|
2587
|
-
}
|
|
2588
2593
|
return res;
|
|
2589
2594
|
}, [service, smartAccount, connection]);
|
|
2590
|
-
return /* @__PURE__ */
|
|
2595
|
+
return /* @__PURE__ */ jsx11(
|
|
2591
2596
|
SwappedIframeStep,
|
|
2592
2597
|
{
|
|
2593
2598
|
smartAccount,
|
|
@@ -2609,13 +2614,117 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
2609
2614
|
|
|
2610
2615
|
// src/components/steps/ExchangeSelectStep.tsx
|
|
2611
2616
|
import { useCallback as useCallback5, useEffect as useEffect7, useState as useState7 } from "react";
|
|
2612
|
-
|
|
2617
|
+
|
|
2618
|
+
// src/components/ui/ExchangeLogos.tsx
|
|
2619
|
+
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";
|
|
2613
2722
|
function ExchangeLogo({ exchange }) {
|
|
2614
2723
|
const [failed, setFailed] = useState7(false);
|
|
2615
2724
|
if (!exchange.logoUrl || failed) {
|
|
2616
|
-
return /* @__PURE__ */
|
|
2725
|
+
return /* @__PURE__ */ jsx13(BankIcon, {});
|
|
2617
2726
|
}
|
|
2618
|
-
return /* @__PURE__ */
|
|
2727
|
+
return /* @__PURE__ */ jsx13(
|
|
2619
2728
|
"img",
|
|
2620
2729
|
{
|
|
2621
2730
|
src: exchange.logoUrl,
|
|
@@ -2656,20 +2765,20 @@ function ExchangeSelectStep({
|
|
|
2656
2765
|
cancelled = true;
|
|
2657
2766
|
};
|
|
2658
2767
|
}, [service, retryToken, onError]);
|
|
2659
|
-
return /* @__PURE__ */
|
|
2660
|
-
/* @__PURE__ */
|
|
2661
|
-
/* @__PURE__ */
|
|
2768
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen rs-exchange-select", children: [
|
|
2769
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2770
|
+
/* @__PURE__ */ jsx13(
|
|
2662
2771
|
BodyHeader,
|
|
2663
2772
|
{
|
|
2664
|
-
icon: /* @__PURE__ */
|
|
2665
|
-
title: "
|
|
2666
|
-
subtitle: "
|
|
2773
|
+
icon: /* @__PURE__ */ jsx13(UnplugIcon, {}),
|
|
2774
|
+
title: "Connect exchange",
|
|
2775
|
+
subtitle: "Select an exchange to connect"
|
|
2667
2776
|
}
|
|
2668
2777
|
),
|
|
2669
|
-
loading && /* @__PURE__ */
|
|
2670
|
-
!loading && error && /* @__PURE__ */
|
|
2671
|
-
/* @__PURE__ */
|
|
2672
|
-
/* @__PURE__ */
|
|
2778
|
+
loading && /* @__PURE__ */ jsx13("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ jsx13(Spinner, {}) }),
|
|
2779
|
+
!loading && error && /* @__PURE__ */ jsxs11("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2780
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
2781
|
+
/* @__PURE__ */ jsx13(
|
|
2673
2782
|
"button",
|
|
2674
2783
|
{
|
|
2675
2784
|
type: "button",
|
|
@@ -2679,9 +2788,9 @@ function ExchangeSelectStep({
|
|
|
2679
2788
|
}
|
|
2680
2789
|
)
|
|
2681
2790
|
] }),
|
|
2682
|
-
!loading && !error && exchanges.length === 0 && /* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */
|
|
2684
|
-
/* @__PURE__ */
|
|
2791
|
+
!loading && !error && exchanges.length === 0 && /* @__PURE__ */ jsxs11("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
2792
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-exchange-select-state-title", children: "No exchanges available" }),
|
|
2793
|
+
/* @__PURE__ */ jsx13(
|
|
2685
2794
|
"button",
|
|
2686
2795
|
{
|
|
2687
2796
|
type: "button",
|
|
@@ -2691,28 +2800,37 @@ function ExchangeSelectStep({
|
|
|
2691
2800
|
}
|
|
2692
2801
|
)
|
|
2693
2802
|
] }),
|
|
2694
|
-
!loading && !error && exchanges.length > 0 && /* @__PURE__ */
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2803
|
+
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ jsx13("div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
2804
|
+
const brand = getExchangeLogo(exchange.name, exchange.connection);
|
|
2805
|
+
return /* @__PURE__ */ jsxs11(
|
|
2806
|
+
"button",
|
|
2807
|
+
{
|
|
2808
|
+
type: "button",
|
|
2809
|
+
className: "rs-exchange-card",
|
|
2810
|
+
onClick: () => onSelectExchange(exchange.connection),
|
|
2811
|
+
"aria-label": `Select ${exchange.name}`,
|
|
2812
|
+
children: [
|
|
2813
|
+
/* @__PURE__ */ jsx13(
|
|
2814
|
+
"span",
|
|
2815
|
+
{
|
|
2816
|
+
className: `rs-exchange-card-logo${brand ? " rs-exchange-card-logo--brand" : ""}`,
|
|
2817
|
+
children: brand ?? /* @__PURE__ */ jsx13(ExchangeLogo, { exchange })
|
|
2818
|
+
}
|
|
2819
|
+
),
|
|
2820
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-exchange-card-name", children: exchange.name })
|
|
2821
|
+
]
|
|
2822
|
+
},
|
|
2823
|
+
exchange.connection
|
|
2824
|
+
);
|
|
2825
|
+
}) })
|
|
2708
2826
|
] }),
|
|
2709
|
-
/* @__PURE__ */
|
|
2827
|
+
/* @__PURE__ */ jsx13(PoweredBy, {})
|
|
2710
2828
|
] });
|
|
2711
2829
|
}
|
|
2712
2830
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
2713
2831
|
|
|
2714
2832
|
// src/components/steps/DepositAddressSkeleton.tsx
|
|
2715
|
-
import { jsx as
|
|
2833
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2716
2834
|
var BASE_CHAIN_ID = 8453;
|
|
2717
2835
|
function DepositAddressSkeleton({
|
|
2718
2836
|
uiConfig,
|
|
@@ -2733,15 +2851,15 @@ function DepositAddressSkeleton({
|
|
|
2733
2851
|
const chainName = getChainName(defaultChainId);
|
|
2734
2852
|
const chainIcon = getChainIcon(defaultChainId);
|
|
2735
2853
|
const tokenIcon = getTokenIcon(defaultToken);
|
|
2736
|
-
return /* @__PURE__ */
|
|
2737
|
-
/* @__PURE__ */
|
|
2738
|
-
/* @__PURE__ */
|
|
2739
|
-
/* @__PURE__ */
|
|
2740
|
-
/* @__PURE__ */
|
|
2741
|
-
/* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
/* @__PURE__ */
|
|
2744
|
-
chainIcon && /* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2855
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2856
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-screen-body", children: [
|
|
2857
|
+
/* @__PURE__ */ jsx14(BodyHeader, { icon: /* @__PURE__ */ jsx14(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2858
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2859
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-dropdown", children: [
|
|
2860
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2861
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2862
|
+
chainIcon && /* @__PURE__ */ jsx14(
|
|
2745
2863
|
"img",
|
|
2746
2864
|
{
|
|
2747
2865
|
src: chainIcon,
|
|
@@ -2749,17 +2867,17 @@ function DepositAddressSkeleton({
|
|
|
2749
2867
|
className: "rs-deposit-address-dropdown-icon"
|
|
2750
2868
|
}
|
|
2751
2869
|
),
|
|
2752
|
-
/* @__PURE__ */
|
|
2753
|
-
/* @__PURE__ */
|
|
2870
|
+
/* @__PURE__ */ jsx14("span", { children: chainName }),
|
|
2871
|
+
/* @__PURE__ */ jsx14(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2754
2872
|
] })
|
|
2755
2873
|
] }),
|
|
2756
|
-
/* @__PURE__ */
|
|
2757
|
-
/* @__PURE__ */
|
|
2758
|
-
/* @__PURE__ */
|
|
2759
|
-
/* @__PURE__ */
|
|
2874
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-dropdown", children: [
|
|
2875
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
2876
|
+
/* @__PURE__ */ jsx14("span", { children: "Supported token" }),
|
|
2877
|
+
/* @__PURE__ */ jsxs12("span", { className: "rs-deposit-address-min", children: [
|
|
2760
2878
|
"Min.$",
|
|
2761
2879
|
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
2762
|
-
/* @__PURE__ */
|
|
2880
|
+
/* @__PURE__ */ jsx14(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx14(
|
|
2763
2881
|
InfoIcon,
|
|
2764
2882
|
{
|
|
2765
2883
|
className: "rs-deposit-address-min-icon",
|
|
@@ -2768,8 +2886,8 @@ function DepositAddressSkeleton({
|
|
|
2768
2886
|
) })
|
|
2769
2887
|
] })
|
|
2770
2888
|
] }),
|
|
2771
|
-
/* @__PURE__ */
|
|
2772
|
-
tokenIcon && /* @__PURE__ */
|
|
2889
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2890
|
+
tokenIcon && /* @__PURE__ */ jsx14(
|
|
2773
2891
|
"img",
|
|
2774
2892
|
{
|
|
2775
2893
|
src: tokenIcon,
|
|
@@ -2777,21 +2895,21 @@ function DepositAddressSkeleton({
|
|
|
2777
2895
|
className: "rs-deposit-address-dropdown-icon"
|
|
2778
2896
|
}
|
|
2779
2897
|
),
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
/* @__PURE__ */
|
|
2898
|
+
/* @__PURE__ */ jsx14("span", { children: defaultToken }),
|
|
2899
|
+
/* @__PURE__ */ jsx14(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2782
2900
|
] })
|
|
2783
2901
|
] })
|
|
2784
2902
|
] }),
|
|
2785
|
-
/* @__PURE__ */
|
|
2903
|
+
/* @__PURE__ */ jsxs12(
|
|
2786
2904
|
"div",
|
|
2787
2905
|
{
|
|
2788
2906
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
2789
2907
|
children: [
|
|
2790
|
-
/* @__PURE__ */
|
|
2791
|
-
/* @__PURE__ */
|
|
2792
|
-
/* @__PURE__ */
|
|
2908
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-deposit-address-well", children: [
|
|
2909
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx14("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
2910
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
2793
2911
|
] }),
|
|
2794
|
-
/* @__PURE__ */
|
|
2912
|
+
/* @__PURE__ */ jsxs12(
|
|
2795
2913
|
"button",
|
|
2796
2914
|
{
|
|
2797
2915
|
type: "button",
|
|
@@ -2799,7 +2917,7 @@ function DepositAddressSkeleton({
|
|
|
2799
2917
|
disabled: true,
|
|
2800
2918
|
"aria-hidden": "true",
|
|
2801
2919
|
children: [
|
|
2802
|
-
/* @__PURE__ */
|
|
2920
|
+
/* @__PURE__ */ jsx14(CopyIcon, {}),
|
|
2803
2921
|
"Copy address"
|
|
2804
2922
|
]
|
|
2805
2923
|
}
|
|
@@ -2807,20 +2925,20 @@ function DepositAddressSkeleton({
|
|
|
2807
2925
|
]
|
|
2808
2926
|
}
|
|
2809
2927
|
),
|
|
2810
|
-
/* @__PURE__ */
|
|
2811
|
-
/* @__PURE__ */
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
2814
|
-
/* @__PURE__ */
|
|
2928
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs12("div", { className: "rs-price-impact-header", children: [
|
|
2929
|
+
/* @__PURE__ */ jsxs12("span", { className: "rs-price-impact-header-left", children: [
|
|
2930
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2931
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx14("strong", { children: "0.00%" }) }),
|
|
2932
|
+
/* @__PURE__ */ jsx14(
|
|
2815
2933
|
Tooltip,
|
|
2816
2934
|
{
|
|
2817
2935
|
className: "rs-price-impact-info",
|
|
2818
2936
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2819
|
-
children: /* @__PURE__ */
|
|
2937
|
+
children: /* @__PURE__ */ jsx14(InfoIcon, { "aria-hidden": "true" })
|
|
2820
2938
|
}
|
|
2821
2939
|
)
|
|
2822
2940
|
] }),
|
|
2823
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ jsx14(
|
|
2824
2942
|
ChevronDownIcon,
|
|
2825
2943
|
{
|
|
2826
2944
|
className: "rs-price-impact-chevron",
|
|
@@ -2829,7 +2947,7 @@ function DepositAddressSkeleton({
|
|
|
2829
2947
|
)
|
|
2830
2948
|
] }) })
|
|
2831
2949
|
] }),
|
|
2832
|
-
/* @__PURE__ */
|
|
2950
|
+
/* @__PURE__ */ jsx14(PoweredBy, {})
|
|
2833
2951
|
] });
|
|
2834
2952
|
}
|
|
2835
2953
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2837,7 +2955,7 @@ DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
|
2837
2955
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
2838
2956
|
import { useState as useState8, useEffect as useEffect8, useMemo as useMemo5 } from "react";
|
|
2839
2957
|
import { formatUnits as formatUnits4 } from "viem";
|
|
2840
|
-
import { jsx as
|
|
2958
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2841
2959
|
function SolanaTokenSelectStep({
|
|
2842
2960
|
solanaAddress,
|
|
2843
2961
|
service,
|
|
@@ -2943,30 +3061,30 @@ function SolanaTokenSelectStep({
|
|
|
2943
3061
|
};
|
|
2944
3062
|
const chainIcon = getChainIcon("solana");
|
|
2945
3063
|
const chainName = getChainName("solana");
|
|
2946
|
-
return /* @__PURE__ */
|
|
2947
|
-
/* @__PURE__ */
|
|
2948
|
-
/* @__PURE__ */
|
|
3064
|
+
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen", children: [
|
|
3065
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-screen-body", children: [
|
|
3066
|
+
/* @__PURE__ */ jsx15(
|
|
2949
3067
|
BodyHeader,
|
|
2950
3068
|
{
|
|
2951
|
-
icon: /* @__PURE__ */
|
|
3069
|
+
icon: /* @__PURE__ */ jsx15(WalletIcon, {}),
|
|
2952
3070
|
title: "Your assets",
|
|
2953
3071
|
subtitle: "Select source assets to transfer"
|
|
2954
3072
|
}
|
|
2955
3073
|
),
|
|
2956
|
-
loading && /* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
3074
|
+
loading && /* @__PURE__ */ jsxs13("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
3075
|
+
/* @__PURE__ */ jsx15(Spinner, { className: "rs-text-tertiary" }),
|
|
3076
|
+
/* @__PURE__ */ jsx15("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
2959
3077
|
] }),
|
|
2960
|
-
error && /* @__PURE__ */
|
|
2961
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
3078
|
+
error && /* @__PURE__ */ jsx15(Callout, { variant: "error", children: error }),
|
|
3079
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs13("div", { className: "rs-empty-state", children: [
|
|
3080
|
+
/* @__PURE__ */ jsx15(WalletIcon, { className: "rs-empty-icon" }),
|
|
3081
|
+
/* @__PURE__ */ jsx15("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
3082
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-empty-address", children: [
|
|
2965
3083
|
solanaAddress.slice(0, 6),
|
|
2966
3084
|
"...",
|
|
2967
3085
|
solanaAddress.slice(-4)
|
|
2968
3086
|
] }),
|
|
2969
|
-
onDisconnect && /* @__PURE__ */
|
|
3087
|
+
onDisconnect && /* @__PURE__ */ jsx15(
|
|
2970
3088
|
"button",
|
|
2971
3089
|
{
|
|
2972
3090
|
type: "button",
|
|
@@ -2976,11 +3094,11 @@ function SolanaTokenSelectStep({
|
|
|
2976
3094
|
}
|
|
2977
3095
|
)
|
|
2978
3096
|
] }),
|
|
2979
|
-
!loading && !error && rows.length > 0 && /* @__PURE__ */
|
|
3097
|
+
!loading && !error && rows.length > 0 && /* @__PURE__ */ jsx15("div", { className: "rs-asset-list", children: rows.map((entry) => {
|
|
2980
3098
|
const isSelected = selectedSymbol === entry.token.symbol;
|
|
2981
3099
|
const tokenAmount = formatBalance(entry);
|
|
2982
3100
|
const tokenIcon = getTokenIcon(entry.token.symbol);
|
|
2983
|
-
return /* @__PURE__ */
|
|
3101
|
+
return /* @__PURE__ */ jsxs13(
|
|
2984
3102
|
"button",
|
|
2985
3103
|
{
|
|
2986
3104
|
type: "button",
|
|
@@ -2988,33 +3106,33 @@ function SolanaTokenSelectStep({
|
|
|
2988
3106
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
2989
3107
|
"aria-pressed": isSelected,
|
|
2990
3108
|
children: [
|
|
2991
|
-
/* @__PURE__ */
|
|
2992
|
-
/* @__PURE__ */
|
|
2993
|
-
tokenIcon ? /* @__PURE__ */
|
|
2994
|
-
chainIcon && /* @__PURE__ */
|
|
3109
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-asset-info", children: [
|
|
3110
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3111
|
+
tokenIcon ? /* @__PURE__ */ jsx15("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx15("img", { src: tokenIcon, alt: entry.token.symbol }) }) : /* @__PURE__ */ jsx15("span", { className: "rs-asset-icon", children: entry.token.symbol.slice(0, 4) }),
|
|
3112
|
+
chainIcon && /* @__PURE__ */ jsx15("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx15("img", { src: chainIcon, alt: chainName }) })
|
|
2995
3113
|
] }),
|
|
2996
|
-
/* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
2998
|
-
/* @__PURE__ */
|
|
2999
|
-
/* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-asset-text", children: [
|
|
3115
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-asset-name-row", children: [
|
|
3116
|
+
/* @__PURE__ */ jsx15("span", { className: "rs-asset-name", children: entry.token.symbol }),
|
|
3117
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-asset-chain", children: [
|
|
3000
3118
|
"on ",
|
|
3001
3119
|
chainName
|
|
3002
3120
|
] })
|
|
3003
3121
|
] }),
|
|
3004
|
-
/* @__PURE__ */
|
|
3122
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-asset-balance-small", children: [
|
|
3005
3123
|
tokenAmount,
|
|
3006
3124
|
" ",
|
|
3007
3125
|
entry.token.symbol
|
|
3008
3126
|
] })
|
|
3009
3127
|
] })
|
|
3010
3128
|
] }),
|
|
3011
|
-
/* @__PURE__ */
|
|
3129
|
+
/* @__PURE__ */ jsx15("div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
3012
3130
|
]
|
|
3013
3131
|
},
|
|
3014
3132
|
entry.token.symbol
|
|
3015
3133
|
);
|
|
3016
3134
|
}) }),
|
|
3017
|
-
/* @__PURE__ */
|
|
3135
|
+
/* @__PURE__ */ jsx15(
|
|
3018
3136
|
Button,
|
|
3019
3137
|
{
|
|
3020
3138
|
onClick: () => selectedEntry && onContinue(
|
|
@@ -3028,14 +3146,14 @@ function SolanaTokenSelectStep({
|
|
|
3028
3146
|
}
|
|
3029
3147
|
)
|
|
3030
3148
|
] }),
|
|
3031
|
-
/* @__PURE__ */
|
|
3149
|
+
/* @__PURE__ */ jsx15(PoweredBy, {})
|
|
3032
3150
|
] });
|
|
3033
3151
|
}
|
|
3034
3152
|
|
|
3035
3153
|
// src/components/steps/SolanaAmountStep.tsx
|
|
3036
3154
|
import { useCallback as useCallback6, useEffect as useEffect9, useMemo as useMemo6, useRef as useRef7, useState as useState9 } from "react";
|
|
3037
3155
|
import { formatUnits as formatUnits5, parseUnits as parseUnits3 } from "viem";
|
|
3038
|
-
import { Fragment as Fragment2, jsx as
|
|
3156
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3039
3157
|
var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
|
|
3040
3158
|
var PRESETS2 = [
|
|
3041
3159
|
{ value: 25, label: "25%" },
|
|
@@ -3236,12 +3354,12 @@ function SolanaAmountStep({
|
|
|
3236
3354
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
3237
3355
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
3238
3356
|
const sourceTokenIcon = getTokenIcon(token.symbol);
|
|
3239
|
-
return /* @__PURE__ */
|
|
3240
|
-
/* @__PURE__ */
|
|
3241
|
-
/* @__PURE__ */
|
|
3242
|
-
/* @__PURE__ */
|
|
3243
|
-
/* @__PURE__ */
|
|
3244
|
-
/* @__PURE__ */
|
|
3357
|
+
return /* @__PURE__ */ jsxs14("div", { className: "rs-screen", children: [
|
|
3358
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3359
|
+
/* @__PURE__ */ jsx16(BodyHeader, { icon: /* @__PURE__ */ jsx16(WalletIcon, {}), title: "Wallet deposit" }),
|
|
3360
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-amount-section", children: [
|
|
3361
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-amount-display", children: [
|
|
3362
|
+
/* @__PURE__ */ jsx16(
|
|
3245
3363
|
AnimatedAmountInput,
|
|
3246
3364
|
{
|
|
3247
3365
|
value: amount,
|
|
@@ -3250,25 +3368,25 @@ function SolanaAmountStep({
|
|
|
3250
3368
|
autoFocus: true
|
|
3251
3369
|
}
|
|
3252
3370
|
),
|
|
3253
|
-
/* @__PURE__ */
|
|
3254
|
-
/* @__PURE__ */
|
|
3371
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-amount-meta", children: [
|
|
3372
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-amount-meta-balance", children: [
|
|
3255
3373
|
formattedBalance,
|
|
3256
3374
|
" ",
|
|
3257
3375
|
token.symbol,
|
|
3258
3376
|
" available",
|
|
3259
|
-
computedBalanceUsd !== null && /* @__PURE__ */
|
|
3377
|
+
computedBalanceUsd !== null && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
3260
3378
|
" (~",
|
|
3261
3379
|
currencyFormatter.format(computedBalanceUsd),
|
|
3262
3380
|
")"
|
|
3263
3381
|
] })
|
|
3264
3382
|
] }),
|
|
3265
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
3383
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs14("span", { className: "rs-amount-meta-minimum", children: [
|
|
3266
3384
|
"Min. deposit ",
|
|
3267
3385
|
currencyFormatter.format(minDepositUsd)
|
|
3268
3386
|
] })
|
|
3269
3387
|
] })
|
|
3270
3388
|
] }),
|
|
3271
|
-
/* @__PURE__ */
|
|
3389
|
+
/* @__PURE__ */ jsx16("div", { className: "rs-amount-presets", children: PRESETS2.map((preset) => /* @__PURE__ */ jsx16(
|
|
3272
3390
|
"button",
|
|
3273
3391
|
{
|
|
3274
3392
|
type: "button",
|
|
@@ -3279,36 +3397,36 @@ function SolanaAmountStep({
|
|
|
3279
3397
|
preset.value
|
|
3280
3398
|
)) })
|
|
3281
3399
|
] }),
|
|
3282
|
-
/* @__PURE__ */
|
|
3283
|
-
/* @__PURE__ */
|
|
3284
|
-
/* @__PURE__ */
|
|
3285
|
-
/* @__PURE__ */
|
|
3286
|
-
/* @__PURE__ */
|
|
3400
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-amount-details", children: [
|
|
3401
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-amount-detail-row", children: [
|
|
3402
|
+
/* @__PURE__ */ jsx16("span", { children: "You send" }),
|
|
3403
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-amount-detail-value", children: [
|
|
3404
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
3287
3405
|
"Solana ",
|
|
3288
3406
|
token.symbol
|
|
3289
3407
|
] }),
|
|
3290
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
3408
|
+
sourceTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: sourceTokenIcon, alt: "" }) })
|
|
3291
3409
|
] })
|
|
3292
3410
|
] }),
|
|
3293
|
-
targetChainName && targetTokenSymbol && /* @__PURE__ */
|
|
3294
|
-
/* @__PURE__ */
|
|
3295
|
-
/* @__PURE__ */
|
|
3296
|
-
/* @__PURE__ */
|
|
3411
|
+
targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs14("div", { className: "rs-amount-detail-row", children: [
|
|
3412
|
+
/* @__PURE__ */ jsx16("span", { children: "Receive" }),
|
|
3413
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-amount-detail-value", children: [
|
|
3414
|
+
/* @__PURE__ */ jsxs14("span", { children: [
|
|
3297
3415
|
targetChainName,
|
|
3298
3416
|
" ",
|
|
3299
3417
|
targetTokenSymbol
|
|
3300
3418
|
] }),
|
|
3301
|
-
targetTokenIcon && /* @__PURE__ */
|
|
3419
|
+
targetTokenIcon && /* @__PURE__ */ jsx16("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx16("img", { src: targetTokenIcon, alt: "" }) })
|
|
3302
3420
|
] })
|
|
3303
3421
|
] }),
|
|
3304
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
3305
|
-
/* @__PURE__ */
|
|
3306
|
-
/* @__PURE__ */
|
|
3422
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs14("div", { className: "rs-amount-detail-row", children: [
|
|
3423
|
+
/* @__PURE__ */ jsx16("span", { children: "Balance after deposit" }),
|
|
3424
|
+
/* @__PURE__ */ jsx16("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
3307
3425
|
] })
|
|
3308
3426
|
] }),
|
|
3309
|
-
targetChain === HYPERCORE_CHAIN_ID && /* @__PURE__ */
|
|
3310
|
-
error && /* @__PURE__ */
|
|
3311
|
-
/* @__PURE__ */
|
|
3427
|
+
targetChain === HYPERCORE_CHAIN_ID && /* @__PURE__ */ jsx16(Callout, { variant: "warning", children: "First deposit to a new HyperCore account includes a ~1 USDC activation fee." }),
|
|
3428
|
+
error && /* @__PURE__ */ jsx16(Callout, { variant: "error", children: error }),
|
|
3429
|
+
/* @__PURE__ */ jsx16(
|
|
3312
3430
|
Button,
|
|
3313
3431
|
{
|
|
3314
3432
|
onClick: handleContinue,
|
|
@@ -3318,7 +3436,7 @@ function SolanaAmountStep({
|
|
|
3318
3436
|
}
|
|
3319
3437
|
)
|
|
3320
3438
|
] }),
|
|
3321
|
-
/* @__PURE__ */
|
|
3439
|
+
/* @__PURE__ */ jsx16(PoweredBy, {})
|
|
3322
3440
|
] });
|
|
3323
3441
|
}
|
|
3324
3442
|
|
|
@@ -3431,7 +3549,7 @@ async function sendSolanaTransaction(provider, _connection, transaction) {
|
|
|
3431
3549
|
}
|
|
3432
3550
|
|
|
3433
3551
|
// src/components/steps/SolanaConfirmStep.tsx
|
|
3434
|
-
import { jsx as
|
|
3552
|
+
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3435
3553
|
function SolanaConfirmStep({
|
|
3436
3554
|
smartAccount,
|
|
3437
3555
|
solanaAddress,
|
|
@@ -3455,7 +3573,6 @@ function SolanaConfirmStep({
|
|
|
3455
3573
|
const [isSubmitting, setIsSubmitting] = useState10(false);
|
|
3456
3574
|
const [error, setError] = useState10(null);
|
|
3457
3575
|
const targetSymbol = getTargetTokenSymbol(targetToken, targetChain);
|
|
3458
|
-
const isSameToken = token.symbol.toUpperCase() === targetSymbol.toUpperCase();
|
|
3459
3576
|
const sourceChainName = getChainName("solana");
|
|
3460
3577
|
const targetChainName = getChainName(targetChain);
|
|
3461
3578
|
const sourceChainIcon = getChainIcon("solana");
|
|
@@ -3464,25 +3581,20 @@ function SolanaConfirmStep({
|
|
|
3464
3581
|
const targetTokenIcon = getTokenIcon(targetSymbol);
|
|
3465
3582
|
const feeSponsored = uiConfig?.feeSponsored ?? false;
|
|
3466
3583
|
const feeTooltip = uiConfig?.feeTooltip ?? (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.");
|
|
3467
|
-
const formattedAmount = sourceAmount &&
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
maximumFractionDigits: 6
|
|
3481
|
-
});
|
|
3482
|
-
}
|
|
3483
|
-
return formattedAmount;
|
|
3584
|
+
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? formatTokenAmount(Number(sourceAmount), token.symbol) ?? "0" : "0";
|
|
3585
|
+
const receiveDisplay = (() => {
|
|
3586
|
+
const usdValue = Number(targetAmount);
|
|
3587
|
+
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
3588
|
+
const estimate = formatReceiveEstimate({
|
|
3589
|
+
sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
|
|
3590
|
+
sourceSymbol: token.symbol,
|
|
3591
|
+
targetSymbol,
|
|
3592
|
+
sourceAmountUsd,
|
|
3593
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : {}
|
|
3594
|
+
});
|
|
3595
|
+
if (estimate !== void 0) return estimate;
|
|
3596
|
+
return sourceAmountUsd !== void 0 ? `~$${sourceAmountUsd.toFixed(2)}` : `${formattedAmount} ${token.symbol}`;
|
|
3484
3597
|
})();
|
|
3485
|
-
const receiveAmount = isSameToken ? formattedReceiveAmount : `~${formattedReceiveAmount}`;
|
|
3486
3598
|
const handleConfirm = async () => {
|
|
3487
3599
|
if (!solanaProvider) {
|
|
3488
3600
|
debugLog(debug, "solana-confirm", "submit:blocked", {
|
|
@@ -3572,66 +3684,62 @@ function SolanaConfirmStep({
|
|
|
3572
3684
|
setIsSubmitting(false);
|
|
3573
3685
|
}
|
|
3574
3686
|
};
|
|
3575
|
-
return /* @__PURE__ */
|
|
3576
|
-
/* @__PURE__ */
|
|
3577
|
-
/* @__PURE__ */
|
|
3578
|
-
/* @__PURE__ */
|
|
3579
|
-
/* @__PURE__ */
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
/* @__PURE__ */
|
|
3582
|
-
/* @__PURE__ */
|
|
3583
|
-
sourceChainIcon && /* @__PURE__ */
|
|
3687
|
+
return /* @__PURE__ */ jsxs15("div", { className: "rs-screen", children: [
|
|
3688
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3689
|
+
/* @__PURE__ */ jsx17(BodyHeader, { icon: /* @__PURE__ */ jsx17(WalletIcon, {}), title: "Review deposit" }),
|
|
3690
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-review-details", children: [
|
|
3691
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-review-detail-row", children: [
|
|
3692
|
+
/* @__PURE__ */ jsx17("span", { children: "Source chain" }),
|
|
3693
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-review-detail-value", children: [
|
|
3694
|
+
/* @__PURE__ */ jsx17("span", { children: sourceChainName }),
|
|
3695
|
+
sourceChainIcon && /* @__PURE__ */ jsx17("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx17("img", { src: sourceChainIcon, alt: "" }) })
|
|
3584
3696
|
] })
|
|
3585
3697
|
] }),
|
|
3586
|
-
/* @__PURE__ */
|
|
3587
|
-
/* @__PURE__ */
|
|
3588
|
-
/* @__PURE__ */
|
|
3589
|
-
/* @__PURE__ */
|
|
3590
|
-
targetChainIcon && /* @__PURE__ */
|
|
3698
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-review-detail-row", children: [
|
|
3699
|
+
/* @__PURE__ */ jsx17("span", { children: "Destination chain" }),
|
|
3700
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-review-detail-value", children: [
|
|
3701
|
+
/* @__PURE__ */ jsx17("span", { children: targetChainName }),
|
|
3702
|
+
targetChainIcon && /* @__PURE__ */ jsx17("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx17("img", { src: targetChainIcon, alt: "" }) })
|
|
3591
3703
|
] })
|
|
3592
3704
|
] }),
|
|
3593
|
-
/* @__PURE__ */
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
/* @__PURE__ */
|
|
3705
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-review-detail-row", children: [
|
|
3706
|
+
/* @__PURE__ */ jsx17("span", { children: "Estimated time" }),
|
|
3707
|
+
/* @__PURE__ */ jsx17("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
3596
3708
|
] }),
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
/* @__PURE__ */
|
|
3599
|
-
/* @__PURE__ */
|
|
3600
|
-
/* @__PURE__ */
|
|
3709
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-review-detail-row", children: [
|
|
3710
|
+
/* @__PURE__ */ jsx17("span", { children: "You send" }),
|
|
3711
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-review-detail-value", children: [
|
|
3712
|
+
/* @__PURE__ */ jsxs15("span", { children: [
|
|
3601
3713
|
formattedAmount,
|
|
3602
3714
|
" ",
|
|
3603
3715
|
token.symbol
|
|
3604
3716
|
] }),
|
|
3605
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
3717
|
+
sourceTokenIcon && /* @__PURE__ */ jsx17("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx17("img", { src: sourceTokenIcon, alt: "" }) })
|
|
3606
3718
|
] })
|
|
3607
3719
|
] }),
|
|
3608
|
-
/* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
/* @__PURE__ */
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
|
|
3613
|
-
" ",
|
|
3614
|
-
targetSymbol
|
|
3615
|
-
] }),
|
|
3616
|
-
targetTokenIcon && /* @__PURE__ */ jsx15("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx15("img", { src: targetTokenIcon, alt: "" }) })
|
|
3720
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-review-detail-row", children: [
|
|
3721
|
+
/* @__PURE__ */ jsx17("span", { children: "Receive" }),
|
|
3722
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-review-detail-value", children: [
|
|
3723
|
+
/* @__PURE__ */ jsx17("span", { children: receiveDisplay }),
|
|
3724
|
+
targetTokenIcon && /* @__PURE__ */ jsx17("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx17("img", { src: targetTokenIcon, alt: "" }) })
|
|
3617
3725
|
] })
|
|
3618
3726
|
] }),
|
|
3619
|
-
/* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3622
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-review-detail-row", children: [
|
|
3728
|
+
/* @__PURE__ */ jsx17("span", { children: "Fees" }),
|
|
3729
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-review-detail-value", children: [
|
|
3730
|
+
/* @__PURE__ */ jsx17(
|
|
3623
3731
|
"span",
|
|
3624
3732
|
{
|
|
3625
3733
|
style: feeSponsored ? { textDecoration: "line-through" } : void 0,
|
|
3626
3734
|
children: "$0.04"
|
|
3627
3735
|
}
|
|
3628
3736
|
),
|
|
3629
|
-
/* @__PURE__ */
|
|
3737
|
+
/* @__PURE__ */ jsx17(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx17("span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ jsx17(InfoIcon, {}) }) })
|
|
3630
3738
|
] })
|
|
3631
3739
|
] })
|
|
3632
3740
|
] }),
|
|
3633
|
-
error && /* @__PURE__ */
|
|
3634
|
-
/* @__PURE__ */
|
|
3741
|
+
error && /* @__PURE__ */ jsx17(Callout, { variant: "error", children: error }),
|
|
3742
|
+
/* @__PURE__ */ jsx17(
|
|
3635
3743
|
Button,
|
|
3636
3744
|
{
|
|
3637
3745
|
onClick: handleConfirm,
|
|
@@ -3643,28 +3751,28 @@ function SolanaConfirmStep({
|
|
|
3643
3751
|
}
|
|
3644
3752
|
)
|
|
3645
3753
|
] }),
|
|
3646
|
-
/* @__PURE__ */
|
|
3754
|
+
/* @__PURE__ */ jsx17(PoweredBy, {})
|
|
3647
3755
|
] });
|
|
3648
3756
|
}
|
|
3649
3757
|
|
|
3650
3758
|
// src/components/steps/DappImportAssetSelectStep.tsx
|
|
3651
|
-
import { jsx as
|
|
3759
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3652
3760
|
function DappImportAssetSelectStep({
|
|
3653
3761
|
sourceLabel,
|
|
3654
3762
|
assets,
|
|
3655
3763
|
onSelect
|
|
3656
3764
|
}) {
|
|
3657
|
-
return /* @__PURE__ */
|
|
3658
|
-
/* @__PURE__ */
|
|
3659
|
-
/* @__PURE__ */
|
|
3765
|
+
return /* @__PURE__ */ jsxs16("div", { className: "rs-screen", children: [
|
|
3766
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3767
|
+
/* @__PURE__ */ jsx18(
|
|
3660
3768
|
BodyHeader,
|
|
3661
3769
|
{
|
|
3662
|
-
icon: /* @__PURE__ */
|
|
3770
|
+
icon: /* @__PURE__ */ jsx18(WalletIcon, {}),
|
|
3663
3771
|
title: `Transfer from ${sourceLabel}`,
|
|
3664
3772
|
subtitle: "Pick the balance to import"
|
|
3665
3773
|
}
|
|
3666
3774
|
),
|
|
3667
|
-
/* @__PURE__ */
|
|
3775
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
3668
3776
|
const tokenAmount = asset.balance ? tokenFormatter.format(
|
|
3669
3777
|
Number(asset.balance) / 10 ** asset.decimals
|
|
3670
3778
|
) : "0";
|
|
@@ -3672,23 +3780,23 @@ function DappImportAssetSelectStep({
|
|
|
3672
3780
|
const tokenIcon = asset.icon ?? getTokenIcon(asset.symbol);
|
|
3673
3781
|
const chainIcon = getChainIcon(asset.chainId);
|
|
3674
3782
|
const badge = getChainBadge(asset.chainId);
|
|
3675
|
-
return /* @__PURE__ */
|
|
3783
|
+
return /* @__PURE__ */ jsxs16(
|
|
3676
3784
|
"button",
|
|
3677
3785
|
{
|
|
3678
3786
|
type: "button",
|
|
3679
3787
|
className: "rs-asset-row",
|
|
3680
3788
|
onClick: () => onSelect(asset),
|
|
3681
3789
|
children: [
|
|
3682
|
-
/* @__PURE__ */
|
|
3683
|
-
/* @__PURE__ */
|
|
3684
|
-
/* @__PURE__ */
|
|
3685
|
-
chainIcon ? /* @__PURE__ */
|
|
3790
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-info", children: [
|
|
3791
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3792
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-asset-icon", children: tokenIcon ? /* @__PURE__ */ jsx18("img", { src: tokenIcon, alt: asset.symbol }) : asset.symbol.slice(0, 4) }),
|
|
3793
|
+
chainIcon ? /* @__PURE__ */ jsx18("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx18(
|
|
3686
3794
|
"img",
|
|
3687
3795
|
{
|
|
3688
3796
|
src: chainIcon,
|
|
3689
3797
|
alt: getChainName(asset.chainId)
|
|
3690
3798
|
}
|
|
3691
|
-
) }) : /* @__PURE__ */
|
|
3799
|
+
) }) : /* @__PURE__ */ jsx18(
|
|
3692
3800
|
"span",
|
|
3693
3801
|
{
|
|
3694
3802
|
className: "rs-asset-chain-badge",
|
|
@@ -3697,86 +3805,86 @@ function DappImportAssetSelectStep({
|
|
|
3697
3805
|
}
|
|
3698
3806
|
)
|
|
3699
3807
|
] }),
|
|
3700
|
-
/* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3702
|
-
/* @__PURE__ */
|
|
3703
|
-
/* @__PURE__ */
|
|
3808
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-text", children: [
|
|
3809
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-name-row", children: [
|
|
3810
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
3811
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-asset-chain", children: [
|
|
3704
3812
|
"on ",
|
|
3705
3813
|
asset.sourceLabel
|
|
3706
3814
|
] })
|
|
3707
3815
|
] }),
|
|
3708
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-asset-balance-small", children: [
|
|
3709
3817
|
tokenAmount,
|
|
3710
3818
|
" ",
|
|
3711
3819
|
asset.symbol
|
|
3712
3820
|
] })
|
|
3713
3821
|
] })
|
|
3714
3822
|
] }),
|
|
3715
|
-
/* @__PURE__ */
|
|
3823
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-asset-balance", children: balanceUsd })
|
|
3716
3824
|
]
|
|
3717
3825
|
},
|
|
3718
3826
|
asset.id
|
|
3719
3827
|
);
|
|
3720
3828
|
}) })
|
|
3721
3829
|
] }),
|
|
3722
|
-
/* @__PURE__ */
|
|
3830
|
+
/* @__PURE__ */ jsx18(PoweredBy, {})
|
|
3723
3831
|
] });
|
|
3724
3832
|
}
|
|
3725
3833
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
3726
3834
|
|
|
3727
3835
|
// src/components/steps/DappImportAssetSelectSkeleton.tsx
|
|
3728
|
-
import { jsx as
|
|
3836
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3729
3837
|
function DappImportAssetSelectSkeleton({
|
|
3730
3838
|
sourceLabel,
|
|
3731
3839
|
rowCount = 3,
|
|
3732
3840
|
error = false,
|
|
3733
3841
|
onRetry
|
|
3734
3842
|
}) {
|
|
3735
|
-
return /* @__PURE__ */
|
|
3736
|
-
/* @__PURE__ */
|
|
3737
|
-
/* @__PURE__ */
|
|
3738
|
-
/* @__PURE__ */
|
|
3843
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-screen", "aria-busy": error ? "false" : "true", children: [
|
|
3844
|
+
/* @__PURE__ */ jsx19("span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
3845
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3846
|
+
/* @__PURE__ */ jsx19(
|
|
3739
3847
|
BodyHeader,
|
|
3740
3848
|
{
|
|
3741
|
-
icon: /* @__PURE__ */
|
|
3849
|
+
icon: /* @__PURE__ */ jsx19(WalletIcon, {}),
|
|
3742
3850
|
title: `Transfer from ${sourceLabel}`,
|
|
3743
3851
|
subtitle: "Pick the balance to import"
|
|
3744
3852
|
}
|
|
3745
3853
|
),
|
|
3746
|
-
error ? /* @__PURE__ */
|
|
3747
|
-
/* @__PURE__ */
|
|
3748
|
-
/* @__PURE__ */
|
|
3749
|
-
] }) }) : /* @__PURE__ */
|
|
3854
|
+
error ? /* @__PURE__ */ jsx19("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsxs17("div", { className: "rs-loading-text", children: [
|
|
3855
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t load your balances" }),
|
|
3856
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-loading-subtitle", children: "Check your connection and try again." })
|
|
3857
|
+
] }) }) : /* @__PURE__ */ jsx19("div", { className: "rs-asset-list", "aria-hidden": "true", children: Array.from({ length: rowCount }, (_, index) => /* @__PURE__ */ jsxs17(
|
|
3750
3858
|
"div",
|
|
3751
3859
|
{
|
|
3752
3860
|
className: "rs-asset-row rs-asset-row--skeleton",
|
|
3753
3861
|
children: [
|
|
3754
|
-
/* @__PURE__ */
|
|
3755
|
-
/* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
3757
|
-
/* @__PURE__ */
|
|
3862
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-asset-info", children: [
|
|
3863
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3864
|
+
/* @__PURE__ */ jsx19("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx19("span", { className: "rs-skeleton rs-skeleton-fill" }) }),
|
|
3865
|
+
/* @__PURE__ */ jsx19("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx19("span", { className: "rs-skeleton rs-skeleton-fill" }) })
|
|
3758
3866
|
] }),
|
|
3759
|
-
/* @__PURE__ */
|
|
3760
|
-
/* @__PURE__ */
|
|
3761
|
-
/* @__PURE__ */
|
|
3867
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-asset-text", children: [
|
|
3868
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-asset-name-row", children: /* @__PURE__ */ jsx19("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--name" }) }),
|
|
3869
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-asset-balance-small", children: /* @__PURE__ */ jsx19("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--balance" }) })
|
|
3762
3870
|
] })
|
|
3763
3871
|
] }),
|
|
3764
|
-
/* @__PURE__ */
|
|
3872
|
+
/* @__PURE__ */ jsx19("div", { className: "rs-asset-balance", children: /* @__PURE__ */ jsx19("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--usd" }) })
|
|
3765
3873
|
]
|
|
3766
3874
|
},
|
|
3767
3875
|
index
|
|
3768
3876
|
)) })
|
|
3769
3877
|
] }),
|
|
3770
|
-
error && onRetry && /* @__PURE__ */
|
|
3878
|
+
error && onRetry && /* @__PURE__ */ jsx19("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx19(
|
|
3771
3879
|
"button",
|
|
3772
3880
|
{
|
|
3773
3881
|
type: "button",
|
|
3774
3882
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
3775
3883
|
onClick: onRetry,
|
|
3776
|
-
children: /* @__PURE__ */
|
|
3884
|
+
children: /* @__PURE__ */ jsx19("span", { children: "Try again" })
|
|
3777
3885
|
}
|
|
3778
3886
|
) }),
|
|
3779
|
-
/* @__PURE__ */
|
|
3887
|
+
/* @__PURE__ */ jsx19(PoweredBy, {})
|
|
3780
3888
|
] });
|
|
3781
3889
|
}
|
|
3782
3890
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -5136,23 +5244,23 @@ function mapError(error) {
|
|
|
5136
5244
|
}
|
|
5137
5245
|
|
|
5138
5246
|
// src/DepositFlow.tsx
|
|
5139
|
-
import { Fragment as Fragment3, jsx as
|
|
5247
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5140
5248
|
function AccountPreparingSkeleton({
|
|
5141
5249
|
errorMessage,
|
|
5142
5250
|
onRetry
|
|
5143
5251
|
}) {
|
|
5144
|
-
return /* @__PURE__ */
|
|
5145
|
-
/* @__PURE__ */
|
|
5146
|
-
/* @__PURE__ */
|
|
5147
|
-
/* @__PURE__ */
|
|
5148
|
-
] }) : /* @__PURE__ */
|
|
5149
|
-
errorMessage && onRetry && /* @__PURE__ */
|
|
5252
|
+
return /* @__PURE__ */ jsxs18("div", { className: "rs-step", children: [
|
|
5253
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: /* @__PURE__ */ jsx20("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx20("div", { className: "rs-loading-text", children: errorMessage ? /* @__PURE__ */ jsxs18(Fragment3, { children: [
|
|
5254
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t prepare account" }),
|
|
5255
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-loading-subtitle", children: errorMessage })
|
|
5256
|
+
] }) : /* @__PURE__ */ jsx20("div", { className: "rs-loading-title", children: "Preparing\u2026" }) }) }) }),
|
|
5257
|
+
errorMessage && onRetry && /* @__PURE__ */ jsx20("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx20(
|
|
5150
5258
|
"button",
|
|
5151
5259
|
{
|
|
5152
5260
|
type: "button",
|
|
5153
5261
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
5154
5262
|
onClick: onRetry,
|
|
5155
|
-
children: /* @__PURE__ */
|
|
5263
|
+
children: /* @__PURE__ */ jsx20("span", { children: "Try again" })
|
|
5156
5264
|
}
|
|
5157
5265
|
) })
|
|
5158
5266
|
] });
|
|
@@ -5165,6 +5273,26 @@ function isSameRoute2(sourceChain, sourceToken, targetChain, targetToken) {
|
|
|
5165
5273
|
var SWAPPED_SOURCE_CHAIN = 8453;
|
|
5166
5274
|
var SWAPPED_SOURCE_TOKEN = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
|
|
5167
5275
|
var SWAPPED_SOURCE_DECIMALS = 6;
|
|
5276
|
+
var DEFAULT_FIAT_ONRAMP_METHODS = [
|
|
5277
|
+
{
|
|
5278
|
+
method: "creditcard",
|
|
5279
|
+
label: "Debit/Credit card",
|
|
5280
|
+
sublabel: "Instant - $10,000 limit",
|
|
5281
|
+
icon: "card"
|
|
5282
|
+
},
|
|
5283
|
+
{
|
|
5284
|
+
method: "bank-transfer",
|
|
5285
|
+
label: "Bank transfer",
|
|
5286
|
+
sublabel: "Instant - $10,000 limit",
|
|
5287
|
+
icon: "bank"
|
|
5288
|
+
},
|
|
5289
|
+
{
|
|
5290
|
+
method: "apple-pay",
|
|
5291
|
+
label: "Apple pay",
|
|
5292
|
+
sublabel: "Instant - $10,000 limit",
|
|
5293
|
+
icon: "apple"
|
|
5294
|
+
}
|
|
5295
|
+
];
|
|
5168
5296
|
function getAddressKey(address) {
|
|
5169
5297
|
return address ? address.toLowerCase() : null;
|
|
5170
5298
|
}
|
|
@@ -6568,7 +6696,7 @@ function DepositFlow({
|
|
|
6568
6696
|
[storeApi]
|
|
6569
6697
|
);
|
|
6570
6698
|
if (showConnectStep) {
|
|
6571
|
-
return /* @__PURE__ */
|
|
6699
|
+
return /* @__PURE__ */ jsx20("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx20(
|
|
6572
6700
|
ConnectStep,
|
|
6573
6701
|
{
|
|
6574
6702
|
walletRows,
|
|
@@ -6581,8 +6709,7 @@ function DepositFlow({
|
|
|
6581
6709
|
}
|
|
6582
6710
|
handleSelectTransferCrypto();
|
|
6583
6711
|
} : void 0,
|
|
6584
|
-
|
|
6585
|
-
fiatPaymentMethods: enableFiatOnramp && dappAddress ? fiatOnrampMethods : void 0,
|
|
6712
|
+
fiatPaymentMethods: enableFiatOnramp && dappAddress ? fiatOnrampMethods && fiatOnrampMethods.length > 0 ? fiatOnrampMethods : DEFAULT_FIAT_ONRAMP_METHODS : void 0,
|
|
6586
6713
|
onSelectFiatMethod: enableFiatOnramp && dappAddress ? (method) => handleSelectFiatMethod(method) : void 0,
|
|
6587
6714
|
onSelectFundFromExchange: enableExchangeConnect && dappAddress ? () => handleSelectExchange() : void 0,
|
|
6588
6715
|
onRequestConnect,
|
|
@@ -6625,21 +6752,21 @@ function DepositFlow({
|
|
|
6625
6752
|
}
|
|
6626
6753
|
if (isDepositAddressMode) {
|
|
6627
6754
|
if (!dappAddress) return null;
|
|
6628
|
-
return /* @__PURE__ */
|
|
6629
|
-
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */
|
|
6755
|
+
return /* @__PURE__ */ jsxs18("div", { className: "rs-modal-body", children: [
|
|
6756
|
+
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */ jsx20(
|
|
6630
6757
|
AccountPreparingSkeleton,
|
|
6631
6758
|
{
|
|
6632
6759
|
errorMessage: activeEntry.message ?? void 0,
|
|
6633
6760
|
onRetry: () => handleRetrySetup(dappAddress)
|
|
6634
6761
|
}
|
|
6635
|
-
) : /* @__PURE__ */
|
|
6762
|
+
) : /* @__PURE__ */ jsx20(
|
|
6636
6763
|
DepositAddressSkeleton,
|
|
6637
6764
|
{
|
|
6638
6765
|
uiConfig,
|
|
6639
6766
|
allowedRoutes
|
|
6640
6767
|
}
|
|
6641
6768
|
)),
|
|
6642
|
-
effectiveStep.type === "deposit-address" && /* @__PURE__ */
|
|
6769
|
+
effectiveStep.type === "deposit-address" && /* @__PURE__ */ jsx20(
|
|
6643
6770
|
DepositAddressStep,
|
|
6644
6771
|
{
|
|
6645
6772
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -6672,21 +6799,21 @@ function DepositFlow({
|
|
|
6672
6799
|
}
|
|
6673
6800
|
if (isFiatOnrampMode) {
|
|
6674
6801
|
if (!dappAddress) return null;
|
|
6675
|
-
return /* @__PURE__ */
|
|
6802
|
+
return /* @__PURE__ */ jsxs18(
|
|
6676
6803
|
"div",
|
|
6677
6804
|
{
|
|
6678
6805
|
className: "rs-modal-body",
|
|
6679
6806
|
"data-flow-mode": "fiat-onramp",
|
|
6680
6807
|
"data-step-type": step.type,
|
|
6681
6808
|
children: [
|
|
6682
|
-
step.type === "setup" && /* @__PURE__ */
|
|
6809
|
+
step.type === "setup" && /* @__PURE__ */ jsx20(
|
|
6683
6810
|
AccountPreparingSkeleton,
|
|
6684
6811
|
{
|
|
6685
6812
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6686
6813
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6687
6814
|
}
|
|
6688
6815
|
),
|
|
6689
|
-
step.type === "fiat-onramp" && /* @__PURE__ */
|
|
6816
|
+
step.type === "fiat-onramp" && /* @__PURE__ */ jsx20(
|
|
6690
6817
|
FiatOnrampStep,
|
|
6691
6818
|
{
|
|
6692
6819
|
smartAccount: step.smartAccount,
|
|
@@ -6699,7 +6826,7 @@ function DepositFlow({
|
|
|
6699
6826
|
onError: handleError
|
|
6700
6827
|
}
|
|
6701
6828
|
),
|
|
6702
|
-
step.type === "processing" && /* @__PURE__ */
|
|
6829
|
+
step.type === "processing" && /* @__PURE__ */ jsx20(
|
|
6703
6830
|
ProcessingStep,
|
|
6704
6831
|
{
|
|
6705
6832
|
smartAccount: step.smartAccount,
|
|
@@ -6731,21 +6858,21 @@ function DepositFlow({
|
|
|
6731
6858
|
}
|
|
6732
6859
|
if (isExchangeConnectMode) {
|
|
6733
6860
|
if (!dappAddress) return null;
|
|
6734
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ jsxs18(
|
|
6735
6862
|
"div",
|
|
6736
6863
|
{
|
|
6737
6864
|
className: "rs-modal-body",
|
|
6738
6865
|
"data-flow-mode": "exchange-connect",
|
|
6739
6866
|
"data-step-type": step.type,
|
|
6740
6867
|
children: [
|
|
6741
|
-
step.type === "setup" && /* @__PURE__ */
|
|
6868
|
+
step.type === "setup" && /* @__PURE__ */ jsx20(
|
|
6742
6869
|
AccountPreparingSkeleton,
|
|
6743
6870
|
{
|
|
6744
6871
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6745
6872
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6746
6873
|
}
|
|
6747
6874
|
),
|
|
6748
|
-
step.type === "exchange-select" && /* @__PURE__ */
|
|
6875
|
+
step.type === "exchange-select" && /* @__PURE__ */ jsx20(
|
|
6749
6876
|
ExchangeSelectStep,
|
|
6750
6877
|
{
|
|
6751
6878
|
service,
|
|
@@ -6753,7 +6880,7 @@ function DepositFlow({
|
|
|
6753
6880
|
onError: handleError
|
|
6754
6881
|
}
|
|
6755
6882
|
),
|
|
6756
|
-
step.type === "exchange-connect" && /* @__PURE__ */
|
|
6883
|
+
step.type === "exchange-connect" && /* @__PURE__ */ jsx20(
|
|
6757
6884
|
ExchangeConnectStep,
|
|
6758
6885
|
{
|
|
6759
6886
|
smartAccount: step.smartAccount,
|
|
@@ -6766,7 +6893,7 @@ function DepositFlow({
|
|
|
6766
6893
|
onError: handleError
|
|
6767
6894
|
}
|
|
6768
6895
|
),
|
|
6769
|
-
step.type === "processing" && /* @__PURE__ */
|
|
6896
|
+
step.type === "processing" && /* @__PURE__ */ jsx20(
|
|
6770
6897
|
ProcessingStep,
|
|
6771
6898
|
{
|
|
6772
6899
|
smartAccount: step.smartAccount,
|
|
@@ -6800,15 +6927,15 @@ function DepositFlow({
|
|
|
6800
6927
|
if (!dappAddress) return null;
|
|
6801
6928
|
const solanaAddr = reownWallet?.solanaAddress;
|
|
6802
6929
|
const solanaProvider = reownWallet?.solanaProvider;
|
|
6803
|
-
return /* @__PURE__ */
|
|
6804
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
6930
|
+
return /* @__PURE__ */ jsxs18("div", { className: "rs-modal-body", children: [
|
|
6931
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx20(
|
|
6805
6932
|
AccountPreparingSkeleton,
|
|
6806
6933
|
{
|
|
6807
6934
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6808
6935
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
6809
6936
|
}
|
|
6810
6937
|
),
|
|
6811
|
-
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */
|
|
6938
|
+
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */ jsx20(
|
|
6812
6939
|
SolanaTokenSelectStep,
|
|
6813
6940
|
{
|
|
6814
6941
|
solanaAddress: solanaAddr,
|
|
@@ -6822,7 +6949,7 @@ function DepositFlow({
|
|
|
6822
6949
|
debug
|
|
6823
6950
|
}
|
|
6824
6951
|
),
|
|
6825
|
-
effectiveStep.type === "solana-amount" && /* @__PURE__ */
|
|
6952
|
+
effectiveStep.type === "solana-amount" && /* @__PURE__ */ jsx20(
|
|
6826
6953
|
SolanaAmountStep,
|
|
6827
6954
|
{
|
|
6828
6955
|
token: effectiveStep.token,
|
|
@@ -6841,7 +6968,7 @@ function DepositFlow({
|
|
|
6841
6968
|
debug
|
|
6842
6969
|
}
|
|
6843
6970
|
),
|
|
6844
|
-
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */
|
|
6971
|
+
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */ jsx20(
|
|
6845
6972
|
SolanaConfirmStep,
|
|
6846
6973
|
{
|
|
6847
6974
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -6862,16 +6989,16 @@ function DepositFlow({
|
|
|
6862
6989
|
onError: handleError,
|
|
6863
6990
|
debug
|
|
6864
6991
|
}
|
|
6865
|
-
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */
|
|
6866
|
-
/* @__PURE__ */
|
|
6867
|
-
/* @__PURE__ */
|
|
6992
|
+
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */ jsxs18("div", { className: "rs-step", children: [
|
|
6993
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-loading-state", children: [
|
|
6994
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx20(
|
|
6868
6995
|
"svg",
|
|
6869
6996
|
{
|
|
6870
6997
|
viewBox: "0 0 24 24",
|
|
6871
6998
|
fill: "none",
|
|
6872
6999
|
stroke: "currentColor",
|
|
6873
7000
|
strokeWidth: "2",
|
|
6874
|
-
children: /* @__PURE__ */
|
|
7001
|
+
children: /* @__PURE__ */ jsx20(
|
|
6875
7002
|
"path",
|
|
6876
7003
|
{
|
|
6877
7004
|
strokeLinecap: "round",
|
|
@@ -6881,22 +7008,22 @@ function DepositFlow({
|
|
|
6881
7008
|
)
|
|
6882
7009
|
}
|
|
6883
7010
|
) }),
|
|
6884
|
-
/* @__PURE__ */
|
|
6885
|
-
/* @__PURE__ */
|
|
6886
|
-
/* @__PURE__ */
|
|
7011
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-loading-text", children: [
|
|
7012
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
|
|
7013
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
|
|
6887
7014
|
] })
|
|
6888
7015
|
] }),
|
|
6889
|
-
/* @__PURE__ */
|
|
7016
|
+
/* @__PURE__ */ jsx20("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx20(
|
|
6890
7017
|
"button",
|
|
6891
7018
|
{
|
|
6892
7019
|
type: "button",
|
|
6893
7020
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
6894
7021
|
onClick: handleBack,
|
|
6895
|
-
children: /* @__PURE__ */
|
|
7022
|
+
children: /* @__PURE__ */ jsx20("span", { children: "Go Back" })
|
|
6896
7023
|
}
|
|
6897
7024
|
) })
|
|
6898
7025
|
] }) : null,
|
|
6899
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
7026
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx20(
|
|
6900
7027
|
ProcessingStep,
|
|
6901
7028
|
{
|
|
6902
7029
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -6924,13 +7051,13 @@ function DepositFlow({
|
|
|
6924
7051
|
] });
|
|
6925
7052
|
}
|
|
6926
7053
|
if (isDappImportMode && effectiveStep.type === "dapp-import-resolving") {
|
|
6927
|
-
return /* @__PURE__ */
|
|
7054
|
+
return /* @__PURE__ */ jsx20(
|
|
6928
7055
|
"div",
|
|
6929
7056
|
{
|
|
6930
7057
|
className: "rs-modal-body",
|
|
6931
7058
|
"data-flow-mode": "dapp-import",
|
|
6932
7059
|
"data-step-type": effectiveStep.type,
|
|
6933
|
-
children: /* @__PURE__ */
|
|
7060
|
+
children: /* @__PURE__ */ jsx20(
|
|
6934
7061
|
DappImportAssetSelectSkeleton,
|
|
6935
7062
|
{
|
|
6936
7063
|
sourceLabel: activeDappImportProvider?.sourceLabel ?? "",
|
|
@@ -6942,7 +7069,7 @@ function DepositFlow({
|
|
|
6942
7069
|
);
|
|
6943
7070
|
}
|
|
6944
7071
|
if (!signerContext?.walletClient || !signerContext?.publicClient) {
|
|
6945
|
-
return /* @__PURE__ */
|
|
7072
|
+
return /* @__PURE__ */ jsx20("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx20("div", { className: "rs-step", children: /* @__PURE__ */ jsx20("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx20("div", { className: "rs-loading-text", children: /* @__PURE__ */ jsx20("div", { className: "rs-loading-title", children: "Connecting wallet\u2026" }) }) }) }) });
|
|
6946
7073
|
}
|
|
6947
7074
|
const ownerAddress = signerContext.ownerAddress;
|
|
6948
7075
|
const ownerChainId = signerContext.walletClient?.chain?.id ?? signerContext.publicClient.chain?.id ?? setupChainId;
|
|
@@ -6952,15 +7079,15 @@ function DepositFlow({
|
|
|
6952
7079
|
}
|
|
6953
7080
|
return getPublicClient(chainId);
|
|
6954
7081
|
};
|
|
6955
|
-
return /* @__PURE__ */
|
|
6956
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
7082
|
+
return /* @__PURE__ */ jsxs18("div", { className: "rs-modal-body", children: [
|
|
7083
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx20(
|
|
6957
7084
|
AccountPreparingSkeleton,
|
|
6958
7085
|
{
|
|
6959
7086
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
6960
7087
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(ownerAddress) : void 0
|
|
6961
7088
|
}
|
|
6962
7089
|
),
|
|
6963
|
-
effectiveStep.type === "select-asset" && /* @__PURE__ */
|
|
7090
|
+
effectiveStep.type === "select-asset" && /* @__PURE__ */ jsx20(
|
|
6964
7091
|
AssetSelectStep,
|
|
6965
7092
|
{
|
|
6966
7093
|
address: ownerAddress,
|
|
@@ -6978,7 +7105,7 @@ function DepositFlow({
|
|
|
6978
7105
|
} : void 0
|
|
6979
7106
|
}
|
|
6980
7107
|
),
|
|
6981
|
-
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */
|
|
7108
|
+
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */ jsx20(
|
|
6982
7109
|
DappImportAssetSelectStep,
|
|
6983
7110
|
{
|
|
6984
7111
|
sourceLabel: activeDappImportAvailability.assets[0]?.sourceLabel ?? activeDappImportProvider.sourceLabel,
|
|
@@ -6986,7 +7113,7 @@ function DepositFlow({
|
|
|
6986
7113
|
onSelect: handleDappImportAssetSelected
|
|
6987
7114
|
}
|
|
6988
7115
|
),
|
|
6989
|
-
effectiveStep.type === "amount" && /* @__PURE__ */
|
|
7116
|
+
effectiveStep.type === "amount" && /* @__PURE__ */ jsx20(
|
|
6990
7117
|
AmountStep,
|
|
6991
7118
|
{
|
|
6992
7119
|
walletClient: signerContext.walletClient,
|
|
@@ -7018,7 +7145,7 @@ function DepositFlow({
|
|
|
7018
7145
|
}
|
|
7019
7146
|
}
|
|
7020
7147
|
),
|
|
7021
|
-
effectiveStep.type === "confirm" && /* @__PURE__ */
|
|
7148
|
+
effectiveStep.type === "confirm" && /* @__PURE__ */ jsx20(
|
|
7022
7149
|
ConfirmStep,
|
|
7023
7150
|
{
|
|
7024
7151
|
walletClient: signerContext.walletClient,
|
|
@@ -7059,7 +7186,7 @@ function DepositFlow({
|
|
|
7059
7186
|
onError: handleError
|
|
7060
7187
|
}
|
|
7061
7188
|
),
|
|
7062
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
7189
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx20(
|
|
7063
7190
|
ProcessingStep,
|
|
7064
7191
|
{
|
|
7065
7192
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -7091,7 +7218,7 @@ function DepositFlow({
|
|
|
7091
7218
|
|
|
7092
7219
|
// src/components/history/DepositHistoryPanel.tsx
|
|
7093
7220
|
import { useCallback as useCallback8, useMemo as useMemo8, useState as useState12 } from "react";
|
|
7094
|
-
import { jsx as
|
|
7221
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
7095
7222
|
function shortenHash(hash) {
|
|
7096
7223
|
if (hash.length <= 14) return hash;
|
|
7097
7224
|
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
@@ -7218,7 +7345,7 @@ function DepositHistoryPanel({
|
|
|
7218
7345
|
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
7219
7346
|
);
|
|
7220
7347
|
}, [deposits]);
|
|
7221
|
-
return /* @__PURE__ */
|
|
7348
|
+
return /* @__PURE__ */ jsxs19(
|
|
7222
7349
|
"div",
|
|
7223
7350
|
{
|
|
7224
7351
|
className: "rs-history-panel",
|
|
@@ -7226,55 +7353,55 @@ function DepositHistoryPanel({
|
|
|
7226
7353
|
"aria-label": "Deposit history",
|
|
7227
7354
|
onKeyDown: handleKeyDown,
|
|
7228
7355
|
children: [
|
|
7229
|
-
/* @__PURE__ */
|
|
7230
|
-
/* @__PURE__ */
|
|
7356
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-modal-header--redesigned", children: [
|
|
7357
|
+
/* @__PURE__ */ jsx21("div", { className: "rs-modal-header-nav-left", children: /* @__PURE__ */ jsx21(
|
|
7231
7358
|
"button",
|
|
7232
7359
|
{
|
|
7233
7360
|
type: "button",
|
|
7234
7361
|
className: "rs-modal-header-back",
|
|
7235
7362
|
"aria-label": "Back",
|
|
7236
7363
|
onClick: onClose,
|
|
7237
|
-
children: /* @__PURE__ */
|
|
7364
|
+
children: /* @__PURE__ */ jsx21(ChevronLeftIcon, {})
|
|
7238
7365
|
}
|
|
7239
7366
|
) }),
|
|
7240
|
-
/* @__PURE__ */
|
|
7367
|
+
/* @__PURE__ */ jsx21("div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ jsx21(
|
|
7241
7368
|
"button",
|
|
7242
7369
|
{
|
|
7243
7370
|
type: "button",
|
|
7244
7371
|
className: "rs-modal-close",
|
|
7245
7372
|
"aria-label": "Close",
|
|
7246
7373
|
onClick: onCloseModal,
|
|
7247
|
-
children: /* @__PURE__ */
|
|
7374
|
+
children: /* @__PURE__ */ jsx21(CloseIcon, {})
|
|
7248
7375
|
}
|
|
7249
7376
|
) })
|
|
7250
7377
|
] }),
|
|
7251
|
-
/* @__PURE__ */
|
|
7252
|
-
/* @__PURE__ */
|
|
7253
|
-
/* @__PURE__ */
|
|
7254
|
-
isLoading && deposits.length === 0 && /* @__PURE__ */
|
|
7255
|
-
/* @__PURE__ */
|
|
7256
|
-
/* @__PURE__ */
|
|
7257
|
-
/* @__PURE__ */
|
|
7258
|
-
/* @__PURE__ */
|
|
7378
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-screen", children: [
|
|
7379
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-screen-body", children: [
|
|
7380
|
+
/* @__PURE__ */ jsx21(BodyHeader, { icon: /* @__PURE__ */ jsx21(HistoryIcon, {}), title: "History" }),
|
|
7381
|
+
isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs19("div", { className: "rs-history-empty", children: [
|
|
7382
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(HistoryIcon, {}) }),
|
|
7383
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-empty-text", children: [
|
|
7384
|
+
/* @__PURE__ */ jsx21(Spinner, { className: "rs-spinner--sm" }),
|
|
7385
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
7259
7386
|
] })
|
|
7260
7387
|
] }),
|
|
7261
|
-
error && !isLoading && /* @__PURE__ */
|
|
7262
|
-
/* @__PURE__ */
|
|
7263
|
-
/* @__PURE__ */
|
|
7264
|
-
/* @__PURE__ */
|
|
7265
|
-
/* @__PURE__ */
|
|
7388
|
+
error && !isLoading && /* @__PURE__ */ jsxs19("div", { className: "rs-history-empty", children: [
|
|
7389
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(AlertTriangleIcon, {}) }),
|
|
7390
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-empty-text", children: [
|
|
7391
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
7392
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-hint", children: error })
|
|
7266
7393
|
] })
|
|
7267
7394
|
] }),
|
|
7268
|
-
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */
|
|
7269
|
-
/* @__PURE__ */
|
|
7270
|
-
/* @__PURE__ */
|
|
7271
|
-
/* @__PURE__ */
|
|
7272
|
-
/* @__PURE__ */
|
|
7395
|
+
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ jsxs19("div", { className: "rs-history-empty", children: [
|
|
7396
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(HistoryIcon, {}) }),
|
|
7397
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-empty-text", children: [
|
|
7398
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
7399
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
7273
7400
|
] })
|
|
7274
7401
|
] }),
|
|
7275
|
-
visibleDeposits.length > 0 && /* @__PURE__ */
|
|
7276
|
-
visibleDeposits.map((deposit, i) => /* @__PURE__ */
|
|
7277
|
-
hasMore && /* @__PURE__ */
|
|
7402
|
+
visibleDeposits.length > 0 && /* @__PURE__ */ jsxs19("div", { className: "rs-history-list", children: [
|
|
7403
|
+
visibleDeposits.map((deposit, i) => /* @__PURE__ */ jsx21(HistoryCard, { deposit }, deposit.txHash || i)),
|
|
7404
|
+
hasMore && /* @__PURE__ */ jsx21(
|
|
7278
7405
|
"button",
|
|
7279
7406
|
{
|
|
7280
7407
|
type: "button",
|
|
@@ -7286,7 +7413,7 @@ function DepositHistoryPanel({
|
|
|
7286
7413
|
)
|
|
7287
7414
|
] })
|
|
7288
7415
|
] }),
|
|
7289
|
-
/* @__PURE__ */
|
|
7416
|
+
/* @__PURE__ */ jsx21(PoweredBy, {})
|
|
7290
7417
|
] })
|
|
7291
7418
|
]
|
|
7292
7419
|
}
|
|
@@ -7312,7 +7439,7 @@ function HistoryCard({ deposit }) {
|
|
|
7312
7439
|
const date = deposit.createdAt ? formatDate(deposit.createdAt) : null;
|
|
7313
7440
|
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
7314
7441
|
const srcTxUrl = deposit.sourceTxHash ? getTxExplorerUrl(deposit.sourceTxHash, sourceChainId) : null;
|
|
7315
|
-
return /* @__PURE__ */
|
|
7442
|
+
return /* @__PURE__ */ jsxs19(
|
|
7316
7443
|
"button",
|
|
7317
7444
|
{
|
|
7318
7445
|
type: "button",
|
|
@@ -7320,38 +7447,38 @@ function HistoryCard({ deposit }) {
|
|
|
7320
7447
|
onClick: () => setExpanded((v) => !v),
|
|
7321
7448
|
"aria-expanded": expanded,
|
|
7322
7449
|
children: [
|
|
7323
|
-
/* @__PURE__ */
|
|
7324
|
-
/* @__PURE__ */
|
|
7325
|
-
/* @__PURE__ */
|
|
7326
|
-
sourceChainIcon && /* @__PURE__ */
|
|
7450
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-card-row", children: [
|
|
7451
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-card-icons", children: [
|
|
7452
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-card-token", children: sourceTokenIcon ? /* @__PURE__ */ jsx21("img", { src: sourceTokenIcon, alt: "" }) : sourceSymbol.slice(0, 2) }),
|
|
7453
|
+
sourceChainIcon && /* @__PURE__ */ jsx21("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx21("img", { src: sourceChainIcon, alt: "" }) })
|
|
7327
7454
|
] }),
|
|
7328
|
-
/* @__PURE__ */
|
|
7329
|
-
/* @__PURE__ */
|
|
7330
|
-
date && /* @__PURE__ */
|
|
7455
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-card-text", children: [
|
|
7456
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
7457
|
+
date && /* @__PURE__ */ jsx21("span", { className: "rs-history-card-date", children: date })
|
|
7331
7458
|
] }),
|
|
7332
|
-
/* @__PURE__ */
|
|
7333
|
-
/* @__PURE__ */
|
|
7334
|
-
/* @__PURE__ */
|
|
7459
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-history-card-side", children: [
|
|
7460
|
+
/* @__PURE__ */ jsx21("span", { className: "rs-history-card-amount", children: displayAmount }),
|
|
7461
|
+
/* @__PURE__ */ jsx21("span", { className: `rs-history-badge rs-history-badge--${status}`, children: STATUS_LABEL[status] })
|
|
7335
7462
|
] })
|
|
7336
7463
|
] }),
|
|
7337
|
-
/* @__PURE__ */
|
|
7338
|
-
sourceChainName && /* @__PURE__ */
|
|
7339
|
-
/* @__PURE__ */
|
|
7340
|
-
/* @__PURE__ */
|
|
7341
|
-
/* @__PURE__ */
|
|
7342
|
-
sourceChainIcon && /* @__PURE__ */
|
|
7464
|
+
/* @__PURE__ */ jsx21("div", { className: "rs-history-card-panel", children: /* @__PURE__ */ jsx21("div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */ jsxs19("div", { className: "rs-history-card-details", children: [
|
|
7465
|
+
sourceChainName && /* @__PURE__ */ jsxs19("div", { className: "rs-amount-detail-row", children: [
|
|
7466
|
+
/* @__PURE__ */ jsx21("span", { children: "Source chain" }),
|
|
7467
|
+
/* @__PURE__ */ jsxs19("span", { className: "rs-amount-detail-value", children: [
|
|
7468
|
+
/* @__PURE__ */ jsx21("span", { children: sourceChainName }),
|
|
7469
|
+
sourceChainIcon && /* @__PURE__ */ jsx21("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx21("img", { src: sourceChainIcon, alt: "" }) })
|
|
7343
7470
|
] })
|
|
7344
7471
|
] }),
|
|
7345
|
-
targetChainName && /* @__PURE__ */
|
|
7346
|
-
/* @__PURE__ */
|
|
7347
|
-
/* @__PURE__ */
|
|
7348
|
-
/* @__PURE__ */
|
|
7349
|
-
targetChainIcon && /* @__PURE__ */
|
|
7472
|
+
targetChainName && /* @__PURE__ */ jsxs19("div", { className: "rs-amount-detail-row", children: [
|
|
7473
|
+
/* @__PURE__ */ jsx21("span", { children: "Destination chain" }),
|
|
7474
|
+
/* @__PURE__ */ jsxs19("span", { className: "rs-amount-detail-value", children: [
|
|
7475
|
+
/* @__PURE__ */ jsx21("span", { children: targetChainName }),
|
|
7476
|
+
targetChainIcon && /* @__PURE__ */ jsx21("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx21("img", { src: targetChainIcon, alt: "" }) })
|
|
7350
7477
|
] })
|
|
7351
7478
|
] }),
|
|
7352
|
-
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */
|
|
7353
|
-
/* @__PURE__ */
|
|
7354
|
-
/* @__PURE__ */
|
|
7479
|
+
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */ jsxs19("div", { className: "rs-amount-detail-row", children: [
|
|
7480
|
+
/* @__PURE__ */ jsx21("span", { children: "Transaction details" }),
|
|
7481
|
+
/* @__PURE__ */ jsxs19(
|
|
7355
7482
|
"a",
|
|
7356
7483
|
{
|
|
7357
7484
|
href: srcTxUrl,
|
|
@@ -7360,8 +7487,8 @@ function HistoryCard({ deposit }) {
|
|
|
7360
7487
|
className: "rs-history-card-link",
|
|
7361
7488
|
onClick: (e) => e.stopPropagation(),
|
|
7362
7489
|
children: [
|
|
7363
|
-
/* @__PURE__ */
|
|
7364
|
-
/* @__PURE__ */
|
|
7490
|
+
/* @__PURE__ */ jsx21("span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
7491
|
+
/* @__PURE__ */ jsx21(ArrowUpRightIcon, {})
|
|
7365
7492
|
]
|
|
7366
7493
|
}
|
|
7367
7494
|
)
|
|
@@ -7374,9 +7501,9 @@ function HistoryCard({ deposit }) {
|
|
|
7374
7501
|
DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
7375
7502
|
|
|
7376
7503
|
// src/DepositModal.tsx
|
|
7377
|
-
import { jsx as
|
|
7504
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
7378
7505
|
var ReownDepositInner = lazy2(
|
|
7379
|
-
() => import("./DepositModalReown-
|
|
7506
|
+
() => import("./DepositModalReown-PC7EX5VK.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
7380
7507
|
);
|
|
7381
7508
|
function sortByCreatedAtDesc(items) {
|
|
7382
7509
|
return [...items].sort((a, b) => {
|
|
@@ -7392,7 +7519,7 @@ function DepositModal(props) {
|
|
|
7392
7519
|
"dappWalletClient"
|
|
7393
7520
|
);
|
|
7394
7521
|
if (needsReown) {
|
|
7395
|
-
return /* @__PURE__ */
|
|
7522
|
+
return /* @__PURE__ */ jsx22(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx22(
|
|
7396
7523
|
ReownDepositInner,
|
|
7397
7524
|
{
|
|
7398
7525
|
...props,
|
|
@@ -7400,7 +7527,7 @@ function DepositModal(props) {
|
|
|
7400
7527
|
}
|
|
7401
7528
|
) });
|
|
7402
7529
|
}
|
|
7403
|
-
return /* @__PURE__ */
|
|
7530
|
+
return /* @__PURE__ */ jsx22(
|
|
7404
7531
|
DepositModalInner,
|
|
7405
7532
|
{
|
|
7406
7533
|
...props,
|
|
@@ -7630,7 +7757,7 @@ function DepositModalInner({
|
|
|
7630
7757
|
}, [isOpen, store]);
|
|
7631
7758
|
const showBackButton = uiConfig?.showBackButton ?? true;
|
|
7632
7759
|
const canGoBack = backHandler !== void 0;
|
|
7633
|
-
return /* @__PURE__ */
|
|
7760
|
+
return /* @__PURE__ */ jsx22(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx22(
|
|
7634
7761
|
Modal,
|
|
7635
7762
|
{
|
|
7636
7763
|
isOpen,
|
|
@@ -7638,20 +7765,20 @@ function DepositModalInner({
|
|
|
7638
7765
|
className,
|
|
7639
7766
|
inline,
|
|
7640
7767
|
closeOnOverlayClick,
|
|
7641
|
-
children: /* @__PURE__ */
|
|
7642
|
-
/* @__PURE__ */
|
|
7643
|
-
/* @__PURE__ */
|
|
7768
|
+
children: /* @__PURE__ */ jsxs20("div", { ref: modalRef, className: "rs-modal", children: [
|
|
7769
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-modal-header--redesigned", children: [
|
|
7770
|
+
/* @__PURE__ */ jsx22("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ jsx22(
|
|
7644
7771
|
"button",
|
|
7645
7772
|
{
|
|
7646
7773
|
type: "button",
|
|
7647
7774
|
className: "rs-modal-header-back",
|
|
7648
7775
|
"aria-label": "Go back",
|
|
7649
7776
|
onClick: backHandler,
|
|
7650
|
-
children: /* @__PURE__ */
|
|
7777
|
+
children: /* @__PURE__ */ jsx22(ChevronLeftIcon, {})
|
|
7651
7778
|
}
|
|
7652
7779
|
) }),
|
|
7653
|
-
/* @__PURE__ */
|
|
7654
|
-
historyButtonVisible && /* @__PURE__ */
|
|
7780
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-modal-header-nav-right", children: [
|
|
7781
|
+
historyButtonVisible && /* @__PURE__ */ jsx22(
|
|
7655
7782
|
"button",
|
|
7656
7783
|
{
|
|
7657
7784
|
type: "button",
|
|
@@ -7659,22 +7786,22 @@ function DepositModalInner({
|
|
|
7659
7786
|
"aria-label": "Deposit history",
|
|
7660
7787
|
onClick: handleHistoryOpen,
|
|
7661
7788
|
disabled: !recipient,
|
|
7662
|
-
children: /* @__PURE__ */
|
|
7789
|
+
children: /* @__PURE__ */ jsx22(HistoryIcon, {})
|
|
7663
7790
|
}
|
|
7664
7791
|
),
|
|
7665
|
-
/* @__PURE__ */
|
|
7792
|
+
/* @__PURE__ */ jsx22(
|
|
7666
7793
|
"button",
|
|
7667
7794
|
{
|
|
7668
7795
|
type: "button",
|
|
7669
7796
|
onClick: onClose,
|
|
7670
7797
|
className: "rs-modal-close",
|
|
7671
7798
|
"aria-label": "Close",
|
|
7672
|
-
children: /* @__PURE__ */
|
|
7799
|
+
children: /* @__PURE__ */ jsx22(CloseIcon, {})
|
|
7673
7800
|
}
|
|
7674
7801
|
)
|
|
7675
7802
|
] })
|
|
7676
7803
|
] }),
|
|
7677
|
-
recipientIsContract ? /* @__PURE__ */
|
|
7804
|
+
recipientIsContract ? /* @__PURE__ */ jsx22("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx22(Callout, { variant: "error", children: "HyperCore deposits require an EOA recipient. The configured recipient is a smart contract, which is not supported." }) }) : /* @__PURE__ */ jsx22(
|
|
7678
7805
|
DepositFlow,
|
|
7679
7806
|
{
|
|
7680
7807
|
dappWalletClient,
|
|
@@ -7716,7 +7843,7 @@ function DepositModalInner({
|
|
|
7716
7843
|
debug
|
|
7717
7844
|
}
|
|
7718
7845
|
),
|
|
7719
|
-
showHistoryButton && historyOpen && /* @__PURE__ */
|
|
7846
|
+
showHistoryButton && historyOpen && /* @__PURE__ */ jsx22(
|
|
7720
7847
|
DepositHistoryPanel,
|
|
7721
7848
|
{
|
|
7722
7849
|
deposits: historyDeposits,
|