@rhinestone/deposit-modal 0.11.1 → 0.12.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-MO5QDLIT.mjs → DepositModalReown-MVVRUXO4.mjs} +7 -7
- package/dist/{DepositModalReown-YGB73NMW.cjs → DepositModalReown-PZXHTPIS.cjs} +17 -17
- package/dist/{chunk-OWYPKCYD.mjs → chunk-2AMRKYJ4.mjs} +4 -4
- package/dist/{chunk-FVUXJ3RP.cjs → chunk-2PQ34KU3.cjs} +3 -3
- package/dist/{chunk-TENL4H64.cjs → chunk-4R2ZHSDQ.cjs} +4 -9
- package/dist/{chunk-4FTI3GTB.cjs → chunk-4SRVZRZF.cjs} +1 -1
- package/dist/{chunk-MZ53PDIX.mjs → chunk-53IGTENZ.mjs} +1 -1
- package/dist/{chunk-CWGUBFJL.mjs → chunk-5IP67CL5.mjs} +5 -15
- package/dist/{chunk-HUHBNYD3.cjs → chunk-6ZJTZ7DS.cjs} +81 -80
- package/dist/{chunk-LQGYPM5B.cjs → chunk-BK54FZAE.cjs} +79 -79
- package/dist/{chunk-EIWOVX53.mjs → chunk-EUIPQ3T4.mjs} +3 -3
- package/dist/{chunk-URFSTNRS.mjs → chunk-GZNMBZHY.mjs} +1 -1
- package/dist/{chunk-ZQR36NCV.cjs → chunk-LBJFACLH.cjs} +84 -94
- package/dist/{chunk-SSQ27YFB.cjs → chunk-LTPVHQXJ.cjs} +543 -540
- package/dist/{chunk-YELNYILK.mjs → chunk-Q5MFRAWD.mjs} +287 -284
- package/dist/{chunk-5746YXKC.mjs → chunk-QF5T6HXC.mjs} +5 -4
- package/dist/{chunk-V6T7LORJ.mjs → chunk-RMYUE6HJ.mjs} +1 -1
- package/dist/{chunk-ZRIRCIQM.cjs → chunk-WZJMJFP7.cjs} +62 -62
- package/dist/{chunk-JPRV36DT.cjs → chunk-XJB3VG4C.cjs} +2 -2
- package/dist/{chunk-53IFZGSF.mjs → chunk-YR43AAX5.mjs} +0 -5
- package/dist/claim.cjs +6 -6
- package/dist/claim.d.cts +2 -2
- package/dist/claim.d.ts +2 -2
- package/dist/claim.mjs +5 -5
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +2 -2
- package/dist/deposit.cjs +8 -8
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +7 -7
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +9 -9
- package/dist/polymarket.cjs +5 -5
- package/dist/polymarket.mjs +2 -2
- package/dist/{types-CsGa-HxD.d.cts → types-BO4iP6fG.d.cts} +0 -1
- package/dist/{types-DdS8OySJ.d.ts → types-oFblf65g.d.ts} +0 -1
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +5 -5
- package/package.json +1 -1
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
runAccountSetupDeduped,
|
|
18
18
|
txRefsMatch,
|
|
19
19
|
warnRemovedProps
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QF5T6HXC.mjs";
|
|
21
21
|
import {
|
|
22
22
|
ListRow
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RMYUE6HJ.mjs";
|
|
24
24
|
import {
|
|
25
25
|
AlertTriangleIcon,
|
|
26
26
|
AppleIcon,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
useLatestRef,
|
|
87
87
|
useRpcUrls,
|
|
88
88
|
useStableRpcUrls
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-5IP67CL5.mjs";
|
|
90
90
|
import {
|
|
91
91
|
POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
92
92
|
POLYMARKET_ICON_URL,
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
executePolymarketSafeTransfer,
|
|
98
98
|
fetchPolymarketProxyWallet,
|
|
99
99
|
readPolymarketBalances
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-53IGTENZ.mjs";
|
|
101
101
|
import {
|
|
102
102
|
CHAIN_BY_ID,
|
|
103
103
|
HYPERCORE_CHAIN_ID,
|
|
@@ -107,7 +107,6 @@ import {
|
|
|
107
107
|
SOLANA_TOKENS,
|
|
108
108
|
cdnIconUrl,
|
|
109
109
|
findTokenDecimals,
|
|
110
|
-
getBundledTargetTokens,
|
|
111
110
|
getChainBadge,
|
|
112
111
|
getChainIcon,
|
|
113
112
|
getChainId,
|
|
@@ -130,7 +129,7 @@ import {
|
|
|
130
129
|
publishShortlistTokens,
|
|
131
130
|
targetChainToCaip2,
|
|
132
131
|
targetChainToChainId
|
|
133
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-YR43AAX5.mjs";
|
|
134
133
|
|
|
135
134
|
// src/DepositModal.tsx
|
|
136
135
|
import {
|
|
@@ -1689,9 +1688,120 @@ import {
|
|
|
1689
1688
|
} from "react";
|
|
1690
1689
|
import { formatUnits as formatUnits3 } from "viem";
|
|
1691
1690
|
|
|
1691
|
+
// src/components/steps/DepositAddressSkeleton.tsx
|
|
1692
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1693
|
+
var BASE_CHAIN_ID = 8453;
|
|
1694
|
+
function DepositAddressSkeleton({
|
|
1695
|
+
uiConfig
|
|
1696
|
+
}) {
|
|
1697
|
+
const evmChainIds = getSupportedChainIds();
|
|
1698
|
+
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
1699
|
+
const tokensForChain = getTargetTokenSymbolsForChain(defaultChainId);
|
|
1700
|
+
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
|
|
1701
|
+
const chainName = getChainName(defaultChainId);
|
|
1702
|
+
const chainIcon = getChainIcon(defaultChainId);
|
|
1703
|
+
return /* @__PURE__ */ jsxs8("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
1704
|
+
/* @__PURE__ */ jsx10("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
1705
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-screen-body", children: [
|
|
1706
|
+
/* @__PURE__ */ jsx10(BodyHeader, { icon: /* @__PURE__ */ jsx10(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
1707
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
1708
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-address-dropdown", children: [
|
|
1709
|
+
/* @__PURE__ */ jsx10("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
1710
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
1711
|
+
/* @__PURE__ */ jsx10(
|
|
1712
|
+
CdnIcon,
|
|
1713
|
+
{
|
|
1714
|
+
src: chainIcon,
|
|
1715
|
+
className: "rs-deposit-address-dropdown-icon"
|
|
1716
|
+
}
|
|
1717
|
+
),
|
|
1718
|
+
/* @__PURE__ */ jsx10("span", { children: chainName }),
|
|
1719
|
+
/* @__PURE__ */ jsx10(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1720
|
+
] })
|
|
1721
|
+
] }),
|
|
1722
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-address-dropdown", children: [
|
|
1723
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
1724
|
+
/* @__PURE__ */ jsx10("span", { children: "Supported token" }),
|
|
1725
|
+
/* @__PURE__ */ jsxs8("span", { className: "rs-deposit-address-min", children: [
|
|
1726
|
+
"Min.$",
|
|
1727
|
+
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
1728
|
+
/* @__PURE__ */ jsx10(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx10(
|
|
1729
|
+
InfoIcon,
|
|
1730
|
+
{
|
|
1731
|
+
className: "rs-deposit-address-min-icon",
|
|
1732
|
+
"aria-hidden": "true"
|
|
1733
|
+
}
|
|
1734
|
+
) })
|
|
1735
|
+
] })
|
|
1736
|
+
] }),
|
|
1737
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
1738
|
+
/* @__PURE__ */ jsx10(
|
|
1739
|
+
TokenIcon,
|
|
1740
|
+
{
|
|
1741
|
+
symbol: defaultToken,
|
|
1742
|
+
className: "rs-deposit-address-dropdown-icon"
|
|
1743
|
+
}
|
|
1744
|
+
),
|
|
1745
|
+
/* @__PURE__ */ jsx10("span", { children: defaultToken }),
|
|
1746
|
+
/* @__PURE__ */ jsx10(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1747
|
+
] })
|
|
1748
|
+
] })
|
|
1749
|
+
] }),
|
|
1750
|
+
/* @__PURE__ */ jsxs8(
|
|
1751
|
+
"div",
|
|
1752
|
+
{
|
|
1753
|
+
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
1754
|
+
children: [
|
|
1755
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-address-well", children: [
|
|
1756
|
+
/* @__PURE__ */ jsx10("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx10("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
1757
|
+
/* @__PURE__ */ jsx10("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
1758
|
+
] }),
|
|
1759
|
+
/* @__PURE__ */ jsxs8(
|
|
1760
|
+
"button",
|
|
1761
|
+
{
|
|
1762
|
+
type: "button",
|
|
1763
|
+
className: "rs-deposit-address-copy",
|
|
1764
|
+
disabled: true,
|
|
1765
|
+
"aria-hidden": "true",
|
|
1766
|
+
children: [
|
|
1767
|
+
/* @__PURE__ */ jsx10(CopyIcon, {}),
|
|
1768
|
+
"Copy address"
|
|
1769
|
+
]
|
|
1770
|
+
}
|
|
1771
|
+
)
|
|
1772
|
+
]
|
|
1773
|
+
}
|
|
1774
|
+
),
|
|
1775
|
+
/* @__PURE__ */ jsx10("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs8("div", { className: "rs-price-impact-header", children: [
|
|
1776
|
+
/* @__PURE__ */ jsxs8("span", { className: "rs-price-impact-header-left", children: [
|
|
1777
|
+
/* @__PURE__ */ jsx10("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
1778
|
+
/* @__PURE__ */ jsx10("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx10("strong", { children: "0.00%" }) }),
|
|
1779
|
+
/* @__PURE__ */ jsx10(
|
|
1780
|
+
Tooltip,
|
|
1781
|
+
{
|
|
1782
|
+
className: "rs-price-impact-info",
|
|
1783
|
+
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
1784
|
+
children: /* @__PURE__ */ jsx10(InfoIcon, { "aria-hidden": "true" })
|
|
1785
|
+
}
|
|
1786
|
+
)
|
|
1787
|
+
] }),
|
|
1788
|
+
/* @__PURE__ */ jsx10(
|
|
1789
|
+
ChevronDownIcon,
|
|
1790
|
+
{
|
|
1791
|
+
className: "rs-price-impact-chevron",
|
|
1792
|
+
"aria-hidden": "true"
|
|
1793
|
+
}
|
|
1794
|
+
)
|
|
1795
|
+
] }) })
|
|
1796
|
+
] }),
|
|
1797
|
+
/* @__PURE__ */ jsx10(PoweredBy, {})
|
|
1798
|
+
] });
|
|
1799
|
+
}
|
|
1800
|
+
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
1801
|
+
|
|
1692
1802
|
// src/components/ui/DepositNotification.tsx
|
|
1693
1803
|
import { useState as useState5, useEffect as useEffect5, useRef as useRef4, useCallback } from "react";
|
|
1694
|
-
import { jsx as
|
|
1804
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1695
1805
|
var INITIAL_POLL_INTERVAL = 3e3;
|
|
1696
1806
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1697
1807
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
@@ -1748,7 +1858,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
1748
1858
|
}
|
|
1749
1859
|
return "Bridge failed";
|
|
1750
1860
|
}
|
|
1751
|
-
var txLinkIcon = /* @__PURE__ */
|
|
1861
|
+
var txLinkIcon = /* @__PURE__ */ jsx11(ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
|
|
1752
1862
|
function DepositNotification({
|
|
1753
1863
|
deposit,
|
|
1754
1864
|
smartAccount,
|
|
@@ -1887,7 +1997,7 @@ function DepositNotification({
|
|
|
1887
1997
|
const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainToChainId(targetChain), destinationTxHash) : null;
|
|
1888
1998
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1889
1999
|
const subtitle = status === "complete" ? "Your deposit has been credited to your account." : status === "failed" ? "Your deposit could not be processed." : "Your deposit will be credited to your account shortly.";
|
|
1890
|
-
const statusIcon = status === "complete" ? /* @__PURE__ */
|
|
2000
|
+
const statusIcon = status === "complete" ? /* @__PURE__ */ jsx11("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ jsx11(CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ jsx11("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ jsx11(CloseIcon, {}) }) : /* @__PURE__ */ jsx11("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ jsxs9(
|
|
1891
2001
|
"svg",
|
|
1892
2002
|
{
|
|
1893
2003
|
className: "rs-deposit-notification-spinner",
|
|
@@ -1896,7 +2006,7 @@ function DepositNotification({
|
|
|
1896
2006
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1897
2007
|
"aria-hidden": "true",
|
|
1898
2008
|
children: [
|
|
1899
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ jsx11(
|
|
1900
2010
|
"path",
|
|
1901
2011
|
{
|
|
1902
2012
|
className: "rs-deposit-notification-spinner-track",
|
|
@@ -1906,7 +2016,7 @@ function DepositNotification({
|
|
|
1906
2016
|
strokeLinecap: "round"
|
|
1907
2017
|
}
|
|
1908
2018
|
),
|
|
1909
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ jsx11(
|
|
1910
2020
|
"path",
|
|
1911
2021
|
{
|
|
1912
2022
|
className: "rs-deposit-notification-spinner-head",
|
|
@@ -1920,31 +2030,31 @@ function DepositNotification({
|
|
|
1920
2030
|
}
|
|
1921
2031
|
) });
|
|
1922
2032
|
const showClose = status !== "processing";
|
|
1923
|
-
return /* @__PURE__ */
|
|
2033
|
+
return /* @__PURE__ */ jsxs9(
|
|
1924
2034
|
"div",
|
|
1925
2035
|
{
|
|
1926
2036
|
className: `rs-deposit-notification rs-deposit-notification--${status} ${expanded ? "rs-deposit-notification--expanded" : ""}`,
|
|
1927
2037
|
children: [
|
|
1928
|
-
/* @__PURE__ */
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
-
/* @__PURE__ */
|
|
1931
|
-
/* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
showClose && /* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-header", children: [
|
|
2039
|
+
/* @__PURE__ */ jsx11("div", { className: "rs-deposit-notification-icon", children: statusIcon }),
|
|
2040
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-content", children: [
|
|
2041
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-title-row", children: [
|
|
2042
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-title", children: title }),
|
|
2043
|
+
showClose && /* @__PURE__ */ jsx11(
|
|
1934
2044
|
"button",
|
|
1935
2045
|
{
|
|
1936
2046
|
type: "button",
|
|
1937
2047
|
className: "rs-deposit-notification-close",
|
|
1938
2048
|
onClick: () => onDismiss(deposit.id),
|
|
1939
2049
|
"aria-label": "Dismiss",
|
|
1940
|
-
children: /* @__PURE__ */
|
|
2050
|
+
children: /* @__PURE__ */ jsx11(CloseIcon, {})
|
|
1941
2051
|
}
|
|
1942
2052
|
)
|
|
1943
2053
|
] }),
|
|
1944
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ jsx11("div", { className: "rs-deposit-notification-subtitle", children: subtitle })
|
|
1945
2055
|
] })
|
|
1946
2056
|
] }),
|
|
1947
|
-
/* @__PURE__ */
|
|
2057
|
+
/* @__PURE__ */ jsxs9(
|
|
1948
2058
|
"button",
|
|
1949
2059
|
{
|
|
1950
2060
|
type: "button",
|
|
@@ -1952,15 +2062,15 @@ function DepositNotification({
|
|
|
1952
2062
|
onClick: () => setExpanded(!expanded),
|
|
1953
2063
|
"aria-expanded": expanded,
|
|
1954
2064
|
children: [
|
|
1955
|
-
/* @__PURE__ */
|
|
1956
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ jsx11("span", { children: expanded ? "See less details" : "See more details" }),
|
|
2066
|
+
/* @__PURE__ */ jsx11(ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
1957
2067
|
]
|
|
1958
2068
|
}
|
|
1959
2069
|
),
|
|
1960
|
-
expanded && /* @__PURE__ */
|
|
1961
|
-
/* @__PURE__ */
|
|
1962
|
-
/* @__PURE__ */
|
|
1963
|
-
/* @__PURE__ */
|
|
2070
|
+
expanded && /* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-details", children: [
|
|
2071
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
2072
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-label", children: "Deposit tx" }),
|
|
2073
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-value", children: sourceExplorerUrl ? /* @__PURE__ */ jsxs9(
|
|
1964
2074
|
"a",
|
|
1965
2075
|
{
|
|
1966
2076
|
href: sourceExplorerUrl,
|
|
@@ -1974,9 +2084,9 @@ function DepositNotification({
|
|
|
1974
2084
|
}
|
|
1975
2085
|
) : truncateHash(txHash) })
|
|
1976
2086
|
] }),
|
|
1977
|
-
destinationTxHash && /* @__PURE__ */
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
2087
|
+
destinationTxHash && /* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
2088
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-label", children: "Completion tx" }),
|
|
2089
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-value", children: destExplorerUrl ? /* @__PURE__ */ jsxs9(
|
|
1980
2090
|
"a",
|
|
1981
2091
|
{
|
|
1982
2092
|
href: destExplorerUrl,
|
|
@@ -1990,13 +2100,13 @@ function DepositNotification({
|
|
|
1990
2100
|
}
|
|
1991
2101
|
) : truncateHash(destinationTxHash) })
|
|
1992
2102
|
] }),
|
|
1993
|
-
/* @__PURE__ */
|
|
1994
|
-
/* @__PURE__ */
|
|
1995
|
-
/* @__PURE__ */
|
|
2103
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
2104
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-label", children: "Order submitted" }),
|
|
2105
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-value", children: formatTimestamp(detectedAt) })
|
|
1996
2106
|
] }),
|
|
1997
|
-
completedAt && /* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
/* @__PURE__ */
|
|
2107
|
+
completedAt && /* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
2108
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-label", children: "Order filled" }),
|
|
2109
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-value", children: formatTimestamp(completedAt) })
|
|
2000
2110
|
] })
|
|
2001
2111
|
] })
|
|
2002
2112
|
]
|
|
@@ -2005,7 +2115,7 @@ function DepositNotification({
|
|
|
2005
2115
|
}
|
|
2006
2116
|
|
|
2007
2117
|
// src/components/steps/DepositAddressStep.tsx
|
|
2008
|
-
import { jsx as
|
|
2118
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2009
2119
|
var QRCode = lazy(
|
|
2010
2120
|
() => import("./QRCode-WUC652SH.mjs").then((m) => ({ default: m.QRCode }))
|
|
2011
2121
|
);
|
|
@@ -2092,10 +2202,6 @@ function chainLabel(chainId, catalogChain) {
|
|
|
2092
2202
|
function computeTokensForChain(chainId, topTokens, catalogChain) {
|
|
2093
2203
|
const fromBackend = topTokens?.[String(chainId)]?.map((t) => t.symbol);
|
|
2094
2204
|
if (fromBackend) return fromBackend;
|
|
2095
|
-
if (chainId === "solana") return SOLANA_TOKENS.map((t) => t.symbol);
|
|
2096
|
-
if (chainId === "hypercore") return ["USDC", "USDT0"];
|
|
2097
|
-
const bundled = getBundledTargetTokens(chainId).map((t) => t.symbol);
|
|
2098
|
-
if (bundled.length > 0) return bundled;
|
|
2099
2205
|
return Array.isArray(catalogChain?.supportedTokens) ? catalogChain.supportedTokens.map((t) => t.symbol) : [];
|
|
2100
2206
|
}
|
|
2101
2207
|
function resolveSourceTokenAddress(symbol, chainId, topTokens, catalogChain) {
|
|
@@ -2106,12 +2212,12 @@ function resolveSourceTokenAddress(symbol, chainId, topTokens, catalogChain) {
|
|
|
2106
2212
|
return Array.isArray(catalogChain?.supportedTokens) ? catalogChain.supportedTokens.find((t) => t.symbol === symbol)?.address : void 0;
|
|
2107
2213
|
}
|
|
2108
2214
|
function TokenGlyph({ symbol }) {
|
|
2109
|
-
return /* @__PURE__ */
|
|
2215
|
+
return /* @__PURE__ */ jsx12(
|
|
2110
2216
|
TokenIcon,
|
|
2111
2217
|
{
|
|
2112
2218
|
symbol,
|
|
2113
2219
|
className: "rs-deposit-address-dropdown-icon",
|
|
2114
|
-
fallback: /* @__PURE__ */
|
|
2220
|
+
fallback: /* @__PURE__ */ jsx12("span", { className: "rs-deposit-address-dropdown-icon rs-deposit-address-dropdown-icon--fallback", children: symbol.slice(0, 3) })
|
|
2115
2221
|
}
|
|
2116
2222
|
);
|
|
2117
2223
|
}
|
|
@@ -2149,7 +2255,7 @@ function DepositAddressStep({
|
|
|
2149
2255
|
}, [service]);
|
|
2150
2256
|
const BASE_CHAIN_ID2 = 8453;
|
|
2151
2257
|
const evmChainIds = useDepositChainIds();
|
|
2152
|
-
const { catalog } = useChainCatalog();
|
|
2258
|
+
const { catalog, isLoading: catalogLoading } = useChainCatalog();
|
|
2153
2259
|
const catalogFor = useCallback2(
|
|
2154
2260
|
(chain) => {
|
|
2155
2261
|
if (!catalog) return void 0;
|
|
@@ -2171,10 +2277,11 @@ function DepositAddressStep({
|
|
|
2171
2277
|
}, [evmChainIds, hasSolana, topTokens, catalogFor]);
|
|
2172
2278
|
const preferredChainId = (options) => options.includes(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : options[0] ?? BASE_CHAIN_ID2;
|
|
2173
2279
|
const [sourceChainId, setSourceChainId] = useState6(() => preferredChainId(chainOptions));
|
|
2280
|
+
const chainChosenByUser = useRef5(false);
|
|
2174
2281
|
useEffect6(() => {
|
|
2175
|
-
if (chainOptions.length
|
|
2176
|
-
|
|
2177
|
-
|
|
2282
|
+
if (chainOptions.length === 0) return;
|
|
2283
|
+
const stale = chainChosenByUser.current ? !chainOptions.includes(sourceChainId) : sourceChainId !== preferredChainId(chainOptions);
|
|
2284
|
+
if (stale) setSourceChainId(preferredChainId(chainOptions));
|
|
2178
2285
|
}, [chainOptions, sourceChainId]);
|
|
2179
2286
|
const isSolana = sourceChainId === "solana";
|
|
2180
2287
|
const isHyperCore = sourceChainId === "hypercore";
|
|
@@ -2302,6 +2409,7 @@ function DepositAddressStep({
|
|
|
2302
2409
|
topTokens,
|
|
2303
2410
|
catalogFor(nextChain)
|
|
2304
2411
|
);
|
|
2412
|
+
chainChosenByUser.current = true;
|
|
2305
2413
|
setSourceChainId(nextChain);
|
|
2306
2414
|
setSourceTokenSymbol(pickFallbackToken(nextTokens, sourceTokenSymbol));
|
|
2307
2415
|
setChainDropdownOpen(false);
|
|
@@ -2438,13 +2546,20 @@ function DepositAddressStep({
|
|
|
2438
2546
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
2439
2547
|
}, []);
|
|
2440
2548
|
const qrIconSrc = catalogFor(sourceChainId)?.iconUrl ?? getChainIcon(sourceChainId);
|
|
2441
|
-
|
|
2442
|
-
/* @__PURE__ */
|
|
2443
|
-
|
|
2444
|
-
/* @__PURE__ */
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2549
|
+
if (chainOptions.length === 0) {
|
|
2550
|
+
if (catalogLoading) return /* @__PURE__ */ jsx12(DepositAddressSkeleton, { uiConfig });
|
|
2551
|
+
return /* @__PURE__ */ jsx12("div", { className: "rs-screen", children: /* @__PURE__ */ jsxs10("div", { className: "rs-screen-body", children: [
|
|
2552
|
+
/* @__PURE__ */ jsx12(BodyHeader, { icon: /* @__PURE__ */ jsx12(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2553
|
+
/* @__PURE__ */ jsx12(Callout, { variant: "error", children: "Supported chains are unavailable right now, so there is no deposit address to show. Close and try again in a moment." })
|
|
2554
|
+
] }) });
|
|
2555
|
+
}
|
|
2556
|
+
return /* @__PURE__ */ jsxs10("div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
2557
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-screen-body", children: [
|
|
2558
|
+
/* @__PURE__ */ jsx12(BodyHeader, { icon: /* @__PURE__ */ jsx12(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2559
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-selectors", children: [
|
|
2560
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
2561
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2562
|
+
/* @__PURE__ */ jsxs10(
|
|
2448
2563
|
"button",
|
|
2449
2564
|
{
|
|
2450
2565
|
type: "button",
|
|
@@ -2455,45 +2570,45 @@ function DepositAddressStep({
|
|
|
2455
2570
|
setTokenDropdownOpen(false);
|
|
2456
2571
|
},
|
|
2457
2572
|
children: [
|
|
2458
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ jsx12(
|
|
2459
2574
|
CdnIcon,
|
|
2460
2575
|
{
|
|
2461
2576
|
src: catalogFor(sourceChainId)?.iconUrl ?? getChainIcon(sourceChainId),
|
|
2462
2577
|
className: "rs-deposit-address-dropdown-icon"
|
|
2463
2578
|
}
|
|
2464
2579
|
),
|
|
2465
|
-
/* @__PURE__ */
|
|
2466
|
-
/* @__PURE__ */
|
|
2580
|
+
/* @__PURE__ */ jsx12("span", { children: chainLabel(sourceChainId, catalogFor(sourceChainId)) }),
|
|
2581
|
+
/* @__PURE__ */ jsx12(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2467
2582
|
]
|
|
2468
2583
|
}
|
|
2469
2584
|
),
|
|
2470
|
-
chainDropdownOpen && /* @__PURE__ */
|
|
2585
|
+
chainDropdownOpen && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-dropdown-menu", children: chainOptions.map((chainId) => /* @__PURE__ */ jsxs10(
|
|
2471
2586
|
"button",
|
|
2472
2587
|
{
|
|
2473
2588
|
type: "button",
|
|
2474
2589
|
className: `rs-deposit-address-dropdown-item ${chainId === sourceChainId ? "rs-deposit-address-dropdown-item--active" : ""}`,
|
|
2475
2590
|
onClick: () => handleSelectChain(chainId),
|
|
2476
2591
|
children: [
|
|
2477
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ jsx12(
|
|
2478
2593
|
CdnIcon,
|
|
2479
2594
|
{
|
|
2480
2595
|
src: catalogFor(chainId)?.iconUrl ?? getChainIcon(chainId),
|
|
2481
2596
|
className: "rs-deposit-address-dropdown-icon"
|
|
2482
2597
|
}
|
|
2483
2598
|
),
|
|
2484
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ jsx12("span", { children: chainLabel(chainId, catalogFor(chainId)) })
|
|
2485
2600
|
]
|
|
2486
2601
|
},
|
|
2487
2602
|
String(chainId)
|
|
2488
2603
|
)) })
|
|
2489
2604
|
] }),
|
|
2490
|
-
/* @__PURE__ */
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */
|
|
2493
|
-
/* @__PURE__ */
|
|
2605
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-dropdown", ref: tokenDropdownRef, children: [
|
|
2606
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
2607
|
+
/* @__PURE__ */ jsx12("span", { children: "Supported token" }),
|
|
2608
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-deposit-address-min", children: [
|
|
2494
2609
|
"Min.$",
|
|
2495
2610
|
(isHyperCoreDestination(targetChain) || isHyperCore ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
2496
|
-
/* @__PURE__ */
|
|
2611
|
+
/* @__PURE__ */ jsx12(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx12(
|
|
2497
2612
|
InfoIcon,
|
|
2498
2613
|
{
|
|
2499
2614
|
className: "rs-deposit-address-min-icon",
|
|
@@ -2502,7 +2617,7 @@ function DepositAddressStep({
|
|
|
2502
2617
|
) })
|
|
2503
2618
|
] })
|
|
2504
2619
|
] }),
|
|
2505
|
-
/* @__PURE__ */
|
|
2620
|
+
/* @__PURE__ */ jsxs10(
|
|
2506
2621
|
"button",
|
|
2507
2622
|
{
|
|
2508
2623
|
type: "button",
|
|
@@ -2513,13 +2628,13 @@ function DepositAddressStep({
|
|
|
2513
2628
|
setChainDropdownOpen(false);
|
|
2514
2629
|
},
|
|
2515
2630
|
children: [
|
|
2516
|
-
/* @__PURE__ */
|
|
2517
|
-
/* @__PURE__ */
|
|
2518
|
-
/* @__PURE__ */
|
|
2631
|
+
/* @__PURE__ */ jsx12(TokenGlyph, { symbol: sourceTokenSymbol }),
|
|
2632
|
+
/* @__PURE__ */ jsx12("span", { children: sourceTokenSymbol }),
|
|
2633
|
+
/* @__PURE__ */ jsx12(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2519
2634
|
]
|
|
2520
2635
|
}
|
|
2521
2636
|
),
|
|
2522
|
-
tokenDropdownOpen && /* @__PURE__ */
|
|
2637
|
+
tokenDropdownOpen && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */ jsxs10(
|
|
2523
2638
|
"button",
|
|
2524
2639
|
{
|
|
2525
2640
|
type: "button",
|
|
@@ -2529,37 +2644,37 @@ function DepositAddressStep({
|
|
|
2529
2644
|
setTokenDropdownOpen(false);
|
|
2530
2645
|
},
|
|
2531
2646
|
children: [
|
|
2532
|
-
/* @__PURE__ */
|
|
2533
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ jsx12(TokenGlyph, { symbol }),
|
|
2648
|
+
/* @__PURE__ */ jsx12("span", { children: symbol })
|
|
2534
2649
|
]
|
|
2535
2650
|
},
|
|
2536
2651
|
symbol
|
|
2537
2652
|
)) })
|
|
2538
2653
|
] })
|
|
2539
2654
|
] }),
|
|
2540
|
-
/* @__PURE__ */
|
|
2655
|
+
/* @__PURE__ */ jsxs10(
|
|
2541
2656
|
"div",
|
|
2542
2657
|
{
|
|
2543
2658
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
2544
2659
|
children: [
|
|
2545
|
-
/* @__PURE__ */
|
|
2546
|
-
/* @__PURE__ */
|
|
2660
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-well", children: [
|
|
2661
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx12(
|
|
2547
2662
|
Suspense,
|
|
2548
2663
|
{
|
|
2549
|
-
fallback: /* @__PURE__ */
|
|
2550
|
-
children: /* @__PURE__ */
|
|
2664
|
+
fallback: /* @__PURE__ */ jsx12("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }),
|
|
2665
|
+
children: /* @__PURE__ */ jsx12(QRCode, { value: displayAddress, size: 190, iconSrc: qrIconSrc })
|
|
2551
2666
|
}
|
|
2552
2667
|
) }),
|
|
2553
|
-
/* @__PURE__ */
|
|
2668
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-value", children: displayAddress })
|
|
2554
2669
|
] }),
|
|
2555
|
-
/* @__PURE__ */
|
|
2670
|
+
/* @__PURE__ */ jsxs10(
|
|
2556
2671
|
"button",
|
|
2557
2672
|
{
|
|
2558
2673
|
type: "button",
|
|
2559
2674
|
className: "rs-deposit-address-copy",
|
|
2560
2675
|
onClick: handleCopy,
|
|
2561
2676
|
children: [
|
|
2562
|
-
copied ? /* @__PURE__ */
|
|
2677
|
+
copied ? /* @__PURE__ */ jsx12(CheckIcon, {}) : /* @__PURE__ */ jsx12(CopyIcon, {}),
|
|
2563
2678
|
copied ? "Copied!" : "Copy address"
|
|
2564
2679
|
]
|
|
2565
2680
|
}
|
|
@@ -2567,12 +2682,12 @@ function DepositAddressStep({
|
|
|
2567
2682
|
]
|
|
2568
2683
|
}
|
|
2569
2684
|
),
|
|
2570
|
-
/* @__PURE__ */
|
|
2685
|
+
/* @__PURE__ */ jsxs10(
|
|
2571
2686
|
"div",
|
|
2572
2687
|
{
|
|
2573
2688
|
className: `rs-price-impact ${priceImpactExpanded ? "rs-price-impact--open" : ""}`,
|
|
2574
2689
|
children: [
|
|
2575
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ jsxs10(
|
|
2576
2691
|
"button",
|
|
2577
2692
|
{
|
|
2578
2693
|
type: "button",
|
|
@@ -2580,19 +2695,19 @@ function DepositAddressStep({
|
|
|
2580
2695
|
onClick: () => setPriceImpactExpanded((v) => !v),
|
|
2581
2696
|
"aria-expanded": priceImpactExpanded,
|
|
2582
2697
|
children: [
|
|
2583
|
-
/* @__PURE__ */
|
|
2584
|
-
/* @__PURE__ */
|
|
2585
|
-
/* @__PURE__ */
|
|
2586
|
-
/* @__PURE__ */
|
|
2698
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-header-left", children: [
|
|
2699
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2700
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx12("strong", { children: "0.00%" }) }),
|
|
2701
|
+
/* @__PURE__ */ jsx12(
|
|
2587
2702
|
Tooltip,
|
|
2588
2703
|
{
|
|
2589
2704
|
className: "rs-price-impact-info",
|
|
2590
2705
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2591
|
-
children: /* @__PURE__ */
|
|
2706
|
+
children: /* @__PURE__ */ jsx12(InfoIcon, { "aria-hidden": "true" })
|
|
2592
2707
|
}
|
|
2593
2708
|
)
|
|
2594
2709
|
] }),
|
|
2595
|
-
/* @__PURE__ */
|
|
2710
|
+
/* @__PURE__ */ jsx12(
|
|
2596
2711
|
ChevronDownIcon,
|
|
2597
2712
|
{
|
|
2598
2713
|
className: "rs-price-impact-chevron",
|
|
@@ -2602,35 +2717,35 @@ function DepositAddressStep({
|
|
|
2602
2717
|
]
|
|
2603
2718
|
}
|
|
2604
2719
|
),
|
|
2605
|
-
/* @__PURE__ */
|
|
2606
|
-
/* @__PURE__ */
|
|
2607
|
-
/* @__PURE__ */
|
|
2608
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-panel-inner", children: [
|
|
2721
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-row", children: [
|
|
2722
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(PercentIcon, {}) }),
|
|
2723
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-label", children: [
|
|
2609
2724
|
"Max slippage: ",
|
|
2610
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ jsx12("strong", { children: "0.2%" })
|
|
2611
2726
|
] }),
|
|
2612
|
-
/* @__PURE__ */
|
|
2727
|
+
/* @__PURE__ */ jsx12(
|
|
2613
2728
|
Tooltip,
|
|
2614
2729
|
{
|
|
2615
2730
|
className: "rs-price-impact-info",
|
|
2616
2731
|
content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
|
|
2617
|
-
children: /* @__PURE__ */
|
|
2732
|
+
children: /* @__PURE__ */ jsx12(InfoIcon, { "aria-hidden": "true" })
|
|
2618
2733
|
}
|
|
2619
2734
|
)
|
|
2620
2735
|
] }),
|
|
2621
|
-
/* @__PURE__ */
|
|
2622
|
-
/* @__PURE__ */
|
|
2623
|
-
/* @__PURE__ */
|
|
2736
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-row", children: [
|
|
2737
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(ClockIcon, {}) }),
|
|
2738
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-label", children: [
|
|
2624
2739
|
"Processing time: ",
|
|
2625
|
-
/* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ jsx12("strong", { children: "< 1 min" })
|
|
2626
2741
|
] })
|
|
2627
2742
|
] }),
|
|
2628
|
-
liquidityHelper.kind !== "idle" && /* @__PURE__ */
|
|
2629
|
-
/* @__PURE__ */
|
|
2630
|
-
/* @__PURE__ */
|
|
2743
|
+
liquidityHelper.kind !== "idle" && /* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-row", children: [
|
|
2744
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(PlusCircleIcon, {}) }),
|
|
2745
|
+
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-label", children: [
|
|
2631
2746
|
"Max deposit:",
|
|
2632
2747
|
" ",
|
|
2633
|
-
/* @__PURE__ */
|
|
2748
|
+
/* @__PURE__ */ jsx12("strong", { children: liquidityHelper.kind === "max" ? `${formatUnits3(
|
|
2634
2749
|
BigInt(liquidityHelper.maxAmount),
|
|
2635
2750
|
liquidityHelper.decimals
|
|
2636
2751
|
)} ${liquidityHelper.symbol}` : liquidityHelper.kind === "unlimited" ? "Unlimited" : liquidityHelper.kind === "unavailable" ? "Unavailable" : liquidityHelper.kind === "error" ? "\u2014" : "\u2026" })
|
|
@@ -2640,9 +2755,9 @@ function DepositAddressStep({
|
|
|
2640
2755
|
]
|
|
2641
2756
|
}
|
|
2642
2757
|
),
|
|
2643
|
-
pollingError && /* @__PURE__ */
|
|
2758
|
+
pollingError && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-error", children: pollingError })
|
|
2644
2759
|
] }),
|
|
2645
|
-
notifications.length > 0 && /* @__PURE__ */
|
|
2760
|
+
notifications.length > 0 && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-notifications", children: notifications.map((deposit) => /* @__PURE__ */ jsx12(
|
|
2646
2761
|
DepositNotification,
|
|
2647
2762
|
{
|
|
2648
2763
|
deposit,
|
|
@@ -2657,7 +2772,7 @@ function DepositAddressStep({
|
|
|
2657
2772
|
},
|
|
2658
2773
|
deposit.id
|
|
2659
2774
|
)) }),
|
|
2660
|
-
/* @__PURE__ */
|
|
2775
|
+
/* @__PURE__ */ jsx12(PoweredBy, {})
|
|
2661
2776
|
] });
|
|
2662
2777
|
}
|
|
2663
2778
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -2683,11 +2798,11 @@ function isSwappedWidgetUrlFresh(res, now = Date.now()) {
|
|
|
2683
2798
|
import { useState as useState7, useEffect as useEffect7, useRef as useRef6, useMemo as useMemo4 } from "react";
|
|
2684
2799
|
|
|
2685
2800
|
// src/components/steps/FinalisingDepositStep.tsx
|
|
2686
|
-
import { jsx as
|
|
2801
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2687
2802
|
function FinalisingDepositStep() {
|
|
2688
|
-
return /* @__PURE__ */
|
|
2689
|
-
/* @__PURE__ */
|
|
2690
|
-
/* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen rs-finalising", children: [
|
|
2804
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body rs-finalising-body", children: [
|
|
2805
|
+
/* @__PURE__ */ jsxs11(
|
|
2691
2806
|
"svg",
|
|
2692
2807
|
{
|
|
2693
2808
|
className: "rs-finalising-spinner",
|
|
@@ -2695,23 +2810,23 @@ function FinalisingDepositStep() {
|
|
|
2695
2810
|
fill: "none",
|
|
2696
2811
|
"aria-hidden": "true",
|
|
2697
2812
|
children: [
|
|
2698
|
-
/* @__PURE__ */
|
|
2699
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ jsx13("circle", { className: "rs-finalising-spinner-track", cx: "40", cy: "40", r: "34" }),
|
|
2814
|
+
/* @__PURE__ */ jsx13("circle", { className: "rs-finalising-spinner-head", cx: "40", cy: "40", r: "34" })
|
|
2700
2815
|
]
|
|
2701
2816
|
}
|
|
2702
2817
|
),
|
|
2703
|
-
/* @__PURE__ */
|
|
2704
|
-
/* @__PURE__ */
|
|
2705
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-finalising-text", children: [
|
|
2819
|
+
/* @__PURE__ */ jsx13("h2", { className: "rs-finalising-title", children: "Finalising deposit" }),
|
|
2820
|
+
/* @__PURE__ */ jsx13("p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
2706
2821
|
] })
|
|
2707
2822
|
] }),
|
|
2708
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ jsx13(PoweredBy, {})
|
|
2709
2824
|
] });
|
|
2710
2825
|
}
|
|
2711
2826
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
2712
2827
|
|
|
2713
2828
|
// src/components/steps/SwappedOrderTracker.tsx
|
|
2714
|
-
import { jsx as
|
|
2829
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2715
2830
|
var STEP_LABELS = [
|
|
2716
2831
|
"Payment received",
|
|
2717
2832
|
null,
|
|
@@ -2733,29 +2848,29 @@ function SwappedOrderTracker({
|
|
|
2733
2848
|
STEP_LABELS[2],
|
|
2734
2849
|
STEP_LABELS[3]
|
|
2735
2850
|
];
|
|
2736
|
-
return /* @__PURE__ */
|
|
2737
|
-
/* @__PURE__ */
|
|
2738
|
-
/* @__PURE__ */
|
|
2739
|
-
/* @__PURE__ */
|
|
2851
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
2852
|
+
/* @__PURE__ */ jsxs12("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2853
|
+
/* @__PURE__ */ jsx14(BodyHeader, { icon: /* @__PURE__ */ jsx14(HandCoinsIcon, {}), title }),
|
|
2854
|
+
/* @__PURE__ */ jsx14("ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
2740
2855
|
const status = stepStates[idx];
|
|
2741
|
-
return /* @__PURE__ */
|
|
2856
|
+
return /* @__PURE__ */ jsxs12(
|
|
2742
2857
|
"li",
|
|
2743
2858
|
{
|
|
2744
2859
|
className: `rs-swapped-tracker-step rs-swapped-tracker-step--${status}`,
|
|
2745
2860
|
children: [
|
|
2746
|
-
/* @__PURE__ */
|
|
2747
|
-
/* @__PURE__ */
|
|
2861
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-swapped-tracker-step-label", children: label }),
|
|
2862
|
+
/* @__PURE__ */ jsx14(
|
|
2748
2863
|
"span",
|
|
2749
2864
|
{
|
|
2750
2865
|
className: "rs-swapped-tracker-step-marker",
|
|
2751
2866
|
"aria-hidden": "true",
|
|
2752
|
-
children: status === "complete" ? /* @__PURE__ */
|
|
2867
|
+
children: status === "complete" ? /* @__PURE__ */ jsx14(CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ jsx14(CloseIcon, {}) : status === "active" ? /* @__PURE__ */ jsx14(Spinner, {}) : /* @__PURE__ */ jsx14(
|
|
2753
2868
|
"svg",
|
|
2754
2869
|
{
|
|
2755
2870
|
className: "rs-swapped-tracker-step-ring",
|
|
2756
2871
|
viewBox: "0 0 16 16",
|
|
2757
2872
|
"aria-hidden": "true",
|
|
2758
|
-
children: /* @__PURE__ */
|
|
2873
|
+
children: /* @__PURE__ */ jsx14("circle", { cx: "8", cy: "8", r: "7" })
|
|
2759
2874
|
}
|
|
2760
2875
|
)
|
|
2761
2876
|
}
|
|
@@ -2765,13 +2880,13 @@ function SwappedOrderTracker({
|
|
|
2765
2880
|
label
|
|
2766
2881
|
);
|
|
2767
2882
|
}) }),
|
|
2768
|
-
terminal && /* @__PURE__ */
|
|
2883
|
+
terminal && /* @__PURE__ */ jsxs12(
|
|
2769
2884
|
"div",
|
|
2770
2885
|
{
|
|
2771
2886
|
className: `rs-swapped-tracker-terminal rs-swapped-tracker-terminal--${terminal.kind}`,
|
|
2772
2887
|
children: [
|
|
2773
|
-
/* @__PURE__ */
|
|
2774
|
-
terminal.kind === "cancelled" && onRetry && /* @__PURE__ */
|
|
2888
|
+
/* @__PURE__ */ jsx14("p", { className: "rs-swapped-tracker-terminal-message", children: terminal.message }),
|
|
2889
|
+
terminal.kind === "cancelled" && onRetry && /* @__PURE__ */ jsx14(
|
|
2775
2890
|
"button",
|
|
2776
2891
|
{
|
|
2777
2892
|
type: "button",
|
|
@@ -2784,7 +2899,7 @@ function SwappedOrderTracker({
|
|
|
2784
2899
|
}
|
|
2785
2900
|
)
|
|
2786
2901
|
] }),
|
|
2787
|
-
/* @__PURE__ */
|
|
2902
|
+
/* @__PURE__ */ jsx14(PoweredBy, {})
|
|
2788
2903
|
] });
|
|
2789
2904
|
}
|
|
2790
2905
|
function formatTrackerAmount(amount) {
|
|
@@ -2796,7 +2911,7 @@ function formatTrackerAmount(amount) {
|
|
|
2796
2911
|
SwappedOrderTracker.displayName = "SwappedOrderTracker";
|
|
2797
2912
|
|
|
2798
2913
|
// src/components/steps/SwappedIframeStep.tsx
|
|
2799
|
-
import { jsx as
|
|
2914
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2800
2915
|
var STATUS_POLL_INTERVAL_MS = 2e3;
|
|
2801
2916
|
var DEPOSIT_POLL_INTERVAL_MS = 2e3;
|
|
2802
2917
|
var DEPOSIT_POLL_FAST_INITIAL_DELAY_MS = 1e3;
|
|
@@ -3128,9 +3243,9 @@ function SwappedIframeStep({
|
|
|
3128
3243
|
if (phase === "tracker") {
|
|
3129
3244
|
const paymentReceived = stepStates[0] === "complete";
|
|
3130
3245
|
if (variant === "connect" && !terminalState && paymentReceived) {
|
|
3131
|
-
return /* @__PURE__ */
|
|
3246
|
+
return /* @__PURE__ */ jsx15(FinalisingDepositStep, {});
|
|
3132
3247
|
}
|
|
3133
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ jsx15(
|
|
3134
3249
|
SwappedOrderTracker,
|
|
3135
3250
|
{
|
|
3136
3251
|
amount: orderState?.orderCryptoAmount ?? null,
|
|
@@ -3142,11 +3257,11 @@ function SwappedIframeStep({
|
|
|
3142
3257
|
}
|
|
3143
3258
|
);
|
|
3144
3259
|
}
|
|
3145
|
-
return /* @__PURE__ */
|
|
3146
|
-
/* @__PURE__ */
|
|
3147
|
-
loadError && /* @__PURE__ */
|
|
3148
|
-
/* @__PURE__ */
|
|
3149
|
-
/* @__PURE__ */
|
|
3260
|
+
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
3261
|
+
/* @__PURE__ */ jsx15("div", { className: "rs-screen-body rs-fiat-onramp-body", children: /* @__PURE__ */ jsxs13("div", { className: "rs-fiat-onramp-iframe-wrap", children: [
|
|
3262
|
+
loadError && /* @__PURE__ */ jsxs13("div", { className: "rs-fiat-onramp-error", children: [
|
|
3263
|
+
/* @__PURE__ */ jsx15("div", { children: loadError }),
|
|
3264
|
+
/* @__PURE__ */ jsx15(
|
|
3150
3265
|
"button",
|
|
3151
3266
|
{
|
|
3152
3267
|
type: "button",
|
|
@@ -3156,8 +3271,8 @@ function SwappedIframeStep({
|
|
|
3156
3271
|
}
|
|
3157
3272
|
)
|
|
3158
3273
|
] }),
|
|
3159
|
-
!loadError && !iframeLoaded && /* @__PURE__ */
|
|
3160
|
-
widgetUrl && !loadError && /* @__PURE__ */
|
|
3274
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ jsx15("div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ jsx15(Spinner, {}) }),
|
|
3275
|
+
widgetUrl && !loadError && /* @__PURE__ */ jsx15(
|
|
3161
3276
|
"iframe",
|
|
3162
3277
|
{
|
|
3163
3278
|
ref: iframeRef,
|
|
@@ -3179,7 +3294,7 @@ function SwappedIframeStep({
|
|
|
3179
3294
|
retryToken
|
|
3180
3295
|
)
|
|
3181
3296
|
] }) }),
|
|
3182
|
-
loadError && /* @__PURE__ */
|
|
3297
|
+
loadError && /* @__PURE__ */ jsx15(PoweredBy, {})
|
|
3183
3298
|
] });
|
|
3184
3299
|
}
|
|
3185
3300
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
@@ -3206,7 +3321,7 @@ function deriveStepStates(swappedStatus, latestEvent) {
|
|
|
3206
3321
|
SwappedIframeStep.displayName = "SwappedIframeStep";
|
|
3207
3322
|
|
|
3208
3323
|
// src/components/steps/FiatOnrampStep.tsx
|
|
3209
|
-
import { jsx as
|
|
3324
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
3210
3325
|
function fiatBannerForStatus(status, context) {
|
|
3211
3326
|
if (context.currencyMismatch) {
|
|
3212
3327
|
return {
|
|
@@ -3271,7 +3386,7 @@ function FiatOnrampStep({
|
|
|
3271
3386
|
methodSelectionSource,
|
|
3272
3387
|
consumePrefetchedUrl
|
|
3273
3388
|
]);
|
|
3274
|
-
return /* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ jsx16(
|
|
3275
3390
|
SwappedIframeStep,
|
|
3276
3391
|
{
|
|
3277
3392
|
smartAccount,
|
|
@@ -3295,7 +3410,7 @@ FiatOnrampStep.displayName = "FiatOnrampStep";
|
|
|
3295
3410
|
|
|
3296
3411
|
// src/components/steps/ExchangeConnectStep.tsx
|
|
3297
3412
|
import { useCallback as useCallback4 } from "react";
|
|
3298
|
-
import { jsx as
|
|
3413
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3299
3414
|
function connectBannerForStatus(status, context) {
|
|
3300
3415
|
if (context.currencyMismatch) {
|
|
3301
3416
|
return {
|
|
@@ -3345,7 +3460,7 @@ function ExchangeConnectStep({
|
|
|
3345
3460
|
});
|
|
3346
3461
|
return res;
|
|
3347
3462
|
}, [loadPreparedUrl, service, smartAccount, connection]);
|
|
3348
|
-
return /* @__PURE__ */
|
|
3463
|
+
return /* @__PURE__ */ jsx17(
|
|
3349
3464
|
SwappedIframeStep,
|
|
3350
3465
|
{
|
|
3351
3466
|
smartAccount,
|
|
@@ -3369,13 +3484,13 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
3369
3484
|
|
|
3370
3485
|
// src/components/steps/ExchangeSelectStep.tsx
|
|
3371
3486
|
import { useCallback as useCallback5, useEffect as useEffect8, useState as useState8 } from "react";
|
|
3372
|
-
import { jsx as
|
|
3487
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3373
3488
|
function ExchangeLogo({ exchange }) {
|
|
3374
3489
|
const [failed, setFailed] = useState8(false);
|
|
3375
3490
|
if (!exchange.logoUrl || failed) {
|
|
3376
|
-
return /* @__PURE__ */
|
|
3491
|
+
return /* @__PURE__ */ jsx18(BankIcon, {});
|
|
3377
3492
|
}
|
|
3378
|
-
return /* @__PURE__ */
|
|
3493
|
+
return /* @__PURE__ */ jsx18(
|
|
3379
3494
|
"img",
|
|
3380
3495
|
{
|
|
3381
3496
|
src: exchange.logoUrl,
|
|
@@ -3451,20 +3566,20 @@ function ExchangeSelectStep({
|
|
|
3451
3566
|
},
|
|
3452
3567
|
[exchangeFeeBps, onError, onSelectExchange]
|
|
3453
3568
|
);
|
|
3454
|
-
return /* @__PURE__ */
|
|
3455
|
-
/* @__PURE__ */
|
|
3456
|
-
/* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ jsxs14("div", { className: "rs-screen rs-exchange-select", children: [
|
|
3570
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3571
|
+
/* @__PURE__ */ jsx18(
|
|
3457
3572
|
BodyHeader,
|
|
3458
3573
|
{
|
|
3459
|
-
icon: /* @__PURE__ */
|
|
3574
|
+
icon: /* @__PURE__ */ jsx18(UnplugIcon, {}),
|
|
3460
3575
|
title: "Connect exchange",
|
|
3461
3576
|
subtitle: "Select an exchange to connect"
|
|
3462
3577
|
}
|
|
3463
3578
|
),
|
|
3464
|
-
loading && /* @__PURE__ */
|
|
3465
|
-
!loading && error && /* @__PURE__ */
|
|
3466
|
-
/* @__PURE__ */
|
|
3467
|
-
/* @__PURE__ */
|
|
3579
|
+
loading && /* @__PURE__ */ jsx18("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ jsx18(Spinner, {}) }),
|
|
3580
|
+
!loading && error && /* @__PURE__ */ jsxs14("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
3581
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
3582
|
+
/* @__PURE__ */ jsx18(
|
|
3468
3583
|
"button",
|
|
3469
3584
|
{
|
|
3470
3585
|
type: "button",
|
|
@@ -3474,9 +3589,9 @@ function ExchangeSelectStep({
|
|
|
3474
3589
|
}
|
|
3475
3590
|
)
|
|
3476
3591
|
] }),
|
|
3477
|
-
!loading && !error && exchanges.length === 0 && /* @__PURE__ */
|
|
3478
|
-
/* @__PURE__ */
|
|
3479
|
-
/* @__PURE__ */
|
|
3592
|
+
!loading && !error && exchanges.length === 0 && /* @__PURE__ */ jsxs14("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
3593
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-exchange-select-state-title", children: "No exchanges available" }),
|
|
3594
|
+
/* @__PURE__ */ jsx18(
|
|
3480
3595
|
"button",
|
|
3481
3596
|
{
|
|
3482
3597
|
type: "button",
|
|
@@ -3486,9 +3601,9 @@ function ExchangeSelectStep({
|
|
|
3486
3601
|
}
|
|
3487
3602
|
)
|
|
3488
3603
|
] }),
|
|
3489
|
-
!loading && !error && exchanges.length > 0 && /* @__PURE__ */
|
|
3604
|
+
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ jsx18("div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
3490
3605
|
const brand = getExchangeLogo(exchange.name, exchange.connection);
|
|
3491
|
-
return /* @__PURE__ */
|
|
3606
|
+
return /* @__PURE__ */ jsxs14(
|
|
3492
3607
|
"button",
|
|
3493
3608
|
{
|
|
3494
3609
|
type: "button",
|
|
@@ -3498,142 +3613,31 @@ function ExchangeSelectStep({
|
|
|
3498
3613
|
"aria-busy": selectingConnection === exchange.connection,
|
|
3499
3614
|
"aria-label": `Select ${exchange.name}`,
|
|
3500
3615
|
children: [
|
|
3501
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ jsx18(
|
|
3502
3617
|
"span",
|
|
3503
3618
|
{
|
|
3504
3619
|
className: `rs-exchange-card-logo${brand ? " rs-exchange-card-logo--brand" : ""}`,
|
|
3505
|
-
children: brand ?? /* @__PURE__ */
|
|
3620
|
+
children: brand ?? /* @__PURE__ */ jsx18(ExchangeLogo, { exchange })
|
|
3506
3621
|
}
|
|
3507
3622
|
),
|
|
3508
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-exchange-card-name", children: exchange.name })
|
|
3509
3624
|
]
|
|
3510
3625
|
},
|
|
3511
3626
|
exchange.connection
|
|
3512
3627
|
);
|
|
3513
3628
|
}) })
|
|
3514
3629
|
] }),
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
exchangeFeeBps > 0 && /* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ jsx18(PoweredBy, {}),
|
|
3631
|
+
exchangeFeeBps > 0 && /* @__PURE__ */ jsxs14("p", { className: "rs-exchange-select-fee-note", children: [
|
|
3517
3632
|
"A ",
|
|
3518
3633
|
formatFeeRate(exchangeFeeBps),
|
|
3519
3634
|
" Exchange Fee applies to your deposit."
|
|
3520
3635
|
] }),
|
|
3521
|
-
selectionNotice && /* @__PURE__ */
|
|
3636
|
+
selectionNotice && /* @__PURE__ */ jsx18("p", { className: "rs-exchange-select-fee-note", role: "status", children: selectionNotice })
|
|
3522
3637
|
] });
|
|
3523
3638
|
}
|
|
3524
3639
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
3525
3640
|
|
|
3526
|
-
// src/components/steps/DepositAddressSkeleton.tsx
|
|
3527
|
-
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3528
|
-
var BASE_CHAIN_ID = 8453;
|
|
3529
|
-
function DepositAddressSkeleton({
|
|
3530
|
-
uiConfig
|
|
3531
|
-
}) {
|
|
3532
|
-
const evmChainIds = getSupportedChainIds();
|
|
3533
|
-
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
3534
|
-
const tokensForChain = getTargetTokenSymbolsForChain(defaultChainId);
|
|
3535
|
-
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
|
|
3536
|
-
const chainName = getChainName(defaultChainId);
|
|
3537
|
-
const chainIcon = getChainIcon(defaultChainId);
|
|
3538
|
-
return /* @__PURE__ */ jsxs14("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
3539
|
-
/* @__PURE__ */ jsx18("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
3540
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-screen-body", children: [
|
|
3541
|
-
/* @__PURE__ */ jsx18(BodyHeader, { icon: /* @__PURE__ */ jsx18(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
3542
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
3543
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown", children: [
|
|
3544
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
3545
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3546
|
-
/* @__PURE__ */ jsx18(
|
|
3547
|
-
CdnIcon,
|
|
3548
|
-
{
|
|
3549
|
-
src: chainIcon,
|
|
3550
|
-
className: "rs-deposit-address-dropdown-icon"
|
|
3551
|
-
}
|
|
3552
|
-
),
|
|
3553
|
-
/* @__PURE__ */ jsx18("span", { children: chainName }),
|
|
3554
|
-
/* @__PURE__ */ jsx18(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3555
|
-
] })
|
|
3556
|
-
] }),
|
|
3557
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown", children: [
|
|
3558
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
3559
|
-
/* @__PURE__ */ jsx18("span", { children: "Supported token" }),
|
|
3560
|
-
/* @__PURE__ */ jsxs14("span", { className: "rs-deposit-address-min", children: [
|
|
3561
|
-
"Min.$",
|
|
3562
|
-
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
3563
|
-
/* @__PURE__ */ jsx18(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx18(
|
|
3564
|
-
InfoIcon,
|
|
3565
|
-
{
|
|
3566
|
-
className: "rs-deposit-address-min-icon",
|
|
3567
|
-
"aria-hidden": "true"
|
|
3568
|
-
}
|
|
3569
|
-
) })
|
|
3570
|
-
] })
|
|
3571
|
-
] }),
|
|
3572
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3573
|
-
/* @__PURE__ */ jsx18(
|
|
3574
|
-
TokenIcon,
|
|
3575
|
-
{
|
|
3576
|
-
symbol: defaultToken,
|
|
3577
|
-
className: "rs-deposit-address-dropdown-icon"
|
|
3578
|
-
}
|
|
3579
|
-
),
|
|
3580
|
-
/* @__PURE__ */ jsx18("span", { children: defaultToken }),
|
|
3581
|
-
/* @__PURE__ */ jsx18(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3582
|
-
] })
|
|
3583
|
-
] })
|
|
3584
|
-
] }),
|
|
3585
|
-
/* @__PURE__ */ jsxs14(
|
|
3586
|
-
"div",
|
|
3587
|
-
{
|
|
3588
|
-
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
3589
|
-
children: [
|
|
3590
|
-
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-well", children: [
|
|
3591
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx18("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
3592
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
3593
|
-
] }),
|
|
3594
|
-
/* @__PURE__ */ jsxs14(
|
|
3595
|
-
"button",
|
|
3596
|
-
{
|
|
3597
|
-
type: "button",
|
|
3598
|
-
className: "rs-deposit-address-copy",
|
|
3599
|
-
disabled: true,
|
|
3600
|
-
"aria-hidden": "true",
|
|
3601
|
-
children: [
|
|
3602
|
-
/* @__PURE__ */ jsx18(CopyIcon, {}),
|
|
3603
|
-
"Copy address"
|
|
3604
|
-
]
|
|
3605
|
-
}
|
|
3606
|
-
)
|
|
3607
|
-
]
|
|
3608
|
-
}
|
|
3609
|
-
),
|
|
3610
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs14("div", { className: "rs-price-impact-header", children: [
|
|
3611
|
-
/* @__PURE__ */ jsxs14("span", { className: "rs-price-impact-header-left", children: [
|
|
3612
|
-
/* @__PURE__ */ jsx18("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
3613
|
-
/* @__PURE__ */ jsx18("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx18("strong", { children: "0.00%" }) }),
|
|
3614
|
-
/* @__PURE__ */ jsx18(
|
|
3615
|
-
Tooltip,
|
|
3616
|
-
{
|
|
3617
|
-
className: "rs-price-impact-info",
|
|
3618
|
-
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
3619
|
-
children: /* @__PURE__ */ jsx18(InfoIcon, { "aria-hidden": "true" })
|
|
3620
|
-
}
|
|
3621
|
-
)
|
|
3622
|
-
] }),
|
|
3623
|
-
/* @__PURE__ */ jsx18(
|
|
3624
|
-
ChevronDownIcon,
|
|
3625
|
-
{
|
|
3626
|
-
className: "rs-price-impact-chevron",
|
|
3627
|
-
"aria-hidden": "true"
|
|
3628
|
-
}
|
|
3629
|
-
)
|
|
3630
|
-
] }) })
|
|
3631
|
-
] }),
|
|
3632
|
-
/* @__PURE__ */ jsx18(PoweredBy, {})
|
|
3633
|
-
] });
|
|
3634
|
-
}
|
|
3635
|
-
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
3636
|
-
|
|
3637
3641
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
3638
3642
|
import { useState as useState9, useEffect as useEffect9, useMemo as useMemo5 } from "react";
|
|
3639
3643
|
import { formatUnits as formatUnits4 } from "viem";
|
|
@@ -8752,7 +8756,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
8752
8756
|
// src/DepositModal.tsx
|
|
8753
8757
|
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8754
8758
|
var ReownDepositInner = lazy2(
|
|
8755
|
-
() => import("./DepositModalReown-
|
|
8759
|
+
() => import("./DepositModalReown-MVVRUXO4.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
8756
8760
|
);
|
|
8757
8761
|
function sortByCreatedAtDesc(items) {
|
|
8758
8762
|
return [...items].sort((a, b) => {
|
|
@@ -8835,8 +8839,7 @@ function DepositModalInner({
|
|
|
8835
8839
|
const [backHandler, setBackHandler] = useState14(
|
|
8836
8840
|
void 0
|
|
8837
8841
|
);
|
|
8838
|
-
const
|
|
8839
|
-
const historyButtonVisible = showHistoryButton && (currentScreen === "select-asset" || currentScreen === "deposit-address");
|
|
8842
|
+
const historyButtonVisible = currentScreen === "connect";
|
|
8840
8843
|
const [historyOpen, setHistoryOpen] = useState14(false);
|
|
8841
8844
|
const [historyDeposits, setHistoryDeposits] = useState14([]);
|
|
8842
8845
|
const [hasMoreHistory, setHasMoreHistory] = useState14(false);
|
|
@@ -8972,11 +8975,11 @@ function DepositModalInner({
|
|
|
8972
8975
|
if (event.type === "smart-account-changed" && !event.evm && !event.solana) {
|
|
8973
8976
|
historyStaleRef.current = true;
|
|
8974
8977
|
}
|
|
8975
|
-
if (
|
|
8978
|
+
if (event.type === "submitted" || event.type === "complete" || event.type === "failed") {
|
|
8976
8979
|
markHistoryStale();
|
|
8977
8980
|
}
|
|
8978
8981
|
},
|
|
8979
|
-
[onLifecycleRef,
|
|
8982
|
+
[onLifecycleRef, markHistoryStale]
|
|
8980
8983
|
);
|
|
8981
8984
|
useEffect12(() => {
|
|
8982
8985
|
if (!isOpen) {
|
|
@@ -9085,7 +9088,7 @@ function DepositModalInner({
|
|
|
9085
9088
|
debug
|
|
9086
9089
|
}
|
|
9087
9090
|
),
|
|
9088
|
-
|
|
9091
|
+
historyOpen && /* @__PURE__ */ jsx27(
|
|
9089
9092
|
DepositHistoryPanel,
|
|
9090
9093
|
{
|
|
9091
9094
|
deposits: historyDeposits,
|