@rhinestone/deposit-modal 0.11.0 → 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-6RVLEM3B.mjs → DepositModalReown-MVVRUXO4.mjs} +7 -7
- package/dist/{DepositModalReown-TXTLVZIQ.cjs → DepositModalReown-PZXHTPIS.cjs} +17 -17
- package/dist/{chunk-VRNRRN2U.mjs → chunk-2AMRKYJ4.mjs} +4 -4
- package/dist/{chunk-JYKMR6QI.cjs → chunk-2PQ34KU3.cjs} +3 -3
- package/dist/{chunk-TENL4H64.cjs → chunk-4R2ZHSDQ.cjs} +4 -9
- package/dist/{chunk-XVKBCDZI.cjs → chunk-4SRVZRZF.cjs} +1 -1
- package/dist/{chunk-MZ53PDIX.mjs → chunk-53IGTENZ.mjs} +1 -1
- package/dist/{chunk-ITAYM7SB.mjs → chunk-5IP67CL5.mjs} +45 -17
- package/dist/{chunk-HCQWFL3A.cjs → chunk-6ZJTZ7DS.cjs} +81 -80
- package/dist/{chunk-BLJMYCBF.cjs → chunk-BK54FZAE.cjs} +83 -83
- package/dist/{chunk-G4FVZQOM.mjs → chunk-EUIPQ3T4.mjs} +7 -7
- package/dist/{chunk-QRR3Y7EK.mjs → chunk-GZNMBZHY.mjs} +1 -1
- package/dist/{chunk-NPSC5R22.cjs → chunk-LBJFACLH.cjs} +125 -97
- package/dist/{chunk-7RNEYPI4.cjs → chunk-LTPVHQXJ.cjs} +555 -549
- package/dist/{chunk-TRD2FCAR.mjs → chunk-Q5MFRAWD.mjs} +417 -411
- package/dist/{chunk-WLDTBKRA.mjs → chunk-QF5T6HXC.mjs} +5 -4
- package/dist/{chunk-DYTRG4C7.mjs → chunk-RMYUE6HJ.mjs} +1 -1
- package/dist/{chunk-GWA6GFTI.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-C7wag_iL.d.cts → types-BO4iP6fG.d.cts} +6 -1
- package/dist/{types-D4b6Cjox.d.ts → types-oFblf65g.d.ts} +6 -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,
|
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
PlusCircleIcon,
|
|
49
49
|
PoweredBy,
|
|
50
50
|
RpcUrlsProvider,
|
|
51
|
+
SUPPORTED_CONNECT_EXCHANGE_COUNT,
|
|
51
52
|
Spinner,
|
|
52
53
|
SwappedConnectFeeChangedError,
|
|
53
54
|
TokenIcon,
|
|
@@ -85,7 +86,7 @@ import {
|
|
|
85
86
|
useLatestRef,
|
|
86
87
|
useRpcUrls,
|
|
87
88
|
useStableRpcUrls
|
|
88
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-5IP67CL5.mjs";
|
|
89
90
|
import {
|
|
90
91
|
POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
91
92
|
POLYMARKET_ICON_URL,
|
|
@@ -96,7 +97,7 @@ import {
|
|
|
96
97
|
executePolymarketSafeTransfer,
|
|
97
98
|
fetchPolymarketProxyWallet,
|
|
98
99
|
readPolymarketBalances
|
|
99
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-53IGTENZ.mjs";
|
|
100
101
|
import {
|
|
101
102
|
CHAIN_BY_ID,
|
|
102
103
|
HYPERCORE_CHAIN_ID,
|
|
@@ -106,7 +107,6 @@ import {
|
|
|
106
107
|
SOLANA_TOKENS,
|
|
107
108
|
cdnIconUrl,
|
|
108
109
|
findTokenDecimals,
|
|
109
|
-
getBundledTargetTokens,
|
|
110
110
|
getChainBadge,
|
|
111
111
|
getChainIcon,
|
|
112
112
|
getChainId,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
publishShortlistTokens,
|
|
130
130
|
targetChainToCaip2,
|
|
131
131
|
targetChainToChainId
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-YR43AAX5.mjs";
|
|
133
133
|
|
|
134
134
|
// src/DepositModal.tsx
|
|
135
135
|
import {
|
|
@@ -298,7 +298,7 @@ var DAPP_IMPORT_CATALOG = [
|
|
|
298
298
|
];
|
|
299
299
|
|
|
300
300
|
// src/components/ui/BrandIcons.tsx
|
|
301
|
-
import { jsx as jsx4
|
|
301
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
302
302
|
function ExchangeBadgeImage({ name }) {
|
|
303
303
|
return /* @__PURE__ */ jsx4(CdnIcon, { src: getExchangeLogoSrc(name) ?? void 0 });
|
|
304
304
|
}
|
|
@@ -314,14 +314,12 @@ function CardNetworkIcons() {
|
|
|
314
314
|
)) });
|
|
315
315
|
}
|
|
316
316
|
CardNetworkIcons.displayName = "CardNetworkIcons";
|
|
317
|
+
var EXCHANGE_BADGE_ORDER = ["Coinbase", "Binance", "Bybit"];
|
|
317
318
|
function ExchangeBadgeIcons() {
|
|
318
|
-
return /* @__PURE__ */
|
|
319
|
-
/* @__PURE__ */ jsx4("span", { children: /* @__PURE__ */ jsx4(ExchangeBadgeImage, { name: "Coinbase" }) }),
|
|
320
|
-
/* @__PURE__ */ jsx4("span", { children: /* @__PURE__ */ jsx4(ExchangeBadgeImage, { name: "Binance" }) }),
|
|
321
|
-
/* @__PURE__ */ jsx4("span", { children: /* @__PURE__ */ jsx4(ExchangeBadgeImage, { name: "Kraken" }) })
|
|
322
|
-
] });
|
|
319
|
+
return /* @__PURE__ */ jsx4("span", { className: "rs-list-row-meta-icons rs-list-row-meta-icons--exchanges", children: EXCHANGE_BADGE_ORDER.map((name) => /* @__PURE__ */ jsx4("span", { children: /* @__PURE__ */ jsx4(ExchangeBadgeImage, { name }) }, name)) });
|
|
323
320
|
}
|
|
324
321
|
ExchangeBadgeIcons.displayName = "ExchangeBadgeIcons";
|
|
322
|
+
var EXCHANGE_BADGE_COUNT = EXCHANGE_BADGE_ORDER.length;
|
|
325
323
|
var DAPP_BADGE_ORDER = ["polymarket", "aave", "hyperliquid"];
|
|
326
324
|
function DappBadgeIcons() {
|
|
327
325
|
const marks = DAPP_BADGE_ORDER.map(
|
|
@@ -335,7 +333,7 @@ DappBadgeIcons.displayName = "DappBadgeIcons";
|
|
|
335
333
|
var DAPP_BADGE_COUNT = DAPP_BADGE_ORDER.length;
|
|
336
334
|
|
|
337
335
|
// src/components/steps/ConnectStep.tsx
|
|
338
|
-
import { Fragment as Fragment2, jsx as jsx5, jsxs as
|
|
336
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
339
337
|
function formatBalanceUsd(value) {
|
|
340
338
|
if (!Number.isFinite(value) || value <= 0) return "$0.00";
|
|
341
339
|
return `$${value.toFixed(2)}`;
|
|
@@ -356,7 +354,7 @@ function fiatIcon(name) {
|
|
|
356
354
|
function FiatMethodIcon({ option }) {
|
|
357
355
|
const [remoteFailed, setRemoteFailed] = useState(false);
|
|
358
356
|
if (option.iconUrl && !remoteFailed) {
|
|
359
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ jsxs3(
|
|
360
358
|
"span",
|
|
361
359
|
{
|
|
362
360
|
className: `rs-fiat-remote-icon${option.iconUrlLight ? " rs-fiat-remote-icon--has-dark" : ""}`,
|
|
@@ -441,24 +439,28 @@ var WALLET_LEADING = /* @__PURE__ */ jsx5(WalletIcon, {});
|
|
|
441
439
|
var EXCHANGE_LEADING = /* @__PURE__ */ jsx5(UnplugIcon, {});
|
|
442
440
|
var MIGRATE_ASSETS_LEADING = /* @__PURE__ */ jsx5(MigrateAssetsIcon, {});
|
|
443
441
|
var SMALL_SPINNER = /* @__PURE__ */ jsx5(Spinner, { className: "rs-spinner--sm" });
|
|
444
|
-
var CONNECT_META = /* @__PURE__ */
|
|
442
|
+
var CONNECT_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
445
443
|
/* @__PURE__ */ jsx5(WalletBadgeIcons, {}),
|
|
446
444
|
"+100"
|
|
447
445
|
] });
|
|
448
|
-
var
|
|
446
|
+
var EXTRA_EXCHANGE_COUNT = Math.max(
|
|
447
|
+
0,
|
|
448
|
+
SUPPORTED_CONNECT_EXCHANGE_COUNT - EXCHANGE_BADGE_COUNT
|
|
449
|
+
);
|
|
450
|
+
var EXCHANGE_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
449
451
|
/* @__PURE__ */ jsx5(ExchangeBadgeIcons, {}),
|
|
450
|
-
|
|
452
|
+
EXTRA_EXCHANGE_COUNT > 0 ? `+${EXTRA_EXCHANGE_COUNT}` : null
|
|
451
453
|
] });
|
|
452
454
|
var EXTRA_DAPP_COUNT = Math.max(
|
|
453
455
|
0,
|
|
454
456
|
DAPP_IMPORT_CATALOG.length - DAPP_BADGE_COUNT
|
|
455
457
|
);
|
|
456
|
-
var MIGRATE_ASSETS_META = /* @__PURE__ */
|
|
458
|
+
var MIGRATE_ASSETS_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
457
459
|
/* @__PURE__ */ jsx5(DappBadgeIcons, {}),
|
|
458
460
|
EXTRA_DAPP_COUNT > 0 ? `+${EXTRA_DAPP_COUNT}` : null
|
|
459
461
|
] });
|
|
460
462
|
var EXTRA_CHAIN_COUNT = Math.max(0, getSupportedChainIds().length - 3);
|
|
461
|
-
var CHAIN_BADGE_META = /* @__PURE__ */
|
|
463
|
+
var CHAIN_BADGE_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
462
464
|
/* @__PURE__ */ jsx5(ChainBadgeIcons, {}),
|
|
463
465
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
464
466
|
] });
|
|
@@ -631,8 +633,8 @@ function ConnectStep({
|
|
|
631
633
|
}
|
|
632
634
|
onPrefetchFiatMethod(recommendedMethod);
|
|
633
635
|
}, [activeTab, onPrefetchFiatMethod, recommendedMethod]);
|
|
634
|
-
return /* @__PURE__ */
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rs-screen", children: [
|
|
637
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
636
638
|
/* @__PURE__ */ jsx5(
|
|
637
639
|
BodyHeader,
|
|
638
640
|
{
|
|
@@ -680,7 +682,7 @@ ConnectStep.displayName = "ConnectStep";
|
|
|
680
682
|
// src/components/steps/AssetSelectStep.tsx
|
|
681
683
|
import { useEffect as useEffect2, useMemo, useState as useState2 } from "react";
|
|
682
684
|
import { formatUnits } from "viem";
|
|
683
|
-
import { jsx as jsx6, jsxs as
|
|
685
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
684
686
|
function AssetSelectStep({
|
|
685
687
|
address,
|
|
686
688
|
publicClient,
|
|
@@ -809,8 +811,8 @@ function AssetSelectStep({
|
|
|
809
811
|
return asset.balance;
|
|
810
812
|
}
|
|
811
813
|
};
|
|
812
|
-
return /* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
+
return /* @__PURE__ */ jsxs4("div", { className: "rs-screen", children: [
|
|
815
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-screen-body", children: [
|
|
814
816
|
/* @__PURE__ */ jsx6(
|
|
815
817
|
BodyHeader,
|
|
816
818
|
{
|
|
@@ -819,15 +821,15 @@ function AssetSelectStep({
|
|
|
819
821
|
subtitle: "Select source assets to transfer"
|
|
820
822
|
}
|
|
821
823
|
),
|
|
822
|
-
loading && /* @__PURE__ */
|
|
824
|
+
loading && /* @__PURE__ */ jsxs4("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
823
825
|
/* @__PURE__ */ jsx6(Spinner, { className: "rs-text-tertiary" }),
|
|
824
826
|
/* @__PURE__ */ jsx6("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
825
827
|
] }),
|
|
826
828
|
error && /* @__PURE__ */ jsx6(Callout, { variant: "error", children: error }),
|
|
827
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
829
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs4("div", { className: "rs-empty-state", children: [
|
|
828
830
|
/* @__PURE__ */ jsx6(WalletIcon, { className: "rs-empty-icon" }),
|
|
829
831
|
/* @__PURE__ */ jsx6("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
830
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-empty-address", children: [
|
|
831
833
|
address.slice(0, 6),
|
|
832
834
|
"...",
|
|
833
835
|
address.slice(-4)
|
|
@@ -847,7 +849,7 @@ function AssetSelectStep({
|
|
|
847
849
|
const tokenAmount = formatBalance(asset);
|
|
848
850
|
const badge = getChainBadge(asset.chainId);
|
|
849
851
|
const chainIcon = getChainIcon(asset.chainId);
|
|
850
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ jsxs4(
|
|
851
853
|
"button",
|
|
852
854
|
{
|
|
853
855
|
type: "button",
|
|
@@ -855,8 +857,8 @@ function AssetSelectStep({
|
|
|
855
857
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
856
858
|
"aria-pressed": isSelected,
|
|
857
859
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
/* @__PURE__ */
|
|
860
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-info", children: [
|
|
861
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-icon-wrapper", children: [
|
|
860
862
|
/* @__PURE__ */ jsx6("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx6(
|
|
861
863
|
TokenIcon,
|
|
862
864
|
{
|
|
@@ -876,15 +878,15 @@ function AssetSelectStep({
|
|
|
876
878
|
}
|
|
877
879
|
)
|
|
878
880
|
] }),
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-text", children: [
|
|
882
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-name-row", children: [
|
|
881
883
|
/* @__PURE__ */ jsx6("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
882
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ jsxs4("span", { className: "rs-asset-chain", children: [
|
|
883
885
|
"on ",
|
|
884
886
|
chainName(asset.chainId)
|
|
885
887
|
] })
|
|
886
888
|
] }),
|
|
887
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-balance-small", children: [
|
|
888
890
|
tokenAmount,
|
|
889
891
|
" ",
|
|
890
892
|
asset.symbol
|
|
@@ -957,7 +959,7 @@ import { erc20Abi, formatUnits as formatUnits2, parseUnits } from "viem";
|
|
|
957
959
|
|
|
958
960
|
// src/components/ui/AnimatedAmountInput.tsx
|
|
959
961
|
import { useLayoutEffect, useRef } from "react";
|
|
960
|
-
import { jsx as jsx7, jsxs as
|
|
962
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
961
963
|
var ENTER_TRANSITION = "transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.18s ease";
|
|
962
964
|
function prefersReducedMotion() {
|
|
963
965
|
return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -1008,9 +1010,9 @@ function AnimatedAmountInput({
|
|
|
1008
1010
|
onChange(e.target.value);
|
|
1009
1011
|
};
|
|
1010
1012
|
slotRefs.current = [];
|
|
1011
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsxs5("div", { className: "rs-amount-input-row", children: [
|
|
1012
1014
|
/* @__PURE__ */ jsx7("span", { className: "rs-amount-prefix", "aria-hidden": "true", children: prefix }),
|
|
1013
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ jsxs5("span", { className: "rs-amount-number-wrap", children: [
|
|
1014
1016
|
/* @__PURE__ */ jsx7(
|
|
1015
1017
|
"input",
|
|
1016
1018
|
{
|
|
@@ -1046,7 +1048,7 @@ function AnimatedAmountInput({
|
|
|
1046
1048
|
}
|
|
1047
1049
|
|
|
1048
1050
|
// src/components/steps/AmountStep.tsx
|
|
1049
|
-
import { Fragment as Fragment3, jsx as jsx8, jsxs as
|
|
1051
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1050
1052
|
var PRESETS = [
|
|
1051
1053
|
{ value: 25, label: "25%" },
|
|
1052
1054
|
{ value: 50, label: "50%" },
|
|
@@ -1280,11 +1282,11 @@ function AmountStep({
|
|
|
1280
1282
|
const chainName = useChainName();
|
|
1281
1283
|
const sourceChainName = chainName(asset.chainId);
|
|
1282
1284
|
const targetChainName = chainName(targetChainId);
|
|
1283
|
-
return /* @__PURE__ */
|
|
1284
|
-
/* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ jsxs6("div", { className: "rs-screen", children: [
|
|
1286
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1285
1287
|
/* @__PURE__ */ jsx8(BodyHeader, { icon: /* @__PURE__ */ jsx8(WalletIcon, {}), title: "Wallet deposit" }),
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-section", children: [
|
|
1289
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-display", children: [
|
|
1288
1290
|
/* @__PURE__ */ jsx8(
|
|
1289
1291
|
AnimatedAmountInput,
|
|
1290
1292
|
{
|
|
@@ -1294,19 +1296,19 @@ function AmountStep({
|
|
|
1294
1296
|
autoFocus: true
|
|
1295
1297
|
}
|
|
1296
1298
|
),
|
|
1297
|
-
/* @__PURE__ */
|
|
1298
|
-
/* @__PURE__ */
|
|
1299
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-meta", children: [
|
|
1300
|
+
/* @__PURE__ */ jsxs6("span", { className: "rs-amount-meta-balance", children: [
|
|
1299
1301
|
formattedBalance,
|
|
1300
1302
|
" ",
|
|
1301
1303
|
asset.symbol,
|
|
1302
1304
|
" available",
|
|
1303
|
-
balanceUsd !== null && /* @__PURE__ */
|
|
1305
|
+
balanceUsd !== null && /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
1304
1306
|
" (~",
|
|
1305
1307
|
currencyFormatter.format(balanceUsd),
|
|
1306
1308
|
")"
|
|
1307
1309
|
] })
|
|
1308
1310
|
] }),
|
|
1309
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
1311
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs6("span", { className: "rs-amount-meta-minimum", children: [
|
|
1310
1312
|
"Min. deposit ",
|
|
1311
1313
|
currencyFormatter.format(minDepositUsd)
|
|
1312
1314
|
] })
|
|
@@ -1324,11 +1326,11 @@ function AmountStep({
|
|
|
1324
1326
|
preset.value
|
|
1325
1327
|
)) })
|
|
1326
1328
|
] }),
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-details", children: [
|
|
1330
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
|
|
1329
1331
|
/* @__PURE__ */ jsx8("span", { children: "You send" }),
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ jsxs6("span", { className: "rs-amount-detail-value", children: [
|
|
1333
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1332
1334
|
sourceChainName,
|
|
1333
1335
|
" ",
|
|
1334
1336
|
asset.symbol
|
|
@@ -1336,10 +1338,10 @@ function AmountStep({
|
|
|
1336
1338
|
/* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(TokenIcon, { symbol: asset.symbol }) })
|
|
1337
1339
|
] })
|
|
1338
1340
|
] }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
|
|
1340
1342
|
/* @__PURE__ */ jsx8("span", { children: "Receive" }),
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
+
/* @__PURE__ */ jsxs6("span", { className: "rs-amount-detail-value", children: [
|
|
1344
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1343
1345
|
targetChainName,
|
|
1344
1346
|
" ",
|
|
1345
1347
|
targetSymbol
|
|
@@ -1347,7 +1349,7 @@ function AmountStep({
|
|
|
1347
1349
|
/* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(TokenIcon, { symbol: targetSymbol }) })
|
|
1348
1350
|
] })
|
|
1349
1351
|
] }),
|
|
1350
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
1352
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
|
|
1351
1353
|
/* @__PURE__ */ jsx8("span", { children: "Balance after deposit" }),
|
|
1352
1354
|
/* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
1353
1355
|
] })
|
|
@@ -1377,7 +1379,7 @@ function isDappImportAsset(asset) {
|
|
|
1377
1379
|
}
|
|
1378
1380
|
|
|
1379
1381
|
// src/components/steps/ConfirmStep.tsx
|
|
1380
|
-
import { jsx as jsx9, jsxs as
|
|
1382
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1381
1383
|
function ConfirmStep({
|
|
1382
1384
|
walletClient,
|
|
1383
1385
|
address,
|
|
@@ -1592,37 +1594,37 @@ function ConfirmStep({
|
|
|
1592
1594
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1593
1595
|
const message = formatUserError(raw);
|
|
1594
1596
|
setError(message);
|
|
1595
|
-
onError?.(message, "TRANSFER_ERROR");
|
|
1597
|
+
onError?.(message, "TRANSFER_ERROR", raw);
|
|
1596
1598
|
} finally {
|
|
1597
1599
|
setIsSubmitting(false);
|
|
1598
1600
|
}
|
|
1599
1601
|
};
|
|
1600
|
-
return /* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
+
return /* @__PURE__ */ jsxs7("div", { className: "rs-screen", children: [
|
|
1603
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1602
1604
|
/* @__PURE__ */ jsx9(BodyHeader, { icon: /* @__PURE__ */ jsx9(WalletIcon, {}), title: "Review deposit" }),
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
/* @__PURE__ */
|
|
1605
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-details", children: [
|
|
1606
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1605
1607
|
/* @__PURE__ */ jsx9("span", { children: "Source chain" }),
|
|
1606
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1607
1609
|
/* @__PURE__ */ jsx9("span", { children: sourceChainName }),
|
|
1608
1610
|
sourceChainIcon && /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(CdnIcon, { src: sourceChainIcon }) })
|
|
1609
1611
|
] })
|
|
1610
1612
|
] }),
|
|
1611
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1612
1614
|
/* @__PURE__ */ jsx9("span", { children: "Destination chain" }),
|
|
1613
|
-
/* @__PURE__ */
|
|
1615
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1614
1616
|
/* @__PURE__ */ jsx9("span", { children: targetChainName }),
|
|
1615
1617
|
targetChainIcon && /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(CdnIcon, { src: targetChainIcon }) })
|
|
1616
1618
|
] })
|
|
1617
1619
|
] }),
|
|
1618
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1619
1621
|
/* @__PURE__ */ jsx9("span", { children: "Estimated time" }),
|
|
1620
1622
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-value", children: estimatedTimeDisplay })
|
|
1621
1623
|
] }),
|
|
1622
|
-
/* @__PURE__ */
|
|
1624
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1623
1625
|
/* @__PURE__ */ jsx9("span", { children: "You send" }),
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1626
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1627
|
+
/* @__PURE__ */ jsxs7("span", { children: [
|
|
1626
1628
|
formattedSendAmount,
|
|
1627
1629
|
" ",
|
|
1628
1630
|
asset.symbol
|
|
@@ -1630,14 +1632,14 @@ function ConfirmStep({
|
|
|
1630
1632
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { symbol: asset.symbol }) })
|
|
1631
1633
|
] })
|
|
1632
1634
|
] }),
|
|
1633
|
-
/* @__PURE__ */
|
|
1635
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1634
1636
|
/* @__PURE__ */ jsx9("span", { children: "Receive" }),
|
|
1635
|
-
/* @__PURE__ */
|
|
1637
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1636
1638
|
/* @__PURE__ */ jsx9("span", { children: receiveDisplay }),
|
|
1637
1639
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { symbol: targetSymbol }) })
|
|
1638
1640
|
] })
|
|
1639
1641
|
] }),
|
|
1640
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1641
1643
|
/* @__PURE__ */ jsx9("span", { children: "Fees" }),
|
|
1642
1644
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-value", children: feeDisplay === null ? /* @__PURE__ */ jsx9(
|
|
1643
1645
|
"span",
|
|
@@ -1686,9 +1688,120 @@ import {
|
|
|
1686
1688
|
} from "react";
|
|
1687
1689
|
import { formatUnits as formatUnits3 } from "viem";
|
|
1688
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
|
+
|
|
1689
1802
|
// src/components/ui/DepositNotification.tsx
|
|
1690
1803
|
import { useState as useState5, useEffect as useEffect5, useRef as useRef4, useCallback } from "react";
|
|
1691
|
-
import { jsx as
|
|
1804
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1692
1805
|
var INITIAL_POLL_INTERVAL = 3e3;
|
|
1693
1806
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1694
1807
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
@@ -1745,7 +1858,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
1745
1858
|
}
|
|
1746
1859
|
return "Bridge failed";
|
|
1747
1860
|
}
|
|
1748
|
-
var txLinkIcon = /* @__PURE__ */
|
|
1861
|
+
var txLinkIcon = /* @__PURE__ */ jsx11(ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
|
|
1749
1862
|
function DepositNotification({
|
|
1750
1863
|
deposit,
|
|
1751
1864
|
smartAccount,
|
|
@@ -1884,7 +1997,7 @@ function DepositNotification({
|
|
|
1884
1997
|
const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainToChainId(targetChain), destinationTxHash) : null;
|
|
1885
1998
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1886
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.";
|
|
1887
|
-
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(
|
|
1888
2001
|
"svg",
|
|
1889
2002
|
{
|
|
1890
2003
|
className: "rs-deposit-notification-spinner",
|
|
@@ -1893,7 +2006,7 @@ function DepositNotification({
|
|
|
1893
2006
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1894
2007
|
"aria-hidden": "true",
|
|
1895
2008
|
children: [
|
|
1896
|
-
/* @__PURE__ */
|
|
2009
|
+
/* @__PURE__ */ jsx11(
|
|
1897
2010
|
"path",
|
|
1898
2011
|
{
|
|
1899
2012
|
className: "rs-deposit-notification-spinner-track",
|
|
@@ -1903,7 +2016,7 @@ function DepositNotification({
|
|
|
1903
2016
|
strokeLinecap: "round"
|
|
1904
2017
|
}
|
|
1905
2018
|
),
|
|
1906
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ jsx11(
|
|
1907
2020
|
"path",
|
|
1908
2021
|
{
|
|
1909
2022
|
className: "rs-deposit-notification-spinner-head",
|
|
@@ -1923,22 +2036,22 @@ function DepositNotification({
|
|
|
1923
2036
|
className: `rs-deposit-notification rs-deposit-notification--${status} ${expanded ? "rs-deposit-notification--expanded" : ""}`,
|
|
1924
2037
|
children: [
|
|
1925
2038
|
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-header", children: [
|
|
1926
|
-
/* @__PURE__ */
|
|
2039
|
+
/* @__PURE__ */ jsx11("div", { className: "rs-deposit-notification-icon", children: statusIcon }),
|
|
1927
2040
|
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-content", children: [
|
|
1928
2041
|
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-title-row", children: [
|
|
1929
|
-
/* @__PURE__ */
|
|
1930
|
-
showClose && /* @__PURE__ */
|
|
2042
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-title", children: title }),
|
|
2043
|
+
showClose && /* @__PURE__ */ jsx11(
|
|
1931
2044
|
"button",
|
|
1932
2045
|
{
|
|
1933
2046
|
type: "button",
|
|
1934
2047
|
className: "rs-deposit-notification-close",
|
|
1935
2048
|
onClick: () => onDismiss(deposit.id),
|
|
1936
2049
|
"aria-label": "Dismiss",
|
|
1937
|
-
children: /* @__PURE__ */
|
|
2050
|
+
children: /* @__PURE__ */ jsx11(CloseIcon, {})
|
|
1938
2051
|
}
|
|
1939
2052
|
)
|
|
1940
2053
|
] }),
|
|
1941
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ jsx11("div", { className: "rs-deposit-notification-subtitle", children: subtitle })
|
|
1942
2055
|
] })
|
|
1943
2056
|
] }),
|
|
1944
2057
|
/* @__PURE__ */ jsxs9(
|
|
@@ -1949,15 +2062,15 @@ function DepositNotification({
|
|
|
1949
2062
|
onClick: () => setExpanded(!expanded),
|
|
1950
2063
|
"aria-expanded": expanded,
|
|
1951
2064
|
children: [
|
|
1952
|
-
/* @__PURE__ */
|
|
1953
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ jsx11("span", { children: expanded ? "See less details" : "See more details" }),
|
|
2066
|
+
/* @__PURE__ */ jsx11(ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
1954
2067
|
]
|
|
1955
2068
|
}
|
|
1956
2069
|
),
|
|
1957
2070
|
expanded && /* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-details", children: [
|
|
1958
2071
|
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
1959
|
-
/* @__PURE__ */
|
|
1960
|
-
/* @__PURE__ */
|
|
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(
|
|
1961
2074
|
"a",
|
|
1962
2075
|
{
|
|
1963
2076
|
href: sourceExplorerUrl,
|
|
@@ -1972,8 +2085,8 @@ function DepositNotification({
|
|
|
1972
2085
|
) : truncateHash(txHash) })
|
|
1973
2086
|
] }),
|
|
1974
2087
|
destinationTxHash && /* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
1975
|
-
/* @__PURE__ */
|
|
1976
|
-
/* @__PURE__ */
|
|
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(
|
|
1977
2090
|
"a",
|
|
1978
2091
|
{
|
|
1979
2092
|
href: destExplorerUrl,
|
|
@@ -1988,12 +2101,12 @@ function DepositNotification({
|
|
|
1988
2101
|
) : truncateHash(destinationTxHash) })
|
|
1989
2102
|
] }),
|
|
1990
2103
|
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
1991
|
-
/* @__PURE__ */
|
|
1992
|
-
/* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-label", children: "Order submitted" }),
|
|
2105
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-value", children: formatTimestamp(detectedAt) })
|
|
1993
2106
|
] }),
|
|
1994
2107
|
completedAt && /* @__PURE__ */ jsxs9("div", { className: "rs-deposit-notification-row", children: [
|
|
1995
|
-
/* @__PURE__ */
|
|
1996
|
-
/* @__PURE__ */
|
|
2108
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-label", children: "Order filled" }),
|
|
2109
|
+
/* @__PURE__ */ jsx11("span", { className: "rs-deposit-notification-value", children: formatTimestamp(completedAt) })
|
|
1997
2110
|
] })
|
|
1998
2111
|
] })
|
|
1999
2112
|
]
|
|
@@ -2002,7 +2115,7 @@ function DepositNotification({
|
|
|
2002
2115
|
}
|
|
2003
2116
|
|
|
2004
2117
|
// src/components/steps/DepositAddressStep.tsx
|
|
2005
|
-
import { jsx as
|
|
2118
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2006
2119
|
var QRCode = lazy(
|
|
2007
2120
|
() => import("./QRCode-WUC652SH.mjs").then((m) => ({ default: m.QRCode }))
|
|
2008
2121
|
);
|
|
@@ -2089,10 +2202,6 @@ function chainLabel(chainId, catalogChain) {
|
|
|
2089
2202
|
function computeTokensForChain(chainId, topTokens, catalogChain) {
|
|
2090
2203
|
const fromBackend = topTokens?.[String(chainId)]?.map((t) => t.symbol);
|
|
2091
2204
|
if (fromBackend) return fromBackend;
|
|
2092
|
-
if (chainId === "solana") return SOLANA_TOKENS.map((t) => t.symbol);
|
|
2093
|
-
if (chainId === "hypercore") return ["USDC", "USDT0"];
|
|
2094
|
-
const bundled = getBundledTargetTokens(chainId).map((t) => t.symbol);
|
|
2095
|
-
if (bundled.length > 0) return bundled;
|
|
2096
2205
|
return Array.isArray(catalogChain?.supportedTokens) ? catalogChain.supportedTokens.map((t) => t.symbol) : [];
|
|
2097
2206
|
}
|
|
2098
2207
|
function resolveSourceTokenAddress(symbol, chainId, topTokens, catalogChain) {
|
|
@@ -2103,12 +2212,12 @@ function resolveSourceTokenAddress(symbol, chainId, topTokens, catalogChain) {
|
|
|
2103
2212
|
return Array.isArray(catalogChain?.supportedTokens) ? catalogChain.supportedTokens.find((t) => t.symbol === symbol)?.address : void 0;
|
|
2104
2213
|
}
|
|
2105
2214
|
function TokenGlyph({ symbol }) {
|
|
2106
|
-
return /* @__PURE__ */
|
|
2215
|
+
return /* @__PURE__ */ jsx12(
|
|
2107
2216
|
TokenIcon,
|
|
2108
2217
|
{
|
|
2109
2218
|
symbol,
|
|
2110
2219
|
className: "rs-deposit-address-dropdown-icon",
|
|
2111
|
-
fallback: /* @__PURE__ */
|
|
2220
|
+
fallback: /* @__PURE__ */ jsx12("span", { className: "rs-deposit-address-dropdown-icon rs-deposit-address-dropdown-icon--fallback", children: symbol.slice(0, 3) })
|
|
2112
2221
|
}
|
|
2113
2222
|
);
|
|
2114
2223
|
}
|
|
@@ -2146,7 +2255,7 @@ function DepositAddressStep({
|
|
|
2146
2255
|
}, [service]);
|
|
2147
2256
|
const BASE_CHAIN_ID2 = 8453;
|
|
2148
2257
|
const evmChainIds = useDepositChainIds();
|
|
2149
|
-
const { catalog } = useChainCatalog();
|
|
2258
|
+
const { catalog, isLoading: catalogLoading } = useChainCatalog();
|
|
2150
2259
|
const catalogFor = useCallback2(
|
|
2151
2260
|
(chain) => {
|
|
2152
2261
|
if (!catalog) return void 0;
|
|
@@ -2168,10 +2277,11 @@ function DepositAddressStep({
|
|
|
2168
2277
|
}, [evmChainIds, hasSolana, topTokens, catalogFor]);
|
|
2169
2278
|
const preferredChainId = (options) => options.includes(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : options[0] ?? BASE_CHAIN_ID2;
|
|
2170
2279
|
const [sourceChainId, setSourceChainId] = useState6(() => preferredChainId(chainOptions));
|
|
2280
|
+
const chainChosenByUser = useRef5(false);
|
|
2171
2281
|
useEffect6(() => {
|
|
2172
|
-
if (chainOptions.length
|
|
2173
|
-
|
|
2174
|
-
|
|
2282
|
+
if (chainOptions.length === 0) return;
|
|
2283
|
+
const stale = chainChosenByUser.current ? !chainOptions.includes(sourceChainId) : sourceChainId !== preferredChainId(chainOptions);
|
|
2284
|
+
if (stale) setSourceChainId(preferredChainId(chainOptions));
|
|
2175
2285
|
}, [chainOptions, sourceChainId]);
|
|
2176
2286
|
const isSolana = sourceChainId === "solana";
|
|
2177
2287
|
const isHyperCore = sourceChainId === "hypercore";
|
|
@@ -2299,6 +2409,7 @@ function DepositAddressStep({
|
|
|
2299
2409
|
topTokens,
|
|
2300
2410
|
catalogFor(nextChain)
|
|
2301
2411
|
);
|
|
2412
|
+
chainChosenByUser.current = true;
|
|
2302
2413
|
setSourceChainId(nextChain);
|
|
2303
2414
|
setSourceTokenSymbol(pickFallbackToken(nextTokens, sourceTokenSymbol));
|
|
2304
2415
|
setChainDropdownOpen(false);
|
|
@@ -2435,12 +2546,19 @@ function DepositAddressStep({
|
|
|
2435
2546
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
2436
2547
|
}, []);
|
|
2437
2548
|
const qrIconSrc = catalogFor(sourceChainId)?.iconUrl ?? getChainIcon(sourceChainId);
|
|
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
|
+
}
|
|
2438
2556
|
return /* @__PURE__ */ jsxs10("div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
2439
2557
|
/* @__PURE__ */ jsxs10("div", { className: "rs-screen-body", children: [
|
|
2440
|
-
/* @__PURE__ */
|
|
2558
|
+
/* @__PURE__ */ jsx12(BodyHeader, { icon: /* @__PURE__ */ jsx12(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2441
2559
|
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-selectors", children: [
|
|
2442
2560
|
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
2443
|
-
/* @__PURE__ */
|
|
2561
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2444
2562
|
/* @__PURE__ */ jsxs10(
|
|
2445
2563
|
"button",
|
|
2446
2564
|
{
|
|
@@ -2452,33 +2570,33 @@ function DepositAddressStep({
|
|
|
2452
2570
|
setTokenDropdownOpen(false);
|
|
2453
2571
|
},
|
|
2454
2572
|
children: [
|
|
2455
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ jsx12(
|
|
2456
2574
|
CdnIcon,
|
|
2457
2575
|
{
|
|
2458
2576
|
src: catalogFor(sourceChainId)?.iconUrl ?? getChainIcon(sourceChainId),
|
|
2459
2577
|
className: "rs-deposit-address-dropdown-icon"
|
|
2460
2578
|
}
|
|
2461
2579
|
),
|
|
2462
|
-
/* @__PURE__ */
|
|
2463
|
-
/* @__PURE__ */
|
|
2580
|
+
/* @__PURE__ */ jsx12("span", { children: chainLabel(sourceChainId, catalogFor(sourceChainId)) }),
|
|
2581
|
+
/* @__PURE__ */ jsx12(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2464
2582
|
]
|
|
2465
2583
|
}
|
|
2466
2584
|
),
|
|
2467
|
-
chainDropdownOpen && /* @__PURE__ */
|
|
2585
|
+
chainDropdownOpen && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-dropdown-menu", children: chainOptions.map((chainId) => /* @__PURE__ */ jsxs10(
|
|
2468
2586
|
"button",
|
|
2469
2587
|
{
|
|
2470
2588
|
type: "button",
|
|
2471
2589
|
className: `rs-deposit-address-dropdown-item ${chainId === sourceChainId ? "rs-deposit-address-dropdown-item--active" : ""}`,
|
|
2472
2590
|
onClick: () => handleSelectChain(chainId),
|
|
2473
2591
|
children: [
|
|
2474
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ jsx12(
|
|
2475
2593
|
CdnIcon,
|
|
2476
2594
|
{
|
|
2477
2595
|
src: catalogFor(chainId)?.iconUrl ?? getChainIcon(chainId),
|
|
2478
2596
|
className: "rs-deposit-address-dropdown-icon"
|
|
2479
2597
|
}
|
|
2480
2598
|
),
|
|
2481
|
-
/* @__PURE__ */
|
|
2599
|
+
/* @__PURE__ */ jsx12("span", { children: chainLabel(chainId, catalogFor(chainId)) })
|
|
2482
2600
|
]
|
|
2483
2601
|
},
|
|
2484
2602
|
String(chainId)
|
|
@@ -2486,11 +2604,11 @@ function DepositAddressStep({
|
|
|
2486
2604
|
] }),
|
|
2487
2605
|
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-dropdown", ref: tokenDropdownRef, children: [
|
|
2488
2606
|
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
2489
|
-
/* @__PURE__ */
|
|
2607
|
+
/* @__PURE__ */ jsx12("span", { children: "Supported token" }),
|
|
2490
2608
|
/* @__PURE__ */ jsxs10("span", { className: "rs-deposit-address-min", children: [
|
|
2491
2609
|
"Min.$",
|
|
2492
2610
|
(isHyperCoreDestination(targetChain) || isHyperCore ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
2493
|
-
/* @__PURE__ */
|
|
2611
|
+
/* @__PURE__ */ jsx12(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx12(
|
|
2494
2612
|
InfoIcon,
|
|
2495
2613
|
{
|
|
2496
2614
|
className: "rs-deposit-address-min-icon",
|
|
@@ -2510,13 +2628,13 @@ function DepositAddressStep({
|
|
|
2510
2628
|
setChainDropdownOpen(false);
|
|
2511
2629
|
},
|
|
2512
2630
|
children: [
|
|
2513
|
-
/* @__PURE__ */
|
|
2514
|
-
/* @__PURE__ */
|
|
2515
|
-
/* @__PURE__ */
|
|
2631
|
+
/* @__PURE__ */ jsx12(TokenGlyph, { symbol: sourceTokenSymbol }),
|
|
2632
|
+
/* @__PURE__ */ jsx12("span", { children: sourceTokenSymbol }),
|
|
2633
|
+
/* @__PURE__ */ jsx12(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2516
2634
|
]
|
|
2517
2635
|
}
|
|
2518
2636
|
),
|
|
2519
|
-
tokenDropdownOpen && /* @__PURE__ */
|
|
2637
|
+
tokenDropdownOpen && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */ jsxs10(
|
|
2520
2638
|
"button",
|
|
2521
2639
|
{
|
|
2522
2640
|
type: "button",
|
|
@@ -2526,8 +2644,8 @@ function DepositAddressStep({
|
|
|
2526
2644
|
setTokenDropdownOpen(false);
|
|
2527
2645
|
},
|
|
2528
2646
|
children: [
|
|
2529
|
-
/* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ jsx12(TokenGlyph, { symbol }),
|
|
2648
|
+
/* @__PURE__ */ jsx12("span", { children: symbol })
|
|
2531
2649
|
]
|
|
2532
2650
|
},
|
|
2533
2651
|
symbol
|
|
@@ -2540,14 +2658,14 @@ function DepositAddressStep({
|
|
|
2540
2658
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
2541
2659
|
children: [
|
|
2542
2660
|
/* @__PURE__ */ jsxs10("div", { className: "rs-deposit-address-well", children: [
|
|
2543
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx12(
|
|
2544
2662
|
Suspense,
|
|
2545
2663
|
{
|
|
2546
|
-
fallback: /* @__PURE__ */
|
|
2547
|
-
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 })
|
|
2548
2666
|
}
|
|
2549
2667
|
) }),
|
|
2550
|
-
/* @__PURE__ */
|
|
2668
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-value", children: displayAddress })
|
|
2551
2669
|
] }),
|
|
2552
2670
|
/* @__PURE__ */ jsxs10(
|
|
2553
2671
|
"button",
|
|
@@ -2556,7 +2674,7 @@ function DepositAddressStep({
|
|
|
2556
2674
|
className: "rs-deposit-address-copy",
|
|
2557
2675
|
onClick: handleCopy,
|
|
2558
2676
|
children: [
|
|
2559
|
-
copied ? /* @__PURE__ */
|
|
2677
|
+
copied ? /* @__PURE__ */ jsx12(CheckIcon, {}) : /* @__PURE__ */ jsx12(CopyIcon, {}),
|
|
2560
2678
|
copied ? "Copied!" : "Copy address"
|
|
2561
2679
|
]
|
|
2562
2680
|
}
|
|
@@ -2578,18 +2696,18 @@ function DepositAddressStep({
|
|
|
2578
2696
|
"aria-expanded": priceImpactExpanded,
|
|
2579
2697
|
children: [
|
|
2580
2698
|
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-header-left", children: [
|
|
2581
|
-
/* @__PURE__ */
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
/* @__PURE__ */
|
|
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(
|
|
2584
2702
|
Tooltip,
|
|
2585
2703
|
{
|
|
2586
2704
|
className: "rs-price-impact-info",
|
|
2587
2705
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2588
|
-
children: /* @__PURE__ */
|
|
2706
|
+
children: /* @__PURE__ */ jsx12(InfoIcon, { "aria-hidden": "true" })
|
|
2589
2707
|
}
|
|
2590
2708
|
)
|
|
2591
2709
|
] }),
|
|
2592
|
-
/* @__PURE__ */
|
|
2710
|
+
/* @__PURE__ */ jsx12(
|
|
2593
2711
|
ChevronDownIcon,
|
|
2594
2712
|
{
|
|
2595
2713
|
className: "rs-price-impact-chevron",
|
|
@@ -2599,35 +2717,35 @@ function DepositAddressStep({
|
|
|
2599
2717
|
]
|
|
2600
2718
|
}
|
|
2601
2719
|
),
|
|
2602
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsx12("div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-panel-inner", children: [
|
|
2603
2721
|
/* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-row", children: [
|
|
2604
|
-
/* @__PURE__ */
|
|
2722
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(PercentIcon, {}) }),
|
|
2605
2723
|
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-label", children: [
|
|
2606
2724
|
"Max slippage: ",
|
|
2607
|
-
/* @__PURE__ */
|
|
2725
|
+
/* @__PURE__ */ jsx12("strong", { children: "0.2%" })
|
|
2608
2726
|
] }),
|
|
2609
|
-
/* @__PURE__ */
|
|
2727
|
+
/* @__PURE__ */ jsx12(
|
|
2610
2728
|
Tooltip,
|
|
2611
2729
|
{
|
|
2612
2730
|
className: "rs-price-impact-info",
|
|
2613
2731
|
content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
|
|
2614
|
-
children: /* @__PURE__ */
|
|
2732
|
+
children: /* @__PURE__ */ jsx12(InfoIcon, { "aria-hidden": "true" })
|
|
2615
2733
|
}
|
|
2616
2734
|
)
|
|
2617
2735
|
] }),
|
|
2618
2736
|
/* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-row", children: [
|
|
2619
|
-
/* @__PURE__ */
|
|
2737
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(ClockIcon, {}) }),
|
|
2620
2738
|
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-label", children: [
|
|
2621
2739
|
"Processing time: ",
|
|
2622
|
-
/* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ jsx12("strong", { children: "< 1 min" })
|
|
2623
2741
|
] })
|
|
2624
2742
|
] }),
|
|
2625
2743
|
liquidityHelper.kind !== "idle" && /* @__PURE__ */ jsxs10("div", { className: "rs-price-impact-row", children: [
|
|
2626
|
-
/* @__PURE__ */
|
|
2744
|
+
/* @__PURE__ */ jsx12("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(PlusCircleIcon, {}) }),
|
|
2627
2745
|
/* @__PURE__ */ jsxs10("span", { className: "rs-price-impact-label", children: [
|
|
2628
2746
|
"Max deposit:",
|
|
2629
2747
|
" ",
|
|
2630
|
-
/* @__PURE__ */
|
|
2748
|
+
/* @__PURE__ */ jsx12("strong", { children: liquidityHelper.kind === "max" ? `${formatUnits3(
|
|
2631
2749
|
BigInt(liquidityHelper.maxAmount),
|
|
2632
2750
|
liquidityHelper.decimals
|
|
2633
2751
|
)} ${liquidityHelper.symbol}` : liquidityHelper.kind === "unlimited" ? "Unlimited" : liquidityHelper.kind === "unavailable" ? "Unavailable" : liquidityHelper.kind === "error" ? "\u2014" : "\u2026" })
|
|
@@ -2637,9 +2755,9 @@ function DepositAddressStep({
|
|
|
2637
2755
|
]
|
|
2638
2756
|
}
|
|
2639
2757
|
),
|
|
2640
|
-
pollingError && /* @__PURE__ */
|
|
2758
|
+
pollingError && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-address-error", children: pollingError })
|
|
2641
2759
|
] }),
|
|
2642
|
-
notifications.length > 0 && /* @__PURE__ */
|
|
2760
|
+
notifications.length > 0 && /* @__PURE__ */ jsx12("div", { className: "rs-deposit-notifications", children: notifications.map((deposit) => /* @__PURE__ */ jsx12(
|
|
2643
2761
|
DepositNotification,
|
|
2644
2762
|
{
|
|
2645
2763
|
deposit,
|
|
@@ -2654,7 +2772,7 @@ function DepositAddressStep({
|
|
|
2654
2772
|
},
|
|
2655
2773
|
deposit.id
|
|
2656
2774
|
)) }),
|
|
2657
|
-
/* @__PURE__ */
|
|
2775
|
+
/* @__PURE__ */ jsx12(PoweredBy, {})
|
|
2658
2776
|
] });
|
|
2659
2777
|
}
|
|
2660
2778
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -2680,7 +2798,7 @@ function isSwappedWidgetUrlFresh(res, now = Date.now()) {
|
|
|
2680
2798
|
import { useState as useState7, useEffect as useEffect7, useRef as useRef6, useMemo as useMemo4 } from "react";
|
|
2681
2799
|
|
|
2682
2800
|
// src/components/steps/FinalisingDepositStep.tsx
|
|
2683
|
-
import { jsx as
|
|
2801
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2684
2802
|
function FinalisingDepositStep() {
|
|
2685
2803
|
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen rs-finalising", children: [
|
|
2686
2804
|
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body rs-finalising-body", children: [
|
|
@@ -2692,23 +2810,23 @@ function FinalisingDepositStep() {
|
|
|
2692
2810
|
fill: "none",
|
|
2693
2811
|
"aria-hidden": "true",
|
|
2694
2812
|
children: [
|
|
2695
|
-
/* @__PURE__ */
|
|
2696
|
-
/* @__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" })
|
|
2697
2815
|
]
|
|
2698
2816
|
}
|
|
2699
2817
|
),
|
|
2700
2818
|
/* @__PURE__ */ jsxs11("div", { className: "rs-finalising-text", children: [
|
|
2701
|
-
/* @__PURE__ */
|
|
2702
|
-
/* @__PURE__ */
|
|
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." })
|
|
2703
2821
|
] })
|
|
2704
2822
|
] }),
|
|
2705
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ jsx13(PoweredBy, {})
|
|
2706
2824
|
] });
|
|
2707
2825
|
}
|
|
2708
2826
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
2709
2827
|
|
|
2710
2828
|
// src/components/steps/SwappedOrderTracker.tsx
|
|
2711
|
-
import { jsx as
|
|
2829
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2712
2830
|
var STEP_LABELS = [
|
|
2713
2831
|
"Payment received",
|
|
2714
2832
|
null,
|
|
@@ -2732,27 +2850,27 @@ function SwappedOrderTracker({
|
|
|
2732
2850
|
];
|
|
2733
2851
|
return /* @__PURE__ */ jsxs12("div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
2734
2852
|
/* @__PURE__ */ jsxs12("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
/* @__PURE__ */
|
|
2853
|
+
/* @__PURE__ */ jsx14(BodyHeader, { icon: /* @__PURE__ */ jsx14(HandCoinsIcon, {}), title }),
|
|
2854
|
+
/* @__PURE__ */ jsx14("ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
2737
2855
|
const status = stepStates[idx];
|
|
2738
2856
|
return /* @__PURE__ */ jsxs12(
|
|
2739
2857
|
"li",
|
|
2740
2858
|
{
|
|
2741
2859
|
className: `rs-swapped-tracker-step rs-swapped-tracker-step--${status}`,
|
|
2742
2860
|
children: [
|
|
2743
|
-
/* @__PURE__ */
|
|
2744
|
-
/* @__PURE__ */
|
|
2861
|
+
/* @__PURE__ */ jsx14("span", { className: "rs-swapped-tracker-step-label", children: label }),
|
|
2862
|
+
/* @__PURE__ */ jsx14(
|
|
2745
2863
|
"span",
|
|
2746
2864
|
{
|
|
2747
2865
|
className: "rs-swapped-tracker-step-marker",
|
|
2748
2866
|
"aria-hidden": "true",
|
|
2749
|
-
children: status === "complete" ? /* @__PURE__ */
|
|
2867
|
+
children: status === "complete" ? /* @__PURE__ */ jsx14(CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ jsx14(CloseIcon, {}) : status === "active" ? /* @__PURE__ */ jsx14(Spinner, {}) : /* @__PURE__ */ jsx14(
|
|
2750
2868
|
"svg",
|
|
2751
2869
|
{
|
|
2752
2870
|
className: "rs-swapped-tracker-step-ring",
|
|
2753
2871
|
viewBox: "0 0 16 16",
|
|
2754
2872
|
"aria-hidden": "true",
|
|
2755
|
-
children: /* @__PURE__ */
|
|
2873
|
+
children: /* @__PURE__ */ jsx14("circle", { cx: "8", cy: "8", r: "7" })
|
|
2756
2874
|
}
|
|
2757
2875
|
)
|
|
2758
2876
|
}
|
|
@@ -2767,8 +2885,8 @@ function SwappedOrderTracker({
|
|
|
2767
2885
|
{
|
|
2768
2886
|
className: `rs-swapped-tracker-terminal rs-swapped-tracker-terminal--${terminal.kind}`,
|
|
2769
2887
|
children: [
|
|
2770
|
-
/* @__PURE__ */
|
|
2771
|
-
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(
|
|
2772
2890
|
"button",
|
|
2773
2891
|
{
|
|
2774
2892
|
type: "button",
|
|
@@ -2781,7 +2899,7 @@ function SwappedOrderTracker({
|
|
|
2781
2899
|
}
|
|
2782
2900
|
)
|
|
2783
2901
|
] }),
|
|
2784
|
-
/* @__PURE__ */
|
|
2902
|
+
/* @__PURE__ */ jsx14(PoweredBy, {})
|
|
2785
2903
|
] });
|
|
2786
2904
|
}
|
|
2787
2905
|
function formatTrackerAmount(amount) {
|
|
@@ -2793,7 +2911,7 @@ function formatTrackerAmount(amount) {
|
|
|
2793
2911
|
SwappedOrderTracker.displayName = "SwappedOrderTracker";
|
|
2794
2912
|
|
|
2795
2913
|
// src/components/steps/SwappedIframeStep.tsx
|
|
2796
|
-
import { jsx as
|
|
2914
|
+
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2797
2915
|
var STATUS_POLL_INTERVAL_MS = 2e3;
|
|
2798
2916
|
var DEPOSIT_POLL_INTERVAL_MS = 2e3;
|
|
2799
2917
|
var DEPOSIT_POLL_FAST_INITIAL_DELAY_MS = 1e3;
|
|
@@ -3125,9 +3243,9 @@ function SwappedIframeStep({
|
|
|
3125
3243
|
if (phase === "tracker") {
|
|
3126
3244
|
const paymentReceived = stepStates[0] === "complete";
|
|
3127
3245
|
if (variant === "connect" && !terminalState && paymentReceived) {
|
|
3128
|
-
return /* @__PURE__ */
|
|
3246
|
+
return /* @__PURE__ */ jsx15(FinalisingDepositStep, {});
|
|
3129
3247
|
}
|
|
3130
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ jsx15(
|
|
3131
3249
|
SwappedOrderTracker,
|
|
3132
3250
|
{
|
|
3133
3251
|
amount: orderState?.orderCryptoAmount ?? null,
|
|
@@ -3140,10 +3258,10 @@ function SwappedIframeStep({
|
|
|
3140
3258
|
);
|
|
3141
3259
|
}
|
|
3142
3260
|
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
3143
|
-
/* @__PURE__ */
|
|
3261
|
+
/* @__PURE__ */ jsx15("div", { className: "rs-screen-body rs-fiat-onramp-body", children: /* @__PURE__ */ jsxs13("div", { className: "rs-fiat-onramp-iframe-wrap", children: [
|
|
3144
3262
|
loadError && /* @__PURE__ */ jsxs13("div", { className: "rs-fiat-onramp-error", children: [
|
|
3145
|
-
/* @__PURE__ */
|
|
3146
|
-
/* @__PURE__ */
|
|
3263
|
+
/* @__PURE__ */ jsx15("div", { children: loadError }),
|
|
3264
|
+
/* @__PURE__ */ jsx15(
|
|
3147
3265
|
"button",
|
|
3148
3266
|
{
|
|
3149
3267
|
type: "button",
|
|
@@ -3153,8 +3271,8 @@ function SwappedIframeStep({
|
|
|
3153
3271
|
}
|
|
3154
3272
|
)
|
|
3155
3273
|
] }),
|
|
3156
|
-
!loadError && !iframeLoaded && /* @__PURE__ */
|
|
3157
|
-
widgetUrl && !loadError && /* @__PURE__ */
|
|
3274
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ jsx15("div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ jsx15(Spinner, {}) }),
|
|
3275
|
+
widgetUrl && !loadError && /* @__PURE__ */ jsx15(
|
|
3158
3276
|
"iframe",
|
|
3159
3277
|
{
|
|
3160
3278
|
ref: iframeRef,
|
|
@@ -3176,7 +3294,7 @@ function SwappedIframeStep({
|
|
|
3176
3294
|
retryToken
|
|
3177
3295
|
)
|
|
3178
3296
|
] }) }),
|
|
3179
|
-
loadError && /* @__PURE__ */
|
|
3297
|
+
loadError && /* @__PURE__ */ jsx15(PoweredBy, {})
|
|
3180
3298
|
] });
|
|
3181
3299
|
}
|
|
3182
3300
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
@@ -3203,7 +3321,7 @@ function deriveStepStates(swappedStatus, latestEvent) {
|
|
|
3203
3321
|
SwappedIframeStep.displayName = "SwappedIframeStep";
|
|
3204
3322
|
|
|
3205
3323
|
// src/components/steps/FiatOnrampStep.tsx
|
|
3206
|
-
import { jsx as
|
|
3324
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
3207
3325
|
function fiatBannerForStatus(status, context) {
|
|
3208
3326
|
if (context.currencyMismatch) {
|
|
3209
3327
|
return {
|
|
@@ -3268,7 +3386,7 @@ function FiatOnrampStep({
|
|
|
3268
3386
|
methodSelectionSource,
|
|
3269
3387
|
consumePrefetchedUrl
|
|
3270
3388
|
]);
|
|
3271
|
-
return /* @__PURE__ */
|
|
3389
|
+
return /* @__PURE__ */ jsx16(
|
|
3272
3390
|
SwappedIframeStep,
|
|
3273
3391
|
{
|
|
3274
3392
|
smartAccount,
|
|
@@ -3292,7 +3410,7 @@ FiatOnrampStep.displayName = "FiatOnrampStep";
|
|
|
3292
3410
|
|
|
3293
3411
|
// src/components/steps/ExchangeConnectStep.tsx
|
|
3294
3412
|
import { useCallback as useCallback4 } from "react";
|
|
3295
|
-
import { jsx as
|
|
3413
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3296
3414
|
function connectBannerForStatus(status, context) {
|
|
3297
3415
|
if (context.currencyMismatch) {
|
|
3298
3416
|
return {
|
|
@@ -3342,7 +3460,7 @@ function ExchangeConnectStep({
|
|
|
3342
3460
|
});
|
|
3343
3461
|
return res;
|
|
3344
3462
|
}, [loadPreparedUrl, service, smartAccount, connection]);
|
|
3345
|
-
return /* @__PURE__ */
|
|
3463
|
+
return /* @__PURE__ */ jsx17(
|
|
3346
3464
|
SwappedIframeStep,
|
|
3347
3465
|
{
|
|
3348
3466
|
smartAccount,
|
|
@@ -3366,13 +3484,13 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
3366
3484
|
|
|
3367
3485
|
// src/components/steps/ExchangeSelectStep.tsx
|
|
3368
3486
|
import { useCallback as useCallback5, useEffect as useEffect8, useState as useState8 } from "react";
|
|
3369
|
-
import { jsx as
|
|
3487
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3370
3488
|
function ExchangeLogo({ exchange }) {
|
|
3371
3489
|
const [failed, setFailed] = useState8(false);
|
|
3372
3490
|
if (!exchange.logoUrl || failed) {
|
|
3373
|
-
return /* @__PURE__ */
|
|
3491
|
+
return /* @__PURE__ */ jsx18(BankIcon, {});
|
|
3374
3492
|
}
|
|
3375
|
-
return /* @__PURE__ */
|
|
3493
|
+
return /* @__PURE__ */ jsx18(
|
|
3376
3494
|
"img",
|
|
3377
3495
|
{
|
|
3378
3496
|
src: exchange.logoUrl,
|
|
@@ -3450,18 +3568,18 @@ function ExchangeSelectStep({
|
|
|
3450
3568
|
);
|
|
3451
3569
|
return /* @__PURE__ */ jsxs14("div", { className: "rs-screen rs-exchange-select", children: [
|
|
3452
3570
|
/* @__PURE__ */ jsxs14("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3453
|
-
/* @__PURE__ */
|
|
3571
|
+
/* @__PURE__ */ jsx18(
|
|
3454
3572
|
BodyHeader,
|
|
3455
3573
|
{
|
|
3456
|
-
icon: /* @__PURE__ */
|
|
3574
|
+
icon: /* @__PURE__ */ jsx18(UnplugIcon, {}),
|
|
3457
3575
|
title: "Connect exchange",
|
|
3458
3576
|
subtitle: "Select an exchange to connect"
|
|
3459
3577
|
}
|
|
3460
3578
|
),
|
|
3461
|
-
loading && /* @__PURE__ */
|
|
3579
|
+
loading && /* @__PURE__ */ jsx18("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ jsx18(Spinner, {}) }),
|
|
3462
3580
|
!loading && error && /* @__PURE__ */ jsxs14("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
3463
|
-
/* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
3582
|
+
/* @__PURE__ */ jsx18(
|
|
3465
3583
|
"button",
|
|
3466
3584
|
{
|
|
3467
3585
|
type: "button",
|
|
@@ -3472,8 +3590,8 @@ function ExchangeSelectStep({
|
|
|
3472
3590
|
)
|
|
3473
3591
|
] }),
|
|
3474
3592
|
!loading && !error && exchanges.length === 0 && /* @__PURE__ */ jsxs14("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
3475
|
-
/* @__PURE__ */
|
|
3476
|
-
/* @__PURE__ */
|
|
3593
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-exchange-select-state-title", children: "No exchanges available" }),
|
|
3594
|
+
/* @__PURE__ */ jsx18(
|
|
3477
3595
|
"button",
|
|
3478
3596
|
{
|
|
3479
3597
|
type: "button",
|
|
@@ -3483,7 +3601,7 @@ function ExchangeSelectStep({
|
|
|
3483
3601
|
}
|
|
3484
3602
|
)
|
|
3485
3603
|
] }),
|
|
3486
|
-
!loading && !error && exchanges.length > 0 && /* @__PURE__ */
|
|
3604
|
+
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ jsx18("div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
3487
3605
|
const brand = getExchangeLogo(exchange.name, exchange.connection);
|
|
3488
3606
|
return /* @__PURE__ */ jsxs14(
|
|
3489
3607
|
"button",
|
|
@@ -3495,146 +3613,35 @@ function ExchangeSelectStep({
|
|
|
3495
3613
|
"aria-busy": selectingConnection === exchange.connection,
|
|
3496
3614
|
"aria-label": `Select ${exchange.name}`,
|
|
3497
3615
|
children: [
|
|
3498
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ jsx18(
|
|
3499
3617
|
"span",
|
|
3500
3618
|
{
|
|
3501
3619
|
className: `rs-exchange-card-logo${brand ? " rs-exchange-card-logo--brand" : ""}`,
|
|
3502
|
-
children: brand ?? /* @__PURE__ */
|
|
3620
|
+
children: brand ?? /* @__PURE__ */ jsx18(ExchangeLogo, { exchange })
|
|
3503
3621
|
}
|
|
3504
3622
|
),
|
|
3505
|
-
/* @__PURE__ */
|
|
3623
|
+
/* @__PURE__ */ jsx18("span", { className: "rs-exchange-card-name", children: exchange.name })
|
|
3506
3624
|
]
|
|
3507
3625
|
},
|
|
3508
3626
|
exchange.connection
|
|
3509
3627
|
);
|
|
3510
3628
|
}) })
|
|
3511
3629
|
] }),
|
|
3512
|
-
/* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ jsx18(PoweredBy, {}),
|
|
3513
3631
|
exchangeFeeBps > 0 && /* @__PURE__ */ jsxs14("p", { className: "rs-exchange-select-fee-note", children: [
|
|
3514
3632
|
"A ",
|
|
3515
3633
|
formatFeeRate(exchangeFeeBps),
|
|
3516
3634
|
" Exchange Fee applies to your deposit."
|
|
3517
3635
|
] }),
|
|
3518
|
-
selectionNotice && /* @__PURE__ */
|
|
3636
|
+
selectionNotice && /* @__PURE__ */ jsx18("p", { className: "rs-exchange-select-fee-note", role: "status", children: selectionNotice })
|
|
3519
3637
|
] });
|
|
3520
3638
|
}
|
|
3521
3639
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
3522
3640
|
|
|
3523
|
-
// src/components/steps/DepositAddressSkeleton.tsx
|
|
3524
|
-
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3525
|
-
var BASE_CHAIN_ID = 8453;
|
|
3526
|
-
function DepositAddressSkeleton({
|
|
3527
|
-
uiConfig
|
|
3528
|
-
}) {
|
|
3529
|
-
const evmChainIds = getSupportedChainIds();
|
|
3530
|
-
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
3531
|
-
const tokensForChain = getTargetTokenSymbolsForChain(defaultChainId);
|
|
3532
|
-
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
|
|
3533
|
-
const chainName = getChainName(defaultChainId);
|
|
3534
|
-
const chainIcon = getChainIcon(defaultChainId);
|
|
3535
|
-
return /* @__PURE__ */ jsxs15("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
3536
|
-
/* @__PURE__ */ jsx18("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
3537
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-screen-body", children: [
|
|
3538
|
-
/* @__PURE__ */ jsx18(BodyHeader, { icon: /* @__PURE__ */ jsx18(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
3539
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
3540
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-deposit-address-dropdown", children: [
|
|
3541
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
3542
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3543
|
-
/* @__PURE__ */ jsx18(
|
|
3544
|
-
CdnIcon,
|
|
3545
|
-
{
|
|
3546
|
-
src: chainIcon,
|
|
3547
|
-
className: "rs-deposit-address-dropdown-icon"
|
|
3548
|
-
}
|
|
3549
|
-
),
|
|
3550
|
-
/* @__PURE__ */ jsx18("span", { children: chainName }),
|
|
3551
|
-
/* @__PURE__ */ jsx18(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3552
|
-
] })
|
|
3553
|
-
] }),
|
|
3554
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-deposit-address-dropdown", children: [
|
|
3555
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
3556
|
-
/* @__PURE__ */ jsx18("span", { children: "Supported token" }),
|
|
3557
|
-
/* @__PURE__ */ jsxs15("span", { className: "rs-deposit-address-min", children: [
|
|
3558
|
-
"Min.$",
|
|
3559
|
-
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
3560
|
-
/* @__PURE__ */ jsx18(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx18(
|
|
3561
|
-
InfoIcon,
|
|
3562
|
-
{
|
|
3563
|
-
className: "rs-deposit-address-min-icon",
|
|
3564
|
-
"aria-hidden": "true"
|
|
3565
|
-
}
|
|
3566
|
-
) })
|
|
3567
|
-
] })
|
|
3568
|
-
] }),
|
|
3569
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3570
|
-
/* @__PURE__ */ jsx18(
|
|
3571
|
-
TokenIcon,
|
|
3572
|
-
{
|
|
3573
|
-
symbol: defaultToken,
|
|
3574
|
-
className: "rs-deposit-address-dropdown-icon"
|
|
3575
|
-
}
|
|
3576
|
-
),
|
|
3577
|
-
/* @__PURE__ */ jsx18("span", { children: defaultToken }),
|
|
3578
|
-
/* @__PURE__ */ jsx18(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3579
|
-
] })
|
|
3580
|
-
] })
|
|
3581
|
-
] }),
|
|
3582
|
-
/* @__PURE__ */ jsxs15(
|
|
3583
|
-
"div",
|
|
3584
|
-
{
|
|
3585
|
-
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
3586
|
-
children: [
|
|
3587
|
-
/* @__PURE__ */ jsxs15("div", { className: "rs-deposit-address-well", children: [
|
|
3588
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx18("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
3589
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
3590
|
-
] }),
|
|
3591
|
-
/* @__PURE__ */ jsxs15(
|
|
3592
|
-
"button",
|
|
3593
|
-
{
|
|
3594
|
-
type: "button",
|
|
3595
|
-
className: "rs-deposit-address-copy",
|
|
3596
|
-
disabled: true,
|
|
3597
|
-
"aria-hidden": "true",
|
|
3598
|
-
children: [
|
|
3599
|
-
/* @__PURE__ */ jsx18(CopyIcon, {}),
|
|
3600
|
-
"Copy address"
|
|
3601
|
-
]
|
|
3602
|
-
}
|
|
3603
|
-
)
|
|
3604
|
-
]
|
|
3605
|
-
}
|
|
3606
|
-
),
|
|
3607
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs15("div", { className: "rs-price-impact-header", children: [
|
|
3608
|
-
/* @__PURE__ */ jsxs15("span", { className: "rs-price-impact-header-left", children: [
|
|
3609
|
-
/* @__PURE__ */ jsx18("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
3610
|
-
/* @__PURE__ */ jsx18("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx18("strong", { children: "0.00%" }) }),
|
|
3611
|
-
/* @__PURE__ */ jsx18(
|
|
3612
|
-
Tooltip,
|
|
3613
|
-
{
|
|
3614
|
-
className: "rs-price-impact-info",
|
|
3615
|
-
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
3616
|
-
children: /* @__PURE__ */ jsx18(InfoIcon, { "aria-hidden": "true" })
|
|
3617
|
-
}
|
|
3618
|
-
)
|
|
3619
|
-
] }),
|
|
3620
|
-
/* @__PURE__ */ jsx18(
|
|
3621
|
-
ChevronDownIcon,
|
|
3622
|
-
{
|
|
3623
|
-
className: "rs-price-impact-chevron",
|
|
3624
|
-
"aria-hidden": "true"
|
|
3625
|
-
}
|
|
3626
|
-
)
|
|
3627
|
-
] }) })
|
|
3628
|
-
] }),
|
|
3629
|
-
/* @__PURE__ */ jsx18(PoweredBy, {})
|
|
3630
|
-
] });
|
|
3631
|
-
}
|
|
3632
|
-
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
3633
|
-
|
|
3634
3641
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
3635
3642
|
import { useState as useState9, useEffect as useEffect9, useMemo as useMemo5 } from "react";
|
|
3636
3643
|
import { formatUnits as formatUnits4 } from "viem";
|
|
3637
|
-
import { jsx as jsx19, jsxs as
|
|
3644
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3638
3645
|
function SolanaTokenSelectStep({
|
|
3639
3646
|
solanaAddress,
|
|
3640
3647
|
service,
|
|
@@ -3740,8 +3747,8 @@ function SolanaTokenSelectStep({
|
|
|
3740
3747
|
};
|
|
3741
3748
|
const chainIcon = getChainIcon("solana");
|
|
3742
3749
|
const chainName = getChainName("solana");
|
|
3743
|
-
return /* @__PURE__ */
|
|
3744
|
-
/* @__PURE__ */
|
|
3750
|
+
return /* @__PURE__ */ jsxs15("div", { className: "rs-screen", children: [
|
|
3751
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-screen-body", children: [
|
|
3745
3752
|
/* @__PURE__ */ jsx19(
|
|
3746
3753
|
BodyHeader,
|
|
3747
3754
|
{
|
|
@@ -3750,15 +3757,15 @@ function SolanaTokenSelectStep({
|
|
|
3750
3757
|
subtitle: "Select source assets to transfer"
|
|
3751
3758
|
}
|
|
3752
3759
|
),
|
|
3753
|
-
loading && /* @__PURE__ */
|
|
3760
|
+
loading && /* @__PURE__ */ jsxs15("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
3754
3761
|
/* @__PURE__ */ jsx19(Spinner, { className: "rs-text-tertiary" }),
|
|
3755
3762
|
/* @__PURE__ */ jsx19("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
3756
3763
|
] }),
|
|
3757
3764
|
error && /* @__PURE__ */ jsx19(Callout, { variant: "error", children: error }),
|
|
3758
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
3765
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs15("div", { className: "rs-empty-state", children: [
|
|
3759
3766
|
/* @__PURE__ */ jsx19(WalletIcon, { className: "rs-empty-icon" }),
|
|
3760
3767
|
/* @__PURE__ */ jsx19("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
3761
|
-
/* @__PURE__ */
|
|
3768
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-empty-address", children: [
|
|
3762
3769
|
solanaAddress.slice(0, 6),
|
|
3763
3770
|
"...",
|
|
3764
3771
|
solanaAddress.slice(-4)
|
|
@@ -3776,7 +3783,7 @@ function SolanaTokenSelectStep({
|
|
|
3776
3783
|
!loading && !error && rows.length > 0 && /* @__PURE__ */ jsx19("div", { className: "rs-asset-list", children: rows.map((entry) => {
|
|
3777
3784
|
const isSelected = selectedSymbol === entry.token.symbol;
|
|
3778
3785
|
const tokenAmount = formatBalance(entry);
|
|
3779
|
-
return /* @__PURE__ */
|
|
3786
|
+
return /* @__PURE__ */ jsxs15(
|
|
3780
3787
|
"button",
|
|
3781
3788
|
{
|
|
3782
3789
|
type: "button",
|
|
@@ -3784,8 +3791,8 @@ function SolanaTokenSelectStep({
|
|
|
3784
3791
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
3785
3792
|
"aria-pressed": isSelected,
|
|
3786
3793
|
children: [
|
|
3787
|
-
/* @__PURE__ */
|
|
3788
|
-
/* @__PURE__ */
|
|
3794
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-info", children: [
|
|
3795
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3789
3796
|
/* @__PURE__ */ jsx19("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx19(
|
|
3790
3797
|
TokenIcon,
|
|
3791
3798
|
{
|
|
@@ -3795,15 +3802,15 @@ function SolanaTokenSelectStep({
|
|
|
3795
3802
|
) }),
|
|
3796
3803
|
chainIcon && /* @__PURE__ */ jsx19("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx19(CdnIcon, { src: chainIcon, alt: chainName }) })
|
|
3797
3804
|
] }),
|
|
3798
|
-
/* @__PURE__ */
|
|
3799
|
-
/* @__PURE__ */
|
|
3805
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-text", children: [
|
|
3806
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-name-row", children: [
|
|
3800
3807
|
/* @__PURE__ */ jsx19("span", { className: "rs-asset-name", children: entry.token.symbol }),
|
|
3801
|
-
/* @__PURE__ */
|
|
3808
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-asset-chain", children: [
|
|
3802
3809
|
"on ",
|
|
3803
3810
|
chainName
|
|
3804
3811
|
] })
|
|
3805
3812
|
] }),
|
|
3806
|
-
/* @__PURE__ */
|
|
3813
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-balance-small", children: [
|
|
3807
3814
|
tokenAmount,
|
|
3808
3815
|
" ",
|
|
3809
3816
|
entry.token.symbol
|
|
@@ -3837,7 +3844,7 @@ function SolanaTokenSelectStep({
|
|
|
3837
3844
|
// src/components/steps/SolanaAmountStep.tsx
|
|
3838
3845
|
import { useCallback as useCallback6, useEffect as useEffect10, useMemo as useMemo6, useRef as useRef7, useState as useState10 } from "react";
|
|
3839
3846
|
import { formatUnits as formatUnits5, parseUnits as parseUnits3 } from "viem";
|
|
3840
|
-
import { Fragment as Fragment4, jsx as jsx20, jsxs as
|
|
3847
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3841
3848
|
var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
|
|
3842
3849
|
var PRESETS2 = [
|
|
3843
3850
|
{ value: 25, label: "25%" },
|
|
@@ -4036,11 +4043,11 @@ function SolanaAmountStep({
|
|
|
4036
4043
|
};
|
|
4037
4044
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
4038
4045
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
4039
|
-
return /* @__PURE__ */
|
|
4040
|
-
/* @__PURE__ */
|
|
4046
|
+
return /* @__PURE__ */ jsxs16("div", { className: "rs-screen", children: [
|
|
4047
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4041
4048
|
/* @__PURE__ */ jsx20(BodyHeader, { icon: /* @__PURE__ */ jsx20(WalletIcon, {}), title: "Wallet deposit" }),
|
|
4042
|
-
/* @__PURE__ */
|
|
4043
|
-
/* @__PURE__ */
|
|
4049
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-section", children: [
|
|
4050
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-display", children: [
|
|
4044
4051
|
/* @__PURE__ */ jsx20(
|
|
4045
4052
|
AnimatedAmountInput,
|
|
4046
4053
|
{
|
|
@@ -4050,19 +4057,19 @@ function SolanaAmountStep({
|
|
|
4050
4057
|
autoFocus: true
|
|
4051
4058
|
}
|
|
4052
4059
|
),
|
|
4053
|
-
/* @__PURE__ */
|
|
4054
|
-
/* @__PURE__ */
|
|
4060
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-meta", children: [
|
|
4061
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-amount-meta-balance", children: [
|
|
4055
4062
|
formattedBalance,
|
|
4056
4063
|
" ",
|
|
4057
4064
|
token.symbol,
|
|
4058
4065
|
" available",
|
|
4059
|
-
computedBalanceUsd !== null && /* @__PURE__ */
|
|
4066
|
+
computedBalanceUsd !== null && /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
4060
4067
|
" (~",
|
|
4061
4068
|
currencyFormatter.format(computedBalanceUsd),
|
|
4062
4069
|
")"
|
|
4063
4070
|
] })
|
|
4064
4071
|
] }),
|
|
4065
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
4072
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs16("span", { className: "rs-amount-meta-minimum", children: [
|
|
4066
4073
|
"Min. deposit ",
|
|
4067
4074
|
currencyFormatter.format(minDepositUsd)
|
|
4068
4075
|
] })
|
|
@@ -4079,21 +4086,21 @@ function SolanaAmountStep({
|
|
|
4079
4086
|
preset.value
|
|
4080
4087
|
)) })
|
|
4081
4088
|
] }),
|
|
4082
|
-
/* @__PURE__ */
|
|
4083
|
-
/* @__PURE__ */
|
|
4089
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-details", children: [
|
|
4090
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-detail-row", children: [
|
|
4084
4091
|
/* @__PURE__ */ jsx20("span", { children: "You send" }),
|
|
4085
|
-
/* @__PURE__ */
|
|
4086
|
-
/* @__PURE__ */
|
|
4092
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-amount-detail-value", children: [
|
|
4093
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
4087
4094
|
"Solana ",
|
|
4088
4095
|
token.symbol
|
|
4089
4096
|
] }),
|
|
4090
4097
|
/* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20(TokenIcon, { symbol: token.symbol }) })
|
|
4091
4098
|
] })
|
|
4092
4099
|
] }),
|
|
4093
|
-
targetChainName && targetTokenSymbol && /* @__PURE__ */
|
|
4100
|
+
targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs16("div", { className: "rs-amount-detail-row", children: [
|
|
4094
4101
|
/* @__PURE__ */ jsx20("span", { children: "Receive" }),
|
|
4095
|
-
/* @__PURE__ */
|
|
4096
|
-
/* @__PURE__ */
|
|
4102
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-amount-detail-value", children: [
|
|
4103
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
4097
4104
|
targetChainName,
|
|
4098
4105
|
" ",
|
|
4099
4106
|
targetTokenSymbol
|
|
@@ -4101,7 +4108,7 @@ function SolanaAmountStep({
|
|
|
4101
4108
|
/* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20(TokenIcon, { symbol: targetTokenSymbol }) })
|
|
4102
4109
|
] })
|
|
4103
4110
|
] }),
|
|
4104
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
4111
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs16("div", { className: "rs-amount-detail-row", children: [
|
|
4105
4112
|
/* @__PURE__ */ jsx20("span", { children: "Balance after deposit" }),
|
|
4106
4113
|
/* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
4107
4114
|
] })
|
|
@@ -4224,7 +4231,7 @@ async function sendSolanaTransaction(provider, _connection, transaction) {
|
|
|
4224
4231
|
}
|
|
4225
4232
|
|
|
4226
4233
|
// src/components/steps/SolanaConfirmStep.tsx
|
|
4227
|
-
import { jsx as jsx21, jsxs as
|
|
4234
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4228
4235
|
function SolanaConfirmStep({
|
|
4229
4236
|
smartAccount,
|
|
4230
4237
|
solanaAddress,
|
|
@@ -4362,37 +4369,37 @@ function SolanaConfirmStep({
|
|
|
4362
4369
|
sourceAmount
|
|
4363
4370
|
});
|
|
4364
4371
|
setError(message);
|
|
4365
|
-
onError?.(message, "SOLANA_TRANSFER_ERROR");
|
|
4372
|
+
onError?.(message, "SOLANA_TRANSFER_ERROR", raw);
|
|
4366
4373
|
} finally {
|
|
4367
4374
|
setIsSubmitting(false);
|
|
4368
4375
|
}
|
|
4369
4376
|
};
|
|
4370
|
-
return /* @__PURE__ */
|
|
4371
|
-
/* @__PURE__ */
|
|
4377
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-screen", children: [
|
|
4378
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4372
4379
|
/* @__PURE__ */ jsx21(BodyHeader, { icon: /* @__PURE__ */ jsx21(WalletIcon, {}), title: "Review deposit" }),
|
|
4373
|
-
/* @__PURE__ */
|
|
4374
|
-
/* @__PURE__ */
|
|
4380
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-details", children: [
|
|
4381
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4375
4382
|
/* @__PURE__ */ jsx21("span", { children: "Source chain" }),
|
|
4376
|
-
/* @__PURE__ */
|
|
4383
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4377
4384
|
/* @__PURE__ */ jsx21("span", { children: sourceChainName }),
|
|
4378
4385
|
sourceChainIcon && /* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(CdnIcon, { src: sourceChainIcon }) })
|
|
4379
4386
|
] })
|
|
4380
4387
|
] }),
|
|
4381
|
-
/* @__PURE__ */
|
|
4388
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4382
4389
|
/* @__PURE__ */ jsx21("span", { children: "Destination chain" }),
|
|
4383
|
-
/* @__PURE__ */
|
|
4390
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4384
4391
|
/* @__PURE__ */ jsx21("span", { children: targetChainName }),
|
|
4385
4392
|
targetChainIcon && /* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(CdnIcon, { src: targetChainIcon }) })
|
|
4386
4393
|
] })
|
|
4387
4394
|
] }),
|
|
4388
|
-
/* @__PURE__ */
|
|
4395
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4389
4396
|
/* @__PURE__ */ jsx21("span", { children: "Estimated time" }),
|
|
4390
4397
|
/* @__PURE__ */ jsx21("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
4391
4398
|
] }),
|
|
4392
|
-
/* @__PURE__ */
|
|
4399
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4393
4400
|
/* @__PURE__ */ jsx21("span", { children: "You send" }),
|
|
4394
|
-
/* @__PURE__ */
|
|
4395
|
-
/* @__PURE__ */
|
|
4401
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4402
|
+
/* @__PURE__ */ jsxs17("span", { children: [
|
|
4396
4403
|
formattedAmount,
|
|
4397
4404
|
" ",
|
|
4398
4405
|
token.symbol
|
|
@@ -4400,16 +4407,16 @@ function SolanaConfirmStep({
|
|
|
4400
4407
|
/* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(TokenIcon, { symbol: token.symbol }) })
|
|
4401
4408
|
] })
|
|
4402
4409
|
] }),
|
|
4403
|
-
/* @__PURE__ */
|
|
4410
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4404
4411
|
/* @__PURE__ */ jsx21("span", { children: "Receive" }),
|
|
4405
|
-
/* @__PURE__ */
|
|
4412
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4406
4413
|
/* @__PURE__ */ jsx21("span", { children: receiveDisplay }),
|
|
4407
4414
|
/* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(TokenIcon, { symbol: targetSymbol }) })
|
|
4408
4415
|
] })
|
|
4409
4416
|
] }),
|
|
4410
|
-
/* @__PURE__ */
|
|
4417
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4411
4418
|
/* @__PURE__ */ jsx21("span", { children: "Fees" }),
|
|
4412
|
-
/* @__PURE__ */
|
|
4419
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4413
4420
|
/* @__PURE__ */ jsx21(
|
|
4414
4421
|
"span",
|
|
4415
4422
|
{
|
|
@@ -4439,15 +4446,15 @@ function SolanaConfirmStep({
|
|
|
4439
4446
|
}
|
|
4440
4447
|
|
|
4441
4448
|
// src/components/steps/DappImportAssetSelectStep.tsx
|
|
4442
|
-
import { jsx as jsx22, jsxs as
|
|
4449
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4443
4450
|
function DappImportAssetSelectStep({
|
|
4444
4451
|
sourceLabel,
|
|
4445
4452
|
assets,
|
|
4446
4453
|
incompleteSummary,
|
|
4447
4454
|
onSelect
|
|
4448
4455
|
}) {
|
|
4449
|
-
return /* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsxs18("div", { className: "rs-screen", children: [
|
|
4457
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4451
4458
|
/* @__PURE__ */ jsx22(
|
|
4452
4459
|
BodyHeader,
|
|
4453
4460
|
{
|
|
@@ -4465,15 +4472,15 @@ function DappImportAssetSelectStep({
|
|
|
4465
4472
|
const assetIcon = asset.icon;
|
|
4466
4473
|
const chainIcon = getChainIcon(asset.chainId);
|
|
4467
4474
|
const badge = getChainBadge(asset.chainId);
|
|
4468
|
-
return /* @__PURE__ */
|
|
4475
|
+
return /* @__PURE__ */ jsxs18(
|
|
4469
4476
|
"button",
|
|
4470
4477
|
{
|
|
4471
4478
|
type: "button",
|
|
4472
4479
|
className: "rs-asset-row",
|
|
4473
4480
|
onClick: () => onSelect(asset),
|
|
4474
4481
|
children: [
|
|
4475
|
-
/* @__PURE__ */
|
|
4476
|
-
/* @__PURE__ */
|
|
4482
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-info", children: [
|
|
4483
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-icon-wrapper", children: [
|
|
4477
4484
|
/* @__PURE__ */ jsx22("span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ jsx22(CdnIcon, { src: assetIcon, alt: asset.symbol }) : /* @__PURE__ */ jsx22(
|
|
4478
4485
|
TokenIcon,
|
|
4479
4486
|
{
|
|
@@ -4490,16 +4497,16 @@ function DappImportAssetSelectStep({
|
|
|
4490
4497
|
}
|
|
4491
4498
|
)
|
|
4492
4499
|
] }),
|
|
4493
|
-
/* @__PURE__ */
|
|
4494
|
-
/* @__PURE__ */
|
|
4500
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-text", children: [
|
|
4501
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-name-row", children: [
|
|
4495
4502
|
/* @__PURE__ */ jsx22("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
4496
|
-
/* @__PURE__ */
|
|
4503
|
+
/* @__PURE__ */ jsxs18("span", { className: "rs-asset-chain", children: [
|
|
4497
4504
|
"on ",
|
|
4498
4505
|
asset.sourceLabel,
|
|
4499
4506
|
asset.qualifier ? ` \xB7 ${asset.qualifier}` : ""
|
|
4500
4507
|
] })
|
|
4501
4508
|
] }),
|
|
4502
|
-
/* @__PURE__ */
|
|
4509
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-balance-small", children: [
|
|
4503
4510
|
tokenAmount,
|
|
4504
4511
|
" ",
|
|
4505
4512
|
asset.symbol
|
|
@@ -4519,7 +4526,7 @@ function DappImportAssetSelectStep({
|
|
|
4519
4526
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
4520
4527
|
|
|
4521
4528
|
// src/components/steps/DappImportSelectStep.tsx
|
|
4522
|
-
import { jsx as jsx23, jsxs as
|
|
4529
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4523
4530
|
function describeRow(status, comingSoon) {
|
|
4524
4531
|
if (comingSoon) {
|
|
4525
4532
|
return { subtitle: "Coming soon", disabled: true, busy: false };
|
|
@@ -4555,8 +4562,8 @@ function DappImportSelectStep({
|
|
|
4555
4562
|
const byId = new Map(rows.map((row) => [row.id, row.status]));
|
|
4556
4563
|
const enabled = new Set(enabledIds);
|
|
4557
4564
|
const brands = DAPP_IMPORT_CATALOG.filter((brand) => enabled.has(brand.id));
|
|
4558
|
-
return /* @__PURE__ */
|
|
4559
|
-
/* @__PURE__ */
|
|
4565
|
+
return /* @__PURE__ */ jsxs19("div", { className: "rs-screen", children: [
|
|
4566
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4560
4567
|
/* @__PURE__ */ jsx23(
|
|
4561
4568
|
BodyHeader,
|
|
4562
4569
|
{
|
|
@@ -4597,16 +4604,16 @@ function DappImportSelectStep({
|
|
|
4597
4604
|
DappImportSelectStep.displayName = "DappImportSelectStep";
|
|
4598
4605
|
|
|
4599
4606
|
// src/components/steps/DappImportAssetSelectSkeleton.tsx
|
|
4600
|
-
import { jsx as jsx24, jsxs as
|
|
4607
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4601
4608
|
function DappImportAssetSelectSkeleton({
|
|
4602
4609
|
sourceLabel,
|
|
4603
4610
|
rowCount = 3,
|
|
4604
4611
|
error = false,
|
|
4605
4612
|
onRetry
|
|
4606
4613
|
}) {
|
|
4607
|
-
return /* @__PURE__ */
|
|
4614
|
+
return /* @__PURE__ */ jsxs20("div", { className: "rs-screen", "aria-busy": error ? "false" : "true", children: [
|
|
4608
4615
|
/* @__PURE__ */ jsx24("span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
4609
|
-
/* @__PURE__ */
|
|
4616
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4610
4617
|
/* @__PURE__ */ jsx24(
|
|
4611
4618
|
BodyHeader,
|
|
4612
4619
|
{
|
|
@@ -4615,20 +4622,20 @@ function DappImportAssetSelectSkeleton({
|
|
|
4615
4622
|
subtitle: "Pick the balance to import"
|
|
4616
4623
|
}
|
|
4617
4624
|
),
|
|
4618
|
-
error ? /* @__PURE__ */ jsx24("div", { className: "rs-loading-state", children: /* @__PURE__ */
|
|
4625
|
+
error ? /* @__PURE__ */ jsx24("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsxs20("div", { className: "rs-loading-text", children: [
|
|
4619
4626
|
/* @__PURE__ */ jsx24("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t load your balances" }),
|
|
4620
4627
|
/* @__PURE__ */ jsx24("div", { className: "rs-loading-subtitle", children: "Check your connection and try again." })
|
|
4621
|
-
] }) }) : /* @__PURE__ */ jsx24("div", { className: "rs-asset-list", "aria-hidden": "true", children: Array.from({ length: rowCount }, (_, index) => /* @__PURE__ */
|
|
4628
|
+
] }) }) : /* @__PURE__ */ jsx24("div", { className: "rs-asset-list", "aria-hidden": "true", children: Array.from({ length: rowCount }, (_, index) => /* @__PURE__ */ jsxs20(
|
|
4622
4629
|
"div",
|
|
4623
4630
|
{
|
|
4624
4631
|
className: "rs-asset-row rs-asset-row--skeleton",
|
|
4625
4632
|
children: [
|
|
4626
|
-
/* @__PURE__ */
|
|
4627
|
-
/* @__PURE__ */
|
|
4633
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-asset-info", children: [
|
|
4634
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-asset-icon-wrapper", children: [
|
|
4628
4635
|
/* @__PURE__ */ jsx24("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-fill" }) }),
|
|
4629
4636
|
/* @__PURE__ */ jsx24("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-fill" }) })
|
|
4630
4637
|
] }),
|
|
4631
|
-
/* @__PURE__ */
|
|
4638
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-asset-text", children: [
|
|
4632
4639
|
/* @__PURE__ */ jsx24("div", { className: "rs-asset-name-row", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--name" }) }),
|
|
4633
4640
|
/* @__PURE__ */ jsx24("div", { className: "rs-asset-balance-small", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--balance" }) })
|
|
4634
4641
|
] })
|
|
@@ -6186,7 +6193,7 @@ function useDepositStore(selector) {
|
|
|
6186
6193
|
}
|
|
6187
6194
|
|
|
6188
6195
|
// src/DepositFlow.tsx
|
|
6189
|
-
import { Fragment as Fragment5, jsx as jsx25, jsxs as
|
|
6196
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6190
6197
|
function swappedWidgetPrefetchKey(method, methodSelectionSource) {
|
|
6191
6198
|
return JSON.stringify([methodSelectionSource ?? null, method ?? null]);
|
|
6192
6199
|
}
|
|
@@ -6194,8 +6201,8 @@ function AccountPreparingSkeleton({
|
|
|
6194
6201
|
errorMessage,
|
|
6195
6202
|
onRetry
|
|
6196
6203
|
}) {
|
|
6197
|
-
return /* @__PURE__ */
|
|
6198
|
-
/* @__PURE__ */ jsx25("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: /* @__PURE__ */ jsx25("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx25("div", { className: "rs-loading-text", children: errorMessage ? /* @__PURE__ */
|
|
6204
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-step", children: [
|
|
6205
|
+
/* @__PURE__ */ jsx25("div", { className: "rs-step-body", style: { paddingTop: 0 }, children: /* @__PURE__ */ jsx25("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsx25("div", { className: "rs-loading-text", children: errorMessage ? /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
6199
6206
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t prepare account" }),
|
|
6200
6207
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-subtitle", children: errorMessage })
|
|
6201
6208
|
] }) : /* @__PURE__ */ jsx25("div", { className: "rs-loading-title", children: "Preparing\u2026" }) }) }) }),
|
|
@@ -7839,9 +7846,9 @@ function DepositFlow({
|
|
|
7839
7846
|
[logFlowError, onLifecycleRef]
|
|
7840
7847
|
);
|
|
7841
7848
|
const handleError = useCallback7(
|
|
7842
|
-
(message, code) => {
|
|
7843
|
-
logFlowError("flow:error", message, { code });
|
|
7844
|
-
onErrorRef.current?.({ message, code });
|
|
7849
|
+
(message, code, cause) => {
|
|
7850
|
+
logFlowError("flow:error", cause ?? message, { code });
|
|
7851
|
+
onErrorRef.current?.({ message, code, cause });
|
|
7845
7852
|
},
|
|
7846
7853
|
[logFlowError, onErrorRef]
|
|
7847
7854
|
);
|
|
@@ -7955,7 +7962,7 @@ function DepositFlow({
|
|
|
7955
7962
|
) });
|
|
7956
7963
|
}
|
|
7957
7964
|
if (isDepositAddressMode) {
|
|
7958
|
-
return /* @__PURE__ */
|
|
7965
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-modal-body", children: [
|
|
7959
7966
|
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */ jsx25(
|
|
7960
7967
|
AccountPreparingSkeleton,
|
|
7961
7968
|
{
|
|
@@ -7998,7 +8005,7 @@ function DepositFlow({
|
|
|
7998
8005
|
] });
|
|
7999
8006
|
}
|
|
8000
8007
|
if (isFiatOnrampMode) {
|
|
8001
|
-
return /* @__PURE__ */
|
|
8008
|
+
return /* @__PURE__ */ jsxs21(
|
|
8002
8009
|
"div",
|
|
8003
8010
|
{
|
|
8004
8011
|
className: "rs-modal-body",
|
|
@@ -8063,7 +8070,7 @@ function DepositFlow({
|
|
|
8063
8070
|
);
|
|
8064
8071
|
}
|
|
8065
8072
|
if (isExchangeConnectMode) {
|
|
8066
|
-
return /* @__PURE__ */
|
|
8073
|
+
return /* @__PURE__ */ jsxs21(
|
|
8067
8074
|
"div",
|
|
8068
8075
|
{
|
|
8069
8076
|
className: "rs-modal-body",
|
|
@@ -8137,7 +8144,7 @@ function DepositFlow({
|
|
|
8137
8144
|
if (isSolanaWalletMode) {
|
|
8138
8145
|
const solanaAddr = reownWallet?.solanaAddress;
|
|
8139
8146
|
const solanaProvider = reownWallet?.solanaProvider;
|
|
8140
|
-
return /* @__PURE__ */
|
|
8147
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-modal-body", children: [
|
|
8141
8148
|
effectiveStep.type === "setup" && /* @__PURE__ */ jsx25(
|
|
8142
8149
|
AccountPreparingSkeleton,
|
|
8143
8150
|
{
|
|
@@ -8196,8 +8203,8 @@ function DepositFlow({
|
|
|
8196
8203
|
onError: handleError,
|
|
8197
8204
|
debug
|
|
8198
8205
|
}
|
|
8199
|
-
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */
|
|
8200
|
-
/* @__PURE__ */
|
|
8206
|
+
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */ jsxs21("div", { className: "rs-step", children: [
|
|
8207
|
+
/* @__PURE__ */ jsxs21("div", { className: "rs-loading-state", children: [
|
|
8201
8208
|
/* @__PURE__ */ jsx25("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx25(
|
|
8202
8209
|
"svg",
|
|
8203
8210
|
{
|
|
@@ -8215,7 +8222,7 @@ function DepositFlow({
|
|
|
8215
8222
|
)
|
|
8216
8223
|
}
|
|
8217
8224
|
) }),
|
|
8218
|
-
/* @__PURE__ */
|
|
8225
|
+
/* @__PURE__ */ jsxs21("div", { className: "rs-loading-text", children: [
|
|
8219
8226
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
|
|
8220
8227
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
|
|
8221
8228
|
] })
|
|
@@ -8320,7 +8327,7 @@ function DepositFlow({
|
|
|
8320
8327
|
}
|
|
8321
8328
|
return getPublicClient(chainId, rpcUrls);
|
|
8322
8329
|
};
|
|
8323
|
-
return /* @__PURE__ */
|
|
8330
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-modal-body", children: [
|
|
8324
8331
|
effectiveStep.type === "setup" && /* @__PURE__ */ jsx25(
|
|
8325
8332
|
AccountPreparingSkeleton,
|
|
8326
8333
|
{
|
|
@@ -8461,7 +8468,7 @@ function DepositFlow({
|
|
|
8461
8468
|
|
|
8462
8469
|
// src/components/history/DepositHistoryPanel.tsx
|
|
8463
8470
|
import { useCallback as useCallback8, useMemo as useMemo8, useState as useState13 } from "react";
|
|
8464
|
-
import { jsx as jsx26, jsxs as
|
|
8471
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8465
8472
|
function shortenHash(hash) {
|
|
8466
8473
|
if (hash.length <= 14) return hash;
|
|
8467
8474
|
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
@@ -8591,7 +8598,7 @@ function DepositHistoryPanel({
|
|
|
8591
8598
|
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
8592
8599
|
);
|
|
8593
8600
|
}, [deposits]);
|
|
8594
|
-
return /* @__PURE__ */
|
|
8601
|
+
return /* @__PURE__ */ jsxs22(
|
|
8595
8602
|
"div",
|
|
8596
8603
|
{
|
|
8597
8604
|
className: "rs-history-panel",
|
|
@@ -8599,7 +8606,7 @@ function DepositHistoryPanel({
|
|
|
8599
8606
|
"aria-label": "Deposit history",
|
|
8600
8607
|
onKeyDown: handleKeyDown,
|
|
8601
8608
|
children: [
|
|
8602
|
-
/* @__PURE__ */
|
|
8609
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-modal-header--redesigned", children: [
|
|
8603
8610
|
/* @__PURE__ */ jsx26("div", { className: "rs-modal-header-nav-left", children: /* @__PURE__ */ jsx26(
|
|
8604
8611
|
"button",
|
|
8605
8612
|
{
|
|
@@ -8621,31 +8628,31 @@ function DepositHistoryPanel({
|
|
|
8621
8628
|
}
|
|
8622
8629
|
) })
|
|
8623
8630
|
] }),
|
|
8624
|
-
/* @__PURE__ */
|
|
8625
|
-
/* @__PURE__ */
|
|
8631
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-screen", children: [
|
|
8632
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-screen-body", children: [
|
|
8626
8633
|
/* @__PURE__ */ jsx26(BodyHeader, { icon: /* @__PURE__ */ jsx26(HistoryIcon, {}), title: "History" }),
|
|
8627
|
-
isLoading && deposits.length === 0 && /* @__PURE__ */
|
|
8634
|
+
isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs22("div", { className: "rs-history-empty", children: [
|
|
8628
8635
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(HistoryIcon, {}) }),
|
|
8629
|
-
/* @__PURE__ */
|
|
8636
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-empty-text", children: [
|
|
8630
8637
|
/* @__PURE__ */ jsx26(Spinner, { className: "rs-spinner--sm" }),
|
|
8631
8638
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
8632
8639
|
] })
|
|
8633
8640
|
] }),
|
|
8634
|
-
error && !isLoading && /* @__PURE__ */
|
|
8641
|
+
error && !isLoading && /* @__PURE__ */ jsxs22("div", { className: "rs-history-empty", children: [
|
|
8635
8642
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(AlertTriangleIcon, {}) }),
|
|
8636
|
-
/* @__PURE__ */
|
|
8643
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-empty-text", children: [
|
|
8637
8644
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
8638
8645
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-hint", children: error })
|
|
8639
8646
|
] })
|
|
8640
8647
|
] }),
|
|
8641
|
-
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */
|
|
8648
|
+
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ jsxs22("div", { className: "rs-history-empty", children: [
|
|
8642
8649
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(HistoryIcon, {}) }),
|
|
8643
|
-
/* @__PURE__ */
|
|
8650
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-empty-text", children: [
|
|
8644
8651
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
8645
8652
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
8646
8653
|
] })
|
|
8647
8654
|
] }),
|
|
8648
|
-
visibleDeposits.length > 0 && /* @__PURE__ */
|
|
8655
|
+
visibleDeposits.length > 0 && /* @__PURE__ */ jsxs22("div", { className: "rs-history-list", children: [
|
|
8649
8656
|
visibleDeposits.map((deposit, i) => /* @__PURE__ */ jsx26(HistoryCard, { deposit }, deposit.txHash || i)),
|
|
8650
8657
|
hasMore && /* @__PURE__ */ jsx26(
|
|
8651
8658
|
"button",
|
|
@@ -8685,7 +8692,7 @@ function HistoryCard({ deposit }) {
|
|
|
8685
8692
|
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
8686
8693
|
const srcTxHash = sourceChainId === "hypercore" ? deposit.txHash : deposit.sourceTxHash;
|
|
8687
8694
|
const srcTxUrl = srcTxHash ? getTxExplorerUrl(srcTxHash, sourceChainId) : null;
|
|
8688
|
-
return /* @__PURE__ */
|
|
8695
|
+
return /* @__PURE__ */ jsxs22(
|
|
8689
8696
|
"button",
|
|
8690
8697
|
{
|
|
8691
8698
|
type: "button",
|
|
@@ -8693,38 +8700,38 @@ function HistoryCard({ deposit }) {
|
|
|
8693
8700
|
onClick: () => setExpanded((v) => !v),
|
|
8694
8701
|
"aria-expanded": expanded,
|
|
8695
8702
|
children: [
|
|
8696
|
-
/* @__PURE__ */
|
|
8697
|
-
/* @__PURE__ */
|
|
8703
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-row", children: [
|
|
8704
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-icons", children: [
|
|
8698
8705
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-card-token", children: /* @__PURE__ */ jsx26(TokenIcon, { symbol: sourceSymbol, fallback: sourceSymbol.slice(0, 2) }) }),
|
|
8699
8706
|
sourceChainIcon && /* @__PURE__ */ jsx26("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx26(CdnIcon, { src: sourceChainIcon }) })
|
|
8700
8707
|
] }),
|
|
8701
|
-
/* @__PURE__ */
|
|
8708
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-text", children: [
|
|
8702
8709
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
8703
8710
|
date && /* @__PURE__ */ jsx26("span", { className: "rs-history-card-date", children: date })
|
|
8704
8711
|
] }),
|
|
8705
|
-
/* @__PURE__ */
|
|
8712
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-side", children: [
|
|
8706
8713
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-card-amount", children: displayAmount }),
|
|
8707
8714
|
/* @__PURE__ */ jsx26("span", { className: `rs-history-badge rs-history-badge--${status}`, children: STATUS_LABEL[status] })
|
|
8708
8715
|
] })
|
|
8709
8716
|
] }),
|
|
8710
|
-
/* @__PURE__ */ jsx26("div", { className: "rs-history-card-panel", children: /* @__PURE__ */ jsx26("div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */
|
|
8711
|
-
sourceChainName && /* @__PURE__ */
|
|
8717
|
+
/* @__PURE__ */ jsx26("div", { className: "rs-history-card-panel", children: /* @__PURE__ */ jsx26("div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */ jsxs22("div", { className: "rs-history-card-details", children: [
|
|
8718
|
+
sourceChainName && /* @__PURE__ */ jsxs22("div", { className: "rs-amount-detail-row", children: [
|
|
8712
8719
|
/* @__PURE__ */ jsx26("span", { children: "Source chain" }),
|
|
8713
|
-
/* @__PURE__ */
|
|
8720
|
+
/* @__PURE__ */ jsxs22("span", { className: "rs-amount-detail-value", children: [
|
|
8714
8721
|
/* @__PURE__ */ jsx26("span", { children: sourceChainName }),
|
|
8715
8722
|
sourceChainIcon && /* @__PURE__ */ jsx26("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx26(CdnIcon, { src: sourceChainIcon }) })
|
|
8716
8723
|
] })
|
|
8717
8724
|
] }),
|
|
8718
|
-
targetChainName && /* @__PURE__ */
|
|
8725
|
+
targetChainName && /* @__PURE__ */ jsxs22("div", { className: "rs-amount-detail-row", children: [
|
|
8719
8726
|
/* @__PURE__ */ jsx26("span", { children: "Destination chain" }),
|
|
8720
|
-
/* @__PURE__ */
|
|
8727
|
+
/* @__PURE__ */ jsxs22("span", { className: "rs-amount-detail-value", children: [
|
|
8721
8728
|
/* @__PURE__ */ jsx26("span", { children: targetChainName }),
|
|
8722
8729
|
targetChainIcon && /* @__PURE__ */ jsx26("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx26(CdnIcon, { src: targetChainIcon }) })
|
|
8723
8730
|
] })
|
|
8724
8731
|
] }),
|
|
8725
|
-
srcTxUrl && srcTxHash && /* @__PURE__ */
|
|
8732
|
+
srcTxUrl && srcTxHash && /* @__PURE__ */ jsxs22("div", { className: "rs-amount-detail-row", children: [
|
|
8726
8733
|
/* @__PURE__ */ jsx26("span", { children: "Transaction details" }),
|
|
8727
|
-
/* @__PURE__ */
|
|
8734
|
+
/* @__PURE__ */ jsxs22(
|
|
8728
8735
|
"a",
|
|
8729
8736
|
{
|
|
8730
8737
|
href: srcTxUrl,
|
|
@@ -8747,9 +8754,9 @@ function HistoryCard({ deposit }) {
|
|
|
8747
8754
|
DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
8748
8755
|
|
|
8749
8756
|
// src/DepositModal.tsx
|
|
8750
|
-
import { jsx as jsx27, jsxs as
|
|
8757
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8751
8758
|
var ReownDepositInner = lazy2(
|
|
8752
|
-
() => import("./DepositModalReown-
|
|
8759
|
+
() => import("./DepositModalReown-MVVRUXO4.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
8753
8760
|
);
|
|
8754
8761
|
function sortByCreatedAtDesc(items) {
|
|
8755
8762
|
return [...items].sort((a, b) => {
|
|
@@ -8832,8 +8839,7 @@ function DepositModalInner({
|
|
|
8832
8839
|
const [backHandler, setBackHandler] = useState14(
|
|
8833
8840
|
void 0
|
|
8834
8841
|
);
|
|
8835
|
-
const
|
|
8836
|
-
const historyButtonVisible = showHistoryButton && (currentScreen === "select-asset" || currentScreen === "deposit-address");
|
|
8842
|
+
const historyButtonVisible = currentScreen === "connect";
|
|
8837
8843
|
const [historyOpen, setHistoryOpen] = useState14(false);
|
|
8838
8844
|
const [historyDeposits, setHistoryDeposits] = useState14([]);
|
|
8839
8845
|
const [hasMoreHistory, setHasMoreHistory] = useState14(false);
|
|
@@ -8969,11 +8975,11 @@ function DepositModalInner({
|
|
|
8969
8975
|
if (event.type === "smart-account-changed" && !event.evm && !event.solana) {
|
|
8970
8976
|
historyStaleRef.current = true;
|
|
8971
8977
|
}
|
|
8972
|
-
if (
|
|
8978
|
+
if (event.type === "submitted" || event.type === "complete" || event.type === "failed") {
|
|
8973
8979
|
markHistoryStale();
|
|
8974
8980
|
}
|
|
8975
8981
|
},
|
|
8976
|
-
[onLifecycleRef,
|
|
8982
|
+
[onLifecycleRef, markHistoryStale]
|
|
8977
8983
|
);
|
|
8978
8984
|
useEffect12(() => {
|
|
8979
8985
|
if (!isOpen) {
|
|
@@ -9006,8 +9012,8 @@ function DepositModalInner({
|
|
|
9006
9012
|
className,
|
|
9007
9013
|
inline,
|
|
9008
9014
|
closeOnOverlayClick,
|
|
9009
|
-
children: /* @__PURE__ */
|
|
9010
|
-
!hideHeaderChrome && /* @__PURE__ */
|
|
9015
|
+
children: /* @__PURE__ */ jsxs23("div", { ref: modalRef, className: modalClassName, children: [
|
|
9016
|
+
!hideHeaderChrome && /* @__PURE__ */ jsxs23("div", { className: "rs-modal-header--redesigned", children: [
|
|
9011
9017
|
/* @__PURE__ */ jsx27("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ jsx27(
|
|
9012
9018
|
"button",
|
|
9013
9019
|
{
|
|
@@ -9018,7 +9024,7 @@ function DepositModalInner({
|
|
|
9018
9024
|
children: /* @__PURE__ */ jsx27(ChevronLeftIcon, {})
|
|
9019
9025
|
}
|
|
9020
9026
|
) }),
|
|
9021
|
-
/* @__PURE__ */
|
|
9027
|
+
/* @__PURE__ */ jsxs23("div", { className: "rs-modal-header-nav-right", children: [
|
|
9022
9028
|
historyButtonVisible && /* @__PURE__ */ jsx27(
|
|
9023
9029
|
"button",
|
|
9024
9030
|
{
|
|
@@ -9082,7 +9088,7 @@ function DepositModalInner({
|
|
|
9082
9088
|
debug
|
|
9083
9089
|
}
|
|
9084
9090
|
),
|
|
9085
|
-
|
|
9091
|
+
historyOpen && /* @__PURE__ */ jsx27(
|
|
9086
9092
|
DepositHistoryPanel,
|
|
9087
9093
|
{
|
|
9088
9094
|
deposits: historyDeposits,
|