@rhinestone/deposit-modal 0.11.0 → 0.11.1
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-MO5QDLIT.mjs} +5 -5
- package/dist/{DepositModalReown-TXTLVZIQ.cjs → DepositModalReown-YGB73NMW.cjs} +13 -13
- package/dist/{chunk-XVKBCDZI.cjs → chunk-4FTI3GTB.cjs} +1 -1
- package/dist/{chunk-WLDTBKRA.mjs → chunk-5746YXKC.mjs} +1 -1
- package/dist/{chunk-ITAYM7SB.mjs → chunk-CWGUBFJL.mjs} +41 -3
- package/dist/{chunk-G4FVZQOM.mjs → chunk-EIWOVX53.mjs} +6 -6
- package/dist/{chunk-JYKMR6QI.cjs → chunk-FVUXJ3RP.cjs} +3 -3
- package/dist/{chunk-HCQWFL3A.cjs → chunk-HUHBNYD3.cjs} +66 -66
- package/dist/{chunk-BLJMYCBF.cjs → chunk-LQGYPM5B.cjs} +63 -63
- package/dist/{chunk-VRNRRN2U.mjs → chunk-OWYPKCYD.mjs} +3 -3
- package/dist/{chunk-7RNEYPI4.cjs → chunk-SSQ27YFB.cjs} +277 -274
- package/dist/{chunk-QRR3Y7EK.mjs → chunk-URFSTNRS.mjs} +1 -1
- package/dist/{chunk-DYTRG4C7.mjs → chunk-V6T7LORJ.mjs} +1 -1
- package/dist/{chunk-TRD2FCAR.mjs → chunk-YELNYILK.mjs} +256 -253
- package/dist/{chunk-NPSC5R22.cjs → chunk-ZQR36NCV.cjs} +65 -27
- package/dist/{chunk-GWA6GFTI.cjs → chunk-ZRIRCIQM.cjs} +54 -54
- package/dist/claim.cjs +5 -5
- package/dist/claim.d.cts +2 -2
- package/dist/claim.d.ts +2 -2
- package/dist/claim.mjs +4 -4
- package/dist/constants.cjs +2 -2
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +7 -7
- package/dist/{types-C7wag_iL.d.cts → types-CsGa-HxD.d.cts} +6 -0
- package/dist/{types-D4b6Cjox.d.ts → types-DdS8OySJ.d.ts} +6 -0
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
runAccountSetupDeduped,
|
|
18
18
|
txRefsMatch,
|
|
19
19
|
warnRemovedProps
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5746YXKC.mjs";
|
|
21
21
|
import {
|
|
22
22
|
ListRow
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-V6T7LORJ.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-CWGUBFJL.mjs";
|
|
89
90
|
import {
|
|
90
91
|
POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
91
92
|
POLYMARKET_ICON_URL,
|
|
@@ -298,7 +299,7 @@ var DAPP_IMPORT_CATALOG = [
|
|
|
298
299
|
];
|
|
299
300
|
|
|
300
301
|
// src/components/ui/BrandIcons.tsx
|
|
301
|
-
import { jsx as jsx4
|
|
302
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
302
303
|
function ExchangeBadgeImage({ name }) {
|
|
303
304
|
return /* @__PURE__ */ jsx4(CdnIcon, { src: getExchangeLogoSrc(name) ?? void 0 });
|
|
304
305
|
}
|
|
@@ -314,14 +315,12 @@ function CardNetworkIcons() {
|
|
|
314
315
|
)) });
|
|
315
316
|
}
|
|
316
317
|
CardNetworkIcons.displayName = "CardNetworkIcons";
|
|
318
|
+
var EXCHANGE_BADGE_ORDER = ["Coinbase", "Binance", "Bybit"];
|
|
317
319
|
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
|
-
] });
|
|
320
|
+
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
321
|
}
|
|
324
322
|
ExchangeBadgeIcons.displayName = "ExchangeBadgeIcons";
|
|
323
|
+
var EXCHANGE_BADGE_COUNT = EXCHANGE_BADGE_ORDER.length;
|
|
325
324
|
var DAPP_BADGE_ORDER = ["polymarket", "aave", "hyperliquid"];
|
|
326
325
|
function DappBadgeIcons() {
|
|
327
326
|
const marks = DAPP_BADGE_ORDER.map(
|
|
@@ -335,7 +334,7 @@ DappBadgeIcons.displayName = "DappBadgeIcons";
|
|
|
335
334
|
var DAPP_BADGE_COUNT = DAPP_BADGE_ORDER.length;
|
|
336
335
|
|
|
337
336
|
// src/components/steps/ConnectStep.tsx
|
|
338
|
-
import { Fragment as Fragment2, jsx as jsx5, jsxs as
|
|
337
|
+
import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
339
338
|
function formatBalanceUsd(value) {
|
|
340
339
|
if (!Number.isFinite(value) || value <= 0) return "$0.00";
|
|
341
340
|
return `$${value.toFixed(2)}`;
|
|
@@ -356,7 +355,7 @@ function fiatIcon(name) {
|
|
|
356
355
|
function FiatMethodIcon({ option }) {
|
|
357
356
|
const [remoteFailed, setRemoteFailed] = useState(false);
|
|
358
357
|
if (option.iconUrl && !remoteFailed) {
|
|
359
|
-
return /* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ jsxs3(
|
|
360
359
|
"span",
|
|
361
360
|
{
|
|
362
361
|
className: `rs-fiat-remote-icon${option.iconUrlLight ? " rs-fiat-remote-icon--has-dark" : ""}`,
|
|
@@ -441,24 +440,28 @@ var WALLET_LEADING = /* @__PURE__ */ jsx5(WalletIcon, {});
|
|
|
441
440
|
var EXCHANGE_LEADING = /* @__PURE__ */ jsx5(UnplugIcon, {});
|
|
442
441
|
var MIGRATE_ASSETS_LEADING = /* @__PURE__ */ jsx5(MigrateAssetsIcon, {});
|
|
443
442
|
var SMALL_SPINNER = /* @__PURE__ */ jsx5(Spinner, { className: "rs-spinner--sm" });
|
|
444
|
-
var CONNECT_META = /* @__PURE__ */
|
|
443
|
+
var CONNECT_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
445
444
|
/* @__PURE__ */ jsx5(WalletBadgeIcons, {}),
|
|
446
445
|
"+100"
|
|
447
446
|
] });
|
|
448
|
-
var
|
|
447
|
+
var EXTRA_EXCHANGE_COUNT = Math.max(
|
|
448
|
+
0,
|
|
449
|
+
SUPPORTED_CONNECT_EXCHANGE_COUNT - EXCHANGE_BADGE_COUNT
|
|
450
|
+
);
|
|
451
|
+
var EXCHANGE_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
449
452
|
/* @__PURE__ */ jsx5(ExchangeBadgeIcons, {}),
|
|
450
|
-
|
|
453
|
+
EXTRA_EXCHANGE_COUNT > 0 ? `+${EXTRA_EXCHANGE_COUNT}` : null
|
|
451
454
|
] });
|
|
452
455
|
var EXTRA_DAPP_COUNT = Math.max(
|
|
453
456
|
0,
|
|
454
457
|
DAPP_IMPORT_CATALOG.length - DAPP_BADGE_COUNT
|
|
455
458
|
);
|
|
456
|
-
var MIGRATE_ASSETS_META = /* @__PURE__ */
|
|
459
|
+
var MIGRATE_ASSETS_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
457
460
|
/* @__PURE__ */ jsx5(DappBadgeIcons, {}),
|
|
458
461
|
EXTRA_DAPP_COUNT > 0 ? `+${EXTRA_DAPP_COUNT}` : null
|
|
459
462
|
] });
|
|
460
463
|
var EXTRA_CHAIN_COUNT = Math.max(0, getSupportedChainIds().length - 3);
|
|
461
|
-
var CHAIN_BADGE_META = /* @__PURE__ */
|
|
464
|
+
var CHAIN_BADGE_META = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
462
465
|
/* @__PURE__ */ jsx5(ChainBadgeIcons, {}),
|
|
463
466
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
464
467
|
] });
|
|
@@ -631,8 +634,8 @@ function ConnectStep({
|
|
|
631
634
|
}
|
|
632
635
|
onPrefetchFiatMethod(recommendedMethod);
|
|
633
636
|
}, [activeTab, onPrefetchFiatMethod, recommendedMethod]);
|
|
634
|
-
return /* @__PURE__ */
|
|
635
|
-
/* @__PURE__ */
|
|
637
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rs-screen", children: [
|
|
638
|
+
/* @__PURE__ */ jsxs3("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
636
639
|
/* @__PURE__ */ jsx5(
|
|
637
640
|
BodyHeader,
|
|
638
641
|
{
|
|
@@ -680,7 +683,7 @@ ConnectStep.displayName = "ConnectStep";
|
|
|
680
683
|
// src/components/steps/AssetSelectStep.tsx
|
|
681
684
|
import { useEffect as useEffect2, useMemo, useState as useState2 } from "react";
|
|
682
685
|
import { formatUnits } from "viem";
|
|
683
|
-
import { jsx as jsx6, jsxs as
|
|
686
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
684
687
|
function AssetSelectStep({
|
|
685
688
|
address,
|
|
686
689
|
publicClient,
|
|
@@ -809,8 +812,8 @@ function AssetSelectStep({
|
|
|
809
812
|
return asset.balance;
|
|
810
813
|
}
|
|
811
814
|
};
|
|
812
|
-
return /* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ jsxs4("div", { className: "rs-screen", children: [
|
|
816
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-screen-body", children: [
|
|
814
817
|
/* @__PURE__ */ jsx6(
|
|
815
818
|
BodyHeader,
|
|
816
819
|
{
|
|
@@ -819,15 +822,15 @@ function AssetSelectStep({
|
|
|
819
822
|
subtitle: "Select source assets to transfer"
|
|
820
823
|
}
|
|
821
824
|
),
|
|
822
|
-
loading && /* @__PURE__ */
|
|
825
|
+
loading && /* @__PURE__ */ jsxs4("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
823
826
|
/* @__PURE__ */ jsx6(Spinner, { className: "rs-text-tertiary" }),
|
|
824
827
|
/* @__PURE__ */ jsx6("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
825
828
|
] }),
|
|
826
829
|
error && /* @__PURE__ */ jsx6(Callout, { variant: "error", children: error }),
|
|
827
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
830
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs4("div", { className: "rs-empty-state", children: [
|
|
828
831
|
/* @__PURE__ */ jsx6(WalletIcon, { className: "rs-empty-icon" }),
|
|
829
832
|
/* @__PURE__ */ jsx6("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
830
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-empty-address", children: [
|
|
831
834
|
address.slice(0, 6),
|
|
832
835
|
"...",
|
|
833
836
|
address.slice(-4)
|
|
@@ -847,7 +850,7 @@ function AssetSelectStep({
|
|
|
847
850
|
const tokenAmount = formatBalance(asset);
|
|
848
851
|
const badge = getChainBadge(asset.chainId);
|
|
849
852
|
const chainIcon = getChainIcon(asset.chainId);
|
|
850
|
-
return /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ jsxs4(
|
|
851
854
|
"button",
|
|
852
855
|
{
|
|
853
856
|
type: "button",
|
|
@@ -855,8 +858,8 @@ function AssetSelectStep({
|
|
|
855
858
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
856
859
|
"aria-pressed": isSelected,
|
|
857
860
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-info", children: [
|
|
862
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-icon-wrapper", children: [
|
|
860
863
|
/* @__PURE__ */ jsx6("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx6(
|
|
861
864
|
TokenIcon,
|
|
862
865
|
{
|
|
@@ -876,15 +879,15 @@ function AssetSelectStep({
|
|
|
876
879
|
}
|
|
877
880
|
)
|
|
878
881
|
] }),
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-text", children: [
|
|
883
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-name-row", children: [
|
|
881
884
|
/* @__PURE__ */ jsx6("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
882
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ jsxs4("span", { className: "rs-asset-chain", children: [
|
|
883
886
|
"on ",
|
|
884
887
|
chainName(asset.chainId)
|
|
885
888
|
] })
|
|
886
889
|
] }),
|
|
887
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ jsxs4("div", { className: "rs-asset-balance-small", children: [
|
|
888
891
|
tokenAmount,
|
|
889
892
|
" ",
|
|
890
893
|
asset.symbol
|
|
@@ -957,7 +960,7 @@ import { erc20Abi, formatUnits as formatUnits2, parseUnits } from "viem";
|
|
|
957
960
|
|
|
958
961
|
// src/components/ui/AnimatedAmountInput.tsx
|
|
959
962
|
import { useLayoutEffect, useRef } from "react";
|
|
960
|
-
import { jsx as jsx7, jsxs as
|
|
963
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
961
964
|
var ENTER_TRANSITION = "transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.18s ease";
|
|
962
965
|
function prefersReducedMotion() {
|
|
963
966
|
return typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
@@ -1008,9 +1011,9 @@ function AnimatedAmountInput({
|
|
|
1008
1011
|
onChange(e.target.value);
|
|
1009
1012
|
};
|
|
1010
1013
|
slotRefs.current = [];
|
|
1011
|
-
return /* @__PURE__ */
|
|
1014
|
+
return /* @__PURE__ */ jsxs5("div", { className: "rs-amount-input-row", children: [
|
|
1012
1015
|
/* @__PURE__ */ jsx7("span", { className: "rs-amount-prefix", "aria-hidden": "true", children: prefix }),
|
|
1013
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ jsxs5("span", { className: "rs-amount-number-wrap", children: [
|
|
1014
1017
|
/* @__PURE__ */ jsx7(
|
|
1015
1018
|
"input",
|
|
1016
1019
|
{
|
|
@@ -1046,7 +1049,7 @@ function AnimatedAmountInput({
|
|
|
1046
1049
|
}
|
|
1047
1050
|
|
|
1048
1051
|
// src/components/steps/AmountStep.tsx
|
|
1049
|
-
import { Fragment as Fragment3, jsx as jsx8, jsxs as
|
|
1052
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1050
1053
|
var PRESETS = [
|
|
1051
1054
|
{ value: 25, label: "25%" },
|
|
1052
1055
|
{ value: 50, label: "50%" },
|
|
@@ -1280,11 +1283,11 @@ function AmountStep({
|
|
|
1280
1283
|
const chainName = useChainName();
|
|
1281
1284
|
const sourceChainName = chainName(asset.chainId);
|
|
1282
1285
|
const targetChainName = chainName(targetChainId);
|
|
1283
|
-
return /* @__PURE__ */
|
|
1284
|
-
/* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ jsxs6("div", { className: "rs-screen", children: [
|
|
1287
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1285
1288
|
/* @__PURE__ */ jsx8(BodyHeader, { icon: /* @__PURE__ */ jsx8(WalletIcon, {}), title: "Wallet deposit" }),
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-section", children: [
|
|
1290
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-display", children: [
|
|
1288
1291
|
/* @__PURE__ */ jsx8(
|
|
1289
1292
|
AnimatedAmountInput,
|
|
1290
1293
|
{
|
|
@@ -1294,19 +1297,19 @@ function AmountStep({
|
|
|
1294
1297
|
autoFocus: true
|
|
1295
1298
|
}
|
|
1296
1299
|
),
|
|
1297
|
-
/* @__PURE__ */
|
|
1298
|
-
/* @__PURE__ */
|
|
1300
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-meta", children: [
|
|
1301
|
+
/* @__PURE__ */ jsxs6("span", { className: "rs-amount-meta-balance", children: [
|
|
1299
1302
|
formattedBalance,
|
|
1300
1303
|
" ",
|
|
1301
1304
|
asset.symbol,
|
|
1302
1305
|
" available",
|
|
1303
|
-
balanceUsd !== null && /* @__PURE__ */
|
|
1306
|
+
balanceUsd !== null && /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
1304
1307
|
" (~",
|
|
1305
1308
|
currencyFormatter.format(balanceUsd),
|
|
1306
1309
|
")"
|
|
1307
1310
|
] })
|
|
1308
1311
|
] }),
|
|
1309
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
1312
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs6("span", { className: "rs-amount-meta-minimum", children: [
|
|
1310
1313
|
"Min. deposit ",
|
|
1311
1314
|
currencyFormatter.format(minDepositUsd)
|
|
1312
1315
|
] })
|
|
@@ -1324,11 +1327,11 @@ function AmountStep({
|
|
|
1324
1327
|
preset.value
|
|
1325
1328
|
)) })
|
|
1326
1329
|
] }),
|
|
1327
|
-
/* @__PURE__ */
|
|
1328
|
-
/* @__PURE__ */
|
|
1330
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-details", children: [
|
|
1331
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
|
|
1329
1332
|
/* @__PURE__ */ jsx8("span", { children: "You send" }),
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ jsxs6("span", { className: "rs-amount-detail-value", children: [
|
|
1334
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1332
1335
|
sourceChainName,
|
|
1333
1336
|
" ",
|
|
1334
1337
|
asset.symbol
|
|
@@ -1336,10 +1339,10 @@ function AmountStep({
|
|
|
1336
1339
|
/* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(TokenIcon, { symbol: asset.symbol }) })
|
|
1337
1340
|
] })
|
|
1338
1341
|
] }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
|
|
1340
1343
|
/* @__PURE__ */ jsx8("span", { children: "Receive" }),
|
|
1341
|
-
/* @__PURE__ */
|
|
1342
|
-
/* @__PURE__ */
|
|
1344
|
+
/* @__PURE__ */ jsxs6("span", { className: "rs-amount-detail-value", children: [
|
|
1345
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
1343
1346
|
targetChainName,
|
|
1344
1347
|
" ",
|
|
1345
1348
|
targetSymbol
|
|
@@ -1347,7 +1350,7 @@ function AmountStep({
|
|
|
1347
1350
|
/* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx8(TokenIcon, { symbol: targetSymbol }) })
|
|
1348
1351
|
] })
|
|
1349
1352
|
] }),
|
|
1350
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
1353
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs6("div", { className: "rs-amount-detail-row", children: [
|
|
1351
1354
|
/* @__PURE__ */ jsx8("span", { children: "Balance after deposit" }),
|
|
1352
1355
|
/* @__PURE__ */ jsx8("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
1353
1356
|
] })
|
|
@@ -1377,7 +1380,7 @@ function isDappImportAsset(asset) {
|
|
|
1377
1380
|
}
|
|
1378
1381
|
|
|
1379
1382
|
// src/components/steps/ConfirmStep.tsx
|
|
1380
|
-
import { jsx as jsx9, jsxs as
|
|
1383
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1381
1384
|
function ConfirmStep({
|
|
1382
1385
|
walletClient,
|
|
1383
1386
|
address,
|
|
@@ -1592,37 +1595,37 @@ function ConfirmStep({
|
|
|
1592
1595
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1593
1596
|
const message = formatUserError(raw);
|
|
1594
1597
|
setError(message);
|
|
1595
|
-
onError?.(message, "TRANSFER_ERROR");
|
|
1598
|
+
onError?.(message, "TRANSFER_ERROR", raw);
|
|
1596
1599
|
} finally {
|
|
1597
1600
|
setIsSubmitting(false);
|
|
1598
1601
|
}
|
|
1599
1602
|
};
|
|
1600
|
-
return /* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1603
|
+
return /* @__PURE__ */ jsxs7("div", { className: "rs-screen", children: [
|
|
1604
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1602
1605
|
/* @__PURE__ */ jsx9(BodyHeader, { icon: /* @__PURE__ */ jsx9(WalletIcon, {}), title: "Review deposit" }),
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-details", children: [
|
|
1607
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1605
1608
|
/* @__PURE__ */ jsx9("span", { children: "Source chain" }),
|
|
1606
|
-
/* @__PURE__ */
|
|
1609
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1607
1610
|
/* @__PURE__ */ jsx9("span", { children: sourceChainName }),
|
|
1608
1611
|
sourceChainIcon && /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(CdnIcon, { src: sourceChainIcon }) })
|
|
1609
1612
|
] })
|
|
1610
1613
|
] }),
|
|
1611
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1612
1615
|
/* @__PURE__ */ jsx9("span", { children: "Destination chain" }),
|
|
1613
|
-
/* @__PURE__ */
|
|
1616
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1614
1617
|
/* @__PURE__ */ jsx9("span", { children: targetChainName }),
|
|
1615
1618
|
targetChainIcon && /* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(CdnIcon, { src: targetChainIcon }) })
|
|
1616
1619
|
] })
|
|
1617
1620
|
] }),
|
|
1618
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1619
1622
|
/* @__PURE__ */ jsx9("span", { children: "Estimated time" }),
|
|
1620
1623
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-value", children: estimatedTimeDisplay })
|
|
1621
1624
|
] }),
|
|
1622
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1623
1626
|
/* @__PURE__ */ jsx9("span", { children: "You send" }),
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1628
|
+
/* @__PURE__ */ jsxs7("span", { children: [
|
|
1626
1629
|
formattedSendAmount,
|
|
1627
1630
|
" ",
|
|
1628
1631
|
asset.symbol
|
|
@@ -1630,14 +1633,14 @@ function ConfirmStep({
|
|
|
1630
1633
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { symbol: asset.symbol }) })
|
|
1631
1634
|
] })
|
|
1632
1635
|
] }),
|
|
1633
|
-
/* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1634
1637
|
/* @__PURE__ */ jsx9("span", { children: "Receive" }),
|
|
1635
|
-
/* @__PURE__ */
|
|
1638
|
+
/* @__PURE__ */ jsxs7("span", { className: "rs-review-detail-value", children: [
|
|
1636
1639
|
/* @__PURE__ */ jsx9("span", { children: receiveDisplay }),
|
|
1637
1640
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx9(TokenIcon, { symbol: targetSymbol }) })
|
|
1638
1641
|
] })
|
|
1639
1642
|
] }),
|
|
1640
|
-
/* @__PURE__ */
|
|
1643
|
+
/* @__PURE__ */ jsxs7("div", { className: "rs-review-detail-row", children: [
|
|
1641
1644
|
/* @__PURE__ */ jsx9("span", { children: "Fees" }),
|
|
1642
1645
|
/* @__PURE__ */ jsx9("span", { className: "rs-review-detail-value", children: feeDisplay === null ? /* @__PURE__ */ jsx9(
|
|
1643
1646
|
"span",
|
|
@@ -1688,7 +1691,7 @@ import { formatUnits as formatUnits3 } from "viem";
|
|
|
1688
1691
|
|
|
1689
1692
|
// src/components/ui/DepositNotification.tsx
|
|
1690
1693
|
import { useState as useState5, useEffect as useEffect5, useRef as useRef4, useCallback } from "react";
|
|
1691
|
-
import { jsx as jsx10, jsxs as
|
|
1694
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1692
1695
|
var INITIAL_POLL_INTERVAL = 3e3;
|
|
1693
1696
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1694
1697
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
@@ -1884,7 +1887,7 @@ function DepositNotification({
|
|
|
1884
1887
|
const destExplorerUrl = destinationTxHash ? explorerTxUrl(targetChainToChainId(targetChain), destinationTxHash) : null;
|
|
1885
1888
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1886
1889
|
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__ */ jsx10("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ jsx10(CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ jsx10("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ jsx10(CloseIcon, {}) }) : /* @__PURE__ */ jsx10("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */
|
|
1890
|
+
const statusIcon = status === "complete" ? /* @__PURE__ */ jsx10("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ jsx10(CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ jsx10("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ jsx10(CloseIcon, {}) }) : /* @__PURE__ */ jsx10("div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ jsxs8(
|
|
1888
1891
|
"svg",
|
|
1889
1892
|
{
|
|
1890
1893
|
className: "rs-deposit-notification-spinner",
|
|
@@ -1917,15 +1920,15 @@ function DepositNotification({
|
|
|
1917
1920
|
}
|
|
1918
1921
|
) });
|
|
1919
1922
|
const showClose = status !== "processing";
|
|
1920
|
-
return /* @__PURE__ */
|
|
1923
|
+
return /* @__PURE__ */ jsxs8(
|
|
1921
1924
|
"div",
|
|
1922
1925
|
{
|
|
1923
1926
|
className: `rs-deposit-notification rs-deposit-notification--${status} ${expanded ? "rs-deposit-notification--expanded" : ""}`,
|
|
1924
1927
|
children: [
|
|
1925
|
-
/* @__PURE__ */
|
|
1928
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-header", children: [
|
|
1926
1929
|
/* @__PURE__ */ jsx10("div", { className: "rs-deposit-notification-icon", children: statusIcon }),
|
|
1927
|
-
/* @__PURE__ */
|
|
1928
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-content", children: [
|
|
1931
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-title-row", children: [
|
|
1929
1932
|
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-title", children: title }),
|
|
1930
1933
|
showClose && /* @__PURE__ */ jsx10(
|
|
1931
1934
|
"button",
|
|
@@ -1941,7 +1944,7 @@ function DepositNotification({
|
|
|
1941
1944
|
/* @__PURE__ */ jsx10("div", { className: "rs-deposit-notification-subtitle", children: subtitle })
|
|
1942
1945
|
] })
|
|
1943
1946
|
] }),
|
|
1944
|
-
/* @__PURE__ */
|
|
1947
|
+
/* @__PURE__ */ jsxs8(
|
|
1945
1948
|
"button",
|
|
1946
1949
|
{
|
|
1947
1950
|
type: "button",
|
|
@@ -1954,10 +1957,10 @@ function DepositNotification({
|
|
|
1954
1957
|
]
|
|
1955
1958
|
}
|
|
1956
1959
|
),
|
|
1957
|
-
expanded && /* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1960
|
+
expanded && /* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-details", children: [
|
|
1961
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-row", children: [
|
|
1959
1962
|
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-label", children: "Deposit tx" }),
|
|
1960
|
-
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-value", children: sourceExplorerUrl ? /* @__PURE__ */
|
|
1963
|
+
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-value", children: sourceExplorerUrl ? /* @__PURE__ */ jsxs8(
|
|
1961
1964
|
"a",
|
|
1962
1965
|
{
|
|
1963
1966
|
href: sourceExplorerUrl,
|
|
@@ -1971,9 +1974,9 @@ function DepositNotification({
|
|
|
1971
1974
|
}
|
|
1972
1975
|
) : truncateHash(txHash) })
|
|
1973
1976
|
] }),
|
|
1974
|
-
destinationTxHash && /* @__PURE__ */
|
|
1977
|
+
destinationTxHash && /* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-row", children: [
|
|
1975
1978
|
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-label", children: "Completion tx" }),
|
|
1976
|
-
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-value", children: destExplorerUrl ? /* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-value", children: destExplorerUrl ? /* @__PURE__ */ jsxs8(
|
|
1977
1980
|
"a",
|
|
1978
1981
|
{
|
|
1979
1982
|
href: destExplorerUrl,
|
|
@@ -1987,11 +1990,11 @@ function DepositNotification({
|
|
|
1987
1990
|
}
|
|
1988
1991
|
) : truncateHash(destinationTxHash) })
|
|
1989
1992
|
] }),
|
|
1990
|
-
/* @__PURE__ */
|
|
1993
|
+
/* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-row", children: [
|
|
1991
1994
|
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-label", children: "Order submitted" }),
|
|
1992
1995
|
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-value", children: formatTimestamp(detectedAt) })
|
|
1993
1996
|
] }),
|
|
1994
|
-
completedAt && /* @__PURE__ */
|
|
1997
|
+
completedAt && /* @__PURE__ */ jsxs8("div", { className: "rs-deposit-notification-row", children: [
|
|
1995
1998
|
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-label", children: "Order filled" }),
|
|
1996
1999
|
/* @__PURE__ */ jsx10("span", { className: "rs-deposit-notification-value", children: formatTimestamp(completedAt) })
|
|
1997
2000
|
] })
|
|
@@ -2002,7 +2005,7 @@ function DepositNotification({
|
|
|
2002
2005
|
}
|
|
2003
2006
|
|
|
2004
2007
|
// src/components/steps/DepositAddressStep.tsx
|
|
2005
|
-
import { jsx as jsx11, jsxs as
|
|
2008
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2006
2009
|
var QRCode = lazy(
|
|
2007
2010
|
() => import("./QRCode-WUC652SH.mjs").then((m) => ({ default: m.QRCode }))
|
|
2008
2011
|
);
|
|
@@ -2435,13 +2438,13 @@ function DepositAddressStep({
|
|
|
2435
2438
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
2436
2439
|
}, []);
|
|
2437
2440
|
const qrIconSrc = catalogFor(sourceChainId)?.iconUrl ?? getChainIcon(sourceChainId);
|
|
2438
|
-
return /* @__PURE__ */
|
|
2439
|
-
/* @__PURE__ */
|
|
2441
|
+
return /* @__PURE__ */ jsxs9("div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
2442
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-screen-body", children: [
|
|
2440
2443
|
/* @__PURE__ */ jsx11(BodyHeader, { icon: /* @__PURE__ */ jsx11(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2441
|
-
/* @__PURE__ */
|
|
2442
|
-
/* @__PURE__ */
|
|
2444
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-address-selectors", children: [
|
|
2445
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
2443
2446
|
/* @__PURE__ */ jsx11("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2444
|
-
/* @__PURE__ */
|
|
2447
|
+
/* @__PURE__ */ jsxs9(
|
|
2445
2448
|
"button",
|
|
2446
2449
|
{
|
|
2447
2450
|
type: "button",
|
|
@@ -2464,7 +2467,7 @@ function DepositAddressStep({
|
|
|
2464
2467
|
]
|
|
2465
2468
|
}
|
|
2466
2469
|
),
|
|
2467
|
-
chainDropdownOpen && /* @__PURE__ */ jsx11("div", { className: "rs-deposit-address-dropdown-menu", children: chainOptions.map((chainId) => /* @__PURE__ */
|
|
2470
|
+
chainDropdownOpen && /* @__PURE__ */ jsx11("div", { className: "rs-deposit-address-dropdown-menu", children: chainOptions.map((chainId) => /* @__PURE__ */ jsxs9(
|
|
2468
2471
|
"button",
|
|
2469
2472
|
{
|
|
2470
2473
|
type: "button",
|
|
@@ -2484,10 +2487,10 @@ function DepositAddressStep({
|
|
|
2484
2487
|
String(chainId)
|
|
2485
2488
|
)) })
|
|
2486
2489
|
] }),
|
|
2487
|
-
/* @__PURE__ */
|
|
2488
|
-
/* @__PURE__ */
|
|
2490
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-address-dropdown", ref: tokenDropdownRef, children: [
|
|
2491
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
2489
2492
|
/* @__PURE__ */ jsx11("span", { children: "Supported token" }),
|
|
2490
|
-
/* @__PURE__ */
|
|
2493
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-deposit-address-min", children: [
|
|
2491
2494
|
"Min.$",
|
|
2492
2495
|
(isHyperCoreDestination(targetChain) || isHyperCore ? Math.max(HYPERCORE_MIN_DEPOSIT_USD, uiConfig?.minDepositUsd ?? 0) : uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
2493
2496
|
/* @__PURE__ */ jsx11(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx11(
|
|
@@ -2499,7 +2502,7 @@ function DepositAddressStep({
|
|
|
2499
2502
|
) })
|
|
2500
2503
|
] })
|
|
2501
2504
|
] }),
|
|
2502
|
-
/* @__PURE__ */
|
|
2505
|
+
/* @__PURE__ */ jsxs9(
|
|
2503
2506
|
"button",
|
|
2504
2507
|
{
|
|
2505
2508
|
type: "button",
|
|
@@ -2516,7 +2519,7 @@ function DepositAddressStep({
|
|
|
2516
2519
|
]
|
|
2517
2520
|
}
|
|
2518
2521
|
),
|
|
2519
|
-
tokenDropdownOpen && /* @__PURE__ */ jsx11("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */
|
|
2522
|
+
tokenDropdownOpen && /* @__PURE__ */ jsx11("div", { className: "rs-deposit-address-dropdown-menu", children: tokensForChain.map((symbol) => /* @__PURE__ */ jsxs9(
|
|
2520
2523
|
"button",
|
|
2521
2524
|
{
|
|
2522
2525
|
type: "button",
|
|
@@ -2534,12 +2537,12 @@ function DepositAddressStep({
|
|
|
2534
2537
|
)) })
|
|
2535
2538
|
] })
|
|
2536
2539
|
] }),
|
|
2537
|
-
/* @__PURE__ */
|
|
2540
|
+
/* @__PURE__ */ jsxs9(
|
|
2538
2541
|
"div",
|
|
2539
2542
|
{
|
|
2540
2543
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
2541
2544
|
children: [
|
|
2542
|
-
/* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-deposit-address-well", children: [
|
|
2543
2546
|
/* @__PURE__ */ jsx11("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx11(
|
|
2544
2547
|
Suspense,
|
|
2545
2548
|
{
|
|
@@ -2549,7 +2552,7 @@ function DepositAddressStep({
|
|
|
2549
2552
|
) }),
|
|
2550
2553
|
/* @__PURE__ */ jsx11("div", { className: "rs-deposit-address-value", children: displayAddress })
|
|
2551
2554
|
] }),
|
|
2552
|
-
/* @__PURE__ */
|
|
2555
|
+
/* @__PURE__ */ jsxs9(
|
|
2553
2556
|
"button",
|
|
2554
2557
|
{
|
|
2555
2558
|
type: "button",
|
|
@@ -2564,12 +2567,12 @@ function DepositAddressStep({
|
|
|
2564
2567
|
]
|
|
2565
2568
|
}
|
|
2566
2569
|
),
|
|
2567
|
-
/* @__PURE__ */
|
|
2570
|
+
/* @__PURE__ */ jsxs9(
|
|
2568
2571
|
"div",
|
|
2569
2572
|
{
|
|
2570
2573
|
className: `rs-price-impact ${priceImpactExpanded ? "rs-price-impact--open" : ""}`,
|
|
2571
2574
|
children: [
|
|
2572
|
-
/* @__PURE__ */
|
|
2575
|
+
/* @__PURE__ */ jsxs9(
|
|
2573
2576
|
"button",
|
|
2574
2577
|
{
|
|
2575
2578
|
type: "button",
|
|
@@ -2577,7 +2580,7 @@ function DepositAddressStep({
|
|
|
2577
2580
|
onClick: () => setPriceImpactExpanded((v) => !v),
|
|
2578
2581
|
"aria-expanded": priceImpactExpanded,
|
|
2579
2582
|
children: [
|
|
2580
|
-
/* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-price-impact-header-left", children: [
|
|
2581
2584
|
/* @__PURE__ */ jsx11("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2582
2585
|
/* @__PURE__ */ jsx11("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx11("strong", { children: "0.00%" }) }),
|
|
2583
2586
|
/* @__PURE__ */ jsx11(
|
|
@@ -2599,10 +2602,10 @@ function DepositAddressStep({
|
|
|
2599
2602
|
]
|
|
2600
2603
|
}
|
|
2601
2604
|
),
|
|
2602
|
-
/* @__PURE__ */ jsx11("div", { className: "rs-price-impact-panel", children: /* @__PURE__ */
|
|
2603
|
-
/* @__PURE__ */
|
|
2605
|
+
/* @__PURE__ */ jsx11("div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ jsxs9("div", { className: "rs-price-impact-panel-inner", children: [
|
|
2606
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-price-impact-row", children: [
|
|
2604
2607
|
/* @__PURE__ */ jsx11("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx11(PercentIcon, {}) }),
|
|
2605
|
-
/* @__PURE__ */
|
|
2608
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-price-impact-label", children: [
|
|
2606
2609
|
"Max slippage: ",
|
|
2607
2610
|
/* @__PURE__ */ jsx11("strong", { children: "0.2%" })
|
|
2608
2611
|
] }),
|
|
@@ -2615,16 +2618,16 @@ function DepositAddressStep({
|
|
|
2615
2618
|
}
|
|
2616
2619
|
)
|
|
2617
2620
|
] }),
|
|
2618
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__PURE__ */ jsxs9("div", { className: "rs-price-impact-row", children: [
|
|
2619
2622
|
/* @__PURE__ */ jsx11("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx11(ClockIcon, {}) }),
|
|
2620
|
-
/* @__PURE__ */
|
|
2623
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-price-impact-label", children: [
|
|
2621
2624
|
"Processing time: ",
|
|
2622
2625
|
/* @__PURE__ */ jsx11("strong", { children: "< 1 min" })
|
|
2623
2626
|
] })
|
|
2624
2627
|
] }),
|
|
2625
|
-
liquidityHelper.kind !== "idle" && /* @__PURE__ */
|
|
2628
|
+
liquidityHelper.kind !== "idle" && /* @__PURE__ */ jsxs9("div", { className: "rs-price-impact-row", children: [
|
|
2626
2629
|
/* @__PURE__ */ jsx11("span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ jsx11(PlusCircleIcon, {}) }),
|
|
2627
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ jsxs9("span", { className: "rs-price-impact-label", children: [
|
|
2628
2631
|
"Max deposit:",
|
|
2629
2632
|
" ",
|
|
2630
2633
|
/* @__PURE__ */ jsx11("strong", { children: liquidityHelper.kind === "max" ? `${formatUnits3(
|
|
@@ -2680,11 +2683,11 @@ function isSwappedWidgetUrlFresh(res, now = Date.now()) {
|
|
|
2680
2683
|
import { useState as useState7, useEffect as useEffect7, useRef as useRef6, useMemo as useMemo4 } from "react";
|
|
2681
2684
|
|
|
2682
2685
|
// src/components/steps/FinalisingDepositStep.tsx
|
|
2683
|
-
import { jsx as jsx12, jsxs as
|
|
2686
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2684
2687
|
function FinalisingDepositStep() {
|
|
2685
|
-
return /* @__PURE__ */
|
|
2686
|
-
/* @__PURE__ */
|
|
2687
|
-
/* @__PURE__ */
|
|
2688
|
+
return /* @__PURE__ */ jsxs10("div", { className: "rs-screen rs-finalising", children: [
|
|
2689
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-screen-body rs-finalising-body", children: [
|
|
2690
|
+
/* @__PURE__ */ jsxs10(
|
|
2688
2691
|
"svg",
|
|
2689
2692
|
{
|
|
2690
2693
|
className: "rs-finalising-spinner",
|
|
@@ -2697,7 +2700,7 @@ function FinalisingDepositStep() {
|
|
|
2697
2700
|
]
|
|
2698
2701
|
}
|
|
2699
2702
|
),
|
|
2700
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ jsxs10("div", { className: "rs-finalising-text", children: [
|
|
2701
2704
|
/* @__PURE__ */ jsx12("h2", { className: "rs-finalising-title", children: "Finalising deposit" }),
|
|
2702
2705
|
/* @__PURE__ */ jsx12("p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
2703
2706
|
] })
|
|
@@ -2708,7 +2711,7 @@ function FinalisingDepositStep() {
|
|
|
2708
2711
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
2709
2712
|
|
|
2710
2713
|
// src/components/steps/SwappedOrderTracker.tsx
|
|
2711
|
-
import { jsx as jsx13, jsxs as
|
|
2714
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2712
2715
|
var STEP_LABELS = [
|
|
2713
2716
|
"Payment received",
|
|
2714
2717
|
null,
|
|
@@ -2730,12 +2733,12 @@ function SwappedOrderTracker({
|
|
|
2730
2733
|
STEP_LABELS[2],
|
|
2731
2734
|
STEP_LABELS[3]
|
|
2732
2735
|
];
|
|
2733
|
-
return /* @__PURE__ */
|
|
2734
|
-
/* @__PURE__ */
|
|
2736
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
2737
|
+
/* @__PURE__ */ jsxs11("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2735
2738
|
/* @__PURE__ */ jsx13(BodyHeader, { icon: /* @__PURE__ */ jsx13(HandCoinsIcon, {}), title }),
|
|
2736
2739
|
/* @__PURE__ */ jsx13("ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
2737
2740
|
const status = stepStates[idx];
|
|
2738
|
-
return /* @__PURE__ */
|
|
2741
|
+
return /* @__PURE__ */ jsxs11(
|
|
2739
2742
|
"li",
|
|
2740
2743
|
{
|
|
2741
2744
|
className: `rs-swapped-tracker-step rs-swapped-tracker-step--${status}`,
|
|
@@ -2762,7 +2765,7 @@ function SwappedOrderTracker({
|
|
|
2762
2765
|
label
|
|
2763
2766
|
);
|
|
2764
2767
|
}) }),
|
|
2765
|
-
terminal && /* @__PURE__ */
|
|
2768
|
+
terminal && /* @__PURE__ */ jsxs11(
|
|
2766
2769
|
"div",
|
|
2767
2770
|
{
|
|
2768
2771
|
className: `rs-swapped-tracker-terminal rs-swapped-tracker-terminal--${terminal.kind}`,
|
|
@@ -2793,7 +2796,7 @@ function formatTrackerAmount(amount) {
|
|
|
2793
2796
|
SwappedOrderTracker.displayName = "SwappedOrderTracker";
|
|
2794
2797
|
|
|
2795
2798
|
// src/components/steps/SwappedIframeStep.tsx
|
|
2796
|
-
import { jsx as jsx14, jsxs as
|
|
2799
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2797
2800
|
var STATUS_POLL_INTERVAL_MS = 2e3;
|
|
2798
2801
|
var DEPOSIT_POLL_INTERVAL_MS = 2e3;
|
|
2799
2802
|
var DEPOSIT_POLL_FAST_INITIAL_DELAY_MS = 1e3;
|
|
@@ -3139,9 +3142,9 @@ function SwappedIframeStep({
|
|
|
3139
3142
|
}
|
|
3140
3143
|
);
|
|
3141
3144
|
}
|
|
3142
|
-
return /* @__PURE__ */
|
|
3143
|
-
/* @__PURE__ */ jsx14("div", { className: "rs-screen-body rs-fiat-onramp-body", children: /* @__PURE__ */
|
|
3144
|
-
loadError && /* @__PURE__ */
|
|
3145
|
+
return /* @__PURE__ */ jsxs12("div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
3146
|
+
/* @__PURE__ */ jsx14("div", { className: "rs-screen-body rs-fiat-onramp-body", children: /* @__PURE__ */ jsxs12("div", { className: "rs-fiat-onramp-iframe-wrap", children: [
|
|
3147
|
+
loadError && /* @__PURE__ */ jsxs12("div", { className: "rs-fiat-onramp-error", children: [
|
|
3145
3148
|
/* @__PURE__ */ jsx14("div", { children: loadError }),
|
|
3146
3149
|
/* @__PURE__ */ jsx14(
|
|
3147
3150
|
"button",
|
|
@@ -3366,7 +3369,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
3366
3369
|
|
|
3367
3370
|
// src/components/steps/ExchangeSelectStep.tsx
|
|
3368
3371
|
import { useCallback as useCallback5, useEffect as useEffect8, useState as useState8 } from "react";
|
|
3369
|
-
import { jsx as jsx17, jsxs as
|
|
3372
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3370
3373
|
function ExchangeLogo({ exchange }) {
|
|
3371
3374
|
const [failed, setFailed] = useState8(false);
|
|
3372
3375
|
if (!exchange.logoUrl || failed) {
|
|
@@ -3448,8 +3451,8 @@ function ExchangeSelectStep({
|
|
|
3448
3451
|
},
|
|
3449
3452
|
[exchangeFeeBps, onError, onSelectExchange]
|
|
3450
3453
|
);
|
|
3451
|
-
return /* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3454
|
+
return /* @__PURE__ */ jsxs13("div", { className: "rs-screen rs-exchange-select", children: [
|
|
3455
|
+
/* @__PURE__ */ jsxs13("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3453
3456
|
/* @__PURE__ */ jsx17(
|
|
3454
3457
|
BodyHeader,
|
|
3455
3458
|
{
|
|
@@ -3459,7 +3462,7 @@ function ExchangeSelectStep({
|
|
|
3459
3462
|
}
|
|
3460
3463
|
),
|
|
3461
3464
|
loading && /* @__PURE__ */ jsx17("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ jsx17(Spinner, {}) }),
|
|
3462
|
-
!loading && error && /* @__PURE__ */
|
|
3465
|
+
!loading && error && /* @__PURE__ */ jsxs13("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
3463
3466
|
/* @__PURE__ */ jsx17("div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
3464
3467
|
/* @__PURE__ */ jsx17(
|
|
3465
3468
|
"button",
|
|
@@ -3471,7 +3474,7 @@ function ExchangeSelectStep({
|
|
|
3471
3474
|
}
|
|
3472
3475
|
)
|
|
3473
3476
|
] }),
|
|
3474
|
-
!loading && !error && exchanges.length === 0 && /* @__PURE__ */
|
|
3477
|
+
!loading && !error && exchanges.length === 0 && /* @__PURE__ */ jsxs13("div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
3475
3478
|
/* @__PURE__ */ jsx17("div", { className: "rs-exchange-select-state-title", children: "No exchanges available" }),
|
|
3476
3479
|
/* @__PURE__ */ jsx17(
|
|
3477
3480
|
"button",
|
|
@@ -3485,7 +3488,7 @@ function ExchangeSelectStep({
|
|
|
3485
3488
|
] }),
|
|
3486
3489
|
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ jsx17("div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
3487
3490
|
const brand = getExchangeLogo(exchange.name, exchange.connection);
|
|
3488
|
-
return /* @__PURE__ */
|
|
3491
|
+
return /* @__PURE__ */ jsxs13(
|
|
3489
3492
|
"button",
|
|
3490
3493
|
{
|
|
3491
3494
|
type: "button",
|
|
@@ -3510,7 +3513,7 @@ function ExchangeSelectStep({
|
|
|
3510
3513
|
}) })
|
|
3511
3514
|
] }),
|
|
3512
3515
|
/* @__PURE__ */ jsx17(PoweredBy, {}),
|
|
3513
|
-
exchangeFeeBps > 0 && /* @__PURE__ */
|
|
3516
|
+
exchangeFeeBps > 0 && /* @__PURE__ */ jsxs13("p", { className: "rs-exchange-select-fee-note", children: [
|
|
3514
3517
|
"A ",
|
|
3515
3518
|
formatFeeRate(exchangeFeeBps),
|
|
3516
3519
|
" Exchange Fee applies to your deposit."
|
|
@@ -3521,7 +3524,7 @@ function ExchangeSelectStep({
|
|
|
3521
3524
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
3522
3525
|
|
|
3523
3526
|
// src/components/steps/DepositAddressSkeleton.tsx
|
|
3524
|
-
import { jsx as jsx18, jsxs as
|
|
3527
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3525
3528
|
var BASE_CHAIN_ID = 8453;
|
|
3526
3529
|
function DepositAddressSkeleton({
|
|
3527
3530
|
uiConfig
|
|
@@ -3532,14 +3535,14 @@ function DepositAddressSkeleton({
|
|
|
3532
3535
|
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : tokensForChain[0] ?? "USDC";
|
|
3533
3536
|
const chainName = getChainName(defaultChainId);
|
|
3534
3537
|
const chainIcon = getChainIcon(defaultChainId);
|
|
3535
|
-
return /* @__PURE__ */
|
|
3538
|
+
return /* @__PURE__ */ jsxs14("div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
3536
3539
|
/* @__PURE__ */ jsx18("span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
3537
|
-
/* @__PURE__ */
|
|
3540
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-screen-body", children: [
|
|
3538
3541
|
/* @__PURE__ */ jsx18(BodyHeader, { icon: /* @__PURE__ */ jsx18(TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
3539
|
-
/* @__PURE__ */
|
|
3540
|
-
/* @__PURE__ */
|
|
3542
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
3543
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown", children: [
|
|
3541
3544
|
/* @__PURE__ */ jsx18("div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
3542
|
-
/* @__PURE__ */
|
|
3545
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3543
3546
|
/* @__PURE__ */ jsx18(
|
|
3544
3547
|
CdnIcon,
|
|
3545
3548
|
{
|
|
@@ -3551,10 +3554,10 @@ function DepositAddressSkeleton({
|
|
|
3551
3554
|
/* @__PURE__ */ jsx18(ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3552
3555
|
] })
|
|
3553
3556
|
] }),
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
/* @__PURE__ */
|
|
3557
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown", children: [
|
|
3558
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
3556
3559
|
/* @__PURE__ */ jsx18("span", { children: "Supported token" }),
|
|
3557
|
-
/* @__PURE__ */
|
|
3560
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-deposit-address-min", children: [
|
|
3558
3561
|
"Min.$",
|
|
3559
3562
|
(uiConfig?.minDepositUsd ?? 0.1).toFixed(2),
|
|
3560
3563
|
/* @__PURE__ */ jsx18(Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ jsx18(
|
|
@@ -3566,7 +3569,7 @@ function DepositAddressSkeleton({
|
|
|
3566
3569
|
) })
|
|
3567
3570
|
] })
|
|
3568
3571
|
] }),
|
|
3569
|
-
/* @__PURE__ */
|
|
3572
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3570
3573
|
/* @__PURE__ */ jsx18(
|
|
3571
3574
|
TokenIcon,
|
|
3572
3575
|
{
|
|
@@ -3579,16 +3582,16 @@ function DepositAddressSkeleton({
|
|
|
3579
3582
|
] })
|
|
3580
3583
|
] })
|
|
3581
3584
|
] }),
|
|
3582
|
-
/* @__PURE__ */
|
|
3585
|
+
/* @__PURE__ */ jsxs14(
|
|
3583
3586
|
"div",
|
|
3584
3587
|
{
|
|
3585
3588
|
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
3586
3589
|
children: [
|
|
3587
|
-
/* @__PURE__ */
|
|
3590
|
+
/* @__PURE__ */ jsxs14("div", { className: "rs-deposit-address-well", children: [
|
|
3588
3591
|
/* @__PURE__ */ jsx18("div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ jsx18("div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
3589
3592
|
/* @__PURE__ */ jsx18("div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
3590
3593
|
] }),
|
|
3591
|
-
/* @__PURE__ */
|
|
3594
|
+
/* @__PURE__ */ jsxs14(
|
|
3592
3595
|
"button",
|
|
3593
3596
|
{
|
|
3594
3597
|
type: "button",
|
|
@@ -3604,8 +3607,8 @@ function DepositAddressSkeleton({
|
|
|
3604
3607
|
]
|
|
3605
3608
|
}
|
|
3606
3609
|
),
|
|
3607
|
-
/* @__PURE__ */ jsx18("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3610
|
+
/* @__PURE__ */ jsx18("div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ jsxs14("div", { className: "rs-price-impact-header", children: [
|
|
3611
|
+
/* @__PURE__ */ jsxs14("span", { className: "rs-price-impact-header-left", children: [
|
|
3609
3612
|
/* @__PURE__ */ jsx18("span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
3610
3613
|
/* @__PURE__ */ jsx18("span", { className: "rs-price-impact-label", children: /* @__PURE__ */ jsx18("strong", { children: "0.00%" }) }),
|
|
3611
3614
|
/* @__PURE__ */ jsx18(
|
|
@@ -3634,7 +3637,7 @@ DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
|
3634
3637
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
3635
3638
|
import { useState as useState9, useEffect as useEffect9, useMemo as useMemo5 } from "react";
|
|
3636
3639
|
import { formatUnits as formatUnits4 } from "viem";
|
|
3637
|
-
import { jsx as jsx19, jsxs as
|
|
3640
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3638
3641
|
function SolanaTokenSelectStep({
|
|
3639
3642
|
solanaAddress,
|
|
3640
3643
|
service,
|
|
@@ -3740,8 +3743,8 @@ function SolanaTokenSelectStep({
|
|
|
3740
3743
|
};
|
|
3741
3744
|
const chainIcon = getChainIcon("solana");
|
|
3742
3745
|
const chainName = getChainName("solana");
|
|
3743
|
-
return /* @__PURE__ */
|
|
3744
|
-
/* @__PURE__ */
|
|
3746
|
+
return /* @__PURE__ */ jsxs15("div", { className: "rs-screen", children: [
|
|
3747
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-screen-body", children: [
|
|
3745
3748
|
/* @__PURE__ */ jsx19(
|
|
3746
3749
|
BodyHeader,
|
|
3747
3750
|
{
|
|
@@ -3750,15 +3753,15 @@ function SolanaTokenSelectStep({
|
|
|
3750
3753
|
subtitle: "Select source assets to transfer"
|
|
3751
3754
|
}
|
|
3752
3755
|
),
|
|
3753
|
-
loading && /* @__PURE__ */
|
|
3756
|
+
loading && /* @__PURE__ */ jsxs15("div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
3754
3757
|
/* @__PURE__ */ jsx19(Spinner, { className: "rs-text-tertiary" }),
|
|
3755
3758
|
/* @__PURE__ */ jsx19("span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
3756
3759
|
] }),
|
|
3757
3760
|
error && /* @__PURE__ */ jsx19(Callout, { variant: "error", children: error }),
|
|
3758
|
-
!loading && !error && rows.length === 0 && /* @__PURE__ */
|
|
3761
|
+
!loading && !error && rows.length === 0 && /* @__PURE__ */ jsxs15("div", { className: "rs-empty-state", children: [
|
|
3759
3762
|
/* @__PURE__ */ jsx19(WalletIcon, { className: "rs-empty-icon" }),
|
|
3760
3763
|
/* @__PURE__ */ jsx19("div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
3761
|
-
/* @__PURE__ */
|
|
3764
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-empty-address", children: [
|
|
3762
3765
|
solanaAddress.slice(0, 6),
|
|
3763
3766
|
"...",
|
|
3764
3767
|
solanaAddress.slice(-4)
|
|
@@ -3776,7 +3779,7 @@ function SolanaTokenSelectStep({
|
|
|
3776
3779
|
!loading && !error && rows.length > 0 && /* @__PURE__ */ jsx19("div", { className: "rs-asset-list", children: rows.map((entry) => {
|
|
3777
3780
|
const isSelected = selectedSymbol === entry.token.symbol;
|
|
3778
3781
|
const tokenAmount = formatBalance(entry);
|
|
3779
|
-
return /* @__PURE__ */
|
|
3782
|
+
return /* @__PURE__ */ jsxs15(
|
|
3780
3783
|
"button",
|
|
3781
3784
|
{
|
|
3782
3785
|
type: "button",
|
|
@@ -3784,8 +3787,8 @@ function SolanaTokenSelectStep({
|
|
|
3784
3787
|
className: `rs-asset-row ${isSelected ? "rs-asset-row--selected" : ""}`,
|
|
3785
3788
|
"aria-pressed": isSelected,
|
|
3786
3789
|
children: [
|
|
3787
|
-
/* @__PURE__ */
|
|
3788
|
-
/* @__PURE__ */
|
|
3790
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-info", children: [
|
|
3791
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-icon-wrapper", children: [
|
|
3789
3792
|
/* @__PURE__ */ jsx19("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx19(
|
|
3790
3793
|
TokenIcon,
|
|
3791
3794
|
{
|
|
@@ -3795,15 +3798,15 @@ function SolanaTokenSelectStep({
|
|
|
3795
3798
|
) }),
|
|
3796
3799
|
chainIcon && /* @__PURE__ */ jsx19("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx19(CdnIcon, { src: chainIcon, alt: chainName }) })
|
|
3797
3800
|
] }),
|
|
3798
|
-
/* @__PURE__ */
|
|
3799
|
-
/* @__PURE__ */
|
|
3801
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-text", children: [
|
|
3802
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-name-row", children: [
|
|
3800
3803
|
/* @__PURE__ */ jsx19("span", { className: "rs-asset-name", children: entry.token.symbol }),
|
|
3801
|
-
/* @__PURE__ */
|
|
3804
|
+
/* @__PURE__ */ jsxs15("span", { className: "rs-asset-chain", children: [
|
|
3802
3805
|
"on ",
|
|
3803
3806
|
chainName
|
|
3804
3807
|
] })
|
|
3805
3808
|
] }),
|
|
3806
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ jsxs15("div", { className: "rs-asset-balance-small", children: [
|
|
3807
3810
|
tokenAmount,
|
|
3808
3811
|
" ",
|
|
3809
3812
|
entry.token.symbol
|
|
@@ -3837,7 +3840,7 @@ function SolanaTokenSelectStep({
|
|
|
3837
3840
|
// src/components/steps/SolanaAmountStep.tsx
|
|
3838
3841
|
import { useCallback as useCallback6, useEffect as useEffect10, useMemo as useMemo6, useRef as useRef7, useState as useState10 } from "react";
|
|
3839
3842
|
import { formatUnits as formatUnits5, parseUnits as parseUnits3 } from "viem";
|
|
3840
|
-
import { Fragment as Fragment4, jsx as jsx20, jsxs as
|
|
3843
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3841
3844
|
var SOL_FEE_RESERVE_LAMPORTS = 1000000n;
|
|
3842
3845
|
var PRESETS2 = [
|
|
3843
3846
|
{ value: 25, label: "25%" },
|
|
@@ -4036,11 +4039,11 @@ function SolanaAmountStep({
|
|
|
4036
4039
|
};
|
|
4037
4040
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
4038
4041
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
4039
|
-
return /* @__PURE__ */
|
|
4040
|
-
/* @__PURE__ */
|
|
4042
|
+
return /* @__PURE__ */ jsxs16("div", { className: "rs-screen", children: [
|
|
4043
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4041
4044
|
/* @__PURE__ */ jsx20(BodyHeader, { icon: /* @__PURE__ */ jsx20(WalletIcon, {}), title: "Wallet deposit" }),
|
|
4042
|
-
/* @__PURE__ */
|
|
4043
|
-
/* @__PURE__ */
|
|
4045
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-section", children: [
|
|
4046
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-display", children: [
|
|
4044
4047
|
/* @__PURE__ */ jsx20(
|
|
4045
4048
|
AnimatedAmountInput,
|
|
4046
4049
|
{
|
|
@@ -4050,19 +4053,19 @@ function SolanaAmountStep({
|
|
|
4050
4053
|
autoFocus: true
|
|
4051
4054
|
}
|
|
4052
4055
|
),
|
|
4053
|
-
/* @__PURE__ */
|
|
4054
|
-
/* @__PURE__ */
|
|
4056
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-meta", children: [
|
|
4057
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-amount-meta-balance", children: [
|
|
4055
4058
|
formattedBalance,
|
|
4056
4059
|
" ",
|
|
4057
4060
|
token.symbol,
|
|
4058
4061
|
" available",
|
|
4059
|
-
computedBalanceUsd !== null && /* @__PURE__ */
|
|
4062
|
+
computedBalanceUsd !== null && /* @__PURE__ */ jsxs16(Fragment4, { children: [
|
|
4060
4063
|
" (~",
|
|
4061
4064
|
currencyFormatter.format(computedBalanceUsd),
|
|
4062
4065
|
")"
|
|
4063
4066
|
] })
|
|
4064
4067
|
] }),
|
|
4065
|
-
minDepositUsd !== null && /* @__PURE__ */
|
|
4068
|
+
minDepositUsd !== null && /* @__PURE__ */ jsxs16("span", { className: "rs-amount-meta-minimum", children: [
|
|
4066
4069
|
"Min. deposit ",
|
|
4067
4070
|
currencyFormatter.format(minDepositUsd)
|
|
4068
4071
|
] })
|
|
@@ -4079,21 +4082,21 @@ function SolanaAmountStep({
|
|
|
4079
4082
|
preset.value
|
|
4080
4083
|
)) })
|
|
4081
4084
|
] }),
|
|
4082
|
-
/* @__PURE__ */
|
|
4083
|
-
/* @__PURE__ */
|
|
4085
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-details", children: [
|
|
4086
|
+
/* @__PURE__ */ jsxs16("div", { className: "rs-amount-detail-row", children: [
|
|
4084
4087
|
/* @__PURE__ */ jsx20("span", { children: "You send" }),
|
|
4085
|
-
/* @__PURE__ */
|
|
4086
|
-
/* @__PURE__ */
|
|
4088
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-amount-detail-value", children: [
|
|
4089
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
4087
4090
|
"Solana ",
|
|
4088
4091
|
token.symbol
|
|
4089
4092
|
] }),
|
|
4090
4093
|
/* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20(TokenIcon, { symbol: token.symbol }) })
|
|
4091
4094
|
] })
|
|
4092
4095
|
] }),
|
|
4093
|
-
targetChainName && targetTokenSymbol && /* @__PURE__ */
|
|
4096
|
+
targetChainName && targetTokenSymbol && /* @__PURE__ */ jsxs16("div", { className: "rs-amount-detail-row", children: [
|
|
4094
4097
|
/* @__PURE__ */ jsx20("span", { children: "Receive" }),
|
|
4095
|
-
/* @__PURE__ */
|
|
4096
|
-
/* @__PURE__ */
|
|
4098
|
+
/* @__PURE__ */ jsxs16("span", { className: "rs-amount-detail-value", children: [
|
|
4099
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
4097
4100
|
targetChainName,
|
|
4098
4101
|
" ",
|
|
4099
4102
|
targetTokenSymbol
|
|
@@ -4101,7 +4104,7 @@ function SolanaAmountStep({
|
|
|
4101
4104
|
/* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx20(TokenIcon, { symbol: targetTokenSymbol }) })
|
|
4102
4105
|
] })
|
|
4103
4106
|
] }),
|
|
4104
|
-
balanceAfterUsd !== null && /* @__PURE__ */
|
|
4107
|
+
balanceAfterUsd !== null && /* @__PURE__ */ jsxs16("div", { className: "rs-amount-detail-row", children: [
|
|
4105
4108
|
/* @__PURE__ */ jsx20("span", { children: "Balance after deposit" }),
|
|
4106
4109
|
/* @__PURE__ */ jsx20("span", { className: "rs-amount-detail-value", children: currencyFormatter.format(balanceAfterUsd) })
|
|
4107
4110
|
] })
|
|
@@ -4224,7 +4227,7 @@ async function sendSolanaTransaction(provider, _connection, transaction) {
|
|
|
4224
4227
|
}
|
|
4225
4228
|
|
|
4226
4229
|
// src/components/steps/SolanaConfirmStep.tsx
|
|
4227
|
-
import { jsx as jsx21, jsxs as
|
|
4230
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4228
4231
|
function SolanaConfirmStep({
|
|
4229
4232
|
smartAccount,
|
|
4230
4233
|
solanaAddress,
|
|
@@ -4362,37 +4365,37 @@ function SolanaConfirmStep({
|
|
|
4362
4365
|
sourceAmount
|
|
4363
4366
|
});
|
|
4364
4367
|
setError(message);
|
|
4365
|
-
onError?.(message, "SOLANA_TRANSFER_ERROR");
|
|
4368
|
+
onError?.(message, "SOLANA_TRANSFER_ERROR", raw);
|
|
4366
4369
|
} finally {
|
|
4367
4370
|
setIsSubmitting(false);
|
|
4368
4371
|
}
|
|
4369
4372
|
};
|
|
4370
|
-
return /* @__PURE__ */
|
|
4371
|
-
/* @__PURE__ */
|
|
4373
|
+
return /* @__PURE__ */ jsxs17("div", { className: "rs-screen", children: [
|
|
4374
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4372
4375
|
/* @__PURE__ */ jsx21(BodyHeader, { icon: /* @__PURE__ */ jsx21(WalletIcon, {}), title: "Review deposit" }),
|
|
4373
|
-
/* @__PURE__ */
|
|
4374
|
-
/* @__PURE__ */
|
|
4376
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-details", children: [
|
|
4377
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4375
4378
|
/* @__PURE__ */ jsx21("span", { children: "Source chain" }),
|
|
4376
|
-
/* @__PURE__ */
|
|
4379
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4377
4380
|
/* @__PURE__ */ jsx21("span", { children: sourceChainName }),
|
|
4378
4381
|
sourceChainIcon && /* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(CdnIcon, { src: sourceChainIcon }) })
|
|
4379
4382
|
] })
|
|
4380
4383
|
] }),
|
|
4381
|
-
/* @__PURE__ */
|
|
4384
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4382
4385
|
/* @__PURE__ */ jsx21("span", { children: "Destination chain" }),
|
|
4383
|
-
/* @__PURE__ */
|
|
4386
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4384
4387
|
/* @__PURE__ */ jsx21("span", { children: targetChainName }),
|
|
4385
4388
|
targetChainIcon && /* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(CdnIcon, { src: targetChainIcon }) })
|
|
4386
4389
|
] })
|
|
4387
4390
|
] }),
|
|
4388
|
-
/* @__PURE__ */
|
|
4391
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4389
4392
|
/* @__PURE__ */ jsx21("span", { children: "Estimated time" }),
|
|
4390
4393
|
/* @__PURE__ */ jsx21("span", { className: "rs-review-detail-value", children: estimatedTime })
|
|
4391
4394
|
] }),
|
|
4392
|
-
/* @__PURE__ */
|
|
4395
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4393
4396
|
/* @__PURE__ */ jsx21("span", { children: "You send" }),
|
|
4394
|
-
/* @__PURE__ */
|
|
4395
|
-
/* @__PURE__ */
|
|
4397
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4398
|
+
/* @__PURE__ */ jsxs17("span", { children: [
|
|
4396
4399
|
formattedAmount,
|
|
4397
4400
|
" ",
|
|
4398
4401
|
token.symbol
|
|
@@ -4400,16 +4403,16 @@ function SolanaConfirmStep({
|
|
|
4400
4403
|
/* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(TokenIcon, { symbol: token.symbol }) })
|
|
4401
4404
|
] })
|
|
4402
4405
|
] }),
|
|
4403
|
-
/* @__PURE__ */
|
|
4406
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4404
4407
|
/* @__PURE__ */ jsx21("span", { children: "Receive" }),
|
|
4405
|
-
/* @__PURE__ */
|
|
4408
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4406
4409
|
/* @__PURE__ */ jsx21("span", { children: receiveDisplay }),
|
|
4407
4410
|
/* @__PURE__ */ jsx21("span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ jsx21(TokenIcon, { symbol: targetSymbol }) })
|
|
4408
4411
|
] })
|
|
4409
4412
|
] }),
|
|
4410
|
-
/* @__PURE__ */
|
|
4413
|
+
/* @__PURE__ */ jsxs17("div", { className: "rs-review-detail-row", children: [
|
|
4411
4414
|
/* @__PURE__ */ jsx21("span", { children: "Fees" }),
|
|
4412
|
-
/* @__PURE__ */
|
|
4415
|
+
/* @__PURE__ */ jsxs17("span", { className: "rs-review-detail-value", children: [
|
|
4413
4416
|
/* @__PURE__ */ jsx21(
|
|
4414
4417
|
"span",
|
|
4415
4418
|
{
|
|
@@ -4439,15 +4442,15 @@ function SolanaConfirmStep({
|
|
|
4439
4442
|
}
|
|
4440
4443
|
|
|
4441
4444
|
// src/components/steps/DappImportAssetSelectStep.tsx
|
|
4442
|
-
import { jsx as jsx22, jsxs as
|
|
4445
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4443
4446
|
function DappImportAssetSelectStep({
|
|
4444
4447
|
sourceLabel,
|
|
4445
4448
|
assets,
|
|
4446
4449
|
incompleteSummary,
|
|
4447
4450
|
onSelect
|
|
4448
4451
|
}) {
|
|
4449
|
-
return /* @__PURE__ */
|
|
4450
|
-
/* @__PURE__ */
|
|
4452
|
+
return /* @__PURE__ */ jsxs18("div", { className: "rs-screen", children: [
|
|
4453
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4451
4454
|
/* @__PURE__ */ jsx22(
|
|
4452
4455
|
BodyHeader,
|
|
4453
4456
|
{
|
|
@@ -4465,15 +4468,15 @@ function DappImportAssetSelectStep({
|
|
|
4465
4468
|
const assetIcon = asset.icon;
|
|
4466
4469
|
const chainIcon = getChainIcon(asset.chainId);
|
|
4467
4470
|
const badge = getChainBadge(asset.chainId);
|
|
4468
|
-
return /* @__PURE__ */
|
|
4471
|
+
return /* @__PURE__ */ jsxs18(
|
|
4469
4472
|
"button",
|
|
4470
4473
|
{
|
|
4471
4474
|
type: "button",
|
|
4472
4475
|
className: "rs-asset-row",
|
|
4473
4476
|
onClick: () => onSelect(asset),
|
|
4474
4477
|
children: [
|
|
4475
|
-
/* @__PURE__ */
|
|
4476
|
-
/* @__PURE__ */
|
|
4478
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-info", children: [
|
|
4479
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-icon-wrapper", children: [
|
|
4477
4480
|
/* @__PURE__ */ jsx22("span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ jsx22(CdnIcon, { src: assetIcon, alt: asset.symbol }) : /* @__PURE__ */ jsx22(
|
|
4478
4481
|
TokenIcon,
|
|
4479
4482
|
{
|
|
@@ -4490,16 +4493,16 @@ function DappImportAssetSelectStep({
|
|
|
4490
4493
|
}
|
|
4491
4494
|
)
|
|
4492
4495
|
] }),
|
|
4493
|
-
/* @__PURE__ */
|
|
4494
|
-
/* @__PURE__ */
|
|
4496
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-text", children: [
|
|
4497
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-name-row", children: [
|
|
4495
4498
|
/* @__PURE__ */ jsx22("span", { className: "rs-asset-name", children: asset.symbol }),
|
|
4496
|
-
/* @__PURE__ */
|
|
4499
|
+
/* @__PURE__ */ jsxs18("span", { className: "rs-asset-chain", children: [
|
|
4497
4500
|
"on ",
|
|
4498
4501
|
asset.sourceLabel,
|
|
4499
4502
|
asset.qualifier ? ` \xB7 ${asset.qualifier}` : ""
|
|
4500
4503
|
] })
|
|
4501
4504
|
] }),
|
|
4502
|
-
/* @__PURE__ */
|
|
4505
|
+
/* @__PURE__ */ jsxs18("div", { className: "rs-asset-balance-small", children: [
|
|
4503
4506
|
tokenAmount,
|
|
4504
4507
|
" ",
|
|
4505
4508
|
asset.symbol
|
|
@@ -4519,7 +4522,7 @@ function DappImportAssetSelectStep({
|
|
|
4519
4522
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
4520
4523
|
|
|
4521
4524
|
// src/components/steps/DappImportSelectStep.tsx
|
|
4522
|
-
import { jsx as jsx23, jsxs as
|
|
4525
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4523
4526
|
function describeRow(status, comingSoon) {
|
|
4524
4527
|
if (comingSoon) {
|
|
4525
4528
|
return { subtitle: "Coming soon", disabled: true, busy: false };
|
|
@@ -4555,8 +4558,8 @@ function DappImportSelectStep({
|
|
|
4555
4558
|
const byId = new Map(rows.map((row) => [row.id, row.status]));
|
|
4556
4559
|
const enabled = new Set(enabledIds);
|
|
4557
4560
|
const brands = DAPP_IMPORT_CATALOG.filter((brand) => enabled.has(brand.id));
|
|
4558
|
-
return /* @__PURE__ */
|
|
4559
|
-
/* @__PURE__ */
|
|
4561
|
+
return /* @__PURE__ */ jsxs19("div", { className: "rs-screen", children: [
|
|
4562
|
+
/* @__PURE__ */ jsxs19("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4560
4563
|
/* @__PURE__ */ jsx23(
|
|
4561
4564
|
BodyHeader,
|
|
4562
4565
|
{
|
|
@@ -4597,16 +4600,16 @@ function DappImportSelectStep({
|
|
|
4597
4600
|
DappImportSelectStep.displayName = "DappImportSelectStep";
|
|
4598
4601
|
|
|
4599
4602
|
// src/components/steps/DappImportAssetSelectSkeleton.tsx
|
|
4600
|
-
import { jsx as jsx24, jsxs as
|
|
4603
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4601
4604
|
function DappImportAssetSelectSkeleton({
|
|
4602
4605
|
sourceLabel,
|
|
4603
4606
|
rowCount = 3,
|
|
4604
4607
|
error = false,
|
|
4605
4608
|
onRetry
|
|
4606
4609
|
}) {
|
|
4607
|
-
return /* @__PURE__ */
|
|
4610
|
+
return /* @__PURE__ */ jsxs20("div", { className: "rs-screen", "aria-busy": error ? "false" : "true", children: [
|
|
4608
4611
|
/* @__PURE__ */ jsx24("span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
4609
|
-
/* @__PURE__ */
|
|
4612
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4610
4613
|
/* @__PURE__ */ jsx24(
|
|
4611
4614
|
BodyHeader,
|
|
4612
4615
|
{
|
|
@@ -4615,20 +4618,20 @@ function DappImportAssetSelectSkeleton({
|
|
|
4615
4618
|
subtitle: "Pick the balance to import"
|
|
4616
4619
|
}
|
|
4617
4620
|
),
|
|
4618
|
-
error ? /* @__PURE__ */ jsx24("div", { className: "rs-loading-state", children: /* @__PURE__ */
|
|
4621
|
+
error ? /* @__PURE__ */ jsx24("div", { className: "rs-loading-state", children: /* @__PURE__ */ jsxs20("div", { className: "rs-loading-text", children: [
|
|
4619
4622
|
/* @__PURE__ */ jsx24("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t load your balances" }),
|
|
4620
4623
|
/* @__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__ */
|
|
4624
|
+
] }) }) : /* @__PURE__ */ jsx24("div", { className: "rs-asset-list", "aria-hidden": "true", children: Array.from({ length: rowCount }, (_, index) => /* @__PURE__ */ jsxs20(
|
|
4622
4625
|
"div",
|
|
4623
4626
|
{
|
|
4624
4627
|
className: "rs-asset-row rs-asset-row--skeleton",
|
|
4625
4628
|
children: [
|
|
4626
|
-
/* @__PURE__ */
|
|
4627
|
-
/* @__PURE__ */
|
|
4629
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-asset-info", children: [
|
|
4630
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-asset-icon-wrapper", children: [
|
|
4628
4631
|
/* @__PURE__ */ jsx24("span", { className: "rs-asset-icon", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-fill" }) }),
|
|
4629
4632
|
/* @__PURE__ */ jsx24("span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-fill" }) })
|
|
4630
4633
|
] }),
|
|
4631
|
-
/* @__PURE__ */
|
|
4634
|
+
/* @__PURE__ */ jsxs20("div", { className: "rs-asset-text", children: [
|
|
4632
4635
|
/* @__PURE__ */ jsx24("div", { className: "rs-asset-name-row", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--name" }) }),
|
|
4633
4636
|
/* @__PURE__ */ jsx24("div", { className: "rs-asset-balance-small", children: /* @__PURE__ */ jsx24("span", { className: "rs-skeleton rs-skeleton-text rs-skeleton-text--balance" }) })
|
|
4634
4637
|
] })
|
|
@@ -6186,7 +6189,7 @@ function useDepositStore(selector) {
|
|
|
6186
6189
|
}
|
|
6187
6190
|
|
|
6188
6191
|
// src/DepositFlow.tsx
|
|
6189
|
-
import { Fragment as Fragment5, jsx as jsx25, jsxs as
|
|
6192
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6190
6193
|
function swappedWidgetPrefetchKey(method, methodSelectionSource) {
|
|
6191
6194
|
return JSON.stringify([methodSelectionSource ?? null, method ?? null]);
|
|
6192
6195
|
}
|
|
@@ -6194,8 +6197,8 @@ function AccountPreparingSkeleton({
|
|
|
6194
6197
|
errorMessage,
|
|
6195
6198
|
onRetry
|
|
6196
6199
|
}) {
|
|
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__ */
|
|
6200
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-step", children: [
|
|
6201
|
+
/* @__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
6202
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-title rs-text-error", children: "Couldn\u2019t prepare account" }),
|
|
6200
6203
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-subtitle", children: errorMessage })
|
|
6201
6204
|
] }) : /* @__PURE__ */ jsx25("div", { className: "rs-loading-title", children: "Preparing\u2026" }) }) }) }),
|
|
@@ -7839,9 +7842,9 @@ function DepositFlow({
|
|
|
7839
7842
|
[logFlowError, onLifecycleRef]
|
|
7840
7843
|
);
|
|
7841
7844
|
const handleError = useCallback7(
|
|
7842
|
-
(message, code) => {
|
|
7843
|
-
logFlowError("flow:error", message, { code });
|
|
7844
|
-
onErrorRef.current?.({ message, code });
|
|
7845
|
+
(message, code, cause) => {
|
|
7846
|
+
logFlowError("flow:error", cause ?? message, { code });
|
|
7847
|
+
onErrorRef.current?.({ message, code, cause });
|
|
7845
7848
|
},
|
|
7846
7849
|
[logFlowError, onErrorRef]
|
|
7847
7850
|
);
|
|
@@ -7955,7 +7958,7 @@ function DepositFlow({
|
|
|
7955
7958
|
) });
|
|
7956
7959
|
}
|
|
7957
7960
|
if (isDepositAddressMode) {
|
|
7958
|
-
return /* @__PURE__ */
|
|
7961
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-modal-body", children: [
|
|
7959
7962
|
effectiveStep.type === "setup" && (activeEntry.status === "error" ? /* @__PURE__ */ jsx25(
|
|
7960
7963
|
AccountPreparingSkeleton,
|
|
7961
7964
|
{
|
|
@@ -7998,7 +8001,7 @@ function DepositFlow({
|
|
|
7998
8001
|
] });
|
|
7999
8002
|
}
|
|
8000
8003
|
if (isFiatOnrampMode) {
|
|
8001
|
-
return /* @__PURE__ */
|
|
8004
|
+
return /* @__PURE__ */ jsxs21(
|
|
8002
8005
|
"div",
|
|
8003
8006
|
{
|
|
8004
8007
|
className: "rs-modal-body",
|
|
@@ -8063,7 +8066,7 @@ function DepositFlow({
|
|
|
8063
8066
|
);
|
|
8064
8067
|
}
|
|
8065
8068
|
if (isExchangeConnectMode) {
|
|
8066
|
-
return /* @__PURE__ */
|
|
8069
|
+
return /* @__PURE__ */ jsxs21(
|
|
8067
8070
|
"div",
|
|
8068
8071
|
{
|
|
8069
8072
|
className: "rs-modal-body",
|
|
@@ -8137,7 +8140,7 @@ function DepositFlow({
|
|
|
8137
8140
|
if (isSolanaWalletMode) {
|
|
8138
8141
|
const solanaAddr = reownWallet?.solanaAddress;
|
|
8139
8142
|
const solanaProvider = reownWallet?.solanaProvider;
|
|
8140
|
-
return /* @__PURE__ */
|
|
8143
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-modal-body", children: [
|
|
8141
8144
|
effectiveStep.type === "setup" && /* @__PURE__ */ jsx25(
|
|
8142
8145
|
AccountPreparingSkeleton,
|
|
8143
8146
|
{
|
|
@@ -8196,8 +8199,8 @@ function DepositFlow({
|
|
|
8196
8199
|
onError: handleError,
|
|
8197
8200
|
debug
|
|
8198
8201
|
}
|
|
8199
|
-
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */
|
|
8200
|
-
/* @__PURE__ */
|
|
8202
|
+
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */ jsxs21("div", { className: "rs-step", children: [
|
|
8203
|
+
/* @__PURE__ */ jsxs21("div", { className: "rs-loading-state", children: [
|
|
8201
8204
|
/* @__PURE__ */ jsx25("div", { className: "rs-step-icon rs-step-icon--error", children: /* @__PURE__ */ jsx25(
|
|
8202
8205
|
"svg",
|
|
8203
8206
|
{
|
|
@@ -8215,7 +8218,7 @@ function DepositFlow({
|
|
|
8215
8218
|
)
|
|
8216
8219
|
}
|
|
8217
8220
|
) }),
|
|
8218
|
-
/* @__PURE__ */
|
|
8221
|
+
/* @__PURE__ */ jsxs21("div", { className: "rs-loading-text", children: [
|
|
8219
8222
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-title rs-text-error", children: "Wallet disconnected" }),
|
|
8220
8223
|
/* @__PURE__ */ jsx25("div", { className: "rs-loading-subtitle", children: "Please reconnect your Solana wallet to continue." })
|
|
8221
8224
|
] })
|
|
@@ -8320,7 +8323,7 @@ function DepositFlow({
|
|
|
8320
8323
|
}
|
|
8321
8324
|
return getPublicClient(chainId, rpcUrls);
|
|
8322
8325
|
};
|
|
8323
|
-
return /* @__PURE__ */
|
|
8326
|
+
return /* @__PURE__ */ jsxs21("div", { className: "rs-modal-body", children: [
|
|
8324
8327
|
effectiveStep.type === "setup" && /* @__PURE__ */ jsx25(
|
|
8325
8328
|
AccountPreparingSkeleton,
|
|
8326
8329
|
{
|
|
@@ -8461,7 +8464,7 @@ function DepositFlow({
|
|
|
8461
8464
|
|
|
8462
8465
|
// src/components/history/DepositHistoryPanel.tsx
|
|
8463
8466
|
import { useCallback as useCallback8, useMemo as useMemo8, useState as useState13 } from "react";
|
|
8464
|
-
import { jsx as jsx26, jsxs as
|
|
8467
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
8465
8468
|
function shortenHash(hash) {
|
|
8466
8469
|
if (hash.length <= 14) return hash;
|
|
8467
8470
|
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
@@ -8591,7 +8594,7 @@ function DepositHistoryPanel({
|
|
|
8591
8594
|
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
8592
8595
|
);
|
|
8593
8596
|
}, [deposits]);
|
|
8594
|
-
return /* @__PURE__ */
|
|
8597
|
+
return /* @__PURE__ */ jsxs22(
|
|
8595
8598
|
"div",
|
|
8596
8599
|
{
|
|
8597
8600
|
className: "rs-history-panel",
|
|
@@ -8599,7 +8602,7 @@ function DepositHistoryPanel({
|
|
|
8599
8602
|
"aria-label": "Deposit history",
|
|
8600
8603
|
onKeyDown: handleKeyDown,
|
|
8601
8604
|
children: [
|
|
8602
|
-
/* @__PURE__ */
|
|
8605
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-modal-header--redesigned", children: [
|
|
8603
8606
|
/* @__PURE__ */ jsx26("div", { className: "rs-modal-header-nav-left", children: /* @__PURE__ */ jsx26(
|
|
8604
8607
|
"button",
|
|
8605
8608
|
{
|
|
@@ -8621,31 +8624,31 @@ function DepositHistoryPanel({
|
|
|
8621
8624
|
}
|
|
8622
8625
|
) })
|
|
8623
8626
|
] }),
|
|
8624
|
-
/* @__PURE__ */
|
|
8625
|
-
/* @__PURE__ */
|
|
8627
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-screen", children: [
|
|
8628
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-screen-body", children: [
|
|
8626
8629
|
/* @__PURE__ */ jsx26(BodyHeader, { icon: /* @__PURE__ */ jsx26(HistoryIcon, {}), title: "History" }),
|
|
8627
|
-
isLoading && deposits.length === 0 && /* @__PURE__ */
|
|
8630
|
+
isLoading && deposits.length === 0 && /* @__PURE__ */ jsxs22("div", { className: "rs-history-empty", children: [
|
|
8628
8631
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(HistoryIcon, {}) }),
|
|
8629
|
-
/* @__PURE__ */
|
|
8632
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-empty-text", children: [
|
|
8630
8633
|
/* @__PURE__ */ jsx26(Spinner, { className: "rs-spinner--sm" }),
|
|
8631
8634
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
8632
8635
|
] })
|
|
8633
8636
|
] }),
|
|
8634
|
-
error && !isLoading && /* @__PURE__ */
|
|
8637
|
+
error && !isLoading && /* @__PURE__ */ jsxs22("div", { className: "rs-history-empty", children: [
|
|
8635
8638
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(AlertTriangleIcon, {}) }),
|
|
8636
|
-
/* @__PURE__ */
|
|
8639
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-empty-text", children: [
|
|
8637
8640
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
8638
8641
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-hint", children: error })
|
|
8639
8642
|
] })
|
|
8640
8643
|
] }),
|
|
8641
|
-
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */
|
|
8644
|
+
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ jsxs22("div", { className: "rs-history-empty", children: [
|
|
8642
8645
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsx26(HistoryIcon, {}) }),
|
|
8643
|
-
/* @__PURE__ */
|
|
8646
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-empty-text", children: [
|
|
8644
8647
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
8645
8648
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
8646
8649
|
] })
|
|
8647
8650
|
] }),
|
|
8648
|
-
visibleDeposits.length > 0 && /* @__PURE__ */
|
|
8651
|
+
visibleDeposits.length > 0 && /* @__PURE__ */ jsxs22("div", { className: "rs-history-list", children: [
|
|
8649
8652
|
visibleDeposits.map((deposit, i) => /* @__PURE__ */ jsx26(HistoryCard, { deposit }, deposit.txHash || i)),
|
|
8650
8653
|
hasMore && /* @__PURE__ */ jsx26(
|
|
8651
8654
|
"button",
|
|
@@ -8685,7 +8688,7 @@ function HistoryCard({ deposit }) {
|
|
|
8685
8688
|
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
8686
8689
|
const srcTxHash = sourceChainId === "hypercore" ? deposit.txHash : deposit.sourceTxHash;
|
|
8687
8690
|
const srcTxUrl = srcTxHash ? getTxExplorerUrl(srcTxHash, sourceChainId) : null;
|
|
8688
|
-
return /* @__PURE__ */
|
|
8691
|
+
return /* @__PURE__ */ jsxs22(
|
|
8689
8692
|
"button",
|
|
8690
8693
|
{
|
|
8691
8694
|
type: "button",
|
|
@@ -8693,38 +8696,38 @@ function HistoryCard({ deposit }) {
|
|
|
8693
8696
|
onClick: () => setExpanded((v) => !v),
|
|
8694
8697
|
"aria-expanded": expanded,
|
|
8695
8698
|
children: [
|
|
8696
|
-
/* @__PURE__ */
|
|
8697
|
-
/* @__PURE__ */
|
|
8699
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-row", children: [
|
|
8700
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-icons", children: [
|
|
8698
8701
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-card-token", children: /* @__PURE__ */ jsx26(TokenIcon, { symbol: sourceSymbol, fallback: sourceSymbol.slice(0, 2) }) }),
|
|
8699
8702
|
sourceChainIcon && /* @__PURE__ */ jsx26("span", { className: "rs-history-card-chain", children: /* @__PURE__ */ jsx26(CdnIcon, { src: sourceChainIcon }) })
|
|
8700
8703
|
] }),
|
|
8701
|
-
/* @__PURE__ */
|
|
8704
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-text", children: [
|
|
8702
8705
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
8703
8706
|
date && /* @__PURE__ */ jsx26("span", { className: "rs-history-card-date", children: date })
|
|
8704
8707
|
] }),
|
|
8705
|
-
/* @__PURE__ */
|
|
8708
|
+
/* @__PURE__ */ jsxs22("div", { className: "rs-history-card-side", children: [
|
|
8706
8709
|
/* @__PURE__ */ jsx26("span", { className: "rs-history-card-amount", children: displayAmount }),
|
|
8707
8710
|
/* @__PURE__ */ jsx26("span", { className: `rs-history-badge rs-history-badge--${status}`, children: STATUS_LABEL[status] })
|
|
8708
8711
|
] })
|
|
8709
8712
|
] }),
|
|
8710
|
-
/* @__PURE__ */ jsx26("div", { className: "rs-history-card-panel", children: /* @__PURE__ */ jsx26("div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */
|
|
8711
|
-
sourceChainName && /* @__PURE__ */
|
|
8713
|
+
/* @__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: [
|
|
8714
|
+
sourceChainName && /* @__PURE__ */ jsxs22("div", { className: "rs-amount-detail-row", children: [
|
|
8712
8715
|
/* @__PURE__ */ jsx26("span", { children: "Source chain" }),
|
|
8713
|
-
/* @__PURE__ */
|
|
8716
|
+
/* @__PURE__ */ jsxs22("span", { className: "rs-amount-detail-value", children: [
|
|
8714
8717
|
/* @__PURE__ */ jsx26("span", { children: sourceChainName }),
|
|
8715
8718
|
sourceChainIcon && /* @__PURE__ */ jsx26("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx26(CdnIcon, { src: sourceChainIcon }) })
|
|
8716
8719
|
] })
|
|
8717
8720
|
] }),
|
|
8718
|
-
targetChainName && /* @__PURE__ */
|
|
8721
|
+
targetChainName && /* @__PURE__ */ jsxs22("div", { className: "rs-amount-detail-row", children: [
|
|
8719
8722
|
/* @__PURE__ */ jsx26("span", { children: "Destination chain" }),
|
|
8720
|
-
/* @__PURE__ */
|
|
8723
|
+
/* @__PURE__ */ jsxs22("span", { className: "rs-amount-detail-value", children: [
|
|
8721
8724
|
/* @__PURE__ */ jsx26("span", { children: targetChainName }),
|
|
8722
8725
|
targetChainIcon && /* @__PURE__ */ jsx26("span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ jsx26(CdnIcon, { src: targetChainIcon }) })
|
|
8723
8726
|
] })
|
|
8724
8727
|
] }),
|
|
8725
|
-
srcTxUrl && srcTxHash && /* @__PURE__ */
|
|
8728
|
+
srcTxUrl && srcTxHash && /* @__PURE__ */ jsxs22("div", { className: "rs-amount-detail-row", children: [
|
|
8726
8729
|
/* @__PURE__ */ jsx26("span", { children: "Transaction details" }),
|
|
8727
|
-
/* @__PURE__ */
|
|
8730
|
+
/* @__PURE__ */ jsxs22(
|
|
8728
8731
|
"a",
|
|
8729
8732
|
{
|
|
8730
8733
|
href: srcTxUrl,
|
|
@@ -8747,9 +8750,9 @@ function HistoryCard({ deposit }) {
|
|
|
8747
8750
|
DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
8748
8751
|
|
|
8749
8752
|
// src/DepositModal.tsx
|
|
8750
|
-
import { jsx as jsx27, jsxs as
|
|
8753
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8751
8754
|
var ReownDepositInner = lazy2(
|
|
8752
|
-
() => import("./DepositModalReown-
|
|
8755
|
+
() => import("./DepositModalReown-MO5QDLIT.mjs").then((m) => ({ default: m.DepositModalReown }))
|
|
8753
8756
|
);
|
|
8754
8757
|
function sortByCreatedAtDesc(items) {
|
|
8755
8758
|
return [...items].sort((a, b) => {
|
|
@@ -9006,8 +9009,8 @@ function DepositModalInner({
|
|
|
9006
9009
|
className,
|
|
9007
9010
|
inline,
|
|
9008
9011
|
closeOnOverlayClick,
|
|
9009
|
-
children: /* @__PURE__ */
|
|
9010
|
-
!hideHeaderChrome && /* @__PURE__ */
|
|
9012
|
+
children: /* @__PURE__ */ jsxs23("div", { ref: modalRef, className: modalClassName, children: [
|
|
9013
|
+
!hideHeaderChrome && /* @__PURE__ */ jsxs23("div", { className: "rs-modal-header--redesigned", children: [
|
|
9011
9014
|
/* @__PURE__ */ jsx27("div", { className: "rs-modal-header-nav-left", children: showBackButton && canGoBack && backHandler && /* @__PURE__ */ jsx27(
|
|
9012
9015
|
"button",
|
|
9013
9016
|
{
|
|
@@ -9018,7 +9021,7 @@ function DepositModalInner({
|
|
|
9018
9021
|
children: /* @__PURE__ */ jsx27(ChevronLeftIcon, {})
|
|
9019
9022
|
}
|
|
9020
9023
|
) }),
|
|
9021
|
-
/* @__PURE__ */
|
|
9024
|
+
/* @__PURE__ */ jsxs23("div", { className: "rs-modal-header-nav-right", children: [
|
|
9022
9025
|
historyButtonVisible && /* @__PURE__ */ jsx27(
|
|
9023
9026
|
"button",
|
|
9024
9027
|
{
|