@rhinestone/deposit-modal 0.14.1 → 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 +26 -24
- package/bridge-transcript.json +14 -0
- package/dist/{DepositModalReown-GAD45GIC.cjs → DepositModalReown-IFN6YLZJ.cjs} +20 -22
- package/dist/{DepositModalReown-2EVV64OA.mjs → DepositModalReown-R7UROJPJ.mjs} +5 -7
- package/dist/WithdrawModal-SZEAI473.cjs +11 -0
- package/dist/WithdrawModal-XKSSHVEJ.mjs +11 -0
- package/dist/{caip-D8aRWdEY.d.cts → caip-BMi-9t09.d.cts} +27 -3
- package/dist/{caip-D8aRWdEY.d.ts → caip-BMi-9t09.d.ts} +27 -3
- package/dist/{chunk-A6JPBMYY.cjs → chunk-24N4KMJX.cjs} +234 -115
- package/dist/{chunk-LMG46EP2.mjs → chunk-3HCCR54R.mjs} +1 -1
- package/dist/{chunk-AQVJUXSG.cjs → chunk-5CM3ZQ5U.cjs} +1 -1
- package/dist/chunk-EA5CE2UZ.mjs +7599 -0
- package/dist/{chunk-VUATPOWJ.mjs → chunk-EAGMY3QE.mjs} +74 -17
- package/dist/{chunk-5Q5CSVKF.mjs → chunk-F6ROQ6RJ.mjs} +215 -517
- package/dist/{chunk-RN5VKWI6.mjs → chunk-FTWKAJGN.mjs} +1 -1
- package/dist/chunk-H4O22O7Y.cjs +7599 -0
- package/dist/{chunk-GZ4GQ5MC.mjs → chunk-HMB2XQGD.mjs} +172 -53
- package/dist/{chunk-DW2EQA2U.cjs → chunk-LVCD6RHF.cjs} +2 -2
- package/dist/{chunk-4KCSH4T3.cjs → chunk-OY5N3E6L.cjs} +86 -29
- package/dist/{chunk-NQMC5VKQ.cjs → chunk-V466XQSG.cjs} +551 -853
- package/dist/{constants-DBrWhJWE.d.cts → constants-BT4ctuHo.d.cts} +7 -6
- package/dist/{constants-DBrWhJWE.d.ts → constants-D21ZdNOP.d.ts} +7 -6
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +3 -3
- package/dist/constants.d.ts +3 -3
- package/dist/constants.mjs +2 -2
- package/dist/deposit.cjs +6 -8
- package/dist/deposit.d.cts +3 -3
- package/dist/deposit.d.ts +3 -3
- package/dist/deposit.mjs +5 -7
- package/dist/embed.cjs +130 -80
- package/dist/embed.d.cts +3 -9
- package/dist/embed.d.ts +3 -9
- package/dist/embed.mjs +112 -62
- package/dist/index.cjs +8 -11
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.mjs +10 -13
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +2 -2
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/styles.css +147 -100
- package/dist/{types-DP_3KwlD.d.cts → types-B9SbZQIG.d.ts} +145 -108
- package/dist/{types-Bho4OA03.d.ts → types-SwGGf0eH.d.cts} +145 -108
- package/dist/withdraw.cjs +5 -6
- package/dist/withdraw.d.cts +33 -5
- package/dist/withdraw.d.ts +33 -5
- package/dist/withdraw.mjs +4 -5
- package/package.json +6 -37
- package/dist/ClaimModal-GDFENSLV.mjs +0 -13
- package/dist/ClaimModal-L3FUBI5U.cjs +0 -13
- package/dist/WithdrawModal-FAQH35NG.cjs +0 -12
- package/dist/WithdrawModal-IKUHF5CF.mjs +0 -12
- package/dist/chunk-4J5ADVIN.cjs +0 -1848
- package/dist/chunk-62UCV2LG.cjs +0 -81
- package/dist/chunk-7AZFT2MV.cjs +0 -163
- package/dist/chunk-HAQOFI3D.cjs +0 -3699
- package/dist/chunk-QACOOLOE.mjs +0 -1062
- package/dist/chunk-R5UQ3TN4.mjs +0 -81
- package/dist/chunk-UX35GYLM.mjs +0 -3699
- package/dist/chunk-VALXN5IO.mjs +0 -163
- package/dist/chunk-XCTRKCNM.mjs +0 -1848
- package/dist/chunk-YP7QVKQ6.cjs +0 -1062
- package/dist/claim.cjs +0 -11
- package/dist/claim.d.cts +0 -17
- package/dist/claim.d.ts +0 -17
- package/dist/claim.mjs +0 -11
- package/dist/modal-ui-state-OD1RmKkK.d.cts +0 -30
- package/dist/modal-ui-state-OD1RmKkK.d.ts +0 -30
|
@@ -19,10 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var _chunk4J5ADVINcjs = require('./chunk-4J5ADVIN.cjs');
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
var _chunk62UCV2LGcjs = require('./chunk-62UCV2LG.cjs');
|
|
26
24
|
|
|
27
25
|
|
|
28
26
|
|
|
@@ -88,7 +86,7 @@ var _chunk62UCV2LGcjs = require('./chunk-62UCV2LG.cjs');
|
|
|
88
86
|
|
|
89
87
|
|
|
90
88
|
|
|
91
|
-
var
|
|
89
|
+
var _chunkH4O22O7Ycjs = require('./chunk-H4O22O7Y.cjs');
|
|
92
90
|
|
|
93
91
|
|
|
94
92
|
|
|
@@ -100,7 +98,7 @@ var _chunkHAQOFI3Dcjs = require('./chunk-HAQOFI3D.cjs');
|
|
|
100
98
|
|
|
101
99
|
|
|
102
100
|
|
|
103
|
-
var
|
|
101
|
+
var _chunkLVCD6RHFcjs = require('./chunk-LVCD6RHF.cjs');
|
|
104
102
|
|
|
105
103
|
|
|
106
104
|
|
|
@@ -127,11 +125,7 @@ var _chunkDW2EQA2Ucjs = require('./chunk-DW2EQA2U.cjs');
|
|
|
127
125
|
|
|
128
126
|
|
|
129
127
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
var _chunk4KCSH4T3cjs = require('./chunk-4KCSH4T3.cjs');
|
|
128
|
+
var _chunkOY5N3E6Lcjs = require('./chunk-OY5N3E6L.cjs');
|
|
135
129
|
|
|
136
130
|
// src/core/reown-dependencies.ts
|
|
137
131
|
var dependencies;
|
|
@@ -249,14 +243,14 @@ SegmentedToggle.displayName = "SegmentedToggle";
|
|
|
249
243
|
// src/components/ui/ChainIcon.tsx
|
|
250
244
|
|
|
251
245
|
function ChainIcon({ chainId, className, loading }) {
|
|
252
|
-
const badge =
|
|
253
|
-
const catalogChain =
|
|
254
|
-
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _2 => _2.name]), () => (
|
|
246
|
+
const badge = _chunkOY5N3E6Lcjs.getChainBadge.call(void 0, chainId);
|
|
247
|
+
const catalogChain = _chunkH4O22O7Ycjs.useCatalogChain.call(void 0, _chunkH4O22O7Ycjs.catalogKeyForChain.call(void 0, chainId));
|
|
248
|
+
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _2 => _2.name]), () => ( _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId)));
|
|
255
249
|
const initial = (_nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _3 => _3.name]), () => ( badge.shortLabel))).charAt(0);
|
|
256
250
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
257
|
-
|
|
251
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
258
252
|
{
|
|
259
|
-
src: _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _4 => _4.iconUrl]), () => (
|
|
253
|
+
src: _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _4 => _4.iconUrl]), () => ( _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, chainId))),
|
|
260
254
|
alt: name,
|
|
261
255
|
className,
|
|
262
256
|
loading,
|
|
@@ -277,16 +271,16 @@ ChainIcon.displayName = "ChainIcon";
|
|
|
277
271
|
// src/components/ui/WalletBadgeIcons/index.tsx
|
|
278
272
|
|
|
279
273
|
function BadgeImage({ src, alt = "" }) {
|
|
280
|
-
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 }) });
|
|
281
275
|
}
|
|
282
276
|
var WALLET_BADGES = ["rabby", "phantom", "walletconnect"];
|
|
283
277
|
function WalletBadgeIcons() {
|
|
284
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-meta-icons", children: WALLET_BADGES.map((slug) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BadgeImage, { src:
|
|
278
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-meta-icons", children: WALLET_BADGES.map((slug) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BadgeImage, { src: _chunkOY5N3E6Lcjs.cdnIconUrl.call(void 0, "wallets", slug) }, slug)) });
|
|
285
279
|
}
|
|
286
280
|
WalletBadgeIcons.displayName = "WalletBadgeIcons";
|
|
287
281
|
var TRANSFER_CHAIN_BADGES = ["mainnet", "solana", "base"];
|
|
288
282
|
function ChainBadgeIcons() {
|
|
289
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-meta-icons", children: TRANSFER_CHAIN_BADGES.map((slug) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BadgeImage, { src:
|
|
283
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-meta-icons", children: TRANSFER_CHAIN_BADGES.map((slug) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BadgeImage, { src: _chunkOY5N3E6Lcjs.cdnIconUrl.call(void 0, "chains", slug) }, slug)) });
|
|
290
284
|
}
|
|
291
285
|
ChainBadgeIcons.displayName = "ChainBadgeIcons";
|
|
292
286
|
var MAX_WALLET_CHAIN_MARKS = 3;
|
|
@@ -306,23 +300,23 @@ var DAPP_IMPORT_CATALOG = [
|
|
|
306
300
|
{
|
|
307
301
|
id: "polymarket",
|
|
308
302
|
label: "Polymarket",
|
|
309
|
-
iconUrl:
|
|
303
|
+
iconUrl: _chunkOY5N3E6Lcjs.cdnIconUrl.call(void 0, "dapps", "polymarket")
|
|
310
304
|
},
|
|
311
305
|
{
|
|
312
306
|
id: "aave",
|
|
313
307
|
label: "Aave",
|
|
314
|
-
iconUrl:
|
|
308
|
+
iconUrl: _chunkOY5N3E6Lcjs.cdnIconUrl.call(void 0, "dapps", "aave")
|
|
315
309
|
},
|
|
316
310
|
{
|
|
317
311
|
id: "hyperliquid",
|
|
318
312
|
label: "Hyperliquid",
|
|
319
|
-
iconUrl:
|
|
313
|
+
iconUrl: _chunkOY5N3E6Lcjs.cdnIconUrl.call(void 0, "dapps", "hyperliquid"),
|
|
320
314
|
comingSoon: true
|
|
321
315
|
},
|
|
322
316
|
{
|
|
323
317
|
id: "morpho",
|
|
324
318
|
label: "Morpho",
|
|
325
|
-
iconUrl:
|
|
319
|
+
iconUrl: _chunkOY5N3E6Lcjs.cdnIconUrl.call(void 0, "dapps", "morpho"),
|
|
326
320
|
comingSoon: true
|
|
327
321
|
}
|
|
328
322
|
];
|
|
@@ -330,7 +324,7 @@ var DAPP_IMPORT_CATALOG = [
|
|
|
330
324
|
// src/components/ui/BrandIcons.tsx
|
|
331
325
|
|
|
332
326
|
function ExchangeBadgeImage({ name }) {
|
|
333
|
-
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)) });
|
|
334
328
|
}
|
|
335
329
|
var CARD_NETWORKS = ["amex", "visa", "mastercard"];
|
|
336
330
|
function CardNetworkIcons() {
|
|
@@ -338,7 +332,7 @@ function CardNetworkIcons() {
|
|
|
338
332
|
"span",
|
|
339
333
|
{
|
|
340
334
|
className: `rs-card-network rs-card-network--${network}`,
|
|
341
|
-
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) })
|
|
342
336
|
},
|
|
343
337
|
network
|
|
344
338
|
)) });
|
|
@@ -357,7 +351,7 @@ function DappBadgeIcons() {
|
|
|
357
351
|
).filter(
|
|
358
352
|
(brand) => Boolean(brand)
|
|
359
353
|
);
|
|
360
|
-
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)) });
|
|
361
355
|
}
|
|
362
356
|
DappBadgeIcons.displayName = "DappBadgeIcons";
|
|
363
357
|
var DAPP_BADGE_COUNT = DAPP_BADGE_ORDER.length;
|
|
@@ -377,9 +371,9 @@ function balanceSubtitle(status, balanceUsd, fallback) {
|
|
|
377
371
|
return "No balance";
|
|
378
372
|
}
|
|
379
373
|
function fiatIcon(name) {
|
|
380
|
-
if (name === "apple") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
381
|
-
if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
382
|
-
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, {});
|
|
383
377
|
}
|
|
384
378
|
function FiatMethodIcon({ option }) {
|
|
385
379
|
const [remoteFailed, setRemoteFailed] = _react.useState.call(void 0, false);
|
|
@@ -462,20 +456,20 @@ function renderWalletLeading(row) {
|
|
|
462
456
|
}
|
|
463
457
|
);
|
|
464
458
|
}
|
|
465
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
459
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {});
|
|
466
460
|
}
|
|
467
|
-
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
468
|
-
var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
469
|
-
var EXCHANGE_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
470
|
-
var MIGRATE_ASSETS_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
471
|
-
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" });
|
|
472
466
|
var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
473
467
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
|
|
474
468
|
"+100"
|
|
475
469
|
] });
|
|
476
470
|
var EXTRA_EXCHANGE_COUNT = Math.max(
|
|
477
471
|
0,
|
|
478
|
-
|
|
472
|
+
_chunkH4O22O7Ycjs.SUPPORTED_CONNECT_EXCHANGE_COUNT - EXCHANGE_BADGE_COUNT
|
|
479
473
|
);
|
|
480
474
|
var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
481
475
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
|
|
@@ -489,7 +483,7 @@ var MIGRATE_ASSETS_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxrunt
|
|
|
489
483
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DappBadgeIcons, {}),
|
|
490
484
|
EXTRA_DAPP_COUNT > 0 ? `+${EXTRA_DAPP_COUNT}` : null
|
|
491
485
|
] });
|
|
492
|
-
var EXTRA_CHAIN_COUNT = Math.max(0,
|
|
486
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunkOY5N3E6Lcjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
493
487
|
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
494
488
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
495
489
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
@@ -533,7 +527,7 @@ function ConnectStep({
|
|
|
533
527
|
if (onSelectTransferCrypto) {
|
|
534
528
|
cryptoRows.push(
|
|
535
529
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
536
|
-
|
|
530
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
537
531
|
{
|
|
538
532
|
leading: TRANSFER_CRYPTO_LEADING,
|
|
539
533
|
title: "Transfer crypto",
|
|
@@ -554,7 +548,7 @@ function ConnectStep({
|
|
|
554
548
|
);
|
|
555
549
|
cryptoRows.push(
|
|
556
550
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
557
|
-
|
|
551
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
558
552
|
{
|
|
559
553
|
leading: renderWalletLeading(row),
|
|
560
554
|
title: collapseToExternal ? "External wallet" : row.label,
|
|
@@ -571,7 +565,7 @@ function ConnectStep({
|
|
|
571
565
|
if (!hasSessionWallet && handleConnect) {
|
|
572
566
|
cryptoRows.push(
|
|
573
567
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
574
|
-
|
|
568
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
575
569
|
{
|
|
576
570
|
leading: WALLET_LEADING,
|
|
577
571
|
title: "Connect wallet",
|
|
@@ -586,7 +580,7 @@ function ConnectStep({
|
|
|
586
580
|
if (onSelectFundFromExchange) {
|
|
587
581
|
cryptoRows.push(
|
|
588
582
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
589
|
-
|
|
583
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
590
584
|
{
|
|
591
585
|
leading: EXCHANGE_LEADING,
|
|
592
586
|
title: "Connect exchange",
|
|
@@ -601,7 +595,7 @@ function ConnectStep({
|
|
|
601
595
|
if (onSelectMigrateAssets) {
|
|
602
596
|
cryptoRows.push(
|
|
603
597
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
604
|
-
|
|
598
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
605
599
|
{
|
|
606
600
|
leading: MIGRATE_ASSETS_LEADING,
|
|
607
601
|
title: "Migrate assets",
|
|
@@ -622,7 +616,7 @@ function ConnectStep({
|
|
|
622
616
|
for (const opt of fiatPaymentMethods) {
|
|
623
617
|
cashRows.push(
|
|
624
618
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
625
|
-
|
|
619
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
626
620
|
{
|
|
627
621
|
leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FiatMethodIcon, { option: opt }),
|
|
628
622
|
title: opt.label,
|
|
@@ -637,7 +631,7 @@ function ConnectStep({
|
|
|
637
631
|
} else if (fiatLoading) {
|
|
638
632
|
cashRows.push(
|
|
639
633
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
640
|
-
|
|
634
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
641
635
|
{
|
|
642
636
|
leading: SMALL_SPINNER,
|
|
643
637
|
title: "Loading payment options\u2026",
|
|
@@ -666,9 +660,9 @@ function ConnectStep({
|
|
|
666
660
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
667
661
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
668
662
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
669
|
-
|
|
663
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
670
664
|
{
|
|
671
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
665
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.HandCoinsIcon, {}),
|
|
672
666
|
title,
|
|
673
667
|
subtitle: _nullishCoalesce(subtitle, () => ( defaultSubtitle)),
|
|
674
668
|
aside: showToggle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -704,7 +698,7 @@ function ConnectStep({
|
|
|
704
698
|
children: "Disconnect wallet"
|
|
705
699
|
}
|
|
706
700
|
) }),
|
|
707
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
708
702
|
] });
|
|
709
703
|
}
|
|
710
704
|
ConnectStep.displayName = "ConnectStep";
|
|
@@ -727,17 +721,17 @@ function AssetSelectStep({
|
|
|
727
721
|
const [selectedAssetId, setSelectedAssetId] = _react.useState.call(void 0, null);
|
|
728
722
|
const [loading, setLoading] = _react.useState.call(void 0, true);
|
|
729
723
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
730
|
-
const isDepositChain =
|
|
731
|
-
const { catalog } =
|
|
732
|
-
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, );
|
|
733
727
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
734
728
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
735
|
-
return
|
|
729
|
+
return _chunkH4O22O7Ycjs.getAssetId.call(void 0, {
|
|
736
730
|
chainId: defaultSourceChain,
|
|
737
731
|
token: defaultSourceToken
|
|
738
732
|
});
|
|
739
733
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
740
|
-
const onTotalBalanceComputedRef =
|
|
734
|
+
const onTotalBalanceComputedRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onTotalBalanceComputed);
|
|
741
735
|
_react.useEffect.call(void 0, () => {
|
|
742
736
|
let active = true;
|
|
743
737
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -757,11 +751,11 @@ function AssetSelectStep({
|
|
|
757
751
|
try {
|
|
758
752
|
const portfolio = await service.fetchPortfolio(address);
|
|
759
753
|
if (!active) return;
|
|
760
|
-
const portfolioAssets =
|
|
754
|
+
const portfolioAssets = _chunkH4O22O7Ycjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
761
755
|
setAssets(portfolioAssets);
|
|
762
756
|
emitAssetsUpdate(portfolioAssets);
|
|
763
757
|
const hasNative = portfolioAssets.some(
|
|
764
|
-
(asset) => asset.token.toLowerCase() ===
|
|
758
|
+
(asset) => asset.token.toLowerCase() === _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS
|
|
765
759
|
);
|
|
766
760
|
if (!hasNative) {
|
|
767
761
|
const connectedChainId = _optionalChain([publicClient, 'access', _11 => _11.chain, 'optionalAccess', _12 => _12.id]);
|
|
@@ -808,7 +802,7 @@ function AssetSelectStep({
|
|
|
808
802
|
} catch (e2) {
|
|
809
803
|
return false;
|
|
810
804
|
}
|
|
811
|
-
const isNativeToken = a.token.toLowerCase() ===
|
|
805
|
+
const isNativeToken = a.token.toLowerCase() === _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS;
|
|
812
806
|
if (!isNativeToken && !(typeof a.balanceUsd === "number" && a.balanceUsd >= 0.01))
|
|
813
807
|
return false;
|
|
814
808
|
return true;
|
|
@@ -836,7 +830,7 @@ function AssetSelectStep({
|
|
|
836
830
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
837
831
|
const numeric = Number(raw);
|
|
838
832
|
if (!Number.isFinite(numeric)) return raw;
|
|
839
|
-
return
|
|
833
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
840
834
|
} catch (e3) {
|
|
841
835
|
return asset.balance;
|
|
842
836
|
}
|
|
@@ -844,20 +838,20 @@ function AssetSelectStep({
|
|
|
844
838
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
845
839
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
846
840
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
847
|
-
|
|
841
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
848
842
|
{
|
|
849
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
843
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
850
844
|
title: "Your assets",
|
|
851
845
|
subtitle: "Select source assets to transfer"
|
|
852
846
|
}
|
|
853
847
|
),
|
|
854
848
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
855
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
849
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, { className: "rs-text-tertiary" }),
|
|
856
850
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
857
851
|
] }),
|
|
858
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
852
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
859
853
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
860
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
854
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
861
855
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
862
856
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
863
857
|
address.slice(0, 6),
|
|
@@ -877,8 +871,8 @@ function AssetSelectStep({
|
|
|
877
871
|
!loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((asset) => {
|
|
878
872
|
const isSelected = selectedAssetId === asset.id;
|
|
879
873
|
const tokenAmount = formatBalance(asset);
|
|
880
|
-
const badge =
|
|
881
|
-
const chainIcon =
|
|
874
|
+
const badge = _chunkOY5N3E6Lcjs.getChainBadge.call(void 0, asset.chainId);
|
|
875
|
+
const chainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, asset.chainId);
|
|
882
876
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
883
877
|
"button",
|
|
884
878
|
{
|
|
@@ -890,13 +884,13 @@ function AssetSelectStep({
|
|
|
890
884
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
891
885
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
892
886
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
893
|
-
|
|
887
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
894
888
|
{
|
|
895
889
|
symbol: asset.symbol,
|
|
896
890
|
fallback: asset.symbol.slice(0, 4)
|
|
897
891
|
}
|
|
898
892
|
) }),
|
|
899
|
-
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,
|
|
900
894
|
"span",
|
|
901
895
|
{
|
|
902
896
|
className: "rs-asset-chain-badge",
|
|
@@ -923,14 +917,14 @@ function AssetSelectStep({
|
|
|
923
917
|
] })
|
|
924
918
|
] })
|
|
925
919
|
] }),
|
|
926
|
-
/* @__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}` : "--" })
|
|
927
921
|
]
|
|
928
922
|
},
|
|
929
923
|
asset.id
|
|
930
924
|
);
|
|
931
925
|
}) }),
|
|
932
926
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
933
|
-
|
|
927
|
+
_chunkH4O22O7Ycjs.Button,
|
|
934
928
|
{
|
|
935
929
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
936
930
|
disabled: !selectedAsset,
|
|
@@ -939,7 +933,7 @@ function AssetSelectStep({
|
|
|
939
933
|
}
|
|
940
934
|
)
|
|
941
935
|
] }),
|
|
942
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
936
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
943
937
|
] });
|
|
944
938
|
}
|
|
945
939
|
async function fetchNativeAssets(address, publicClient, existing, isDepositChain, catalogChain) {
|
|
@@ -947,20 +941,20 @@ async function fetchNativeAssets(address, publicClient, existing, isDepositChain
|
|
|
947
941
|
const connectedChainId = _optionalChain([publicClient, 'access', _16 => _16.chain, 'optionalAccess', _17 => _17.id]);
|
|
948
942
|
if (!connectedChainId) return [];
|
|
949
943
|
if (!isDepositChain(connectedChainId)) return [];
|
|
950
|
-
const id =
|
|
944
|
+
const id = _chunkH4O22O7Ycjs.getAssetId.call(void 0, {
|
|
951
945
|
chainId: connectedChainId,
|
|
952
|
-
token:
|
|
946
|
+
token: _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS
|
|
953
947
|
});
|
|
954
948
|
if (existingIds.has(id)) return [];
|
|
955
949
|
try {
|
|
956
950
|
const balance = await publicClient.getBalance({ address });
|
|
957
|
-
const nativeSymbol = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _18 => _18.nativeToken, 'access', _19 => _19.symbol]), () => (
|
|
951
|
+
const nativeSymbol = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _18 => _18.nativeToken, 'access', _19 => _19.symbol]), () => ( _chunkOY5N3E6Lcjs.getNativeSymbol.call(void 0, connectedChainId)));
|
|
958
952
|
const nativeDecimals = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _20 => _20.nativeToken, 'access', _21 => _21.decimals]), () => ( 18));
|
|
959
953
|
return [
|
|
960
954
|
{
|
|
961
955
|
id,
|
|
962
956
|
chainId: connectedChainId,
|
|
963
|
-
token:
|
|
957
|
+
token: _chunkOY5N3E6Lcjs.NATIVE_TOKEN_ADDRESS,
|
|
964
958
|
symbol: nativeSymbol,
|
|
965
959
|
name: nativeSymbol,
|
|
966
960
|
decimals: nativeDecimals,
|
|
@@ -1122,9 +1116,9 @@ function AmountStep({
|
|
|
1122
1116
|
const chainMismatch = Boolean(
|
|
1123
1117
|
_optionalChain([walletClient, 'optionalAccess', _26 => _26.chain, 'optionalAccess', _27 => _27.id]) && walletClient.chain.id !== asset.chainId
|
|
1124
1118
|
);
|
|
1125
|
-
const targetChainId =
|
|
1126
|
-
const targetSymbol =
|
|
1127
|
-
const isSourceStablecoin =
|
|
1119
|
+
const targetChainId = _chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain);
|
|
1120
|
+
const targetSymbol = _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
1121
|
+
const isSourceStablecoin = _chunkOY5N3E6Lcjs.isStablecoinSymbol.call(void 0, asset.symbol);
|
|
1128
1122
|
const derivedPriceUsd = _react.useMemo.call(void 0, () => {
|
|
1129
1123
|
if (tokenPriceUsdOverride !== void 0 && tokenPriceUsdOverride > 0)
|
|
1130
1124
|
return tokenPriceUsdOverride;
|
|
@@ -1153,7 +1147,7 @@ function AmountStep({
|
|
|
1153
1147
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
1154
1148
|
if (!balanceTarget || !publicClient) return;
|
|
1155
1149
|
try {
|
|
1156
|
-
const bal =
|
|
1150
|
+
const bal = _chunkH4O22O7Ycjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
1157
1151
|
address: asset.token,
|
|
1158
1152
|
abi: _viem.erc20Abi,
|
|
1159
1153
|
functionName: "balanceOf",
|
|
@@ -1174,7 +1168,7 @@ function AmountStep({
|
|
|
1174
1168
|
hasAttemptedSwitch.current = true;
|
|
1175
1169
|
switchChain(asset.chainId).catch((err) => {
|
|
1176
1170
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1177
|
-
setError(
|
|
1171
|
+
setError(_chunkH4O22O7Ycjs.formatUserError.call(void 0, raw));
|
|
1178
1172
|
});
|
|
1179
1173
|
}
|
|
1180
1174
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -1227,7 +1221,7 @@ function AmountStep({
|
|
|
1227
1221
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
1228
1222
|
const numeric = Number(raw);
|
|
1229
1223
|
if (!Number.isFinite(numeric)) return raw;
|
|
1230
|
-
return
|
|
1224
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
1231
1225
|
} catch (e8) {
|
|
1232
1226
|
return "\u2026";
|
|
1233
1227
|
}
|
|
@@ -1246,7 +1240,7 @@ function AmountStep({
|
|
|
1246
1240
|
return null;
|
|
1247
1241
|
}
|
|
1248
1242
|
}, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, asset.decimals]);
|
|
1249
|
-
const minDepositUsd =
|
|
1243
|
+
const minDepositUsd = _chunkOY5N3E6Lcjs.isHyperCoreDestination.call(void 0, targetChain) ? Math.max(_chunkOY5N3E6Lcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _28 => _28.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _29 => _29.minDepositUsd]), () => ( null));
|
|
1250
1244
|
const maxDepositUsd = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _30 => _30.maxDepositUsd]), () => ( null));
|
|
1251
1245
|
const isBelowMin = minDepositUsd !== null && numericAmount > 0 && amountUsd < minDepositUsd;
|
|
1252
1246
|
const isAboveMax = maxDepositUsd !== null && amountUsd > maxDepositUsd;
|
|
@@ -1315,12 +1309,12 @@ function AmountStep({
|
|
|
1315
1309
|
const needsPricing = !knowsBalance && !isSourceStablecoin;
|
|
1316
1310
|
const blockedOnPricing = needsPricing && !hasPricing;
|
|
1317
1311
|
const continueDisabled = chainMismatch || exceedsBalance || blockedOnPricing || numericAmount === 0 && !isBelowMin || knowsBalance && balance === null;
|
|
1318
|
-
const chainName =
|
|
1312
|
+
const chainName = _chunkH4O22O7Ycjs.useChainName.call(void 0, );
|
|
1319
1313
|
const sourceChainName = chainName(asset.chainId);
|
|
1320
1314
|
const targetChainName = chainName(targetChainId);
|
|
1321
1315
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1322
1316
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1323
|
-
/* @__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 }),
|
|
1324
1318
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
1325
1319
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
1326
1320
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1340,13 +1334,13 @@ function AmountStep({
|
|
|
1340
1334
|
" available",
|
|
1341
1335
|
balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1342
1336
|
" (~",
|
|
1343
|
-
|
|
1337
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(balanceUsd),
|
|
1344
1338
|
")"
|
|
1345
1339
|
] })
|
|
1346
1340
|
] }),
|
|
1347
1341
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
1348
1342
|
"Min. deposit ",
|
|
1349
|
-
|
|
1343
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(minDepositUsd)
|
|
1350
1344
|
] })
|
|
1351
1345
|
] })
|
|
1352
1346
|
] }),
|
|
@@ -1371,7 +1365,7 @@ function AmountStep({
|
|
|
1371
1365
|
" ",
|
|
1372
1366
|
asset.symbol
|
|
1373
1367
|
] }),
|
|
1374
|
-
/* @__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 }) })
|
|
1375
1369
|
] })
|
|
1376
1370
|
] }),
|
|
1377
1371
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
@@ -1382,21 +1376,21 @@ function AmountStep({
|
|
|
1382
1376
|
" ",
|
|
1383
1377
|
targetSymbol
|
|
1384
1378
|
] }),
|
|
1385
|
-
/* @__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 }) })
|
|
1386
1380
|
] })
|
|
1387
1381
|
] }),
|
|
1388
1382
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
1389
1383
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
1390
|
-
/* @__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) })
|
|
1391
1385
|
] })
|
|
1392
1386
|
] }),
|
|
1393
|
-
blockedOnPricing && sourcePriceUnavailable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1387
|
+
blockedOnPricing && sourcePriceUnavailable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: [
|
|
1394
1388
|
asset.symbol,
|
|
1395
1389
|
" can't be priced right now, so this deposit can't be estimated. You can still send any amount to the deposit address."
|
|
1396
1390
|
] }),
|
|
1397
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1391
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
1398
1392
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1399
|
-
|
|
1393
|
+
_chunkH4O22O7Ycjs.Button,
|
|
1400
1394
|
{
|
|
1401
1395
|
onClick: handleContinue,
|
|
1402
1396
|
fullWidth: true,
|
|
@@ -1405,7 +1399,7 @@ function AmountStep({
|
|
|
1405
1399
|
}
|
|
1406
1400
|
)
|
|
1407
1401
|
] }),
|
|
1408
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1402
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
1409
1403
|
] });
|
|
1410
1404
|
}
|
|
1411
1405
|
|
|
@@ -1432,14 +1426,14 @@ function ReviewDetails({
|
|
|
1432
1426
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
1433
1427
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1434
1428
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
1435
|
-
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 }) })
|
|
1436
1430
|
] })
|
|
1437
1431
|
] }),
|
|
1438
1432
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1439
1433
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
1440
1434
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1441
1435
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
1442
|
-
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 }) })
|
|
1443
1437
|
] })
|
|
1444
1438
|
] }),
|
|
1445
1439
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1454,21 +1448,21 @@ function ReviewDetails({
|
|
|
1454
1448
|
" ",
|
|
1455
1449
|
sendSymbol
|
|
1456
1450
|
] }),
|
|
1457
|
-
/* @__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 }) })
|
|
1458
1452
|
] })
|
|
1459
1453
|
] }),
|
|
1460
1454
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1461
1455
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
1462
1456
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1463
1457
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
1464
|
-
/* @__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 }) })
|
|
1465
1459
|
] })
|
|
1466
1460
|
] }),
|
|
1467
1461
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1468
1462
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Fees" }),
|
|
1469
1463
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1470
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 }),
|
|
1471
|
-
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, {}) }) })
|
|
1472
1466
|
] })
|
|
1473
1467
|
] })
|
|
1474
1468
|
] });
|
|
@@ -1680,23 +1674,23 @@ function ConfirmStep({
|
|
|
1680
1674
|
recipient
|
|
1681
1675
|
]);
|
|
1682
1676
|
const quote = setupReady && _optionalChain([quoteResult, 'optionalAccess', _66 => _66.requestKey]) === quoteRequestKey ? quoteResult.quote : null;
|
|
1683
|
-
const targetChainId =
|
|
1684
|
-
const targetSymbol = sameRoute ? asset.symbol :
|
|
1685
|
-
const sourceChainName =
|
|
1686
|
-
const targetChainName =
|
|
1687
|
-
const sourceChainIcon =
|
|
1688
|
-
const targetChainIcon =
|
|
1689
|
-
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(
|
|
1690
|
-
const mustHaveQuote = !appFeesResolved ||
|
|
1677
|
+
const targetChainId = _chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain);
|
|
1678
|
+
const targetSymbol = sameRoute ? asset.symbol : _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
1679
|
+
const sourceChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, asset.chainId);
|
|
1680
|
+
const targetChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, targetChainId);
|
|
1681
|
+
const sourceChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, asset.chainId);
|
|
1682
|
+
const targetChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, targetChainId);
|
|
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,
|
|
1691
1685
|
appFees,
|
|
1692
1686
|
`eip155:${quoteSource.chainId}`,
|
|
1693
1687
|
quoteSource.token
|
|
1694
1688
|
) > 0;
|
|
1695
|
-
const { display: feeDisplay, struck: feesFullySponsored } =
|
|
1689
|
+
const { display: feeDisplay, struck: feesFullySponsored } = _chunkH4O22O7Ycjs.quoteFeeRow.call(void 0,
|
|
1696
1690
|
_optionalChain([quote, 'optionalAccess', _67 => _67.fees])
|
|
1697
1691
|
);
|
|
1698
1692
|
const directTransfer = sameRoute && !mustHaveQuote && !executeTransfer;
|
|
1699
|
-
const permitEligible = enableGaslessDeposit && !
|
|
1693
|
+
const permitEligible = enableGaslessDeposit && !_chunkH4O22O7Ycjs.isNativeAsset.call(void 0, asset) && !isDappImportAsset(asset) && !executeTransfer && !directTransfer && asset.chainId !== _chunkOY5N3E6Lcjs.HYPERCORE_CHAIN_ID;
|
|
1700
1694
|
const permitRequestKey = JSON.stringify([
|
|
1701
1695
|
smartAccount.toLowerCase(),
|
|
1702
1696
|
asset.chainId,
|
|
@@ -1709,21 +1703,21 @@ function ConfirmStep({
|
|
|
1709
1703
|
const receiveDisplay = (() => {
|
|
1710
1704
|
if (directTransfer) return `${formattedSendAmount} ${asset.symbol}`;
|
|
1711
1705
|
if (quote) {
|
|
1712
|
-
const quoted =
|
|
1706
|
+
const quoted = _chunkH4O22O7Ycjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol);
|
|
1713
1707
|
if (quoted !== void 0) return quoted;
|
|
1714
1708
|
}
|
|
1715
1709
|
const usdValue = Number(targetAmount);
|
|
1716
1710
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
1717
|
-
const estimate =
|
|
1711
|
+
const estimate = _chunkH4O22O7Ycjs.formatReceiveEstimate.call(void 0, {
|
|
1718
1712
|
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
1719
1713
|
sourceSymbol: asset.symbol,
|
|
1720
1714
|
targetSymbol,
|
|
1721
1715
|
sourceAmountUsd,
|
|
1722
|
-
sourceTrusted:
|
|
1716
|
+
sourceTrusted: _chunkH4O22O7Ycjs.isRecognizedToken.call(void 0, asset.token, asset.chainId),
|
|
1723
1717
|
// The target is the curated deposit destination, so a stablecoin target
|
|
1724
1718
|
// estimates at $1 when unquoted (DepositFlow skips fetching stablecoin
|
|
1725
1719
|
// target prices). Not applied to the source — that can be a held token.
|
|
1726
|
-
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 } : {}
|
|
1727
1721
|
});
|
|
1728
1722
|
if (estimate !== void 0) return estimate;
|
|
1729
1723
|
return targetSymbol;
|
|
@@ -1734,7 +1728,7 @@ function ConfirmStep({
|
|
|
1734
1728
|
hasAttemptedSwitch.current = true;
|
|
1735
1729
|
switchChain(asset.chainId).catch((err) => {
|
|
1736
1730
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1737
|
-
setError(
|
|
1731
|
+
setError(_chunkH4O22O7Ycjs.formatUserError.call(void 0, raw));
|
|
1738
1732
|
});
|
|
1739
1733
|
}
|
|
1740
1734
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -1921,9 +1915,9 @@ function ConfirmStep({
|
|
|
1921
1915
|
);
|
|
1922
1916
|
} catch (err) {
|
|
1923
1917
|
const raw = err instanceof Error ? err.message : "Signing failed";
|
|
1924
|
-
const safeToTransfer = !submitStarted || err instanceof
|
|
1918
|
+
const safeToTransfer = !submitStarted || err instanceof _chunkH4O22O7Ycjs.PermitDepositSubmitError && err.safeToTransfer;
|
|
1925
1919
|
if (safeToTransfer) setPermitDisabled(true);
|
|
1926
|
-
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.";
|
|
1927
1921
|
setError(message);
|
|
1928
1922
|
_optionalChain([onError, 'optionalCall', _69 => _69(message, "PERMIT_ERROR", raw)]);
|
|
1929
1923
|
} finally {
|
|
@@ -1944,7 +1938,7 @@ function ConfirmStep({
|
|
|
1944
1938
|
const result = await executeTransfer(amountUnits);
|
|
1945
1939
|
hash = result.txHash;
|
|
1946
1940
|
resolvedSourceToken = result.sourceToken;
|
|
1947
|
-
} else if (
|
|
1941
|
+
} else if (_chunkH4O22O7Ycjs.isNativeAsset.call(void 0, asset)) {
|
|
1948
1942
|
hash = await walletClient.sendTransaction({
|
|
1949
1943
|
account,
|
|
1950
1944
|
chain,
|
|
@@ -1975,8 +1969,8 @@ function ConfirmStep({
|
|
|
1975
1969
|
);
|
|
1976
1970
|
} catch (err) {
|
|
1977
1971
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1978
|
-
const uncertain =
|
|
1979
|
-
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);
|
|
1980
1974
|
if (uncertain) setSubmissionUncertain(true);
|
|
1981
1975
|
setError(message);
|
|
1982
1976
|
_optionalChain([onError, 'optionalCall', _71 => _71(message, "TRANSFER_ERROR", raw)]);
|
|
@@ -1986,7 +1980,7 @@ function ConfirmStep({
|
|
|
1986
1980
|
};
|
|
1987
1981
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1988
1982
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1989
|
-
/* @__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" }),
|
|
1990
1984
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1991
1985
|
ReviewDetails,
|
|
1992
1986
|
{
|
|
@@ -2002,9 +1996,9 @@ function ConfirmStep({
|
|
|
2002
1996
|
fee: { display: feeDisplay, struck: feesFullySponsored }
|
|
2003
1997
|
}
|
|
2004
1998
|
),
|
|
2005
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1999
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
2006
2000
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2007
|
-
|
|
2001
|
+
_chunkH4O22O7Ycjs.Button,
|
|
2008
2002
|
{
|
|
2009
2003
|
onClick: handleConfirm,
|
|
2010
2004
|
loading: isSubmitting,
|
|
@@ -2031,7 +2025,7 @@ function ConfirmStep({
|
|
|
2031
2025
|
] }),
|
|
2032
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." })
|
|
2033
2027
|
] }),
|
|
2034
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
2035
2029
|
] });
|
|
2036
2030
|
}
|
|
2037
2031
|
|
|
@@ -2051,8 +2045,8 @@ function QrReviewStep({
|
|
|
2051
2045
|
onClose
|
|
2052
2046
|
}) {
|
|
2053
2047
|
const [quote, setQuote] = _react.useState.call(void 0, { state: "loading", value: null });
|
|
2054
|
-
const targetChainId =
|
|
2055
|
-
const targetSymbol =
|
|
2048
|
+
const targetChainId = _chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain);
|
|
2049
|
+
const targetSymbol = _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
2056
2050
|
_react.useEffect.call(void 0, () => {
|
|
2057
2051
|
let cancelled = false;
|
|
2058
2052
|
let units;
|
|
@@ -2084,36 +2078,36 @@ function QrReviewStep({
|
|
|
2084
2078
|
cancelled = true;
|
|
2085
2079
|
};
|
|
2086
2080
|
}, [service, smartAccount, asset, amount]);
|
|
2087
|
-
const formattedSendAmount = _nullishCoalesce(
|
|
2081
|
+
const formattedSendAmount = _nullishCoalesce(_chunkH4O22O7Ycjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( amount));
|
|
2088
2082
|
const receiveDisplay = (() => {
|
|
2089
2083
|
if (quote.value) {
|
|
2090
|
-
const quoted =
|
|
2084
|
+
const quoted = _chunkH4O22O7Ycjs.formatQuotedReceive.call(void 0, quote.value.output, targetSymbol);
|
|
2091
2085
|
if (quoted !== void 0) return quoted;
|
|
2092
2086
|
}
|
|
2093
2087
|
const usdValue = Number(targetAmount);
|
|
2094
|
-
const estimate =
|
|
2088
|
+
const estimate = _chunkH4O22O7Ycjs.formatReceiveEstimate.call(void 0, {
|
|
2095
2089
|
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
2096
2090
|
sourceSymbol: asset.symbol,
|
|
2097
2091
|
targetSymbol,
|
|
2098
2092
|
sourceAmountUsd: Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0,
|
|
2099
|
-
sourceTrusted:
|
|
2100
|
-
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 } : {}
|
|
2101
2095
|
});
|
|
2102
2096
|
return _nullishCoalesce(estimate, () => ( targetSymbol));
|
|
2103
2097
|
})();
|
|
2104
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";
|
|
2105
|
-
const { display: quotedFee, struck } =
|
|
2099
|
+
const { display: quotedFee, struck } = _chunkH4O22O7Ycjs.quoteFeeRow.call(void 0, _optionalChain([quote, 'access', _72 => _72.value, 'optionalAccess', _73 => _73.fees]));
|
|
2106
2100
|
const feeDisplay = quote.state === "unavailable" ? "\u2014" : quotedFee;
|
|
2107
2101
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
2108
2102
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2109
|
-
/* @__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" }),
|
|
2110
2104
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2111
2105
|
ReviewDetails,
|
|
2112
2106
|
{
|
|
2113
|
-
sourceChainName:
|
|
2114
|
-
sourceChainIcon:
|
|
2115
|
-
targetChainName:
|
|
2116
|
-
targetChainIcon:
|
|
2107
|
+
sourceChainName: _chunkOY5N3E6Lcjs.getChainName.call(void 0, asset.chainId),
|
|
2108
|
+
sourceChainIcon: _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, asset.chainId),
|
|
2109
|
+
targetChainName: _chunkOY5N3E6Lcjs.getChainName.call(void 0, targetChainId),
|
|
2110
|
+
targetChainIcon: _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, targetChainId),
|
|
2117
2111
|
estimatedTime,
|
|
2118
2112
|
sendAmount: formattedSendAmount,
|
|
2119
2113
|
sendSymbol: asset.symbol,
|
|
@@ -2122,9 +2116,9 @@ function QrReviewStep({
|
|
|
2122
2116
|
fee: { display: feeDisplay, struck }
|
|
2123
2117
|
}
|
|
2124
2118
|
),
|
|
2125
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2119
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Button, { onClick: onClose, fullWidth: true, children: "Close" })
|
|
2126
2120
|
] }),
|
|
2127
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2121
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
2128
2122
|
] });
|
|
2129
2123
|
}
|
|
2130
2124
|
QrReviewStep.displayName = "QrReviewStep";
|
|
@@ -2146,29 +2140,29 @@ var BASE_CHAIN_ID = 8453;
|
|
|
2146
2140
|
function DepositAddressSkeleton({
|
|
2147
2141
|
uiConfig
|
|
2148
2142
|
}) {
|
|
2149
|
-
const evmChainIds =
|
|
2143
|
+
const evmChainIds = _chunkOY5N3E6Lcjs.getSupportedChainIds.call(void 0, );
|
|
2150
2144
|
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
2151
|
-
const tokensForChain =
|
|
2145
|
+
const tokensForChain = _chunkOY5N3E6Lcjs.getTargetTokenSymbolsForChain.call(void 0, defaultChainId);
|
|
2152
2146
|
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
|
|
2153
|
-
const chainName =
|
|
2154
|
-
const chainIcon =
|
|
2147
|
+
const chainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, defaultChainId);
|
|
2148
|
+
const chainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, defaultChainId);
|
|
2155
2149
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
2156
2150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
2157
2151
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2158
|
-
/* @__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" }),
|
|
2159
2153
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
2160
2154
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
2161
2155
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
2162
2156
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2163
2157
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2164
|
-
|
|
2158
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
2165
2159
|
{
|
|
2166
2160
|
src: chainIcon,
|
|
2167
2161
|
className: "rs-deposit-address-dropdown-icon"
|
|
2168
2162
|
}
|
|
2169
2163
|
),
|
|
2170
2164
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
2171
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2165
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2172
2166
|
] })
|
|
2173
2167
|
] }),
|
|
2174
2168
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
@@ -2177,8 +2171,8 @@ function DepositAddressSkeleton({
|
|
|
2177
2171
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
2178
2172
|
"Min.$",
|
|
2179
2173
|
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _74 => _74.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
2180
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2181
|
-
|
|
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,
|
|
2182
2176
|
{
|
|
2183
2177
|
className: "rs-deposit-address-min-icon",
|
|
2184
2178
|
"aria-hidden": "true"
|
|
@@ -2188,14 +2182,14 @@ function DepositAddressSkeleton({
|
|
|
2188
2182
|
] }),
|
|
2189
2183
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
2190
2184
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2191
|
-
|
|
2185
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
2192
2186
|
{
|
|
2193
2187
|
symbol: defaultToken,
|
|
2194
2188
|
className: "rs-deposit-address-dropdown-icon"
|
|
2195
2189
|
}
|
|
2196
2190
|
),
|
|
2197
2191
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
|
|
2198
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2192
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2199
2193
|
] })
|
|
2200
2194
|
] })
|
|
2201
2195
|
] }),
|
|
@@ -2210,7 +2204,7 @@ function DepositAddressSkeleton({
|
|
|
2210
2204
|
] }),
|
|
2211
2205
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-actions", "aria-hidden": "true", children: [
|
|
2212
2206
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "button", { type: "button", className: "rs-deposit-address-copy", disabled: true, children: [
|
|
2213
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2207
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CopyIcon, {}),
|
|
2214
2208
|
"Copy address"
|
|
2215
2209
|
] }),
|
|
2216
2210
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2227,7 +2221,7 @@ function DepositAddressSkeleton({
|
|
|
2227
2221
|
}
|
|
2228
2222
|
)
|
|
2229
2223
|
] }),
|
|
2230
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2224
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
2231
2225
|
] });
|
|
2232
2226
|
}
|
|
2233
2227
|
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
@@ -2239,9 +2233,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
|
|
|
2239
2233
|
var MAX_POLL_INTERVAL = 3e4;
|
|
2240
2234
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
2241
2235
|
function isEventForTx(event, txHash) {
|
|
2242
|
-
const eventTxHash =
|
|
2236
|
+
const eventTxHash = _chunkH4O22O7Ycjs.getEventTxHash.call(void 0, event);
|
|
2243
2237
|
if (!eventTxHash) return false;
|
|
2244
|
-
return
|
|
2238
|
+
return _chunkH4O22O7Ycjs.txRefsMatch.call(void 0, eventTxHash, txHash);
|
|
2245
2239
|
}
|
|
2246
2240
|
function truncateHash(hash) {
|
|
2247
2241
|
return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
|
|
@@ -2291,7 +2285,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
2291
2285
|
}
|
|
2292
2286
|
return "Bridge failed";
|
|
2293
2287
|
}
|
|
2294
|
-
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" });
|
|
2295
2289
|
function DepositNotification({
|
|
2296
2290
|
deposit,
|
|
2297
2291
|
smartAccount,
|
|
@@ -2325,7 +2319,7 @@ function DepositNotification({
|
|
|
2325
2319
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
2326
2320
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
2327
2321
|
const completedRef = _react.useRef.call(void 0, false);
|
|
2328
|
-
const depositContextRef =
|
|
2322
|
+
const depositContextRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, {
|
|
2329
2323
|
amount,
|
|
2330
2324
|
sourceChain,
|
|
2331
2325
|
sourceToken: token,
|
|
@@ -2333,8 +2327,8 @@ function DepositNotification({
|
|
|
2333
2327
|
targetChain,
|
|
2334
2328
|
targetToken
|
|
2335
2329
|
});
|
|
2336
|
-
const onCompleteRef =
|
|
2337
|
-
const onFailedRef =
|
|
2330
|
+
const onCompleteRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onComplete);
|
|
2331
|
+
const onFailedRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onFailed);
|
|
2338
2332
|
const handleComplete = _react.useCallback.call(void 0,
|
|
2339
2333
|
(destTxHash) => {
|
|
2340
2334
|
if (completedRef.current) return;
|
|
@@ -2425,12 +2419,12 @@ function DepositNotification({
|
|
|
2425
2419
|
status,
|
|
2426
2420
|
txHash
|
|
2427
2421
|
]);
|
|
2428
|
-
const explorerTxUrl =
|
|
2422
|
+
const explorerTxUrl = _chunkH4O22O7Ycjs.useExplorerTxUrl.call(void 0, );
|
|
2429
2423
|
const sourceExplorerUrl = sourceChain === "unknown" ? void 0 : explorerTxUrl(sourceChain, txHash);
|
|
2430
|
-
const destExplorerUrl = destinationTxHash ? explorerTxUrl(
|
|
2424
|
+
const destExplorerUrl = destinationTxHash ? explorerTxUrl(_chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain), destinationTxHash) : null;
|
|
2431
2425
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
2432
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.";
|
|
2433
|
-
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,
|
|
2434
2428
|
"svg",
|
|
2435
2429
|
{
|
|
2436
2430
|
className: "rs-deposit-notification-spinner",
|
|
@@ -2480,7 +2474,7 @@ function DepositNotification({
|
|
|
2480
2474
|
className: "rs-deposit-notification-close",
|
|
2481
2475
|
onClick: () => onDismiss(deposit.id),
|
|
2482
2476
|
"aria-label": "Dismiss",
|
|
2483
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2477
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CloseIcon, {})
|
|
2484
2478
|
}
|
|
2485
2479
|
)
|
|
2486
2480
|
] }),
|
|
@@ -2496,7 +2490,7 @@ function DepositNotification({
|
|
|
2496
2490
|
"aria-expanded": expanded,
|
|
2497
2491
|
children: [
|
|
2498
2492
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: expanded ? "See less details" : "See more details" }),
|
|
2499
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2493
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
2500
2494
|
]
|
|
2501
2495
|
}
|
|
2502
2496
|
),
|
|
@@ -2551,9 +2545,9 @@ function DepositNotification({
|
|
|
2551
2545
|
var SOLANA_NATIVE_MINT = "11111111111111111111111111111111";
|
|
2552
2546
|
var EVM_ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
2553
2547
|
function sourceChainToCaip2(chain) {
|
|
2554
|
-
if (chain === "solana") return
|
|
2555
|
-
if (chain === "hypercore") return
|
|
2556
|
-
return
|
|
2548
|
+
if (chain === "solana") return _chunkOY5N3E6Lcjs.SOLANA_MAINNET_CAIP2;
|
|
2549
|
+
if (chain === "hypercore") return _chunkOY5N3E6Lcjs.HYPERCORE_SPOT_CAIP2;
|
|
2550
|
+
return _chunkOY5N3E6Lcjs.toEvmCaip2.call(void 0, chain);
|
|
2557
2551
|
}
|
|
2558
2552
|
function findAddress(tokens, symbol) {
|
|
2559
2553
|
return _optionalChain([tokens, 'optionalAccess', _88 => _88.find, 'call', _89 => _89((t) => t.symbol.toLowerCase() === symbol.toLowerCase()), 'optionalAccess', _90 => _90.address]);
|
|
@@ -2610,7 +2604,7 @@ function asString(value) {
|
|
|
2610
2604
|
function resolveSolanaTokenMeta(token) {
|
|
2611
2605
|
if (!token) return {};
|
|
2612
2606
|
const normalized = token.toLowerCase();
|
|
2613
|
-
const matched =
|
|
2607
|
+
const matched = _chunkOY5N3E6Lcjs.SOLANA_TOKENS.find(
|
|
2614
2608
|
(entry) => entry.mint.toLowerCase() === normalized
|
|
2615
2609
|
);
|
|
2616
2610
|
if (matched) {
|
|
@@ -2653,7 +2647,7 @@ function isSameRoute(sourceChain, sourceToken, targetChain, targetToken) {
|
|
|
2653
2647
|
return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
|
|
2654
2648
|
}
|
|
2655
2649
|
function chainLabel(chainId, catalogChain) {
|
|
2656
|
-
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _100 => _100.name]), () => (
|
|
2650
|
+
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _100 => _100.name]), () => ( _chunkOY5N3E6Lcjs.getChainName.call(void 0, chainId)));
|
|
2657
2651
|
return name.replace(/\s+(One|Mainnet|Smart Chain|Chain)$/i, "");
|
|
2658
2652
|
}
|
|
2659
2653
|
function computeTokensForChain(chainId, topTokens, catalogChain) {
|
|
@@ -2681,7 +2675,7 @@ function selectionAsAsset(chainId, symbol, topTokens, catalogChain) {
|
|
|
2681
2675
|
}
|
|
2682
2676
|
function TokenGlyph({ symbol }) {
|
|
2683
2677
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2684
|
-
|
|
2678
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
2685
2679
|
{
|
|
2686
2680
|
symbol,
|
|
2687
2681
|
className: "rs-deposit-address-dropdown-icon",
|
|
@@ -2721,19 +2715,19 @@ function DepositAddressStep({
|
|
|
2721
2715
|
if (!active) return;
|
|
2722
2716
|
setTopTokens(t);
|
|
2723
2717
|
setTopTokensSettled(true);
|
|
2724
|
-
if (t)
|
|
2718
|
+
if (t) _chunkOY5N3E6Lcjs.publishShortlistTokens.call(void 0, t);
|
|
2725
2719
|
});
|
|
2726
2720
|
return () => {
|
|
2727
2721
|
active = false;
|
|
2728
2722
|
};
|
|
2729
2723
|
}, [service]);
|
|
2730
2724
|
const BASE_CHAIN_ID2 = 8453;
|
|
2731
|
-
const evmChainIds =
|
|
2732
|
-
const { catalog, isLoading: catalogLoading } =
|
|
2725
|
+
const evmChainIds = _chunkH4O22O7Ycjs.useDepositChainIds.call(void 0, );
|
|
2726
|
+
const { catalog, isLoading: catalogLoading } = _chunkH4O22O7Ycjs.useChainCatalog.call(void 0, );
|
|
2733
2727
|
const catalogFor = _react.useCallback.call(void 0,
|
|
2734
2728
|
(chain) => {
|
|
2735
2729
|
if (!catalog) return void 0;
|
|
2736
|
-
const key =
|
|
2730
|
+
const key = _chunkH4O22O7Ycjs.catalogKeyForChain.call(void 0, chain);
|
|
2737
2731
|
return typeof key === "number" ? catalog.byChainId.get(key) : catalog.byCaip2.get(key);
|
|
2738
2732
|
},
|
|
2739
2733
|
[catalog]
|
|
@@ -2938,10 +2932,10 @@ function DepositAddressStep({
|
|
|
2938
2932
|
return;
|
|
2939
2933
|
}
|
|
2940
2934
|
const event = status.lastEvent;
|
|
2941
|
-
const eventTxHash =
|
|
2935
|
+
const eventTxHash = _chunkH4O22O7Ycjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkH4O22O7Ycjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
2942
2936
|
if (baselineTxHashRef.current === void 0) {
|
|
2943
2937
|
baselineTxHashRef.current = eventTxHash;
|
|
2944
|
-
} else if (eventTxHash && (!baselineTxHashRef.current || !
|
|
2938
|
+
} else if (eventTxHash && (!baselineTxHashRef.current || !_chunkH4O22O7Ycjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
|
|
2945
2939
|
const details = getDepositEventDetails(event);
|
|
2946
2940
|
const chainId = _nullishCoalesce(details.chainId, () => ( "unknown"));
|
|
2947
2941
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
@@ -2950,7 +2944,7 @@ function DepositAddressStep({
|
|
|
2950
2944
|
baselineTxHashRef.current = eventTxHash;
|
|
2951
2945
|
isTrackingRef.current = true;
|
|
2952
2946
|
const isEvmToken = token ? /^0x[a-fA-F0-9]{40}$/.test(token) : false;
|
|
2953
|
-
const sourceDecimals = _nullishCoalesce(details.sourceDecimals, () => ( (isEvmToken ?
|
|
2947
|
+
const sourceDecimals = _nullishCoalesce(details.sourceDecimals, () => ( (isEvmToken ? _chunkOY5N3E6Lcjs.findTokenDecimals.call(void 0,
|
|
2954
2948
|
token,
|
|
2955
2949
|
typeof chainId === "number" ? chainId : void 0
|
|
2956
2950
|
) : void 0)));
|
|
@@ -3015,7 +3009,7 @@ function DepositAddressStep({
|
|
|
3015
3009
|
const handleNotificationDismiss = _react.useCallback.call(void 0, (id) => {
|
|
3016
3010
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
3017
3011
|
}, []);
|
|
3018
|
-
const qrIconSrc = _nullishCoalesce(_optionalChain([catalogFor, 'call', _140 => _140(sourceChainId), 'optionalAccess', _141 => _141.iconUrl]), () => (
|
|
3012
|
+
const qrIconSrc = _nullishCoalesce(_optionalChain([catalogFor, 'call', _140 => _140(sourceChainId), 'optionalAccess', _141 => _141.iconUrl]), () => ( _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, sourceChainId)));
|
|
3019
3013
|
const reviewAsset = selectionAsAsset(
|
|
3020
3014
|
sourceChainId,
|
|
3021
3015
|
sourceTokenSymbol,
|
|
@@ -3025,13 +3019,13 @@ function DepositAddressStep({
|
|
|
3025
3019
|
if (chainOptions.length === 0) {
|
|
3026
3020
|
if (catalogLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositAddressSkeleton, { uiConfig });
|
|
3027
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: [
|
|
3028
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3029
|
-
/* @__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." })
|
|
3030
3024
|
] }) });
|
|
3031
3025
|
}
|
|
3032
3026
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
3033
3027
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
3034
|
-
/* @__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" }),
|
|
3035
3029
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
3036
3030
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
3037
3031
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -3047,14 +3041,14 @@ function DepositAddressStep({
|
|
|
3047
3041
|
},
|
|
3048
3042
|
children: [
|
|
3049
3043
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3050
|
-
|
|
3044
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
3051
3045
|
{
|
|
3052
|
-
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _142 => _142(sourceChainId), 'optionalAccess', _143 => _143.iconUrl]), () => (
|
|
3046
|
+
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _142 => _142(sourceChainId), 'optionalAccess', _143 => _143.iconUrl]), () => ( _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, sourceChainId))),
|
|
3053
3047
|
className: "rs-deposit-address-dropdown-icon"
|
|
3054
3048
|
}
|
|
3055
3049
|
),
|
|
3056
3050
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainLabel(sourceChainId, catalogFor(sourceChainId)) }),
|
|
3057
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3051
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3058
3052
|
]
|
|
3059
3053
|
}
|
|
3060
3054
|
),
|
|
@@ -3066,9 +3060,9 @@ function DepositAddressStep({
|
|
|
3066
3060
|
onClick: () => handleSelectChain(chainId),
|
|
3067
3061
|
children: [
|
|
3068
3062
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3069
|
-
|
|
3063
|
+
_chunkH4O22O7Ycjs.CdnIcon,
|
|
3070
3064
|
{
|
|
3071
|
-
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _144 => _144(chainId), 'optionalAccess', _145 => _145.iconUrl]), () => (
|
|
3065
|
+
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _144 => _144(chainId), 'optionalAccess', _145 => _145.iconUrl]), () => ( _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, chainId))),
|
|
3072
3066
|
className: "rs-deposit-address-dropdown-icon"
|
|
3073
3067
|
}
|
|
3074
3068
|
),
|
|
@@ -3083,9 +3077,9 @@ function DepositAddressStep({
|
|
|
3083
3077
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
|
|
3084
3078
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
3085
3079
|
"Min.$",
|
|
3086
|
-
(
|
|
3087
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3088
|
-
|
|
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),
|
|
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,
|
|
3089
3083
|
{
|
|
3090
3084
|
className: "rs-deposit-address-min-icon",
|
|
3091
3085
|
"aria-hidden": "true"
|
|
@@ -3106,7 +3100,7 @@ function DepositAddressStep({
|
|
|
3106
3100
|
children: [
|
|
3107
3101
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenGlyph, { symbol: sourceTokenSymbol }),
|
|
3108
3102
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceTokenSymbol }),
|
|
3109
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3103
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3110
3104
|
]
|
|
3111
3105
|
}
|
|
3112
3106
|
),
|
|
@@ -3151,7 +3145,7 @@ function DepositAddressStep({
|
|
|
3151
3145
|
className: "rs-deposit-address-copy",
|
|
3152
3146
|
onClick: handleCopy,
|
|
3153
3147
|
children: [
|
|
3154
|
-
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, {}),
|
|
3155
3149
|
copied ? "Copied!" : "Copy address"
|
|
3156
3150
|
]
|
|
3157
3151
|
}
|
|
@@ -3186,7 +3180,7 @@ function DepositAddressStep({
|
|
|
3186
3180
|
},
|
|
3187
3181
|
deposit.id
|
|
3188
3182
|
)) }),
|
|
3189
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3183
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3190
3184
|
] });
|
|
3191
3185
|
}
|
|
3192
3186
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -3243,7 +3237,7 @@ function FinalisingDepositStep() {
|
|
|
3243
3237
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
3244
3238
|
] })
|
|
3245
3239
|
] }),
|
|
3246
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3240
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3247
3241
|
] });
|
|
3248
3242
|
}
|
|
3249
3243
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
@@ -3273,7 +3267,7 @@ function SwappedOrderTracker({
|
|
|
3273
3267
|
];
|
|
3274
3268
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
3275
3269
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3276
|
-
/* @__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 }),
|
|
3277
3271
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
3278
3272
|
const status = stepStates[idx];
|
|
3279
3273
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -3287,7 +3281,7 @@ function SwappedOrderTracker({
|
|
|
3287
3281
|
{
|
|
3288
3282
|
className: "rs-swapped-tracker-step-marker",
|
|
3289
3283
|
"aria-hidden": "true",
|
|
3290
|
-
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,
|
|
3291
3285
|
"svg",
|
|
3292
3286
|
{
|
|
3293
3287
|
className: "rs-swapped-tracker-step-ring",
|
|
@@ -3322,7 +3316,7 @@ function SwappedOrderTracker({
|
|
|
3322
3316
|
}
|
|
3323
3317
|
)
|
|
3324
3318
|
] }),
|
|
3325
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3319
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3326
3320
|
] });
|
|
3327
3321
|
}
|
|
3328
3322
|
function formatTrackerAmount(amount) {
|
|
@@ -3610,10 +3604,10 @@ function SwappedProviderStep({
|
|
|
3610
3604
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
3611
3605
|
if (cancelled) return;
|
|
3612
3606
|
const event = status.lastEvent;
|
|
3613
|
-
const eventTxHash =
|
|
3607
|
+
const eventTxHash = _chunkH4O22O7Ycjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunkH4O22O7Ycjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
3614
3608
|
if (baselineDepositTxHashRef.current === void 0) {
|
|
3615
3609
|
baselineDepositTxHashRef.current = eventTxHash;
|
|
3616
|
-
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !
|
|
3610
|
+
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunkH4O22O7Ycjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
|
|
3617
3611
|
currentDepositTxHashRef.current = eventTxHash;
|
|
3618
3612
|
setLatestEvent(_nullishCoalesce(event, () => ( null)));
|
|
3619
3613
|
}
|
|
@@ -3688,10 +3682,10 @@ function SwappedProviderStep({
|
|
|
3688
3682
|
[orderState, latestEvent]
|
|
3689
3683
|
);
|
|
3690
3684
|
const terminalState = _react.useMemo.call(void 0, () => {
|
|
3691
|
-
if (
|
|
3685
|
+
if (_chunkH4O22O7Ycjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
3692
3686
|
return {
|
|
3693
3687
|
kind: "failed",
|
|
3694
|
-
message:
|
|
3688
|
+
message: _chunkH4O22O7Ycjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
3695
3689
|
};
|
|
3696
3690
|
}
|
|
3697
3691
|
if (_optionalChain([orderState, 'optionalAccess', _178 => _178.status]) === "order_cancelled") {
|
|
@@ -3717,7 +3711,7 @@ function SwappedProviderStep({
|
|
|
3717
3711
|
orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _183 => _183.orderCrypto]), () => ( null)),
|
|
3718
3712
|
// Base-unit source amount from the deposit row/event, consistent with the
|
|
3719
3713
|
// wallet/QR path. ProcessingStep + onLifecycle expect base units.
|
|
3720
|
-
amount: _nullishCoalesce(
|
|
3714
|
+
amount: _nullishCoalesce(_chunkH4O22O7Ycjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null)),
|
|
3721
3715
|
expectedOrderUuid: expectedOrderUuidRef.current,
|
|
3722
3716
|
initialEvent: _nullishCoalesce(latestEvent, () => ( void 0))
|
|
3723
3717
|
};
|
|
@@ -3728,14 +3722,14 @@ function SwappedProviderStep({
|
|
|
3728
3722
|
}, [latestEvent, orderState, smartAccount]);
|
|
3729
3723
|
_react.useEffect.call(void 0, () => {
|
|
3730
3724
|
if (failedFiredRef.current || completeFiredRef.current) return;
|
|
3731
|
-
if (!
|
|
3725
|
+
if (!_chunkH4O22O7Ycjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
|
|
3732
3726
|
const txHash = currentDepositTxHashRef.current;
|
|
3733
3727
|
if (!txHash) return;
|
|
3734
3728
|
failedFiredRef.current = true;
|
|
3735
3729
|
setPhase("tracker");
|
|
3736
3730
|
_optionalChain([onSwappedFailedRef, 'access', _184 => _184.current, 'optionalCall', _185 => _185(
|
|
3737
3731
|
txHash,
|
|
3738
|
-
|
|
3732
|
+
_chunkH4O22O7Ycjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
3739
3733
|
)]);
|
|
3740
3734
|
}, [latestEvent]);
|
|
3741
3735
|
const immersive = !openExternally && variant === "fiat" && phase === "provider" && !loadError;
|
|
@@ -3785,7 +3779,7 @@ function SwappedProviderStep({
|
|
|
3785
3779
|
}
|
|
3786
3780
|
)
|
|
3787
3781
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
3788
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3782
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, {}),
|
|
3789
3783
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-swapped-handoff-text", children: [
|
|
3790
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" }),
|
|
3791
3785
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-swapped-handoff-subtitle", children: handoffOpened ? (
|
|
@@ -3809,7 +3803,7 @@ function SwappedProviderStep({
|
|
|
3809
3803
|
}
|
|
3810
3804
|
)
|
|
3811
3805
|
] }) }),
|
|
3812
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3806
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3813
3807
|
] });
|
|
3814
3808
|
}
|
|
3815
3809
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-fiat-onramp", "data-variant": variant, children: [
|
|
@@ -3826,7 +3820,7 @@ function SwappedProviderStep({
|
|
|
3826
3820
|
}
|
|
3827
3821
|
)
|
|
3828
3822
|
] }),
|
|
3829
|
-
!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, {}) }),
|
|
3830
3824
|
widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3831
3825
|
"iframe",
|
|
3832
3826
|
{
|
|
@@ -3849,11 +3843,11 @@ function SwappedProviderStep({
|
|
|
3849
3843
|
retryToken
|
|
3850
3844
|
)
|
|
3851
3845
|
] }) }),
|
|
3852
|
-
loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3846
|
+
loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
3853
3847
|
] });
|
|
3854
3848
|
}
|
|
3855
3849
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
3856
|
-
if (
|
|
3850
|
+
if (_chunkH4O22O7Ycjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
3857
3851
|
return ["complete", "complete", "failed", "pending"];
|
|
3858
3852
|
}
|
|
3859
3853
|
if (swappedStatus === "order_cancelled") {
|
|
@@ -4063,7 +4057,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
4063
4057
|
function ExchangeLogo({ exchange }) {
|
|
4064
4058
|
const [failed, setFailed] = _react.useState.call(void 0, false);
|
|
4065
4059
|
if (!exchange.logoUrl || failed) {
|
|
4066
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4060
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.BankIcon, {});
|
|
4067
4061
|
}
|
|
4068
4062
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4069
4063
|
"img",
|
|
@@ -4144,14 +4138,14 @@ function ExchangeSelectStep({
|
|
|
4144
4138
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
|
|
4145
4139
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4146
4140
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4147
|
-
|
|
4141
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
4148
4142
|
{
|
|
4149
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4143
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.UnplugIcon, {}),
|
|
4150
4144
|
title: "Connect exchange",
|
|
4151
4145
|
subtitle: "Select an exchange to connect"
|
|
4152
4146
|
}
|
|
4153
4147
|
),
|
|
4154
|
-
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, {}) }),
|
|
4155
4149
|
!loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
4156
4150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
4157
4151
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4177,7 +4171,7 @@ function ExchangeSelectStep({
|
|
|
4177
4171
|
)
|
|
4178
4172
|
] }),
|
|
4179
4173
|
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
4180
|
-
const brand =
|
|
4174
|
+
const brand = _chunkH4O22O7Ycjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
|
|
4181
4175
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4182
4176
|
"button",
|
|
4183
4177
|
{
|
|
@@ -4202,7 +4196,7 @@ function ExchangeSelectStep({
|
|
|
4202
4196
|
);
|
|
4203
4197
|
}) })
|
|
4204
4198
|
] }),
|
|
4205
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4199
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {}),
|
|
4206
4200
|
exchangeFeeBps > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "rs-exchange-select-fee-note", children: [
|
|
4207
4201
|
"A ",
|
|
4208
4202
|
formatFeeRate(exchangeFeeBps),
|
|
@@ -4240,14 +4234,14 @@ function SolanaTokenSelectStep({
|
|
|
4240
4234
|
setError(null);
|
|
4241
4235
|
const portfolioBySymbol = {};
|
|
4242
4236
|
try {
|
|
4243
|
-
|
|
4237
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
4244
4238
|
solanaAddress
|
|
4245
4239
|
});
|
|
4246
4240
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
4247
4241
|
if (!active) return;
|
|
4248
4242
|
for (const t of portfolio.tokens) {
|
|
4249
4243
|
const symbol = t.symbol.toUpperCase();
|
|
4250
|
-
if (!
|
|
4244
|
+
if (!_chunkOY5N3E6Lcjs.SOLANA_TOKENS.some((st) => st.symbol === symbol)) continue;
|
|
4251
4245
|
let parsed = 0n;
|
|
4252
4246
|
try {
|
|
4253
4247
|
parsed = BigInt(t.balance || "0");
|
|
@@ -4263,12 +4257,12 @@ function SolanaTokenSelectStep({
|
|
|
4263
4257
|
};
|
|
4264
4258
|
}
|
|
4265
4259
|
}
|
|
4266
|
-
|
|
4260
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
4267
4261
|
symbols: Object.keys(portfolioBySymbol)
|
|
4268
4262
|
});
|
|
4269
4263
|
} catch (err) {
|
|
4270
4264
|
if (!active) return;
|
|
4271
|
-
|
|
4265
|
+
_chunkH4O22O7Ycjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
4272
4266
|
solanaAddress
|
|
4273
4267
|
});
|
|
4274
4268
|
setError(
|
|
@@ -4279,7 +4273,7 @@ function SolanaTokenSelectStep({
|
|
|
4279
4273
|
return;
|
|
4280
4274
|
}
|
|
4281
4275
|
const results = [];
|
|
4282
|
-
for (const token of
|
|
4276
|
+
for (const token of _chunkOY5N3E6Lcjs.SOLANA_TOKENS) {
|
|
4283
4277
|
const fromPortfolio = portfolioBySymbol[token.symbol];
|
|
4284
4278
|
if (fromPortfolio && fromPortfolio.balance > 0n) {
|
|
4285
4279
|
results.push({
|
|
@@ -4315,30 +4309,30 @@ function SolanaTokenSelectStep({
|
|
|
4315
4309
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
4316
4310
|
const numeric = Number(raw);
|
|
4317
4311
|
if (!Number.isFinite(numeric)) return raw;
|
|
4318
|
-
return
|
|
4312
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
4319
4313
|
} catch (e27) {
|
|
4320
4314
|
return "--";
|
|
4321
4315
|
}
|
|
4322
4316
|
};
|
|
4323
|
-
const chainIcon =
|
|
4324
|
-
const chainName =
|
|
4317
|
+
const chainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, "solana");
|
|
4318
|
+
const chainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, "solana");
|
|
4325
4319
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4326
4320
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
4327
4321
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4328
|
-
|
|
4322
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
4329
4323
|
{
|
|
4330
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4324
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
4331
4325
|
title: "Your assets",
|
|
4332
4326
|
subtitle: "Select source assets to transfer"
|
|
4333
4327
|
}
|
|
4334
4328
|
),
|
|
4335
4329
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
4336
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4330
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Spinner, { className: "rs-text-tertiary" }),
|
|
4337
4331
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
4338
4332
|
] }),
|
|
4339
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4333
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
4340
4334
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
4341
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4335
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
4342
4336
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
4343
4337
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
4344
4338
|
solanaAddress.slice(0, 6),
|
|
@@ -4369,13 +4363,13 @@ function SolanaTokenSelectStep({
|
|
|
4369
4363
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
4370
4364
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
4371
4365
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4372
|
-
|
|
4366
|
+
_chunkH4O22O7Ycjs.TokenIcon,
|
|
4373
4367
|
{
|
|
4374
4368
|
symbol: entry.token.symbol,
|
|
4375
4369
|
fallback: entry.token.symbol.slice(0, 4)
|
|
4376
4370
|
}
|
|
4377
4371
|
) }),
|
|
4378
|
-
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 }) })
|
|
4379
4373
|
] }),
|
|
4380
4374
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-text", children: [
|
|
4381
4375
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-name-row", children: [
|
|
@@ -4392,14 +4386,14 @@ function SolanaTokenSelectStep({
|
|
|
4392
4386
|
] })
|
|
4393
4387
|
] })
|
|
4394
4388
|
] }),
|
|
4395
|
-
/* @__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}` : "--" })
|
|
4396
4390
|
]
|
|
4397
4391
|
},
|
|
4398
4392
|
entry.token.symbol
|
|
4399
4393
|
);
|
|
4400
4394
|
}) }),
|
|
4401
4395
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4402
|
-
|
|
4396
|
+
_chunkH4O22O7Ycjs.Button,
|
|
4403
4397
|
{
|
|
4404
4398
|
onClick: () => selectedEntry && onContinue(
|
|
4405
4399
|
selectedEntry.token,
|
|
@@ -4412,7 +4406,7 @@ function SolanaTokenSelectStep({
|
|
|
4412
4406
|
}
|
|
4413
4407
|
)
|
|
4414
4408
|
] }),
|
|
4415
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4409
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
4416
4410
|
] });
|
|
4417
4411
|
}
|
|
4418
4412
|
|
|
@@ -4443,7 +4437,7 @@ function SolanaAmountStep({
|
|
|
4443
4437
|
const [amount, setAmount] = _react.useState.call(void 0, "");
|
|
4444
4438
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
4445
4439
|
const hasAppliedDefaultRef = _react.useRef.call(void 0, false);
|
|
4446
|
-
const isSourceStablecoin =
|
|
4440
|
+
const isSourceStablecoin = _chunkOY5N3E6Lcjs.isStablecoinSymbol.call(void 0, token.symbol);
|
|
4447
4441
|
const isMaxDefault = _optionalChain([defaultAmount, 'optionalAccess', _202 => _202.trim, 'call', _203 => _203(), 'access', _204 => _204.toLowerCase, 'call', _205 => _205()]) === "max";
|
|
4448
4442
|
const tokenPriceUsd = _react.useMemo.call(void 0, () => {
|
|
4449
4443
|
if (isSourceStablecoin) return 1;
|
|
@@ -4464,7 +4458,7 @@ function SolanaAmountStep({
|
|
|
4464
4458
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
4465
4459
|
const numeric = Number(raw);
|
|
4466
4460
|
if (!Number.isFinite(numeric)) return raw;
|
|
4467
|
-
return
|
|
4461
|
+
return _chunkH4O22O7Ycjs.tokenFormatter.format(numeric);
|
|
4468
4462
|
} catch (e29) {
|
|
4469
4463
|
return "\u2026";
|
|
4470
4464
|
}
|
|
@@ -4481,7 +4475,7 @@ function SolanaAmountStep({
|
|
|
4481
4475
|
}
|
|
4482
4476
|
}, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
|
|
4483
4477
|
const spendableBalance = _react.useMemo.call(void 0, () => {
|
|
4484
|
-
if (!
|
|
4478
|
+
if (!_chunkOY5N3E6Lcjs.isNativeSol.call(void 0, token)) return balance;
|
|
4485
4479
|
return balance > SOL_FEE_RESERVE_LAMPORTS ? balance - SOL_FEE_RESERVE_LAMPORTS : 0n;
|
|
4486
4480
|
}, [balance, token]);
|
|
4487
4481
|
const spendableBalanceUsd = _react.useMemo.call(void 0, () => {
|
|
@@ -4546,7 +4540,7 @@ function SolanaAmountStep({
|
|
|
4546
4540
|
return null;
|
|
4547
4541
|
}
|
|
4548
4542
|
}, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, token.decimals]);
|
|
4549
|
-
const minDepositUsd =
|
|
4543
|
+
const minDepositUsd = _chunkOY5N3E6Lcjs.isHyperCoreDestination.call(void 0, targetChain) ? Math.max(_chunkOY5N3E6Lcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _206 => _206.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _207 => _207.minDepositUsd]), () => ( null));
|
|
4550
4544
|
const maxDepositUsd = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _208 => _208.maxDepositUsd]), () => ( null));
|
|
4551
4545
|
const isBelowMin = minDepositUsd !== null && numericAmount > 0 && numericAmount < minDepositUsd;
|
|
4552
4546
|
const isAboveMax = maxDepositUsd !== null && numericAmount > maxDepositUsd;
|
|
@@ -4557,7 +4551,7 @@ function SolanaAmountStep({
|
|
|
4557
4551
|
const handlePresetClick = (percentage) => {
|
|
4558
4552
|
const formatted = computePresetAmount(percentage);
|
|
4559
4553
|
if (!formatted) return;
|
|
4560
|
-
|
|
4554
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
4561
4555
|
percentage,
|
|
4562
4556
|
symbol: token.symbol,
|
|
4563
4557
|
formatted
|
|
@@ -4592,7 +4586,7 @@ function SolanaAmountStep({
|
|
|
4592
4586
|
try {
|
|
4593
4587
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
4594
4588
|
} catch (e34) {
|
|
4595
|
-
|
|
4589
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
4596
4590
|
amount,
|
|
4597
4591
|
sourceAmount: sourceAmountStr,
|
|
4598
4592
|
reason: "parse-units-failed"
|
|
@@ -4601,13 +4595,13 @@ function SolanaAmountStep({
|
|
|
4601
4595
|
return;
|
|
4602
4596
|
}
|
|
4603
4597
|
if (amountInUnits > spendableBalance) {
|
|
4604
|
-
const isReserveIssue =
|
|
4598
|
+
const isReserveIssue = _chunkOY5N3E6Lcjs.isNativeSol.call(void 0, token) && amountInUnits <= balance;
|
|
4605
4599
|
setError(
|
|
4606
4600
|
isReserveIssue ? "Use a bit less than your full SOL balance" : "Insufficient balance"
|
|
4607
4601
|
);
|
|
4608
4602
|
return;
|
|
4609
4603
|
}
|
|
4610
|
-
|
|
4604
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
4611
4605
|
symbol: token.symbol,
|
|
4612
4606
|
inputAmountUsd: amount,
|
|
4613
4607
|
sourceAmount: sourceAmountStr,
|
|
@@ -4620,7 +4614,7 @@ function SolanaAmountStep({
|
|
|
4620
4614
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
4621
4615
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4622
4616
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4623
|
-
/* @__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" }),
|
|
4624
4618
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
4625
4619
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
4626
4620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4640,13 +4634,13 @@ function SolanaAmountStep({
|
|
|
4640
4634
|
" available",
|
|
4641
4635
|
computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
4642
4636
|
" (~",
|
|
4643
|
-
|
|
4637
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(computedBalanceUsd),
|
|
4644
4638
|
")"
|
|
4645
4639
|
] })
|
|
4646
4640
|
] }),
|
|
4647
4641
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
4648
4642
|
"Min. deposit ",
|
|
4649
|
-
|
|
4643
|
+
_chunkH4O22O7Ycjs.currencyFormatter.format(minDepositUsd)
|
|
4650
4644
|
] })
|
|
4651
4645
|
] })
|
|
4652
4646
|
] }),
|
|
@@ -4669,7 +4663,7 @@ function SolanaAmountStep({
|
|
|
4669
4663
|
"Solana ",
|
|
4670
4664
|
token.symbol
|
|
4671
4665
|
] }),
|
|
4672
|
-
/* @__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 }) })
|
|
4673
4667
|
] })
|
|
4674
4668
|
] }),
|
|
4675
4669
|
targetChainName && targetTokenSymbol && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
@@ -4680,17 +4674,17 @@ function SolanaAmountStep({
|
|
|
4680
4674
|
" ",
|
|
4681
4675
|
targetTokenSymbol
|
|
4682
4676
|
] }),
|
|
4683
|
-
/* @__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 }) })
|
|
4684
4678
|
] })
|
|
4685
4679
|
] }),
|
|
4686
4680
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
4687
4681
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
4688
|
-
/* @__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) })
|
|
4689
4683
|
] })
|
|
4690
4684
|
] }),
|
|
4691
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4685
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
4692
4686
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4693
|
-
|
|
4687
|
+
_chunkH4O22O7Ycjs.Button,
|
|
4694
4688
|
{
|
|
4695
4689
|
onClick: handleContinue,
|
|
4696
4690
|
fullWidth: true,
|
|
@@ -4699,7 +4693,7 @@ function SolanaAmountStep({
|
|
|
4699
4693
|
}
|
|
4700
4694
|
)
|
|
4701
4695
|
] }),
|
|
4702
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4696
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
4703
4697
|
] });
|
|
4704
4698
|
}
|
|
4705
4699
|
|
|
@@ -4719,10 +4713,10 @@ function loadSolanaDependencies() {
|
|
|
4719
4713
|
return dependenciesPromise2;
|
|
4720
4714
|
}
|
|
4721
4715
|
function getSolanaRpcUrl(rpcUrls) {
|
|
4722
|
-
return _nullishCoalesce(
|
|
4716
|
+
return _nullishCoalesce(_chunkH4O22O7Ycjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
|
|
4723
4717
|
}
|
|
4724
4718
|
function hasConfiguredSolanaRpcUrl(rpcUrls) {
|
|
4725
|
-
return
|
|
4719
|
+
return _chunkH4O22O7Ycjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
|
|
4726
4720
|
}
|
|
4727
4721
|
async function getSolanaConnection(rpcUrls) {
|
|
4728
4722
|
const rpcUrl = getSolanaRpcUrl(rpcUrls);
|
|
@@ -4836,39 +4830,46 @@ function SolanaConfirmStep({
|
|
|
4836
4830
|
estimatedTime = "< 1 min",
|
|
4837
4831
|
onConfirm,
|
|
4838
4832
|
onError,
|
|
4833
|
+
onSubmittingChange,
|
|
4839
4834
|
debug
|
|
4840
4835
|
}) {
|
|
4841
|
-
const rpcUrls =
|
|
4836
|
+
const rpcUrls = _chunkH4O22O7Ycjs.useRpcUrls.call(void 0, );
|
|
4842
4837
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
4843
4838
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
4844
|
-
const
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
const
|
|
4851
|
-
const
|
|
4852
|
-
const
|
|
4839
|
+
const onSubmittingChangeRef = _react.useRef.call(void 0, onSubmittingChange);
|
|
4840
|
+
onSubmittingChangeRef.current = onSubmittingChange;
|
|
4841
|
+
_react.useEffect.call(void 0, () => {
|
|
4842
|
+
_optionalChain([onSubmittingChangeRef, 'access', _209 => _209.current, 'optionalCall', _210 => _210(isSubmitting)]);
|
|
4843
|
+
return () => _optionalChain([onSubmittingChangeRef, 'access', _211 => _211.current, 'optionalCall', _212 => _212(false)]);
|
|
4844
|
+
}, [isSubmitting]);
|
|
4845
|
+
const targetChainId = _chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain);
|
|
4846
|
+
const targetSymbol = _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
4847
|
+
const sourceChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, "solana");
|
|
4848
|
+
const targetChainName = _chunkOY5N3E6Lcjs.getChainName.call(void 0, targetChainId);
|
|
4849
|
+
const sourceChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, "solana");
|
|
4850
|
+
const targetChainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, targetChainId);
|
|
4851
|
+
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _213 => _213.feeSponsored]), () => ( false));
|
|
4852
|
+
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _214 => _214.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
4853
|
+
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkH4O22O7Ycjs.formatTokenAmount.call(void 0, Number(sourceAmount), token.symbol), () => ( "0")) : "0";
|
|
4853
4854
|
const receiveDisplay = (() => {
|
|
4854
4855
|
const usdValue = Number(targetAmount);
|
|
4855
4856
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
4856
|
-
const estimate =
|
|
4857
|
+
const estimate = _chunkH4O22O7Ycjs.formatReceiveEstimate.call(void 0, {
|
|
4857
4858
|
sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
|
|
4858
4859
|
sourceSymbol: token.symbol,
|
|
4859
4860
|
targetSymbol,
|
|
4860
4861
|
sourceAmountUsd,
|
|
4861
|
-
sourceTrusted:
|
|
4862
|
+
sourceTrusted: _chunkH4O22O7Ycjs.isRecognizedToken.call(void 0, token.mint, "solana"),
|
|
4862
4863
|
// Curated stablecoin target estimates at $1 when unquoted; never applied
|
|
4863
4864
|
// to the source (a held token). See ConfirmStep for the rationale.
|
|
4864
|
-
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 } : {}
|
|
4865
4866
|
});
|
|
4866
4867
|
if (estimate !== void 0) return estimate;
|
|
4867
4868
|
return targetSymbol;
|
|
4868
4869
|
})();
|
|
4869
4870
|
const handleConfirm = async () => {
|
|
4870
4871
|
if (!solanaProvider) {
|
|
4871
|
-
|
|
4872
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
4872
4873
|
reason: "missing-provider"
|
|
4873
4874
|
});
|
|
4874
4875
|
setError("Solana wallet not connected");
|
|
@@ -4876,7 +4877,7 @@ function SolanaConfirmStep({
|
|
|
4876
4877
|
}
|
|
4877
4878
|
const parsedAmount = parseFloat(sourceAmount);
|
|
4878
4879
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
4879
|
-
|
|
4880
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
4880
4881
|
reason: "invalid-amount",
|
|
4881
4882
|
sourceAmount
|
|
4882
4883
|
});
|
|
@@ -4885,7 +4886,7 @@ function SolanaConfirmStep({
|
|
|
4885
4886
|
}
|
|
4886
4887
|
setError(null);
|
|
4887
4888
|
setIsSubmitting(true);
|
|
4888
|
-
|
|
4889
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
4889
4890
|
smartAccount,
|
|
4890
4891
|
solanaAddress,
|
|
4891
4892
|
solanaDepositAddress,
|
|
@@ -4895,7 +4896,7 @@ function SolanaConfirmStep({
|
|
|
4895
4896
|
});
|
|
4896
4897
|
try {
|
|
4897
4898
|
const check = await service.checkAccount(smartAccount);
|
|
4898
|
-
|
|
4899
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
4899
4900
|
smartAccount,
|
|
4900
4901
|
isRegistered: check.isRegistered,
|
|
4901
4902
|
targetChain: check.targetChain,
|
|
@@ -4908,12 +4909,12 @@ function SolanaConfirmStep({
|
|
|
4908
4909
|
}
|
|
4909
4910
|
const connection = await (hasConfiguredSolanaRpcUrl(rpcUrls) ? getSolanaConnection(rpcUrls) : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection(rpcUrls))));
|
|
4910
4911
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
4911
|
-
|
|
4912
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
4912
4913
|
token: token.symbol,
|
|
4913
4914
|
sourceAmount,
|
|
4914
4915
|
amountUnits: amountUnits.toString()
|
|
4915
4916
|
});
|
|
4916
|
-
const transaction =
|
|
4917
|
+
const transaction = _chunkOY5N3E6Lcjs.isNativeSol.call(void 0, token) ? await buildSolTransferTransaction(
|
|
4917
4918
|
connection,
|
|
4918
4919
|
solanaAddress,
|
|
4919
4920
|
solanaDepositAddress,
|
|
@@ -4925,10 +4926,10 @@ function SolanaConfirmStep({
|
|
|
4925
4926
|
token.mint,
|
|
4926
4927
|
amountUnits
|
|
4927
4928
|
);
|
|
4928
|
-
|
|
4929
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
4929
4930
|
token: token.symbol,
|
|
4930
4931
|
instructionCount: transaction.instructions.length,
|
|
4931
|
-
feePayer: _optionalChain([transaction, 'access',
|
|
4932
|
+
feePayer: _optionalChain([transaction, 'access', _215 => _215.feePayer, 'optionalAccess', _216 => _216.toBase58, 'call', _217 => _217()]),
|
|
4932
4933
|
recentBlockhash: transaction.recentBlockhash
|
|
4933
4934
|
});
|
|
4934
4935
|
const txHash = await sendSolanaTransaction(
|
|
@@ -4936,7 +4937,7 @@ function SolanaConfirmStep({
|
|
|
4936
4937
|
connection,
|
|
4937
4938
|
transaction
|
|
4938
4939
|
);
|
|
4939
|
-
|
|
4940
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
4940
4941
|
txHash,
|
|
4941
4942
|
amountUnits: amountUnits.toString()
|
|
4942
4943
|
});
|
|
@@ -4948,21 +4949,21 @@ function SolanaConfirmStep({
|
|
|
4948
4949
|
});
|
|
4949
4950
|
} catch (err) {
|
|
4950
4951
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
4951
|
-
const message =
|
|
4952
|
-
|
|
4952
|
+
const message = _chunkH4O22O7Ycjs.formatUserError.call(void 0, raw);
|
|
4953
|
+
_chunkH4O22O7Ycjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
4953
4954
|
smartAccount,
|
|
4954
4955
|
token: token.symbol,
|
|
4955
4956
|
sourceAmount
|
|
4956
4957
|
});
|
|
4957
4958
|
setError(message);
|
|
4958
|
-
_optionalChain([onError, 'optionalCall',
|
|
4959
|
+
_optionalChain([onError, 'optionalCall', _218 => _218(message, "SOLANA_TRANSFER_ERROR", raw)]);
|
|
4959
4960
|
} finally {
|
|
4960
4961
|
setIsSubmitting(false);
|
|
4961
4962
|
}
|
|
4962
4963
|
};
|
|
4963
4964
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4964
4965
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4965
|
-
/* @__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" }),
|
|
4966
4967
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4967
4968
|
ReviewDetails,
|
|
4968
4969
|
{
|
|
@@ -4978,9 +4979,9 @@ function SolanaConfirmStep({
|
|
|
4978
4979
|
fee: { display: "$0.04", struck: feeSponsored, tooltip: feeTooltip }
|
|
4979
4980
|
}
|
|
4980
4981
|
),
|
|
4981
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4982
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.Callout, { variant: "error", children: error }),
|
|
4982
4983
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4983
|
-
|
|
4984
|
+
_chunkH4O22O7Ycjs.Button,
|
|
4984
4985
|
{
|
|
4985
4986
|
onClick: handleConfirm,
|
|
4986
4987
|
loading: isSubmitting,
|
|
@@ -4991,7 +4992,7 @@ function SolanaConfirmStep({
|
|
|
4991
4992
|
}
|
|
4992
4993
|
)
|
|
4993
4994
|
] }),
|
|
4994
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4995
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
4995
4996
|
] });
|
|
4996
4997
|
}
|
|
4997
4998
|
|
|
@@ -5006,22 +5007,22 @@ function DappImportAssetSelectStep({
|
|
|
5006
5007
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
5007
5008
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
5008
5009
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5009
|
-
|
|
5010
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
5010
5011
|
{
|
|
5011
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5012
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
5012
5013
|
title: `Transfer from ${sourceLabel}`,
|
|
5013
5014
|
subtitle: "Pick the balance to import"
|
|
5014
5015
|
}
|
|
5015
5016
|
),
|
|
5016
5017
|
incompleteSummary && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-notice", role: "status", children: incompleteSummary }),
|
|
5017
5018
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
5018
|
-
const tokenAmount = asset.balance ?
|
|
5019
|
+
const tokenAmount = asset.balance ? _chunkH4O22O7Ycjs.tokenFormatter.format(
|
|
5019
5020
|
Number(asset.balance) / 10 ** asset.decimals
|
|
5020
5021
|
) : "0";
|
|
5021
|
-
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ?
|
|
5022
|
+
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkH4O22O7Ycjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
|
|
5022
5023
|
const assetIcon = asset.icon;
|
|
5023
|
-
const chainIcon =
|
|
5024
|
-
const badge =
|
|
5024
|
+
const chainIcon = _chunkOY5N3E6Lcjs.getChainIcon.call(void 0, asset.chainId);
|
|
5025
|
+
const badge = _chunkOY5N3E6Lcjs.getChainBadge.call(void 0, asset.chainId);
|
|
5025
5026
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
5026
5027
|
"button",
|
|
5027
5028
|
{
|
|
@@ -5031,14 +5032,14 @@ function DappImportAssetSelectStep({
|
|
|
5031
5032
|
children: [
|
|
5032
5033
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
5033
5034
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
5034
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5035
|
-
|
|
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,
|
|
5036
5037
|
{
|
|
5037
5038
|
symbol: asset.symbol,
|
|
5038
5039
|
fallback: asset.symbol.slice(0, 4)
|
|
5039
5040
|
}
|
|
5040
5041
|
) }),
|
|
5041
|
-
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,
|
|
5042
5043
|
"span",
|
|
5043
5044
|
{
|
|
5044
5045
|
className: "rs-asset-chain-badge",
|
|
@@ -5070,7 +5071,7 @@ function DappImportAssetSelectStep({
|
|
|
5070
5071
|
);
|
|
5071
5072
|
}) })
|
|
5072
5073
|
] }),
|
|
5073
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5074
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
5074
5075
|
] });
|
|
5075
5076
|
}
|
|
5076
5077
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
@@ -5092,7 +5093,7 @@ function describeRow(status, comingSoon) {
|
|
|
5092
5093
|
}
|
|
5093
5094
|
if (status.enabled) {
|
|
5094
5095
|
return {
|
|
5095
|
-
subtitle: status.balanceUsd > 0 ?
|
|
5096
|
+
subtitle: status.balanceUsd > 0 ? _chunkH4O22O7Ycjs.currencyFormatter.format(status.balanceUsd) : "No balance",
|
|
5096
5097
|
disabled: false,
|
|
5097
5098
|
busy: false
|
|
5098
5099
|
};
|
|
@@ -5115,9 +5116,9 @@ function DappImportSelectStep({
|
|
|
5115
5116
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
5116
5117
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
5117
5118
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5118
|
-
|
|
5119
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
5119
5120
|
{
|
|
5120
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5121
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.MigrateAssetsIcon, {}),
|
|
5121
5122
|
title: "Migrate assets",
|
|
5122
5123
|
subtitle: "Select a position to migrate"
|
|
5123
5124
|
}
|
|
@@ -5129,16 +5130,16 @@ function DappImportSelectStep({
|
|
|
5129
5130
|
Boolean(brand.comingSoon)
|
|
5130
5131
|
);
|
|
5131
5132
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5132
|
-
|
|
5133
|
+
_chunkH4O22O7Ycjs.ListRow,
|
|
5133
5134
|
{
|
|
5134
5135
|
leadingMedia: brand.iconUrl,
|
|
5135
5136
|
title: brand.label,
|
|
5136
5137
|
subtitle,
|
|
5137
5138
|
disabled,
|
|
5138
|
-
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,
|
|
5139
5140
|
onClick: () => {
|
|
5140
5141
|
if (status === "needs-connect") {
|
|
5141
|
-
_optionalChain([onRequestConnect, 'optionalCall',
|
|
5142
|
+
_optionalChain([onRequestConnect, 'optionalCall', _219 => _219()]);
|
|
5142
5143
|
return;
|
|
5143
5144
|
}
|
|
5144
5145
|
onSelect(brand.id);
|
|
@@ -5148,7 +5149,7 @@ function DappImportSelectStep({
|
|
|
5148
5149
|
);
|
|
5149
5150
|
}) })
|
|
5150
5151
|
] }),
|
|
5151
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5152
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
5152
5153
|
] });
|
|
5153
5154
|
}
|
|
5154
5155
|
DappImportSelectStep.displayName = "DappImportSelectStep";
|
|
@@ -5165,9 +5166,9 @@ function DappImportAssetSelectSkeleton({
|
|
|
5165
5166
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
5166
5167
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
5167
5168
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5168
|
-
|
|
5169
|
+
_chunkH4O22O7Ycjs.BodyHeader,
|
|
5169
5170
|
{
|
|
5170
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5171
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.WalletIcon, {}),
|
|
5171
5172
|
title: `Transfer from ${sourceLabel}`,
|
|
5172
5173
|
subtitle: "Pick the balance to import"
|
|
5173
5174
|
}
|
|
@@ -5205,7 +5206,7 @@ function DappImportAssetSelectSkeleton({
|
|
|
5205
5206
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Try again" })
|
|
5206
5207
|
}
|
|
5207
5208
|
) }),
|
|
5208
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
5209
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.PoweredBy, {})
|
|
5209
5210
|
] });
|
|
5210
5211
|
}
|
|
5211
5212
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -5294,7 +5295,7 @@ var aaveProvider = {
|
|
|
5294
5295
|
throw new Error("Aave positions require a backend connection");
|
|
5295
5296
|
}
|
|
5296
5297
|
const response = await backend.getPositions(eoa);
|
|
5297
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
5298
|
+
if (_optionalChain([signal, 'optionalAccess', _220 => _220.aborted])) return null;
|
|
5298
5299
|
const assets = toImportableAssets(response.positions);
|
|
5299
5300
|
const failures = _nullishCoalesce(response.failures, () => ( []));
|
|
5300
5301
|
if (assets.length === 0) {
|
|
@@ -5381,9 +5382,9 @@ var aaveProvider = {
|
|
|
5381
5382
|
function toImportableAssets(positions) {
|
|
5382
5383
|
const assets = [];
|
|
5383
5384
|
for (const position of positions) {
|
|
5384
|
-
const chainId =
|
|
5385
|
+
const chainId = _chunkOY5N3E6Lcjs.parseEvmChainId.call(void 0, position.chain);
|
|
5385
5386
|
if (chainId === null) continue;
|
|
5386
|
-
if (!
|
|
5387
|
+
if (!_chunkOY5N3E6Lcjs.SUPPORTED_CHAIN_IDS.includes(chainId)) continue;
|
|
5387
5388
|
if (BigInt(position.maxWithdrawable) <= 0n) continue;
|
|
5388
5389
|
if (position.constraints.some((c) => POLICY_REFUSED.includes(c))) continue;
|
|
5389
5390
|
assets.push(buildAsset(position, chainId));
|
|
@@ -5497,11 +5498,11 @@ async function detectPolymarketWalletKind(params) {
|
|
|
5497
5498
|
const { publicClient, proxyWallet, eoa } = params;
|
|
5498
5499
|
const results = await publicClient.multicall({
|
|
5499
5500
|
allowFailure: true,
|
|
5500
|
-
multicallAddress:
|
|
5501
|
+
multicallAddress: _chunkLVCD6RHFcjs.MULTICALL3_ADDRESS,
|
|
5501
5502
|
contracts: [
|
|
5502
5503
|
{
|
|
5503
5504
|
address: proxyWallet,
|
|
5504
|
-
abi:
|
|
5505
|
+
abi: _chunkLVCD6RHFcjs.SAFE_ABI,
|
|
5505
5506
|
functionName: "isOwner",
|
|
5506
5507
|
args: [eoa]
|
|
5507
5508
|
},
|
|
@@ -5534,7 +5535,7 @@ async function buildSignedDepositWalletBatch(params) {
|
|
|
5534
5535
|
if (!account || !chain) {
|
|
5535
5536
|
throw new Error("Wallet not connected");
|
|
5536
5537
|
}
|
|
5537
|
-
if (chain.id !==
|
|
5538
|
+
if (chain.id !== _chunkLVCD6RHFcjs.POLYMARKET_POLYGON_CHAIN_ID) {
|
|
5538
5539
|
throw new Error("Switch to Polygon to sign");
|
|
5539
5540
|
}
|
|
5540
5541
|
const owner = await publicClient.readContract({
|
|
@@ -5579,14 +5580,14 @@ async function buildSignedDepositWalletBatch(params) {
|
|
|
5579
5580
|
})),
|
|
5580
5581
|
signature
|
|
5581
5582
|
},
|
|
5582
|
-
sourceToken:
|
|
5583
|
+
sourceToken: _chunkLVCD6RHFcjs.POLYMARKET_USDCE_ADDRESS,
|
|
5583
5584
|
sourceSymbol: tokenKind === "pusd" ? "pUSD" : "USDC.e"
|
|
5584
5585
|
};
|
|
5585
5586
|
}
|
|
5586
5587
|
function buildUsdceTransferCalls(recipient, amount) {
|
|
5587
5588
|
return [
|
|
5588
5589
|
{
|
|
5589
|
-
target:
|
|
5590
|
+
target: _chunkLVCD6RHFcjs.POLYMARKET_USDCE_ADDRESS,
|
|
5590
5591
|
value: 0n,
|
|
5591
5592
|
data: _viem.encodeFunctionData.call(void 0, {
|
|
5592
5593
|
abi: _viem.erc20Abi,
|
|
@@ -5599,21 +5600,21 @@ function buildUsdceTransferCalls(recipient, amount) {
|
|
|
5599
5600
|
function buildPusdUnwrapCalls(recipient, amount) {
|
|
5600
5601
|
return [
|
|
5601
5602
|
{
|
|
5602
|
-
target:
|
|
5603
|
+
target: _chunkLVCD6RHFcjs.POLYMARKET_PUSD_ADDRESS,
|
|
5603
5604
|
value: 0n,
|
|
5604
5605
|
data: _viem.encodeFunctionData.call(void 0, {
|
|
5605
5606
|
abi: _viem.erc20Abi,
|
|
5606
5607
|
functionName: "approve",
|
|
5607
|
-
args: [
|
|
5608
|
+
args: [_chunkLVCD6RHFcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, amount]
|
|
5608
5609
|
})
|
|
5609
5610
|
},
|
|
5610
5611
|
{
|
|
5611
|
-
target:
|
|
5612
|
+
target: _chunkLVCD6RHFcjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
5612
5613
|
value: 0n,
|
|
5613
5614
|
data: _viem.encodeFunctionData.call(void 0, {
|
|
5614
5615
|
abi: COLLATERAL_OFFRAMP_ABI,
|
|
5615
5616
|
functionName: "unwrap",
|
|
5616
|
-
args: [
|
|
5617
|
+
args: [_chunkLVCD6RHFcjs.POLYMARKET_USDCE_ADDRESS, recipient, amount]
|
|
5617
5618
|
})
|
|
5618
5619
|
}
|
|
5619
5620
|
];
|
|
@@ -5625,23 +5626,23 @@ var polymarketProvider = {
|
|
|
5625
5626
|
id: PROVIDER_ID2,
|
|
5626
5627
|
sourceLabel: "Polymarket",
|
|
5627
5628
|
async fetchAvailability({ eoa, getPublicClient: getPublicClient2, signal }) {
|
|
5628
|
-
const proxyWallet = await
|
|
5629
|
+
const proxyWallet = await _chunkLVCD6RHFcjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
|
|
5629
5630
|
if (!proxyWallet) return null;
|
|
5630
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
5631
|
-
const polygonClient = getPublicClient2(
|
|
5631
|
+
if (_optionalChain([signal, 'optionalAccess', _221 => _221.aborted])) return null;
|
|
5632
|
+
const polygonClient = getPublicClient2(_chunkLVCD6RHFcjs.POLYMARKET_POLYGON_CHAIN_ID);
|
|
5632
5633
|
if (!polygonClient) return null;
|
|
5633
|
-
const balances = await
|
|
5634
|
+
const balances = await _chunkLVCD6RHFcjs.readPolymarketBalances.call(void 0, {
|
|
5634
5635
|
publicClient: polygonClient,
|
|
5635
5636
|
proxyWallet
|
|
5636
5637
|
});
|
|
5637
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
5638
|
+
if (_optionalChain([signal, 'optionalAccess', _222 => _222.aborted])) return null;
|
|
5638
5639
|
if (balances.pusd === 0n && balances.usdce === 0n) return null;
|
|
5639
5640
|
const walletKind = await detectPolymarketWalletKind({
|
|
5640
5641
|
publicClient: polygonClient,
|
|
5641
5642
|
proxyWallet,
|
|
5642
5643
|
eoa
|
|
5643
5644
|
});
|
|
5644
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
5645
|
+
if (_optionalChain([signal, 'optionalAccess', _223 => _223.aborted])) return null;
|
|
5645
5646
|
if (!walletKind) return null;
|
|
5646
5647
|
const assets = [];
|
|
5647
5648
|
if (balances.pusd > 0n) {
|
|
@@ -5688,7 +5689,7 @@ var polymarketProvider = {
|
|
|
5688
5689
|
const { txHash } = await backend.submitPolymarketWithdraw(payload);
|
|
5689
5690
|
return { txHash, sourceToken, sourceSymbol, sourceDecimals: 6 };
|
|
5690
5691
|
}
|
|
5691
|
-
const result = await
|
|
5692
|
+
const result = await _chunkLVCD6RHFcjs.executePolymarketSafeTransfer.call(void 0, {
|
|
5692
5693
|
walletClient,
|
|
5693
5694
|
publicClient,
|
|
5694
5695
|
safeAddress: metadata.proxyWallet,
|
|
@@ -5707,17 +5708,17 @@ var polymarketProvider = {
|
|
|
5707
5708
|
function buildAsset2(params) {
|
|
5708
5709
|
const { tokenKind, proxyWallet, walletKind, balance } = params;
|
|
5709
5710
|
const isPusd = tokenKind === "pusd";
|
|
5710
|
-
const tokenAddress = isPusd ?
|
|
5711
|
+
const tokenAddress = isPusd ? _chunkLVCD6RHFcjs.POLYMARKET_PUSD_ADDRESS : _chunkLVCD6RHFcjs.POLYMARKET_USDCE_ADDRESS;
|
|
5711
5712
|
const symbol = isPusd ? "pUSD" : "USDC.e";
|
|
5712
5713
|
const balanceUsd = Number(_viem.formatUnits.call(void 0, balance, 6));
|
|
5713
5714
|
const metadata = { proxyWallet, tokenKind, walletKind };
|
|
5714
5715
|
return {
|
|
5715
5716
|
id: `polymarket:${tokenKind}`,
|
|
5716
|
-
chainId:
|
|
5717
|
+
chainId: _chunkLVCD6RHFcjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
5717
5718
|
token: tokenAddress,
|
|
5718
5719
|
symbol,
|
|
5719
5720
|
name: isPusd ? "Polymarket USD" : "Polygon USDC.e",
|
|
5720
|
-
icon: isPusd ?
|
|
5721
|
+
icon: isPusd ? _chunkLVCD6RHFcjs.POLYMARKET_ICON_URL : void 0,
|
|
5721
5722
|
decimals: 6,
|
|
5722
5723
|
balance: balance.toString(),
|
|
5723
5724
|
balanceUsd: Number.isFinite(balanceUsd) ? balanceUsd : 0,
|
|
@@ -5730,8 +5731,8 @@ function buildAsset2(params) {
|
|
|
5730
5731
|
// pUSD unwraps to USDC.e via the offramp; USDC.e is what actually
|
|
5731
5732
|
// arrives at the smart account, so it's also what the orchestrator
|
|
5732
5733
|
// bridges from.
|
|
5733
|
-
depositToken:
|
|
5734
|
-
depositChainId:
|
|
5734
|
+
depositToken: _chunkLVCD6RHFcjs.POLYMARKET_USDCE_ADDRESS,
|
|
5735
|
+
depositChainId: _chunkLVCD6RHFcjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
5735
5736
|
providerMetadata: metadata
|
|
5736
5737
|
};
|
|
5737
5738
|
}
|
|
@@ -5752,7 +5753,7 @@ function getEnabledProviders(config) {
|
|
|
5752
5753
|
function computeDappImportStatus(providerId, inputs) {
|
|
5753
5754
|
const { owner, availability, availabilityOwner, setup } = inputs;
|
|
5754
5755
|
if (!owner) return "needs-connect";
|
|
5755
|
-
const entry = _optionalChain([availabilityOwner, 'optionalAccess',
|
|
5756
|
+
const entry = _optionalChain([availabilityOwner, 'optionalAccess', _224 => _224.toLowerCase, 'call', _225 => _225()]) === owner.toLowerCase() ? availability[providerId] : void 0;
|
|
5756
5757
|
if (entry === "loading" || entry === void 0) return "loading";
|
|
5757
5758
|
if (entry === "error") {
|
|
5758
5759
|
return {
|
|
@@ -5910,6 +5911,10 @@ function createDepositAnalyticsController(emit) {
|
|
|
5910
5911
|
dedupe.add(key);
|
|
5911
5912
|
emit(...args);
|
|
5912
5913
|
};
|
|
5914
|
+
const sendHistory = (type, detail) => {
|
|
5915
|
+
controller.openSession();
|
|
5916
|
+
emit(...[{ type, ...detail }, method]);
|
|
5917
|
+
};
|
|
5913
5918
|
const controller = {
|
|
5914
5919
|
emit,
|
|
5915
5920
|
openSession() {
|
|
@@ -5917,6 +5922,21 @@ function createDepositAnalyticsController(emit) {
|
|
|
5917
5922
|
opened = true;
|
|
5918
5923
|
emit({ type: "deposit_modal_open" }, null);
|
|
5919
5924
|
},
|
|
5925
|
+
historyOpened(detail) {
|
|
5926
|
+
sendHistory("deposit_modal_history_open", detail);
|
|
5927
|
+
},
|
|
5928
|
+
historyRowViewed(detail) {
|
|
5929
|
+
sendHistory("deposit_modal_history_row_view", detail);
|
|
5930
|
+
},
|
|
5931
|
+
historyLoadMore(detail) {
|
|
5932
|
+
sendHistory("deposit_modal_history_load_more", detail);
|
|
5933
|
+
},
|
|
5934
|
+
historyFallbackOpened(detail) {
|
|
5935
|
+
sendHistory("deposit_modal_history_fallback_open", detail);
|
|
5936
|
+
},
|
|
5937
|
+
historyRecoveryStarted(detail) {
|
|
5938
|
+
sendHistory("deposit_modal_history_recovery_start", detail);
|
|
5939
|
+
},
|
|
5920
5940
|
selectMethod(...args) {
|
|
5921
5941
|
const [nextMethod, entrySource, identifiers] = args;
|
|
5922
5942
|
controller.openSession();
|
|
@@ -6075,7 +6095,7 @@ function DepositAnalyticsControllerProvider({
|
|
|
6075
6095
|
children,
|
|
6076
6096
|
controllerRef
|
|
6077
6097
|
}) {
|
|
6078
|
-
const emit =
|
|
6098
|
+
const emit = _chunkH4O22O7Ycjs.useDepositAnalyticsEmitter.call(void 0, );
|
|
6079
6099
|
const controller = _react.useMemo.call(void 0,
|
|
6080
6100
|
() => createDepositAnalyticsController(emit),
|
|
6081
6101
|
[emit]
|
|
@@ -6595,7 +6615,7 @@ function applyAction(state, action) {
|
|
|
6595
6615
|
totalUsd: null,
|
|
6596
6616
|
// Keep any prior chains visible so the cluster does not flicker
|
|
6597
6617
|
// empty across a refresh.
|
|
6598
|
-
chainIds: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
6618
|
+
chainIds: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _226 => _226.chainIds]), () => ( []))
|
|
6599
6619
|
}
|
|
6600
6620
|
}
|
|
6601
6621
|
}
|
|
@@ -6806,7 +6826,7 @@ function applyAction(state, action) {
|
|
|
6806
6826
|
flow: { ...state.flow, step: "processing" }
|
|
6807
6827
|
};
|
|
6808
6828
|
case "processing/quote-loaded":
|
|
6809
|
-
if (state.flow.step !== "processing" || _optionalChain([state, 'access',
|
|
6829
|
+
if (state.flow.step !== "processing" || _optionalChain([state, 'access', _227 => _227.processing, 'access', _228 => _228.txHash, 'optionalAccess', _229 => _229.toLowerCase, 'call', _230 => _230()]) !== action.txHash.toLowerCase()) {
|
|
6810
6830
|
return state;
|
|
6811
6831
|
}
|
|
6812
6832
|
return {
|
|
@@ -7394,16 +7414,17 @@ function DepositFlow({
|
|
|
7394
7414
|
onSwappedImmersiveChange,
|
|
7395
7415
|
openExternally,
|
|
7396
7416
|
onSubmittingChange,
|
|
7417
|
+
onProcessingSettledChange,
|
|
7397
7418
|
onClose,
|
|
7398
7419
|
onLifecycle,
|
|
7399
7420
|
onError,
|
|
7400
7421
|
debug
|
|
7401
7422
|
}) {
|
|
7402
|
-
const rpcUrls =
|
|
7403
|
-
const onStepChangeRef =
|
|
7423
|
+
const rpcUrls = _chunkH4O22O7Ycjs.useRpcUrls.call(void 0, );
|
|
7424
|
+
const onStepChangeRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onStepChange);
|
|
7404
7425
|
const analytics = useDepositAnalyticsController();
|
|
7405
|
-
const onLifecycleRef =
|
|
7406
|
-
const onErrorRef =
|
|
7426
|
+
const onLifecycleRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onLifecycle);
|
|
7427
|
+
const onErrorRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onError);
|
|
7407
7428
|
const storeApi = useDepositStoreApi();
|
|
7408
7429
|
const flowSlice = useDepositStore((s) => s.flow);
|
|
7409
7430
|
const depositSlice = useDepositStore((s) => s.deposit);
|
|
@@ -7420,13 +7441,13 @@ function DepositFlow({
|
|
|
7420
7441
|
const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
|
|
7421
7442
|
const logFlow = _react.useCallback.call(void 0,
|
|
7422
7443
|
(message, data) => {
|
|
7423
|
-
|
|
7444
|
+
_chunkH4O22O7Ycjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
7424
7445
|
},
|
|
7425
7446
|
[debug]
|
|
7426
7447
|
);
|
|
7427
7448
|
const logFlowError = _react.useCallback.call(void 0,
|
|
7428
7449
|
(message, error, data) => {
|
|
7429
|
-
|
|
7450
|
+
_chunkH4O22O7Ycjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
7430
7451
|
},
|
|
7431
7452
|
[debug]
|
|
7432
7453
|
);
|
|
@@ -7450,12 +7471,12 @@ function DepositFlow({
|
|
|
7450
7471
|
};
|
|
7451
7472
|
}, [enableSwappedPreconnect]);
|
|
7452
7473
|
const dappSwitchChain = _react.useMemo.call(void 0, () => {
|
|
7453
|
-
if (!_optionalChain([walletClientProp, 'optionalAccess',
|
|
7474
|
+
if (!_optionalChain([walletClientProp, 'optionalAccess', _231 => _231.switchChain])) return void 0;
|
|
7454
7475
|
return async (chainId) => {
|
|
7455
|
-
await _optionalChain([walletClientProp, 'access',
|
|
7476
|
+
await _optionalChain([walletClientProp, 'access', _232 => _232.switchChain, 'optionalCall', _233 => _233({ id: chainId })]);
|
|
7456
7477
|
};
|
|
7457
7478
|
}, [walletClientProp]);
|
|
7458
|
-
const connectedWalletAddress = _nullishCoalesce(_optionalChain([walletClientProp, 'optionalAccess',
|
|
7479
|
+
const connectedWalletAddress = _nullishCoalesce(_optionalChain([walletClientProp, 'optionalAccess', _234 => _234.account, 'optionalAccess', _235 => _235.address]), () => ( null));
|
|
7459
7480
|
const walletOptions = _react.useMemo.call(void 0, () => {
|
|
7460
7481
|
const options = [];
|
|
7461
7482
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -7469,7 +7490,7 @@ function DepositFlow({
|
|
|
7469
7490
|
});
|
|
7470
7491
|
seen.add(id);
|
|
7471
7492
|
}
|
|
7472
|
-
if (_optionalChain([walletSession, 'optionalAccess',
|
|
7493
|
+
if (_optionalChain([walletSession, 'optionalAccess', _236 => _236.isConnected]) && walletSession.isSolana && walletSession.solanaAddress) {
|
|
7473
7494
|
const id = _nullishCoalesce(walletSession.caipAddress, () => ( `solana:${walletSession.solanaAddress}`));
|
|
7474
7495
|
if (!seen.has(id)) {
|
|
7475
7496
|
options.push({
|
|
@@ -7481,7 +7502,7 @@ function DepositFlow({
|
|
|
7481
7502
|
});
|
|
7482
7503
|
seen.add(id);
|
|
7483
7504
|
}
|
|
7484
|
-
} else if (_optionalChain([walletSession, 'optionalAccess',
|
|
7505
|
+
} else if (_optionalChain([walletSession, 'optionalAccess', _237 => _237.address]) && walletSession.isConnected && walletSession.canSignEvm && !seen.has(`evm:${walletSession.address.toLowerCase()}`)) {
|
|
7485
7506
|
const id = `evm:${walletSession.address.toLowerCase()}`;
|
|
7486
7507
|
if (!seen.has(id)) {
|
|
7487
7508
|
options.push({
|
|
@@ -7497,13 +7518,13 @@ function DepositFlow({
|
|
|
7497
7518
|
return options;
|
|
7498
7519
|
}, [
|
|
7499
7520
|
connectedWalletAddress,
|
|
7500
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7501
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7502
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7503
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7504
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7505
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7506
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7521
|
+
_optionalChain([walletSession, 'optionalAccess', _238 => _238.address]),
|
|
7522
|
+
_optionalChain([walletSession, 'optionalAccess', _239 => _239.isConnected]),
|
|
7523
|
+
_optionalChain([walletSession, 'optionalAccess', _240 => _240.canSignEvm]),
|
|
7524
|
+
_optionalChain([walletSession, 'optionalAccess', _241 => _241.icon]),
|
|
7525
|
+
_optionalChain([walletSession, 'optionalAccess', _242 => _242.isSolana]),
|
|
7526
|
+
_optionalChain([walletSession, 'optionalAccess', _243 => _243.solanaAddress]),
|
|
7527
|
+
_optionalChain([walletSession, 'optionalAccess', _244 => _244.caipAddress])
|
|
7507
7528
|
]);
|
|
7508
7529
|
const offeredFiatMethods = _react.useMemo.call(void 0,
|
|
7509
7530
|
() => fiatMethods ? FIAT_ONRAMP_METHODS.filter((m) => fiatMethods[m.method]) : FIAT_ONRAMP_METHODS,
|
|
@@ -7523,11 +7544,11 @@ function DepositFlow({
|
|
|
7523
7544
|
hasEnabledAssetMigration
|
|
7524
7545
|
].filter(Boolean).length;
|
|
7525
7546
|
const canAutoLock = Boolean(
|
|
7526
|
-
enableWallet && _optionalChain([walletClientProp, 'optionalAccess',
|
|
7547
|
+
enableWallet && _optionalChain([walletClientProp, 'optionalAccess', _245 => _245.account]) && !walletSession && enabledFeatureCount === 1
|
|
7527
7548
|
);
|
|
7528
7549
|
const hasWalletOptions = enableWallet && walletOptions.length > 0;
|
|
7529
7550
|
const hasReownSession = Boolean(
|
|
7530
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7551
|
+
_optionalChain([walletSession, 'optionalAccess', _246 => _246.isConnected]) || _optionalChain([walletSession, 'optionalAccess', _247 => _247.address])
|
|
7531
7552
|
);
|
|
7532
7553
|
const isDappImportWalletHydrating = Boolean(
|
|
7533
7554
|
hasWalletClientProp && walletClientProp === void 0 || walletSession && !hasReownSession && !walletSession.isReady
|
|
@@ -7547,10 +7568,10 @@ function DepositFlow({
|
|
|
7547
7568
|
isConnectSelectionConfirmed,
|
|
7548
7569
|
selectedWalletId
|
|
7549
7570
|
]);
|
|
7550
|
-
const setupChainId = typeof targetChain === "number" && !
|
|
7551
|
-
const targetChainId =
|
|
7552
|
-
const targetSymbol =
|
|
7553
|
-
const isTargetStablecoin =
|
|
7571
|
+
const setupChainId = typeof targetChain === "number" && !_chunkOY5N3E6Lcjs.isVirtualDestination.call(void 0, targetChain) ? targetChain : typeof defaultSourceChain === "number" ? defaultSourceChain : DEFAULT_SETUP_CHAIN_ID;
|
|
7572
|
+
const targetChainId = _chunkOY5N3E6Lcjs.targetChainToChainId.call(void 0, targetChain);
|
|
7573
|
+
const targetSymbol = _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
7574
|
+
const isTargetStablecoin = _chunkOY5N3E6Lcjs.isStablecoinSymbol.call(void 0, targetSymbol);
|
|
7554
7575
|
const targetMarketPriceRef = _react.useRef.call(void 0, null);
|
|
7555
7576
|
_react.useEffect.call(void 0, () => {
|
|
7556
7577
|
targetMarketPriceRef.current = null;
|
|
@@ -7558,7 +7579,7 @@ function DepositFlow({
|
|
|
7558
7579
|
return;
|
|
7559
7580
|
}
|
|
7560
7581
|
let cancelled = false;
|
|
7561
|
-
|
|
7582
|
+
_chunkH4O22O7Ycjs.fetchTokenPriceUsd.call(void 0, service, {
|
|
7562
7583
|
chainId: targetChainId,
|
|
7563
7584
|
address: targetToken,
|
|
7564
7585
|
symbol: targetSymbol
|
|
@@ -7575,11 +7596,11 @@ function DepositFlow({
|
|
|
7575
7596
|
return null;
|
|
7576
7597
|
}
|
|
7577
7598
|
if (canAutoLock) {
|
|
7578
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([walletClientProp, 'optionalAccess',
|
|
7599
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([walletClientProp, 'optionalAccess', _248 => _248.chain, 'optionalAccess', _249 => _249.id]), () => ( setupChainId));
|
|
7579
7600
|
return {
|
|
7580
7601
|
ownerAddress: walletClientProp.account.address,
|
|
7581
7602
|
walletClient: walletClientProp,
|
|
7582
|
-
publicClient: _nullishCoalesce(publicClientProp, () => (
|
|
7603
|
+
publicClient: _nullishCoalesce(publicClientProp, () => ( _chunkH4O22O7Ycjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
7583
7604
|
switchChain: dappSwitchChain
|
|
7584
7605
|
};
|
|
7585
7606
|
}
|
|
@@ -7591,20 +7612,20 @@ function DepositFlow({
|
|
|
7591
7612
|
if (selectedOption.kind === "solana") {
|
|
7592
7613
|
return null;
|
|
7593
7614
|
}
|
|
7594
|
-
if (selectedOption.kind === "connected" && _optionalChain([walletClientProp, 'optionalAccess',
|
|
7595
|
-
const fallbackChainId = _nullishCoalesce(_optionalChain([walletClientProp, 'optionalAccess',
|
|
7615
|
+
if (selectedOption.kind === "connected" && _optionalChain([walletClientProp, 'optionalAccess', _250 => _250.account]) && selectedOption.address && walletClientProp.account.address.toLowerCase() === selectedOption.address.toLowerCase()) {
|
|
7616
|
+
const fallbackChainId = _nullishCoalesce(_optionalChain([walletClientProp, 'optionalAccess', _251 => _251.chain, 'optionalAccess', _252 => _252.id]), () => ( setupChainId));
|
|
7596
7617
|
return {
|
|
7597
7618
|
ownerAddress: walletClientProp.account.address,
|
|
7598
7619
|
walletClient: walletClientProp,
|
|
7599
|
-
publicClient: _nullishCoalesce(publicClientProp, () => (
|
|
7620
|
+
publicClient: _nullishCoalesce(publicClientProp, () => ( _chunkH4O22O7Ycjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
7600
7621
|
switchChain: dappSwitchChain
|
|
7601
7622
|
};
|
|
7602
7623
|
}
|
|
7603
|
-
if (selectedOption.kind === "external" && _optionalChain([walletSession, 'optionalAccess',
|
|
7624
|
+
if (selectedOption.kind === "external" && _optionalChain([walletSession, 'optionalAccess', _253 => _253.address]) && selectedOption.address && walletSession.address.toLowerCase() === selectedOption.address.toLowerCase()) {
|
|
7604
7625
|
return {
|
|
7605
7626
|
ownerAddress: walletSession.address,
|
|
7606
7627
|
walletClient: walletSession.walletClient,
|
|
7607
|
-
publicClient: _nullishCoalesce(walletSession.publicClient, () => (
|
|
7628
|
+
publicClient: _nullishCoalesce(walletSession.publicClient, () => ( _chunkH4O22O7Ycjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
|
|
7608
7629
|
switchChain: walletSession.switchChain
|
|
7609
7630
|
};
|
|
7610
7631
|
}
|
|
@@ -7626,7 +7647,7 @@ function DepositFlow({
|
|
|
7626
7647
|
// nothing else here when the host switches chain, and the context would go
|
|
7627
7648
|
// on holding a client bound to the old one: `chainMismatch` never clears
|
|
7628
7649
|
// and the CTA stays disabled with nothing beside it.
|
|
7629
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7650
|
+
_optionalChain([walletSession, 'optionalAccess', _254 => _254.walletClient]),
|
|
7630
7651
|
setupChainId,
|
|
7631
7652
|
rpcUrls
|
|
7632
7653
|
]);
|
|
@@ -7666,35 +7687,35 @@ function DepositFlow({
|
|
|
7666
7687
|
const selectedEvmWalletOwner = _react.useMemo.call(void 0, () => {
|
|
7667
7688
|
if (!selectedWalletId) return null;
|
|
7668
7689
|
const opt = walletOptions.find((o) => o.id === selectedWalletId);
|
|
7669
|
-
if (_optionalChain([opt, 'optionalAccess',
|
|
7690
|
+
if (_optionalChain([opt, 'optionalAccess', _255 => _255.kind]) === "external" && opt.address) {
|
|
7670
7691
|
return opt.address;
|
|
7671
7692
|
}
|
|
7672
|
-
if (_optionalChain([opt, 'optionalAccess',
|
|
7693
|
+
if (_optionalChain([opt, 'optionalAccess', _256 => _256.kind]) === "connected" && opt.address) {
|
|
7673
7694
|
return opt.address;
|
|
7674
7695
|
}
|
|
7675
7696
|
return null;
|
|
7676
7697
|
}, [selectedWalletId, walletOptions]);
|
|
7677
7698
|
const dappImportOwner = _react.useMemo.call(void 0, () => {
|
|
7678
7699
|
if (selectedEvmWalletOwner) return selectedEvmWalletOwner;
|
|
7679
|
-
if (_optionalChain([walletSession, 'optionalAccess',
|
|
7700
|
+
if (_optionalChain([walletSession, 'optionalAccess', _257 => _257.address]) && walletSession.isConnected) {
|
|
7680
7701
|
return walletSession.address;
|
|
7681
7702
|
}
|
|
7682
7703
|
if (connectedWalletAddress) return connectedWalletAddress;
|
|
7683
7704
|
return null;
|
|
7684
7705
|
}, [
|
|
7685
7706
|
selectedEvmWalletOwner,
|
|
7686
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7687
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7707
|
+
_optionalChain([walletSession, 'optionalAccess', _258 => _258.address]),
|
|
7708
|
+
_optionalChain([walletSession, 'optionalAccess', _259 => _259.isConnected]),
|
|
7688
7709
|
connectedWalletAddress
|
|
7689
7710
|
]);
|
|
7690
7711
|
const activeOwner = _react.useMemo.call(void 0,
|
|
7691
7712
|
() => resolveOwnerForMode(flowMode, {
|
|
7692
|
-
walletOwner: _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess',
|
|
7713
|
+
walletOwner: _nullishCoalesce(_optionalChain([signerContext, 'optionalAccess', _260 => _260.ownerAddress]), () => ( (canAutoLock ? connectedWalletAddress : selectedEvmWalletOwner))),
|
|
7693
7714
|
dappImportOwner
|
|
7694
7715
|
}),
|
|
7695
7716
|
[
|
|
7696
7717
|
flowMode,
|
|
7697
|
-
_optionalChain([signerContext, 'optionalAccess',
|
|
7718
|
+
_optionalChain([signerContext, 'optionalAccess', _261 => _261.ownerAddress]),
|
|
7698
7719
|
canAutoLock,
|
|
7699
7720
|
connectedWalletAddress,
|
|
7700
7721
|
selectedEvmWalletOwner,
|
|
@@ -7711,7 +7732,7 @@ function DepositFlow({
|
|
|
7711
7732
|
].join(":");
|
|
7712
7733
|
if (lastSmartAccountLifecycleKeyRef.current === lifecycleKey) return;
|
|
7713
7734
|
lastSmartAccountLifecycleKeyRef.current = lifecycleKey;
|
|
7714
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
7735
|
+
_optionalChain([onLifecycleRef, 'access', _262 => _262.current, 'optionalCall', _263 => _263({
|
|
7715
7736
|
type: "smart-account-changed",
|
|
7716
7737
|
evm: activeEntry.smartAccount,
|
|
7717
7738
|
solana: _nullishCoalesce(activeEntry.solanaDepositAddress, () => ( null))
|
|
@@ -7739,7 +7760,7 @@ function DepositFlow({
|
|
|
7739
7760
|
return;
|
|
7740
7761
|
}
|
|
7741
7762
|
lastConnectedLifecycleKeyRef.current = lifecycleKey;
|
|
7742
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
7763
|
+
_optionalChain([onLifecycleRef, 'access', _264 => _264.current, 'optionalCall', _265 => _265({
|
|
7743
7764
|
type: "connected",
|
|
7744
7765
|
address: activeOwner,
|
|
7745
7766
|
smartAccount: activeEntry.smartAccount
|
|
@@ -7812,7 +7833,7 @@ function DepositFlow({
|
|
|
7812
7833
|
const handleWalletDisconnect = _react.useCallback.call(void 0, () => {
|
|
7813
7834
|
analytics.abandon("wallet_disconnect");
|
|
7814
7835
|
analytics.resetAttempt();
|
|
7815
|
-
_optionalChain([onDisconnect, 'optionalCall',
|
|
7836
|
+
_optionalChain([onDisconnect, 'optionalCall', _266 => _266()]);
|
|
7816
7837
|
storeApi.dispatch({
|
|
7817
7838
|
type: "back/requested",
|
|
7818
7839
|
hasWalletOptions: hasWalletOptions || Boolean(walletSession)
|
|
@@ -7825,7 +7846,7 @@ function DepositFlow({
|
|
|
7825
7846
|
setQrSourcePrice({ resolved: false, usd: null });
|
|
7826
7847
|
if (!qrSourceAsset) return;
|
|
7827
7848
|
let cancelled = false;
|
|
7828
|
-
|
|
7849
|
+
_chunkH4O22O7Ycjs.fetchTokenPriceUsd.call(void 0, service, {
|
|
7829
7850
|
chainId: qrSourceAsset.chainId,
|
|
7830
7851
|
address: qrSourceAsset.token,
|
|
7831
7852
|
symbol: qrSourceAsset.symbol
|
|
@@ -7848,7 +7869,7 @@ function DepositFlow({
|
|
|
7848
7869
|
const currentBackHandler = canGoBackFromHere ? handleBack : void 0;
|
|
7849
7870
|
const currentScreen = showConnectStep ? "connect" : effectiveStep.type;
|
|
7850
7871
|
_react.useEffect.call(void 0, () => {
|
|
7851
|
-
_optionalChain([onStepChangeRef, 'access',
|
|
7872
|
+
_optionalChain([onStepChangeRef, 'access', _267 => _267.current, 'optionalCall', _268 => _268(currentBackHandler, currentScreen)]);
|
|
7852
7873
|
}, [currentBackHandler, currentScreen, onStepChangeRef]);
|
|
7853
7874
|
const lastModalHeightRef = _react.useRef.call(void 0, 0);
|
|
7854
7875
|
const modalContentElRef = _react.useRef.call(void 0, null);
|
|
@@ -7858,7 +7879,7 @@ function DepositFlow({
|
|
|
7858
7879
|
modalContentElRef.current = mc;
|
|
7859
7880
|
const ro = new ResizeObserver((entries) => {
|
|
7860
7881
|
for (const entry of entries) {
|
|
7861
|
-
const border = _optionalChain([entry, 'access',
|
|
7882
|
+
const border = _optionalChain([entry, 'access', _269 => _269.borderBoxSize, 'optionalAccess', _270 => _270[0], 'optionalAccess', _271 => _271.blockSize]);
|
|
7862
7883
|
lastModalHeightRef.current = typeof border === "number" ? border : entry.contentRect.height;
|
|
7863
7884
|
}
|
|
7864
7885
|
});
|
|
@@ -7919,7 +7940,7 @@ function DepositFlow({
|
|
|
7919
7940
|
targetToken
|
|
7920
7941
|
]);
|
|
7921
7942
|
_react.useEffect.call(void 0, () => {
|
|
7922
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
7943
|
+
_optionalChain([onLifecycleRef, 'access', _272 => _272.current, 'optionalCall', _273 => _273({
|
|
7923
7944
|
type: "balance-changed",
|
|
7924
7945
|
totalUsd: totalBalanceUsd
|
|
7925
7946
|
})]);
|
|
@@ -7936,9 +7957,9 @@ function DepositFlow({
|
|
|
7936
7957
|
const handleConfirmWallet = _react.useCallback.call(void 0,
|
|
7937
7958
|
(walletId) => {
|
|
7938
7959
|
const selectedOption = walletOptions.find((o) => o.id === walletId);
|
|
7939
|
-
const mode = _optionalChain([selectedOption, 'optionalAccess',
|
|
7960
|
+
const mode = _optionalChain([selectedOption, 'optionalAccess', _274 => _274.kind]) === "solana" ? "solana-wallet" : "wallet";
|
|
7940
7961
|
analytics.selectMethod("wallet", "user", {
|
|
7941
|
-
network: _optionalChain([selectedOption, 'optionalAccess',
|
|
7962
|
+
network: _optionalChain([selectedOption, 'optionalAccess', _275 => _275.kind]) === "solana" ? "solana" : "evm",
|
|
7942
7963
|
integration: _nullishCoalesce(walletIntegration, () => ( "none"))
|
|
7943
7964
|
});
|
|
7944
7965
|
storeApi.dispatch({
|
|
@@ -7950,7 +7971,7 @@ function DepositFlow({
|
|
|
7950
7971
|
[analytics, walletIntegration, walletOptions, storeApi]
|
|
7951
7972
|
);
|
|
7952
7973
|
const isSolanaWalletConnected = Boolean(
|
|
7953
|
-
_optionalChain([walletSession, 'optionalAccess',
|
|
7974
|
+
_optionalChain([walletSession, 'optionalAccess', _276 => _276.isConnected]) && _optionalChain([walletSession, 'optionalAccess', _277 => _277.isSolana])
|
|
7954
7975
|
);
|
|
7955
7976
|
const assetMigrationsKey = assetMigrations ? Object.keys(assetMigrations).filter((k) => assetMigrations[k]).sort().join(",") : "";
|
|
7956
7977
|
const enabledDappImportProviders = _react.useMemo.call(void 0,
|
|
@@ -7967,7 +7988,7 @@ function DepositFlow({
|
|
|
7967
7988
|
const owner = dappImportOwner;
|
|
7968
7989
|
if (owner) {
|
|
7969
7990
|
const wallet = walletOptions.find(
|
|
7970
|
-
(o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess',
|
|
7991
|
+
(o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess', _278 => _278.toLowerCase, 'call', _279 => _279()]) === owner.toLowerCase()
|
|
7971
7992
|
);
|
|
7972
7993
|
if (wallet) {
|
|
7973
7994
|
storeApi.dispatch({
|
|
@@ -8011,7 +8032,7 @@ function DepositFlow({
|
|
|
8011
8032
|
eoa: dappImportOwner,
|
|
8012
8033
|
getPublicClient: (chainId) => {
|
|
8013
8034
|
try {
|
|
8014
|
-
return
|
|
8035
|
+
return _chunkH4O22O7Ycjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
8015
8036
|
} catch (e38) {
|
|
8016
8037
|
return null;
|
|
8017
8038
|
}
|
|
@@ -8114,7 +8135,7 @@ function DepositFlow({
|
|
|
8114
8135
|
}, [activeDappImportProviderId, enabledDappImportProviders]);
|
|
8115
8136
|
const activeDappImportAvailability = _react.useMemo.call(void 0, () => {
|
|
8116
8137
|
if (!activeDappImportProviderId) return null;
|
|
8117
|
-
if (!dappImportOwner || _optionalChain([dappImportAvailabilityOwner, 'optionalAccess',
|
|
8138
|
+
if (!dappImportOwner || _optionalChain([dappImportAvailabilityOwner, 'optionalAccess', _280 => _280.toLowerCase, 'call', _281 => _281()]) !== dappImportOwner.toLowerCase()) {
|
|
8118
8139
|
return null;
|
|
8119
8140
|
}
|
|
8120
8141
|
const entry = dappImportAvailability[activeDappImportProviderId];
|
|
@@ -8157,7 +8178,7 @@ function DepositFlow({
|
|
|
8157
8178
|
setup: setupSlice
|
|
8158
8179
|
});
|
|
8159
8180
|
const pinnableWallet = dappImportOwner ? _nullishCoalesce(walletOptions.find(
|
|
8160
|
-
(o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess',
|
|
8181
|
+
(o) => _optionalChain([(_nullishCoalesce(o.address, () => ( null))), 'optionalAccess', _282 => _282.toLowerCase, 'call', _283 => _283()]) === dappImportOwner.toLowerCase()
|
|
8161
8182
|
), () => ( null)) : null;
|
|
8162
8183
|
const outcome = resolveBootOutcome({
|
|
8163
8184
|
status,
|
|
@@ -8207,7 +8228,7 @@ function DepositFlow({
|
|
|
8207
8228
|
if (dappImportOwner) {
|
|
8208
8229
|
const plan = bootRetryPlan({
|
|
8209
8230
|
setupStatus: snapshot.setup.status,
|
|
8210
|
-
availabilityEntry: _optionalChain([snapshot, 'access',
|
|
8231
|
+
availabilityEntry: _optionalChain([snapshot, 'access', _284 => _284.dappImport, 'access', _285 => _285.availabilityOwner, 'optionalAccess', _286 => _286.toLowerCase, 'call', _287 => _287()]) === dappImportOwner.toLowerCase() ? snapshot.dappImport.availability[providerId] : void 0
|
|
8211
8232
|
});
|
|
8212
8233
|
if (plan.restartSetup) {
|
|
8213
8234
|
storeApi.dispatch({ type: "setup/retry-requested" });
|
|
@@ -8281,7 +8302,7 @@ function DepositFlow({
|
|
|
8281
8302
|
acceptedExchangeFeeBps: disclosedFeeBps
|
|
8282
8303
|
});
|
|
8283
8304
|
} catch (error) {
|
|
8284
|
-
if (error instanceof
|
|
8305
|
+
if (error instanceof _chunkH4O22O7Ycjs.SwappedConnectFeeChangedError) {
|
|
8285
8306
|
return error.exchangeFeeBps;
|
|
8286
8307
|
}
|
|
8287
8308
|
throw error;
|
|
@@ -8289,7 +8310,7 @@ function DepositFlow({
|
|
|
8289
8310
|
entry = { smartAccount: owner, response };
|
|
8290
8311
|
}
|
|
8291
8312
|
const currentAccount = storeApi.getState().setup.smartAccount;
|
|
8292
|
-
if (_optionalChain([currentAccount, 'optionalAccess',
|
|
8313
|
+
if (_optionalChain([currentAccount, 'optionalAccess', _288 => _288.toLowerCase, 'call', _289 => _289()]) !== owner) {
|
|
8293
8314
|
swappedConnectUrlRef.current.delete(key);
|
|
8294
8315
|
throw new Error("Deposit account changed. Select your exchange again.");
|
|
8295
8316
|
}
|
|
@@ -8323,7 +8344,7 @@ function DepositFlow({
|
|
|
8323
8344
|
);
|
|
8324
8345
|
}
|
|
8325
8346
|
swappedConnectUrlRef.current.delete(key);
|
|
8326
|
-
const response = _optionalChain([entry, 'optionalAccess',
|
|
8347
|
+
const response = _optionalChain([entry, 'optionalAccess', _290 => _290.smartAccount]) === smartAccount.toLowerCase() ? entry.response : await service.getSwappedConnectUrl({
|
|
8327
8348
|
smartAccount,
|
|
8328
8349
|
connection,
|
|
8329
8350
|
acceptedExchangeFeeBps: expectedFeeBps
|
|
@@ -8491,7 +8512,7 @@ function DepositFlow({
|
|
|
8491
8512
|
const handleNewDeposit = _react.useCallback.call(void 0, () => {
|
|
8492
8513
|
analytics.completeStep();
|
|
8493
8514
|
analytics.resetAttempt();
|
|
8494
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8515
|
+
_optionalChain([onLifecycleRef, 'access', _291 => _291.current, 'optionalCall', _292 => _292({
|
|
8495
8516
|
type: "smart-account-changed",
|
|
8496
8517
|
evm: null,
|
|
8497
8518
|
solana: null
|
|
@@ -8522,17 +8543,17 @@ function DepositFlow({
|
|
|
8522
8543
|
forceRegister
|
|
8523
8544
|
]
|
|
8524
8545
|
);
|
|
8525
|
-
const desiredSetupRequestKey =
|
|
8546
|
+
const desiredSetupRequestKey = _chunkH4O22O7Ycjs.computeRequestKey.call(void 0, setupInput);
|
|
8526
8547
|
const setupReady = setupSlice.status === "ready" && setupSlice.requestKey === desiredSetupRequestKey;
|
|
8527
8548
|
_react.useEffect.call(void 0, () => {
|
|
8528
8549
|
void (async () => {
|
|
8529
|
-
const requestKey =
|
|
8530
|
-
const cacheKey =
|
|
8531
|
-
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);
|
|
8532
8553
|
if (storeApi.getState().setup.requestKey === requestKey) {
|
|
8533
8554
|
return;
|
|
8534
8555
|
}
|
|
8535
|
-
const dedupedResult =
|
|
8556
|
+
const dedupedResult = _chunkH4O22O7Ycjs.readDedupedAccountSetupResult.call(void 0, requestKey);
|
|
8536
8557
|
if (dedupedResult) {
|
|
8537
8558
|
storeApi.dispatch({
|
|
8538
8559
|
type: "setup/started",
|
|
@@ -8558,7 +8579,7 @@ function DepositFlow({
|
|
|
8558
8579
|
cacheable
|
|
8559
8580
|
});
|
|
8560
8581
|
try {
|
|
8561
|
-
const result = await
|
|
8582
|
+
const result = await _chunkH4O22O7Ycjs.runAccountSetupDeduped.call(void 0,
|
|
8562
8583
|
setupInput,
|
|
8563
8584
|
{ service, debug },
|
|
8564
8585
|
requestKey
|
|
@@ -8573,7 +8594,7 @@ function DepositFlow({
|
|
|
8573
8594
|
}
|
|
8574
8595
|
});
|
|
8575
8596
|
} catch (error) {
|
|
8576
|
-
const message = error instanceof
|
|
8597
|
+
const message = error instanceof _chunkH4O22O7Ycjs.SetupError ? error.message : "Deposit service is temporarily unavailable. Please try again shortly.";
|
|
8577
8598
|
storeApi.dispatch({
|
|
8578
8599
|
type: "setup/failed",
|
|
8579
8600
|
requestKey,
|
|
@@ -8605,11 +8626,11 @@ function DepositFlow({
|
|
|
8605
8626
|
return;
|
|
8606
8627
|
}
|
|
8607
8628
|
storeApi.dispatch({ type: "portfolio/loading", network, address });
|
|
8608
|
-
const requestId = _optionalChain([readPortfolioEntry, 'call',
|
|
8629
|
+
const requestId = _optionalChain([readPortfolioEntry, 'call', _293 => _293(
|
|
8609
8630
|
storeApi.getState().portfolio,
|
|
8610
8631
|
network,
|
|
8611
8632
|
address
|
|
8612
|
-
), 'optionalAccess',
|
|
8633
|
+
), 'optionalAccess', _294 => _294.requestId]);
|
|
8613
8634
|
if (requestId === void 0) return;
|
|
8614
8635
|
void (async () => {
|
|
8615
8636
|
try {
|
|
@@ -8622,7 +8643,7 @@ function DepositFlow({
|
|
|
8622
8643
|
address,
|
|
8623
8644
|
requestId,
|
|
8624
8645
|
totalUsd: portfolio.totalUsd,
|
|
8625
|
-
chainIds:
|
|
8646
|
+
chainIds: _chunkH4O22O7Ycjs.chainIdsByValue.call(void 0, portfolio.tokens)
|
|
8626
8647
|
});
|
|
8627
8648
|
} catch (e39) {
|
|
8628
8649
|
storeApi.dispatch({
|
|
@@ -8646,7 +8667,7 @@ function DepositFlow({
|
|
|
8646
8667
|
{ type: "transaction_hash", value: data.txHash },
|
|
8647
8668
|
"transfer_tracking"
|
|
8648
8669
|
);
|
|
8649
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8670
|
+
_optionalChain([onLifecycleRef, 'access', _295 => _295.current, 'optionalCall', _296 => _296({ type: "submitted", ...data })]);
|
|
8650
8671
|
},
|
|
8651
8672
|
[analytics, logFlow, onLifecycleRef]
|
|
8652
8673
|
);
|
|
@@ -8665,8 +8686,8 @@ function DepositFlow({
|
|
|
8665
8686
|
);
|
|
8666
8687
|
const handleSolanaAmountContinue = _react.useCallback.call(void 0,
|
|
8667
8688
|
(token, sourceAmount, inputAmountUsd) => {
|
|
8668
|
-
const targetSym =
|
|
8669
|
-
const isTargetStable =
|
|
8689
|
+
const targetSym = _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
8690
|
+
const isTargetStable = _chunkOY5N3E6Lcjs.isStablecoinSymbol.call(void 0, targetSym);
|
|
8670
8691
|
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
8671
8692
|
logFlow("solana:amount:continue", {
|
|
8672
8693
|
token: token.symbol,
|
|
@@ -8715,7 +8736,7 @@ function DepositFlow({
|
|
|
8715
8736
|
sourceDecimals: tokenAtSubmit.decimals,
|
|
8716
8737
|
inputAmountUsd: amountUsd
|
|
8717
8738
|
});
|
|
8718
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8739
|
+
_optionalChain([onLifecycleRef, 'access', _297 => _297.current, 'optionalCall', _298 => _298({
|
|
8719
8740
|
type: "submitted",
|
|
8720
8741
|
txHash,
|
|
8721
8742
|
sourceChain: "solana",
|
|
@@ -8741,8 +8762,8 @@ function DepositFlow({
|
|
|
8741
8762
|
(amount, targetAmount, balance) => {
|
|
8742
8763
|
const entry = storeApi.getState().setup;
|
|
8743
8764
|
if (entry.status !== "ready") return;
|
|
8744
|
-
const targetSym =
|
|
8745
|
-
const isTargetStable =
|
|
8765
|
+
const targetSym = _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
8766
|
+
const isTargetStable = _chunkOY5N3E6Lcjs.isStablecoinSymbol.call(void 0, targetSym);
|
|
8746
8767
|
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
8747
8768
|
storeApi.dispatch({
|
|
8748
8769
|
type: "amount/entered",
|
|
@@ -8762,8 +8783,8 @@ function DepositFlow({
|
|
|
8762
8783
|
);
|
|
8763
8784
|
const handleQrAmountContinue = _react.useCallback.call(void 0,
|
|
8764
8785
|
(amount, targetAmount) => {
|
|
8765
|
-
const targetSym =
|
|
8766
|
-
const targetTokenPriceUsd =
|
|
8786
|
+
const targetSym = _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
8787
|
+
const targetTokenPriceUsd = _chunkOY5N3E6Lcjs.isStablecoinSymbol.call(void 0, targetSym) ? 1 : targetMarketPriceRef.current;
|
|
8767
8788
|
storeApi.dispatch({
|
|
8768
8789
|
type: "qr/amount-entered",
|
|
8769
8790
|
amount,
|
|
@@ -8809,8 +8830,8 @@ function DepositFlow({
|
|
|
8809
8830
|
sourceChain: chainId,
|
|
8810
8831
|
sourceToken: token,
|
|
8811
8832
|
amount,
|
|
8812
|
-
sourceSymbol: _optionalChain([asset, 'optionalAccess',
|
|
8813
|
-
sourceDecimals: _optionalChain([asset, 'optionalAccess',
|
|
8833
|
+
sourceSymbol: _optionalChain([asset, 'optionalAccess', _299 => _299.symbol]),
|
|
8834
|
+
sourceDecimals: _optionalChain([asset, 'optionalAccess', _300 => _300.decimals]),
|
|
8814
8835
|
inputAmountUsd: _nullishCoalesce(depositAtSubmit.inputAmountUsd, () => ( void 0)),
|
|
8815
8836
|
directTransfer: routed.directTransfer,
|
|
8816
8837
|
sourceTxHashPending: routed.sourceTxHashPending,
|
|
@@ -8851,7 +8872,7 @@ function DepositFlow({
|
|
|
8851
8872
|
swappedContext,
|
|
8852
8873
|
initialEvent: info.initialEvent
|
|
8853
8874
|
});
|
|
8854
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8875
|
+
_optionalChain([onLifecycleRef, 'access', _301 => _301.current, 'optionalCall', _302 => _302({
|
|
8855
8876
|
type: "submitted",
|
|
8856
8877
|
txHash: info.txHash,
|
|
8857
8878
|
sourceChain: SWAPPED_SOURCE_CHAIN,
|
|
@@ -8879,12 +8900,12 @@ function DepositFlow({
|
|
|
8879
8900
|
const handleDepositSubmittedCallback = _react.useCallback.call(void 0,
|
|
8880
8901
|
(txHash, sourceChain, amount) => {
|
|
8881
8902
|
const depositAtSubmit = storeApi.getState().deposit;
|
|
8882
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8903
|
+
_optionalChain([onLifecycleRef, 'access', _303 => _303.current, 'optionalCall', _304 => _304({
|
|
8883
8904
|
type: "submitted",
|
|
8884
8905
|
txHash,
|
|
8885
8906
|
sourceChain,
|
|
8886
8907
|
amount,
|
|
8887
|
-
sourceDecimals: _optionalChain([depositAtSubmit, 'access',
|
|
8908
|
+
sourceDecimals: _optionalChain([depositAtSubmit, 'access', _305 => _305.selectedAsset, 'optionalAccess', _306 => _306.decimals]),
|
|
8888
8909
|
amountUsd: _nullishCoalesce(depositAtSubmit.inputAmountUsd, () => ( void 0))
|
|
8889
8910
|
})]);
|
|
8890
8911
|
},
|
|
@@ -8897,7 +8918,7 @@ function DepositFlow({
|
|
|
8897
8918
|
analyticsStepForFlowStep(analyticsMethod, "processing")
|
|
8898
8919
|
);
|
|
8899
8920
|
analytics.outcome("completed");
|
|
8900
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8921
|
+
_optionalChain([onLifecycleRef, 'access', _307 => _307.current, 'optionalCall', _308 => _308({
|
|
8901
8922
|
type: "complete",
|
|
8902
8923
|
txHash,
|
|
8903
8924
|
destinationTxHash,
|
|
@@ -8914,7 +8935,7 @@ function DepositFlow({
|
|
|
8914
8935
|
);
|
|
8915
8936
|
analytics.outcome("failed");
|
|
8916
8937
|
analytics.failure("processor_failed", false);
|
|
8917
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8938
|
+
_optionalChain([onLifecycleRef, 'access', _309 => _309.current, 'optionalCall', _310 => _310({ type: "failed", txHash, error })]);
|
|
8918
8939
|
},
|
|
8919
8940
|
[analytics, analyticsMethod, logFlowError, onLifecycleRef]
|
|
8920
8941
|
);
|
|
@@ -8935,7 +8956,7 @@ function DepositFlow({
|
|
|
8935
8956
|
failureStep
|
|
8936
8957
|
);
|
|
8937
8958
|
}
|
|
8938
|
-
_optionalChain([onErrorRef, 'access',
|
|
8959
|
+
_optionalChain([onErrorRef, 'access', _311 => _311.current, 'optionalCall', _312 => _312({ message, code, cause })]);
|
|
8939
8960
|
},
|
|
8940
8961
|
[analytics, logFlowError, onErrorRef]
|
|
8941
8962
|
);
|
|
@@ -8984,9 +9005,9 @@ function DepositFlow({
|
|
|
8984
9005
|
address: _nullishCoalesce(_nullishCoalesce(option.address, () => ( option.solanaAddress)), () => ( option.id)),
|
|
8985
9006
|
state,
|
|
8986
9007
|
errorReason: _nullishCoalesce(entry.message, () => ( void 0)),
|
|
8987
|
-
balanceStatus: _nullishCoalesce(_optionalChain([portfolioEntry, 'optionalAccess',
|
|
8988
|
-
balanceUsd: _optionalChain([portfolioEntry, 'optionalAccess',
|
|
8989
|
-
balanceChainIds: _nullishCoalesce(_optionalChain([portfolioEntry, 'optionalAccess',
|
|
9008
|
+
balanceStatus: _nullishCoalesce(_optionalChain([portfolioEntry, 'optionalAccess', _313 => _313.status]), () => ( "loading")),
|
|
9009
|
+
balanceUsd: _optionalChain([portfolioEntry, 'optionalAccess', _314 => _314.status]) === "ready" ? portfolioEntry.totalUsd : null,
|
|
9010
|
+
balanceChainIds: _nullishCoalesce(_optionalChain([portfolioEntry, 'optionalAccess', _315 => _315.chainIds]), () => ( []))
|
|
8990
9011
|
};
|
|
8991
9012
|
});
|
|
8992
9013
|
}, [enableWallet, walletOptions, setupSlice, portfolioSlice]);
|
|
@@ -9167,7 +9188,7 @@ function DepositFlow({
|
|
|
9167
9188
|
consumePrefetchedUrl: consumeSwappedWidgetUrlPrefetch,
|
|
9168
9189
|
onSwappedComplete: handleSwappedComplete,
|
|
9169
9190
|
onSwappedFailed: handleDepositFailed,
|
|
9170
|
-
onClose: () => _optionalChain([onClose, 'optionalCall',
|
|
9191
|
+
onClose: () => _optionalChain([onClose, 'optionalCall', _316 => _316(
|
|
9171
9192
|
openExternally ? "native_dismiss_request" : "header_button"
|
|
9172
9193
|
)]),
|
|
9173
9194
|
onGoBack: handleProviderBack,
|
|
@@ -9181,7 +9202,7 @@ function DepositFlow({
|
|
|
9181
9202
|
}
|
|
9182
9203
|
),
|
|
9183
9204
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9184
|
-
|
|
9205
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9185
9206
|
{
|
|
9186
9207
|
smartAccount: step.smartAccount,
|
|
9187
9208
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -9207,7 +9228,8 @@ function DepositFlow({
|
|
|
9207
9228
|
onDepositComplete: handleDepositComplete,
|
|
9208
9229
|
onDepositFailed: handleDepositFailed,
|
|
9209
9230
|
onError: handleError,
|
|
9210
|
-
debug
|
|
9231
|
+
debug,
|
|
9232
|
+
onSettledChange: onProcessingSettledChange
|
|
9211
9233
|
}
|
|
9212
9234
|
)
|
|
9213
9235
|
]
|
|
@@ -9246,7 +9268,7 @@ function DepositFlow({
|
|
|
9246
9268
|
loadUrl: () => loadSwappedConnectUrl(step.smartAccount, step.connection),
|
|
9247
9269
|
onSwappedComplete: handleSwappedComplete,
|
|
9248
9270
|
onSwappedFailed: handleDepositFailed,
|
|
9249
|
-
onClose: () => _optionalChain([onClose, 'optionalCall',
|
|
9271
|
+
onClose: () => _optionalChain([onClose, 'optionalCall', _317 => _317(
|
|
9250
9272
|
openExternally ? "native_dismiss_request" : "header_button"
|
|
9251
9273
|
)]),
|
|
9252
9274
|
onGoBack: handleProviderBack,
|
|
@@ -9260,7 +9282,7 @@ function DepositFlow({
|
|
|
9260
9282
|
}
|
|
9261
9283
|
),
|
|
9262
9284
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9263
|
-
|
|
9285
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9264
9286
|
{
|
|
9265
9287
|
smartAccount: step.smartAccount,
|
|
9266
9288
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -9286,7 +9308,8 @@ function DepositFlow({
|
|
|
9286
9308
|
onDepositComplete: handleDepositComplete,
|
|
9287
9309
|
onDepositFailed: handleDepositFailed,
|
|
9288
9310
|
onError: handleError,
|
|
9289
|
-
debug
|
|
9311
|
+
debug,
|
|
9312
|
+
onSettledChange: onProcessingSettledChange
|
|
9290
9313
|
}
|
|
9291
9314
|
)
|
|
9292
9315
|
]
|
|
@@ -9294,8 +9317,8 @@ function DepositFlow({
|
|
|
9294
9317
|
);
|
|
9295
9318
|
}
|
|
9296
9319
|
if (isSolanaWalletMode) {
|
|
9297
|
-
const solanaAddr = _optionalChain([walletSession, 'optionalAccess',
|
|
9298
|
-
const solanaProvider = _optionalChain([walletSession, 'optionalAccess',
|
|
9320
|
+
const solanaAddr = _optionalChain([walletSession, 'optionalAccess', _318 => _318.solanaAddress]);
|
|
9321
|
+
const solanaProvider = _optionalChain([walletSession, 'optionalAccess', _319 => _319.solanaProvider]);
|
|
9299
9322
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
9300
9323
|
effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9301
9324
|
AccountPreparingSkeleton,
|
|
@@ -9324,8 +9347,8 @@ function DepositFlow({
|
|
|
9324
9347
|
defaultAmount: effectiveStep.inputAmountUsd,
|
|
9325
9348
|
uiConfig,
|
|
9326
9349
|
targetChain,
|
|
9327
|
-
targetChainName:
|
|
9328
|
-
targetTokenSymbol:
|
|
9350
|
+
targetChainName: _chunkOY5N3E6Lcjs.getChainName.call(void 0, targetChainId),
|
|
9351
|
+
targetTokenSymbol: _chunkOY5N3E6Lcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId),
|
|
9329
9352
|
appBalanceUsd,
|
|
9330
9353
|
onContinue: handleSolanaAmountContinue,
|
|
9331
9354
|
debug
|
|
@@ -9346,11 +9369,12 @@ function DepositFlow({
|
|
|
9346
9369
|
targetToken,
|
|
9347
9370
|
service,
|
|
9348
9371
|
solanaProvider,
|
|
9349
|
-
solanaConnection: _optionalChain([walletSession, 'optionalAccess',
|
|
9372
|
+
solanaConnection: _optionalChain([walletSession, 'optionalAccess', _320 => _320.solanaConnection]),
|
|
9350
9373
|
uiConfig,
|
|
9351
9374
|
onConfirm: handleSolanaConfirmed,
|
|
9352
9375
|
onError: handleError,
|
|
9353
|
-
debug
|
|
9376
|
+
debug,
|
|
9377
|
+
onSubmittingChange
|
|
9354
9378
|
}
|
|
9355
9379
|
) : effectiveStep.type === "solana-confirm" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-step", children: [
|
|
9356
9380
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", children: [
|
|
@@ -9387,7 +9411,7 @@ function DepositFlow({
|
|
|
9387
9411
|
) })
|
|
9388
9412
|
] }) : null,
|
|
9389
9413
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9390
|
-
|
|
9414
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9391
9415
|
{
|
|
9392
9416
|
smartAccount: effectiveStep.smartAccount,
|
|
9393
9417
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -9410,7 +9434,8 @@ function DepositFlow({
|
|
|
9410
9434
|
onDepositComplete: handleDepositComplete,
|
|
9411
9435
|
onDepositFailed: handleDepositFailed,
|
|
9412
9436
|
onError: handleError,
|
|
9413
|
-
debug
|
|
9437
|
+
debug,
|
|
9438
|
+
onSettledChange: onProcessingSettledChange
|
|
9414
9439
|
}
|
|
9415
9440
|
)
|
|
9416
9441
|
] });
|
|
@@ -9425,7 +9450,7 @@ function DepositFlow({
|
|
|
9425
9450
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9426
9451
|
DappImportAssetSelectSkeleton,
|
|
9427
9452
|
{
|
|
9428
|
-
sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportProvider, 'optionalAccess',
|
|
9453
|
+
sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportProvider, 'optionalAccess', _321 => _321.sourceLabel]), () => ( "")),
|
|
9429
9454
|
error: dappImportBootError,
|
|
9430
9455
|
onRetry: handleBootRetry
|
|
9431
9456
|
}
|
|
@@ -9447,7 +9472,7 @@ function DepositFlow({
|
|
|
9447
9472
|
rows: dappImportSelectRows,
|
|
9448
9473
|
onRequestConnect: _nullishCoalesce(onConnect, () => ( onRequestConnect)),
|
|
9449
9474
|
onSelect: (providerId) => {
|
|
9450
|
-
const availabilityEntry = dappImportOwner && _optionalChain([dappImportAvailabilityOwner, 'optionalAccess',
|
|
9475
|
+
const availabilityEntry = dappImportOwner && _optionalChain([dappImportAvailabilityOwner, 'optionalAccess', _322 => _322.toLowerCase, 'call', _323 => _323()]) === dappImportOwner.toLowerCase() ? dappImportAvailability[providerId] : void 0;
|
|
9451
9476
|
if (availabilityEntry === "error") {
|
|
9452
9477
|
storeApi.dispatch({
|
|
9453
9478
|
type: "dapp-import/availability-retry-requested"
|
|
@@ -9466,16 +9491,16 @@ function DepositFlow({
|
|
|
9466
9491
|
}
|
|
9467
9492
|
);
|
|
9468
9493
|
}
|
|
9469
|
-
if (!_optionalChain([signerContext, 'optionalAccess',
|
|
9494
|
+
if (!_optionalChain([signerContext, 'optionalAccess', _324 => _324.walletClient]) || !_optionalChain([signerContext, 'optionalAccess', _325 => _325.publicClient])) {
|
|
9470
9495
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-step", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-state", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-text", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-loading-title", children: "Connecting wallet\u2026" }) }) }) }) });
|
|
9471
9496
|
}
|
|
9472
9497
|
const ownerAddress = signerContext.ownerAddress;
|
|
9473
|
-
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access',
|
|
9498
|
+
const ownerChainId = _nullishCoalesce(_nullishCoalesce(_optionalChain([signerContext, 'access', _326 => _326.walletClient, 'optionalAccess', _327 => _327.chain, 'optionalAccess', _328 => _328.id]), () => ( _optionalChain([signerContext, 'access', _329 => _329.publicClient, 'access', _330 => _330.chain, 'optionalAccess', _331 => _331.id]))), () => ( setupChainId));
|
|
9474
9499
|
const getReadClientForChain = (chainId) => {
|
|
9475
|
-
if (_optionalChain([signerContext, 'access',
|
|
9500
|
+
if (_optionalChain([signerContext, 'access', _332 => _332.publicClient, 'access', _333 => _333.chain, 'optionalAccess', _334 => _334.id]) === chainId) {
|
|
9476
9501
|
return signerContext.publicClient;
|
|
9477
9502
|
}
|
|
9478
|
-
return
|
|
9503
|
+
return _chunkH4O22O7Ycjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
9479
9504
|
};
|
|
9480
9505
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
9481
9506
|
effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -9501,9 +9526,9 @@ function DepositFlow({
|
|
|
9501
9526
|
effectiveStep.type === "dapp-import-asset-select" && activeDappImportProvider && activeDappImportAvailability && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9502
9527
|
DappImportAssetSelectStep,
|
|
9503
9528
|
{
|
|
9504
|
-
sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportAvailability, 'access',
|
|
9529
|
+
sourceLabel: _nullishCoalesce(_optionalChain([activeDappImportAvailability, 'access', _335 => _335.assets, 'access', _336 => _336[0], 'optionalAccess', _337 => _337.sourceLabel]), () => ( activeDappImportProvider.sourceLabel)),
|
|
9505
9530
|
assets: activeDappImportAvailability.assets,
|
|
9506
|
-
incompleteSummary: _optionalChain([activeDappImportAvailability, 'access',
|
|
9531
|
+
incompleteSummary: _optionalChain([activeDappImportAvailability, 'access', _338 => _338.incomplete, 'optionalAccess', _339 => _339.summary]),
|
|
9507
9532
|
onSelect: handleDappImportAssetSelected
|
|
9508
9533
|
}
|
|
9509
9534
|
),
|
|
@@ -9578,7 +9603,7 @@ function DepositFlow({
|
|
|
9578
9603
|
}
|
|
9579
9604
|
),
|
|
9580
9605
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9581
|
-
|
|
9606
|
+
_chunkH4O22O7Ycjs.ProcessingStep,
|
|
9582
9607
|
{
|
|
9583
9608
|
smartAccount: effectiveStep.smartAccount,
|
|
9584
9609
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -9607,308 +9632,20 @@ function DepositFlow({
|
|
|
9607
9632
|
onDepositComplete: handleDepositComplete,
|
|
9608
9633
|
onDepositFailed: handleDepositFailed,
|
|
9609
9634
|
onError: handleError,
|
|
9610
|
-
debug
|
|
9635
|
+
debug,
|
|
9636
|
+
onSettledChange: onProcessingSettledChange
|
|
9611
9637
|
}
|
|
9612
9638
|
)
|
|
9613
9639
|
] });
|
|
9614
9640
|
}
|
|
9615
9641
|
|
|
9616
|
-
// src/components/history/DepositHistoryPanel.tsx
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
function shortenHash(hash) {
|
|
9620
|
-
if (hash.length <= 14) return hash;
|
|
9621
|
-
return `${hash.slice(0, 6)}\u2026${hash.slice(-4)}`;
|
|
9622
|
-
}
|
|
9623
|
-
function formatDate(iso) {
|
|
9624
|
-
try {
|
|
9625
|
-
const date = new Date(iso);
|
|
9626
|
-
if (Number.isNaN(date.getTime())) return iso;
|
|
9627
|
-
return date.toLocaleDateString("en-US", {
|
|
9628
|
-
day: "numeric",
|
|
9629
|
-
month: "short",
|
|
9630
|
-
year: "numeric"
|
|
9631
|
-
});
|
|
9632
|
-
} catch (e40) {
|
|
9633
|
-
return iso;
|
|
9634
|
-
}
|
|
9635
|
-
}
|
|
9636
|
-
function resolveChainId(value) {
|
|
9637
|
-
if (value === void 0 || value === null) return null;
|
|
9638
|
-
if (typeof value === "number") return value;
|
|
9639
|
-
if (_chunk4KCSH4T3cjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
|
|
9640
|
-
if (_chunk4KCSH4T3cjs.isHyperCoreCaip2.call(void 0, value) || value === "hypercore") return "hypercore";
|
|
9641
|
-
const parsed = _chunk4KCSH4T3cjs.parseEvmChainId.call(void 0, value);
|
|
9642
|
-
if (parsed !== null) return parsed;
|
|
9643
|
-
const num = Number(value);
|
|
9644
|
-
return Number.isFinite(num) ? num : null;
|
|
9645
|
-
}
|
|
9646
|
-
function resolveTokenSymbol(token, chainId) {
|
|
9647
|
-
if (!token) return "";
|
|
9648
|
-
if (chainId === "solana") {
|
|
9649
|
-
const normalized = token.toLowerCase();
|
|
9650
|
-
const matched = _chunk4KCSH4T3cjs.SOLANA_TOKENS.find(
|
|
9651
|
-
(entry) => entry.mint.toLowerCase() === normalized
|
|
9652
|
-
);
|
|
9653
|
-
if (matched) return matched.symbol;
|
|
9654
|
-
if (normalized === "native" || normalized === "11111111111111111111111111111111" || normalized === "so11111111111111111111111111111111111111112") {
|
|
9655
|
-
return "SOL";
|
|
9656
|
-
}
|
|
9657
|
-
}
|
|
9658
|
-
if (chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
|
|
9659
|
-
const evmChainId = chainId === "hypercore" ? _chunk4KCSH4T3cjs.HYPERCORE_CHAIN_ID : chainId;
|
|
9660
|
-
const sym = _chunk4KCSH4T3cjs.getTokenSymbol.call(void 0, token, evmChainId);
|
|
9661
|
-
if (sym !== "Token") return sym;
|
|
9662
|
-
}
|
|
9663
|
-
return shortenHash(token);
|
|
9664
|
-
}
|
|
9665
|
-
function formatAmount(rawAmount, token, chainId) {
|
|
9666
|
-
if (!rawAmount) return "";
|
|
9667
|
-
let decimals = 18;
|
|
9668
|
-
if (token && chainId !== null && chainId !== void 0) {
|
|
9669
|
-
if (chainId === "solana") {
|
|
9670
|
-
const normalized = token.toLowerCase();
|
|
9671
|
-
const matched = _chunk4KCSH4T3cjs.SOLANA_TOKENS.find(
|
|
9672
|
-
(entry) => entry.mint.toLowerCase() === normalized
|
|
9673
|
-
);
|
|
9674
|
-
if (matched) {
|
|
9675
|
-
decimals = matched.decimals;
|
|
9676
|
-
} else if (normalized === "native" || normalized === "11111111111111111111111111111111" || normalized === "so11111111111111111111111111111111111111112") {
|
|
9677
|
-
decimals = 9;
|
|
9678
|
-
}
|
|
9679
|
-
} else if (/^0x[a-fA-F0-9]{40}$/.test(token)) {
|
|
9680
|
-
const evmChainId = chainId === "hypercore" ? _chunk4KCSH4T3cjs.HYPERCORE_CHAIN_ID : chainId;
|
|
9681
|
-
decimals = _chunk4KCSH4T3cjs.getTokenDecimalsByAddress.call(void 0, token, evmChainId);
|
|
9682
|
-
}
|
|
9683
|
-
}
|
|
9684
|
-
try {
|
|
9685
|
-
const raw = BigInt(rawAmount);
|
|
9686
|
-
const divisor = 10n ** BigInt(decimals);
|
|
9687
|
-
const whole = raw / divisor;
|
|
9688
|
-
const remainder = raw % divisor;
|
|
9689
|
-
const fracStr = remainder.toString().padStart(decimals, "0");
|
|
9690
|
-
let frac = fracStr.slice(0, 5).replace(/0+$/, "");
|
|
9691
|
-
if (frac.length < 2) frac = frac.padEnd(2, "0");
|
|
9692
|
-
return `${whole}.${frac}`;
|
|
9693
|
-
} catch (e41) {
|
|
9694
|
-
return rawAmount;
|
|
9695
|
-
}
|
|
9696
|
-
}
|
|
9697
|
-
function normalizeStatus(raw, isSpam) {
|
|
9698
|
-
const lower = raw.toLowerCase();
|
|
9699
|
-
if (lower === "completed" || lower === "complete" || lower === "bridge-complete" || lower === "processed")
|
|
9700
|
-
return "completed";
|
|
9701
|
-
if (lower === "failed" || lower === "error" || lower === "bridge-failed") {
|
|
9702
|
-
return isSpam ? "spam" : "failed";
|
|
9703
|
-
}
|
|
9704
|
-
if (lower === "processing" || lower === "submitted" || lower === "bridging")
|
|
9705
|
-
return "processing";
|
|
9706
|
-
return "pending";
|
|
9707
|
-
}
|
|
9708
|
-
var STATUS_LABEL = {
|
|
9709
|
-
pending: "Pending",
|
|
9710
|
-
processing: "Processing",
|
|
9711
|
-
completed: "Completed",
|
|
9712
|
-
failed: "Failed",
|
|
9713
|
-
spam: "Spam token"
|
|
9714
|
-
};
|
|
9715
|
-
function DepositHistoryPanel({
|
|
9716
|
-
deposits,
|
|
9717
|
-
isLoading,
|
|
9718
|
-
error,
|
|
9719
|
-
hasMore,
|
|
9720
|
-
isLoadingMore,
|
|
9721
|
-
onLoadMore,
|
|
9722
|
-
onClose,
|
|
9723
|
-
onCloseModal
|
|
9724
|
-
}) {
|
|
9725
|
-
const handleKeyDown = _react.useCallback.call(void 0,
|
|
9726
|
-
(e) => {
|
|
9727
|
-
if (e.key === "Escape") {
|
|
9728
|
-
e.stopPropagation();
|
|
9729
|
-
onClose();
|
|
9730
|
-
}
|
|
9731
|
-
},
|
|
9732
|
-
[onClose]
|
|
9733
|
-
);
|
|
9734
|
-
const visibleDeposits = _react.useMemo.call(void 0, () => {
|
|
9735
|
-
const sourceHashes = new Set(
|
|
9736
|
-
deposits.map((d) => _optionalChain([d, 'access', _336 => _336.sourceTxHash, 'optionalAccess', _337 => _337.toLowerCase, 'call', _338 => _338()])).filter((h) => Boolean(h))
|
|
9737
|
-
);
|
|
9738
|
-
return deposits.filter(
|
|
9739
|
-
(d) => !(d.txHash && sourceHashes.has(d.txHash.toLowerCase()))
|
|
9740
|
-
);
|
|
9741
|
-
}, [deposits]);
|
|
9742
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9743
|
-
"div",
|
|
9744
|
-
{
|
|
9745
|
-
className: "rs-history-panel",
|
|
9746
|
-
role: "dialog",
|
|
9747
|
-
"aria-label": "Deposit history",
|
|
9748
|
-
onKeyDown: handleKeyDown,
|
|
9749
|
-
children: [
|
|
9750
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header--redesigned", children: [
|
|
9751
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-left", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9752
|
-
"button",
|
|
9753
|
-
{
|
|
9754
|
-
type: "button",
|
|
9755
|
-
className: "rs-modal-header-back",
|
|
9756
|
-
"aria-label": "Back",
|
|
9757
|
-
onClick: onClose,
|
|
9758
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.ChevronLeftIcon, {})
|
|
9759
|
-
}
|
|
9760
|
-
) }),
|
|
9761
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9762
|
-
"button",
|
|
9763
|
-
{
|
|
9764
|
-
type: "button",
|
|
9765
|
-
className: "rs-modal-close",
|
|
9766
|
-
"aria-label": "Close",
|
|
9767
|
-
onClick: onCloseModal,
|
|
9768
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CloseIcon, {})
|
|
9769
|
-
}
|
|
9770
|
-
) })
|
|
9771
|
-
] }),
|
|
9772
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen", children: [
|
|
9773
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen-body", children: [
|
|
9774
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.HistoryIcon, {}), title: "History" }),
|
|
9775
|
-
isLoading && deposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
9776
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.HistoryIcon, {}) }),
|
|
9777
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
9778
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.Spinner, { className: "rs-spinner--sm" }),
|
|
9779
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
9780
|
-
] })
|
|
9781
|
-
] }),
|
|
9782
|
-
error && !isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
9783
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.AlertTriangleIcon, {}) }),
|
|
9784
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
9785
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
9786
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: error })
|
|
9787
|
-
] })
|
|
9788
|
-
] }),
|
|
9789
|
-
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
9790
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.HistoryIcon, {}) }),
|
|
9791
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
9792
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
9793
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
9794
|
-
] })
|
|
9795
|
-
] }),
|
|
9796
|
-
visibleDeposits.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-list", children: [
|
|
9797
|
-
visibleDeposits.map((deposit, i) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HistoryCard, { deposit }, deposit.txHash || i)),
|
|
9798
|
-
hasMore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9799
|
-
"button",
|
|
9800
|
-
{
|
|
9801
|
-
type: "button",
|
|
9802
|
-
className: "rs-history-load-more",
|
|
9803
|
-
onClick: onLoadMore,
|
|
9804
|
-
disabled: isLoadingMore,
|
|
9805
|
-
children: isLoadingMore ? "Loading\u2026" : "Load more"
|
|
9806
|
-
}
|
|
9807
|
-
)
|
|
9808
|
-
] })
|
|
9809
|
-
] }),
|
|
9810
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.PoweredBy, {})
|
|
9811
|
-
] })
|
|
9812
|
-
]
|
|
9813
|
-
}
|
|
9814
|
-
);
|
|
9815
|
-
}
|
|
9816
|
-
function HistoryCard({ deposit }) {
|
|
9817
|
-
const explorerTxUrl = _chunkHAQOFI3Dcjs.useExplorerTxUrl.call(void 0, );
|
|
9818
|
-
const [expanded, setExpanded] = _react.useState.call(void 0, false);
|
|
9819
|
-
const status = normalizeStatus(deposit.status, deposit.isSpam);
|
|
9820
|
-
const sourceChainId = resolveChainId(deposit.chain);
|
|
9821
|
-
const targetChainId = resolveChainId(deposit.targetChain);
|
|
9822
|
-
const sourceChainName = sourceChainId ? _chunk4KCSH4T3cjs.getChainName.call(void 0, sourceChainId) : null;
|
|
9823
|
-
const targetChainName = targetChainId ? _chunk4KCSH4T3cjs.getChainName.call(void 0, targetChainId) : null;
|
|
9824
|
-
const sourceChainIcon = sourceChainId ? _chunk4KCSH4T3cjs.getChainIcon.call(void 0, sourceChainId) : void 0;
|
|
9825
|
-
const targetChainIcon = targetChainId ? _chunk4KCSH4T3cjs.getChainIcon.call(void 0, targetChainId) : void 0;
|
|
9826
|
-
const sourceSymbol = resolveTokenSymbol(deposit.token, sourceChainId);
|
|
9827
|
-
const rawAmount = deposit.sourceAmount && deposit.sourceAmount !== "0" ? deposit.sourceAmount : deposit.amount;
|
|
9828
|
-
const formattedAmount = rawAmount ? formatAmount(rawAmount, deposit.token, sourceChainId) : null;
|
|
9829
|
-
const displayAmount = formattedAmount ? sourceSymbol && /^USD/.test(sourceSymbol) ? `$${Number(formattedAmount).toLocaleString("en-US", {
|
|
9830
|
-
minimumFractionDigits: 2,
|
|
9831
|
-
maximumFractionDigits: 2
|
|
9832
|
-
})}` : `${formattedAmount} ${sourceSymbol}` : "\u2014";
|
|
9833
|
-
const date = deposit.createdAt ? formatDate(deposit.createdAt) : null;
|
|
9834
|
-
const txTypeLabel = `Deposit${sourceSymbol ? ` ${sourceSymbol}` : ""}`;
|
|
9835
|
-
const srcTxHash = sourceChainId === "hypercore" ? deposit.txHash : deposit.sourceTxHash;
|
|
9836
|
-
const srcTxUrl = srcTxHash && sourceChainId ? explorerTxUrl(sourceChainId, srcTxHash) : null;
|
|
9837
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9838
|
-
"button",
|
|
9839
|
-
{
|
|
9840
|
-
type: "button",
|
|
9841
|
-
className: `rs-history-card ${expanded ? "rs-history-card--expanded" : ""}`,
|
|
9842
|
-
onClick: () => setExpanded((v) => !v),
|
|
9843
|
-
"aria-expanded": expanded,
|
|
9844
|
-
children: [
|
|
9845
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-row", children: [
|
|
9846
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-icons", children: [
|
|
9847
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-token", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.TokenIcon, { symbol: sourceSymbol, fallback: sourceSymbol.slice(0, 2) }) }),
|
|
9848
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-chain", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
9849
|
-
] }),
|
|
9850
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-text", children: [
|
|
9851
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
9852
|
-
date && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-date", children: date })
|
|
9853
|
-
] }),
|
|
9854
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-side", children: [
|
|
9855
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-amount", children: displayAmount }),
|
|
9856
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `rs-history-badge rs-history-badge--${status}`, children: STATUS_LABEL[status] })
|
|
9857
|
-
] })
|
|
9858
|
-
] }),
|
|
9859
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-history-card-panel", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-history-card-panel-inner", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-details", children: [
|
|
9860
|
-
sourceChainName && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
9861
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
9862
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-detail-value", children: [
|
|
9863
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
9864
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
9865
|
-
] })
|
|
9866
|
-
] }),
|
|
9867
|
-
targetChainName && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
9868
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
9869
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-detail-value", children: [
|
|
9870
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
9871
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.CdnIcon, { src: targetChainIcon }) })
|
|
9872
|
-
] })
|
|
9873
|
-
] }),
|
|
9874
|
-
srcTxUrl && srcTxHash && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
9875
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Transaction details" }),
|
|
9876
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9877
|
-
"a",
|
|
9878
|
-
{
|
|
9879
|
-
href: srcTxUrl,
|
|
9880
|
-
target: "_blank",
|
|
9881
|
-
rel: "noopener noreferrer",
|
|
9882
|
-
className: "rs-history-card-link",
|
|
9883
|
-
onClick: (e) => e.stopPropagation(),
|
|
9884
|
-
children: [
|
|
9885
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: shortenHash(srcTxHash) }),
|
|
9886
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.ArrowUpRightIcon, {})
|
|
9887
|
-
]
|
|
9888
|
-
}
|
|
9889
|
-
)
|
|
9890
|
-
] })
|
|
9891
|
-
] }) }) })
|
|
9892
|
-
]
|
|
9893
|
-
}
|
|
9894
|
-
);
|
|
9895
|
-
}
|
|
9896
|
-
DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
9897
|
-
|
|
9898
9642
|
// src/DepositModal.tsx
|
|
9899
9643
|
|
|
9900
9644
|
var ReownDepositInner = _react.lazy.call(void 0, async () => {
|
|
9901
9645
|
await loadReownDependencies();
|
|
9902
|
-
const module = await Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
9646
|
+
const module = await Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-IFN6YLZJ.cjs")));
|
|
9903
9647
|
return { default: module.DepositModalReown };
|
|
9904
9648
|
});
|
|
9905
|
-
function sortByCreatedAtDesc(items) {
|
|
9906
|
-
return [...items].sort((a, b) => {
|
|
9907
|
-
const at = a.createdAt ? Date.parse(a.createdAt) : 0;
|
|
9908
|
-
const bt = b.createdAt ? Date.parse(b.createdAt) : 0;
|
|
9909
|
-
return bt - at;
|
|
9910
|
-
});
|
|
9911
|
-
}
|
|
9912
9649
|
function buildDepositAnalyticsSessionProperties({
|
|
9913
9650
|
enableWallet = true,
|
|
9914
9651
|
enableFiatOnramp = false,
|
|
@@ -9935,7 +9672,7 @@ function buildDepositAnalyticsSessionProperties({
|
|
|
9935
9672
|
enabledFundingMethods.push("wallet");
|
|
9936
9673
|
}
|
|
9937
9674
|
if (enableQrTransfer) enabledFundingMethods.push("transfer");
|
|
9938
|
-
if (enableFiatOnramp && _optionalChain([configuredFiatIdentifiers, 'optionalAccess',
|
|
9675
|
+
if (enableFiatOnramp && _optionalChain([configuredFiatIdentifiers, 'optionalAccess', _340 => _340.length]) !== 0) {
|
|
9939
9676
|
enabledFundingMethods.push("fiat_onramp");
|
|
9940
9677
|
}
|
|
9941
9678
|
if (enableExchangeConnect) enabledFundingMethods.push("exchange_connect");
|
|
@@ -9955,7 +9692,7 @@ function buildDepositAnalyticsSessionProperties({
|
|
|
9955
9692
|
amount: defaultAmount !== void 0,
|
|
9956
9693
|
initial_asset_migration: initialAssetMigration !== void 0
|
|
9957
9694
|
},
|
|
9958
|
-
...
|
|
9695
|
+
..._chunkH4O22O7Ycjs.analyticsTargetProperties.call(void 0, { targetChain, targetToken })
|
|
9959
9696
|
};
|
|
9960
9697
|
}
|
|
9961
9698
|
var WALLET_CLIENT_PROP = "walletClient";
|
|
@@ -9963,8 +9700,8 @@ function hasSuppliedWalletClient(props) {
|
|
|
9963
9700
|
return Object.prototype.hasOwnProperty.call(props, WALLET_CLIENT_PROP);
|
|
9964
9701
|
}
|
|
9965
9702
|
function DepositModal(props) {
|
|
9966
|
-
|
|
9967
|
-
|
|
9703
|
+
_chunkH4O22O7Ycjs.warnRemovedProps.call(void 0, "DepositModal", props);
|
|
9704
|
+
_chunkH4O22O7Ycjs.checkBackendUrl.call(void 0, "DepositModal", props.backendUrl);
|
|
9968
9705
|
const needsReown = !!props.reownAppId;
|
|
9969
9706
|
const hasWalletClientProp = hasSuppliedWalletClient(props);
|
|
9970
9707
|
if (needsReown) {
|
|
@@ -10029,39 +9766,57 @@ function DepositModalInner({
|
|
|
10029
9766
|
onUiState,
|
|
10030
9767
|
openExternally,
|
|
10031
9768
|
walletIntegration: walletIntegrationProp,
|
|
9769
|
+
signRecovery,
|
|
10032
9770
|
debug
|
|
10033
9771
|
}) {
|
|
10034
9772
|
const modalRef = _react.useRef.call(void 0, null);
|
|
10035
9773
|
const analyticsControllerRef = _react.useRef.call(void 0, null);
|
|
9774
|
+
const analyticsSessionIdRef = _react.useRef.call(void 0, null);
|
|
10036
9775
|
const previousOpenRef = _react.useRef.call(void 0, isOpen);
|
|
10037
|
-
const onReadyRef =
|
|
10038
|
-
const onUiStateRef =
|
|
9776
|
+
const onReadyRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onReady);
|
|
9777
|
+
const onUiStateRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onUiState);
|
|
10039
9778
|
const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
|
|
10040
9779
|
const [swappedImmersive, setSwappedImmersive] = _react.useState.call(void 0, false);
|
|
10041
9780
|
const [submitting, setSubmitting] = _react.useState.call(void 0, false);
|
|
10042
9781
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
10043
9782
|
void 0
|
|
10044
9783
|
);
|
|
10045
|
-
const
|
|
10046
|
-
const
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
const
|
|
10052
|
-
const
|
|
10053
|
-
const
|
|
10054
|
-
const historyLoadedRef = _react.useRef.call(void 0, false);
|
|
10055
|
-
const targetChain = targetChainProp === "solana" || targetChainProp === _chunk4KCSH4T3cjs.HYPERCORE_SPOT_CAIP2 ? targetChainProp : _chunk4KCSH4T3cjs.getChainId.call(void 0, targetChainProp);
|
|
10056
|
-
const sourceChain = sourceChainProp ? _chunk4KCSH4T3cjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
10057
|
-
const rpcUrls = _chunkHAQOFI3Dcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
9784
|
+
const [processingSettled, setProcessingSettled] = _react.useState.call(void 0, false);
|
|
9785
|
+
const historyButtonVisible = _chunkH4O22O7Ycjs.isHistoryEntryVisible.call(void 0, {
|
|
9786
|
+
screen: currentScreen,
|
|
9787
|
+
submitting,
|
|
9788
|
+
settled: processingSettled
|
|
9789
|
+
});
|
|
9790
|
+
const targetChain = typeof targetChainProp === "string" ? targetChainProp : _chunkOY5N3E6Lcjs.getChainId.call(void 0, targetChainProp);
|
|
9791
|
+
const sourceChain = sourceChainProp ? _chunkOY5N3E6Lcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
9792
|
+
const rpcUrls = _chunkH4O22O7Ycjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
10058
9793
|
const service = _react.useMemo.call(void 0,
|
|
10059
|
-
() =>
|
|
9794
|
+
() => _chunkH4O22O7Ycjs.createDepositService.call(void 0, backendUrl, {
|
|
10060
9795
|
debug,
|
|
10061
9796
|
debugScope: "service:deposit"
|
|
10062
9797
|
}),
|
|
10063
9798
|
[backendUrl, debug]
|
|
10064
9799
|
);
|
|
9800
|
+
const historyAnalytics = _react.useMemo.call(void 0,
|
|
9801
|
+
() => _chunkH4O22O7Ycjs.createHistoryAnalytics.call(void 0, {
|
|
9802
|
+
modal: "deposit",
|
|
9803
|
+
controllerRef: analyticsControllerRef,
|
|
9804
|
+
sessionIdRef: analyticsSessionIdRef
|
|
9805
|
+
}),
|
|
9806
|
+
[]
|
|
9807
|
+
);
|
|
9808
|
+
const history = _chunkH4O22O7Ycjs.useHistoryPanel.call(void 0, {
|
|
9809
|
+
isOpen,
|
|
9810
|
+
recipient,
|
|
9811
|
+
service,
|
|
9812
|
+
canRecover: Boolean(signRecovery),
|
|
9813
|
+
analytics: historyAnalytics
|
|
9814
|
+
});
|
|
9815
|
+
const {
|
|
9816
|
+
markStale: markHistoryStale,
|
|
9817
|
+
invalidate: invalidateHistory,
|
|
9818
|
+
recoverySubmitting
|
|
9819
|
+
} = history;
|
|
10065
9820
|
const [clientSetup, setClientSetup] = _react.useState.call(void 0,
|
|
10066
9821
|
null
|
|
10067
9822
|
);
|
|
@@ -10090,20 +9845,28 @@ function DepositModalInner({
|
|
|
10090
9845
|
}, [store, targetChain, targetToken]);
|
|
10091
9846
|
_react.useEffect.call(void 0, () => {
|
|
10092
9847
|
if (!isOpen || !modalRef.current) return;
|
|
10093
|
-
return
|
|
9848
|
+
return _chunkH4O22O7Ycjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
10094
9849
|
}, [isOpen, theme]);
|
|
10095
9850
|
_react.useEffect.call(void 0, () => {
|
|
10096
9851
|
if (isOpen) {
|
|
10097
|
-
_optionalChain([onReadyRef, 'access',
|
|
9852
|
+
_optionalChain([onReadyRef, 'access', _341 => _341.current, 'optionalCall', _342 => _342()]);
|
|
10098
9853
|
}
|
|
10099
9854
|
}, [isOpen, onReadyRef]);
|
|
10100
9855
|
_react.useEffect.call(void 0, () => {
|
|
10101
|
-
_optionalChain([onUiStateRef, 'access',
|
|
9856
|
+
_optionalChain([onUiStateRef, 'access', _343 => _343.current, 'optionalCall', _344 => _344({
|
|
10102
9857
|
screen: currentScreen,
|
|
10103
9858
|
back: backHandler,
|
|
10104
|
-
|
|
9859
|
+
// A recovery in flight is a submission whose outcome is unknown, so a
|
|
9860
|
+
// native host's dismissal lock has to hold through it too.
|
|
9861
|
+
submitting: submitting || recoverySubmitting
|
|
10105
9862
|
})]);
|
|
10106
|
-
}, [
|
|
9863
|
+
}, [
|
|
9864
|
+
currentScreen,
|
|
9865
|
+
backHandler,
|
|
9866
|
+
submitting,
|
|
9867
|
+
recoverySubmitting,
|
|
9868
|
+
onUiStateRef
|
|
9869
|
+
]);
|
|
10107
9870
|
const handleStepChange = _react.useCallback.call(void 0,
|
|
10108
9871
|
(onBack, screen) => {
|
|
10109
9872
|
setBackHandler(() => onBack);
|
|
@@ -10111,93 +9874,28 @@ function DepositModalInner({
|
|
|
10111
9874
|
},
|
|
10112
9875
|
[]
|
|
10113
9876
|
);
|
|
10114
|
-
const
|
|
10115
|
-
async (mode = "initial") => {
|
|
10116
|
-
if (!recipient) return;
|
|
10117
|
-
const isInitial = mode === "initial";
|
|
10118
|
-
if (isInitial) {
|
|
10119
|
-
setHistoryLoading(true);
|
|
10120
|
-
} else {
|
|
10121
|
-
setHistoryLoadingMore(true);
|
|
10122
|
-
}
|
|
10123
|
-
setHistoryError(null);
|
|
10124
|
-
try {
|
|
10125
|
-
const cursor = isInitial ? null : cursorRef.current;
|
|
10126
|
-
if (!isInitial && !cursor) {
|
|
10127
|
-
setHasMoreHistory(false);
|
|
10128
|
-
return;
|
|
10129
|
-
}
|
|
10130
|
-
const result = await service.fetchDepositHistory({
|
|
10131
|
-
recipient,
|
|
10132
|
-
limit: 20,
|
|
10133
|
-
cursor: _nullishCoalesce(cursor, () => ( void 0))
|
|
10134
|
-
});
|
|
10135
|
-
const incoming = result.deposits;
|
|
10136
|
-
const nextCursor = _nullishCoalesce(result.nextCursor, () => ( null));
|
|
10137
|
-
if (isInitial) {
|
|
10138
|
-
setHistoryDeposits(sortByCreatedAtDesc(incoming));
|
|
10139
|
-
} else {
|
|
10140
|
-
setHistoryDeposits(
|
|
10141
|
-
(prev) => sortByCreatedAtDesc([...prev, ...incoming])
|
|
10142
|
-
);
|
|
10143
|
-
}
|
|
10144
|
-
cursorRef.current = nextCursor;
|
|
10145
|
-
setHasMoreHistory(Boolean(nextCursor));
|
|
10146
|
-
historyStaleRef.current = false;
|
|
10147
|
-
historyLoadedRef.current = true;
|
|
10148
|
-
} catch (err) {
|
|
10149
|
-
setHistoryError(
|
|
10150
|
-
err instanceof Error ? err.message : "Failed to load history"
|
|
10151
|
-
);
|
|
10152
|
-
} finally {
|
|
10153
|
-
if (isInitial) {
|
|
10154
|
-
setHistoryLoading(false);
|
|
10155
|
-
} else {
|
|
10156
|
-
setHistoryLoadingMore(false);
|
|
10157
|
-
}
|
|
10158
|
-
}
|
|
10159
|
-
},
|
|
10160
|
-
[recipient, service]
|
|
10161
|
-
);
|
|
10162
|
-
const handleHistoryOpen = _react.useCallback.call(void 0, () => {
|
|
10163
|
-
setHistoryOpen(true);
|
|
10164
|
-
if (!historyLoadedRef.current || historyStaleRef.current) {
|
|
10165
|
-
fetchHistory("initial");
|
|
10166
|
-
}
|
|
10167
|
-
}, [fetchHistory]);
|
|
10168
|
-
const handleHistoryClose = _react.useCallback.call(void 0, () => {
|
|
10169
|
-
setHistoryOpen(false);
|
|
10170
|
-
}, []);
|
|
10171
|
-
const handleHistoryLoadMore = _react.useCallback.call(void 0, () => {
|
|
10172
|
-
fetchHistory("more");
|
|
10173
|
-
}, [fetchHistory]);
|
|
10174
|
-
const markHistoryStale = _react.useCallback.call(void 0, () => {
|
|
10175
|
-
historyStaleRef.current = true;
|
|
10176
|
-
if (historyOpen) {
|
|
10177
|
-
fetchHistory("initial");
|
|
10178
|
-
}
|
|
10179
|
-
}, [historyOpen, fetchHistory]);
|
|
10180
|
-
const onLifecycleRef = _chunkHAQOFI3Dcjs.useLatestRef.call(void 0, onLifecycle);
|
|
9877
|
+
const onLifecycleRef = _chunkH4O22O7Ycjs.useLatestRef.call(void 0, onLifecycle);
|
|
10181
9878
|
const handleLifecycle = _react.useCallback.call(void 0,
|
|
10182
9879
|
(event) => {
|
|
10183
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
9880
|
+
_optionalChain([onLifecycleRef, 'access', _345 => _345.current, 'optionalCall', _346 => _346(event)]);
|
|
10184
9881
|
if (event.type === "smart-account-changed" && !event.evm && !event.solana) {
|
|
10185
|
-
|
|
9882
|
+
invalidateHistory();
|
|
10186
9883
|
}
|
|
10187
9884
|
if (event.type === "submitted" || event.type === "complete" || event.type === "failed") {
|
|
10188
9885
|
markHistoryStale();
|
|
10189
9886
|
}
|
|
10190
9887
|
},
|
|
10191
|
-
[onLifecycleRef, markHistoryStale]
|
|
9888
|
+
[onLifecycleRef, markHistoryStale, invalidateHistory]
|
|
10192
9889
|
);
|
|
10193
9890
|
const closeWithSource = _react.useCallback.call(void 0,
|
|
10194
9891
|
(source) => {
|
|
9892
|
+
if (recoverySubmitting) return;
|
|
10195
9893
|
const analytics = analyticsControllerRef.current;
|
|
10196
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
10197
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
9894
|
+
_optionalChain([analytics, 'optionalAccess', _347 => _347.abandon, 'call', _348 => _348(source === "provider_back" ? "provider_back" : "modal_close")]);
|
|
9895
|
+
_optionalChain([analytics, 'optionalAccess', _349 => _349.close, 'call', _350 => _350(source)]);
|
|
10198
9896
|
onClose();
|
|
10199
9897
|
},
|
|
10200
|
-
[onClose]
|
|
9898
|
+
[onClose, recoverySubmitting]
|
|
10201
9899
|
);
|
|
10202
9900
|
const handleModalDismiss = _react.useCallback.call(void 0,
|
|
10203
9901
|
(reason) => {
|
|
@@ -10210,24 +9908,18 @@ function DepositModalInner({
|
|
|
10210
9908
|
_react.useEffect.call(void 0, () => {
|
|
10211
9909
|
if (previousOpenRef.current && !isOpen) {
|
|
10212
9910
|
const analytics = analyticsControllerRef.current;
|
|
10213
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
10214
|
-
_optionalChain([analytics, 'optionalAccess',
|
|
9911
|
+
_optionalChain([analytics, 'optionalAccess', _351 => _351.abandon, 'call', _352 => _352("modal_close")]);
|
|
9912
|
+
_optionalChain([analytics, 'optionalAccess', _353 => _353.close, 'call', _354 => _354("host_controlled")]);
|
|
10215
9913
|
}
|
|
10216
9914
|
previousOpenRef.current = isOpen;
|
|
10217
9915
|
}, [isOpen]);
|
|
10218
9916
|
_react.useEffect.call(void 0, () => {
|
|
10219
9917
|
if (!isOpen) {
|
|
10220
|
-
setHistoryOpen(false);
|
|
10221
|
-
setHistoryDeposits([]);
|
|
10222
|
-
setHasMoreHistory(false);
|
|
10223
|
-
setHistoryError(null);
|
|
10224
|
-
cursorRef.current = null;
|
|
10225
|
-
historyStaleRef.current = false;
|
|
10226
|
-
historyLoadedRef.current = false;
|
|
10227
9918
|
setCurrentScreen("connect");
|
|
10228
9919
|
setBackHandler(void 0);
|
|
10229
9920
|
setSwappedImmersive(false);
|
|
10230
9921
|
setSubmitting(false);
|
|
9922
|
+
setProcessingSettled(false);
|
|
10231
9923
|
}
|
|
10232
9924
|
}, [isOpen]);
|
|
10233
9925
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10254,20 +9946,21 @@ function DepositModalInner({
|
|
|
10254
9946
|
targetChain,
|
|
10255
9947
|
targetToken
|
|
10256
9948
|
});
|
|
10257
|
-
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
9949
|
+
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _355 => _355.showBackButton]), () => ( true));
|
|
10258
9950
|
const canGoBack = backHandler !== void 0;
|
|
10259
9951
|
const hideHeaderChrome = swappedImmersive;
|
|
10260
9952
|
const modalClassName = `rs-modal${hideHeaderChrome ? " rs-modal--swapped-iframe" : ""}`;
|
|
10261
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10262
|
-
|
|
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,
|
|
10263
9955
|
{
|
|
10264
9956
|
isOpen,
|
|
10265
9957
|
onClose: handleModalDismiss,
|
|
10266
9958
|
className,
|
|
10267
9959
|
inline,
|
|
10268
9960
|
closeOnOverlayClick,
|
|
9961
|
+
ariaLabel: "Deposit",
|
|
10269
9962
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10270
|
-
|
|
9963
|
+
_chunkH4O22O7Ycjs.AnalyticsSession,
|
|
10271
9964
|
{
|
|
10272
9965
|
modal: "deposit",
|
|
10273
9966
|
sessionProperties: analyticsSessionProperties,
|
|
@@ -10275,6 +9968,7 @@ function DepositModalInner({
|
|
|
10275
9968
|
backendUrl,
|
|
10276
9969
|
enableIngest: enableAnalyticsIngest,
|
|
10277
9970
|
ingestUrl: analyticsIngestUrl,
|
|
9971
|
+
sessionIdRef: analyticsSessionIdRef,
|
|
10278
9972
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10279
9973
|
DepositAnalyticsControllerProvider,
|
|
10280
9974
|
{
|
|
@@ -10288,19 +9982,16 @@ function DepositModalInner({
|
|
|
10288
9982
|
className: "rs-modal-header-back",
|
|
10289
9983
|
"aria-label": "Go back",
|
|
10290
9984
|
onClick: backHandler,
|
|
10291
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9985
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.ChevronLeftIcon, {})
|
|
10292
9986
|
}
|
|
10293
9987
|
) }),
|
|
10294
9988
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
10295
9989
|
historyButtonVisible && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10296
|
-
|
|
9990
|
+
_chunkH4O22O7Ycjs.HistoryEntryButton,
|
|
10297
9991
|
{
|
|
10298
|
-
|
|
10299
|
-
|
|
10300
|
-
|
|
10301
|
-
onClick: handleHistoryOpen,
|
|
10302
|
-
disabled: !recipient,
|
|
10303
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHAQOFI3Dcjs.HistoryIcon, {})
|
|
9992
|
+
badge: history.badge,
|
|
9993
|
+
onClick: history.openPanel,
|
|
9994
|
+
disabled: !recipient
|
|
10304
9995
|
}
|
|
10305
9996
|
),
|
|
10306
9997
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -10310,7 +10001,7 @@ function DepositModalInner({
|
|
|
10310
10001
|
onClick: () => closeWithSource("header_button"),
|
|
10311
10002
|
className: "rs-modal-close",
|
|
10312
10003
|
"aria-label": "Close",
|
|
10313
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10004
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4O22O7Ycjs.CloseIcon, {})
|
|
10314
10005
|
}
|
|
10315
10006
|
)
|
|
10316
10007
|
] })
|
|
@@ -10346,29 +10037,36 @@ function DepositModalInner({
|
|
|
10346
10037
|
onDisconnect,
|
|
10347
10038
|
onRequestConnect,
|
|
10348
10039
|
uiConfig,
|
|
10349
|
-
appFees: _optionalChain([clientSetup, 'optionalAccess',
|
|
10040
|
+
appFees: _optionalChain([clientSetup, 'optionalAccess', _356 => _356.appFees]),
|
|
10350
10041
|
appFeesResolved: clientSetup !== null,
|
|
10351
10042
|
onStepChange: handleStepChange,
|
|
10352
10043
|
onSwappedImmersiveChange: setSwappedImmersive,
|
|
10353
10044
|
openExternally,
|
|
10354
10045
|
onSubmittingChange: setSubmitting,
|
|
10046
|
+
onProcessingSettledChange: setProcessingSettled,
|
|
10355
10047
|
onClose: (source) => closeWithSource(_nullishCoalesce(source, () => ( "header_button"))),
|
|
10356
10048
|
onLifecycle: handleLifecycle,
|
|
10357
10049
|
onError,
|
|
10358
10050
|
debug
|
|
10359
10051
|
}
|
|
10360
10052
|
),
|
|
10361
|
-
|
|
10362
|
-
|
|
10053
|
+
history.isPanelOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10054
|
+
_chunkH4O22O7Ycjs.HistoryOverlay,
|
|
10363
10055
|
{
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
onCloseModal: () => closeWithSource("header_button")
|
|
10056
|
+
controller: history,
|
|
10057
|
+
backLabel: "Deposit",
|
|
10058
|
+
recipient,
|
|
10059
|
+
backendUrl,
|
|
10060
|
+
service,
|
|
10061
|
+
signRecovery,
|
|
10062
|
+
debug,
|
|
10063
|
+
onCloseModal: () => closeWithSource("header_button"),
|
|
10064
|
+
analytics: historyAnalytics,
|
|
10065
|
+
inline,
|
|
10066
|
+
closeOnOverlayClick,
|
|
10067
|
+
enableAnalyticsIngest,
|
|
10068
|
+
analyticsIngestUrl,
|
|
10069
|
+
onEvent
|
|
10372
10070
|
}
|
|
10373
10071
|
)
|
|
10374
10072
|
] })
|