@rhinestone/deposit-modal 0.15.0 → 0.16.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/README.md +22 -26
- package/dist/{DepositModalReown-R37SSHUF.cjs → DepositModalReown-IFN6YLZJ.cjs} +16 -17
- package/dist/{DepositModalReown-KOJ7VEY7.mjs → DepositModalReown-R7UROJPJ.mjs} +3 -4
- package/dist/WithdrawModal-SZEAI473.cjs +11 -0
- package/dist/{WithdrawModal-QVXHMH43.mjs → WithdrawModal-XKSSHVEJ.mjs} +3 -4
- package/dist/{chunk-DTVZUBHI.cjs → chunk-24N4KMJX.cjs} +71 -73
- package/dist/{chunk-CXBMIZUF.mjs → chunk-3HCCR54R.mjs} +1 -1
- package/dist/{chunk-5P2PVLS4.cjs → chunk-5CM3ZQ5U.cjs} +1 -1
- package/dist/{chunk-5VONFVQN.mjs → chunk-EA5CE2UZ.mjs} +3944 -864
- package/dist/{chunk-IKUYZA7A.mjs → chunk-F6ROQ6RJ.mjs} +28 -30
- package/dist/{chunk-3OOY67VJ.cjs → chunk-H4O22O7Y.cjs} +4930 -1850
- package/dist/{chunk-7UQ6OUEE.mjs → chunk-HMB2XQGD.mjs} +13 -15
- package/dist/{chunk-VPDCGD2D.cjs → chunk-V466XQSG.cjs} +260 -262
- 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 +4 -5
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +3 -4
- package/dist/embed.cjs +18 -59
- package/dist/embed.d.cts +2 -8
- package/dist/embed.d.ts +2 -8
- package/dist/embed.mjs +9 -50
- package/dist/index.cjs +5 -10
- package/dist/index.d.cts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.mjs +4 -9
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/styles.css +15 -0
- package/dist/{types-CQ0NHqCy.d.ts → types-B9SbZQIG.d.ts} +15 -113
- package/dist/{types-CxiLX5sv.d.cts → types-SwGGf0eH.d.cts} +15 -113
- package/dist/withdraw.cjs +4 -5
- package/dist/withdraw.d.cts +31 -3
- package/dist/withdraw.d.ts +31 -3
- package/dist/withdraw.mjs +3 -4
- package/package.json +4 -35
- package/dist/ClaimModal-GFDBVCN5.cjs +0 -11
- package/dist/ClaimModal-VQS3AKEL.mjs +0 -11
- package/dist/WithdrawModal-RY2NMFLE.cjs +0 -12
- package/dist/chunk-6HUHVXCY.cjs +0 -704
- package/dist/chunk-QJ7RCCU7.mjs +0 -704
- package/dist/chunk-UCBUCX2W.mjs +0 -3169
- package/dist/chunk-X4D52IZK.cjs +0 -3169
- package/dist/claim.cjs +0 -9
- package/dist/claim.d.cts +0 -17
- package/dist/claim.d.ts +0 -17
- package/dist/claim.mjs +0 -9
- package/dist/modal-ui-state-OD1RmKkK.d.cts +0 -30
- package/dist/modal-ui-state-OD1RmKkK.d.ts +0 -30
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var _chunkX4D52IZKcjs = require('./chunk-X4D52IZK.cjs');
|
|
28
27
|
|
|
29
28
|
|
|
30
29
|
|
|
@@ -87,8 +86,7 @@ var _chunkX4D52IZKcjs = require('./chunk-X4D52IZK.cjs');
|
|
|
87
86
|
|
|
88
87
|
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
var _chunk3OOY67VJcjs = require('./chunk-3OOY67VJ.cjs');
|
|
89
|
+
var _chunkH4O22O7Ycjs = require('./chunk-H4O22O7Y.cjs');
|
|
92
90
|
|
|
93
91
|
|
|
94
92
|
|
|
@@ -246,11 +244,11 @@ SegmentedToggle.displayName = "SegmentedToggle";
|
|
|
246
244
|
|
|
247
245
|
function ChainIcon({ chainId, className, loading }) {
|
|
248
246
|
const badge = _chunkOY5N3E6Lcjs.getChainBadge.call(void 0, chainId);
|
|
249
|
-
const catalogChain =
|
|
247
|
+
const catalogChain = _chunkH4O22O7Ycjs.useCatalogChain.call(void 0, _chunkH4O22O7Ycjs.catalogKeyForChain.call(void 0, chainId));
|
|
250
248
|
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _2 => _2.name]), () => ( _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId)));
|
|
251
249
|
const initial = (_nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _3 => _3.name]), () => ( badge.shortLabel))).charAt(0);
|
|
252
250
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
253
|
-
|
|
251
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
254
252
|
{
|
|
255
253
|
src: _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _4 => _4.iconUrl]), () => ( _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, chainId))),
|
|
256
254
|
alt: name,
|
|
@@ -273,7 +271,7 @@ ChainIcon.displayName = "ChainIcon";
|
|
|
273
271
|
// src/components/ui/WalletBadgeIcons/index.tsx
|
|
274
272
|
|
|
275
273
|
function BadgeImage({ src, alt = "" }) {
|
|
276
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
274
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src, alt }) });
|
|
277
275
|
}
|
|
278
276
|
var WALLET_BADGES = ["rabby", "phantom", "walletconnect"];
|
|
279
277
|
function WalletBadgeIcons() {
|
|
@@ -326,7 +324,7 @@ var DAPP_IMPORT_CATALOG = [
|
|
|
326
324
|
// src/components/ui/BrandIcons.tsx
|
|
327
325
|
|
|
328
326
|
function ExchangeBadgeImage({ name }) {
|
|
329
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
327
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: _nullishCoalesce(_chunkH4O22O7Ycjs.getExchangeLogoSrc.call(void 0, name), () => ( void 0)) });
|
|
330
328
|
}
|
|
331
329
|
var CARD_NETWORKS = ["amex", "visa", "mastercard"];
|
|
332
330
|
function CardNetworkIcons() {
|
|
@@ -334,7 +332,7 @@ function CardNetworkIcons() {
|
|
|
334
332
|
"span",
|
|
335
333
|
{
|
|
336
334
|
className: `rs-card-network rs-card-network--${network}`,
|
|
337
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
335
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: _chunkOY5N3E6Lcjs.cdnIconUrl.call(void 0, "cards", network) })
|
|
338
336
|
},
|
|
339
337
|
network
|
|
340
338
|
)) });
|
|
@@ -353,7 +351,7 @@ function DappBadgeIcons() {
|
|
|
353
351
|
).filter(
|
|
354
352
|
(brand) => Boolean(brand)
|
|
355
353
|
);
|
|
356
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-meta-icons rs-list-row-meta-icons--exchanges", children: marks.map((brand) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
354
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-meta-icons rs-list-row-meta-icons--exchanges", children: marks.map((brand) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: brand.iconUrl, alt: brand.label }) }, brand.id)) });
|
|
357
355
|
}
|
|
358
356
|
DappBadgeIcons.displayName = "DappBadgeIcons";
|
|
359
357
|
var DAPP_BADGE_COUNT = DAPP_BADGE_ORDER.length;
|
|
@@ -373,9 +371,9 @@ function balanceSubtitle(status, balanceUsd, fallback) {
|
|
|
373
371
|
return "No balance";
|
|
374
372
|
}
|
|
375
373
|
function fiatIcon(name) {
|
|
376
|
-
if (name === "apple") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
377
|
-
if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
378
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
374
|
+
if (name === "apple") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.AppleIcon, {});
|
|
375
|
+
if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BankIcon, {});
|
|
376
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CardIcon, {});
|
|
379
377
|
}
|
|
380
378
|
function FiatMethodIcon({ option }) {
|
|
381
379
|
const [remoteFailed, setRemoteFailed] = _react.useState.call(void 0, false);
|
|
@@ -458,20 +456,20 @@ function renderWalletLeading(row) {
|
|
|
458
456
|
}
|
|
459
457
|
);
|
|
460
458
|
}
|
|
461
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
459
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {});
|
|
462
460
|
}
|
|
463
|
-
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
464
|
-
var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
465
|
-
var EXCHANGE_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
466
|
-
var MIGRATE_ASSETS_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
467
|
-
var SMALL_SPINNER = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
461
|
+
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TransferCryptoIcon, {});
|
|
462
|
+
var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {});
|
|
463
|
+
var EXCHANGE_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.UnplugIcon, {});
|
|
464
|
+
var MIGRATE_ASSETS_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.MigrateAssetsIcon, {});
|
|
465
|
+
var SMALL_SPINNER = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, { className: "rs-spinner--sm" });
|
|
468
466
|
var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
469
467
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
|
|
470
468
|
"+100"
|
|
471
469
|
] });
|
|
472
470
|
var EXTRA_EXCHANGE_COUNT = Math.max(
|
|
473
471
|
0,
|
|
474
|
-
|
|
472
|
+
_chunkH4O22O7Ycjs.SUPPORTED_CONNECT_EXCHANGE_COUNT - EXCHANGE_BADGE_COUNT
|
|
475
473
|
);
|
|
476
474
|
var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
477
475
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
|
|
@@ -529,7 +527,7 @@ function ConnectStep({
|
|
|
529
527
|
if (onSelectTransferCrypto) {
|
|
530
528
|
cryptoRows.push(
|
|
531
529
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
532
|
-
|
|
530
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
533
531
|
{
|
|
534
532
|
leading: TRANSFER_CRYPTO_LEADING,
|
|
535
533
|
title: "Transfer crypto",
|
|
@@ -550,7 +548,7 @@ function ConnectStep({
|
|
|
550
548
|
);
|
|
551
549
|
cryptoRows.push(
|
|
552
550
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
553
|
-
|
|
551
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
554
552
|
{
|
|
555
553
|
leading: renderWalletLeading(row),
|
|
556
554
|
title: collapseToExternal ? "External wallet" : row.label,
|
|
@@ -567,7 +565,7 @@ function ConnectStep({
|
|
|
567
565
|
if (!hasSessionWallet && handleConnect) {
|
|
568
566
|
cryptoRows.push(
|
|
569
567
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
570
|
-
|
|
568
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
571
569
|
{
|
|
572
570
|
leading: WALLET_LEADING,
|
|
573
571
|
title: "Connect wallet",
|
|
@@ -582,7 +580,7 @@ function ConnectStep({
|
|
|
582
580
|
if (onSelectFundFromExchange) {
|
|
583
581
|
cryptoRows.push(
|
|
584
582
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
585
|
-
|
|
583
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
586
584
|
{
|
|
587
585
|
leading: EXCHANGE_LEADING,
|
|
588
586
|
title: "Connect exchange",
|
|
@@ -597,7 +595,7 @@ function ConnectStep({
|
|
|
597
595
|
if (onSelectMigrateAssets) {
|
|
598
596
|
cryptoRows.push(
|
|
599
597
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
600
|
-
|
|
598
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
601
599
|
{
|
|
602
600
|
leading: MIGRATE_ASSETS_LEADING,
|
|
603
601
|
title: "Migrate assets",
|
|
@@ -618,7 +616,7 @@ function ConnectStep({
|
|
|
618
616
|
for (const opt of fiatPaymentMethods) {
|
|
619
617
|
cashRows.push(
|
|
620
618
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
621
|
-
|
|
619
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
622
620
|
{
|
|
623
621
|
leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FiatMethodIcon, { option: opt }),
|
|
624
622
|
title: opt.label,
|
|
@@ -633,7 +631,7 @@ function ConnectStep({
|
|
|
633
631
|
} else if (fiatLoading) {
|
|
634
632
|
cashRows.push(
|
|
635
633
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
636
|
-
|
|
634
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
637
635
|
{
|
|
638
636
|
leading: SMALL_SPINNER,
|
|
639
637
|
title: "Loading payment options\u2026",
|
|
@@ -662,9 +660,9 @@ function ConnectStep({
|
|
|
662
660
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
663
661
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
664
662
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
665
|
-
|
|
663
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
666
664
|
{
|
|
667
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
665
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.HandCoinsIcon, {}),
|
|
668
666
|
title,
|
|
669
667
|
subtitle: _nullishCoalesce(subtitle, () => ( defaultSubtitle)),
|
|
670
668
|
aside: showToggle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -700,7 +698,7 @@ function ConnectStep({
|
|
|
700
698
|
children: "Disconnect wallet"
|
|
701
699
|
}
|
|
702
700
|
) }),
|
|
703
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
704
702
|
] });
|
|
705
703
|
}
|
|
706
704
|
ConnectStep.displayName = "ConnectStep";
|
|
@@ -723,17 +721,17 @@ function AssetSelectStep({
|
|
|
723
721
|
const [selectedAssetId, setSelectedAssetId] = _react.useState.call(void 0, null);
|
|
724
722
|
const [loading, setLoading] = _react.useState.call(void 0, true);
|
|
725
723
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
726
|
-
const isDepositChain =
|
|
727
|
-
const { catalog } =
|
|
728
|
-
const chainName =
|
|
724
|
+
const isDepositChain = _chunkH4O22O7Ycjs.useIsDepositChain.call(void 0, );
|
|
725
|
+
const { catalog } = _chunkH4O22O7Ycjs.useChainCatalog.call(void 0, );
|
|
726
|
+
const chainName = _chunkH4O22O7Ycjs.useChainName.call(void 0, );
|
|
729
727
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
730
728
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
731
|
-
return
|
|
729
|
+
return _chunkH4O22O7Ycjs.getAssetId.call(void 0, {
|
|
732
730
|
chainId: defaultSourceChain,
|
|
733
731
|
token: defaultSourceToken
|
|
734
732
|
});
|
|
735
733
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
736
|
-
const onTotalBalanceComputedRef =
|
|
734
|
+
const onTotalBalanceComputedRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onTotalBalanceComputed);
|
|
737
735
|
_react.useEffect.call(void 0, () => {
|
|
738
736
|
let active = true;
|
|
739
737
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -753,7 +751,7 @@ function AssetSelectStep({
|
|
|
753
751
|
try {
|
|
754
752
|
const portfolio = await service.fetchPortfolio(address);
|
|
755
753
|
if (!active) return;
|
|
756
|
-
const portfolioAssets =
|
|
754
|
+
const portfolioAssets = _chunkH4O22O7Ycjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
757
755
|
setAssets(portfolioAssets);
|
|
758
756
|
emitAssetsUpdate(portfolioAssets);
|
|
759
757
|
const hasNative = portfolioAssets.some(
|
|
@@ -832,7 +830,7 @@ function AssetSelectStep({
|
|
|
832
830
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
833
831
|
const numeric = Number(raw);
|
|
834
832
|
if (!Number.isFinite(numeric)) return raw;
|
|
835
|
-
return
|
|
833
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
836
834
|
} catch (e3) {
|
|
837
835
|
return asset.balance;
|
|
838
836
|
}
|
|
@@ -840,20 +838,20 @@ function AssetSelectStep({
|
|
|
840
838
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
841
839
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
842
840
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
843
|
-
|
|
841
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
844
842
|
{
|
|
845
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
843
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
846
844
|
title: "Your assets",
|
|
847
845
|
subtitle: "Select source assets to transfer"
|
|
848
846
|
}
|
|
849
847
|
),
|
|
850
848
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
851
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
849
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, { className: "rs-text-tertiary" }),
|
|
852
850
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
853
851
|
] }),
|
|
854
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
852
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
855
853
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
856
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
854
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
857
855
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
858
856
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
859
857
|
address.slice(0, 6),
|
|
@@ -886,13 +884,13 @@ function AssetSelectStep({
|
|
|
886
884
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
887
885
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
888
886
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
889
|
-
|
|
887
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
890
888
|
{
|
|
891
889
|
symbol: asset.symbol,
|
|
892
890
|
fallback: asset.symbol.slice(0, 4)
|
|
893
891
|
}
|
|
894
892
|
) }),
|
|
895
|
-
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
893
|
+
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: chainIcon, alt: chainName(asset.chainId) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
896
894
|
"span",
|
|
897
895
|
{
|
|
898
896
|
className: "rs-asset-chain-badge",
|
|
@@ -919,14 +917,14 @@ function AssetSelectStep({
|
|
|
919
917
|
] })
|
|
920
918
|
] })
|
|
921
919
|
] }),
|
|
922
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
920
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkH4O22O7Ycjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
923
921
|
]
|
|
924
922
|
},
|
|
925
923
|
asset.id
|
|
926
924
|
);
|
|
927
925
|
}) }),
|
|
928
926
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
929
|
-
|
|
927
|
+
_chunkH4O22O7Ycjs.Button,
|
|
930
928
|
{
|
|
931
929
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
932
930
|
disabled: !selectedAsset,
|
|
@@ -935,7 +933,7 @@ function AssetSelectStep({
|
|
|
935
933
|
}
|
|
936
934
|
)
|
|
937
935
|
] }),
|
|
938
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
936
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
939
937
|
] });
|
|
940
938
|
}
|
|
941
939
|
async function fetchNativeAssets(address, publicClient, existing, isDepositChain, catalogChain) {
|
|
@@ -943,7 +941,7 @@ async function fetchNativeAssets(address, publicClient, existing, isDepositChain
|
|
|
943
941
|
const connectedChainId = _optionalChain([publicClient, 'access', _16 => _16.chain, 'optionalAccess', _17 => _17.id]);
|
|
944
942
|
if (!connectedChainId) return [];
|
|
945
943
|
if (!isDepositChain(connectedChainId)) return [];
|
|
946
|
-
const id =
|
|
944
|
+
const id = _chunkH4O22O7Ycjs.getAssetId.call(void 0, {
|
|
947
945
|
chainId: connectedChainId,
|
|
948
946
|
token: _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS
|
|
949
947
|
});
|
|
@@ -1149,7 +1147,7 @@ function AmountStep({
|
|
|
1149
1147
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
1150
1148
|
if (!balanceTarget || !publicClient) return;
|
|
1151
1149
|
try {
|
|
1152
|
-
const bal =
|
|
1150
|
+
const bal = _chunkH4O22O7Ycjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
1153
1151
|
address: asset.token,
|
|
1154
1152
|
abi: _viem.erc20Abi,
|
|
1155
1153
|
functionName: "balanceOf",
|
|
@@ -1170,7 +1168,7 @@ function AmountStep({
|
|
|
1170
1168
|
hasAttemptedSwitch.current = true;
|
|
1171
1169
|
switchChain(asset.chainId).catch((err) => {
|
|
1172
1170
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1173
|
-
setError(
|
|
1171
|
+
setError(_chunkH4O22O7Ycjs.formatUserError.call(void 0, raw));
|
|
1174
1172
|
});
|
|
1175
1173
|
}
|
|
1176
1174
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -1223,7 +1221,7 @@ function AmountStep({
|
|
|
1223
1221
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
1224
1222
|
const numeric = Number(raw);
|
|
1225
1223
|
if (!Number.isFinite(numeric)) return raw;
|
|
1226
|
-
return
|
|
1224
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
1227
1225
|
} catch (e8) {
|
|
1228
1226
|
return "\u2026";
|
|
1229
1227
|
}
|
|
@@ -1311,12 +1309,12 @@ function AmountStep({
|
|
|
1311
1309
|
const needsPricing = !knowsBalance && !isSourceStablecoin;
|
|
1312
1310
|
const blockedOnPricing = needsPricing && !hasPricing;
|
|
1313
1311
|
const continueDisabled = chainMismatch || exceedsBalance || blockedOnPricing || numericAmount === 0 && !isBelowMin || knowsBalance && balance === null;
|
|
1314
|
-
const chainName =
|
|
1312
|
+
const chainName = _chunkH4O22O7Ycjs.useChainName.call(void 0, );
|
|
1315
1313
|
const sourceChainName = chainName(asset.chainId);
|
|
1316
1314
|
const targetChainName = chainName(targetChainId);
|
|
1317
1315
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1318
1316
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1319
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1317
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}), title }),
|
|
1320
1318
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
1321
1319
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
1322
1320
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1336,13 +1334,13 @@ function AmountStep({
|
|
|
1336
1334
|
" available",
|
|
1337
1335
|
balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1338
1336
|
" (~",
|
|
1339
|
-
|
|
1337
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(balanceUsd),
|
|
1340
1338
|
")"
|
|
1341
1339
|
] })
|
|
1342
1340
|
] }),
|
|
1343
1341
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
1344
1342
|
"Min. deposit ",
|
|
1345
|
-
|
|
1343
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(minDepositUsd)
|
|
1346
1344
|
] })
|
|
1347
1345
|
] })
|
|
1348
1346
|
] }),
|
|
@@ -1367,7 +1365,7 @@ function AmountStep({
|
|
|
1367
1365
|
" ",
|
|
1368
1366
|
asset.symbol
|
|
1369
1367
|
] }),
|
|
1370
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1368
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: asset.symbol }) })
|
|
1371
1369
|
] })
|
|
1372
1370
|
] }),
|
|
1373
1371
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
@@ -1378,21 +1376,21 @@ function AmountStep({
|
|
|
1378
1376
|
" ",
|
|
1379
1377
|
targetSymbol
|
|
1380
1378
|
] }),
|
|
1381
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1379
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: targetSymbol }) })
|
|
1382
1380
|
] })
|
|
1383
1381
|
] }),
|
|
1384
1382
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
1385
1383
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
1386
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
1384
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkH4O22O7Ycjs.currencyFormatter.format(balanceAfterUsd) })
|
|
1387
1385
|
] })
|
|
1388
1386
|
] }),
|
|
1389
|
-
blockedOnPricing && sourcePriceUnavailable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1387
|
+
blockedOnPricing && sourcePriceUnavailable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: [
|
|
1390
1388
|
asset.symbol,
|
|
1391
1389
|
" can't be priced right now, so this deposit can't be estimated. You can still send any amount to the deposit address."
|
|
1392
1390
|
] }),
|
|
1393
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1391
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
1394
1392
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1395
|
-
|
|
1393
|
+
_chunkH4O22O7Ycjs.Button,
|
|
1396
1394
|
{
|
|
1397
1395
|
onClick: handleContinue,
|
|
1398
1396
|
fullWidth: true,
|
|
@@ -1401,7 +1399,7 @@ function AmountStep({
|
|
|
1401
1399
|
}
|
|
1402
1400
|
)
|
|
1403
1401
|
] }),
|
|
1404
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1402
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
1405
1403
|
] });
|
|
1406
1404
|
}
|
|
1407
1405
|
|
|
@@ -1428,14 +1426,14 @@ function ReviewDetails({
|
|
|
1428
1426
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
1429
1427
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1430
1428
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
1431
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1429
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: sourceChainIcon }) })
|
|
1432
1430
|
] })
|
|
1433
1431
|
] }),
|
|
1434
1432
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1435
1433
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
1436
1434
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1437
1435
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
1438
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1436
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: targetChainIcon }) })
|
|
1439
1437
|
] })
|
|
1440
1438
|
] }),
|
|
1441
1439
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1450,21 +1448,21 @@ function ReviewDetails({
|
|
|
1450
1448
|
" ",
|
|
1451
1449
|
sendSymbol
|
|
1452
1450
|
] }),
|
|
1453
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1451
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: sendSymbol }) })
|
|
1454
1452
|
] })
|
|
1455
1453
|
] }),
|
|
1456
1454
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1457
1455
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
1458
1456
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1459
1457
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
1460
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1458
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: receiveSymbol }) })
|
|
1461
1459
|
] })
|
|
1462
1460
|
] }),
|
|
1463
1461
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1464
1462
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
1465
1463
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1466
1464
|
fee.display === null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-skeleton rs-skeleton-fee", "aria-hidden": "true" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { style: fee.struck ? { textDecoration: "line-through" } : void 0, children: fee.display }),
|
|
1467
|
-
fee.tooltip !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1465
|
+
fee.tooltip !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Tooltip, { content: fee.tooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.InfoIcon, {}) }) })
|
|
1468
1466
|
] })
|
|
1469
1467
|
] })
|
|
1470
1468
|
] });
|
|
@@ -1682,17 +1680,17 @@ function ConfirmStep({
|
|
|
1682
1680
|
const targetChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, targetChainId);
|
|
1683
1681
|
const sourceChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, asset.chainId);
|
|
1684
1682
|
const targetChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, targetChainId);
|
|
1685
|
-
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(
|
|
1686
|
-
const mustHaveQuote = !appFeesResolved ||
|
|
1683
|
+
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(_chunkH4O22O7Ycjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( "0")) : "0";
|
|
1684
|
+
const mustHaveQuote = !appFeesResolved || _chunkH4O22O7Ycjs.resolveAppFeeBps.call(void 0,
|
|
1687
1685
|
appFees,
|
|
1688
1686
|
`eip155:${quoteSource.chainId}`,
|
|
1689
1687
|
quoteSource.token
|
|
1690
1688
|
) > 0;
|
|
1691
|
-
const { display: feeDisplay, struck: feesFullySponsored } =
|
|
1689
|
+
const { display: feeDisplay, struck: feesFullySponsored } = _chunkH4O22O7Ycjs.quoteFeeRow.call(void 0,
|
|
1692
1690
|
_optionalChain([quote, 'optionalAccess', _67 => _67.fees])
|
|
1693
1691
|
);
|
|
1694
1692
|
const directTransfer = sameRoute && !mustHaveQuote && !executeTransfer;
|
|
1695
|
-
const permitEligible = enableGaslessDeposit && !
|
|
1693
|
+
const permitEligible = enableGaslessDeposit && !_chunkH4O22O7Ycjs.isNativeAsset.call(void 0, asset) && !isDappImportAsset(asset) && !executeTransfer && !directTransfer && asset.chainId !== _chunkOY5N3E6Lcjs.HYPERCORE_CHAIN_ID;
|
|
1696
1694
|
const permitRequestKey = JSON.stringify([
|
|
1697
1695
|
smartAccount.toLowerCase(),
|
|
1698
1696
|
asset.chainId,
|
|
@@ -1705,21 +1703,21 @@ function ConfirmStep({
|
|
|
1705
1703
|
const receiveDisplay = (() => {
|
|
1706
1704
|
if (directTransfer) return `${formattedSendAmount} ${asset.symbol}`;
|
|
1707
1705
|
if (quote) {
|
|
1708
|
-
const quoted =
|
|
1706
|
+
const quoted = _chunkH4O22O7Ycjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol);
|
|
1709
1707
|
if (quoted !== void 0) return quoted;
|
|
1710
1708
|
}
|
|
1711
1709
|
const usdValue = Number(targetAmount);
|
|
1712
1710
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
1713
|
-
const estimate =
|
|
1711
|
+
const estimate = _chunkH4O22O7Ycjs.formatReceiveEstimate.call(void 0, {
|
|
1714
1712
|
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
1715
1713
|
sourceSymbol: asset.symbol,
|
|
1716
1714
|
targetSymbol,
|
|
1717
1715
|
sourceAmountUsd,
|
|
1718
|
-
sourceTrusted:
|
|
1716
|
+
sourceTrusted: _chunkH4O22O7Ycjs.isRecognizedToken.call(void 0, asset.token, asset.chainId),
|
|
1719
1717
|
// The target is the curated deposit destination, so a stablecoin target
|
|
1720
1718
|
// estimates at $1 when unquoted (DepositFlow skips fetching stablecoin
|
|
1721
1719
|
// target prices). Not applied to the source — that can be a held token.
|
|
1722
|
-
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } :
|
|
1720
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : _chunkH4O22O7Ycjs.isDisplayStablecoinSymbol.call(void 0, targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
|
|
1723
1721
|
});
|
|
1724
1722
|
if (estimate !== void 0) return estimate;
|
|
1725
1723
|
return targetSymbol;
|
|
@@ -1730,7 +1728,7 @@ function ConfirmStep({
|
|
|
1730
1728
|
hasAttemptedSwitch.current = true;
|
|
1731
1729
|
switchChain(asset.chainId).catch((err) => {
|
|
1732
1730
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1733
|
-
setError(
|
|
1731
|
+
setError(_chunkH4O22O7Ycjs.formatUserError.call(void 0, raw));
|
|
1734
1732
|
});
|
|
1735
1733
|
}
|
|
1736
1734
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -1917,9 +1915,9 @@ function ConfirmStep({
|
|
|
1917
1915
|
);
|
|
1918
1916
|
} catch (err) {
|
|
1919
1917
|
const raw = err instanceof Error ? err.message : "Signing failed";
|
|
1920
|
-
const safeToTransfer = !submitStarted || err instanceof
|
|
1918
|
+
const safeToTransfer = !submitStarted || err instanceof _chunkH4O22O7Ycjs.PermitDepositSubmitError && err.safeToTransfer;
|
|
1921
1919
|
if (safeToTransfer) setPermitDisabled(true);
|
|
1922
|
-
const message = safeToTransfer ?
|
|
1920
|
+
const message = safeToTransfer ? _chunkH4O22O7Ycjs.formatUserError.call(void 0, raw) : "Deposit submission status is uncertain. Check your activity before trying a transfer.";
|
|
1923
1921
|
setError(message);
|
|
1924
1922
|
_optionalChain([onError, 'optionalCall', _69 => _69(message, "PERMIT_ERROR", raw)]);
|
|
1925
1923
|
} finally {
|
|
@@ -1940,7 +1938,7 @@ function ConfirmStep({
|
|
|
1940
1938
|
const result = await executeTransfer(amountUnits);
|
|
1941
1939
|
hash = result.txHash;
|
|
1942
1940
|
resolvedSourceToken = result.sourceToken;
|
|
1943
|
-
} else if (
|
|
1941
|
+
} else if (_chunkH4O22O7Ycjs.isNativeAsset.call(void 0, asset)) {
|
|
1944
1942
|
hash = await walletClient.sendTransaction({
|
|
1945
1943
|
account,
|
|
1946
1944
|
chain,
|
|
@@ -1971,8 +1969,8 @@ function ConfirmStep({
|
|
|
1971
1969
|
);
|
|
1972
1970
|
} catch (err) {
|
|
1973
1971
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1974
|
-
const uncertain =
|
|
1975
|
-
const message = uncertain ? "Deposit submission status is uncertain. Check your activity before trying again." :
|
|
1972
|
+
const uncertain = _chunkH4O22O7Ycjs.isSubmissionUncertain.call(void 0, err);
|
|
1973
|
+
const message = uncertain ? "Deposit submission status is uncertain. Check your activity before trying again." : _chunkH4O22O7Ycjs.formatUserError.call(void 0, raw);
|
|
1976
1974
|
if (uncertain) setSubmissionUncertain(true);
|
|
1977
1975
|
setError(message);
|
|
1978
1976
|
_optionalChain([onError, 'optionalCall', _71 => _71(message, "TRANSFER_ERROR", raw)]);
|
|
@@ -1982,7 +1980,7 @@ function ConfirmStep({
|
|
|
1982
1980
|
};
|
|
1983
1981
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1984
1982
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1985
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1983
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}), title: "Review deposit" }),
|
|
1986
1984
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1987
1985
|
ReviewDetails,
|
|
1988
1986
|
{
|
|
@@ -1998,9 +1996,9 @@ function ConfirmStep({
|
|
|
1998
1996
|
fee: { display: feeDisplay, struck: feesFullySponsored }
|
|
1999
1997
|
}
|
|
2000
1998
|
),
|
|
2001
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1999
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
2002
2000
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2003
|
-
|
|
2001
|
+
_chunkH4O22O7Ycjs.Button,
|
|
2004
2002
|
{
|
|
2005
2003
|
onClick: handleConfirm,
|
|
2006
2004
|
loading: isSubmitting,
|
|
@@ -2027,7 +2025,7 @@ function ConfirmStep({
|
|
|
2027
2025
|
] }),
|
|
2028
2026
|
!permit && permitEligible && permitUnavailable && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-gasless-note", children: permitUnavailable === "permit2-approval-required" ? "Gasless unavailable until Permit2 is approved; Continue sends a token transaction." : "This wallet/token cannot use gasless authorization; Continue sends a token transaction." })
|
|
2029
2027
|
] }),
|
|
2030
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
2031
2029
|
] });
|
|
2032
2030
|
}
|
|
2033
2031
|
|
|
@@ -2080,29 +2078,29 @@ function QrReviewStep({
|
|
|
2080
2078
|
cancelled = true;
|
|
2081
2079
|
};
|
|
2082
2080
|
}, [service, smartAccount, asset, amount]);
|
|
2083
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
2081
|
+
const formattedSendAmount = _nullishCoalesce(_chunkH4O22O7Ycjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( amount));
|
|
2084
2082
|
const receiveDisplay = (() => {
|
|
2085
2083
|
if (quote.value) {
|
|
2086
|
-
const quoted =
|
|
2084
|
+
const quoted = _chunkH4O22O7Ycjs.formatQuotedReceive.call(void 0, quote.value.output, targetSymbol);
|
|
2087
2085
|
if (quoted !== void 0) return quoted;
|
|
2088
2086
|
}
|
|
2089
2087
|
const usdValue = Number(targetAmount);
|
|
2090
|
-
const estimate =
|
|
2088
|
+
const estimate = _chunkH4O22O7Ycjs.formatReceiveEstimate.call(void 0, {
|
|
2091
2089
|
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
2092
2090
|
sourceSymbol: asset.symbol,
|
|
2093
2091
|
targetSymbol,
|
|
2094
2092
|
sourceAmountUsd: Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0,
|
|
2095
|
-
sourceTrusted:
|
|
2096
|
-
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } :
|
|
2093
|
+
sourceTrusted: _chunkH4O22O7Ycjs.isRecognizedToken.call(void 0, asset.token, asset.chainId),
|
|
2094
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : _chunkH4O22O7Ycjs.isDisplayStablecoinSymbol.call(void 0, targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
|
|
2097
2095
|
});
|
|
2098
2096
|
return _nullishCoalesce(estimate, () => ( targetSymbol));
|
|
2099
2097
|
})();
|
|
2100
2098
|
const estimatedTime = quote.value && Number.isFinite(quote.value.estimatedFillTimeSeconds) ? quote.value.estimatedFillTimeSeconds < 60 ? "< 1 min" : `~${Math.round(quote.value.estimatedFillTimeSeconds / 60)} min` : quote.state === "loading" ? "\u2026" : "\u2014";
|
|
2101
|
-
const { display: quotedFee, struck } =
|
|
2099
|
+
const { display: quotedFee, struck } = _chunkH4O22O7Ycjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'access', _72 => _72.value, 'optionalAccess', _73 => _73.fees]));
|
|
2102
2100
|
const feeDisplay = quote.state === "unavailable" ? "\u2014" : quotedFee;
|
|
2103
2101
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2104
2102
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2105
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2103
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TransferCryptoIcon, {}), title: "Fee estimate" }),
|
|
2106
2104
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2107
2105
|
ReviewDetails,
|
|
2108
2106
|
{
|
|
@@ -2118,9 +2116,9 @@ function QrReviewStep({
|
|
|
2118
2116
|
fee: { display: feeDisplay, struck }
|
|
2119
2117
|
}
|
|
2120
2118
|
),
|
|
2121
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2119
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Button, { onClick: onClose, fullWidth: true, children: "Close" })
|
|
2122
2120
|
] }),
|
|
2123
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2121
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
2124
2122
|
] });
|
|
2125
2123
|
}
|
|
2126
2124
|
QrReviewStep.displayName = "QrReviewStep";
|
|
@@ -2151,20 +2149,20 @@ function DepositAddressSkeleton({
|
|
|
2151
2149
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2152
2150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2153
2151
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2154
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2152
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2155
2153
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2156
2154
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
2157
2155
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2158
2156
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2159
2157
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2160
|
-
|
|
2158
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
2161
2159
|
{
|
|
2162
2160
|
src: chainIcon,
|
|
2163
2161
|
className: "rs-deposit-address-dropdown-icon"
|
|
2164
2162
|
}
|
|
2165
2163
|
),
|
|
2166
2164
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
2167
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2165
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2168
2166
|
] })
|
|
2169
2167
|
] }),
|
|
2170
2168
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
@@ -2173,8 +2171,8 @@ function DepositAddressSkeleton({
|
|
|
2173
2171
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
2174
2172
|
"Min.$",
|
|
2175
2173
|
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _74 => _74.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
2176
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2177
|
-
|
|
2174
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2175
|
+
_chunkH4O22O7Ycjs.InfoIcon,
|
|
2178
2176
|
{
|
|
2179
2177
|
className: "rs-deposit-address-min-icon",
|
|
2180
2178
|
"aria-hidden": "true"
|
|
@@ -2184,14 +2182,14 @@ function DepositAddressSkeleton({
|
|
|
2184
2182
|
] }),
|
|
2185
2183
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2186
2184
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2187
|
-
|
|
2185
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
2188
2186
|
{
|
|
2189
2187
|
symbol: defaultToken,
|
|
2190
2188
|
className: "rs-deposit-address-dropdown-icon"
|
|
2191
2189
|
}
|
|
2192
2190
|
),
|
|
2193
2191
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
|
|
2194
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2192
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2195
2193
|
] })
|
|
2196
2194
|
] })
|
|
2197
2195
|
] }),
|
|
@@ -2206,7 +2204,7 @@ function DepositAddressSkeleton({
|
|
|
2206
2204
|
] }),
|
|
2207
2205
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-actions", "aria-hidden": "true", children: [
|
|
2208
2206
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { type: "button", className: "rs-deposit-address-copy", disabled: true, children: [
|
|
2209
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2207
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CopyIcon, {}),
|
|
2210
2208
|
"Copy address"
|
|
2211
2209
|
] }),
|
|
2212
2210
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2223,7 +2221,7 @@ function DepositAddressSkeleton({
|
|
|
2223
2221
|
}
|
|
2224
2222
|
)
|
|
2225
2223
|
] }),
|
|
2226
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2224
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
2227
2225
|
] });
|
|
2228
2226
|
}
|
|
2229
2227
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2235,9 +2233,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
|
|
|
2235
2233
|
var MAX_POLL_INTERVAL = 3e4;
|
|
2236
2234
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
2237
2235
|
function isEventForTx(event, txHash) {
|
|
2238
|
-
const eventTxHash =
|
|
2236
|
+
const eventTxHash = _chunkH4O22O7Ycjs.getEventTxHash.call(void 0, event);
|
|
2239
2237
|
if (!eventTxHash) return false;
|
|
2240
|
-
return
|
|
2238
|
+
return _chunkH4O22O7Ycjs.txRefsMatch.call(void 0, eventTxHash, txHash);
|
|
2241
2239
|
}
|
|
2242
2240
|
function truncateHash(hash) {
|
|
2243
2241
|
return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
|
|
@@ -2287,7 +2285,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
2287
2285
|
}
|
|
2288
2286
|
return "Bridge failed";
|
|
2289
2287
|
}
|
|
2290
|
-
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2288
|
+
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
|
|
2291
2289
|
function DepositNotification({
|
|
2292
2290
|
deposit,
|
|
2293
2291
|
smartAccount,
|
|
@@ -2321,7 +2319,7 @@ function DepositNotification({
|
|
|
2321
2319
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
2322
2320
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
2323
2321
|
const completedRef = _react.useRef.call(void 0, false);
|
|
2324
|
-
const depositContextRef =
|
|
2322
|
+
const depositContextRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, {
|
|
2325
2323
|
amount,
|
|
2326
2324
|
sourceChain,
|
|
2327
2325
|
sourceToken: token,
|
|
@@ -2329,8 +2327,8 @@ function DepositNotification({
|
|
|
2329
2327
|
targetChain,
|
|
2330
2328
|
targetToken
|
|
2331
2329
|
});
|
|
2332
|
-
const onCompleteRef =
|
|
2333
|
-
const onFailedRef =
|
|
2330
|
+
const onCompleteRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onComplete);
|
|
2331
|
+
const onFailedRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onFailed);
|
|
2334
2332
|
const handleComplete = _react.useCallback.call(void 0,
|
|
2335
2333
|
(destTxHash) => {
|
|
2336
2334
|
if (completedRef.current) return;
|
|
@@ -2421,12 +2419,12 @@ function DepositNotification({
|
|
|
2421
2419
|
status,
|
|
2422
2420
|
txHash
|
|
2423
2421
|
]);
|
|
2424
|
-
const explorerTxUrl =
|
|
2422
|
+
const explorerTxUrl = _chunkH4O22O7Ycjs.useExplorerTxUrl.call(void 0, );
|
|
2425
2423
|
const sourceExplorerUrl = sourceChain === "unknown" ? void 0 : explorerTxUrl(sourceChain, txHash);
|
|
2426
2424
|
const destExplorerUrl = destinationTxHash ? explorerTxUrl(_chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain), destinationTxHash) : null;
|
|
2427
2425
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
2428
2426
|
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.";
|
|
2429
|
-
const statusIcon = status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2427
|
+
const statusIcon = status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CheckIcon, {}) }) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--failed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CloseIcon, {}) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--processing", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
2430
2428
|
"svg",
|
|
2431
2429
|
{
|
|
2432
2430
|
className: "rs-deposit-notification-spinner",
|
|
@@ -2476,7 +2474,7 @@ function DepositNotification({
|
|
|
2476
2474
|
className: "rs-deposit-notification-close",
|
|
2477
2475
|
onClick: () => onDismiss(deposit.id),
|
|
2478
2476
|
"aria-label": "Dismiss",
|
|
2479
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2477
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CloseIcon, {})
|
|
2480
2478
|
}
|
|
2481
2479
|
)
|
|
2482
2480
|
] }),
|
|
@@ -2492,7 +2490,7 @@ function DepositNotification({
|
|
|
2492
2490
|
"aria-expanded": expanded,
|
|
2493
2491
|
children: [
|
|
2494
2492
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: expanded ? "See less details" : "See more details" }),
|
|
2495
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2493
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
2496
2494
|
]
|
|
2497
2495
|
}
|
|
2498
2496
|
),
|
|
@@ -2677,7 +2675,7 @@ function selectionAsAsset(chainId, symbol, topTokens, catalogChain) {
|
|
|
2677
2675
|
}
|
|
2678
2676
|
function TokenGlyph({ symbol }) {
|
|
2679
2677
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2680
|
-
|
|
2678
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
2681
2679
|
{
|
|
2682
2680
|
symbol,
|
|
2683
2681
|
className: "rs-deposit-address-dropdown-icon",
|
|
@@ -2724,12 +2722,12 @@ function DepositAddressStep({
|
|
|
2724
2722
|
};
|
|
2725
2723
|
}, [service]);
|
|
2726
2724
|
const BASE_CHAIN_ID2 = 8453;
|
|
2727
|
-
const evmChainIds =
|
|
2728
|
-
const { catalog, isLoading: catalogLoading } =
|
|
2725
|
+
const evmChainIds = _chunkH4O22O7Ycjs.useDepositChainIds.call(void 0, );
|
|
2726
|
+
const { catalog, isLoading: catalogLoading } = _chunkH4O22O7Ycjs.useChainCatalog.call(void 0, );
|
|
2729
2727
|
const catalogFor = _react.useCallback.call(void 0,
|
|
2730
2728
|
(chain) => {
|
|
2731
2729
|
if (!catalog) return void 0;
|
|
2732
|
-
const key =
|
|
2730
|
+
const key = _chunkH4O22O7Ycjs.catalogKeyForChain.call(void 0, chain);
|
|
2733
2731
|
return typeof key === "number" ? catalog.byChainId.get(key) : catalog.byCaip2.get(key);
|
|
2734
2732
|
},
|
|
2735
2733
|
[catalog]
|
|
@@ -2934,10 +2932,10 @@ function DepositAddressStep({
|
|
|
2934
2932
|
return;
|
|
2935
2933
|
}
|
|
2936
2934
|
const event = status.lastEvent;
|
|
2937
|
-
const eventTxHash =
|
|
2935
|
+
const eventTxHash = _chunkH4O22O7Ycjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkH4O22O7Ycjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
2938
2936
|
if (baselineTxHashRef.current === void 0) {
|
|
2939
2937
|
baselineTxHashRef.current = eventTxHash;
|
|
2940
|
-
} else if (eventTxHash && (!baselineTxHashRef.current || !
|
|
2938
|
+
} else if (eventTxHash && (!baselineTxHashRef.current || !_chunkH4O22O7Ycjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
|
|
2941
2939
|
const details = getDepositEventDetails(event);
|
|
2942
2940
|
const chainId = _nullishCoalesce(details.chainId, () => ( "unknown"));
|
|
2943
2941
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
@@ -3021,13 +3019,13 @@ function DepositAddressStep({
|
|
|
3021
3019
|
if (chainOptions.length === 0) {
|
|
3022
3020
|
if (catalogLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositAddressSkeleton, { uiConfig });
|
|
3023
3021
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
3024
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3025
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3022
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
3023
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.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." })
|
|
3026
3024
|
] }) });
|
|
3027
3025
|
}
|
|
3028
3026
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
3029
3027
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
3030
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
3031
3029
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
3032
3030
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
3033
3031
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -3043,14 +3041,14 @@ function DepositAddressStep({
|
|
|
3043
3041
|
},
|
|
3044
3042
|
children: [
|
|
3045
3043
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3046
|
-
|
|
3044
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
3047
3045
|
{
|
|
3048
3046
|
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _142 => _142(sourceChainId), 'optionalAccess', _143 => _143.iconUrl]), () => ( _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, sourceChainId))),
|
|
3049
3047
|
className: "rs-deposit-address-dropdown-icon"
|
|
3050
3048
|
}
|
|
3051
3049
|
),
|
|
3052
3050
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainLabel(sourceChainId, catalogFor(sourceChainId)) }),
|
|
3053
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3051
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3054
3052
|
]
|
|
3055
3053
|
}
|
|
3056
3054
|
),
|
|
@@ -3062,7 +3060,7 @@ function DepositAddressStep({
|
|
|
3062
3060
|
onClick: () => handleSelectChain(chainId),
|
|
3063
3061
|
children: [
|
|
3064
3062
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3065
|
-
|
|
3063
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
3066
3064
|
{
|
|
3067
3065
|
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _144 => _144(chainId), 'optionalAccess', _145 => _145.iconUrl]), () => ( _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, chainId))),
|
|
3068
3066
|
className: "rs-deposit-address-dropdown-icon"
|
|
@@ -3080,8 +3078,8 @@ function DepositAddressStep({
|
|
|
3080
3078
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
3081
3079
|
"Min.$",
|
|
3082
3080
|
(_chunkOY5N3E6Lcjs.isHyperCoreDestination.call(void 0, targetChain) || isHyperCore ? Math.max(_chunkOY5N3E6Lcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _146 => _146.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _147 => _147.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
3083
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3084
|
-
|
|
3081
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3082
|
+
_chunkH4O22O7Ycjs.InfoIcon,
|
|
3085
3083
|
{
|
|
3086
3084
|
className: "rs-deposit-address-min-icon",
|
|
3087
3085
|
"aria-hidden": "true"
|
|
@@ -3102,7 +3100,7 @@ function DepositAddressStep({
|
|
|
3102
3100
|
children: [
|
|
3103
3101
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenGlyph, { symbol: sourceTokenSymbol }),
|
|
3104
3102
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceTokenSymbol }),
|
|
3105
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3103
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3106
3104
|
]
|
|
3107
3105
|
}
|
|
3108
3106
|
),
|
|
@@ -3147,7 +3145,7 @@ function DepositAddressStep({
|
|
|
3147
3145
|
className: "rs-deposit-address-copy",
|
|
3148
3146
|
onClick: handleCopy,
|
|
3149
3147
|
children: [
|
|
3150
|
-
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3148
|
+
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CopyIcon, {}),
|
|
3151
3149
|
copied ? "Copied!" : "Copy address"
|
|
3152
3150
|
]
|
|
3153
3151
|
}
|
|
@@ -3182,7 +3180,7 @@ function DepositAddressStep({
|
|
|
3182
3180
|
},
|
|
3183
3181
|
deposit.id
|
|
3184
3182
|
)) }),
|
|
3185
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3183
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3186
3184
|
] });
|
|
3187
3185
|
}
|
|
3188
3186
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -3239,7 +3237,7 @@ function FinalisingDepositStep() {
|
|
|
3239
3237
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
3240
3238
|
] })
|
|
3241
3239
|
] }),
|
|
3242
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3240
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3243
3241
|
] });
|
|
3244
3242
|
}
|
|
3245
3243
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
@@ -3269,7 +3267,7 @@ function SwappedOrderTracker({
|
|
|
3269
3267
|
];
|
|
3270
3268
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
3271
3269
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3272
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3270
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.HandCoinsIcon, {}), title }),
|
|
3273
3271
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
3274
3272
|
const status = stepStates[idx];
|
|
3275
3273
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -3283,7 +3281,7 @@ function SwappedOrderTracker({
|
|
|
3283
3281
|
{
|
|
3284
3282
|
className: "rs-swapped-tracker-step-marker",
|
|
3285
3283
|
"aria-hidden": "true",
|
|
3286
|
-
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3284
|
+
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3287
3285
|
"svg",
|
|
3288
3286
|
{
|
|
3289
3287
|
className: "rs-swapped-tracker-step-ring",
|
|
@@ -3318,7 +3316,7 @@ function SwappedOrderTracker({
|
|
|
3318
3316
|
}
|
|
3319
3317
|
)
|
|
3320
3318
|
] }),
|
|
3321
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3319
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3322
3320
|
] });
|
|
3323
3321
|
}
|
|
3324
3322
|
function formatTrackerAmount(amount) {
|
|
@@ -3606,10 +3604,10 @@ function SwappedProviderStep({
|
|
|
3606
3604
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
3607
3605
|
if (cancelled) return;
|
|
3608
3606
|
const event = status.lastEvent;
|
|
3609
|
-
const eventTxHash =
|
|
3607
|
+
const eventTxHash = _chunkH4O22O7Ycjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkH4O22O7Ycjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
3610
3608
|
if (baselineDepositTxHashRef.current === void 0) {
|
|
3611
3609
|
baselineDepositTxHashRef.current = eventTxHash;
|
|
3612
|
-
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !
|
|
3610
|
+
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunkH4O22O7Ycjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
|
|
3613
3611
|
currentDepositTxHashRef.current = eventTxHash;
|
|
3614
3612
|
setLatestEvent(_nullishCoalesce(event, () => ( null)));
|
|
3615
3613
|
}
|
|
@@ -3684,10 +3682,10 @@ function SwappedProviderStep({
|
|
|
3684
3682
|
[orderState, latestEvent]
|
|
3685
3683
|
);
|
|
3686
3684
|
const terminalState = _react.useMemo.call(void 0, () => {
|
|
3687
|
-
if (
|
|
3685
|
+
if (_chunkH4O22O7Ycjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
3688
3686
|
return {
|
|
3689
3687
|
kind: "failed",
|
|
3690
|
-
message:
|
|
3688
|
+
message: _chunkH4O22O7Ycjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
3691
3689
|
};
|
|
3692
3690
|
}
|
|
3693
3691
|
if (_optionalChain([orderState, 'optionalAccess', _178 => _178.status]) === "order_cancelled") {
|
|
@@ -3713,7 +3711,7 @@ function SwappedProviderStep({
|
|
|
3713
3711
|
orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _183 => _183.orderCrypto]), () => ( null)),
|
|
3714
3712
|
// Base-unit source amount from the deposit row/event, consistent with the
|
|
3715
3713
|
// wallet/QR path. ProcessingStep + onLifecycle expect base units.
|
|
3716
|
-
amount: _nullishCoalesce(
|
|
3714
|
+
amount: _nullishCoalesce(_chunkH4O22O7Ycjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null)),
|
|
3717
3715
|
expectedOrderUuid: expectedOrderUuidRef.current,
|
|
3718
3716
|
initialEvent: _nullishCoalesce(latestEvent, () => ( void 0))
|
|
3719
3717
|
};
|
|
@@ -3724,14 +3722,14 @@ function SwappedProviderStep({
|
|
|
3724
3722
|
}, [latestEvent, orderState, smartAccount]);
|
|
3725
3723
|
_react.useEffect.call(void 0, () => {
|
|
3726
3724
|
if (failedFiredRef.current || completeFiredRef.current) return;
|
|
3727
|
-
if (!
|
|
3725
|
+
if (!_chunkH4O22O7Ycjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
|
|
3728
3726
|
const txHash = currentDepositTxHashRef.current;
|
|
3729
3727
|
if (!txHash) return;
|
|
3730
3728
|
failedFiredRef.current = true;
|
|
3731
3729
|
setPhase("tracker");
|
|
3732
3730
|
_optionalChain([onSwappedFailedRef, 'access', _184 => _184.current, 'optionalCall', _185 => _185(
|
|
3733
3731
|
txHash,
|
|
3734
|
-
|
|
3732
|
+
_chunkH4O22O7Ycjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
3735
3733
|
)]);
|
|
3736
3734
|
}, [latestEvent]);
|
|
3737
3735
|
const immersive = !openExternally && variant === "fiat" && phase === "provider" && !loadError;
|
|
@@ -3781,7 +3779,7 @@ function SwappedProviderStep({
|
|
|
3781
3779
|
}
|
|
3782
3780
|
)
|
|
3783
3781
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3784
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3782
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, {}),
|
|
3785
3783
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-swapped-handoff-text", children: [
|
|
3786
3784
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "rs-swapped-handoff-title", children: handoffOpened ? variant === "fiat" ? "Finish paying in your browser" : "Approve the transfer in your browser" : "Opening your browser\u2026" }),
|
|
3787
3785
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-swapped-handoff-subtitle", children: handoffOpened ? (
|
|
@@ -3805,7 +3803,7 @@ function SwappedProviderStep({
|
|
|
3805
3803
|
}
|
|
3806
3804
|
)
|
|
3807
3805
|
] }) }),
|
|
3808
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3806
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3809
3807
|
] });
|
|
3810
3808
|
}
|
|
3811
3809
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
@@ -3822,7 +3820,7 @@ function SwappedProviderStep({
|
|
|
3822
3820
|
}
|
|
3823
3821
|
)
|
|
3824
3822
|
] }),
|
|
3825
|
-
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3823
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, {}) }),
|
|
3826
3824
|
widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3827
3825
|
"iframe",
|
|
3828
3826
|
{
|
|
@@ -3845,11 +3843,11 @@ function SwappedProviderStep({
|
|
|
3845
3843
|
retryToken
|
|
3846
3844
|
)
|
|
3847
3845
|
] }) }),
|
|
3848
|
-
loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3846
|
+
loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3849
3847
|
] });
|
|
3850
3848
|
}
|
|
3851
3849
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
3852
|
-
if (
|
|
3850
|
+
if (_chunkH4O22O7Ycjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
3853
3851
|
return ["complete", "complete", "failed", "pending"];
|
|
3854
3852
|
}
|
|
3855
3853
|
if (swappedStatus === "order_cancelled") {
|
|
@@ -4059,7 +4057,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
4059
4057
|
function ExchangeLogo({ exchange }) {
|
|
4060
4058
|
const [failed, setFailed] = _react.useState.call(void 0, false);
|
|
4061
4059
|
if (!exchange.logoUrl || failed) {
|
|
4062
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4060
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BankIcon, {});
|
|
4063
4061
|
}
|
|
4064
4062
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4065
4063
|
"img",
|
|
@@ -4140,14 +4138,14 @@ function ExchangeSelectStep({
|
|
|
4140
4138
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
|
|
4141
4139
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4142
4140
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4143
|
-
|
|
4141
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
4144
4142
|
{
|
|
4145
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4143
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.UnplugIcon, {}),
|
|
4146
4144
|
title: "Connect exchange",
|
|
4147
4145
|
subtitle: "Select an exchange to connect"
|
|
4148
4146
|
}
|
|
4149
4147
|
),
|
|
4150
|
-
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4148
|
+
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, {}) }),
|
|
4151
4149
|
!loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
4152
4150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
4153
4151
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4173,7 +4171,7 @@ function ExchangeSelectStep({
|
|
|
4173
4171
|
)
|
|
4174
4172
|
] }),
|
|
4175
4173
|
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
4176
|
-
const brand =
|
|
4174
|
+
const brand = _chunkH4O22O7Ycjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
|
|
4177
4175
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4178
4176
|
"button",
|
|
4179
4177
|
{
|
|
@@ -4198,7 +4196,7 @@ function ExchangeSelectStep({
|
|
|
4198
4196
|
);
|
|
4199
4197
|
}) })
|
|
4200
4198
|
] }),
|
|
4201
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4199
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {}),
|
|
4202
4200
|
exchangeFeeBps > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "rs-exchange-select-fee-note", children: [
|
|
4203
4201
|
"A ",
|
|
4204
4202
|
formatFeeRate(exchangeFeeBps),
|
|
@@ -4236,7 +4234,7 @@ function SolanaTokenSelectStep({
|
|
|
4236
4234
|
setError(null);
|
|
4237
4235
|
const portfolioBySymbol = {};
|
|
4238
4236
|
try {
|
|
4239
|
-
|
|
4237
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
4240
4238
|
solanaAddress
|
|
4241
4239
|
});
|
|
4242
4240
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
@@ -4259,12 +4257,12 @@ function SolanaTokenSelectStep({
|
|
|
4259
4257
|
};
|
|
4260
4258
|
}
|
|
4261
4259
|
}
|
|
4262
|
-
|
|
4260
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
4263
4261
|
symbols: Object.keys(portfolioBySymbol)
|
|
4264
4262
|
});
|
|
4265
4263
|
} catch (err) {
|
|
4266
4264
|
if (!active) return;
|
|
4267
|
-
|
|
4265
|
+
_chunkH4O22O7Ycjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
4268
4266
|
solanaAddress
|
|
4269
4267
|
});
|
|
4270
4268
|
setError(
|
|
@@ -4311,7 +4309,7 @@ function SolanaTokenSelectStep({
|
|
|
4311
4309
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
4312
4310
|
const numeric = Number(raw);
|
|
4313
4311
|
if (!Number.isFinite(numeric)) return raw;
|
|
4314
|
-
return
|
|
4312
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
4315
4313
|
} catch (e27) {
|
|
4316
4314
|
return "--";
|
|
4317
4315
|
}
|
|
@@ -4321,20 +4319,20 @@ function SolanaTokenSelectStep({
|
|
|
4321
4319
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4322
4320
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
4323
4321
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4324
|
-
|
|
4322
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
4325
4323
|
{
|
|
4326
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4324
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
4327
4325
|
title: "Your assets",
|
|
4328
4326
|
subtitle: "Select source assets to transfer"
|
|
4329
4327
|
}
|
|
4330
4328
|
),
|
|
4331
4329
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
4332
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4330
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, { className: "rs-text-tertiary" }),
|
|
4333
4331
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
4334
4332
|
] }),
|
|
4335
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4333
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
4336
4334
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
4337
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4335
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
4338
4336
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
4339
4337
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
4340
4338
|
solanaAddress.slice(0, 6),
|
|
@@ -4365,13 +4363,13 @@ function SolanaTokenSelectStep({
|
|
|
4365
4363
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
4366
4364
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
4367
4365
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4368
|
-
|
|
4366
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
4369
4367
|
{
|
|
4370
4368
|
symbol: entry.token.symbol,
|
|
4371
4369
|
fallback: entry.token.symbol.slice(0, 4)
|
|
4372
4370
|
}
|
|
4373
4371
|
) }),
|
|
4374
|
-
chainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4372
|
+
chainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: chainIcon, alt: chainName }) })
|
|
4375
4373
|
] }),
|
|
4376
4374
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-text", children: [
|
|
4377
4375
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-name-row", children: [
|
|
@@ -4388,14 +4386,14 @@ function SolanaTokenSelectStep({
|
|
|
4388
4386
|
] })
|
|
4389
4387
|
] })
|
|
4390
4388
|
] }),
|
|
4391
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ?
|
|
4389
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkH4O22O7Ycjs.currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
4392
4390
|
]
|
|
4393
4391
|
},
|
|
4394
4392
|
entry.token.symbol
|
|
4395
4393
|
);
|
|
4396
4394
|
}) }),
|
|
4397
4395
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4398
|
-
|
|
4396
|
+
_chunkH4O22O7Ycjs.Button,
|
|
4399
4397
|
{
|
|
4400
4398
|
onClick: () => selectedEntry && onContinue(
|
|
4401
4399
|
selectedEntry.token,
|
|
@@ -4408,7 +4406,7 @@ function SolanaTokenSelectStep({
|
|
|
4408
4406
|
}
|
|
4409
4407
|
)
|
|
4410
4408
|
] }),
|
|
4411
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4409
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
4412
4410
|
] });
|
|
4413
4411
|
}
|
|
4414
4412
|
|
|
@@ -4460,7 +4458,7 @@ function SolanaAmountStep({
|
|
|
4460
4458
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
4461
4459
|
const numeric = Number(raw);
|
|
4462
4460
|
if (!Number.isFinite(numeric)) return raw;
|
|
4463
|
-
return
|
|
4461
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
4464
4462
|
} catch (e29) {
|
|
4465
4463
|
return "\u2026";
|
|
4466
4464
|
}
|
|
@@ -4553,7 +4551,7 @@ function SolanaAmountStep({
|
|
|
4553
4551
|
const handlePresetClick = (percentage) => {
|
|
4554
4552
|
const formatted = computePresetAmount(percentage);
|
|
4555
4553
|
if (!formatted) return;
|
|
4556
|
-
|
|
4554
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
4557
4555
|
percentage,
|
|
4558
4556
|
symbol: token.symbol,
|
|
4559
4557
|
formatted
|
|
@@ -4588,7 +4586,7 @@ function SolanaAmountStep({
|
|
|
4588
4586
|
try {
|
|
4589
4587
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
4590
4588
|
} catch (e34) {
|
|
4591
|
-
|
|
4589
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
4592
4590
|
amount,
|
|
4593
4591
|
sourceAmount: sourceAmountStr,
|
|
4594
4592
|
reason: "parse-units-failed"
|
|
@@ -4603,7 +4601,7 @@ function SolanaAmountStep({
|
|
|
4603
4601
|
);
|
|
4604
4602
|
return;
|
|
4605
4603
|
}
|
|
4606
|
-
|
|
4604
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
4607
4605
|
symbol: token.symbol,
|
|
4608
4606
|
inputAmountUsd: amount,
|
|
4609
4607
|
sourceAmount: sourceAmountStr,
|
|
@@ -4616,7 +4614,7 @@ function SolanaAmountStep({
|
|
|
4616
4614
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
4617
4615
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4618
4616
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4619
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4617
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
4620
4618
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
4621
4619
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
4622
4620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4636,13 +4634,13 @@ function SolanaAmountStep({
|
|
|
4636
4634
|
" available",
|
|
4637
4635
|
computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
4638
4636
|
" (~",
|
|
4639
|
-
|
|
4637
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(computedBalanceUsd),
|
|
4640
4638
|
")"
|
|
4641
4639
|
] })
|
|
4642
4640
|
] }),
|
|
4643
4641
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
4644
4642
|
"Min. deposit ",
|
|
4645
|
-
|
|
4643
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(minDepositUsd)
|
|
4646
4644
|
] })
|
|
4647
4645
|
] })
|
|
4648
4646
|
] }),
|
|
@@ -4665,7 +4663,7 @@ function SolanaAmountStep({
|
|
|
4665
4663
|
"Solana ",
|
|
4666
4664
|
token.symbol
|
|
4667
4665
|
] }),
|
|
4668
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4666
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: token.symbol }) })
|
|
4669
4667
|
] })
|
|
4670
4668
|
] }),
|
|
4671
4669
|
targetChainName && targetTokenSymbol && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
@@ -4676,17 +4674,17 @@ function SolanaAmountStep({
|
|
|
4676
4674
|
" ",
|
|
4677
4675
|
targetTokenSymbol
|
|
4678
4676
|
] }),
|
|
4679
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4677
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.TokenIcon, { symbol: targetTokenSymbol }) })
|
|
4680
4678
|
] })
|
|
4681
4679
|
] }),
|
|
4682
4680
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
4683
4681
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
4684
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
4682
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkH4O22O7Ycjs.currencyFormatter.format(balanceAfterUsd) })
|
|
4685
4683
|
] })
|
|
4686
4684
|
] }),
|
|
4687
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4685
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
4688
4686
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4689
|
-
|
|
4687
|
+
_chunkH4O22O7Ycjs.Button,
|
|
4690
4688
|
{
|
|
4691
4689
|
onClick: handleContinue,
|
|
4692
4690
|
fullWidth: true,
|
|
@@ -4695,7 +4693,7 @@ function SolanaAmountStep({
|
|
|
4695
4693
|
}
|
|
4696
4694
|
)
|
|
4697
4695
|
] }),
|
|
4698
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
4699
4697
|
] });
|
|
4700
4698
|
}
|
|
4701
4699
|
|
|
@@ -4715,10 +4713,10 @@ function loadSolanaDependencies() {
|
|
|
4715
4713
|
return dependenciesPromise2;
|
|
4716
4714
|
}
|
|
4717
4715
|
function getSolanaRpcUrl(rpcUrls) {
|
|
4718
|
-
return _nullishCoalesce(
|
|
4716
|
+
return _nullishCoalesce(_chunkH4O22O7Ycjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
|
|
4719
4717
|
}
|
|
4720
4718
|
function hasConfiguredSolanaRpcUrl(rpcUrls) {
|
|
4721
|
-
return
|
|
4719
|
+
return _chunkH4O22O7Ycjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
|
|
4722
4720
|
}
|
|
4723
4721
|
async function getSolanaConnection(rpcUrls) {
|
|
4724
4722
|
const rpcUrl = getSolanaRpcUrl(rpcUrls);
|
|
@@ -4835,7 +4833,7 @@ function SolanaConfirmStep({
|
|
|
4835
4833
|
onSubmittingChange,
|
|
4836
4834
|
debug
|
|
4837
4835
|
}) {
|
|
4838
|
-
const rpcUrls =
|
|
4836
|
+
const rpcUrls = _chunkH4O22O7Ycjs.useRpcUrls.call(void 0, );
|
|
4839
4837
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
4840
4838
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
4841
4839
|
const onSubmittingChangeRef = _react.useRef.call(void 0, onSubmittingChange);
|
|
@@ -4852,26 +4850,26 @@ function SolanaConfirmStep({
|
|
|
4852
4850
|
const targetChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, targetChainId);
|
|
4853
4851
|
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _213 => _213.feeSponsored]), () => ( false));
|
|
4854
4852
|
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _214 => _214.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
4855
|
-
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(
|
|
4853
|
+
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkH4O22O7Ycjs.formatTokenAmount.call(void 0, Number(sourceAmount), token.symbol), () => ( "0")) : "0";
|
|
4856
4854
|
const receiveDisplay = (() => {
|
|
4857
4855
|
const usdValue = Number(targetAmount);
|
|
4858
4856
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
4859
|
-
const estimate =
|
|
4857
|
+
const estimate = _chunkH4O22O7Ycjs.formatReceiveEstimate.call(void 0, {
|
|
4860
4858
|
sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
|
|
4861
4859
|
sourceSymbol: token.symbol,
|
|
4862
4860
|
targetSymbol,
|
|
4863
4861
|
sourceAmountUsd,
|
|
4864
|
-
sourceTrusted:
|
|
4862
|
+
sourceTrusted: _chunkH4O22O7Ycjs.isRecognizedToken.call(void 0, token.mint, "solana"),
|
|
4865
4863
|
// Curated stablecoin target estimates at $1 when unquoted; never applied
|
|
4866
4864
|
// to the source (a held token). See ConfirmStep for the rationale.
|
|
4867
|
-
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } :
|
|
4865
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : _chunkH4O22O7Ycjs.isDisplayStablecoinSymbol.call(void 0, targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
|
|
4868
4866
|
});
|
|
4869
4867
|
if (estimate !== void 0) return estimate;
|
|
4870
4868
|
return targetSymbol;
|
|
4871
4869
|
})();
|
|
4872
4870
|
const handleConfirm = async () => {
|
|
4873
4871
|
if (!solanaProvider) {
|
|
4874
|
-
|
|
4872
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
4875
4873
|
reason: "missing-provider"
|
|
4876
4874
|
});
|
|
4877
4875
|
setError("Solana wallet not connected");
|
|
@@ -4879,7 +4877,7 @@ function SolanaConfirmStep({
|
|
|
4879
4877
|
}
|
|
4880
4878
|
const parsedAmount = parseFloat(sourceAmount);
|
|
4881
4879
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
4882
|
-
|
|
4880
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
4883
4881
|
reason: "invalid-amount",
|
|
4884
4882
|
sourceAmount
|
|
4885
4883
|
});
|
|
@@ -4888,7 +4886,7 @@ function SolanaConfirmStep({
|
|
|
4888
4886
|
}
|
|
4889
4887
|
setError(null);
|
|
4890
4888
|
setIsSubmitting(true);
|
|
4891
|
-
|
|
4889
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
4892
4890
|
smartAccount,
|
|
4893
4891
|
solanaAddress,
|
|
4894
4892
|
solanaDepositAddress,
|
|
@@ -4898,7 +4896,7 @@ function SolanaConfirmStep({
|
|
|
4898
4896
|
});
|
|
4899
4897
|
try {
|
|
4900
4898
|
const check = await service.checkAccount(smartAccount);
|
|
4901
|
-
|
|
4899
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
4902
4900
|
smartAccount,
|
|
4903
4901
|
isRegistered: check.isRegistered,
|
|
4904
4902
|
targetChain: check.targetChain,
|
|
@@ -4911,7 +4909,7 @@ function SolanaConfirmStep({
|
|
|
4911
4909
|
}
|
|
4912
4910
|
const connection = await (hasConfiguredSolanaRpcUrl(rpcUrls) ? getSolanaConnection(rpcUrls) : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection(rpcUrls))));
|
|
4913
4911
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
4914
|
-
|
|
4912
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
4915
4913
|
token: token.symbol,
|
|
4916
4914
|
sourceAmount,
|
|
4917
4915
|
amountUnits: amountUnits.toString()
|
|
@@ -4928,7 +4926,7 @@ function SolanaConfirmStep({
|
|
|
4928
4926
|
token.mint,
|
|
4929
4927
|
amountUnits
|
|
4930
4928
|
);
|
|
4931
|
-
|
|
4929
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
4932
4930
|
token: token.symbol,
|
|
4933
4931
|
instructionCount: transaction.instructions.length,
|
|
4934
4932
|
feePayer: _optionalChain([transaction, 'access', _215 => _215.feePayer, 'optionalAccess', _216 => _216.toBase58, 'call', _217 => _217()]),
|
|
@@ -4939,7 +4937,7 @@ function SolanaConfirmStep({
|
|
|
4939
4937
|
connection,
|
|
4940
4938
|
transaction
|
|
4941
4939
|
);
|
|
4942
|
-
|
|
4940
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
4943
4941
|
txHash,
|
|
4944
4942
|
amountUnits: amountUnits.toString()
|
|
4945
4943
|
});
|
|
@@ -4951,8 +4949,8 @@ function SolanaConfirmStep({
|
|
|
4951
4949
|
});
|
|
4952
4950
|
} catch (err) {
|
|
4953
4951
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
4954
|
-
const message =
|
|
4955
|
-
|
|
4952
|
+
const message = _chunkH4O22O7Ycjs.formatUserError.call(void 0, raw);
|
|
4953
|
+
_chunkH4O22O7Ycjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
4956
4954
|
smartAccount,
|
|
4957
4955
|
token: token.symbol,
|
|
4958
4956
|
sourceAmount
|
|
@@ -4965,7 +4963,7 @@ function SolanaConfirmStep({
|
|
|
4965
4963
|
};
|
|
4966
4964
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4967
4965
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4968
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4966
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}), title: "Review deposit" }),
|
|
4969
4967
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4970
4968
|
ReviewDetails,
|
|
4971
4969
|
{
|
|
@@ -4981,9 +4979,9 @@ function SolanaConfirmStep({
|
|
|
4981
4979
|
fee: { display: "$0.04", struck: feeSponsored, tooltip: feeTooltip }
|
|
4982
4980
|
}
|
|
4983
4981
|
),
|
|
4984
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4982
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
4985
4983
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4986
|
-
|
|
4984
|
+
_chunkH4O22O7Ycjs.Button,
|
|
4987
4985
|
{
|
|
4988
4986
|
onClick: handleConfirm,
|
|
4989
4987
|
loading: isSubmitting,
|
|
@@ -4994,7 +4992,7 @@ function SolanaConfirmStep({
|
|
|
4994
4992
|
}
|
|
4995
4993
|
)
|
|
4996
4994
|
] }),
|
|
4997
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4995
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
4998
4996
|
] });
|
|
4999
4997
|
}
|
|
5000
4998
|
|
|
@@ -5009,19 +5007,19 @@ function DappImportAssetSelectStep({
|
|
|
5009
5007
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
5010
5008
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
5011
5009
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5012
|
-
|
|
5010
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
5013
5011
|
{
|
|
5014
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5012
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
5015
5013
|
title: `Transfer from ${sourceLabel}`,
|
|
5016
5014
|
subtitle: "Pick the balance to import"
|
|
5017
5015
|
}
|
|
5018
5016
|
),
|
|
5019
5017
|
incompleteSummary && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-notice", role: "status", children: incompleteSummary }),
|
|
5020
5018
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
5021
|
-
const tokenAmount = asset.balance ?
|
|
5019
|
+
const tokenAmount = asset.balance ? _chunkH4O22O7Ycjs.tokenFormatter.format(
|
|
5022
5020
|
Number(asset.balance) / 10 ** asset.decimals
|
|
5023
5021
|
) : "0";
|
|
5024
|
-
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ?
|
|
5022
|
+
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkH4O22O7Ycjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
|
|
5025
5023
|
const assetIcon = asset.icon;
|
|
5026
5024
|
const chainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, asset.chainId);
|
|
5027
5025
|
const badge = _chunkOY5N3E6Lcjs.getChainBadge.call(void 0, asset.chainId);
|
|
@@ -5034,14 +5032,14 @@ function DappImportAssetSelectStep({
|
|
|
5034
5032
|
children: [
|
|
5035
5033
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
5036
5034
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
5037
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5038
|
-
|
|
5035
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: assetIcon, alt: asset.symbol }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5036
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
5039
5037
|
{
|
|
5040
5038
|
symbol: asset.symbol,
|
|
5041
5039
|
fallback: asset.symbol.slice(0, 4)
|
|
5042
5040
|
}
|
|
5043
5041
|
) }),
|
|
5044
|
-
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5042
|
+
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CdnIcon, { src: chainIcon, alt: _chunkOY5N3E6Lcjs.getChainName.call(void 0, asset.chainId) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5045
5043
|
"span",
|
|
5046
5044
|
{
|
|
5047
5045
|
className: "rs-asset-chain-badge",
|
|
@@ -5073,7 +5071,7 @@ function DappImportAssetSelectStep({
|
|
|
5073
5071
|
);
|
|
5074
5072
|
}) })
|
|
5075
5073
|
] }),
|
|
5076
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5074
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
5077
5075
|
] });
|
|
5078
5076
|
}
|
|
5079
5077
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
@@ -5095,7 +5093,7 @@ function describeRow(status, comingSoon) {
|
|
|
5095
5093
|
}
|
|
5096
5094
|
if (status.enabled) {
|
|
5097
5095
|
return {
|
|
5098
|
-
subtitle: status.balanceUsd > 0 ?
|
|
5096
|
+
subtitle: status.balanceUsd > 0 ? _chunkH4O22O7Ycjs.currencyFormatter.format(status.balanceUsd) : "No balance",
|
|
5099
5097
|
disabled: false,
|
|
5100
5098
|
busy: false
|
|
5101
5099
|
};
|
|
@@ -5118,9 +5116,9 @@ function DappImportSelectStep({
|
|
|
5118
5116
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
5119
5117
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
5120
5118
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5121
|
-
|
|
5119
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
5122
5120
|
{
|
|
5123
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5121
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.MigrateAssetsIcon, {}),
|
|
5124
5122
|
title: "Migrate assets",
|
|
5125
5123
|
subtitle: "Select a position to migrate"
|
|
5126
5124
|
}
|
|
@@ -5132,13 +5130,13 @@ function DappImportSelectStep({
|
|
|
5132
5130
|
Boolean(brand.comingSoon)
|
|
5133
5131
|
);
|
|
5134
5132
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5135
|
-
|
|
5133
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
5136
5134
|
{
|
|
5137
5135
|
leadingMedia: brand.iconUrl,
|
|
5138
5136
|
title: brand.label,
|
|
5139
5137
|
subtitle,
|
|
5140
5138
|
disabled,
|
|
5141
|
-
trailing: busy ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5139
|
+
trailing: busy ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, { className: "rs-spinner--sm" }) : void 0,
|
|
5142
5140
|
onClick: () => {
|
|
5143
5141
|
if (status === "needs-connect") {
|
|
5144
5142
|
_optionalChain([onRequestConnect, 'optionalCall', _219 => _219()]);
|
|
@@ -5151,7 +5149,7 @@ function DappImportSelectStep({
|
|
|
5151
5149
|
);
|
|
5152
5150
|
}) })
|
|
5153
5151
|
] }),
|
|
5154
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5152
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
5155
5153
|
] });
|
|
5156
5154
|
}
|
|
5157
5155
|
DappImportSelectStep.displayName = "DappImportSelectStep";
|
|
@@ -5168,9 +5166,9 @@ function DappImportAssetSelectSkeleton({
|
|
|
5168
5166
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
5169
5167
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
5170
5168
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5171
|
-
|
|
5169
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
5172
5170
|
{
|
|
5173
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5171
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
5174
5172
|
title: `Transfer from ${sourceLabel}`,
|
|
5175
5173
|
subtitle: "Pick the balance to import"
|
|
5176
5174
|
}
|
|
@@ -5208,7 +5206,7 @@ function DappImportAssetSelectSkeleton({
|
|
|
5208
5206
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Try again" })
|
|
5209
5207
|
}
|
|
5210
5208
|
) }),
|
|
5211
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5209
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
5212
5210
|
] });
|
|
5213
5211
|
}
|
|
5214
5212
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -6097,7 +6095,7 @@ function DepositAnalyticsControllerProvider({
|
|
|
6097
6095
|
children,
|
|
6098
6096
|
controllerRef
|
|
6099
6097
|
}) {
|
|
6100
|
-
const emit =
|
|
6098
|
+
const emit = _chunkH4O22O7Ycjs.useDepositAnalyticsEmitter.call(void 0, );
|
|
6101
6099
|
const controller = _react.useMemo.call(void 0,
|
|
6102
6100
|
() => createDepositAnalyticsController(emit),
|
|
6103
6101
|
[emit]
|
|
@@ -7422,11 +7420,11 @@ function DepositFlow({
|
|
|
7422
7420
|
onError,
|
|
7423
7421
|
debug
|
|
7424
7422
|
}) {
|
|
7425
|
-
const rpcUrls =
|
|
7426
|
-
const onStepChangeRef =
|
|
7423
|
+
const rpcUrls = _chunkH4O22O7Ycjs.useRpcUrls.call(void 0, );
|
|
7424
|
+
const onStepChangeRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onStepChange);
|
|
7427
7425
|
const analytics = useDepositAnalyticsController();
|
|
7428
|
-
const onLifecycleRef =
|
|
7429
|
-
const onErrorRef =
|
|
7426
|
+
const onLifecycleRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onLifecycle);
|
|
7427
|
+
const onErrorRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onError);
|
|
7430
7428
|
const storeApi = useDepositStoreApi();
|
|
7431
7429
|
const flowSlice = useDepositStore((s) => s.flow);
|
|
7432
7430
|
const depositSlice = useDepositStore((s) => s.deposit);
|
|
@@ -7443,13 +7441,13 @@ function DepositFlow({
|
|
|
7443
7441
|
const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
|
|
7444
7442
|
const logFlow = _react.useCallback.call(void 0,
|
|
7445
7443
|
(message, data) => {
|
|
7446
|
-
|
|
7444
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
7447
7445
|
},
|
|
7448
7446
|
[debug]
|
|
7449
7447
|
);
|
|
7450
7448
|
const logFlowError = _react.useCallback.call(void 0,
|
|
7451
7449
|
(message, error, data) => {
|
|
7452
|
-
|
|
7450
|
+
_chunkH4O22O7Ycjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
7453
7451
|
},
|
|
7454
7452
|
[debug]
|
|
7455
7453
|
);
|
|
@@ -7581,7 +7579,7 @@ function DepositFlow({
|
|
|
7581
7579
|
return;
|
|
7582
7580
|
}
|
|
7583
7581
|
let cancelled = false;
|
|
7584
|
-
|
|
7582
|
+
_chunkH4O22O7Ycjs.fetchTokenPriceUsd.call(void 0, service, {
|
|
7585
7583
|
chainId: targetChainId,
|
|
7586
7584
|
address: targetToken,
|
|
7587
7585
|
symbol: targetSymbol
|
|
@@ -7602,7 +7600,7 @@ function DepositFlow({
|
|
|
7602
7600
|
return {
|
|
7603
7601
|
ownerAddress: walletClientProp.account.address,
|
|
7604
7602
|
walletClient: walletClientProp,
|
|
7605
|
-
publicClient: _nullishCoalesce(publicClientProp, () => (
|
|
7603
|
+
publicClient: _nullishCoalesce(publicClientProp, () => ( _chunkH4O22O7Ycjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
7606
7604
|
switchChain: dappSwitchChain
|
|
7607
7605
|
};
|
|
7608
7606
|
}
|
|
@@ -7619,7 +7617,7 @@ function DepositFlow({
|
|
|
7619
7617
|
return {
|
|
7620
7618
|
ownerAddress: walletClientProp.account.address,
|
|
7621
7619
|
walletClient: walletClientProp,
|
|
7622
|
-
publicClient: _nullishCoalesce(publicClientProp, () => (
|
|
7620
|
+
publicClient: _nullishCoalesce(publicClientProp, () => ( _chunkH4O22O7Ycjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
7623
7621
|
switchChain: dappSwitchChain
|
|
7624
7622
|
};
|
|
7625
7623
|
}
|
|
@@ -7627,7 +7625,7 @@ function DepositFlow({
|
|
|
7627
7625
|
return {
|
|
7628
7626
|
ownerAddress: walletSession.address,
|
|
7629
7627
|
walletClient: walletSession.walletClient,
|
|
7630
|
-
publicClient: _nullishCoalesce(walletSession.publicClient, () => (
|
|
7628
|
+
publicClient: _nullishCoalesce(walletSession.publicClient, () => ( _chunkH4O22O7Ycjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
|
|
7631
7629
|
switchChain: walletSession.switchChain
|
|
7632
7630
|
};
|
|
7633
7631
|
}
|
|
@@ -7848,7 +7846,7 @@ function DepositFlow({
|
|
|
7848
7846
|
setQrSourcePrice({ resolved: false, usd: null });
|
|
7849
7847
|
if (!qrSourceAsset) return;
|
|
7850
7848
|
let cancelled = false;
|
|
7851
|
-
|
|
7849
|
+
_chunkH4O22O7Ycjs.fetchTokenPriceUsd.call(void 0, service, {
|
|
7852
7850
|
chainId: qrSourceAsset.chainId,
|
|
7853
7851
|
address: qrSourceAsset.token,
|
|
7854
7852
|
symbol: qrSourceAsset.symbol
|
|
@@ -8034,7 +8032,7 @@ function DepositFlow({
|
|
|
8034
8032
|
eoa: dappImportOwner,
|
|
8035
8033
|
getPublicClient: (chainId) => {
|
|
8036
8034
|
try {
|
|
8037
|
-
return
|
|
8035
|
+
return _chunkH4O22O7Ycjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
8038
8036
|
} catch (e38) {
|
|
8039
8037
|
return null;
|
|
8040
8038
|
}
|
|
@@ -8304,7 +8302,7 @@ function DepositFlow({
|
|
|
8304
8302
|
acceptedExchangeFeeBps: disclosedFeeBps
|
|
8305
8303
|
});
|
|
8306
8304
|
} catch (error) {
|
|
8307
|
-
if (error instanceof
|
|
8305
|
+
if (error instanceof _chunkH4O22O7Ycjs.SwappedConnectFeeChangedError) {
|
|
8308
8306
|
return error.exchangeFeeBps;
|
|
8309
8307
|
}
|
|
8310
8308
|
throw error;
|
|
@@ -8545,17 +8543,17 @@ function DepositFlow({
|
|
|
8545
8543
|
forceRegister
|
|
8546
8544
|
]
|
|
8547
8545
|
);
|
|
8548
|
-
const desiredSetupRequestKey =
|
|
8546
|
+
const desiredSetupRequestKey = _chunkH4O22O7Ycjs.computeRequestKey.call(void 0, setupInput);
|
|
8549
8547
|
const setupReady = setupSlice.status === "ready" && setupSlice.requestKey === desiredSetupRequestKey;
|
|
8550
8548
|
_react.useEffect.call(void 0, () => {
|
|
8551
8549
|
void (async () => {
|
|
8552
|
-
const requestKey =
|
|
8553
|
-
const cacheKey =
|
|
8554
|
-
const cacheable =
|
|
8550
|
+
const requestKey = _chunkH4O22O7Ycjs.computeRequestKey.call(void 0, setupInput);
|
|
8551
|
+
const cacheKey = _chunkH4O22O7Ycjs.computeCacheKey.call(void 0, setupInput);
|
|
8552
|
+
const cacheable = _chunkH4O22O7Ycjs.computeIsCacheable.call(void 0, setupInput);
|
|
8555
8553
|
if (storeApi.getState().setup.requestKey === requestKey) {
|
|
8556
8554
|
return;
|
|
8557
8555
|
}
|
|
8558
|
-
const dedupedResult =
|
|
8556
|
+
const dedupedResult = _chunkH4O22O7Ycjs.readDedupedAccountSetupResult.call(void 0, requestKey);
|
|
8559
8557
|
if (dedupedResult) {
|
|
8560
8558
|
storeApi.dispatch({
|
|
8561
8559
|
type: "setup/started",
|
|
@@ -8581,7 +8579,7 @@ function DepositFlow({
|
|
|
8581
8579
|
cacheable
|
|
8582
8580
|
});
|
|
8583
8581
|
try {
|
|
8584
|
-
const result = await
|
|
8582
|
+
const result = await _chunkH4O22O7Ycjs.runAccountSetupDeduped.call(void 0,
|
|
8585
8583
|
setupInput,
|
|
8586
8584
|
{ service, debug },
|
|
8587
8585
|
requestKey
|
|
@@ -8596,7 +8594,7 @@ function DepositFlow({
|
|
|
8596
8594
|
}
|
|
8597
8595
|
});
|
|
8598
8596
|
} catch (error) {
|
|
8599
|
-
const message = error instanceof
|
|
8597
|
+
const message = error instanceof _chunkH4O22O7Ycjs.SetupError ? error.message : "Deposit service is temporarily unavailable. Please try again shortly.";
|
|
8600
8598
|
storeApi.dispatch({
|
|
8601
8599
|
type: "setup/failed",
|
|
8602
8600
|
requestKey,
|
|
@@ -8645,7 +8643,7 @@ function DepositFlow({
|
|
|
8645
8643
|
address,
|
|
8646
8644
|
requestId,
|
|
8647
8645
|
totalUsd: portfolio.totalUsd,
|
|
8648
|
-
chainIds:
|
|
8646
|
+
chainIds: _chunkH4O22O7Ycjs.chainIdsByValue.call(void 0, portfolio.tokens)
|
|
8649
8647
|
});
|
|
8650
8648
|
} catch (e39) {
|
|
8651
8649
|
storeApi.dispatch({
|
|
@@ -9204,7 +9202,7 @@ function DepositFlow({
|
|
|
9204
9202
|
}
|
|
9205
9203
|
),
|
|
9206
9204
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9207
|
-
|
|
9205
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9208
9206
|
{
|
|
9209
9207
|
smartAccount: step.smartAccount,
|
|
9210
9208
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -9284,7 +9282,7 @@ function DepositFlow({
|
|
|
9284
9282
|
}
|
|
9285
9283
|
),
|
|
9286
9284
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9287
|
-
|
|
9285
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9288
9286
|
{
|
|
9289
9287
|
smartAccount: step.smartAccount,
|
|
9290
9288
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -9413,7 +9411,7 @@ function DepositFlow({
|
|
|
9413
9411
|
) })
|
|
9414
9412
|
] }) : null,
|
|
9415
9413
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9416
|
-
|
|
9414
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9417
9415
|
{
|
|
9418
9416
|
smartAccount: effectiveStep.smartAccount,
|
|
9419
9417
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -9502,7 +9500,7 @@ function DepositFlow({
|
|
|
9502
9500
|
if (_optionalChain([signerContext, 'access', _332 => _332.publicClient, 'access', _333 => _333.chain, 'optionalAccess', _334 => _334.id]) === chainId) {
|
|
9503
9501
|
return signerContext.publicClient;
|
|
9504
9502
|
}
|
|
9505
|
-
return
|
|
9503
|
+
return _chunkH4O22O7Ycjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
9506
9504
|
};
|
|
9507
9505
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
9508
9506
|
effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -9605,7 +9603,7 @@ function DepositFlow({
|
|
|
9605
9603
|
}
|
|
9606
9604
|
),
|
|
9607
9605
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9608
|
-
|
|
9606
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9609
9607
|
{
|
|
9610
9608
|
smartAccount: effectiveStep.smartAccount,
|
|
9611
9609
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -9645,7 +9643,7 @@ function DepositFlow({
|
|
|
9645
9643
|
|
|
9646
9644
|
var ReownDepositInner = _react.lazy.call(void 0, async () => {
|
|
9647
9645
|
await loadReownDependencies();
|
|
9648
|
-
const module = await Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
9646
|
+
const module = await Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-IFN6YLZJ.cjs")));
|
|
9649
9647
|
return { default: module.DepositModalReown };
|
|
9650
9648
|
});
|
|
9651
9649
|
function buildDepositAnalyticsSessionProperties({
|
|
@@ -9694,7 +9692,7 @@ function buildDepositAnalyticsSessionProperties({
|
|
|
9694
9692
|
amount: defaultAmount !== void 0,
|
|
9695
9693
|
initial_asset_migration: initialAssetMigration !== void 0
|
|
9696
9694
|
},
|
|
9697
|
-
...
|
|
9695
|
+
..._chunkH4O22O7Ycjs.analyticsTargetProperties.call(void 0, { targetChain, targetToken })
|
|
9698
9696
|
};
|
|
9699
9697
|
}
|
|
9700
9698
|
var WALLET_CLIENT_PROP = "walletClient";
|
|
@@ -9702,8 +9700,8 @@ function hasSuppliedWalletClient(props) {
|
|
|
9702
9700
|
return Object.prototype.hasOwnProperty.call(props, WALLET_CLIENT_PROP);
|
|
9703
9701
|
}
|
|
9704
9702
|
function DepositModal(props) {
|
|
9705
|
-
|
|
9706
|
-
|
|
9703
|
+
_chunkH4O22O7Ycjs.warnRemovedProps.call(void 0, "DepositModal", props);
|
|
9704
|
+
_chunkH4O22O7Ycjs.checkBackendUrl.call(void 0, "DepositModal", props.backendUrl);
|
|
9707
9705
|
const needsReown = !!props.reownAppId;
|
|
9708
9706
|
const hasWalletClientProp = hasSuppliedWalletClient(props);
|
|
9709
9707
|
if (needsReown) {
|
|
@@ -9775,8 +9773,8 @@ function DepositModalInner({
|
|
|
9775
9773
|
const analyticsControllerRef = _react.useRef.call(void 0, null);
|
|
9776
9774
|
const analyticsSessionIdRef = _react.useRef.call(void 0, null);
|
|
9777
9775
|
const previousOpenRef = _react.useRef.call(void 0, isOpen);
|
|
9778
|
-
const onReadyRef =
|
|
9779
|
-
const onUiStateRef =
|
|
9776
|
+
const onReadyRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onReady);
|
|
9777
|
+
const onUiStateRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onUiState);
|
|
9780
9778
|
const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
|
|
9781
9779
|
const [swappedImmersive, setSwappedImmersive] = _react.useState.call(void 0, false);
|
|
9782
9780
|
const [submitting, setSubmitting] = _react.useState.call(void 0, false);
|
|
@@ -9784,30 +9782,30 @@ function DepositModalInner({
|
|
|
9784
9782
|
void 0
|
|
9785
9783
|
);
|
|
9786
9784
|
const [processingSettled, setProcessingSettled] = _react.useState.call(void 0, false);
|
|
9787
|
-
const historyButtonVisible =
|
|
9785
|
+
const historyButtonVisible = _chunkH4O22O7Ycjs.isHistoryEntryVisible.call(void 0, {
|
|
9788
9786
|
screen: currentScreen,
|
|
9789
9787
|
submitting,
|
|
9790
9788
|
settled: processingSettled
|
|
9791
9789
|
});
|
|
9792
9790
|
const targetChain = typeof targetChainProp === "string" ? targetChainProp : _chunkOY5N3E6Lcjs.getChainId.call(void 0, targetChainProp);
|
|
9793
9791
|
const sourceChain = sourceChainProp ? _chunkOY5N3E6Lcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
9794
|
-
const rpcUrls =
|
|
9792
|
+
const rpcUrls = _chunkH4O22O7Ycjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
9795
9793
|
const service = _react.useMemo.call(void 0,
|
|
9796
|
-
() =>
|
|
9794
|
+
() => _chunkH4O22O7Ycjs.createDepositService.call(void 0, backendUrl, {
|
|
9797
9795
|
debug,
|
|
9798
9796
|
debugScope: "service:deposit"
|
|
9799
9797
|
}),
|
|
9800
9798
|
[backendUrl, debug]
|
|
9801
9799
|
);
|
|
9802
9800
|
const historyAnalytics = _react.useMemo.call(void 0,
|
|
9803
|
-
() =>
|
|
9801
|
+
() => _chunkH4O22O7Ycjs.createHistoryAnalytics.call(void 0, {
|
|
9804
9802
|
modal: "deposit",
|
|
9805
9803
|
controllerRef: analyticsControllerRef,
|
|
9806
9804
|
sessionIdRef: analyticsSessionIdRef
|
|
9807
9805
|
}),
|
|
9808
9806
|
[]
|
|
9809
9807
|
);
|
|
9810
|
-
const history =
|
|
9808
|
+
const history = _chunkH4O22O7Ycjs.useHistoryPanel.call(void 0, {
|
|
9811
9809
|
isOpen,
|
|
9812
9810
|
recipient,
|
|
9813
9811
|
service,
|
|
@@ -9847,7 +9845,7 @@ function DepositModalInner({
|
|
|
9847
9845
|
}, [store, targetChain, targetToken]);
|
|
9848
9846
|
_react.useEffect.call(void 0, () => {
|
|
9849
9847
|
if (!isOpen || !modalRef.current) return;
|
|
9850
|
-
return
|
|
9848
|
+
return _chunkH4O22O7Ycjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
9851
9849
|
}, [isOpen, theme]);
|
|
9852
9850
|
_react.useEffect.call(void 0, () => {
|
|
9853
9851
|
if (isOpen) {
|
|
@@ -9876,7 +9874,7 @@ function DepositModalInner({
|
|
|
9876
9874
|
},
|
|
9877
9875
|
[]
|
|
9878
9876
|
);
|
|
9879
|
-
const onLifecycleRef =
|
|
9877
|
+
const onLifecycleRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onLifecycle);
|
|
9880
9878
|
const handleLifecycle = _react.useCallback.call(void 0,
|
|
9881
9879
|
(event) => {
|
|
9882
9880
|
_optionalChain([onLifecycleRef, 'access', _345 => _345.current, 'optionalCall', _346 => _346(event)]);
|
|
@@ -9952,8 +9950,8 @@ function DepositModalInner({
|
|
|
9952
9950
|
const canGoBack = backHandler !== void 0;
|
|
9953
9951
|
const hideHeaderChrome = swappedImmersive;
|
|
9954
9952
|
const modalClassName = `rs-modal${hideHeaderChrome ? " rs-modal--swapped-iframe" : ""}`;
|
|
9955
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9956
|
-
|
|
9953
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9954
|
+
_chunkH4O22O7Ycjs.Modal,
|
|
9957
9955
|
{
|
|
9958
9956
|
isOpen,
|
|
9959
9957
|
onClose: handleModalDismiss,
|
|
@@ -9962,7 +9960,7 @@ function DepositModalInner({
|
|
|
9962
9960
|
closeOnOverlayClick,
|
|
9963
9961
|
ariaLabel: "Deposit",
|
|
9964
9962
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9965
|
-
|
|
9963
|
+
_chunkH4O22O7Ycjs.AnalyticsSession,
|
|
9966
9964
|
{
|
|
9967
9965
|
modal: "deposit",
|
|
9968
9966
|
sessionProperties: analyticsSessionProperties,
|
|
@@ -9984,12 +9982,12 @@ function DepositModalInner({
|
|
|
9984
9982
|
className: "rs-modal-header-back",
|
|
9985
9983
|
"aria-label": "Go back",
|
|
9986
9984
|
onClick: backHandler,
|
|
9987
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9985
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronLeftIcon, {})
|
|
9988
9986
|
}
|
|
9989
9987
|
) }),
|
|
9990
9988
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
9991
9989
|
historyButtonVisible && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9992
|
-
|
|
9990
|
+
_chunkH4O22O7Ycjs.HistoryEntryButton,
|
|
9993
9991
|
{
|
|
9994
9992
|
badge: history.badge,
|
|
9995
9993
|
onClick: history.openPanel,
|
|
@@ -10003,7 +10001,7 @@ function DepositModalInner({
|
|
|
10003
10001
|
onClick: () => closeWithSource("header_button"),
|
|
10004
10002
|
className: "rs-modal-close",
|
|
10005
10003
|
"aria-label": "Close",
|
|
10006
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10004
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CloseIcon, {})
|
|
10007
10005
|
}
|
|
10008
10006
|
)
|
|
10009
10007
|
] })
|
|
@@ -10053,7 +10051,7 @@ function DepositModalInner({
|
|
|
10053
10051
|
}
|
|
10054
10052
|
),
|
|
10055
10053
|
history.isPanelOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10056
|
-
|
|
10054
|
+
_chunkH4O22O7Ycjs.HistoryOverlay,
|
|
10057
10055
|
{
|
|
10058
10056
|
controller: history,
|
|
10059
10057
|
backLabel: "Deposit",
|