@rhinestone/deposit-modal 0.3.0-alpha.11 → 0.3.0-alpha.12
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-KXFF6ZXY.cjs → DepositModalReown-EC4DJ3EC.cjs} +2 -2
- package/dist/{DepositModalReown-UNFGBOIJ.mjs → DepositModalReown-QOTUF4JC.mjs} +1 -1
- package/dist/{chunk-V63GWJHB.mjs → chunk-HR6BABPX.mjs} +369 -228
- package/dist/{chunk-Y4CESMTH.cjs → chunk-I5G5ULRP.cjs} +242 -101
- package/dist/deposit.cjs +2 -2
- package/dist/deposit.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +1 -1
- package/dist/styles.css +82 -11
- package/package.json +1 -1
|
@@ -1438,8 +1438,8 @@ function DepositAddressStep({
|
|
|
1438
1438
|
options.splice(1, 0, "solana");
|
|
1439
1439
|
return options;
|
|
1440
1440
|
}, [evmChainIds, hasSolana]);
|
|
1441
|
-
const
|
|
1442
|
-
const defaultChainId = evmChainIds.includes(
|
|
1441
|
+
const BASE_CHAIN_ID2 = 8453;
|
|
1442
|
+
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : evmChainIds[0];
|
|
1443
1443
|
const [sourceChainId, setSourceChainId] = useState5(defaultChainId);
|
|
1444
1444
|
const isSolana = sourceChainId === "solana";
|
|
1445
1445
|
const tokensForChain = useMemo3(
|
|
@@ -1948,10 +1948,133 @@ function DepositAddressStep({
|
|
|
1948
1948
|
}
|
|
1949
1949
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
1950
1950
|
|
|
1951
|
+
// src/components/steps/DepositAddressSkeleton.tsx
|
|
1952
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1953
|
+
var BASE_CHAIN_ID = 8453;
|
|
1954
|
+
function DepositAddressSkeleton({
|
|
1955
|
+
uiConfig,
|
|
1956
|
+
allowedRoutes
|
|
1957
|
+
}) {
|
|
1958
|
+
const allowedChainSet = allowedRoutes?.sourceChains ? new Set(allowedRoutes.sourceChains) : null;
|
|
1959
|
+
const allowedTokenSet = allowedRoutes?.sourceTokens ? new Set(allowedRoutes.sourceTokens.map((s) => s.toUpperCase())) : null;
|
|
1960
|
+
const evmChainIds = (() => {
|
|
1961
|
+
const all = getSupportedChainIds();
|
|
1962
|
+
return allowedChainSet ? all.filter((id) => allowedChainSet.has(id)) : all;
|
|
1963
|
+
})();
|
|
1964
|
+
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
1965
|
+
const tokensForChain = (() => {
|
|
1966
|
+
const all = getTargetTokenSymbolsForChain(defaultChainId);
|
|
1967
|
+
return allowedTokenSet ? all.filter((s) => allowedTokenSet.has(s.toUpperCase())) : all;
|
|
1968
|
+
})();
|
|
1969
|
+
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
|
|
1970
|
+
const chainName = getChainName(defaultChainId);
|
|
1971
|
+
const chainIcon = getChainIcon(defaultChainId);
|
|
1972
|
+
const tokenIcon = getTokenIcon(defaultToken);
|
|
1973
|
+
return /* @__PURE__ */ jsxs7("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
1974
|
+
/* @__PURE__ */ jsx7("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
1975
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-screen-body", children: [
|
|
1976
|
+
/* @__PURE__ */ jsx7(BodyHeader, { icon: /* @__PURE__ */ jsx7(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
1977
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
1978
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown", children: [
|
|
1979
|
+
/* @__PURE__ */ jsx7("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
1980
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
1981
|
+
chainIcon && /* @__PURE__ */ jsx7(
|
|
1982
|
+
"img",
|
|
1983
|
+
{
|
|
1984
|
+
src: chainIcon,
|
|
1985
|
+
alt: "",
|
|
1986
|
+
className: "rs-deposit-address-dropdown-icon"
|
|
1987
|
+
}
|
|
1988
|
+
),
|
|
1989
|
+
/* @__PURE__ */ jsx7("span", { children: chainName }),
|
|
1990
|
+
/* @__PURE__ */ jsx7(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1991
|
+
] })
|
|
1992
|
+
] }),
|
|
1993
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown", children: [
|
|
1994
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
1995
|
+
/* @__PURE__ */ jsx7("span", { children: "Supported token" }),
|
|
1996
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-deposit-address-min", children: [
|
|
1997
|
+
"Min.$",
|
|
1998
|
+
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
1999
|
+
/* @__PURE__ */ jsx7(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx7(
|
|
2000
|
+
InfoIcon,
|
|
2001
|
+
{
|
|
2002
|
+
className: "rs-deposit-address-min-icon",
|
|
2003
|
+
"aria-hidden": "true"
|
|
2004
|
+
}
|
|
2005
|
+
) })
|
|
2006
|
+
] })
|
|
2007
|
+
] }),
|
|
2008
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2009
|
+
tokenIcon && /* @__PURE__ */ jsx7(
|
|
2010
|
+
"img",
|
|
2011
|
+
{
|
|
2012
|
+
src: tokenIcon,
|
|
2013
|
+
alt: "",
|
|
2014
|
+
className: "rs-deposit-address-dropdown-icon"
|
|
2015
|
+
}
|
|
2016
|
+
),
|
|
2017
|
+
/* @__PURE__ */ jsx7("span", { children: defaultToken }),
|
|
2018
|
+
/* @__PURE__ */ jsx7(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2019
|
+
] })
|
|
2020
|
+
] })
|
|
2021
|
+
] }),
|
|
2022
|
+
/* @__PURE__ */ jsxs7(
|
|
2023
|
+
"div",
|
|
2024
|
+
{
|
|
2025
|
+
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
2026
|
+
children: [
|
|
2027
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-deposit-address-well", children: [
|
|
2028
|
+
/* @__PURE__ */ jsx7("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx7("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
2029
|
+
/* @__PURE__ */ jsx7("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
2030
|
+
] }),
|
|
2031
|
+
/* @__PURE__ */ jsxs7(
|
|
2032
|
+
"button",
|
|
2033
|
+
{
|
|
2034
|
+
type: "button",
|
|
2035
|
+
className: "rs-deposit-address-copy",
|
|
2036
|
+
disabled: true,
|
|
2037
|
+
"aria-hidden": "true",
|
|
2038
|
+
children: [
|
|
2039
|
+
/* @__PURE__ */ jsx7(CopyIcon, {}),
|
|
2040
|
+
"Copy address"
|
|
2041
|
+
]
|
|
2042
|
+
}
|
|
2043
|
+
)
|
|
2044
|
+
]
|
|
2045
|
+
}
|
|
2046
|
+
),
|
|
2047
|
+
/* @__PURE__ */ jsx7("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs7("div", { className: "rs-price-impact-header", children: [
|
|
2048
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-price-impact-header-left", children: [
|
|
2049
|
+
/* @__PURE__ */ jsx7("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2050
|
+
/* @__PURE__ */ jsx7("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx7("strong", { children: "0.00%" }) }),
|
|
2051
|
+
/* @__PURE__ */ jsx7(
|
|
2052
|
+
Tooltip,
|
|
2053
|
+
{
|
|
2054
|
+
className: "rs-price-impact-info",
|
|
2055
|
+
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2056
|
+
children: /* @__PURE__ */ jsx7(InfoIcon, { "aria-hidden": "true" })
|
|
2057
|
+
}
|
|
2058
|
+
)
|
|
2059
|
+
] }),
|
|
2060
|
+
/* @__PURE__ */ jsx7(
|
|
2061
|
+
ChevronDownIcon,
|
|
2062
|
+
{
|
|
2063
|
+
className: "rs-price-impact-chevron",
|
|
2064
|
+
"aria-hidden": "true"
|
|
2065
|
+
}
|
|
2066
|
+
)
|
|
2067
|
+
] }) })
|
|
2068
|
+
] }),
|
|
2069
|
+
/* @__PURE__ */ jsx7(PoweredBy, {})
|
|
2070
|
+
] });
|
|
2071
|
+
}
|
|
2072
|
+
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
2073
|
+
|
|
1951
2074
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
1952
2075
|
import { useState as useState6, useEffect as useEffect6, useMemo as useMemo4 } from "react";
|
|
1953
2076
|
import { formatUnits as formatUnits4 } from "viem";
|
|
1954
|
-
import { jsx as
|
|
2077
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1955
2078
|
function SolanaTokenSelectStep({
|
|
1956
2079
|
solanaAddress,
|
|
1957
2080
|
service,
|
|
@@ -2057,30 +2180,30 @@ function SolanaTokenSelectStep({
|
|
|
2057
2180
|
};
|
|
2058
2181
|
const chainIcon = getChainIcon("solana");
|
|
2059
2182
|
const chainName = getChainName("solana");
|
|
2060
|
-
return /* @__PURE__ */
|
|
2061
|
-
/* @__PURE__ */
|
|
2062
|
-
/* @__PURE__ */
|
|
2183
|
+
return /* @__PURE__ */ jsxs8("div", { className: "rs-screen", children: [
|
|
2184
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-screen-body", children: [
|
|
2185
|
+
/* @__PURE__ */ jsx8(
|
|
2063
2186
|
BodyHeader,
|
|
2064
2187
|
{
|
|
2065
|
-
icon: /* @__PURE__ */
|
|
2188
|
+
icon: /* @__PURE__ */ jsx8(WalletIcon, {}),
|
|
2066
2189
|
title: "Your assets",
|
|
2067
2190
|
subtitle: "Select source assets to transfer"
|
|
2068
2191
|
}
|
|
2069
2192
|
),
|
|
2070
|
-
loading && /* @__PURE__ */
|
|
2071
|
-
/* @__PURE__ */
|
|
2072
|
-
/* @__PURE__ */
|
|
2193
|
+
loading && /* @__PURE__ */ jsxs8("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
2194
|
+
/* @__PURE__ */ jsx8(Spinner, { className: "rs-text-tertiary" }),
|
|
2195
|
+
/* @__PURE__ */ jsx8("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
2073
2196
|
] }),
|
|
2074
|
-
error && /* @__PURE__ */
|
|
2075
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
2076
|
-
/* @__PURE__ */
|
|
2077
|
-
/* @__PURE__ */
|
|
2078
|
-
/* @__PURE__ */
|
|
2197
|
+
error && /* @__PURE__ */ jsx8(Callout, { variant: "error", children: error }),
|
|
2198
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs8("div", { className: "rs-empty-state", children: [
|
|
2199
|
+
/* @__PURE__ */ jsx8(WalletIcon, { className: "rs-empty-icon" }),
|
|
2200
|
+
/* @__PURE__ */ jsx8("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
2201
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-empty-address", children: [
|
|
2079
2202
|
solanaAddress.slice(0, 6),
|
|
2080
2203
|
"...",
|
|
2081
2204
|
solanaAddress.slice(-4)
|
|
2082
2205
|
] }),
|
|
2083
|
-
onDisconnect && /* @__PURE__ */
|
|
2206
|
+
onDisconnect && /* @__PURE__ */ jsx8(
|
|
2084
2207
|
"button",
|
|
2085
2208
|
{
|
|
2086
2209
|
type: "button",
|
|
@@ -2090,11 +2213,11 @@ function SolanaTokenSelectStep({
|
|
|
2090
2213
|
}
|
|
2091
2214
|
)
|
|
2092
2215
|
] }),
|
|
2093
|
-
!loading && !error && rows.length > 0 && /* @__PURE__ */
|
|
2216
|
+
!loading && !error && rows.length > 0 && /* @__PURE__ */ jsx8("div", { className: "rs-asset-list", children: rows.map((entry) => {
|
|
2094
2217
|
const isSelected = selectedSymbol === entry.token.symbol;
|
|
2095
2218
|
const tokenAmount = formatBalance(entry);
|
|
2096
2219
|
const tokenIcon = getTokenIcon(entry.token.symbol);
|
|
2097
|
-
return /* @__PURE__ */
|
|
2220
|
+
return /* @__PURE__ */ jsxs8(
|
|
2098
2221
|
"button",
|
|
2099
2222
|
{
|
|
2100
2223
|
type: "button",
|
|
@@ -2102,33 +2225,33 @@ function SolanaTokenSelectStep({
|
|
|
2102
2225
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
2103
2226
|
"aria-pressed": isSelected,
|
|
2104
2227
|
children: [
|
|
2105
|
-
/* @__PURE__ */
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
tokenIcon ? /* @__PURE__ */
|
|
2108
|
-
chainIcon && /* @__PURE__ */
|
|
2228
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-asset-info", children: [
|
|
2229
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-asset-icon-wrapper", children: [
|
|
2230
|
+
tokenIcon ? /* @__PURE__ */ jsx8("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx8("img", { src: tokenIcon, alt: entry.token.symbol }) }) : /* @__PURE__ */ jsx8("span", { className: "rs-asset-icon", children: entry.token.symbol.slice(0, 4) }),
|
|
2231
|
+
chainIcon && /* @__PURE__ */ jsx8("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx8("img", { src: chainIcon, alt: chainName }) })
|
|
2109
2232
|
] }),
|
|
2110
|
-
/* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2112
|
-
/* @__PURE__ */
|
|
2113
|
-
/* @__PURE__ */
|
|
2233
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-asset-text", children: [
|
|
2234
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-asset-name-row", children: [
|
|
2235
|
+
/* @__PURE__ */ jsx8("span", { className: "rs-asset-name", children: entry.token.symbol }),
|
|
2236
|
+
/* @__PURE__ */ jsxs8("span", { className: "rs-asset-chain", children: [
|
|
2114
2237
|
"on ",
|
|
2115
2238
|
chainName
|
|
2116
2239
|
] })
|
|
2117
2240
|
] }),
|
|
2118
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-asset-balance-small", children: [
|
|
2119
2242
|
tokenAmount,
|
|
2120
2243
|
" ",
|
|
2121
2244
|
entry.token.symbol
|
|
2122
2245
|
] })
|
|
2123
2246
|
] })
|
|
2124
2247
|
] }),
|
|
2125
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ jsx8("div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
2126
2249
|
]
|
|
2127
2250
|
},
|
|
2128
2251
|
entry.token.symbol
|
|
2129
2252
|
);
|
|
2130
2253
|
}) }),
|
|
2131
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ jsx8(
|
|
2132
2255
|
Button,
|
|
2133
2256
|
{
|
|
2134
2257
|
onClick: () => selectedEntry && onContinue(
|
|
@@ -2142,14 +2265,14 @@ function SolanaTokenSelectStep({
|
|
|
2142
2265
|
}
|
|
2143
2266
|
)
|
|
2144
2267
|
] }),
|
|
2145
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx8(PoweredBy, {})
|
|
2146
2269
|
] });
|
|
2147
2270
|
}
|
|
2148
2271
|
|
|
2149
2272
|
// src/components/steps/SolanaAmountStep.tsx
|
|
2150
2273
|
import { useCallback as useCallback3, useEffect as useEffect7, useMemo as useMemo5, useRef as useRef6, useState as useState7 } from "react";
|
|
2151
2274
|
import { formatUnits as formatUnits5, parseUnits as parseUnits3 } from "viem";
|
|
2152
|
-
import { Fragment as Fragment2, jsx as
|
|
2275
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2153
2276
|
var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
|
|
2154
2277
|
var PRESETS2 = [
|
|
2155
2278
|
{ value: 25, label: "25%" },
|
|
@@ -2349,12 +2472,12 @@ function SolanaAmountStep({
|
|
|
2349
2472
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
2350
2473
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
2351
2474
|
const sourceTokenIcon = getTokenIcon(token.symbol);
|
|
2352
|
-
return /* @__PURE__ */
|
|
2353
|
-
/* @__PURE__ */
|
|
2354
|
-
/* @__PURE__ */
|
|
2355
|
-
/* @__PURE__ */
|
|
2356
|
-
/* @__PURE__ */
|
|
2357
|
-
/* @__PURE__ */
|
|
2475
|
+
return /* @__PURE__ */ jsxs9("div", { className: "rs-screen", children: [
|
|
2476
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2477
|
+
/* @__PURE__ */ jsx9(BodyHeader, { icon: /* @__PURE__ */ jsx9(WalletIcon, {}), title: "Wallet deposit" }),
|
|
2478
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-amount-section", children: [
|
|
2479
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-amount-display", children: [
|
|
2480
|
+
/* @__PURE__ */ jsx9(
|
|
2358
2481
|
AnimatedAmountInput,
|
|
2359
2482
|
{
|
|
2360
2483
|
value: amount,
|
|
@@ -2363,25 +2486,25 @@ function SolanaAmountStep({
|
|
|
2363
2486
|
autoFocus: true
|
|
2364
2487
|
}
|
|
2365
2488
|
),
|
|
2366
|
-
/* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2489
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-amount-meta", children: [
|
|
2490
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-amount-meta-balance", children: [
|
|
2368
2491
|
formattedBalance,
|
|
2369
2492
|
" ",
|
|
2370
2493
|
token.symbol,
|
|
2371
2494
|
" available",
|
|
2372
|
-
computedBalanceUsd !== null && /* @__PURE__ */
|
|
2495
|
+
computedBalanceUsd !== null && /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
2373
2496
|
" (~",
|
|
2374
2497
|
currencyFormatter.format(computedBalanceUsd),
|
|
2375
2498
|
")"
|
|
2376
2499
|
] })
|
|
2377
2500
|
] }),
|
|
2378
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
2501
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs9("span", { className: "rs-amount-meta-minimum", children: [
|
|
2379
2502
|
"Min. deposit ",
|
|
2380
2503
|
currencyFormatter.format(minDepositUsd)
|
|
2381
2504
|
] })
|
|
2382
2505
|
] })
|
|
2383
2506
|
] }),
|
|
2384
|
-
/* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsx9("div", { className: "rs-amount-presets", children: PRESETS2.map((preset) => /* @__PURE__ */ jsx9(
|
|
2385
2508
|
"button",
|
|
2386
2509
|
{
|
|
2387
2510
|
type: "button",
|
|
@@ -2392,35 +2515,35 @@ function SolanaAmountStep({
|
|
|
2392
2515
|
preset.value
|
|
2393
2516
|
)) })
|
|
2394
2517
|
] }),
|
|
2395
|
-
/* @__PURE__ */
|
|
2396
|
-
/* @__PURE__ */
|
|
2397
|
-
/* @__PURE__ */
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
/* @__PURE__ */
|
|
2518
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-amount-details", children: [
|
|
2519
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-amount-detail-row", children: [
|
|
2520
|
+
/* @__PURE__ */ jsx9("span", { children: "You send" }),
|
|
2521
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-amount-detail-value", children: [
|
|
2522
|
+
/* @__PURE__ */ jsxs9("span", { children: [
|
|
2400
2523
|
"Solana ",
|
|
2401
2524
|
token.symbol
|
|
2402
2525
|
] }),
|
|
2403
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
2526
|
+
sourceTokenIcon && /* @__PURE__ */ jsx9("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx9("img", { src: sourceTokenIcon, alt: "" }) })
|
|
2404
2527
|
] })
|
|
2405
2528
|
] }),
|
|
2406
|
-
targetChainName && targetTokenSymbol && /* @__PURE__ */
|
|
2407
|
-
/* @__PURE__ */
|
|
2408
|
-
/* @__PURE__ */
|
|
2409
|
-
/* @__PURE__ */
|
|
2529
|
+
targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs9("div", { className: "rs-amount-detail-row", children: [
|
|
2530
|
+
/* @__PURE__ */ jsx9("span", { children: "Receive" }),
|
|
2531
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-amount-detail-value", children: [
|
|
2532
|
+
/* @__PURE__ */ jsxs9("span", { children: [
|
|
2410
2533
|
targetChainName,
|
|
2411
2534
|
" ",
|
|
2412
2535
|
targetTokenSymbol
|
|
2413
2536
|
] }),
|
|
2414
|
-
targetTokenIcon && /* @__PURE__ */
|
|
2537
|
+
targetTokenIcon && /* @__PURE__ */ jsx9("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx9("img", { src: targetTokenIcon, alt: "" }) })
|
|
2415
2538
|
] })
|
|
2416
2539
|
] }),
|
|
2417
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
2418
|
-
/* @__PURE__ */
|
|
2419
|
-
/* @__PURE__ */
|
|
2540
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs9("div", { className: "rs-amount-detail-row", children: [
|
|
2541
|
+
/* @__PURE__ */ jsx9("span", { children: "Balance after deposit" }),
|
|
2542
|
+
/* @__PURE__ */ jsx9("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
2420
2543
|
] })
|
|
2421
2544
|
] }),
|
|
2422
|
-
error && /* @__PURE__ */
|
|
2423
|
-
/* @__PURE__ */
|
|
2545
|
+
error && /* @__PURE__ */ jsx9(Callout, { variant: "error", children: error }),
|
|
2546
|
+
/* @__PURE__ */ jsx9(
|
|
2424
2547
|
Button,
|
|
2425
2548
|
{
|
|
2426
2549
|
onClick: handleContinue,
|
|
@@ -2430,7 +2553,7 @@ function SolanaAmountStep({
|
|
|
2430
2553
|
}
|
|
2431
2554
|
)
|
|
2432
2555
|
] }),
|
|
2433
|
-
/* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ jsx9(PoweredBy, {})
|
|
2434
2557
|
] });
|
|
2435
2558
|
}
|
|
2436
2559
|
|
|
@@ -2543,7 +2666,7 @@ async function sendSolanaTransaction(provider, _connection, transaction) {
|
|
|
2543
2666
|
}
|
|
2544
2667
|
|
|
2545
2668
|
// src/components/steps/SolanaConfirmStep.tsx
|
|
2546
|
-
import { jsx as
|
|
2669
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2547
2670
|
function SolanaConfirmStep({
|
|
2548
2671
|
smartAccount,
|
|
2549
2672
|
solanaAddress,
|
|
@@ -2684,66 +2807,66 @@ function SolanaConfirmStep({
|
|
|
2684
2807
|
setIsSubmitting(false);
|
|
2685
2808
|
}
|
|
2686
2809
|
};
|
|
2687
|
-
return /* @__PURE__ */
|
|
2688
|
-
/* @__PURE__ */
|
|
2689
|
-
/* @__PURE__ */
|
|
2690
|
-
/* @__PURE__ */
|
|
2691
|
-
/* @__PURE__ */
|
|
2692
|
-
/* @__PURE__ */
|
|
2693
|
-
/* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
sourceChainIcon && /* @__PURE__ */
|
|
2810
|
+
return /* @__PURE__ */ jsxs10("div", { className: "rs-screen", children: [
|
|
2811
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2812
|
+
/* @__PURE__ */ jsx10(BodyHeader, { icon: /* @__PURE__ */ jsx10(WalletIcon, {}), title: "Review deposit" }),
|
|
2813
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-review-details", children: [
|
|
2814
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
|
|
2815
|
+
/* @__PURE__ */ jsx10("span", { children: "Source chain" }),
|
|
2816
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
|
|
2817
|
+
/* @__PURE__ */ jsx10("span", { children: sourceChainName }),
|
|
2818
|
+
sourceChainIcon && /* @__PURE__ */ jsx10("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx10("img", { src: sourceChainIcon, alt: "" }) })
|
|
2696
2819
|
] })
|
|
2697
2820
|
] }),
|
|
2698
|
-
/* @__PURE__ */
|
|
2699
|
-
/* @__PURE__ */
|
|
2700
|
-
/* @__PURE__ */
|
|
2701
|
-
/* @__PURE__ */
|
|
2702
|
-
targetChainIcon && /* @__PURE__ */
|
|
2821
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
|
|
2822
|
+
/* @__PURE__ */ jsx10("span", { children: "Destination chain" }),
|
|
2823
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
|
|
2824
|
+
/* @__PURE__ */ jsx10("span", { children: targetChainName }),
|
|
2825
|
+
targetChainIcon && /* @__PURE__ */ jsx10("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx10("img", { src: targetChainIcon, alt: "" }) })
|
|
2703
2826
|
] })
|
|
2704
2827
|
] }),
|
|
2705
|
-
/* @__PURE__ */
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
/* @__PURE__ */
|
|
2828
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
|
|
2829
|
+
/* @__PURE__ */ jsx10("span", { children: "Estimated time" }),
|
|
2830
|
+
/* @__PURE__ */ jsx10("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
2708
2831
|
] }),
|
|
2709
|
-
/* @__PURE__ */
|
|
2710
|
-
/* @__PURE__ */
|
|
2711
|
-
/* @__PURE__ */
|
|
2712
|
-
/* @__PURE__ */
|
|
2832
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
|
|
2833
|
+
/* @__PURE__ */ jsx10("span", { children: "You send" }),
|
|
2834
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
|
|
2835
|
+
/* @__PURE__ */ jsxs10("span", { children: [
|
|
2713
2836
|
formattedAmount,
|
|
2714
2837
|
" ",
|
|
2715
2838
|
token.symbol
|
|
2716
2839
|
] }),
|
|
2717
|
-
sourceTokenIcon && /* @__PURE__ */
|
|
2840
|
+
sourceTokenIcon && /* @__PURE__ */ jsx10("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx10("img", { src: sourceTokenIcon, alt: "" }) })
|
|
2718
2841
|
] })
|
|
2719
2842
|
] }),
|
|
2720
|
-
/* @__PURE__ */
|
|
2721
|
-
/* @__PURE__ */
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
/* @__PURE__ */
|
|
2843
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
|
|
2844
|
+
/* @__PURE__ */ jsx10("span", { children: "Receive" }),
|
|
2845
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
|
|
2846
|
+
/* @__PURE__ */ jsxs10("span", { children: [
|
|
2724
2847
|
receiveAmount,
|
|
2725
2848
|
" ",
|
|
2726
2849
|
targetSymbol
|
|
2727
2850
|
] }),
|
|
2728
|
-
targetTokenIcon && /* @__PURE__ */
|
|
2851
|
+
targetTokenIcon && /* @__PURE__ */ jsx10("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx10("img", { src: targetTokenIcon, alt: "" }) })
|
|
2729
2852
|
] })
|
|
2730
2853
|
] }),
|
|
2731
|
-
/* @__PURE__ */
|
|
2732
|
-
/* @__PURE__ */
|
|
2733
|
-
/* @__PURE__ */
|
|
2734
|
-
/* @__PURE__ */
|
|
2854
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-review-detail-row", children: [
|
|
2855
|
+
/* @__PURE__ */ jsx10("span", { children: "Fees" }),
|
|
2856
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-review-detail-value", children: [
|
|
2857
|
+
/* @__PURE__ */ jsx10(
|
|
2735
2858
|
"span",
|
|
2736
2859
|
{
|
|
2737
2860
|
style: feeSponsored ? { textDecoration: "line-through" } : void 0,
|
|
2738
2861
|
children: "$0.04"
|
|
2739
2862
|
}
|
|
2740
2863
|
),
|
|
2741
|
-
/* @__PURE__ */
|
|
2864
|
+
/* @__PURE__ */ jsx10(Tooltip, { content: feeTooltip, children: /* @__PURE__ */ jsx10("span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ jsx10(InfoIcon, {}) }) })
|
|
2742
2865
|
] })
|
|
2743
2866
|
] })
|
|
2744
2867
|
] }),
|
|
2745
|
-
error && /* @__PURE__ */
|
|
2746
|
-
/* @__PURE__ */
|
|
2868
|
+
error && /* @__PURE__ */ jsx10(Callout, { variant: "error", children: error }),
|
|
2869
|
+
/* @__PURE__ */ jsx10(
|
|
2747
2870
|
Button,
|
|
2748
2871
|
{
|
|
2749
2872
|
onClick: handleConfirm,
|
|
@@ -2755,28 +2878,28 @@ function SolanaConfirmStep({
|
|
|
2755
2878
|
}
|
|
2756
2879
|
)
|
|
2757
2880
|
] }),
|
|
2758
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ jsx10(PoweredBy, {})
|
|
2759
2882
|
] });
|
|
2760
2883
|
}
|
|
2761
2884
|
|
|
2762
2885
|
// src/components/steps/DappImportAssetSelectStep.tsx
|
|
2763
|
-
import { jsx as
|
|
2886
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2764
2887
|
function DappImportAssetSelectStep({
|
|
2765
2888
|
sourceLabel,
|
|
2766
2889
|
assets,
|
|
2767
2890
|
onSelect
|
|
2768
2891
|
}) {
|
|
2769
|
-
return /* @__PURE__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
2771
|
-
/* @__PURE__ */
|
|
2892
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen", children: [
|
|
2893
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2894
|
+
/* @__PURE__ */ jsx11(
|
|
2772
2895
|
BodyHeader,
|
|
2773
2896
|
{
|
|
2774
|
-
icon: /* @__PURE__ */
|
|
2897
|
+
icon: /* @__PURE__ */ jsx11(WalletIcon, {}),
|
|
2775
2898
|
title: `Transfer from ${sourceLabel}`,
|
|
2776
2899
|
subtitle: "Pick the balance to import"
|
|
2777
2900
|
}
|
|
2778
2901
|
),
|
|
2779
|
-
/* @__PURE__ */
|
|
2902
|
+
/* @__PURE__ */ jsx11("div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
2780
2903
|
const tokenAmount = asset.balance ? tokenFormatter.format(
|
|
2781
2904
|
Number(asset.balance) / 10 ** asset.decimals
|
|
2782
2905
|
) : "0";
|
|
@@ -2784,23 +2907,23 @@ function DappImportAssetSelectStep({
|
|
|
2784
2907
|
const tokenIcon = asset.icon ?? getTokenIcon(asset.symbol);
|
|
2785
2908
|
const chainIcon = getChainIcon(asset.chainId);
|
|
2786
2909
|
const badge = getChainBadge(asset.chainId);
|
|
2787
|
-
return /* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ jsxs11(
|
|
2788
2911
|
"button",
|
|
2789
2912
|
{
|
|
2790
2913
|
type: "button",
|
|
2791
2914
|
className: "rs-asset-row",
|
|
2792
2915
|
onClick: () => onSelect(asset),
|
|
2793
2916
|
children: [
|
|
2794
|
-
/* @__PURE__ */
|
|
2795
|
-
/* @__PURE__ */
|
|
2796
|
-
/* @__PURE__ */
|
|
2797
|
-
chainIcon ? /* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-asset-info", children: [
|
|
2918
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-asset-icon-wrapper", children: [
|
|
2919
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-asset-icon", children: tokenIcon ? /* @__PURE__ */ jsx11("img", { src: tokenIcon, alt: asset.symbol }) : asset.symbol.slice(0, 4) }),
|
|
2920
|
+
chainIcon ? /* @__PURE__ */ jsx11("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx11(
|
|
2798
2921
|
"img",
|
|
2799
2922
|
{
|
|
2800
2923
|
src: chainIcon,
|
|
2801
2924
|
alt: getChainName(asset.chainId)
|
|
2802
2925
|
}
|
|
2803
|
-
) }) : /* @__PURE__ */
|
|
2926
|
+
) }) : /* @__PURE__ */ jsx11(
|
|
2804
2927
|
"span",
|
|
2805
2928
|
{
|
|
2806
2929
|
className: "rs-asset-chain-badge",
|
|
@@ -2809,29 +2932,29 @@ function DappImportAssetSelectStep({
|
|
|
2809
2932
|
}
|
|
2810
2933
|
)
|
|
2811
2934
|
] }),
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
2814
|
-
/* @__PURE__ */
|
|
2815
|
-
/* @__PURE__ */
|
|
2935
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-asset-text", children: [
|
|
2936
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-asset-name-row", children: [
|
|
2937
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
2938
|
+
/* @__PURE__ */ jsxs11("span", { className: "rs-asset-chain", children: [
|
|
2816
2939
|
"on ",
|
|
2817
2940
|
asset.sourceLabel
|
|
2818
2941
|
] })
|
|
2819
2942
|
] }),
|
|
2820
|
-
/* @__PURE__ */
|
|
2943
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-asset-balance-small", children: [
|
|
2821
2944
|
tokenAmount,
|
|
2822
2945
|
" ",
|
|
2823
2946
|
asset.symbol
|
|
2824
2947
|
] })
|
|
2825
2948
|
] })
|
|
2826
2949
|
] }),
|
|
2827
|
-
/* @__PURE__ */
|
|
2950
|
+
/* @__PURE__ */ jsx11("div", { className: "rs-asset-balance", children: balanceUsd })
|
|
2828
2951
|
]
|
|
2829
2952
|
},
|
|
2830
2953
|
asset.id
|
|
2831
2954
|
);
|
|
2832
2955
|
}) })
|
|
2833
2956
|
] }),
|
|
2834
|
-
/* @__PURE__ */
|
|
2957
|
+
/* @__PURE__ */ jsx11(PoweredBy, {})
|
|
2835
2958
|
] });
|
|
2836
2959
|
}
|
|
2837
2960
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
@@ -3400,6 +3523,7 @@ function applyBack(state, hasWalletOptions) {
|
|
|
3400
3523
|
targetAmount: null,
|
|
3401
3524
|
targetTokenPriceUsd: null,
|
|
3402
3525
|
balance: null,
|
|
3526
|
+
inputAmountUsd: null,
|
|
3403
3527
|
liquidityWarning: null
|
|
3404
3528
|
},
|
|
3405
3529
|
flow: {
|
|
@@ -3655,7 +3779,11 @@ function applyAction(state, action) {
|
|
|
3655
3779
|
selectedAsset: action.asset,
|
|
3656
3780
|
// Seed the user-facing amount input with the modal's defaultAmount
|
|
3657
3781
|
// on first visit. Subsequent visits override via amount/entered.
|
|
3658
|
-
|
|
3782
|
+
// `inputAmountUsd` is the USD-style value the input shows; it (not
|
|
3783
|
+
// the native `amount`) is what re-seeds the input on back, so seed
|
|
3784
|
+
// it here too and reset it on a fresh pick.
|
|
3785
|
+
amount: action.seedAmount ?? state.deposit.amount,
|
|
3786
|
+
inputAmountUsd: action.seedAmount ?? null
|
|
3659
3787
|
},
|
|
3660
3788
|
flow: { ...state.flow, step: "amount" }
|
|
3661
3789
|
};
|
|
@@ -3668,6 +3796,11 @@ function applyAction(state, action) {
|
|
|
3668
3796
|
targetAmount: action.targetAmount,
|
|
3669
3797
|
targetTokenPriceUsd: action.targetTokenPriceUsd,
|
|
3670
3798
|
balance: action.balance ?? null,
|
|
3799
|
+
// `targetAmount` is the USD-style value the user typed. Preserve it
|
|
3800
|
+
// as `inputAmountUsd` so back-from-confirm re-seeds the input with
|
|
3801
|
+
// the typed USD value rather than the converted native `amount`
|
|
3802
|
+
// (which corrupts the input for non-stablecoin priced tokens).
|
|
3803
|
+
inputAmountUsd: action.targetAmount,
|
|
3671
3804
|
liquidityWarning: action.liquidityWarning ?? null
|
|
3672
3805
|
},
|
|
3673
3806
|
flow: { ...state.flow, step: "confirm" }
|
|
@@ -4192,23 +4325,23 @@ function mapError(error) {
|
|
|
4192
4325
|
}
|
|
4193
4326
|
|
|
4194
4327
|
// src/DepositFlow.tsx
|
|
4195
|
-
import { Fragment as Fragment3, jsx as
|
|
4328
|
+
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4196
4329
|
function AccountPreparingSkeleton({
|
|
4197
4330
|
errorMessage,
|
|
4198
4331
|
onRetry
|
|
4199
4332
|
}) {
|
|
4200
|
-
return /* @__PURE__ */
|
|
4201
|
-
/* @__PURE__ */
|
|
4202
|
-
/* @__PURE__ */
|
|
4203
|
-
/* @__PURE__ */
|
|
4204
|
-
] }) : /* @__PURE__ */
|
|
4205
|
-
errorMessage && onRetry && /* @__PURE__ */
|
|
4333
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-step", children: [
|
|
4334
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-text", children: errorMessage ? /* @__PURE__ */ jsxs12(Fragment3, { children: [
|
|
4335
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t prepare account" }),
|
|
4336
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-loading-subtitle", children: errorMessage })
|
|
4337
|
+
] }) : /* @__PURE__ */ jsx12("div", { className: "rs-loading-title", children: "Preparing\u2026" }) }) }) }),
|
|
4338
|
+
errorMessage && onRetry && /* @__PURE__ */ jsx12("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx12(
|
|
4206
4339
|
"button",
|
|
4207
4340
|
{
|
|
4208
4341
|
type: "button",
|
|
4209
4342
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
4210
4343
|
onClick: onRetry,
|
|
4211
|
-
children: /* @__PURE__ */
|
|
4344
|
+
children: /* @__PURE__ */ jsx12("span", { children: "Try again" })
|
|
4212
4345
|
}
|
|
4213
4346
|
) })
|
|
4214
4347
|
] });
|
|
@@ -4244,7 +4377,9 @@ function deriveStep(flow, d, p, activeEntry) {
|
|
|
4244
4377
|
type: "amount",
|
|
4245
4378
|
smartAccount,
|
|
4246
4379
|
asset: d.selectedAsset,
|
|
4247
|
-
|
|
4380
|
+
// Seed the input from the USD-style value the user typed, not the
|
|
4381
|
+
// native source `amount` (which would corrupt the input on back).
|
|
4382
|
+
inputAmountUsd: d.inputAmountUsd ?? void 0
|
|
4248
4383
|
};
|
|
4249
4384
|
case "confirm":
|
|
4250
4385
|
if (!smartAccount || !d.selectedAsset || !d.amount || !d.targetAmount) {
|
|
@@ -5383,7 +5518,7 @@ function DepositFlow({
|
|
|
5383
5518
|
[storeApi]
|
|
5384
5519
|
);
|
|
5385
5520
|
if (showConnectStep) {
|
|
5386
|
-
return /* @__PURE__ */
|
|
5521
|
+
return /* @__PURE__ */ jsx12("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx12(
|
|
5387
5522
|
ConnectStep,
|
|
5388
5523
|
{
|
|
5389
5524
|
walletRows,
|
|
@@ -5430,15 +5565,21 @@ function DepositFlow({
|
|
|
5430
5565
|
}
|
|
5431
5566
|
if (isDepositAddressMode) {
|
|
5432
5567
|
if (!dappAddress) return null;
|
|
5433
|
-
return /* @__PURE__ */
|
|
5434
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
5568
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-modal-body", children: [
|
|
5569
|
+
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */ jsx12(
|
|
5435
5570
|
AccountPreparingSkeleton,
|
|
5436
5571
|
{
|
|
5437
|
-
errorMessage: activeEntry.
|
|
5438
|
-
onRetry:
|
|
5572
|
+
errorMessage: activeEntry.message ?? void 0,
|
|
5573
|
+
onRetry: () => handleRetrySetup(dappAddress)
|
|
5439
5574
|
}
|
|
5440
|
-
)
|
|
5441
|
-
|
|
5575
|
+
) : /* @__PURE__ */ jsx12(
|
|
5576
|
+
DepositAddressSkeleton,
|
|
5577
|
+
{
|
|
5578
|
+
uiConfig,
|
|
5579
|
+
allowedRoutes
|
|
5580
|
+
}
|
|
5581
|
+
)),
|
|
5582
|
+
effectiveStep.type === "deposit-address" && /* @__PURE__ */ jsx12(
|
|
5442
5583
|
DepositAddressStep,
|
|
5443
5584
|
{
|
|
5444
5585
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -5474,15 +5615,15 @@ function DepositFlow({
|
|
|
5474
5615
|
if (!dappAddress) return null;
|
|
5475
5616
|
const solanaAddr = reownWallet?.solanaAddress;
|
|
5476
5617
|
const solanaProvider = reownWallet?.solanaProvider;
|
|
5477
|
-
return /* @__PURE__ */
|
|
5478
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
5618
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-modal-body", children: [
|
|
5619
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx12(
|
|
5479
5620
|
AccountPreparingSkeleton,
|
|
5480
5621
|
{
|
|
5481
5622
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
5482
5623
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(dappAddress) : void 0
|
|
5483
5624
|
}
|
|
5484
5625
|
),
|
|
5485
|
-
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */
|
|
5626
|
+
effectiveStep.type === "solana-token-select" && solanaAddr && /* @__PURE__ */ jsx12(
|
|
5486
5627
|
SolanaTokenSelectStep,
|
|
5487
5628
|
{
|
|
5488
5629
|
solanaAddress: solanaAddr,
|
|
@@ -5496,7 +5637,7 @@ function DepositFlow({
|
|
|
5496
5637
|
debug
|
|
5497
5638
|
}
|
|
5498
5639
|
),
|
|
5499
|
-
effectiveStep.type === "solana-amount" && /* @__PURE__ */
|
|
5640
|
+
effectiveStep.type === "solana-amount" && /* @__PURE__ */ jsx12(
|
|
5500
5641
|
SolanaAmountStep,
|
|
5501
5642
|
{
|
|
5502
5643
|
token: effectiveStep.token,
|
|
@@ -5514,7 +5655,7 @@ function DepositFlow({
|
|
|
5514
5655
|
debug
|
|
5515
5656
|
}
|
|
5516
5657
|
),
|
|
5517
|
-
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */
|
|
5658
|
+
effectiveStep.type === "solana-confirm" && solanaAddr && solanaProvider ? /* @__PURE__ */ jsx12(
|
|
5518
5659
|
SolanaConfirmStep,
|
|
5519
5660
|
{
|
|
5520
5661
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -5535,16 +5676,16 @@ function DepositFlow({
|
|
|
5535
5676
|
onError: handleError,
|
|
5536
5677
|
debug
|
|
5537
5678
|
}
|
|
5538
|
-
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
/* @__PURE__ */
|
|
5679
|
+
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */ jsxs12("div", { className: "rs-step", children: [
|
|
5680
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-loading-state", children: [
|
|
5681
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx12(
|
|
5541
5682
|
"svg",
|
|
5542
5683
|
{
|
|
5543
5684
|
viewBox: "0 0 24 24",
|
|
5544
5685
|
fill: "none",
|
|
5545
5686
|
stroke: "currentColor",
|
|
5546
5687
|
strokeWidth: "2",
|
|
5547
|
-
children: /* @__PURE__ */
|
|
5688
|
+
children: /* @__PURE__ */ jsx12(
|
|
5548
5689
|
"path",
|
|
5549
5690
|
{
|
|
5550
5691
|
strokeLinecap: "round",
|
|
@@ -5554,22 +5695,22 @@ function DepositFlow({
|
|
|
5554
5695
|
)
|
|
5555
5696
|
}
|
|
5556
5697
|
) }),
|
|
5557
|
-
/* @__PURE__ */
|
|
5558
|
-
/* @__PURE__ */
|
|
5559
|
-
/* @__PURE__ */
|
|
5698
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-loading-text", children: [
|
|
5699
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
|
|
5700
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
|
|
5560
5701
|
] })
|
|
5561
5702
|
] }),
|
|
5562
|
-
/* @__PURE__ */
|
|
5703
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-step-footer", children: /* @__PURE__ */ jsx12(
|
|
5563
5704
|
"button",
|
|
5564
5705
|
{
|
|
5565
5706
|
type: "button",
|
|
5566
5707
|
className: "rs-button rs-button--default rs-button--full-width",
|
|
5567
5708
|
onClick: handleBack,
|
|
5568
|
-
children: /* @__PURE__ */
|
|
5709
|
+
children: /* @__PURE__ */ jsx12("span", { children: "Go Back" })
|
|
5569
5710
|
}
|
|
5570
5711
|
) })
|
|
5571
5712
|
] }) : null,
|
|
5572
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
5713
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx12(
|
|
5573
5714
|
ProcessingStep,
|
|
5574
5715
|
{
|
|
5575
5716
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -5596,7 +5737,7 @@ function DepositFlow({
|
|
|
5596
5737
|
] });
|
|
5597
5738
|
}
|
|
5598
5739
|
if (!signerContext?.walletClient || !signerContext?.publicClient) {
|
|
5599
|
-
return /* @__PURE__ */
|
|
5740
|
+
return /* @__PURE__ */ jsx12("div", { className: "rs-modal-body", children: /* @__PURE__ */ jsx12("div", { className: "rs-step", children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-text", children: /* @__PURE__ */ jsx12("div", { className: "rs-loading-title", children: "Connecting wallet\u2026" }) }) }) }) });
|
|
5600
5741
|
}
|
|
5601
5742
|
const ownerAddress = signerContext.ownerAddress;
|
|
5602
5743
|
const ownerChainId = signerContext.walletClient?.chain?.id ?? signerContext.publicClient.chain?.id ?? setupChainId;
|
|
@@ -5606,15 +5747,15 @@ function DepositFlow({
|
|
|
5606
5747
|
}
|
|
5607
5748
|
return getPublicClient(chainId);
|
|
5608
5749
|
};
|
|
5609
|
-
return /* @__PURE__ */
|
|
5610
|
-
effectiveStep.type === "setup" && /* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-modal-body", children: [
|
|
5751
|
+
effectiveStep.type === "setup" && /* @__PURE__ */ jsx12(
|
|
5611
5752
|
AccountPreparingSkeleton,
|
|
5612
5753
|
{
|
|
5613
5754
|
errorMessage: activeEntry.status === "error" ? activeEntry.message ?? void 0 : void 0,
|
|
5614
5755
|
onRetry: activeEntry.status === "error" ? () => handleRetrySetup(ownerAddress) : void 0
|
|
5615
5756
|
}
|
|
5616
5757
|
),
|
|
5617
|
-
effectiveStep.type === "select-asset" && /* @__PURE__ */
|
|
5758
|
+
effectiveStep.type === "select-asset" && /* @__PURE__ */ jsx12(
|
|
5618
5759
|
AssetSelectStep,
|
|
5619
5760
|
{
|
|
5620
5761
|
address: ownerAddress,
|
|
@@ -5632,7 +5773,7 @@ function DepositFlow({
|
|
|
5632
5773
|
} : void 0
|
|
5633
5774
|
}
|
|
5634
5775
|
),
|
|
5635
|
-
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */
|
|
5776
|
+
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */ jsx12(
|
|
5636
5777
|
DappImportAssetSelectStep,
|
|
5637
5778
|
{
|
|
5638
5779
|
sourceLabel: activeDappImportAvailability.assets[0]?.sourceLabel ?? activeDappImportProvider.label,
|
|
@@ -5640,7 +5781,7 @@ function DepositFlow({
|
|
|
5640
5781
|
onSelect: handleDappImportAssetSelected
|
|
5641
5782
|
}
|
|
5642
5783
|
),
|
|
5643
|
-
effectiveStep.type === "amount" && /* @__PURE__ */
|
|
5784
|
+
effectiveStep.type === "amount" && /* @__PURE__ */ jsx12(
|
|
5644
5785
|
AmountStep,
|
|
5645
5786
|
{
|
|
5646
5787
|
walletClient: signerContext.walletClient,
|
|
@@ -5652,7 +5793,7 @@ function DepositFlow({
|
|
|
5652
5793
|
chainId: effectiveStep.asset.depositChainId,
|
|
5653
5794
|
token: effectiveStep.asset.depositToken
|
|
5654
5795
|
} : void 0,
|
|
5655
|
-
defaultAmount: effectiveStep.
|
|
5796
|
+
defaultAmount: effectiveStep.inputAmountUsd ?? defaultAmount,
|
|
5656
5797
|
switchChain: signerContext.switchChain,
|
|
5657
5798
|
targetChain,
|
|
5658
5799
|
targetToken,
|
|
@@ -5672,7 +5813,7 @@ function DepositFlow({
|
|
|
5672
5813
|
}
|
|
5673
5814
|
}
|
|
5674
5815
|
),
|
|
5675
|
-
effectiveStep.type === "confirm" && /* @__PURE__ */
|
|
5816
|
+
effectiveStep.type === "confirm" && /* @__PURE__ */ jsx12(
|
|
5676
5817
|
ConfirmStep,
|
|
5677
5818
|
{
|
|
5678
5819
|
walletClient: signerContext.walletClient,
|
|
@@ -5712,7 +5853,7 @@ function DepositFlow({
|
|
|
5712
5853
|
onError: handleError
|
|
5713
5854
|
}
|
|
5714
5855
|
),
|
|
5715
|
-
effectiveStep.type === "processing" && /* @__PURE__ */
|
|
5856
|
+
effectiveStep.type === "processing" && /* @__PURE__ */ jsx12(
|
|
5716
5857
|
ProcessingStep,
|
|
5717
5858
|
{
|
|
5718
5859
|
smartAccount: effectiveStep.smartAccount,
|
|
@@ -5743,7 +5884,7 @@ function DepositFlow({
|
|
|
5743
5884
|
|
|
5744
5885
|
// src/components/history/DepositHistoryPanel.tsx
|
|
5745
5886
|
import { useCallback as useCallback5, useMemo as useMemo7, useState as useState10 } from "react";
|
|
5746
|
-
import { jsx as
|
|
5887
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5747
5888
|
function shortenHash(hash) {
|
|
5748
5889
|
if (hash.length <= 14) return hash;
|
|
5749
5890
|
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
@@ -5870,7 +6011,7 @@ function DepositHistoryPanel({
|
|
|
5870
6011
|
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
5871
6012
|
);
|
|
5872
6013
|
}, [deposits]);
|
|
5873
|
-
return /* @__PURE__ */
|
|
6014
|
+
return /* @__PURE__ */ jsxs13(
|
|
5874
6015
|
"div",
|
|
5875
6016
|
{
|
|
5876
6017
|
className: "rs-history-panel",
|
|
@@ -5878,55 +6019,55 @@ function DepositHistoryPanel({
|
|
|
5878
6019
|
"aria-label": "Deposit history",
|
|
5879
6020
|
onKeyDown: handleKeyDown,
|
|
5880
6021
|
children: [
|
|
5881
|
-
/* @__PURE__ */
|
|
5882
|
-
/* @__PURE__ */
|
|
6022
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-modal-header--redesigned", children: [
|
|
6023
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-modal-header-nav-left", children: /* @__PURE__ */ jsx13(
|
|
5883
6024
|
"button",
|
|
5884
6025
|
{
|
|
5885
6026
|
type: "button",
|
|
5886
6027
|
className: "rs-modal-header-back",
|
|
5887
6028
|
"aria-label": "Back",
|
|
5888
6029
|
onClick: onClose,
|
|
5889
|
-
children: /* @__PURE__ */
|
|
6030
|
+
children: /* @__PURE__ */ jsx13(ChevronLeftIcon, {})
|
|
5890
6031
|
}
|
|
5891
6032
|
) }),
|
|
5892
|
-
/* @__PURE__ */
|
|
6033
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ jsx13(
|
|
5893
6034
|
"button",
|
|
5894
6035
|
{
|
|
5895
6036
|
type: "button",
|
|
5896
6037
|
className: "rs-modal-close",
|
|
5897
6038
|
"aria-label": "Close",
|
|
5898
6039
|
onClick: onCloseModal,
|
|
5899
|
-
children: /* @__PURE__ */
|
|
6040
|
+
children: /* @__PURE__ */ jsx13(CloseIcon, {})
|
|
5900
6041
|
}
|
|
5901
6042
|
) })
|
|
5902
6043
|
] }),
|
|
5903
|
-
/* @__PURE__ */
|
|
5904
|
-
/* @__PURE__ */
|
|
5905
|
-
/* @__PURE__ */
|
|
5906
|
-
isLoading && deposits.length === 0 && /* @__PURE__ */
|
|
5907
|
-
/* @__PURE__ */
|
|
5908
|
-
/* @__PURE__ */
|
|
5909
|
-
/* @__PURE__ */
|
|
5910
|
-
/* @__PURE__ */
|
|
6044
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-screen", children: [
|
|
6045
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-screen-body", children: [
|
|
6046
|
+
/* @__PURE__ */ jsx13(BodyHeader, { icon: /* @__PURE__ */ jsx13(HistoryIcon, {}), title: "History" }),
|
|
6047
|
+
isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs13("div", { className: "rs-history-empty", children: [
|
|
6048
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx13(HistoryIcon, {}) }),
|
|
6049
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-empty-text", children: [
|
|
6050
|
+
/* @__PURE__ */ jsx13(Spinner, { className: "rs-spinner--sm" }),
|
|
6051
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
5911
6052
|
] })
|
|
5912
6053
|
] }),
|
|
5913
|
-
error && !isLoading && /* @__PURE__ */
|
|
5914
|
-
/* @__PURE__ */
|
|
5915
|
-
/* @__PURE__ */
|
|
5916
|
-
/* @__PURE__ */
|
|
5917
|
-
/* @__PURE__ */
|
|
6054
|
+
error && !isLoading && /* @__PURE__ */ jsxs13("div", { className: "rs-history-empty", children: [
|
|
6055
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx13(AlertTriangleIcon, {}) }),
|
|
6056
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-empty-text", children: [
|
|
6057
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
6058
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-hint", children: error })
|
|
5918
6059
|
] })
|
|
5919
6060
|
] }),
|
|
5920
|
-
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */
|
|
5921
|
-
/* @__PURE__ */
|
|
5922
|
-
/* @__PURE__ */
|
|
5923
|
-
/* @__PURE__ */
|
|
5924
|
-
/* @__PURE__ */
|
|
6061
|
+
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ jsxs13("div", { className: "rs-history-empty", children: [
|
|
6062
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx13(HistoryIcon, {}) }),
|
|
6063
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-empty-text", children: [
|
|
6064
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
6065
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
5925
6066
|
] })
|
|
5926
6067
|
] }),
|
|
5927
|
-
visibleDeposits.length > 0 && /* @__PURE__ */
|
|
5928
|
-
visibleDeposits.map((deposit, i) => /* @__PURE__ */
|
|
5929
|
-
hasMore && /* @__PURE__ */
|
|
6068
|
+
visibleDeposits.length > 0 && /* @__PURE__ */ jsxs13("div", { className: "rs-history-list", children: [
|
|
6069
|
+
visibleDeposits.map((deposit, i) => /* @__PURE__ */ jsx13(HistoryCard, { deposit }, deposit.txHash || i)),
|
|
6070
|
+
hasMore && /* @__PURE__ */ jsx13(
|
|
5930
6071
|
"button",
|
|
5931
6072
|
{
|
|
5932
6073
|
type: "button",
|
|
@@ -5938,7 +6079,7 @@ function DepositHistoryPanel({
|
|
|
5938
6079
|
)
|
|
5939
6080
|
] })
|
|
5940
6081
|
] }),
|
|
5941
|
-
/* @__PURE__ */
|
|
6082
|
+
/* @__PURE__ */ jsx13(PoweredBy, {})
|
|
5942
6083
|
] })
|
|
5943
6084
|
]
|
|
5944
6085
|
}
|
|
@@ -5964,7 +6105,7 @@ function HistoryCard({ deposit }) {
|
|
|
5964
6105
|
const date = deposit.createdAt ? formatDate(deposit.createdAt) : null;
|
|
5965
6106
|
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
5966
6107
|
const srcTxUrl = deposit.sourceTxHash ? getTxExplorerUrl(deposit.sourceTxHash, sourceChainId) : null;
|
|
5967
|
-
return /* @__PURE__ */
|
|
6108
|
+
return /* @__PURE__ */ jsxs13(
|
|
5968
6109
|
"button",
|
|
5969
6110
|
{
|
|
5970
6111
|
type: "button",
|
|
@@ -5972,38 +6113,38 @@ function HistoryCard({ deposit }) {
|
|
|
5972
6113
|
onClick: () => setExpanded((v) => !v),
|
|
5973
6114
|
"aria-expanded": expanded,
|
|
5974
6115
|
children: [
|
|
5975
|
-
/* @__PURE__ */
|
|
5976
|
-
/* @__PURE__ */
|
|
5977
|
-
/* @__PURE__ */
|
|
5978
|
-
sourceChainIcon && /* @__PURE__ */
|
|
6116
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-card-row", children: [
|
|
6117
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-card-icons", children: [
|
|
6118
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-card-token", children: sourceTokenIcon ? /* @__PURE__ */ jsx13("img", { src: sourceTokenIcon, alt: "" }) : sourceSymbol.slice(0, 2) }),
|
|
6119
|
+
sourceChainIcon && /* @__PURE__ */ jsx13("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx13("img", { src: sourceChainIcon, alt: "" }) })
|
|
5979
6120
|
] }),
|
|
5980
|
-
/* @__PURE__ */
|
|
5981
|
-
/* @__PURE__ */
|
|
5982
|
-
date && /* @__PURE__ */
|
|
6121
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-card-text", children: [
|
|
6122
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
6123
|
+
date && /* @__PURE__ */ jsx13("span", { className: "rs-history-card-date", children: date })
|
|
5983
6124
|
] }),
|
|
5984
|
-
/* @__PURE__ */
|
|
5985
|
-
/* @__PURE__ */
|
|
5986
|
-
/* @__PURE__ */
|
|
6125
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-history-card-side", children: [
|
|
6126
|
+
/* @__PURE__ */ jsx13("span", { className: "rs-history-card-amount", children: displayAmount }),
|
|
6127
|
+
/* @__PURE__ */ jsx13("span", { className: `rs-history-badge rs-history-badge--${status}`, children: STATUS_LABEL[status] })
|
|
5987
6128
|
] })
|
|
5988
6129
|
] }),
|
|
5989
|
-
|
|
5990
|
-
sourceChainName && /* @__PURE__ */
|
|
5991
|
-
/* @__PURE__ */
|
|
5992
|
-
/* @__PURE__ */
|
|
5993
|
-
/* @__PURE__ */
|
|
5994
|
-
sourceChainIcon && /* @__PURE__ */
|
|
6130
|
+
/* @__PURE__ */ jsx13("div", { className: "rs-history-card-panel", children: /* @__PURE__ */ jsx13("div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */ jsxs13("div", { className: "rs-history-card-details", children: [
|
|
6131
|
+
sourceChainName && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
6132
|
+
/* @__PURE__ */ jsx13("span", { children: "Source chain" }),
|
|
6133
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-detail-value", children: [
|
|
6134
|
+
/* @__PURE__ */ jsx13("span", { children: sourceChainName }),
|
|
6135
|
+
sourceChainIcon && /* @__PURE__ */ jsx13("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx13("img", { src: sourceChainIcon, alt: "" }) })
|
|
5995
6136
|
] })
|
|
5996
6137
|
] }),
|
|
5997
|
-
targetChainName && /* @__PURE__ */
|
|
5998
|
-
/* @__PURE__ */
|
|
5999
|
-
/* @__PURE__ */
|
|
6000
|
-
/* @__PURE__ */
|
|
6001
|
-
targetChainIcon && /* @__PURE__ */
|
|
6138
|
+
targetChainName && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
6139
|
+
/* @__PURE__ */ jsx13("span", { children: "Destination chain" }),
|
|
6140
|
+
/* @__PURE__ */ jsxs13("span", { className: "rs-amount-detail-value", children: [
|
|
6141
|
+
/* @__PURE__ */ jsx13("span", { children: targetChainName }),
|
|
6142
|
+
targetChainIcon && /* @__PURE__ */ jsx13("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx13("img", { src: targetChainIcon, alt: "" }) })
|
|
6002
6143
|
] })
|
|
6003
6144
|
] }),
|
|
6004
|
-
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */
|
|
6005
|
-
/* @__PURE__ */
|
|
6006
|
-
/* @__PURE__ */
|
|
6145
|
+
srcTxUrl && deposit.sourceTxHash && /* @__PURE__ */ jsxs13("div", { className: "rs-amount-detail-row", children: [
|
|
6146
|
+
/* @__PURE__ */ jsx13("span", { children: "Transaction details" }),
|
|
6147
|
+
/* @__PURE__ */ jsxs13(
|
|
6007
6148
|
"a",
|
|
6008
6149
|
{
|
|
6009
6150
|
href: srcTxUrl,
|
|
@@ -6012,13 +6153,13 @@ function HistoryCard({ deposit }) {
|
|
|
6012
6153
|
className: "rs-history-card-link",
|
|
6013
6154
|
onClick: (e) => e.stopPropagation(),
|
|
6014
6155
|
children: [
|
|
6015
|
-
/* @__PURE__ */
|
|
6016
|
-
/* @__PURE__ */
|
|
6156
|
+
/* @__PURE__ */ jsx13("span", { children: shortenHash(deposit.sourceTxHash) }),
|
|
6157
|
+
/* @__PURE__ */ jsx13(ArrowUpRightIcon, {})
|
|
6017
6158
|
]
|
|
6018
6159
|
}
|
|
6019
6160
|
)
|
|
6020
6161
|
] })
|
|
6021
|
-
] })
|
|
6162
|
+
] }) }) })
|
|
6022
6163
|
]
|
|
6023
6164
|
}
|
|
6024
6165
|
);
|
|
@@ -6026,9 +6167,9 @@ function HistoryCard({ deposit }) {
|
|
|
6026
6167
|
DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
6027
6168
|
|
|
6028
6169
|
// src/DepositModal.tsx
|
|
6029
|
-
import { jsx as
|
|
6170
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6030
6171
|
var ReownDepositInner = lazy2(
|
|
6031
|
-
() => import("./DepositModalReown-
|
|
6172
|
+
() => import("./DepositModalReown-QOTUF4JC.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
6032
6173
|
);
|
|
6033
6174
|
function sortByCreatedAtDesc(items) {
|
|
6034
6175
|
return [...items].sort((a, b) => {
|
|
@@ -6044,7 +6185,7 @@ function DepositModal(props) {
|
|
|
6044
6185
|
"dappWalletClient"
|
|
6045
6186
|
);
|
|
6046
6187
|
if (needsReown) {
|
|
6047
|
-
return /* @__PURE__ */
|
|
6188
|
+
return /* @__PURE__ */ jsx14(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx14(
|
|
6048
6189
|
ReownDepositInner,
|
|
6049
6190
|
{
|
|
6050
6191
|
...props,
|
|
@@ -6052,7 +6193,7 @@ function DepositModal(props) {
|
|
|
6052
6193
|
}
|
|
6053
6194
|
) });
|
|
6054
6195
|
}
|
|
6055
|
-
return /* @__PURE__ */
|
|
6196
|
+
return /* @__PURE__ */ jsx14(
|
|
6056
6197
|
DepositModalInner,
|
|
6057
6198
|
{
|
|
6058
6199
|
...props,
|
|
@@ -6252,7 +6393,7 @@ function DepositModalInner({
|
|
|
6252
6393
|
}, [isOpen, store]);
|
|
6253
6394
|
const showBackButton = uiConfig?.showBackButton ?? true;
|
|
6254
6395
|
const canGoBack = backHandler !== void 0;
|
|
6255
|
-
return /* @__PURE__ */
|
|
6396
|
+
return /* @__PURE__ */ jsx14(DepositStoreProvider, { store, children: /* @__PURE__ */ jsx14(
|
|
6256
6397
|
Modal,
|
|
6257
6398
|
{
|
|
6258
6399
|
isOpen,
|
|
@@ -6260,20 +6401,20 @@ function DepositModalInner({
|
|
|
6260
6401
|
className,
|
|
6261
6402
|
inline,
|
|
6262
6403
|
closeOnOverlayClick,
|
|
6263
|
-
children: /* @__PURE__ */
|
|
6264
|
-
/* @__PURE__ */
|
|
6265
|
-
/* @__PURE__ */
|
|
6404
|
+
children: /* @__PURE__ */ jsxs14("div", { ref: modalRef, className: "rs-modal", children: [
|
|
6405
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-modal-header--redesigned", children: [
|
|
6406
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ jsx14(
|
|
6266
6407
|
"button",
|
|
6267
6408
|
{
|
|
6268
6409
|
type: "button",
|
|
6269
6410
|
className: "rs-modal-header-back",
|
|
6270
6411
|
"aria-label": "Go back",
|
|
6271
6412
|
onClick: backHandler,
|
|
6272
|
-
children: /* @__PURE__ */
|
|
6413
|
+
children: /* @__PURE__ */ jsx14(ChevronLeftIcon, {})
|
|
6273
6414
|
}
|
|
6274
6415
|
) }),
|
|
6275
|
-
/* @__PURE__ */
|
|
6276
|
-
historyButtonVisible && /* @__PURE__ */
|
|
6416
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-modal-header-nav-right", children: [
|
|
6417
|
+
historyButtonVisible && /* @__PURE__ */ jsx14(
|
|
6277
6418
|
"button",
|
|
6278
6419
|
{
|
|
6279
6420
|
type: "button",
|
|
@@ -6281,22 +6422,22 @@ function DepositModalInner({
|
|
|
6281
6422
|
"aria-label": "Deposit history",
|
|
6282
6423
|
onClick: handleHistoryOpen,
|
|
6283
6424
|
disabled: !recipient,
|
|
6284
|
-
children: /* @__PURE__ */
|
|
6425
|
+
children: /* @__PURE__ */ jsx14(HistoryIcon, {})
|
|
6285
6426
|
}
|
|
6286
6427
|
),
|
|
6287
|
-
/* @__PURE__ */
|
|
6428
|
+
/* @__PURE__ */ jsx14(
|
|
6288
6429
|
"button",
|
|
6289
6430
|
{
|
|
6290
6431
|
type: "button",
|
|
6291
6432
|
onClick: onClose,
|
|
6292
6433
|
className: "rs-modal-close",
|
|
6293
6434
|
"aria-label": "Close",
|
|
6294
|
-
children: /* @__PURE__ */
|
|
6435
|
+
children: /* @__PURE__ */ jsx14(CloseIcon, {})
|
|
6295
6436
|
}
|
|
6296
6437
|
)
|
|
6297
6438
|
] })
|
|
6298
6439
|
] }),
|
|
6299
|
-
/* @__PURE__ */
|
|
6440
|
+
/* @__PURE__ */ jsx14(
|
|
6300
6441
|
DepositFlow,
|
|
6301
6442
|
{
|
|
6302
6443
|
dappWalletClient,
|
|
@@ -6333,7 +6474,7 @@ function DepositModalInner({
|
|
|
6333
6474
|
debug
|
|
6334
6475
|
}
|
|
6335
6476
|
),
|
|
6336
|
-
showHistoryButton && historyOpen && /* @__PURE__ */
|
|
6477
|
+
showHistoryButton && historyOpen && /* @__PURE__ */ jsx14(
|
|
6337
6478
|
DepositHistoryPanel,
|
|
6338
6479
|
{
|
|
6339
6480
|
deposits: historyDeposits,
|