@rhinestone/deposit-modal 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-6RVLEM3B.mjs → DepositModalReown-MVVRUXO4.mjs} +7 -7
- package/dist/{DepositModalReown-TXTLVZIQ.cjs → DepositModalReown-PZXHTPIS.cjs} +17 -17
- package/dist/{chunk-VRNRRN2U.mjs → chunk-2AMRKYJ4.mjs} +4 -4
- package/dist/{chunk-JYKMR6QI.cjs → chunk-2PQ34KU3.cjs} +3 -3
- package/dist/{chunk-TENL4H64.cjs → chunk-4R2ZHSDQ.cjs} +4 -9
- package/dist/{chunk-XVKBCDZI.cjs → chunk-4SRVZRZF.cjs} +1 -1
- package/dist/{chunk-MZ53PDIX.mjs → chunk-53IGTENZ.mjs} +1 -1
- package/dist/{chunk-ITAYM7SB.mjs → chunk-5IP67CL5.mjs} +45 -17
- package/dist/{chunk-HCQWFL3A.cjs → chunk-6ZJTZ7DS.cjs} +81 -80
- package/dist/{chunk-BLJMYCBF.cjs → chunk-BK54FZAE.cjs} +83 -83
- package/dist/{chunk-G4FVZQOM.mjs → chunk-EUIPQ3T4.mjs} +7 -7
- package/dist/{chunk-QRR3Y7EK.mjs → chunk-GZNMBZHY.mjs} +1 -1
- package/dist/{chunk-NPSC5R22.cjs → chunk-LBJFACLH.cjs} +125 -97
- package/dist/{chunk-7RNEYPI4.cjs → chunk-LTPVHQXJ.cjs} +555 -549
- package/dist/{chunk-TRD2FCAR.mjs → chunk-Q5MFRAWD.mjs} +417 -411
- package/dist/{chunk-WLDTBKRA.mjs → chunk-QF5T6HXC.mjs} +5 -4
- package/dist/{chunk-DYTRG4C7.mjs → chunk-RMYUE6HJ.mjs} +1 -1
- package/dist/{chunk-GWA6GFTI.cjs → chunk-WZJMJFP7.cjs} +62 -62
- package/dist/{chunk-JPRV36DT.cjs → chunk-XJB3VG4C.cjs} +2 -2
- package/dist/{chunk-53IFZGSF.mjs → chunk-YR43AAX5.mjs} +0 -5
- package/dist/claim.cjs +6 -6
- package/dist/claim.d.cts +2 -2
- package/dist/claim.d.ts +2 -2
- package/dist/claim.mjs +5 -5
- package/dist/constants.cjs +3 -3
- package/dist/constants.d.cts +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.mjs +2 -2
- package/dist/deposit.cjs +8 -8
- package/dist/deposit.d.cts +2 -2
- package/dist/deposit.d.ts +2 -2
- package/dist/deposit.mjs +7 -7
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +9 -9
- package/dist/polymarket.cjs +5 -5
- package/dist/polymarket.mjs +2 -2
- package/dist/{types-C7wag_iL.d.cts → types-BO4iP6fG.d.cts} +6 -1
- package/dist/{types-D4b6Cjox.d.ts → types-oFblf65g.d.ts} +6 -1
- package/dist/withdraw.cjs +6 -6
- package/dist/withdraw.d.cts +2 -2
- package/dist/withdraw.d.ts +2 -2
- package/dist/withdraw.mjs +5 -5
- package/package.json +1 -1
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk6ZJTZ7DScjs = require('./chunk-6ZJTZ7DS.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunk2PQ34KU3cjs = require('./chunk-2PQ34KU3.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
@@ -85,8 +85,8 @@ var _chunkJYKMR6QIcjs = require('./chunk-JYKMR6QI.cjs');
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
var _chunkNPSC5R22cjs = require('./chunk-NPSC5R22.cjs');
|
|
89
88
|
|
|
89
|
+
var _chunkLBJFACLHcjs = require('./chunk-LBJFACLH.cjs');
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
|
|
@@ -96,8 +96,8 @@ var _chunkNPSC5R22cjs = require('./chunk-NPSC5R22.cjs');
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
|
|
99
|
-
var _chunkJPRV36DTcjs = require('./chunk-JPRV36DT.cjs');
|
|
100
99
|
|
|
100
|
+
var _chunkXJB3VG4Ccjs = require('./chunk-XJB3VG4C.cjs');
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
|
|
@@ -129,7 +129,7 @@ var _chunkJPRV36DTcjs = require('./chunk-JPRV36DT.cjs');
|
|
|
129
129
|
|
|
130
130
|
|
|
131
131
|
|
|
132
|
-
var
|
|
132
|
+
var _chunk4R2ZHSDQcjs = require('./chunk-4R2ZHSDQ.cjs');
|
|
133
133
|
|
|
134
134
|
// src/DepositModal.tsx
|
|
135
135
|
|
|
@@ -219,14 +219,14 @@ SegmentedToggle.displayName = "SegmentedToggle";
|
|
|
219
219
|
// src/components/ui/ChainIcon.tsx
|
|
220
220
|
|
|
221
221
|
function ChainIcon({ chainId, className, loading }) {
|
|
222
|
-
const badge =
|
|
223
|
-
const catalogChain =
|
|
224
|
-
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _2 => _2.name]), () => (
|
|
222
|
+
const badge = _chunk4R2ZHSDQcjs.getChainBadge.call(void 0, chainId);
|
|
223
|
+
const catalogChain = _chunkLBJFACLHcjs.useCatalogChain.call(void 0, _chunkLBJFACLHcjs.catalogKeyForChain.call(void 0, chainId));
|
|
224
|
+
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _2 => _2.name]), () => ( _chunk4R2ZHSDQcjs.getChainName.call(void 0, chainId)));
|
|
225
225
|
const initial = (_nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _3 => _3.name]), () => ( badge.shortLabel))).charAt(0);
|
|
226
226
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
227
|
-
|
|
227
|
+
_chunkLBJFACLHcjs.CdnIcon,
|
|
228
228
|
{
|
|
229
|
-
src: _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _4 => _4.iconUrl]), () => (
|
|
229
|
+
src: _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _4 => _4.iconUrl]), () => ( _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, chainId))),
|
|
230
230
|
alt: name,
|
|
231
231
|
className,
|
|
232
232
|
loading,
|
|
@@ -247,16 +247,16 @@ ChainIcon.displayName = "ChainIcon";
|
|
|
247
247
|
// src/components/ui/WalletBadgeIcons/index.tsx
|
|
248
248
|
|
|
249
249
|
function BadgeImage({ src, alt = "" }) {
|
|
250
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
250
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src, alt }) });
|
|
251
251
|
}
|
|
252
252
|
var WALLET_BADGES = ["rabby", "phantom", "walletconnect"];
|
|
253
253
|
function WalletBadgeIcons() {
|
|
254
|
-
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:
|
|
254
|
+
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: _chunk4R2ZHSDQcjs.cdnIconUrl.call(void 0, "wallets", slug) }, slug)) });
|
|
255
255
|
}
|
|
256
256
|
WalletBadgeIcons.displayName = "WalletBadgeIcons";
|
|
257
257
|
var TRANSFER_CHAIN_BADGES = ["mainnet", "solana", "base"];
|
|
258
258
|
function ChainBadgeIcons() {
|
|
259
|
-
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:
|
|
259
|
+
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: _chunk4R2ZHSDQcjs.cdnIconUrl.call(void 0, "chains", slug) }, slug)) });
|
|
260
260
|
}
|
|
261
261
|
ChainBadgeIcons.displayName = "ChainBadgeIcons";
|
|
262
262
|
var MAX_WALLET_CHAIN_MARKS = 3;
|
|
@@ -276,23 +276,23 @@ var DAPP_IMPORT_CATALOG = [
|
|
|
276
276
|
{
|
|
277
277
|
id: "polymarket",
|
|
278
278
|
label: "Polymarket",
|
|
279
|
-
iconUrl:
|
|
279
|
+
iconUrl: _chunk4R2ZHSDQcjs.cdnIconUrl.call(void 0, "dapps", "polymarket")
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
282
|
id: "aave",
|
|
283
283
|
label: "Aave",
|
|
284
|
-
iconUrl:
|
|
284
|
+
iconUrl: _chunk4R2ZHSDQcjs.cdnIconUrl.call(void 0, "dapps", "aave")
|
|
285
285
|
},
|
|
286
286
|
{
|
|
287
287
|
id: "hyperliquid",
|
|
288
288
|
label: "Hyperliquid",
|
|
289
|
-
iconUrl:
|
|
289
|
+
iconUrl: _chunk4R2ZHSDQcjs.cdnIconUrl.call(void 0, "dapps", "hyperliquid"),
|
|
290
290
|
comingSoon: true
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
293
|
id: "morpho",
|
|
294
294
|
label: "Morpho",
|
|
295
|
-
iconUrl:
|
|
295
|
+
iconUrl: _chunk4R2ZHSDQcjs.cdnIconUrl.call(void 0, "dapps", "morpho"),
|
|
296
296
|
comingSoon: true
|
|
297
297
|
}
|
|
298
298
|
];
|
|
@@ -300,7 +300,7 @@ var DAPP_IMPORT_CATALOG = [
|
|
|
300
300
|
// src/components/ui/BrandIcons.tsx
|
|
301
301
|
|
|
302
302
|
function ExchangeBadgeImage({ name }) {
|
|
303
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
303
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: _nullishCoalesce(_chunk6ZJTZ7DScjs.getExchangeLogoSrc.call(void 0, name), () => ( void 0)) });
|
|
304
304
|
}
|
|
305
305
|
var CARD_NETWORKS = ["amex", "visa", "mastercard"];
|
|
306
306
|
function CardNetworkIcons() {
|
|
@@ -308,20 +308,18 @@ function CardNetworkIcons() {
|
|
|
308
308
|
"span",
|
|
309
309
|
{
|
|
310
310
|
className: `rs-card-network rs-card-network--${network}`,
|
|
311
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
311
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: _chunk4R2ZHSDQcjs.cdnIconUrl.call(void 0, "cards", network) })
|
|
312
312
|
},
|
|
313
313
|
network
|
|
314
314
|
)) });
|
|
315
315
|
}
|
|
316
316
|
CardNetworkIcons.displayName = "CardNetworkIcons";
|
|
317
|
+
var EXCHANGE_BADGE_ORDER = ["Coinbase", "Binance", "Bybit"];
|
|
317
318
|
function ExchangeBadgeIcons() {
|
|
318
|
-
return /* @__PURE__ */ _jsxruntime.
|
|
319
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeImage, { name: "Coinbase" }) }),
|
|
320
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeImage, { name: "Binance" }) }),
|
|
321
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeImage, { name: "Kraken" }) })
|
|
322
|
-
] });
|
|
319
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-meta-icons rs-list-row-meta-icons--exchanges", children: EXCHANGE_BADGE_ORDER.map((name) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeImage, { name }) }, name)) });
|
|
323
320
|
}
|
|
324
321
|
ExchangeBadgeIcons.displayName = "ExchangeBadgeIcons";
|
|
322
|
+
var EXCHANGE_BADGE_COUNT = EXCHANGE_BADGE_ORDER.length;
|
|
325
323
|
var DAPP_BADGE_ORDER = ["polymarket", "aave", "hyperliquid"];
|
|
326
324
|
function DappBadgeIcons() {
|
|
327
325
|
const marks = DAPP_BADGE_ORDER.map(
|
|
@@ -329,7 +327,7 @@ function DappBadgeIcons() {
|
|
|
329
327
|
).filter(
|
|
330
328
|
(brand) => Boolean(brand)
|
|
331
329
|
);
|
|
332
|
-
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,
|
|
330
|
+
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, _chunkLBJFACLHcjs.CdnIcon, { src: brand.iconUrl, alt: brand.label }) }, brand.id)) });
|
|
333
331
|
}
|
|
334
332
|
DappBadgeIcons.displayName = "DappBadgeIcons";
|
|
335
333
|
var DAPP_BADGE_COUNT = DAPP_BADGE_ORDER.length;
|
|
@@ -349,9 +347,9 @@ function balanceSubtitle(status, balanceUsd, fallback) {
|
|
|
349
347
|
return "No balance";
|
|
350
348
|
}
|
|
351
349
|
function fiatIcon(name) {
|
|
352
|
-
if (name === "apple") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
353
|
-
if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
354
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
350
|
+
if (name === "apple") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.AppleIcon, {});
|
|
351
|
+
if (name === "bank") return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BankIcon, {});
|
|
352
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CardIcon, {});
|
|
355
353
|
}
|
|
356
354
|
function FiatMethodIcon({ option }) {
|
|
357
355
|
const [remoteFailed, setRemoteFailed] = _react.useState.call(void 0, false);
|
|
@@ -434,20 +432,24 @@ function renderWalletLeading(row) {
|
|
|
434
432
|
}
|
|
435
433
|
);
|
|
436
434
|
}
|
|
437
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
435
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {});
|
|
438
436
|
}
|
|
439
|
-
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
440
|
-
var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
441
|
-
var EXCHANGE_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
442
|
-
var MIGRATE_ASSETS_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
443
|
-
var SMALL_SPINNER = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
437
|
+
var TRANSFER_CRYPTO_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TransferCryptoIcon, {});
|
|
438
|
+
var WALLET_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {});
|
|
439
|
+
var EXCHANGE_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.UnplugIcon, {});
|
|
440
|
+
var MIGRATE_ASSETS_LEADING = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.MigrateAssetsIcon, {});
|
|
441
|
+
var SMALL_SPINNER = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, { className: "rs-spinner--sm" });
|
|
444
442
|
var CONNECT_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
445
443
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletBadgeIcons, {}),
|
|
446
444
|
"+100"
|
|
447
445
|
] });
|
|
446
|
+
var EXTRA_EXCHANGE_COUNT = Math.max(
|
|
447
|
+
0,
|
|
448
|
+
_chunkLBJFACLHcjs.SUPPORTED_CONNECT_EXCHANGE_COUNT - EXCHANGE_BADGE_COUNT
|
|
449
|
+
);
|
|
448
450
|
var EXCHANGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
449
451
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExchangeBadgeIcons, {}),
|
|
450
|
-
|
|
452
|
+
EXTRA_EXCHANGE_COUNT > 0 ? `+${EXTRA_EXCHANGE_COUNT}` : null
|
|
451
453
|
] });
|
|
452
454
|
var EXTRA_DAPP_COUNT = Math.max(
|
|
453
455
|
0,
|
|
@@ -457,7 +459,7 @@ var MIGRATE_ASSETS_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxrunt
|
|
|
457
459
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DappBadgeIcons, {}),
|
|
458
460
|
EXTRA_DAPP_COUNT > 0 ? `+${EXTRA_DAPP_COUNT}` : null
|
|
459
461
|
] });
|
|
460
|
-
var EXTRA_CHAIN_COUNT = Math.max(0,
|
|
462
|
+
var EXTRA_CHAIN_COUNT = Math.max(0, _chunk4R2ZHSDQcjs.getSupportedChainIds.call(void 0, ).length - 3);
|
|
461
463
|
var CHAIN_BADGE_META = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
462
464
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChainBadgeIcons, {}),
|
|
463
465
|
EXTRA_CHAIN_COUNT > 0 ? `+${EXTRA_CHAIN_COUNT}` : null
|
|
@@ -501,7 +503,7 @@ function ConnectStep({
|
|
|
501
503
|
if (onSelectTransferCrypto) {
|
|
502
504
|
cryptoRows.push(
|
|
503
505
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
504
|
-
|
|
506
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
505
507
|
{
|
|
506
508
|
leading: TRANSFER_CRYPTO_LEADING,
|
|
507
509
|
title: "Transfer crypto",
|
|
@@ -522,7 +524,7 @@ function ConnectStep({
|
|
|
522
524
|
);
|
|
523
525
|
cryptoRows.push(
|
|
524
526
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
525
|
-
|
|
527
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
526
528
|
{
|
|
527
529
|
leading: renderWalletLeading(row),
|
|
528
530
|
title: collapseToExternal ? "External wallet" : row.label,
|
|
@@ -539,7 +541,7 @@ function ConnectStep({
|
|
|
539
541
|
if (!hasReownWallet && handleConnect) {
|
|
540
542
|
cryptoRows.push(
|
|
541
543
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
542
|
-
|
|
544
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
543
545
|
{
|
|
544
546
|
leading: WALLET_LEADING,
|
|
545
547
|
title: "Connect wallet",
|
|
@@ -554,7 +556,7 @@ function ConnectStep({
|
|
|
554
556
|
if (onSelectFundFromExchange) {
|
|
555
557
|
cryptoRows.push(
|
|
556
558
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
557
|
-
|
|
559
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
558
560
|
{
|
|
559
561
|
leading: EXCHANGE_LEADING,
|
|
560
562
|
title: "Connect exchange",
|
|
@@ -569,7 +571,7 @@ function ConnectStep({
|
|
|
569
571
|
if (onSelectMigrateAssets) {
|
|
570
572
|
cryptoRows.push(
|
|
571
573
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
572
|
-
|
|
574
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
573
575
|
{
|
|
574
576
|
leading: MIGRATE_ASSETS_LEADING,
|
|
575
577
|
title: "Migrate assets",
|
|
@@ -590,7 +592,7 @@ function ConnectStep({
|
|
|
590
592
|
for (const opt of fiatPaymentMethods) {
|
|
591
593
|
cashRows.push(
|
|
592
594
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
593
|
-
|
|
595
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
594
596
|
{
|
|
595
597
|
leading: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FiatMethodIcon, { option: opt }),
|
|
596
598
|
title: opt.label,
|
|
@@ -605,7 +607,7 @@ function ConnectStep({
|
|
|
605
607
|
} else if (fiatLoading) {
|
|
606
608
|
cashRows.push(
|
|
607
609
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
608
|
-
|
|
610
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
609
611
|
{
|
|
610
612
|
leading: SMALL_SPINNER,
|
|
611
613
|
title: "Loading payment options\u2026",
|
|
@@ -634,9 +636,9 @@ function ConnectStep({
|
|
|
634
636
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
635
637
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
636
638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
637
|
-
|
|
639
|
+
_chunkLBJFACLHcjs.BodyHeader,
|
|
638
640
|
{
|
|
639
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
641
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.HandCoinsIcon, {}),
|
|
640
642
|
title,
|
|
641
643
|
subtitle: _nullishCoalesce(subtitle, () => ( defaultSubtitle)),
|
|
642
644
|
aside: showToggle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -672,7 +674,7 @@ function ConnectStep({
|
|
|
672
674
|
children: "Disconnect wallet"
|
|
673
675
|
}
|
|
674
676
|
) }),
|
|
675
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
677
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
676
678
|
] });
|
|
677
679
|
}
|
|
678
680
|
ConnectStep.displayName = "ConnectStep";
|
|
@@ -695,17 +697,17 @@ function AssetSelectStep({
|
|
|
695
697
|
const [selectedAssetId, setSelectedAssetId] = _react.useState.call(void 0, null);
|
|
696
698
|
const [loading, setLoading] = _react.useState.call(void 0, true);
|
|
697
699
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
698
|
-
const isDepositChain =
|
|
699
|
-
const { catalog } =
|
|
700
|
-
const chainName =
|
|
700
|
+
const isDepositChain = _chunkLBJFACLHcjs.useIsDepositChain.call(void 0, );
|
|
701
|
+
const { catalog } = _chunkLBJFACLHcjs.useChainCatalog.call(void 0, );
|
|
702
|
+
const chainName = _chunkLBJFACLHcjs.useChainName.call(void 0, );
|
|
701
703
|
const defaultAssetId = _react.useMemo.call(void 0, () => {
|
|
702
704
|
if (!defaultSourceChain || !defaultSourceToken) return null;
|
|
703
|
-
return
|
|
705
|
+
return _chunkLBJFACLHcjs.getAssetId.call(void 0, {
|
|
704
706
|
chainId: defaultSourceChain,
|
|
705
707
|
token: defaultSourceToken
|
|
706
708
|
});
|
|
707
709
|
}, [defaultSourceChain, defaultSourceToken]);
|
|
708
|
-
const onTotalBalanceComputedRef =
|
|
710
|
+
const onTotalBalanceComputedRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onTotalBalanceComputed);
|
|
709
711
|
_react.useEffect.call(void 0, () => {
|
|
710
712
|
let active = true;
|
|
711
713
|
function emitAssetsUpdate(currentAssets) {
|
|
@@ -725,11 +727,11 @@ function AssetSelectStep({
|
|
|
725
727
|
try {
|
|
726
728
|
const portfolio = await service.fetchPortfolio(address);
|
|
727
729
|
if (!active) return;
|
|
728
|
-
const portfolioAssets =
|
|
730
|
+
const portfolioAssets = _chunkLBJFACLHcjs.portfolioToAssets.call(void 0, portfolio.tokens);
|
|
729
731
|
setAssets(portfolioAssets);
|
|
730
732
|
emitAssetsUpdate(portfolioAssets);
|
|
731
733
|
const hasNative = portfolioAssets.some(
|
|
732
|
-
(asset) => asset.token.toLowerCase() ===
|
|
734
|
+
(asset) => asset.token.toLowerCase() === _chunk4R2ZHSDQcjs.NATIVE_TOKEN_ADDRESS
|
|
733
735
|
);
|
|
734
736
|
if (!hasNative) {
|
|
735
737
|
const connectedChainId = _optionalChain([publicClient, 'access', _11 => _11.chain, 'optionalAccess', _12 => _12.id]);
|
|
@@ -776,7 +778,7 @@ function AssetSelectStep({
|
|
|
776
778
|
} catch (e2) {
|
|
777
779
|
return false;
|
|
778
780
|
}
|
|
779
|
-
const isNativeToken = a.token.toLowerCase() ===
|
|
781
|
+
const isNativeToken = a.token.toLowerCase() === _chunk4R2ZHSDQcjs.NATIVE_TOKEN_ADDRESS;
|
|
780
782
|
if (!isNativeToken && !(typeof a.balanceUsd === "number" && a.balanceUsd >= 0.01))
|
|
781
783
|
return false;
|
|
782
784
|
return true;
|
|
@@ -804,7 +806,7 @@ function AssetSelectStep({
|
|
|
804
806
|
const raw = _viem.formatUnits.call(void 0, BigInt(asset.balance), asset.decimals);
|
|
805
807
|
const numeric = Number(raw);
|
|
806
808
|
if (!Number.isFinite(numeric)) return raw;
|
|
807
|
-
return
|
|
809
|
+
return _chunkLBJFACLHcjs.tokenFormatter.format(numeric);
|
|
808
810
|
} catch (e3) {
|
|
809
811
|
return asset.balance;
|
|
810
812
|
}
|
|
@@ -812,20 +814,20 @@ function AssetSelectStep({
|
|
|
812
814
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
813
815
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
814
816
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
815
|
-
|
|
817
|
+
_chunkLBJFACLHcjs.BodyHeader,
|
|
816
818
|
{
|
|
817
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
819
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}),
|
|
818
820
|
title: "Your assets",
|
|
819
821
|
subtitle: "Select source assets to transfer"
|
|
820
822
|
}
|
|
821
823
|
),
|
|
822
824
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
823
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
825
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
824
826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
825
827
|
] }),
|
|
826
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
828
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
|
|
827
829
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
828
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
830
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
829
831
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
830
832
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
831
833
|
address.slice(0, 6),
|
|
@@ -845,8 +847,8 @@ function AssetSelectStep({
|
|
|
845
847
|
!loading && !error && rows.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: rows.map((asset) => {
|
|
846
848
|
const isSelected = selectedAssetId === asset.id;
|
|
847
849
|
const tokenAmount = formatBalance(asset);
|
|
848
|
-
const badge =
|
|
849
|
-
const chainIcon =
|
|
850
|
+
const badge = _chunk4R2ZHSDQcjs.getChainBadge.call(void 0, asset.chainId);
|
|
851
|
+
const chainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, asset.chainId);
|
|
850
852
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
851
853
|
"button",
|
|
852
854
|
{
|
|
@@ -858,13 +860,13 @@ function AssetSelectStep({
|
|
|
858
860
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
859
861
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
860
862
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
861
|
-
|
|
863
|
+
_chunkLBJFACLHcjs.TokenIcon,
|
|
862
864
|
{
|
|
863
865
|
symbol: asset.symbol,
|
|
864
866
|
fallback: asset.symbol.slice(0, 4)
|
|
865
867
|
}
|
|
866
868
|
) }),
|
|
867
|
-
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
869
|
+
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: chainIcon, alt: chainName(asset.chainId) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
868
870
|
"span",
|
|
869
871
|
{
|
|
870
872
|
className: "rs-asset-chain-badge",
|
|
@@ -891,14 +893,14 @@ function AssetSelectStep({
|
|
|
891
893
|
] })
|
|
892
894
|
] })
|
|
893
895
|
] }),
|
|
894
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ?
|
|
896
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: asset.balanceUsd !== void 0 && asset.balanceUsd > 0 ? _chunkLBJFACLHcjs.currencyFormatter.format(asset.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${asset.symbol}` : "--" })
|
|
895
897
|
]
|
|
896
898
|
},
|
|
897
899
|
asset.id
|
|
898
900
|
);
|
|
899
901
|
}) }),
|
|
900
902
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
901
|
-
|
|
903
|
+
_chunkLBJFACLHcjs.Button,
|
|
902
904
|
{
|
|
903
905
|
onClick: () => selectedAsset && onContinue(selectedAsset),
|
|
904
906
|
disabled: !selectedAsset,
|
|
@@ -907,7 +909,7 @@ function AssetSelectStep({
|
|
|
907
909
|
}
|
|
908
910
|
)
|
|
909
911
|
] }),
|
|
910
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
912
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
911
913
|
] });
|
|
912
914
|
}
|
|
913
915
|
async function fetchNativeAssets(address, publicClient, existing, isDepositChain, catalogChain) {
|
|
@@ -915,20 +917,20 @@ async function fetchNativeAssets(address, publicClient, existing, isDepositChain
|
|
|
915
917
|
const connectedChainId = _optionalChain([publicClient, 'access', _16 => _16.chain, 'optionalAccess', _17 => _17.id]);
|
|
916
918
|
if (!connectedChainId) return [];
|
|
917
919
|
if (!isDepositChain(connectedChainId)) return [];
|
|
918
|
-
const id =
|
|
920
|
+
const id = _chunkLBJFACLHcjs.getAssetId.call(void 0, {
|
|
919
921
|
chainId: connectedChainId,
|
|
920
|
-
token:
|
|
922
|
+
token: _chunk4R2ZHSDQcjs.NATIVE_TOKEN_ADDRESS
|
|
921
923
|
});
|
|
922
924
|
if (existingIds.has(id)) return [];
|
|
923
925
|
try {
|
|
924
926
|
const balance = await publicClient.getBalance({ address });
|
|
925
|
-
const nativeSymbol = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _18 => _18.nativeToken, 'access', _19 => _19.symbol]), () => (
|
|
927
|
+
const nativeSymbol = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _18 => _18.nativeToken, 'access', _19 => _19.symbol]), () => ( _chunk4R2ZHSDQcjs.getNativeSymbol.call(void 0, connectedChainId)));
|
|
926
928
|
const nativeDecimals = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _20 => _20.nativeToken, 'access', _21 => _21.decimals]), () => ( 18));
|
|
927
929
|
return [
|
|
928
930
|
{
|
|
929
931
|
id,
|
|
930
932
|
chainId: connectedChainId,
|
|
931
|
-
token:
|
|
933
|
+
token: _chunk4R2ZHSDQcjs.NATIVE_TOKEN_ADDRESS,
|
|
932
934
|
symbol: nativeSymbol,
|
|
933
935
|
name: nativeSymbol,
|
|
934
936
|
decimals: nativeDecimals,
|
|
@@ -1088,9 +1090,9 @@ function AmountStep({
|
|
|
1088
1090
|
const chainMismatch = Boolean(
|
|
1089
1091
|
_optionalChain([walletClient, 'optionalAccess', _26 => _26.chain, 'optionalAccess', _27 => _27.id]) && walletClient.chain.id !== asset.chainId
|
|
1090
1092
|
);
|
|
1091
|
-
const targetChainId =
|
|
1092
|
-
const targetSymbol =
|
|
1093
|
-
const isSourceStablecoin =
|
|
1093
|
+
const targetChainId = _chunk4R2ZHSDQcjs.targetChainToChainId.call(void 0, targetChain);
|
|
1094
|
+
const targetSymbol = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
1095
|
+
const isSourceStablecoin = _chunk4R2ZHSDQcjs.isStablecoinSymbol.call(void 0, asset.symbol);
|
|
1094
1096
|
const tokenPriceUsd = _react.useMemo.call(void 0, () => {
|
|
1095
1097
|
if (tokenPriceUsdOverride !== void 0 && tokenPriceUsdOverride > 0)
|
|
1096
1098
|
return tokenPriceUsdOverride;
|
|
@@ -1118,7 +1120,7 @@ function AmountStep({
|
|
|
1118
1120
|
const balanceTarget = _nullishCoalesce(balanceAddress, () => ( address));
|
|
1119
1121
|
if (!balanceTarget || !publicClient) return;
|
|
1120
1122
|
try {
|
|
1121
|
-
const bal =
|
|
1123
|
+
const bal = _chunkLBJFACLHcjs.isNativeAsset.call(void 0, asset) ? await publicClient.getBalance({ address: balanceTarget }) : await publicClient.readContract({
|
|
1122
1124
|
address: asset.token,
|
|
1123
1125
|
abi: _viem.erc20Abi,
|
|
1124
1126
|
functionName: "balanceOf",
|
|
@@ -1139,7 +1141,7 @@ function AmountStep({
|
|
|
1139
1141
|
hasAttemptedSwitch.current = true;
|
|
1140
1142
|
switchChain(asset.chainId).catch((err) => {
|
|
1141
1143
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1142
|
-
setError(
|
|
1144
|
+
setError(_chunkLBJFACLHcjs.formatUserError.call(void 0, raw));
|
|
1143
1145
|
});
|
|
1144
1146
|
}
|
|
1145
1147
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -1192,7 +1194,7 @@ function AmountStep({
|
|
|
1192
1194
|
const raw = _viem.formatUnits.call(void 0, balance, asset.decimals);
|
|
1193
1195
|
const numeric = Number(raw);
|
|
1194
1196
|
if (!Number.isFinite(numeric)) return raw;
|
|
1195
|
-
return
|
|
1197
|
+
return _chunkLBJFACLHcjs.tokenFormatter.format(numeric);
|
|
1196
1198
|
} catch (e8) {
|
|
1197
1199
|
return "\u2026";
|
|
1198
1200
|
}
|
|
@@ -1211,7 +1213,7 @@ function AmountStep({
|
|
|
1211
1213
|
return null;
|
|
1212
1214
|
}
|
|
1213
1215
|
}, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, asset.decimals]);
|
|
1214
|
-
const minDepositUsd =
|
|
1216
|
+
const minDepositUsd = _chunk4R2ZHSDQcjs.isHyperCoreDestination.call(void 0, targetChain) ? Math.max(_chunk4R2ZHSDQcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _28 => _28.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _29 => _29.minDepositUsd]), () => ( null));
|
|
1215
1217
|
const maxDepositUsd = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _30 => _30.maxDepositUsd]), () => ( null));
|
|
1216
1218
|
const isBelowMin = minDepositUsd !== null && numericAmount > 0 && amountUsd < minDepositUsd;
|
|
1217
1219
|
const isAboveMax = maxDepositUsd !== null && amountUsd > maxDepositUsd;
|
|
@@ -1277,12 +1279,12 @@ function AmountStep({
|
|
|
1277
1279
|
};
|
|
1278
1280
|
const continueLabel = exceedsBalance ? "Insufficient balance" : isAboveMax ? "Continue with max allowed deposit" : isBelowMin ? "Continue with minimum deposit" : "Continue";
|
|
1279
1281
|
const continueDisabled = chainMismatch || exceedsBalance || numericAmount === 0 && !isBelowMin || balance === null;
|
|
1280
|
-
const chainName =
|
|
1282
|
+
const chainName = _chunkLBJFACLHcjs.useChainName.call(void 0, );
|
|
1281
1283
|
const sourceChainName = chainName(asset.chainId);
|
|
1282
1284
|
const targetChainName = chainName(targetChainId);
|
|
1283
1285
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1284
1286
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1285
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1287
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
1286
1288
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
1287
1289
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
1288
1290
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1302,13 +1304,13 @@ function AmountStep({
|
|
|
1302
1304
|
" available",
|
|
1303
1305
|
balanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1304
1306
|
" (~",
|
|
1305
|
-
|
|
1307
|
+
_chunkLBJFACLHcjs.currencyFormatter.format(balanceUsd),
|
|
1306
1308
|
")"
|
|
1307
1309
|
] })
|
|
1308
1310
|
] }),
|
|
1309
1311
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
1310
1312
|
"Min. deposit ",
|
|
1311
|
-
|
|
1313
|
+
_chunkLBJFACLHcjs.currencyFormatter.format(minDepositUsd)
|
|
1312
1314
|
] })
|
|
1313
1315
|
] })
|
|
1314
1316
|
] }),
|
|
@@ -1333,7 +1335,7 @@ function AmountStep({
|
|
|
1333
1335
|
" ",
|
|
1334
1336
|
asset.symbol
|
|
1335
1337
|
] }),
|
|
1336
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1338
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: asset.symbol }) })
|
|
1337
1339
|
] })
|
|
1338
1340
|
] }),
|
|
1339
1341
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
@@ -1344,17 +1346,17 @@ function AmountStep({
|
|
|
1344
1346
|
" ",
|
|
1345
1347
|
targetSymbol
|
|
1346
1348
|
] }),
|
|
1347
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1349
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
1348
1350
|
] })
|
|
1349
1351
|
] }),
|
|
1350
1352
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
1351
1353
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
1352
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
1354
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkLBJFACLHcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
1353
1355
|
] })
|
|
1354
1356
|
] }),
|
|
1355
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1357
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
|
|
1356
1358
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1357
|
-
|
|
1359
|
+
_chunkLBJFACLHcjs.Button,
|
|
1358
1360
|
{
|
|
1359
1361
|
onClick: handleContinue,
|
|
1360
1362
|
fullWidth: true,
|
|
@@ -1363,7 +1365,7 @@ function AmountStep({
|
|
|
1363
1365
|
}
|
|
1364
1366
|
)
|
|
1365
1367
|
] }),
|
|
1366
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1368
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
1367
1369
|
] });
|
|
1368
1370
|
}
|
|
1369
1371
|
|
|
@@ -1426,40 +1428,40 @@ function ConfirmStep({
|
|
|
1426
1428
|
recipient
|
|
1427
1429
|
]);
|
|
1428
1430
|
const quote = setupReady && _optionalChain([quoteResult, 'optionalAccess', _35 => _35.requestKey]) === quoteRequestKey ? quoteResult.quote : null;
|
|
1429
|
-
const targetChainId =
|
|
1430
|
-
const targetSymbol = sameRoute ? asset.symbol :
|
|
1431
|
-
const sourceChainName =
|
|
1432
|
-
const targetChainName =
|
|
1433
|
-
const sourceChainIcon =
|
|
1434
|
-
const targetChainIcon =
|
|
1435
|
-
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(
|
|
1436
|
-
const mustHaveQuote = !appFeesResolved ||
|
|
1431
|
+
const targetChainId = _chunk4R2ZHSDQcjs.targetChainToChainId.call(void 0, targetChain);
|
|
1432
|
+
const targetSymbol = sameRoute ? asset.symbol : _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
1433
|
+
const sourceChainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, asset.chainId);
|
|
1434
|
+
const targetChainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChainId);
|
|
1435
|
+
const sourceChainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, asset.chainId);
|
|
1436
|
+
const targetChainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, targetChainId);
|
|
1437
|
+
const formattedSendAmount = amount && Number.isFinite(Number(amount)) ? _nullishCoalesce(_chunkLBJFACLHcjs.formatTokenAmount.call(void 0, Number(amount), asset.symbol), () => ( "0")) : "0";
|
|
1438
|
+
const mustHaveQuote = !appFeesResolved || _chunkLBJFACLHcjs.resolveAppFeeBps.call(void 0,
|
|
1437
1439
|
appFees,
|
|
1438
1440
|
`eip155:${quoteSource.chainId}`,
|
|
1439
1441
|
quoteSource.token
|
|
1440
1442
|
) > 0;
|
|
1441
|
-
const { display: feeDisplay, struck: feesFullySponsored } =
|
|
1443
|
+
const { display: feeDisplay, struck: feesFullySponsored } = _chunkLBJFACLHcjs.quoteFeeRow.call(void 0,
|
|
1442
1444
|
_optionalChain([quote, 'optionalAccess', _36 => _36.fees])
|
|
1443
1445
|
);
|
|
1444
1446
|
const directTransfer = sameRoute && !mustHaveQuote && !executeTransfer;
|
|
1445
1447
|
const receiveDisplay = (() => {
|
|
1446
1448
|
if (directTransfer) return `${formattedSendAmount} ${asset.symbol}`;
|
|
1447
1449
|
if (quote) {
|
|
1448
|
-
const quoted =
|
|
1450
|
+
const quoted = _chunkLBJFACLHcjs.formatQuotedReceive.call(void 0, quote.output, targetSymbol);
|
|
1449
1451
|
if (quoted !== void 0) return quoted;
|
|
1450
1452
|
}
|
|
1451
1453
|
const usdValue = Number(targetAmount);
|
|
1452
1454
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
1453
|
-
const estimate =
|
|
1455
|
+
const estimate = _chunkLBJFACLHcjs.formatReceiveEstimate.call(void 0, {
|
|
1454
1456
|
sourceAmount: Number.isFinite(Number(amount)) ? Number(amount) : void 0,
|
|
1455
1457
|
sourceSymbol: asset.symbol,
|
|
1456
1458
|
targetSymbol,
|
|
1457
1459
|
sourceAmountUsd,
|
|
1458
|
-
sourceTrusted:
|
|
1460
|
+
sourceTrusted: _chunkLBJFACLHcjs.isRecognizedToken.call(void 0, asset.token, asset.chainId),
|
|
1459
1461
|
// The target is the curated deposit destination, so a stablecoin target
|
|
1460
1462
|
// estimates at $1 when unquoted (DepositFlow skips fetching stablecoin
|
|
1461
1463
|
// target prices). Not applied to the source — that can be a held token.
|
|
1462
|
-
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } :
|
|
1464
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : _chunkLBJFACLHcjs.isDisplayStablecoinSymbol.call(void 0, targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
|
|
1463
1465
|
});
|
|
1464
1466
|
if (estimate !== void 0) return estimate;
|
|
1465
1467
|
return targetSymbol;
|
|
@@ -1470,7 +1472,7 @@ function ConfirmStep({
|
|
|
1470
1472
|
hasAttemptedSwitch.current = true;
|
|
1471
1473
|
switchChain(asset.chainId).catch((err) => {
|
|
1472
1474
|
const raw = err instanceof Error ? err.message : "Failed to switch chain";
|
|
1473
|
-
setError(
|
|
1475
|
+
setError(_chunkLBJFACLHcjs.formatUserError.call(void 0, raw));
|
|
1474
1476
|
});
|
|
1475
1477
|
}
|
|
1476
1478
|
}, [chainMismatch, switchChain, asset.chainId]);
|
|
@@ -1559,7 +1561,7 @@ function ConfirmStep({
|
|
|
1559
1561
|
const result = await executeTransfer(amountUnits);
|
|
1560
1562
|
hash = result.txHash;
|
|
1561
1563
|
resolvedSourceToken = result.sourceToken;
|
|
1562
|
-
} else if (
|
|
1564
|
+
} else if (_chunkLBJFACLHcjs.isNativeAsset.call(void 0, asset)) {
|
|
1563
1565
|
hash = await walletClient.sendTransaction({
|
|
1564
1566
|
account,
|
|
1565
1567
|
chain,
|
|
@@ -1590,29 +1592,29 @@ function ConfirmStep({
|
|
|
1590
1592
|
);
|
|
1591
1593
|
} catch (err) {
|
|
1592
1594
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
1593
|
-
const message =
|
|
1595
|
+
const message = _chunkLBJFACLHcjs.formatUserError.call(void 0, raw);
|
|
1594
1596
|
setError(message);
|
|
1595
|
-
_optionalChain([onError, 'optionalCall', _38 => _38(message, "TRANSFER_ERROR")]);
|
|
1597
|
+
_optionalChain([onError, 'optionalCall', _38 => _38(message, "TRANSFER_ERROR", raw)]);
|
|
1596
1598
|
} finally {
|
|
1597
1599
|
setIsSubmitting(false);
|
|
1598
1600
|
}
|
|
1599
1601
|
};
|
|
1600
1602
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
1601
1603
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
1602
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1604
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
1603
1605
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
1604
1606
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1605
1607
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
1606
1608
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1607
1609
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
1608
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1610
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
1609
1611
|
] })
|
|
1610
1612
|
] }),
|
|
1611
1613
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1612
1614
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
1613
1615
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1614
1616
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
1615
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1617
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: targetChainIcon }) })
|
|
1616
1618
|
] })
|
|
1617
1619
|
] }),
|
|
1618
1620
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1627,14 +1629,14 @@ function ConfirmStep({
|
|
|
1627
1629
|
" ",
|
|
1628
1630
|
asset.symbol
|
|
1629
1631
|
] }),
|
|
1630
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1632
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: asset.symbol }) })
|
|
1631
1633
|
] })
|
|
1632
1634
|
] }),
|
|
1633
1635
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
1634
1636
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
1635
1637
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
1636
1638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
1637
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1639
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
1638
1640
|
] })
|
|
1639
1641
|
] }),
|
|
1640
1642
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -1654,9 +1656,9 @@ function ConfirmStep({
|
|
|
1654
1656
|
) })
|
|
1655
1657
|
] })
|
|
1656
1658
|
] }),
|
|
1657
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1659
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
|
|
1658
1660
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1659
|
-
|
|
1661
|
+
_chunkLBJFACLHcjs.Button,
|
|
1660
1662
|
{
|
|
1661
1663
|
onClick: handleConfirm,
|
|
1662
1664
|
loading: isSubmitting,
|
|
@@ -1670,7 +1672,7 @@ function ConfirmStep({
|
|
|
1670
1672
|
}
|
|
1671
1673
|
)
|
|
1672
1674
|
] }),
|
|
1673
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1675
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
1674
1676
|
] });
|
|
1675
1677
|
}
|
|
1676
1678
|
|
|
@@ -1686,6 +1688,117 @@ function ConfirmStep({
|
|
|
1686
1688
|
|
|
1687
1689
|
|
|
1688
1690
|
|
|
1691
|
+
// src/components/steps/DepositAddressSkeleton.tsx
|
|
1692
|
+
|
|
1693
|
+
var BASE_CHAIN_ID = 8453;
|
|
1694
|
+
function DepositAddressSkeleton({
|
|
1695
|
+
uiConfig
|
|
1696
|
+
}) {
|
|
1697
|
+
const evmChainIds = _chunk4R2ZHSDQcjs.getSupportedChainIds.call(void 0, );
|
|
1698
|
+
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
1699
|
+
const tokensForChain = _chunk4R2ZHSDQcjs.getTargetTokenSymbolsForChain.call(void 0, defaultChainId);
|
|
1700
|
+
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
|
|
1701
|
+
const chainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, defaultChainId);
|
|
1702
|
+
const chainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, defaultChainId);
|
|
1703
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
1704
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
1705
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
1706
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
1707
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
1708
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
1709
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
1710
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
1711
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1712
|
+
_chunkLBJFACLHcjs.CdnIcon,
|
|
1713
|
+
{
|
|
1714
|
+
src: chainIcon,
|
|
1715
|
+
className: "rs-deposit-address-dropdown-icon"
|
|
1716
|
+
}
|
|
1717
|
+
),
|
|
1718
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
1719
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1720
|
+
] })
|
|
1721
|
+
] }),
|
|
1722
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
1723
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
1724
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
|
|
1725
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
1726
|
+
"Min.$",
|
|
1727
|
+
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _39 => _39.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
1728
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6ZJTZ7DScjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1729
|
+
_chunkLBJFACLHcjs.InfoIcon,
|
|
1730
|
+
{
|
|
1731
|
+
className: "rs-deposit-address-min-icon",
|
|
1732
|
+
"aria-hidden": "true"
|
|
1733
|
+
}
|
|
1734
|
+
) })
|
|
1735
|
+
] })
|
|
1736
|
+
] }),
|
|
1737
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
1738
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1739
|
+
_chunkLBJFACLHcjs.TokenIcon,
|
|
1740
|
+
{
|
|
1741
|
+
symbol: defaultToken,
|
|
1742
|
+
className: "rs-deposit-address-dropdown-icon"
|
|
1743
|
+
}
|
|
1744
|
+
),
|
|
1745
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
|
|
1746
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
1747
|
+
] })
|
|
1748
|
+
] })
|
|
1749
|
+
] }),
|
|
1750
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1751
|
+
"div",
|
|
1752
|
+
{
|
|
1753
|
+
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
1754
|
+
children: [
|
|
1755
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-well", children: [
|
|
1756
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
1757
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
1758
|
+
] }),
|
|
1759
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1760
|
+
"button",
|
|
1761
|
+
{
|
|
1762
|
+
type: "button",
|
|
1763
|
+
className: "rs-deposit-address-copy",
|
|
1764
|
+
disabled: true,
|
|
1765
|
+
"aria-hidden": "true",
|
|
1766
|
+
children: [
|
|
1767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CopyIcon, {}),
|
|
1768
|
+
"Copy address"
|
|
1769
|
+
]
|
|
1770
|
+
}
|
|
1771
|
+
)
|
|
1772
|
+
]
|
|
1773
|
+
}
|
|
1774
|
+
),
|
|
1775
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-header", children: [
|
|
1776
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-header-left", children: [
|
|
1777
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
1778
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
1779
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1780
|
+
_chunk6ZJTZ7DScjs.Tooltip,
|
|
1781
|
+
{
|
|
1782
|
+
className: "rs-price-impact-info",
|
|
1783
|
+
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
1784
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.InfoIcon, { "aria-hidden": "true" })
|
|
1785
|
+
}
|
|
1786
|
+
)
|
|
1787
|
+
] }),
|
|
1788
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1789
|
+
_chunkLBJFACLHcjs.ChevronDownIcon,
|
|
1790
|
+
{
|
|
1791
|
+
className: "rs-price-impact-chevron",
|
|
1792
|
+
"aria-hidden": "true"
|
|
1793
|
+
}
|
|
1794
|
+
)
|
|
1795
|
+
] }) })
|
|
1796
|
+
] }),
|
|
1797
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
1798
|
+
] });
|
|
1799
|
+
}
|
|
1800
|
+
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
1801
|
+
|
|
1689
1802
|
// src/components/ui/DepositNotification.tsx
|
|
1690
1803
|
|
|
1691
1804
|
|
|
@@ -1693,9 +1806,9 @@ var INITIAL_POLL_INTERVAL = 3e3;
|
|
|
1693
1806
|
var MAX_POLL_INTERVAL = 3e4;
|
|
1694
1807
|
var BACKOFF_MULTIPLIER = 1.5;
|
|
1695
1808
|
function isEventForTx(event, txHash) {
|
|
1696
|
-
const eventTxHash =
|
|
1809
|
+
const eventTxHash = _chunk6ZJTZ7DScjs.getEventTxHash.call(void 0, event);
|
|
1697
1810
|
if (!eventTxHash) return false;
|
|
1698
|
-
return
|
|
1811
|
+
return _chunk6ZJTZ7DScjs.txRefsMatch.call(void 0, eventTxHash, txHash);
|
|
1699
1812
|
}
|
|
1700
1813
|
function truncateHash(hash) {
|
|
1701
1814
|
return `${hash.slice(0, 4)}\u2026${hash.slice(-4)}`;
|
|
@@ -1725,7 +1838,7 @@ function formatTimestamp(ms) {
|
|
|
1725
1838
|
return `${month} ${day}${suffix} \xB7 ${hours}:${minutes}:${seconds}`;
|
|
1726
1839
|
}
|
|
1727
1840
|
function formatBridgeFailedMessage(event) {
|
|
1728
|
-
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess',
|
|
1841
|
+
const eventData = _nullishCoalesce(_optionalChain([event, 'optionalAccess', _40 => _40.data]), () => ( {}));
|
|
1729
1842
|
const backendMessage = typeof eventData.message === "string" ? eventData.message.trim() : "";
|
|
1730
1843
|
if (backendMessage.length > 0) {
|
|
1731
1844
|
const lower = backendMessage.toLowerCase();
|
|
@@ -1745,7 +1858,7 @@ function formatBridgeFailedMessage(event) {
|
|
|
1745
1858
|
}
|
|
1746
1859
|
return "Bridge failed";
|
|
1747
1860
|
}
|
|
1748
|
-
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1861
|
+
var txLinkIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ExternalLinkIcon, { className: "rs-deposit-notification-link-icon" });
|
|
1749
1862
|
function DepositNotification({
|
|
1750
1863
|
deposit,
|
|
1751
1864
|
smartAccount,
|
|
@@ -1779,7 +1892,7 @@ function DepositNotification({
|
|
|
1779
1892
|
const pollIntervalRef = _react.useRef.call(void 0, INITIAL_POLL_INTERVAL);
|
|
1780
1893
|
const pollTimeoutRef = _react.useRef.call(void 0, null);
|
|
1781
1894
|
const completedRef = _react.useRef.call(void 0, _nullishCoalesce(directTransfer, () => ( false)));
|
|
1782
|
-
const depositContextRef =
|
|
1895
|
+
const depositContextRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, {
|
|
1783
1896
|
amount,
|
|
1784
1897
|
sourceChain,
|
|
1785
1898
|
sourceToken: token,
|
|
@@ -1787,8 +1900,8 @@ function DepositNotification({
|
|
|
1787
1900
|
targetChain,
|
|
1788
1901
|
targetToken
|
|
1789
1902
|
});
|
|
1790
|
-
const onCompleteRef =
|
|
1791
|
-
const onFailedRef =
|
|
1903
|
+
const onCompleteRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onComplete);
|
|
1904
|
+
const onFailedRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onFailed);
|
|
1792
1905
|
const handleComplete = _react.useCallback.call(void 0,
|
|
1793
1906
|
(destTxHash) => {
|
|
1794
1907
|
if (completedRef.current) return;
|
|
@@ -1797,7 +1910,7 @@ function DepositNotification({
|
|
|
1797
1910
|
setCompletedAt(Date.now());
|
|
1798
1911
|
setStatus("complete");
|
|
1799
1912
|
const context = depositContextRef.current;
|
|
1800
|
-
_optionalChain([onCompleteRef, 'access',
|
|
1913
|
+
_optionalChain([onCompleteRef, 'access', _41 => _41.current, 'optionalCall', _42 => _42(txHash, destTxHash, {
|
|
1801
1914
|
amount: context.amount,
|
|
1802
1915
|
sourceChain: context.sourceChain,
|
|
1803
1916
|
sourceToken: context.sourceToken,
|
|
@@ -1813,7 +1926,7 @@ function DepositNotification({
|
|
|
1813
1926
|
if (completedRef.current) return;
|
|
1814
1927
|
completedRef.current = true;
|
|
1815
1928
|
setStatus("failed");
|
|
1816
|
-
_optionalChain([onFailedRef, 'access',
|
|
1929
|
+
_optionalChain([onFailedRef, 'access', _43 => _43.current, 'optionalCall', _44 => _44(txHash, error)]);
|
|
1817
1930
|
},
|
|
1818
1931
|
[onFailedRef, txHash]
|
|
1819
1932
|
);
|
|
@@ -1831,17 +1944,17 @@ function DepositNotification({
|
|
|
1831
1944
|
if (!isMounted) return;
|
|
1832
1945
|
const lastEvent = data.lastEvent;
|
|
1833
1946
|
const eventForTx = isEventForTx(lastEvent, txHash) ? lastEvent : void 0;
|
|
1834
|
-
if (_optionalChain([eventForTx, 'optionalAccess',
|
|
1835
|
-
const destTx = _optionalChain([eventForTx, 'access',
|
|
1947
|
+
if (_optionalChain([eventForTx, 'optionalAccess', _45 => _45.type]) === "bridge-complete") {
|
|
1948
|
+
const destTx = _optionalChain([eventForTx, 'access', _46 => _46.data, 'optionalAccess', _47 => _47.destination, 'optionalAccess', _48 => _48.transactionHash]);
|
|
1836
1949
|
handleComplete(destTx);
|
|
1837
1950
|
return;
|
|
1838
1951
|
}
|
|
1839
|
-
if (_optionalChain([eventForTx, 'optionalAccess',
|
|
1952
|
+
if (_optionalChain([eventForTx, 'optionalAccess', _49 => _49.type]) === "bridge-failed") {
|
|
1840
1953
|
handleFailed(formatBridgeFailedMessage(eventForTx));
|
|
1841
1954
|
return;
|
|
1842
1955
|
}
|
|
1843
|
-
if (_optionalChain([eventForTx, 'optionalAccess',
|
|
1844
|
-
const errorMessage = _nullishCoalesce(_optionalChain([eventForTx, 'access',
|
|
1956
|
+
if (_optionalChain([eventForTx, 'optionalAccess', _50 => _50.type]) === "error") {
|
|
1957
|
+
const errorMessage = _nullishCoalesce(_optionalChain([eventForTx, 'access', _51 => _51.data, 'optionalAccess', _52 => _52.message]), () => ( "Unknown error"));
|
|
1845
1958
|
handleFailed(errorMessage);
|
|
1846
1959
|
return;
|
|
1847
1960
|
}
|
|
@@ -1879,12 +1992,12 @@ function DepositNotification({
|
|
|
1879
1992
|
status,
|
|
1880
1993
|
txHash
|
|
1881
1994
|
]);
|
|
1882
|
-
const explorerTxUrl =
|
|
1995
|
+
const explorerTxUrl = _chunkLBJFACLHcjs.useExplorerTxUrl.call(void 0, );
|
|
1883
1996
|
const sourceExplorerUrl = sourceChain === "unknown" ? void 0 : explorerTxUrl(sourceChain, txHash);
|
|
1884
|
-
const destExplorerUrl = destinationTxHash ? explorerTxUrl(
|
|
1997
|
+
const destExplorerUrl = destinationTxHash ? explorerTxUrl(_chunk4R2ZHSDQcjs.targetChainToChainId.call(void 0, targetChain), destinationTxHash) : null;
|
|
1885
1998
|
const title = status === "complete" ? "Deposit completed" : status === "failed" ? "Deposit failed" : "Deposit received and processing\u2026";
|
|
1886
1999
|
const subtitle = status === "complete" ? "Your deposit has been credited to your account." : status === "failed" ? "Your deposit could not be processed." : "Your deposit will be credited to your account shortly.";
|
|
1887
|
-
const statusIcon = status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-notification-badge rs-deposit-notification-badge--complete", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2000
|
+
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, _chunkLBJFACLHcjs.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, _chunkLBJFACLHcjs.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,
|
|
1888
2001
|
"svg",
|
|
1889
2002
|
{
|
|
1890
2003
|
className: "rs-deposit-notification-spinner",
|
|
@@ -1934,7 +2047,7 @@ function DepositNotification({
|
|
|
1934
2047
|
className: "rs-deposit-notification-close",
|
|
1935
2048
|
onClick: () => onDismiss(deposit.id),
|
|
1936
2049
|
"aria-label": "Dismiss",
|
|
1937
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2050
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CloseIcon, {})
|
|
1938
2051
|
}
|
|
1939
2052
|
)
|
|
1940
2053
|
] }),
|
|
@@ -1950,7 +2063,7 @@ function DepositNotification({
|
|
|
1950
2063
|
"aria-expanded": expanded,
|
|
1951
2064
|
children: [
|
|
1952
2065
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: expanded ? "See less details" : "See more details" }),
|
|
1953
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2066
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronDownIcon, { className: "rs-deposit-notification-toggle-chevron" })
|
|
1954
2067
|
]
|
|
1955
2068
|
}
|
|
1956
2069
|
),
|
|
@@ -2040,7 +2153,7 @@ function asString(value) {
|
|
|
2040
2153
|
function resolveSolanaTokenMeta(token) {
|
|
2041
2154
|
if (!token) return {};
|
|
2042
2155
|
const normalized = token.toLowerCase();
|
|
2043
|
-
const matched =
|
|
2156
|
+
const matched = _chunk4R2ZHSDQcjs.SOLANA_TOKENS.find(
|
|
2044
2157
|
(entry) => entry.mint.toLowerCase() === normalized
|
|
2045
2158
|
);
|
|
2046
2159
|
if (matched) {
|
|
@@ -2052,7 +2165,7 @@ function resolveSolanaTokenMeta(token) {
|
|
|
2052
2165
|
return {};
|
|
2053
2166
|
}
|
|
2054
2167
|
function getDepositEventDetails(event) {
|
|
2055
|
-
if (!_optionalChain([event, 'optionalAccess',
|
|
2168
|
+
if (!_optionalChain([event, 'optionalAccess', _53 => _53.type]) || !isRecord(event.data)) return {};
|
|
2056
2169
|
if (event.type === "deposit-received") {
|
|
2057
2170
|
const chainId = asChainId(event.data.chain);
|
|
2058
2171
|
const token = asString(event.data.token);
|
|
@@ -2067,12 +2180,12 @@ function getDepositEventDetails(event) {
|
|
|
2067
2180
|
const source = isRecord(event.data.source) ? event.data.source : void 0;
|
|
2068
2181
|
const deposit = isRecord(event.data.deposit) ? event.data.deposit : void 0;
|
|
2069
2182
|
if (source || deposit) {
|
|
2070
|
-
const chainId = _nullishCoalesce(asChainId(_optionalChain([source, 'optionalAccess',
|
|
2071
|
-
const token = _nullishCoalesce(_nullishCoalesce(asString(_optionalChain([source, 'optionalAccess',
|
|
2183
|
+
const chainId = _nullishCoalesce(asChainId(_optionalChain([source, 'optionalAccess', _54 => _54.chain])), () => ( asChainId(_optionalChain([deposit, 'optionalAccess', _55 => _55.chain]))));
|
|
2184
|
+
const token = _nullishCoalesce(_nullishCoalesce(asString(_optionalChain([source, 'optionalAccess', _56 => _56.asset])), () => ( asString(_optionalChain([deposit, 'optionalAccess', _57 => _57.asset])))), () => ( asString(_optionalChain([deposit, 'optionalAccess', _58 => _58.token]))));
|
|
2072
2185
|
const solanaMeta = chainId === "solana" ? resolveSolanaTokenMeta(token) : {};
|
|
2073
2186
|
return {
|
|
2074
2187
|
chainId,
|
|
2075
|
-
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess',
|
|
2188
|
+
amount: _nullishCoalesce(asAmount(_optionalChain([source, 'optionalAccess', _59 => _59.amount])), () => ( asAmount(_optionalChain([deposit, 'optionalAccess', _60 => _60.amount])))),
|
|
2076
2189
|
token,
|
|
2077
2190
|
...solanaMeta
|
|
2078
2191
|
};
|
|
@@ -2083,28 +2196,24 @@ function isSameRoute(sourceChain, sourceToken, targetChain, targetToken) {
|
|
|
2083
2196
|
return sourceChain === targetChain && sourceToken.toLowerCase() === targetToken.toLowerCase();
|
|
2084
2197
|
}
|
|
2085
2198
|
function chainLabel(chainId, catalogChain) {
|
|
2086
|
-
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess',
|
|
2199
|
+
const name = _nullishCoalesce(_optionalChain([catalogChain, 'optionalAccess', _61 => _61.name]), () => ( _chunk4R2ZHSDQcjs.getChainName.call(void 0, chainId)));
|
|
2087
2200
|
return name.replace(/\s+(One|Mainnet|Smart Chain|Chain)$/i, "");
|
|
2088
2201
|
}
|
|
2089
2202
|
function computeTokensForChain(chainId, topTokens, catalogChain) {
|
|
2090
|
-
const fromBackend = _optionalChain([topTokens, 'optionalAccess',
|
|
2203
|
+
const fromBackend = _optionalChain([topTokens, 'optionalAccess', _62 => _62[String(chainId)], 'optionalAccess', _63 => _63.map, 'call', _64 => _64((t) => t.symbol)]);
|
|
2091
2204
|
if (fromBackend) return fromBackend;
|
|
2092
|
-
|
|
2093
|
-
if (chainId === "hypercore") return ["USDC", "USDT0"];
|
|
2094
|
-
const bundled = _chunkTENL4H64cjs.getBundledTargetTokens.call(void 0, chainId).map((t) => t.symbol);
|
|
2095
|
-
if (bundled.length > 0) return bundled;
|
|
2096
|
-
return Array.isArray(_optionalChain([catalogChain, 'optionalAccess', _64 => _64.supportedTokens])) ? catalogChain.supportedTokens.map((t) => t.symbol) : [];
|
|
2205
|
+
return Array.isArray(_optionalChain([catalogChain, 'optionalAccess', _65 => _65.supportedTokens])) ? catalogChain.supportedTokens.map((t) => t.symbol) : [];
|
|
2097
2206
|
}
|
|
2098
2207
|
function resolveSourceTokenAddress(symbol, chainId, topTokens, catalogChain) {
|
|
2099
|
-
const top = _optionalChain([topTokens, 'optionalAccess',
|
|
2100
|
-
if (_optionalChain([top, 'optionalAccess',
|
|
2101
|
-
const fromRegistry =
|
|
2208
|
+
const top = _optionalChain([topTokens, 'optionalAccess', _66 => _66[String(chainId)], 'optionalAccess', _67 => _67.find, 'call', _68 => _68((t) => t.symbol === symbol)]);
|
|
2209
|
+
if (_optionalChain([top, 'optionalAccess', _69 => _69.address])) return top.address;
|
|
2210
|
+
const fromRegistry = _chunk4R2ZHSDQcjs.getTokenAddress.call(void 0, symbol, chainId);
|
|
2102
2211
|
if (fromRegistry) return fromRegistry;
|
|
2103
|
-
return Array.isArray(_optionalChain([catalogChain, 'optionalAccess',
|
|
2212
|
+
return Array.isArray(_optionalChain([catalogChain, 'optionalAccess', _70 => _70.supportedTokens])) ? _optionalChain([catalogChain, 'access', _71 => _71.supportedTokens, 'access', _72 => _72.find, 'call', _73 => _73((t) => t.symbol === symbol), 'optionalAccess', _74 => _74.address]) : void 0;
|
|
2104
2213
|
}
|
|
2105
2214
|
function TokenGlyph({ symbol }) {
|
|
2106
2215
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2107
|
-
|
|
2216
|
+
_chunkLBJFACLHcjs.TokenIcon,
|
|
2108
2217
|
{
|
|
2109
2218
|
symbol,
|
|
2110
2219
|
className: "rs-deposit-address-dropdown-icon",
|
|
@@ -2138,40 +2247,41 @@ function DepositAddressStep({
|
|
|
2138
2247
|
service.getTopTokens().then((t) => {
|
|
2139
2248
|
if (!active) return;
|
|
2140
2249
|
setTopTokens(t);
|
|
2141
|
-
if (t)
|
|
2250
|
+
if (t) _chunk4R2ZHSDQcjs.publishShortlistTokens.call(void 0, t);
|
|
2142
2251
|
});
|
|
2143
2252
|
return () => {
|
|
2144
2253
|
active = false;
|
|
2145
2254
|
};
|
|
2146
2255
|
}, [service]);
|
|
2147
2256
|
const BASE_CHAIN_ID2 = 8453;
|
|
2148
|
-
const evmChainIds =
|
|
2149
|
-
const { catalog } =
|
|
2257
|
+
const evmChainIds = _chunkLBJFACLHcjs.useDepositChainIds.call(void 0, );
|
|
2258
|
+
const { catalog, isLoading: catalogLoading } = _chunkLBJFACLHcjs.useChainCatalog.call(void 0, );
|
|
2150
2259
|
const catalogFor = _react.useCallback.call(void 0,
|
|
2151
2260
|
(chain) => {
|
|
2152
2261
|
if (!catalog) return void 0;
|
|
2153
|
-
const key =
|
|
2262
|
+
const key = _chunkLBJFACLHcjs.catalogKeyForChain.call(void 0, chain);
|
|
2154
2263
|
return typeof key === "number" ? catalog.byChainId.get(key) : catalog.byCaip2.get(key);
|
|
2155
2264
|
},
|
|
2156
2265
|
[catalog]
|
|
2157
2266
|
);
|
|
2158
2267
|
const chainOptions = _react.useMemo.call(void 0, () => {
|
|
2159
|
-
const acceptsDeposits = (chain) => _optionalChain([catalogFor, 'call',
|
|
2268
|
+
const acceptsDeposits = (chain) => _optionalChain([catalogFor, 'call', _75 => _75(chain), 'optionalAccess', _76 => _76.deposit]) !== false;
|
|
2160
2269
|
const options = [...evmChainIds];
|
|
2161
2270
|
const extras = [];
|
|
2162
2271
|
if (hasSolana && acceptsDeposits("solana")) extras.push("solana");
|
|
2163
2272
|
if (acceptsDeposits("hypercore")) extras.push("hypercore");
|
|
2164
2273
|
options.splice(1, 0, ...extras);
|
|
2165
2274
|
return options.filter(
|
|
2166
|
-
(chain) => _optionalChain([topTokens, 'optionalAccess',
|
|
2275
|
+
(chain) => _optionalChain([topTokens, 'optionalAccess', _77 => _77[String(chain)], 'optionalAccess', _78 => _78.length]) !== 0 && computeTokensForChain(chain, topTokens, catalogFor(chain)).length > 0
|
|
2167
2276
|
);
|
|
2168
2277
|
}, [evmChainIds, hasSolana, topTokens, catalogFor]);
|
|
2169
2278
|
const preferredChainId = (options) => options.includes(BASE_CHAIN_ID2) ? BASE_CHAIN_ID2 : _nullishCoalesce(options[0], () => ( BASE_CHAIN_ID2));
|
|
2170
2279
|
const [sourceChainId, setSourceChainId] = _react.useState.call(void 0, () => preferredChainId(chainOptions));
|
|
2280
|
+
const chainChosenByUser = _react.useRef.call(void 0, false);
|
|
2171
2281
|
_react.useEffect.call(void 0, () => {
|
|
2172
|
-
if (chainOptions.length
|
|
2173
|
-
|
|
2174
|
-
|
|
2282
|
+
if (chainOptions.length === 0) return;
|
|
2283
|
+
const stale = chainChosenByUser.current ? !chainOptions.includes(sourceChainId) : sourceChainId !== preferredChainId(chainOptions);
|
|
2284
|
+
if (stale) setSourceChainId(preferredChainId(chainOptions));
|
|
2175
2285
|
}, [chainOptions, sourceChainId]);
|
|
2176
2286
|
const isSolana = sourceChainId === "solana";
|
|
2177
2287
|
const isHyperCore = sourceChainId === "hypercore";
|
|
@@ -2220,7 +2330,7 @@ function DepositAddressStep({
|
|
|
2220
2330
|
service.checkLiquidity({
|
|
2221
2331
|
sourceChainId,
|
|
2222
2332
|
sourceToken: sourceTokenAddress,
|
|
2223
|
-
destinationChainId:
|
|
2333
|
+
destinationChainId: _chunk4R2ZHSDQcjs.targetChainToCaip2.call(void 0, targetChain),
|
|
2224
2334
|
destinationToken: targetToken,
|
|
2225
2335
|
amount: "1"
|
|
2226
2336
|
}).then((result) => {
|
|
@@ -2260,8 +2370,8 @@ function DepositAddressStep({
|
|
|
2260
2370
|
function handlePointerDown(event) {
|
|
2261
2371
|
const target = event.target;
|
|
2262
2372
|
if (!target) return;
|
|
2263
|
-
const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access',
|
|
2264
|
-
const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access',
|
|
2373
|
+
const clickedChainDropdown = _optionalChain([chainDropdownRef, 'access', _79 => _79.current, 'optionalAccess', _80 => _80.contains, 'call', _81 => _81(target)]);
|
|
2374
|
+
const clickedTokenDropdown = _optionalChain([tokenDropdownRef, 'access', _82 => _82.current, 'optionalAccess', _83 => _83.contains, 'call', _84 => _84(target)]);
|
|
2265
2375
|
if (clickedChainDropdown || clickedTokenDropdown) return;
|
|
2266
2376
|
setChainDropdownOpen(false);
|
|
2267
2377
|
setTokenDropdownOpen(false);
|
|
@@ -2274,7 +2384,7 @@ function DepositAddressStep({
|
|
|
2274
2384
|
};
|
|
2275
2385
|
}, [chainDropdownOpen, tokenDropdownOpen]);
|
|
2276
2386
|
const handleCopy = _react.useCallback.call(void 0, async () => {
|
|
2277
|
-
_optionalChain([onCopyAddress, 'optionalCall',
|
|
2387
|
+
_optionalChain([onCopyAddress, 'optionalCall', _85 => _85()]);
|
|
2278
2388
|
try {
|
|
2279
2389
|
await navigator.clipboard.writeText(displayAddress);
|
|
2280
2390
|
setCopied(true);
|
|
@@ -2299,6 +2409,7 @@ function DepositAddressStep({
|
|
|
2299
2409
|
topTokens,
|
|
2300
2410
|
catalogFor(nextChain)
|
|
2301
2411
|
);
|
|
2412
|
+
chainChosenByUser.current = true;
|
|
2302
2413
|
setSourceChainId(nextChain);
|
|
2303
2414
|
setSourceTokenSymbol(pickFallbackToken(nextTokens, sourceTokenSymbol));
|
|
2304
2415
|
setChainDropdownOpen(false);
|
|
@@ -2357,10 +2468,10 @@ function DepositAddressStep({
|
|
|
2357
2468
|
return;
|
|
2358
2469
|
}
|
|
2359
2470
|
const event = status.lastEvent;
|
|
2360
|
-
const eventTxHash =
|
|
2471
|
+
const eventTxHash = _chunk6ZJTZ7DScjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunk6ZJTZ7DScjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
2361
2472
|
if (baselineTxHashRef.current === void 0) {
|
|
2362
2473
|
baselineTxHashRef.current = eventTxHash;
|
|
2363
|
-
} else if (eventTxHash && (!baselineTxHashRef.current || !
|
|
2474
|
+
} else if (eventTxHash && (!baselineTxHashRef.current || !_chunk6ZJTZ7DScjs.txRefsMatch.call(void 0, eventTxHash, baselineTxHashRef.current))) {
|
|
2364
2475
|
const details = getDepositEventDetails(event);
|
|
2365
2476
|
const chainId = _nullishCoalesce(details.chainId, () => ( "unknown"));
|
|
2366
2477
|
const amount = _nullishCoalesce(details.amount, () => ( "0"));
|
|
@@ -2369,7 +2480,7 @@ function DepositAddressStep({
|
|
|
2369
2480
|
baselineTxHashRef.current = eventTxHash;
|
|
2370
2481
|
isTrackingRef.current = true;
|
|
2371
2482
|
const isEvmToken = token ? /^0x[a-fA-F0-9]{40}$/.test(token) : false;
|
|
2372
|
-
const sourceDecimals = _nullishCoalesce(details.sourceDecimals, () => ( (isEvmToken ?
|
|
2483
|
+
const sourceDecimals = _nullishCoalesce(details.sourceDecimals, () => ( (isEvmToken ? _chunk4R2ZHSDQcjs.findTokenDecimals.call(void 0,
|
|
2373
2484
|
token,
|
|
2374
2485
|
typeof chainId === "number" ? chainId : void 0
|
|
2375
2486
|
) : void 0)));
|
|
@@ -2392,7 +2503,7 @@ function DepositAddressStep({
|
|
|
2392
2503
|
directTransfer
|
|
2393
2504
|
};
|
|
2394
2505
|
setNotifications((prev) => [notification, ...prev]);
|
|
2395
|
-
_optionalChain([onDepositSubmittedRef, 'access',
|
|
2506
|
+
_optionalChain([onDepositSubmittedRef, 'access', _86 => _86.current, 'optionalCall', _87 => _87({
|
|
2396
2507
|
txHash: eventTxHash,
|
|
2397
2508
|
sourceChain: chainId,
|
|
2398
2509
|
amount,
|
|
@@ -2404,7 +2515,7 @@ function DepositAddressStep({
|
|
|
2404
2515
|
if (!cancelled) {
|
|
2405
2516
|
const msg = err instanceof Error ? err.message : "Failed to check status";
|
|
2406
2517
|
setPollingError(msg);
|
|
2407
|
-
_optionalChain([onErrorRef, 'access',
|
|
2518
|
+
_optionalChain([onErrorRef, 'access', _88 => _88.current, 'optionalCall', _89 => _89(msg, "STATUS_POLL_ERROR")]);
|
|
2408
2519
|
}
|
|
2409
2520
|
}
|
|
2410
2521
|
if (!cancelled) {
|
|
@@ -2420,24 +2531,31 @@ function DepositAddressStep({
|
|
|
2420
2531
|
const handleNotificationComplete = _react.useCallback.call(void 0,
|
|
2421
2532
|
(txHash, destinationTxHash, context) => {
|
|
2422
2533
|
isTrackingRef.current = false;
|
|
2423
|
-
_optionalChain([onDepositCompleteRef, 'access',
|
|
2534
|
+
_optionalChain([onDepositCompleteRef, 'access', _90 => _90.current, 'optionalCall', _91 => _91(txHash, destinationTxHash, context)]);
|
|
2424
2535
|
},
|
|
2425
2536
|
[]
|
|
2426
2537
|
);
|
|
2427
2538
|
const handleNotificationFailed = _react.useCallback.call(void 0,
|
|
2428
2539
|
(txHash, error) => {
|
|
2429
2540
|
isTrackingRef.current = false;
|
|
2430
|
-
_optionalChain([onDepositFailedRef, 'access',
|
|
2541
|
+
_optionalChain([onDepositFailedRef, 'access', _92 => _92.current, 'optionalCall', _93 => _93(txHash, error)]);
|
|
2431
2542
|
},
|
|
2432
2543
|
[]
|
|
2433
2544
|
);
|
|
2434
2545
|
const handleNotificationDismiss = _react.useCallback.call(void 0, (id) => {
|
|
2435
2546
|
setNotifications((prev) => prev.filter((n) => n.id !== id));
|
|
2436
2547
|
}, []);
|
|
2437
|
-
const qrIconSrc = _nullishCoalesce(_optionalChain([catalogFor, 'call',
|
|
2548
|
+
const qrIconSrc = _nullishCoalesce(_optionalChain([catalogFor, 'call', _94 => _94(sourceChainId), 'optionalAccess', _95 => _95.iconUrl]), () => ( _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, sourceChainId)));
|
|
2549
|
+
if (chainOptions.length === 0) {
|
|
2550
|
+
if (catalogLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositAddressSkeleton, { uiConfig });
|
|
2551
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-screen", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2552
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2553
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: "Supported chains are unavailable right now, so there is no deposit address to show. Close and try again in a moment." })
|
|
2554
|
+
] }) });
|
|
2555
|
+
}
|
|
2438
2556
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-step--with-notifications", children: [
|
|
2439
2557
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
2440
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2558
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
2441
2559
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", children: [
|
|
2442
2560
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", ref: chainDropdownRef, children: [
|
|
2443
2561
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
@@ -2453,14 +2571,14 @@ function DepositAddressStep({
|
|
|
2453
2571
|
},
|
|
2454
2572
|
children: [
|
|
2455
2573
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2456
|
-
|
|
2574
|
+
_chunkLBJFACLHcjs.CdnIcon,
|
|
2457
2575
|
{
|
|
2458
|
-
src: _nullishCoalesce(_optionalChain([catalogFor, 'call',
|
|
2576
|
+
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _96 => _96(sourceChainId), 'optionalAccess', _97 => _97.iconUrl]), () => ( _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, sourceChainId))),
|
|
2459
2577
|
className: "rs-deposit-address-dropdown-icon"
|
|
2460
2578
|
}
|
|
2461
2579
|
),
|
|
2462
2580
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainLabel(sourceChainId, catalogFor(sourceChainId)) }),
|
|
2463
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2581
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2464
2582
|
]
|
|
2465
2583
|
}
|
|
2466
2584
|
),
|
|
@@ -2472,9 +2590,9 @@ function DepositAddressStep({
|
|
|
2472
2590
|
onClick: () => handleSelectChain(chainId),
|
|
2473
2591
|
children: [
|
|
2474
2592
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2475
|
-
|
|
2593
|
+
_chunkLBJFACLHcjs.CdnIcon,
|
|
2476
2594
|
{
|
|
2477
|
-
src: _nullishCoalesce(_optionalChain([catalogFor, 'call',
|
|
2595
|
+
src: _nullishCoalesce(_optionalChain([catalogFor, 'call', _98 => _98(chainId), 'optionalAccess', _99 => _99.iconUrl]), () => ( _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, chainId))),
|
|
2478
2596
|
className: "rs-deposit-address-dropdown-icon"
|
|
2479
2597
|
}
|
|
2480
2598
|
),
|
|
@@ -2489,9 +2607,9 @@ function DepositAddressStep({
|
|
|
2489
2607
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
|
|
2490
2608
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
2491
2609
|
"Min.$",
|
|
2492
|
-
(
|
|
2493
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2494
|
-
|
|
2610
|
+
(_chunk4R2ZHSDQcjs.isHyperCoreDestination.call(void 0, targetChain) || isHyperCore ? Math.max(_chunk4R2ZHSDQcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _100 => _100.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _101 => _101.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
2611
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6ZJTZ7DScjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2612
|
+
_chunkLBJFACLHcjs.InfoIcon,
|
|
2495
2613
|
{
|
|
2496
2614
|
className: "rs-deposit-address-min-icon",
|
|
2497
2615
|
"aria-hidden": "true"
|
|
@@ -2512,7 +2630,7 @@ function DepositAddressStep({
|
|
|
2512
2630
|
children: [
|
|
2513
2631
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TokenGlyph, { symbol: sourceTokenSymbol }),
|
|
2514
2632
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceTokenSymbol }),
|
|
2515
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2633
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
2516
2634
|
]
|
|
2517
2635
|
}
|
|
2518
2636
|
),
|
|
@@ -2556,7 +2674,7 @@ function DepositAddressStep({
|
|
|
2556
2674
|
className: "rs-deposit-address-copy",
|
|
2557
2675
|
onClick: handleCopy,
|
|
2558
2676
|
children: [
|
|
2559
|
-
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2677
|
+
copied ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CheckIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CopyIcon, {}),
|
|
2560
2678
|
copied ? "Copied!" : "Copy address"
|
|
2561
2679
|
]
|
|
2562
2680
|
}
|
|
@@ -2581,16 +2699,16 @@ function DepositAddressStep({
|
|
|
2581
2699
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
2582
2700
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
2583
2701
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2584
|
-
|
|
2702
|
+
_chunk6ZJTZ7DScjs.Tooltip,
|
|
2585
2703
|
{
|
|
2586
2704
|
className: "rs-price-impact-info",
|
|
2587
2705
|
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
2588
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2706
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.InfoIcon, { "aria-hidden": "true" })
|
|
2589
2707
|
}
|
|
2590
2708
|
)
|
|
2591
2709
|
] }),
|
|
2592
2710
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2593
|
-
|
|
2711
|
+
_chunkLBJFACLHcjs.ChevronDownIcon,
|
|
2594
2712
|
{
|
|
2595
2713
|
className: "rs-price-impact-chevron",
|
|
2596
2714
|
"aria-hidden": "true"
|
|
@@ -2601,29 +2719,29 @@ function DepositAddressStep({
|
|
|
2601
2719
|
),
|
|
2602
2720
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-price-impact-panel", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-panel-inner", children: [
|
|
2603
2721
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
2604
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PercentIcon, {}) }),
|
|
2605
2723
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
2606
2724
|
"Max slippage: ",
|
|
2607
2725
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.2%" })
|
|
2608
2726
|
] }),
|
|
2609
2727
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2610
|
-
|
|
2728
|
+
_chunk6ZJTZ7DScjs.Tooltip,
|
|
2611
2729
|
{
|
|
2612
2730
|
className: "rs-price-impact-info",
|
|
2613
2731
|
content: "Slippage accounts for price changes during execution. Slippage is adjusted per pair to ensure reliable execution.",
|
|
2614
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2732
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.InfoIcon, { "aria-hidden": "true" })
|
|
2615
2733
|
}
|
|
2616
2734
|
)
|
|
2617
2735
|
] }),
|
|
2618
2736
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
2619
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2737
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ClockIcon, {}) }),
|
|
2620
2738
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
2621
2739
|
"Processing time: ",
|
|
2622
2740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "< 1 min" })
|
|
2623
2741
|
] })
|
|
2624
2742
|
] }),
|
|
2625
2743
|
liquidityHelper.kind !== "idle" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-row", children: [
|
|
2626
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2744
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-row-icon", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PlusCircleIcon, {}) }),
|
|
2627
2745
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-label", children: [
|
|
2628
2746
|
"Max deposit:",
|
|
2629
2747
|
" ",
|
|
@@ -2654,7 +2772,7 @@ function DepositAddressStep({
|
|
|
2654
2772
|
},
|
|
2655
2773
|
deposit.id
|
|
2656
2774
|
)) }),
|
|
2657
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2775
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
2658
2776
|
] });
|
|
2659
2777
|
}
|
|
2660
2778
|
DepositAddressStep.displayName = "DepositAddressStep";
|
|
@@ -2702,7 +2820,7 @@ function FinalisingDepositStep() {
|
|
|
2702
2820
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "rs-finalising-subtitle", children: "We are depositing your funds to the application." })
|
|
2703
2821
|
] })
|
|
2704
2822
|
] }),
|
|
2705
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2823
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
2706
2824
|
] });
|
|
2707
2825
|
}
|
|
2708
2826
|
FinalisingDepositStep.displayName = "FinalisingDepositStep";
|
|
@@ -2732,7 +2850,7 @@ function SwappedOrderTracker({
|
|
|
2732
2850
|
];
|
|
2733
2851
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-swapped-tracker", children: [
|
|
2734
2852
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
2735
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2853
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.HandCoinsIcon, {}), title }),
|
|
2736
2854
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ol", { className: "rs-swapped-tracker-steps", children: labels.map((label, idx) => {
|
|
2737
2855
|
const status = stepStates[idx];
|
|
2738
2856
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -2746,7 +2864,7 @@ function SwappedOrderTracker({
|
|
|
2746
2864
|
{
|
|
2747
2865
|
className: "rs-swapped-tracker-step-marker",
|
|
2748
2866
|
"aria-hidden": "true",
|
|
2749
|
-
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2867
|
+
children: status === "complete" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CheckIcon, {}) : status === "failed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CloseIcon, {}) : status === "active" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2750
2868
|
"svg",
|
|
2751
2869
|
{
|
|
2752
2870
|
className: "rs-swapped-tracker-step-ring",
|
|
@@ -2781,7 +2899,7 @@ function SwappedOrderTracker({
|
|
|
2781
2899
|
}
|
|
2782
2900
|
)
|
|
2783
2901
|
] }),
|
|
2784
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2902
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
2785
2903
|
] });
|
|
2786
2904
|
}
|
|
2787
2905
|
function formatTrackerAmount(amount) {
|
|
@@ -2933,7 +3051,7 @@ function SwappedIframeStep({
|
|
|
2933
3051
|
if (cancelled) return;
|
|
2934
3052
|
const message = err instanceof Error ? err.message : loadErrorFallback;
|
|
2935
3053
|
setLoadError(message);
|
|
2936
|
-
_optionalChain([onErrorRef, 'access',
|
|
3054
|
+
_optionalChain([onErrorRef, 'access', _102 => _102.current, 'optionalCall', _103 => _103(message, loadErrorCode)]);
|
|
2937
3055
|
});
|
|
2938
3056
|
return () => {
|
|
2939
3057
|
cancelled = true;
|
|
@@ -2986,10 +3104,10 @@ function SwappedIframeStep({
|
|
|
2986
3104
|
const status = await service.fetchLatestStatus(smartAccount);
|
|
2987
3105
|
if (cancelled) return;
|
|
2988
3106
|
const event = status.lastEvent;
|
|
2989
|
-
const eventTxHash =
|
|
3107
|
+
const eventTxHash = _chunk6ZJTZ7DScjs.isDepositEvent.call(void 0, event) ? _nullishCoalesce(_chunk6ZJTZ7DScjs.getEventTxHash.call(void 0, event), () => ( null)) : null;
|
|
2990
3108
|
if (baselineDepositTxHashRef.current === void 0) {
|
|
2991
3109
|
baselineDepositTxHashRef.current = eventTxHash;
|
|
2992
|
-
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !
|
|
3110
|
+
} else if (eventTxHash && (!baselineDepositTxHashRef.current || !_chunk6ZJTZ7DScjs.txRefsMatch.call(void 0, eventTxHash, baselineDepositTxHashRef.current))) {
|
|
2993
3111
|
currentDepositTxHashRef.current = eventTxHash;
|
|
2994
3112
|
setLatestEvent(_nullishCoalesce(event, () => ( null)));
|
|
2995
3113
|
}
|
|
@@ -3014,15 +3132,15 @@ function SwappedIframeStep({
|
|
|
3014
3132
|
}, [service, smartAccount]);
|
|
3015
3133
|
_react.useEffect.call(void 0, () => {
|
|
3016
3134
|
if (fastDepositPollEnabledRef.current) return;
|
|
3017
|
-
const status = _optionalChain([orderState, 'optionalAccess',
|
|
3135
|
+
const status = _optionalChain([orderState, 'optionalAccess', _104 => _104.status]);
|
|
3018
3136
|
if (!status || !SWAPPED_TERMINAL_STATUSES.has(status)) return;
|
|
3019
3137
|
fastDepositPollEnabledRef.current = true;
|
|
3020
|
-
_optionalChain([rescheduleDepositPollRef, 'access',
|
|
3138
|
+
_optionalChain([rescheduleDepositPollRef, 'access', _105 => _105.current, 'optionalCall', _106 => _106(DEPOSIT_POLL_FAST_INITIAL_DELAY_MS)]);
|
|
3021
3139
|
}, [orderState]);
|
|
3022
3140
|
_react.useEffect.call(void 0, () => {
|
|
3023
3141
|
function onMessage(e) {
|
|
3024
3142
|
if (!SWAPPED_IFRAME_ORIGINS.has(e.origin)) return;
|
|
3025
|
-
if (e.source !== _optionalChain([iframeRef, 'access',
|
|
3143
|
+
if (e.source !== _optionalChain([iframeRef, 'access', _107 => _107.current, 'optionalAccess', _108 => _108.contentWindow])) return;
|
|
3026
3144
|
if (isSwappedGoBackMessage(e.data)) {
|
|
3027
3145
|
onGoBackRef.current();
|
|
3028
3146
|
return;
|
|
@@ -3037,16 +3155,16 @@ function SwappedIframeStep({
|
|
|
3037
3155
|
setOrderState((prev) => ({
|
|
3038
3156
|
// Normalise to the uuid the backend poll also keys on, so orderState
|
|
3039
3157
|
// is consistent regardless of which path set it.
|
|
3040
|
-
orderId: _nullishCoalesce(_nullishCoalesce(expectedOrderUuidRef.current, () => ( _optionalChain([prev, 'optionalAccess',
|
|
3158
|
+
orderId: _nullishCoalesce(_nullishCoalesce(expectedOrderUuidRef.current, () => ( _optionalChain([prev, 'optionalAccess', _109 => _109.orderId]))), () => ( ext)),
|
|
3041
3159
|
status: parsed.status,
|
|
3042
|
-
orderCrypto: _nullishCoalesce(_nullishCoalesce(parsed.orderCrypto, () => ( _optionalChain([prev, 'optionalAccess',
|
|
3043
|
-
orderCryptoAmount: _nullishCoalesce(_nullishCoalesce(parsed.orderCryptoAmount, () => ( _optionalChain([prev, 'optionalAccess',
|
|
3044
|
-
transactionId: _nullishCoalesce(_nullishCoalesce(parsed.transactionId, () => ( _optionalChain([prev, 'optionalAccess',
|
|
3160
|
+
orderCrypto: _nullishCoalesce(_nullishCoalesce(parsed.orderCrypto, () => ( _optionalChain([prev, 'optionalAccess', _110 => _110.orderCrypto]))), () => ( null)),
|
|
3161
|
+
orderCryptoAmount: _nullishCoalesce(_nullishCoalesce(parsed.orderCryptoAmount, () => ( _optionalChain([prev, 'optionalAccess', _111 => _111.orderCryptoAmount]))), () => ( null)),
|
|
3162
|
+
transactionId: _nullishCoalesce(_nullishCoalesce(parsed.transactionId, () => ( _optionalChain([prev, 'optionalAccess', _112 => _112.transactionId]))), () => ( null)),
|
|
3045
3163
|
receivedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3046
|
-
paidAmountUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess',
|
|
3047
|
-
paidAmountEur: _nullishCoalesce(_optionalChain([prev, 'optionalAccess',
|
|
3048
|
-
onrampFeeUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess',
|
|
3049
|
-
paymentMethod: _nullishCoalesce(_optionalChain([prev, 'optionalAccess',
|
|
3164
|
+
paidAmountUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _113 => _113.paidAmountUsd]), () => ( null)),
|
|
3165
|
+
paidAmountEur: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _114 => _114.paidAmountEur]), () => ( null)),
|
|
3166
|
+
onrampFeeUsd: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _115 => _115.onrampFeeUsd]), () => ( null)),
|
|
3167
|
+
paymentMethod: _nullishCoalesce(_optionalChain([prev, 'optionalAccess', _116 => _116.paymentMethod]), () => ( null))
|
|
3050
3168
|
}));
|
|
3051
3169
|
}
|
|
3052
3170
|
window.addEventListener("message", onMessage);
|
|
@@ -3059,17 +3177,17 @@ function SwappedIframeStep({
|
|
|
3059
3177
|
}
|
|
3060
3178
|
}, [phase, orderState, latestEvent, variant]);
|
|
3061
3179
|
const stepStates = _react.useMemo.call(void 0,
|
|
3062
|
-
() => deriveStepStates(_nullishCoalesce(_optionalChain([orderState, 'optionalAccess',
|
|
3180
|
+
() => deriveStepStates(_nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _117 => _117.status]), () => ( null)), latestEvent),
|
|
3063
3181
|
[orderState, latestEvent]
|
|
3064
3182
|
);
|
|
3065
3183
|
const terminalState = _react.useMemo.call(void 0, () => {
|
|
3066
|
-
if (
|
|
3184
|
+
if (_chunk6ZJTZ7DScjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
3067
3185
|
return {
|
|
3068
3186
|
kind: "failed",
|
|
3069
|
-
message:
|
|
3187
|
+
message: _chunk6ZJTZ7DScjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
3070
3188
|
};
|
|
3071
3189
|
}
|
|
3072
|
-
if (_optionalChain([orderState, 'optionalAccess',
|
|
3190
|
+
if (_optionalChain([orderState, 'optionalAccess', _118 => _118.status]) === "order_cancelled") {
|
|
3073
3191
|
const banner = bannerForStatus("order_cancelled", {});
|
|
3074
3192
|
return { kind: "cancelled", message: _nullishCoalesce(banner.detail, () => ( banner.title)) };
|
|
3075
3193
|
}
|
|
@@ -3077,7 +3195,7 @@ function SwappedIframeStep({
|
|
|
3077
3195
|
}, [latestEvent, orderState, bannerForStatus]);
|
|
3078
3196
|
_react.useEffect.call(void 0, () => {
|
|
3079
3197
|
if (completeFiredRef.current || failedFiredRef.current) return;
|
|
3080
|
-
const t = _optionalChain([latestEvent, 'optionalAccess',
|
|
3198
|
+
const t = _optionalChain([latestEvent, 'optionalAccess', _119 => _119.type]);
|
|
3081
3199
|
const isSuccess = t === "bridge-complete";
|
|
3082
3200
|
if (!isSuccess) return;
|
|
3083
3201
|
const txHash = currentDepositTxHashRef.current;
|
|
@@ -3086,10 +3204,10 @@ function SwappedIframeStep({
|
|
|
3086
3204
|
const info = {
|
|
3087
3205
|
smartAccount,
|
|
3088
3206
|
txHash,
|
|
3089
|
-
orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess',
|
|
3207
|
+
orderCrypto: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _120 => _120.orderCrypto]), () => ( null)),
|
|
3090
3208
|
// Base-unit source amount from the deposit row/event, consistent with the
|
|
3091
3209
|
// wallet/QR path. ProcessingStep + onLifecycle expect base units.
|
|
3092
|
-
amount: _nullishCoalesce(
|
|
3210
|
+
amount: _nullishCoalesce(_chunk6ZJTZ7DScjs.getEventSourceDetails.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0))).amount, () => ( null)),
|
|
3093
3211
|
expectedOrderUuid: expectedOrderUuidRef.current,
|
|
3094
3212
|
initialEvent: _nullishCoalesce(latestEvent, () => ( void 0))
|
|
3095
3213
|
};
|
|
@@ -3100,21 +3218,21 @@ function SwappedIframeStep({
|
|
|
3100
3218
|
}, [latestEvent, orderState, smartAccount]);
|
|
3101
3219
|
_react.useEffect.call(void 0, () => {
|
|
3102
3220
|
if (failedFiredRef.current || completeFiredRef.current) return;
|
|
3103
|
-
if (!
|
|
3221
|
+
if (!_chunk6ZJTZ7DScjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) return;
|
|
3104
3222
|
const txHash = currentDepositTxHashRef.current;
|
|
3105
3223
|
if (!txHash) return;
|
|
3106
3224
|
failedFiredRef.current = true;
|
|
3107
3225
|
setPhase("tracker");
|
|
3108
|
-
_optionalChain([onSwappedFailedRef, 'access',
|
|
3226
|
+
_optionalChain([onSwappedFailedRef, 'access', _121 => _121.current, 'optionalCall', _122 => _122(
|
|
3109
3227
|
txHash,
|
|
3110
|
-
|
|
3228
|
+
_chunk6ZJTZ7DScjs.failureMessageForEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))
|
|
3111
3229
|
)]);
|
|
3112
3230
|
}, [latestEvent]);
|
|
3113
3231
|
const immersive = variant === "fiat" && phase === "iframe" && !loadError;
|
|
3114
3232
|
_react.useEffect.call(void 0, () => {
|
|
3115
|
-
_optionalChain([onImmersiveChangeRef, 'access',
|
|
3233
|
+
_optionalChain([onImmersiveChangeRef, 'access', _123 => _123.current, 'optionalCall', _124 => _124(immersive)]);
|
|
3116
3234
|
}, [immersive]);
|
|
3117
|
-
_react.useEffect.call(void 0, () => () => _optionalChain([onImmersiveChangeRef, 'access',
|
|
3235
|
+
_react.useEffect.call(void 0, () => () => _optionalChain([onImmersiveChangeRef, 'access', _125 => _125.current, 'optionalCall', _126 => _126(false)]), []);
|
|
3118
3236
|
const handleRetry = () => {
|
|
3119
3237
|
setIframeSrc(null);
|
|
3120
3238
|
setWidgetUrl(null);
|
|
@@ -3130,8 +3248,8 @@ function SwappedIframeStep({
|
|
|
3130
3248
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3131
3249
|
SwappedOrderTracker,
|
|
3132
3250
|
{
|
|
3133
|
-
amount: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess',
|
|
3134
|
-
currency: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess',
|
|
3251
|
+
amount: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _127 => _127.orderCryptoAmount]), () => ( null)),
|
|
3252
|
+
currency: _nullishCoalesce(_optionalChain([orderState, 'optionalAccess', _128 => _128.orderCrypto]), () => ( "USDC")),
|
|
3135
3253
|
stepStates,
|
|
3136
3254
|
terminal: terminalState,
|
|
3137
3255
|
onRetry: handleRetry,
|
|
@@ -3153,7 +3271,7 @@ function SwappedIframeStep({
|
|
|
3153
3271
|
}
|
|
3154
3272
|
)
|
|
3155
3273
|
] }),
|
|
3156
|
-
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3274
|
+
!loadError && !iframeLoaded && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-fiat-onramp-loading", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, {}) }),
|
|
3157
3275
|
widgetUrl && !loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3158
3276
|
"iframe",
|
|
3159
3277
|
{
|
|
@@ -3165,7 +3283,7 @@ function SwappedIframeStep({
|
|
|
3165
3283
|
allow: "payment; camera; microphone; clipboard-write; geolocation",
|
|
3166
3284
|
onLoad: () => {
|
|
3167
3285
|
try {
|
|
3168
|
-
if (_optionalChain([iframeRef, 'access',
|
|
3286
|
+
if (_optionalChain([iframeRef, 'access', _129 => _129.current, 'optionalAccess', _130 => _130.contentWindow, 'optionalAccess', _131 => _131.location, 'optionalAccess', _132 => _132.href]) === "about:blank") {
|
|
3169
3287
|
return;
|
|
3170
3288
|
}
|
|
3171
3289
|
} catch (e19) {
|
|
@@ -3176,11 +3294,11 @@ function SwappedIframeStep({
|
|
|
3176
3294
|
retryToken
|
|
3177
3295
|
)
|
|
3178
3296
|
] }) }),
|
|
3179
|
-
loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3297
|
+
loadError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
3180
3298
|
] });
|
|
3181
3299
|
}
|
|
3182
3300
|
function deriveStepStates(swappedStatus, latestEvent) {
|
|
3183
|
-
if (
|
|
3301
|
+
if (_chunk6ZJTZ7DScjs.isFailedEvent.call(void 0, _nullishCoalesce(latestEvent, () => ( void 0)))) {
|
|
3184
3302
|
return ["complete", "complete", "failed", "pending"];
|
|
3185
3303
|
}
|
|
3186
3304
|
if (swappedStatus === "order_cancelled") {
|
|
@@ -3188,7 +3306,7 @@ function deriveStepStates(swappedStatus, latestEvent) {
|
|
|
3188
3306
|
}
|
|
3189
3307
|
const step1Complete = swappedStatus === "order_completed" || swappedStatus === "order_broadcasted";
|
|
3190
3308
|
const step2Complete = latestEvent !== null || swappedStatus === "order_broadcasted";
|
|
3191
|
-
const step3Complete = _optionalChain([latestEvent, 'optionalAccess',
|
|
3309
|
+
const step3Complete = _optionalChain([latestEvent, 'optionalAccess', _133 => _133.type]) === "bridge-complete";
|
|
3192
3310
|
if (step3Complete) {
|
|
3193
3311
|
return ["complete", "complete", "complete", "complete"];
|
|
3194
3312
|
}
|
|
@@ -3244,7 +3362,7 @@ function FiatOnrampStep({
|
|
|
3244
3362
|
onImmersiveChange
|
|
3245
3363
|
}) {
|
|
3246
3364
|
const loadUrl = _react.useCallback.call(void 0, async () => {
|
|
3247
|
-
const prefetched = _optionalChain([consumePrefetchedUrl, 'optionalCall',
|
|
3365
|
+
const prefetched = _optionalChain([consumePrefetchedUrl, 'optionalCall', _134 => _134(
|
|
3248
3366
|
smartAccount,
|
|
3249
3367
|
paymentMethod,
|
|
3250
3368
|
methodSelectionSource
|
|
@@ -3370,7 +3488,7 @@ ExchangeConnectStep.displayName = "ExchangeConnectStep";
|
|
|
3370
3488
|
function ExchangeLogo({ exchange }) {
|
|
3371
3489
|
const [failed, setFailed] = _react.useState.call(void 0, false);
|
|
3372
3490
|
if (!exchange.logoUrl || failed) {
|
|
3373
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3491
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BankIcon, {});
|
|
3374
3492
|
}
|
|
3375
3493
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3376
3494
|
"img",
|
|
@@ -3415,7 +3533,7 @@ function ExchangeSelectStep({
|
|
|
3415
3533
|
setExchanges([]);
|
|
3416
3534
|
setExchangeFeeBps(0);
|
|
3417
3535
|
setError(message);
|
|
3418
|
-
_optionalChain([onError, 'optionalCall',
|
|
3536
|
+
_optionalChain([onError, 'optionalCall', _135 => _135(message, "SWAPPED_CONNECT_EXCHANGES_FAILED")]);
|
|
3419
3537
|
}).finally(() => {
|
|
3420
3538
|
if (!cancelled) setLoading(false);
|
|
3421
3539
|
});
|
|
@@ -3441,7 +3559,7 @@ function ExchangeSelectStep({
|
|
|
3441
3559
|
} catch (err) {
|
|
3442
3560
|
const message = err instanceof Error ? err.message : "Failed to prepare Connect";
|
|
3443
3561
|
setSelectionNotice(message);
|
|
3444
|
-
_optionalChain([onError, 'optionalCall',
|
|
3562
|
+
_optionalChain([onError, 'optionalCall', _136 => _136(message, "SWAPPED_CONNECT_URL_FAILED")]);
|
|
3445
3563
|
} finally {
|
|
3446
3564
|
setSelectingConnection(null);
|
|
3447
3565
|
}
|
|
@@ -3451,14 +3569,14 @@ function ExchangeSelectStep({
|
|
|
3451
3569
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen rs-exchange-select", children: [
|
|
3452
3570
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
3453
3571
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3454
|
-
|
|
3572
|
+
_chunkLBJFACLHcjs.BodyHeader,
|
|
3455
3573
|
{
|
|
3456
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3574
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.UnplugIcon, {}),
|
|
3457
3575
|
title: "Connect exchange",
|
|
3458
3576
|
subtitle: "Select an exchange to connect"
|
|
3459
3577
|
}
|
|
3460
3578
|
),
|
|
3461
|
-
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3579
|
+
loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, {}) }),
|
|
3462
3580
|
!loading && error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-exchange-select-state", "aria-live": "polite", children: [
|
|
3463
3581
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-select-state-title", children: "Couldn\u2019t load exchanges" }),
|
|
3464
3582
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -3484,7 +3602,7 @@ function ExchangeSelectStep({
|
|
|
3484
3602
|
)
|
|
3485
3603
|
] }),
|
|
3486
3604
|
!loading && !error && exchanges.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-exchange-grid", children: exchanges.map((exchange) => {
|
|
3487
|
-
const brand =
|
|
3605
|
+
const brand = _chunk6ZJTZ7DScjs.getExchangeLogo.call(void 0, exchange.name, exchange.connection);
|
|
3488
3606
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3489
3607
|
"button",
|
|
3490
3608
|
{
|
|
@@ -3509,7 +3627,7 @@ function ExchangeSelectStep({
|
|
|
3509
3627
|
);
|
|
3510
3628
|
}) })
|
|
3511
3629
|
] }),
|
|
3512
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3630
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {}),
|
|
3513
3631
|
exchangeFeeBps > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "rs-exchange-select-fee-note", children: [
|
|
3514
3632
|
"A ",
|
|
3515
3633
|
formatFeeRate(exchangeFeeBps),
|
|
@@ -3520,117 +3638,6 @@ function ExchangeSelectStep({
|
|
|
3520
3638
|
}
|
|
3521
3639
|
ExchangeSelectStep.displayName = "ExchangeSelectStep";
|
|
3522
3640
|
|
|
3523
|
-
// src/components/steps/DepositAddressSkeleton.tsx
|
|
3524
|
-
|
|
3525
|
-
var BASE_CHAIN_ID = 8453;
|
|
3526
|
-
function DepositAddressSkeleton({
|
|
3527
|
-
uiConfig
|
|
3528
|
-
}) {
|
|
3529
|
-
const evmChainIds = _chunkTENL4H64cjs.getSupportedChainIds.call(void 0, );
|
|
3530
|
-
const defaultChainId = evmChainIds.includes(BASE_CHAIN_ID) ? BASE_CHAIN_ID : evmChainIds[0];
|
|
3531
|
-
const tokensForChain = _chunkTENL4H64cjs.getTargetTokenSymbolsForChain.call(void 0, defaultChainId);
|
|
3532
|
-
const defaultToken = tokensForChain.includes("USDC") ? "USDC" : _nullishCoalesce(tokensForChain[0], () => ( "USDC"));
|
|
3533
|
-
const chainName = _chunkTENL4H64cjs.getChainName.call(void 0, defaultChainId);
|
|
3534
|
-
const chainIcon = _chunkTENL4H64cjs.getChainIcon.call(void 0, defaultChainId);
|
|
3535
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", "aria-busy": "true", children: [
|
|
3536
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: "Preparing deposit details\u2026" }),
|
|
3537
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
3538
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.TransferCryptoIcon, {}), title: "Transfer crypto" }),
|
|
3539
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-selectors", "aria-hidden": "true", children: [
|
|
3540
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
3541
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-dropdown-label", children: "Supported chain" }),
|
|
3542
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3543
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3544
|
-
_chunkNPSC5R22cjs.CdnIcon,
|
|
3545
|
-
{
|
|
3546
|
-
src: chainIcon,
|
|
3547
|
-
className: "rs-deposit-address-dropdown-icon"
|
|
3548
|
-
}
|
|
3549
|
-
),
|
|
3550
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: chainName }),
|
|
3551
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3552
|
-
] })
|
|
3553
|
-
] }),
|
|
3554
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown", children: [
|
|
3555
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-label rs-deposit-address-dropdown-label--with-min", children: [
|
|
3556
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Supported token" }),
|
|
3557
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-deposit-address-min", children: [
|
|
3558
|
-
"Min.$",
|
|
3559
|
-
(_nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _136 => _136.minDepositUsd]), () => ( 0.1))).toFixed(2),
|
|
3560
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHCQWFL3Acjs.Tooltip, { content: "Minimum deposit amount required for the selected chain.", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3561
|
-
_chunkNPSC5R22cjs.InfoIcon,
|
|
3562
|
-
{
|
|
3563
|
-
className: "rs-deposit-address-min-icon",
|
|
3564
|
-
"aria-hidden": "true"
|
|
3565
|
-
}
|
|
3566
|
-
) })
|
|
3567
|
-
] })
|
|
3568
|
-
] }),
|
|
3569
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-dropdown-trigger", children: [
|
|
3570
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3571
|
-
_chunkNPSC5R22cjs.TokenIcon,
|
|
3572
|
-
{
|
|
3573
|
-
symbol: defaultToken,
|
|
3574
|
-
className: "rs-deposit-address-dropdown-icon"
|
|
3575
|
-
}
|
|
3576
|
-
),
|
|
3577
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: defaultToken }),
|
|
3578
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.ChevronDownIcon, { className: "rs-deposit-address-dropdown-chevron" })
|
|
3579
|
-
] })
|
|
3580
|
-
] })
|
|
3581
|
-
] }),
|
|
3582
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3583
|
-
"div",
|
|
3584
|
-
{
|
|
3585
|
-
style: { display: "flex", flexDirection: "column", gap: 4, width: "100%" },
|
|
3586
|
-
children: [
|
|
3587
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-deposit-address-well", children: [
|
|
3588
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-deposit-address-qr", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-skeleton rs-skeleton-qr", "aria-hidden": "true" }) }),
|
|
3589
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-skeleton rs-skeleton-address", "aria-hidden": "true" })
|
|
3590
|
-
] }),
|
|
3591
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3592
|
-
"button",
|
|
3593
|
-
{
|
|
3594
|
-
type: "button",
|
|
3595
|
-
className: "rs-deposit-address-copy",
|
|
3596
|
-
disabled: true,
|
|
3597
|
-
"aria-hidden": "true",
|
|
3598
|
-
children: [
|
|
3599
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.CopyIcon, {}),
|
|
3600
|
-
"Copy address"
|
|
3601
|
-
]
|
|
3602
|
-
}
|
|
3603
|
-
)
|
|
3604
|
-
]
|
|
3605
|
-
}
|
|
3606
|
-
),
|
|
3607
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-price-impact", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-price-impact-header", children: [
|
|
3608
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-price-impact-header-left", children: [
|
|
3609
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: "Price impact" }),
|
|
3610
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-price-impact-label", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: "0.00%" }) }),
|
|
3611
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3612
|
-
_chunkHCQWFL3Acjs.Tooltip,
|
|
3613
|
-
{
|
|
3614
|
-
className: "rs-price-impact-info",
|
|
3615
|
-
content: "Price impact is the difference between expected and execution price, due to trade size and liquidity.",
|
|
3616
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.InfoIcon, { "aria-hidden": "true" })
|
|
3617
|
-
}
|
|
3618
|
-
)
|
|
3619
|
-
] }),
|
|
3620
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3621
|
-
_chunkNPSC5R22cjs.ChevronDownIcon,
|
|
3622
|
-
{
|
|
3623
|
-
className: "rs-price-impact-chevron",
|
|
3624
|
-
"aria-hidden": "true"
|
|
3625
|
-
}
|
|
3626
|
-
)
|
|
3627
|
-
] }) })
|
|
3628
|
-
] }),
|
|
3629
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkNPSC5R22cjs.PoweredBy, {})
|
|
3630
|
-
] });
|
|
3631
|
-
}
|
|
3632
|
-
DepositAddressSkeleton.displayName = "DepositAddressSkeleton";
|
|
3633
|
-
|
|
3634
3641
|
// src/components/steps/SolanaTokenSelectStep.tsx
|
|
3635
3642
|
|
|
3636
3643
|
|
|
@@ -3658,14 +3665,14 @@ function SolanaTokenSelectStep({
|
|
|
3658
3665
|
setError(null);
|
|
3659
3666
|
const portfolioBySymbol = {};
|
|
3660
3667
|
try {
|
|
3661
|
-
|
|
3668
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:request", {
|
|
3662
3669
|
solanaAddress
|
|
3663
3670
|
});
|
|
3664
3671
|
const portfolio = await service.fetchSolanaPortfolio(solanaAddress);
|
|
3665
3672
|
if (!active) return;
|
|
3666
3673
|
for (const t of portfolio.tokens) {
|
|
3667
3674
|
const symbol = t.symbol.toUpperCase();
|
|
3668
|
-
if (!
|
|
3675
|
+
if (!_chunk4R2ZHSDQcjs.SOLANA_TOKENS.some((st) => st.symbol === symbol)) continue;
|
|
3669
3676
|
let parsed = 0n;
|
|
3670
3677
|
try {
|
|
3671
3678
|
parsed = BigInt(t.balance || "0");
|
|
@@ -3681,12 +3688,12 @@ function SolanaTokenSelectStep({
|
|
|
3681
3688
|
};
|
|
3682
3689
|
}
|
|
3683
3690
|
}
|
|
3684
|
-
|
|
3691
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-token-select", "portfolio:success", {
|
|
3685
3692
|
symbols: Object.keys(portfolioBySymbol)
|
|
3686
3693
|
});
|
|
3687
3694
|
} catch (err) {
|
|
3688
3695
|
if (!active) return;
|
|
3689
|
-
|
|
3696
|
+
_chunkLBJFACLHcjs.debugError.call(void 0, debug, "solana-token-select", "portfolio:failure", err, {
|
|
3690
3697
|
solanaAddress
|
|
3691
3698
|
});
|
|
3692
3699
|
setError(
|
|
@@ -3697,7 +3704,7 @@ function SolanaTokenSelectStep({
|
|
|
3697
3704
|
return;
|
|
3698
3705
|
}
|
|
3699
3706
|
const results = [];
|
|
3700
|
-
for (const token of
|
|
3707
|
+
for (const token of _chunk4R2ZHSDQcjs.SOLANA_TOKENS) {
|
|
3701
3708
|
const fromPortfolio = portfolioBySymbol[token.symbol];
|
|
3702
3709
|
if (fromPortfolio && fromPortfolio.balance > 0n) {
|
|
3703
3710
|
results.push({
|
|
@@ -3733,30 +3740,30 @@ function SolanaTokenSelectStep({
|
|
|
3733
3740
|
const raw = _viem.formatUnits.call(void 0, entry.balance, entry.token.decimals);
|
|
3734
3741
|
const numeric = Number(raw);
|
|
3735
3742
|
if (!Number.isFinite(numeric)) return raw;
|
|
3736
|
-
return
|
|
3743
|
+
return _chunkLBJFACLHcjs.tokenFormatter.format(numeric);
|
|
3737
3744
|
} catch (e22) {
|
|
3738
3745
|
return "--";
|
|
3739
3746
|
}
|
|
3740
3747
|
};
|
|
3741
|
-
const chainIcon =
|
|
3742
|
-
const chainName =
|
|
3748
|
+
const chainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, "solana");
|
|
3749
|
+
const chainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, "solana");
|
|
3743
3750
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
3744
3751
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body", children: [
|
|
3745
3752
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3746
|
-
|
|
3753
|
+
_chunkLBJFACLHcjs.BodyHeader,
|
|
3747
3754
|
{
|
|
3748
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3755
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}),
|
|
3749
3756
|
title: "Your assets",
|
|
3750
3757
|
subtitle: "Select source assets to transfer"
|
|
3751
3758
|
}
|
|
3752
3759
|
),
|
|
3753
3760
|
loading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-loading-state", style: { padding: "40px 12px" }, children: [
|
|
3754
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3761
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, { className: "rs-text-tertiary" }),
|
|
3755
3762
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-text-sm rs-text-tertiary", children: "Loading balances" })
|
|
3756
3763
|
] }),
|
|
3757
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3764
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
|
|
3758
3765
|
!loading && !error && rows.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-state", children: [
|
|
3759
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3766
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, { className: "rs-empty-icon" }),
|
|
3760
3767
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-empty-text", children: "No funds in connected wallet" }),
|
|
3761
3768
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-empty-address", children: [
|
|
3762
3769
|
solanaAddress.slice(0, 6),
|
|
@@ -3787,13 +3794,13 @@ function SolanaTokenSelectStep({
|
|
|
3787
3794
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
3788
3795
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
3789
3796
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3790
|
-
|
|
3797
|
+
_chunkLBJFACLHcjs.TokenIcon,
|
|
3791
3798
|
{
|
|
3792
3799
|
symbol: entry.token.symbol,
|
|
3793
3800
|
fallback: entry.token.symbol.slice(0, 4)
|
|
3794
3801
|
}
|
|
3795
3802
|
) }),
|
|
3796
|
-
chainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3803
|
+
chainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: chainIcon, alt: chainName }) })
|
|
3797
3804
|
] }),
|
|
3798
3805
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-text", children: [
|
|
3799
3806
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-name-row", children: [
|
|
@@ -3810,14 +3817,14 @@ function SolanaTokenSelectStep({
|
|
|
3810
3817
|
] })
|
|
3811
3818
|
] })
|
|
3812
3819
|
] }),
|
|
3813
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ?
|
|
3820
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-balance", children: entry.balanceUsd > 0 ? _chunkLBJFACLHcjs.currencyFormatter.format(entry.balanceUsd) : tokenAmount !== "--" ? `${tokenAmount} ${entry.token.symbol}` : "--" })
|
|
3814
3821
|
]
|
|
3815
3822
|
},
|
|
3816
3823
|
entry.token.symbol
|
|
3817
3824
|
);
|
|
3818
3825
|
}) }),
|
|
3819
3826
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3820
|
-
|
|
3827
|
+
_chunkLBJFACLHcjs.Button,
|
|
3821
3828
|
{
|
|
3822
3829
|
onClick: () => selectedEntry && onContinue(
|
|
3823
3830
|
selectedEntry.token,
|
|
@@ -3830,7 +3837,7 @@ function SolanaTokenSelectStep({
|
|
|
3830
3837
|
}
|
|
3831
3838
|
)
|
|
3832
3839
|
] }),
|
|
3833
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
3840
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
3834
3841
|
] });
|
|
3835
3842
|
}
|
|
3836
3843
|
|
|
@@ -3861,7 +3868,7 @@ function SolanaAmountStep({
|
|
|
3861
3868
|
const [amount, setAmount] = _react.useState.call(void 0, "");
|
|
3862
3869
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
3863
3870
|
const hasAppliedDefaultRef = _react.useRef.call(void 0, false);
|
|
3864
|
-
const isSourceStablecoin =
|
|
3871
|
+
const isSourceStablecoin = _chunk4R2ZHSDQcjs.isStablecoinSymbol.call(void 0, token.symbol);
|
|
3865
3872
|
const isMaxDefault = _optionalChain([defaultAmount, 'optionalAccess', _138 => _138.trim, 'call', _139 => _139(), 'access', _140 => _140.toLowerCase, 'call', _141 => _141()]) === "max";
|
|
3866
3873
|
const tokenPriceUsd = _react.useMemo.call(void 0, () => {
|
|
3867
3874
|
if (isSourceStablecoin) return 1;
|
|
@@ -3882,7 +3889,7 @@ function SolanaAmountStep({
|
|
|
3882
3889
|
const raw = _viem.formatUnits.call(void 0, balance, token.decimals);
|
|
3883
3890
|
const numeric = Number(raw);
|
|
3884
3891
|
if (!Number.isFinite(numeric)) return raw;
|
|
3885
|
-
return
|
|
3892
|
+
return _chunkLBJFACLHcjs.tokenFormatter.format(numeric);
|
|
3886
3893
|
} catch (e24) {
|
|
3887
3894
|
return "\u2026";
|
|
3888
3895
|
}
|
|
@@ -3899,7 +3906,7 @@ function SolanaAmountStep({
|
|
|
3899
3906
|
}
|
|
3900
3907
|
}, [balance, token.decimals, tokenPriceUsd, balanceUsd]);
|
|
3901
3908
|
const spendableBalance = _react.useMemo.call(void 0, () => {
|
|
3902
|
-
if (!
|
|
3909
|
+
if (!_chunk4R2ZHSDQcjs.isNativeSol.call(void 0, token)) return balance;
|
|
3903
3910
|
return balance > SOL_FEE_RESERVE_LAMPORTS ? balance - SOL_FEE_RESERVE_LAMPORTS : 0n;
|
|
3904
3911
|
}, [balance, token]);
|
|
3905
3912
|
const spendableBalanceUsd = _react.useMemo.call(void 0, () => {
|
|
@@ -3964,7 +3971,7 @@ function SolanaAmountStep({
|
|
|
3964
3971
|
return null;
|
|
3965
3972
|
}
|
|
3966
3973
|
}, [numericAmount, isSourceStablecoin, hasPricing, tokenPriceUsd, token.decimals]);
|
|
3967
|
-
const minDepositUsd =
|
|
3974
|
+
const minDepositUsd = _chunk4R2ZHSDQcjs.isHyperCoreDestination.call(void 0, targetChain) ? Math.max(_chunk4R2ZHSDQcjs.HYPERCORE_MIN_DEPOSIT_USD, _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _142 => _142.minDepositUsd]), () => ( 0))) : _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _143 => _143.minDepositUsd]), () => ( null));
|
|
3968
3975
|
const maxDepositUsd = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _144 => _144.maxDepositUsd]), () => ( null));
|
|
3969
3976
|
const isBelowMin = minDepositUsd !== null && numericAmount > 0 && numericAmount < minDepositUsd;
|
|
3970
3977
|
const isAboveMax = maxDepositUsd !== null && numericAmount > maxDepositUsd;
|
|
@@ -3975,7 +3982,7 @@ function SolanaAmountStep({
|
|
|
3975
3982
|
const handlePresetClick = (percentage) => {
|
|
3976
3983
|
const formatted = computePresetAmount(percentage);
|
|
3977
3984
|
if (!formatted) return;
|
|
3978
|
-
|
|
3985
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:preset", {
|
|
3979
3986
|
percentage,
|
|
3980
3987
|
symbol: token.symbol,
|
|
3981
3988
|
formatted
|
|
@@ -4010,7 +4017,7 @@ function SolanaAmountStep({
|
|
|
4010
4017
|
try {
|
|
4011
4018
|
amountInUnits = _viem.parseUnits.call(void 0, sourceAmountStr, token.decimals);
|
|
4012
4019
|
} catch (e29) {
|
|
4013
|
-
|
|
4020
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:invalid", {
|
|
4014
4021
|
amount,
|
|
4015
4022
|
sourceAmount: sourceAmountStr,
|
|
4016
4023
|
reason: "parse-units-failed"
|
|
@@ -4019,13 +4026,13 @@ function SolanaAmountStep({
|
|
|
4019
4026
|
return;
|
|
4020
4027
|
}
|
|
4021
4028
|
if (amountInUnits > spendableBalance) {
|
|
4022
|
-
const isReserveIssue =
|
|
4029
|
+
const isReserveIssue = _chunk4R2ZHSDQcjs.isNativeSol.call(void 0, token) && amountInUnits <= balance;
|
|
4023
4030
|
setError(
|
|
4024
4031
|
isReserveIssue ? "Use a bit less than your full SOL balance" : "Insufficient balance"
|
|
4025
4032
|
);
|
|
4026
4033
|
return;
|
|
4027
4034
|
}
|
|
4028
|
-
|
|
4035
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-amount", "amount:continue", {
|
|
4029
4036
|
symbol: token.symbol,
|
|
4030
4037
|
inputAmountUsd: amount,
|
|
4031
4038
|
sourceAmount: sourceAmountStr,
|
|
@@ -4038,7 +4045,7 @@ function SolanaAmountStep({
|
|
|
4038
4045
|
const continueDisabled = exceedsBalance || numericAmount === 0 && !isBelowMin;
|
|
4039
4046
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4040
4047
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4041
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4048
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}), title: "Wallet deposit" }),
|
|
4042
4049
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-section", children: [
|
|
4043
4050
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-display", children: [
|
|
4044
4051
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4058,13 +4065,13 @@ function SolanaAmountStep({
|
|
|
4058
4065
|
" available",
|
|
4059
4066
|
computedBalanceUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
4060
4067
|
" (~",
|
|
4061
|
-
|
|
4068
|
+
_chunkLBJFACLHcjs.currencyFormatter.format(computedBalanceUsd),
|
|
4062
4069
|
")"
|
|
4063
4070
|
] })
|
|
4064
4071
|
] }),
|
|
4065
4072
|
minDepositUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-meta-minimum", children: [
|
|
4066
4073
|
"Min. deposit ",
|
|
4067
|
-
|
|
4074
|
+
_chunkLBJFACLHcjs.currencyFormatter.format(minDepositUsd)
|
|
4068
4075
|
] })
|
|
4069
4076
|
] })
|
|
4070
4077
|
] }),
|
|
@@ -4087,7 +4094,7 @@ function SolanaAmountStep({
|
|
|
4087
4094
|
"Solana ",
|
|
4088
4095
|
token.symbol
|
|
4089
4096
|
] }),
|
|
4090
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4097
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: token.symbol }) })
|
|
4091
4098
|
] })
|
|
4092
4099
|
] }),
|
|
4093
4100
|
targetChainName && targetTokenSymbol && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
@@ -4098,17 +4105,17 @@ function SolanaAmountStep({
|
|
|
4098
4105
|
" ",
|
|
4099
4106
|
targetTokenSymbol
|
|
4100
4107
|
] }),
|
|
4101
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4108
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: targetTokenSymbol }) })
|
|
4102
4109
|
] })
|
|
4103
4110
|
] }),
|
|
4104
4111
|
balanceAfterUsd !== null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
4105
4112
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Balance after deposit" }),
|
|
4106
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children:
|
|
4113
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-value", children: _chunkLBJFACLHcjs.currencyFormatter.format(balanceAfterUsd) })
|
|
4107
4114
|
] })
|
|
4108
4115
|
] }),
|
|
4109
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4116
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
|
|
4110
4117
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4111
|
-
|
|
4118
|
+
_chunkLBJFACLHcjs.Button,
|
|
4112
4119
|
{
|
|
4113
4120
|
onClick: handleContinue,
|
|
4114
4121
|
fullWidth: true,
|
|
@@ -4117,7 +4124,7 @@ function SolanaAmountStep({
|
|
|
4117
4124
|
}
|
|
4118
4125
|
)
|
|
4119
4126
|
] }),
|
|
4120
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4127
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
4121
4128
|
] });
|
|
4122
4129
|
}
|
|
4123
4130
|
|
|
@@ -4140,10 +4147,10 @@ var _spltoken = require('@solana/spl-token');
|
|
|
4140
4147
|
var DEFAULT_SOLANA_RPC_URL = "https://api.mainnet.solana.com";
|
|
4141
4148
|
var cachedConnections = /* @__PURE__ */ new Map();
|
|
4142
4149
|
function getSolanaRpcUrl(rpcUrls) {
|
|
4143
|
-
return _nullishCoalesce(
|
|
4150
|
+
return _nullishCoalesce(_chunkLBJFACLHcjs.rpcUrlFor.call(void 0, rpcUrls, "solana"), () => ( DEFAULT_SOLANA_RPC_URL));
|
|
4144
4151
|
}
|
|
4145
4152
|
function hasConfiguredSolanaRpcUrl(rpcUrls) {
|
|
4146
|
-
return
|
|
4153
|
+
return _chunkLBJFACLHcjs.rpcUrlFor.call(void 0, rpcUrls, "solana") !== void 0;
|
|
4147
4154
|
}
|
|
4148
4155
|
function getSolanaConnection(rpcUrls) {
|
|
4149
4156
|
const rpcUrl = getSolanaRpcUrl(rpcUrls);
|
|
@@ -4245,37 +4252,37 @@ function SolanaConfirmStep({
|
|
|
4245
4252
|
onError,
|
|
4246
4253
|
debug
|
|
4247
4254
|
}) {
|
|
4248
|
-
const rpcUrls =
|
|
4255
|
+
const rpcUrls = _chunkLBJFACLHcjs.useRpcUrls.call(void 0, );
|
|
4249
4256
|
const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
|
|
4250
4257
|
const [error, setError] = _react.useState.call(void 0, null);
|
|
4251
|
-
const targetChainId =
|
|
4252
|
-
const targetSymbol =
|
|
4253
|
-
const sourceChainName =
|
|
4254
|
-
const targetChainName =
|
|
4255
|
-
const sourceChainIcon =
|
|
4256
|
-
const targetChainIcon =
|
|
4258
|
+
const targetChainId = _chunk4R2ZHSDQcjs.targetChainToChainId.call(void 0, targetChain);
|
|
4259
|
+
const targetSymbol = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
4260
|
+
const sourceChainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, "solana");
|
|
4261
|
+
const targetChainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChainId);
|
|
4262
|
+
const sourceChainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, "solana");
|
|
4263
|
+
const targetChainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, targetChainId);
|
|
4257
4264
|
const feeSponsored = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _145 => _145.feeSponsored]), () => ( false));
|
|
4258
4265
|
const feeTooltip = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _146 => _146.feeTooltip]), () => ( (feeSponsored ? "Network fees are sponsored for this deposit." : "Network fees apply.")));
|
|
4259
|
-
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(
|
|
4266
|
+
const formattedAmount = sourceAmount && Number.isFinite(Number(sourceAmount)) ? _nullishCoalesce(_chunkLBJFACLHcjs.formatTokenAmount.call(void 0, Number(sourceAmount), token.symbol), () => ( "0")) : "0";
|
|
4260
4267
|
const receiveDisplay = (() => {
|
|
4261
4268
|
const usdValue = Number(targetAmount);
|
|
4262
4269
|
const sourceAmountUsd = Number.isFinite(usdValue) && usdValue > 0 ? usdValue : void 0;
|
|
4263
|
-
const estimate =
|
|
4270
|
+
const estimate = _chunkLBJFACLHcjs.formatReceiveEstimate.call(void 0, {
|
|
4264
4271
|
sourceAmount: Number.isFinite(Number(sourceAmount)) ? Number(sourceAmount) : void 0,
|
|
4265
4272
|
sourceSymbol: token.symbol,
|
|
4266
4273
|
targetSymbol,
|
|
4267
4274
|
sourceAmountUsd,
|
|
4268
|
-
sourceTrusted:
|
|
4275
|
+
sourceTrusted: _chunkLBJFACLHcjs.isRecognizedToken.call(void 0, token.mint, "solana"),
|
|
4269
4276
|
// Curated stablecoin target estimates at $1 when unquoted; never applied
|
|
4270
4277
|
// to the source (a held token). See ConfirmStep for the rationale.
|
|
4271
|
-
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } :
|
|
4278
|
+
prices: targetTokenPriceUsd !== null && targetTokenPriceUsd > 0 ? { [targetSymbol.toUpperCase()]: targetTokenPriceUsd } : _chunkLBJFACLHcjs.isDisplayStablecoinSymbol.call(void 0, targetSymbol) ? { [targetSymbol.toUpperCase()]: 1 } : {}
|
|
4272
4279
|
});
|
|
4273
4280
|
if (estimate !== void 0) return estimate;
|
|
4274
4281
|
return targetSymbol;
|
|
4275
4282
|
})();
|
|
4276
4283
|
const handleConfirm = async () => {
|
|
4277
4284
|
if (!solanaProvider) {
|
|
4278
|
-
|
|
4285
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
4279
4286
|
reason: "missing-provider"
|
|
4280
4287
|
});
|
|
4281
4288
|
setError("Solana wallet not connected");
|
|
@@ -4283,7 +4290,7 @@ function SolanaConfirmStep({
|
|
|
4283
4290
|
}
|
|
4284
4291
|
const parsedAmount = parseFloat(sourceAmount);
|
|
4285
4292
|
if (isNaN(parsedAmount) || parsedAmount <= 0) {
|
|
4286
|
-
|
|
4293
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:blocked", {
|
|
4287
4294
|
reason: "invalid-amount",
|
|
4288
4295
|
sourceAmount
|
|
4289
4296
|
});
|
|
@@ -4292,7 +4299,7 @@ function SolanaConfirmStep({
|
|
|
4292
4299
|
}
|
|
4293
4300
|
setError(null);
|
|
4294
4301
|
setIsSubmitting(true);
|
|
4295
|
-
|
|
4302
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-confirm", "submit:start", {
|
|
4296
4303
|
smartAccount,
|
|
4297
4304
|
solanaAddress,
|
|
4298
4305
|
solanaDepositAddress,
|
|
@@ -4302,7 +4309,7 @@ function SolanaConfirmStep({
|
|
|
4302
4309
|
});
|
|
4303
4310
|
try {
|
|
4304
4311
|
const check = await service.checkAccount(smartAccount);
|
|
4305
|
-
|
|
4312
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-confirm", "check:success", {
|
|
4306
4313
|
smartAccount,
|
|
4307
4314
|
isRegistered: check.isRegistered,
|
|
4308
4315
|
targetChain: check.targetChain,
|
|
@@ -4315,12 +4322,12 @@ function SolanaConfirmStep({
|
|
|
4315
4322
|
}
|
|
4316
4323
|
const connection = hasConfiguredSolanaRpcUrl(rpcUrls) ? getSolanaConnection(rpcUrls) : _nullishCoalesce(solanaConnection, () => ( getSolanaConnection(rpcUrls)));
|
|
4317
4324
|
const amountUnits = _viem.parseUnits.call(void 0, sourceAmount, token.decimals);
|
|
4318
|
-
|
|
4325
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:start", {
|
|
4319
4326
|
token: token.symbol,
|
|
4320
4327
|
sourceAmount,
|
|
4321
4328
|
amountUnits: amountUnits.toString()
|
|
4322
4329
|
});
|
|
4323
|
-
const transaction =
|
|
4330
|
+
const transaction = _chunk4R2ZHSDQcjs.isNativeSol.call(void 0, token) ? await buildSolTransferTransaction(
|
|
4324
4331
|
connection,
|
|
4325
4332
|
solanaAddress,
|
|
4326
4333
|
solanaDepositAddress,
|
|
@@ -4332,7 +4339,7 @@ function SolanaConfirmStep({
|
|
|
4332
4339
|
token.mint,
|
|
4333
4340
|
amountUnits
|
|
4334
4341
|
);
|
|
4335
|
-
|
|
4342
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:build:success", {
|
|
4336
4343
|
token: token.symbol,
|
|
4337
4344
|
instructionCount: transaction.instructions.length,
|
|
4338
4345
|
feePayer: _optionalChain([transaction, 'access', _147 => _147.feePayer, 'optionalAccess', _148 => _148.toBase58, 'call', _149 => _149()]),
|
|
@@ -4343,7 +4350,7 @@ function SolanaConfirmStep({
|
|
|
4343
4350
|
connection,
|
|
4344
4351
|
transaction
|
|
4345
4352
|
);
|
|
4346
|
-
|
|
4353
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "solana-confirm", "tx:sent", {
|
|
4347
4354
|
txHash,
|
|
4348
4355
|
amountUnits: amountUnits.toString()
|
|
4349
4356
|
});
|
|
@@ -4355,34 +4362,34 @@ function SolanaConfirmStep({
|
|
|
4355
4362
|
});
|
|
4356
4363
|
} catch (err) {
|
|
4357
4364
|
const raw = err instanceof Error ? err.message : "Transfer failed";
|
|
4358
|
-
const message =
|
|
4359
|
-
|
|
4365
|
+
const message = _chunkLBJFACLHcjs.formatUserError.call(void 0, raw);
|
|
4366
|
+
_chunkLBJFACLHcjs.debugError.call(void 0, debug, "solana-confirm", "submit:failure", err, {
|
|
4360
4367
|
smartAccount,
|
|
4361
4368
|
token: token.symbol,
|
|
4362
4369
|
sourceAmount
|
|
4363
4370
|
});
|
|
4364
4371
|
setError(message);
|
|
4365
|
-
_optionalChain([onError, 'optionalCall', _150 => _150(message, "SOLANA_TRANSFER_ERROR")]);
|
|
4372
|
+
_optionalChain([onError, 'optionalCall', _150 => _150(message, "SOLANA_TRANSFER_ERROR", raw)]);
|
|
4366
4373
|
} finally {
|
|
4367
4374
|
setIsSubmitting(false);
|
|
4368
4375
|
}
|
|
4369
4376
|
};
|
|
4370
4377
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4371
4378
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4372
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4379
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}), title: "Review deposit" }),
|
|
4373
4380
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-details", children: [
|
|
4374
4381
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4375
4382
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
4376
4383
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4377
4384
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
4378
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4385
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
4379
4386
|
] })
|
|
4380
4387
|
] }),
|
|
4381
4388
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4382
4389
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
4383
4390
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4384
4391
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
4385
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4392
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: targetChainIcon }) })
|
|
4386
4393
|
] })
|
|
4387
4394
|
] }),
|
|
4388
4395
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -4397,14 +4404,14 @@ function SolanaConfirmStep({
|
|
|
4397
4404
|
" ",
|
|
4398
4405
|
token.symbol
|
|
4399
4406
|
] }),
|
|
4400
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4407
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: token.symbol }) })
|
|
4401
4408
|
] })
|
|
4402
4409
|
] }),
|
|
4403
4410
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
4404
4411
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Receive" }),
|
|
4405
4412
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-review-detail-value", children: [
|
|
4406
4413
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: receiveDisplay }),
|
|
4407
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4414
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: targetSymbol }) })
|
|
4408
4415
|
] })
|
|
4409
4416
|
] }),
|
|
4410
4417
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-review-detail-row", children: [
|
|
@@ -4417,13 +4424,13 @@ function SolanaConfirmStep({
|
|
|
4417
4424
|
children: "$0.04"
|
|
4418
4425
|
}
|
|
4419
4426
|
),
|
|
4420
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4427
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6ZJTZ7DScjs.Tooltip, { content: feeTooltip, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-review-detail-info", "aria-label": "Fee info", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.InfoIcon, {}) }) })
|
|
4421
4428
|
] })
|
|
4422
4429
|
] })
|
|
4423
4430
|
] }),
|
|
4424
|
-
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4431
|
+
error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Callout, { variant: "error", children: error }),
|
|
4425
4432
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4426
|
-
|
|
4433
|
+
_chunkLBJFACLHcjs.Button,
|
|
4427
4434
|
{
|
|
4428
4435
|
onClick: handleConfirm,
|
|
4429
4436
|
loading: isSubmitting,
|
|
@@ -4434,7 +4441,7 @@ function SolanaConfirmStep({
|
|
|
4434
4441
|
}
|
|
4435
4442
|
)
|
|
4436
4443
|
] }),
|
|
4437
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4444
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
4438
4445
|
] });
|
|
4439
4446
|
}
|
|
4440
4447
|
|
|
@@ -4449,22 +4456,22 @@ function DappImportAssetSelectStep({
|
|
|
4449
4456
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4450
4457
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4451
4458
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4452
|
-
|
|
4459
|
+
_chunkLBJFACLHcjs.BodyHeader,
|
|
4453
4460
|
{
|
|
4454
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4461
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}),
|
|
4455
4462
|
title: `Transfer from ${sourceLabel}`,
|
|
4456
4463
|
subtitle: "Pick the balance to import"
|
|
4457
4464
|
}
|
|
4458
4465
|
),
|
|
4459
4466
|
incompleteSummary && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-notice", role: "status", children: incompleteSummary }),
|
|
4460
4467
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-asset-list", children: assets.map((asset) => {
|
|
4461
|
-
const tokenAmount = asset.balance ?
|
|
4468
|
+
const tokenAmount = asset.balance ? _chunkLBJFACLHcjs.tokenFormatter.format(
|
|
4462
4469
|
Number(asset.balance) / 10 ** asset.decimals
|
|
4463
4470
|
) : "0";
|
|
4464
|
-
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ?
|
|
4471
|
+
const balanceUsd = asset.balanceUsd && asset.balanceUsd > 0 ? _chunkLBJFACLHcjs.currencyFormatter.format(asset.balanceUsd) : `${tokenAmount} ${asset.symbol}`;
|
|
4465
4472
|
const assetIcon = asset.icon;
|
|
4466
|
-
const chainIcon =
|
|
4467
|
-
const badge =
|
|
4473
|
+
const chainIcon = _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, asset.chainId);
|
|
4474
|
+
const badge = _chunk4R2ZHSDQcjs.getChainBadge.call(void 0, asset.chainId);
|
|
4468
4475
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
4469
4476
|
"button",
|
|
4470
4477
|
{
|
|
@@ -4474,14 +4481,14 @@ function DappImportAssetSelectStep({
|
|
|
4474
4481
|
children: [
|
|
4475
4482
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-info", children: [
|
|
4476
4483
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-asset-icon-wrapper", children: [
|
|
4477
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4478
|
-
|
|
4484
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-icon", children: assetIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: assetIcon, alt: asset.symbol }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4485
|
+
_chunkLBJFACLHcjs.TokenIcon,
|
|
4479
4486
|
{
|
|
4480
4487
|
symbol: asset.symbol,
|
|
4481
4488
|
fallback: asset.symbol.slice(0, 4)
|
|
4482
4489
|
}
|
|
4483
4490
|
) }),
|
|
4484
|
-
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4491
|
+
chainIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-asset-chain-badge", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: chainIcon, alt: _chunk4R2ZHSDQcjs.getChainName.call(void 0, asset.chainId) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4485
4492
|
"span",
|
|
4486
4493
|
{
|
|
4487
4494
|
className: "rs-asset-chain-badge",
|
|
@@ -4513,7 +4520,7 @@ function DappImportAssetSelectStep({
|
|
|
4513
4520
|
);
|
|
4514
4521
|
}) })
|
|
4515
4522
|
] }),
|
|
4516
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4523
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
4517
4524
|
] });
|
|
4518
4525
|
}
|
|
4519
4526
|
DappImportAssetSelectStep.displayName = "DappImportAssetSelectStep";
|
|
@@ -4535,7 +4542,7 @@ function describeRow(status, comingSoon) {
|
|
|
4535
4542
|
}
|
|
4536
4543
|
if (status.enabled) {
|
|
4537
4544
|
return {
|
|
4538
|
-
subtitle: status.balanceUsd > 0 ?
|
|
4545
|
+
subtitle: status.balanceUsd > 0 ? _chunkLBJFACLHcjs.currencyFormatter.format(status.balanceUsd) : "No balance",
|
|
4539
4546
|
disabled: false,
|
|
4540
4547
|
busy: false
|
|
4541
4548
|
};
|
|
@@ -4558,9 +4565,9 @@ function DappImportSelectStep({
|
|
|
4558
4565
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen", children: [
|
|
4559
4566
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4560
4567
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4561
|
-
|
|
4568
|
+
_chunkLBJFACLHcjs.BodyHeader,
|
|
4562
4569
|
{
|
|
4563
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4570
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.MigrateAssetsIcon, {}),
|
|
4564
4571
|
title: "Migrate assets",
|
|
4565
4572
|
subtitle: "Select a position to migrate"
|
|
4566
4573
|
}
|
|
@@ -4572,13 +4579,13 @@ function DappImportSelectStep({
|
|
|
4572
4579
|
Boolean(brand.comingSoon)
|
|
4573
4580
|
);
|
|
4574
4581
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4575
|
-
|
|
4582
|
+
_chunk2PQ34KU3cjs.ListRow,
|
|
4576
4583
|
{
|
|
4577
4584
|
leadingMedia: brand.iconUrl,
|
|
4578
4585
|
title: brand.label,
|
|
4579
4586
|
subtitle,
|
|
4580
4587
|
disabled,
|
|
4581
|
-
trailing: busy ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4588
|
+
trailing: busy ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, { className: "rs-spinner--sm" }) : void 0,
|
|
4582
4589
|
onClick: () => {
|
|
4583
4590
|
if (status === "needs-connect") {
|
|
4584
4591
|
_optionalChain([onRequestConnect, 'optionalCall', _151 => _151()]);
|
|
@@ -4591,7 +4598,7 @@ function DappImportSelectStep({
|
|
|
4591
4598
|
);
|
|
4592
4599
|
}) })
|
|
4593
4600
|
] }),
|
|
4594
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4601
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
4595
4602
|
] });
|
|
4596
4603
|
}
|
|
4597
4604
|
DappImportSelectStep.displayName = "DappImportSelectStep";
|
|
@@ -4608,9 +4615,9 @@ function DappImportAssetSelectSkeleton({
|
|
|
4608
4615
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-sr-only", role: "status", children: error ? "Couldn't load balances" : "Loading balances\u2026" }),
|
|
4609
4616
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-screen-body rs-screen-body--gap-32", children: [
|
|
4610
4617
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4611
|
-
|
|
4618
|
+
_chunkLBJFACLHcjs.BodyHeader,
|
|
4612
4619
|
{
|
|
4613
|
-
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4620
|
+
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.WalletIcon, {}),
|
|
4614
4621
|
title: `Transfer from ${sourceLabel}`,
|
|
4615
4622
|
subtitle: "Pick the balance to import"
|
|
4616
4623
|
}
|
|
@@ -4648,7 +4655,7 @@ function DappImportAssetSelectSkeleton({
|
|
|
4648
4655
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Try again" })
|
|
4649
4656
|
}
|
|
4650
4657
|
) }),
|
|
4651
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
4658
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
4652
4659
|
] });
|
|
4653
4660
|
}
|
|
4654
4661
|
DappImportAssetSelectSkeleton.displayName = "DappImportAssetSelectSkeleton";
|
|
@@ -4824,9 +4831,9 @@ var aaveProvider = {
|
|
|
4824
4831
|
function toImportableAssets(positions) {
|
|
4825
4832
|
const assets = [];
|
|
4826
4833
|
for (const position of positions) {
|
|
4827
|
-
const chainId =
|
|
4834
|
+
const chainId = _chunk4R2ZHSDQcjs.parseEvmChainId.call(void 0, position.chain);
|
|
4828
4835
|
if (chainId === null) continue;
|
|
4829
|
-
if (!
|
|
4836
|
+
if (!_chunk4R2ZHSDQcjs.CHAIN_BY_ID[chainId]) continue;
|
|
4830
4837
|
if (BigInt(position.maxWithdrawable) <= 0n) continue;
|
|
4831
4838
|
if (position.constraints.some((c) => POLICY_REFUSED.includes(c))) continue;
|
|
4832
4839
|
assets.push(buildAsset(position, chainId));
|
|
@@ -4943,7 +4950,7 @@ async function detectPolymarketWalletKind(params) {
|
|
|
4943
4950
|
contracts: [
|
|
4944
4951
|
{
|
|
4945
4952
|
address: proxyWallet,
|
|
4946
|
-
abi:
|
|
4953
|
+
abi: _chunkXJB3VG4Ccjs.SAFE_ABI,
|
|
4947
4954
|
functionName: "isOwner",
|
|
4948
4955
|
args: [eoa]
|
|
4949
4956
|
},
|
|
@@ -4976,7 +4983,7 @@ async function buildSignedDepositWalletBatch(params) {
|
|
|
4976
4983
|
if (!account || !chain) {
|
|
4977
4984
|
throw new Error("Wallet not connected");
|
|
4978
4985
|
}
|
|
4979
|
-
if (chain.id !==
|
|
4986
|
+
if (chain.id !== _chunkXJB3VG4Ccjs.POLYMARKET_POLYGON_CHAIN_ID) {
|
|
4980
4987
|
throw new Error("Switch to Polygon to sign");
|
|
4981
4988
|
}
|
|
4982
4989
|
const owner = await publicClient.readContract({
|
|
@@ -5021,14 +5028,14 @@ async function buildSignedDepositWalletBatch(params) {
|
|
|
5021
5028
|
})),
|
|
5022
5029
|
signature
|
|
5023
5030
|
},
|
|
5024
|
-
sourceToken:
|
|
5031
|
+
sourceToken: _chunkXJB3VG4Ccjs.POLYMARKET_USDCE_ADDRESS,
|
|
5025
5032
|
sourceSymbol: tokenKind === "pusd" ? "pUSD" : "USDC.e"
|
|
5026
5033
|
};
|
|
5027
5034
|
}
|
|
5028
5035
|
function buildUsdceTransferCalls(recipient, amount) {
|
|
5029
5036
|
return [
|
|
5030
5037
|
{
|
|
5031
|
-
target:
|
|
5038
|
+
target: _chunkXJB3VG4Ccjs.POLYMARKET_USDCE_ADDRESS,
|
|
5032
5039
|
value: 0n,
|
|
5033
5040
|
data: _viem.encodeFunctionData.call(void 0, {
|
|
5034
5041
|
abi: _viem.erc20Abi,
|
|
@@ -5041,21 +5048,21 @@ function buildUsdceTransferCalls(recipient, amount) {
|
|
|
5041
5048
|
function buildPusdUnwrapCalls(recipient, amount) {
|
|
5042
5049
|
return [
|
|
5043
5050
|
{
|
|
5044
|
-
target:
|
|
5051
|
+
target: _chunkXJB3VG4Ccjs.POLYMARKET_PUSD_ADDRESS,
|
|
5045
5052
|
value: 0n,
|
|
5046
5053
|
data: _viem.encodeFunctionData.call(void 0, {
|
|
5047
5054
|
abi: _viem.erc20Abi,
|
|
5048
5055
|
functionName: "approve",
|
|
5049
|
-
args: [
|
|
5056
|
+
args: [_chunkXJB3VG4Ccjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS, amount]
|
|
5050
5057
|
})
|
|
5051
5058
|
},
|
|
5052
5059
|
{
|
|
5053
|
-
target:
|
|
5060
|
+
target: _chunkXJB3VG4Ccjs.POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS,
|
|
5054
5061
|
value: 0n,
|
|
5055
5062
|
data: _viem.encodeFunctionData.call(void 0, {
|
|
5056
5063
|
abi: COLLATERAL_OFFRAMP_ABI,
|
|
5057
5064
|
functionName: "unwrap",
|
|
5058
|
-
args: [
|
|
5065
|
+
args: [_chunkXJB3VG4Ccjs.POLYMARKET_USDCE_ADDRESS, recipient, amount]
|
|
5059
5066
|
})
|
|
5060
5067
|
}
|
|
5061
5068
|
];
|
|
@@ -5067,12 +5074,12 @@ var polymarketProvider = {
|
|
|
5067
5074
|
id: PROVIDER_ID2,
|
|
5068
5075
|
sourceLabel: "Polymarket",
|
|
5069
5076
|
async fetchAvailability({ eoa, getPublicClient: getPublicClient2, signal }) {
|
|
5070
|
-
const proxyWallet = await
|
|
5077
|
+
const proxyWallet = await _chunkXJB3VG4Ccjs.fetchPolymarketProxyWallet.call(void 0, eoa, signal);
|
|
5071
5078
|
if (!proxyWallet) return null;
|
|
5072
5079
|
if (_optionalChain([signal, 'optionalAccess', _153 => _153.aborted])) return null;
|
|
5073
|
-
const polygonClient = getPublicClient2(
|
|
5080
|
+
const polygonClient = getPublicClient2(_chunkXJB3VG4Ccjs.POLYMARKET_POLYGON_CHAIN_ID);
|
|
5074
5081
|
if (!polygonClient) return null;
|
|
5075
|
-
const balances = await
|
|
5082
|
+
const balances = await _chunkXJB3VG4Ccjs.readPolymarketBalances.call(void 0, {
|
|
5076
5083
|
publicClient: polygonClient,
|
|
5077
5084
|
proxyWallet
|
|
5078
5085
|
});
|
|
@@ -5130,7 +5137,7 @@ var polymarketProvider = {
|
|
|
5130
5137
|
const { txHash } = await backend.submitPolymarketWithdraw(payload);
|
|
5131
5138
|
return { txHash, sourceToken, sourceSymbol, sourceDecimals: 6 };
|
|
5132
5139
|
}
|
|
5133
|
-
const result = await
|
|
5140
|
+
const result = await _chunkXJB3VG4Ccjs.executePolymarketSafeTransfer.call(void 0, {
|
|
5134
5141
|
walletClient,
|
|
5135
5142
|
publicClient,
|
|
5136
5143
|
safeAddress: metadata.proxyWallet,
|
|
@@ -5149,17 +5156,17 @@ var polymarketProvider = {
|
|
|
5149
5156
|
function buildAsset2(params) {
|
|
5150
5157
|
const { tokenKind, proxyWallet, walletKind, balance } = params;
|
|
5151
5158
|
const isPusd = tokenKind === "pusd";
|
|
5152
|
-
const tokenAddress = isPusd ?
|
|
5159
|
+
const tokenAddress = isPusd ? _chunkXJB3VG4Ccjs.POLYMARKET_PUSD_ADDRESS : _chunkXJB3VG4Ccjs.POLYMARKET_USDCE_ADDRESS;
|
|
5153
5160
|
const symbol = isPusd ? "pUSD" : "USDC.e";
|
|
5154
5161
|
const balanceUsd = Number(_viem.formatUnits.call(void 0, balance, 6));
|
|
5155
5162
|
const metadata = { proxyWallet, tokenKind, walletKind };
|
|
5156
5163
|
return {
|
|
5157
5164
|
id: `polymarket:${tokenKind}`,
|
|
5158
|
-
chainId:
|
|
5165
|
+
chainId: _chunkXJB3VG4Ccjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
5159
5166
|
token: tokenAddress,
|
|
5160
5167
|
symbol,
|
|
5161
5168
|
name: isPusd ? "Polymarket USD" : "Polygon USDC.e",
|
|
5162
|
-
icon: isPusd ?
|
|
5169
|
+
icon: isPusd ? _chunkXJB3VG4Ccjs.POLYMARKET_ICON_URL : void 0,
|
|
5163
5170
|
decimals: 6,
|
|
5164
5171
|
balance: balance.toString(),
|
|
5165
5172
|
balanceUsd: Number.isFinite(balanceUsd) ? balanceUsd : 0,
|
|
@@ -5172,8 +5179,8 @@ function buildAsset2(params) {
|
|
|
5172
5179
|
// pUSD unwraps to USDC.e via the offramp; USDC.e is what actually
|
|
5173
5180
|
// arrives at the smart account, so it's also what the orchestrator
|
|
5174
5181
|
// bridges from.
|
|
5175
|
-
depositToken:
|
|
5176
|
-
depositChainId:
|
|
5182
|
+
depositToken: _chunkXJB3VG4Ccjs.POLYMARKET_USDCE_ADDRESS,
|
|
5183
|
+
depositChainId: _chunkXJB3VG4Ccjs.POLYMARKET_POLYGON_CHAIN_ID,
|
|
5177
5184
|
providerMetadata: metadata
|
|
5178
5185
|
};
|
|
5179
5186
|
}
|
|
@@ -6451,11 +6458,11 @@ function DepositFlow({
|
|
|
6451
6458
|
onError,
|
|
6452
6459
|
debug
|
|
6453
6460
|
}) {
|
|
6454
|
-
const rpcUrls =
|
|
6455
|
-
const onStepChangeRef =
|
|
6456
|
-
const onEventRef =
|
|
6457
|
-
const onLifecycleRef =
|
|
6458
|
-
const onErrorRef =
|
|
6461
|
+
const rpcUrls = _chunkLBJFACLHcjs.useRpcUrls.call(void 0, );
|
|
6462
|
+
const onStepChangeRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onStepChange);
|
|
6463
|
+
const onEventRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onEvent);
|
|
6464
|
+
const onLifecycleRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onLifecycle);
|
|
6465
|
+
const onErrorRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onError);
|
|
6459
6466
|
const storeApi = useDepositStoreApi();
|
|
6460
6467
|
const flowSlice = useDepositStore((s) => s.flow);
|
|
6461
6468
|
const depositSlice = useDepositStore((s) => s.deposit);
|
|
@@ -6472,13 +6479,13 @@ function DepositFlow({
|
|
|
6472
6479
|
const stableWalletSelectionKeyRef = _react.useRef.call(void 0, null);
|
|
6473
6480
|
const logFlow = _react.useCallback.call(void 0,
|
|
6474
6481
|
(message, data) => {
|
|
6475
|
-
|
|
6482
|
+
_chunkLBJFACLHcjs.debugLog.call(void 0, debug, "deposit-flow", message, data);
|
|
6476
6483
|
},
|
|
6477
6484
|
[debug]
|
|
6478
6485
|
);
|
|
6479
6486
|
const logFlowError = _react.useCallback.call(void 0,
|
|
6480
6487
|
(message, error, data) => {
|
|
6481
|
-
|
|
6488
|
+
_chunkLBJFACLHcjs.debugError.call(void 0, debug, "deposit-flow", message, error, data);
|
|
6482
6489
|
},
|
|
6483
6490
|
[debug]
|
|
6484
6491
|
);
|
|
@@ -6600,10 +6607,10 @@ function DepositFlow({
|
|
|
6600
6607
|
isConnectSelectionConfirmed,
|
|
6601
6608
|
selectedWalletId
|
|
6602
6609
|
]);
|
|
6603
|
-
const setupChainId = typeof targetChain === "number" && !
|
|
6604
|
-
const targetChainId =
|
|
6605
|
-
const targetSymbol =
|
|
6606
|
-
const isTargetStablecoin =
|
|
6610
|
+
const setupChainId = typeof targetChain === "number" && !_chunk4R2ZHSDQcjs.isVirtualDestination.call(void 0, targetChain) ? targetChain : typeof defaultSourceChain === "number" ? defaultSourceChain : _chains.base.id;
|
|
6611
|
+
const targetChainId = _chunk4R2ZHSDQcjs.targetChainToChainId.call(void 0, targetChain);
|
|
6612
|
+
const targetSymbol = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
6613
|
+
const isTargetStablecoin = _chunk4R2ZHSDQcjs.isStablecoinSymbol.call(void 0, targetSymbol);
|
|
6607
6614
|
const targetMarketPriceRef = _react.useRef.call(void 0, null);
|
|
6608
6615
|
_react.useEffect.call(void 0, () => {
|
|
6609
6616
|
targetMarketPriceRef.current = null;
|
|
@@ -6611,7 +6618,7 @@ function DepositFlow({
|
|
|
6611
6618
|
return;
|
|
6612
6619
|
}
|
|
6613
6620
|
let cancelled = false;
|
|
6614
|
-
|
|
6621
|
+
_chunk6ZJTZ7DScjs.fetchTokenPriceUsd.call(void 0, service, {
|
|
6615
6622
|
chainId: targetChainId,
|
|
6616
6623
|
address: targetToken,
|
|
6617
6624
|
symbol: targetSymbol
|
|
@@ -6632,7 +6639,7 @@ function DepositFlow({
|
|
|
6632
6639
|
return {
|
|
6633
6640
|
ownerAddress: walletClientProp.account.address,
|
|
6634
6641
|
walletClient: walletClientProp,
|
|
6635
|
-
publicClient: _nullishCoalesce(publicClientProp, () => (
|
|
6642
|
+
publicClient: _nullishCoalesce(publicClientProp, () => ( _chunkLBJFACLHcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
6636
6643
|
switchChain: dappSwitchChain
|
|
6637
6644
|
};
|
|
6638
6645
|
}
|
|
@@ -6649,7 +6656,7 @@ function DepositFlow({
|
|
|
6649
6656
|
return {
|
|
6650
6657
|
ownerAddress: walletClientProp.account.address,
|
|
6651
6658
|
walletClient: walletClientProp,
|
|
6652
|
-
publicClient: _nullishCoalesce(publicClientProp, () => (
|
|
6659
|
+
publicClient: _nullishCoalesce(publicClientProp, () => ( _chunkLBJFACLHcjs.getPublicClient.call(void 0, fallbackChainId, rpcUrls))),
|
|
6653
6660
|
switchChain: dappSwitchChain
|
|
6654
6661
|
};
|
|
6655
6662
|
}
|
|
@@ -6657,7 +6664,7 @@ function DepositFlow({
|
|
|
6657
6664
|
return {
|
|
6658
6665
|
ownerAddress: reownWallet.address,
|
|
6659
6666
|
walletClient: reownWallet.walletClient,
|
|
6660
|
-
publicClient: _nullishCoalesce(reownWallet.publicClient, () => (
|
|
6667
|
+
publicClient: _nullishCoalesce(reownWallet.publicClient, () => ( _chunkLBJFACLHcjs.getPublicClient.call(void 0, setupChainId, rpcUrls))),
|
|
6661
6668
|
switchChain: reownWallet.switchChain
|
|
6662
6669
|
};
|
|
6663
6670
|
}
|
|
@@ -6885,8 +6892,8 @@ function DepositFlow({
|
|
|
6885
6892
|
pred_balance: totalBalanceUsd
|
|
6886
6893
|
})]);
|
|
6887
6894
|
} else if (effectiveStep.type === "deposit-address") {
|
|
6888
|
-
const chainName =
|
|
6889
|
-
const tokenSymbol =
|
|
6895
|
+
const chainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChainId);
|
|
6896
|
+
const tokenSymbol = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
6890
6897
|
_optionalChain([onEventRef, 'access', _205 => _205.current, 'optionalCall', _206 => _206({
|
|
6891
6898
|
type: "deposit_modal_transfer_crypto_open",
|
|
6892
6899
|
default_chain: chainName,
|
|
@@ -6894,7 +6901,7 @@ function DepositFlow({
|
|
|
6894
6901
|
pred_balance: totalBalanceUsd
|
|
6895
6902
|
})]);
|
|
6896
6903
|
} else if (effectiveStep.type === "amount" && stepSendToken) {
|
|
6897
|
-
const receiveSymbol =
|
|
6904
|
+
const receiveSymbol = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
6898
6905
|
_optionalChain([onEventRef, 'access', _207 => _207.current, 'optionalCall', _208 => _208({
|
|
6899
6906
|
type: "deposit_modal_connected_wallet_enter_value_open",
|
|
6900
6907
|
send_token: stepSendToken,
|
|
@@ -7012,7 +7019,7 @@ function DepositFlow({
|
|
|
7012
7019
|
eoa: dappImportOwner,
|
|
7013
7020
|
getPublicClient: (chainId) => {
|
|
7014
7021
|
try {
|
|
7015
|
-
return
|
|
7022
|
+
return _chunkLBJFACLHcjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
7016
7023
|
} catch (e33) {
|
|
7017
7024
|
return null;
|
|
7018
7025
|
}
|
|
@@ -7237,7 +7244,7 @@ function DepositFlow({
|
|
|
7237
7244
|
acceptedExchangeFeeBps: disclosedFeeBps
|
|
7238
7245
|
});
|
|
7239
7246
|
} catch (error) {
|
|
7240
|
-
if (error instanceof
|
|
7247
|
+
if (error instanceof _chunkLBJFACLHcjs.SwappedConnectFeeChangedError) {
|
|
7241
7248
|
return error.exchangeFeeBps;
|
|
7242
7249
|
}
|
|
7243
7250
|
throw error;
|
|
@@ -7488,17 +7495,17 @@ function DepositFlow({
|
|
|
7488
7495
|
forceRegister
|
|
7489
7496
|
]
|
|
7490
7497
|
);
|
|
7491
|
-
const desiredSetupRequestKey =
|
|
7498
|
+
const desiredSetupRequestKey = _chunk6ZJTZ7DScjs.computeRequestKey.call(void 0, setupInput);
|
|
7492
7499
|
const setupReady = setupSlice.status === "ready" && setupSlice.requestKey === desiredSetupRequestKey;
|
|
7493
7500
|
_react.useEffect.call(void 0, () => {
|
|
7494
7501
|
void (async () => {
|
|
7495
|
-
const requestKey =
|
|
7496
|
-
const cacheKey =
|
|
7497
|
-
const cacheable =
|
|
7502
|
+
const requestKey = _chunk6ZJTZ7DScjs.computeRequestKey.call(void 0, setupInput);
|
|
7503
|
+
const cacheKey = _chunk6ZJTZ7DScjs.computeCacheKey.call(void 0, setupInput);
|
|
7504
|
+
const cacheable = _chunk6ZJTZ7DScjs.computeIsCacheable.call(void 0, setupInput);
|
|
7498
7505
|
if (storeApi.getState().setup.requestKey === requestKey) {
|
|
7499
7506
|
return;
|
|
7500
7507
|
}
|
|
7501
|
-
const dedupedResult =
|
|
7508
|
+
const dedupedResult = _chunk6ZJTZ7DScjs.readDedupedAccountSetupResult.call(void 0, requestKey);
|
|
7502
7509
|
if (dedupedResult) {
|
|
7503
7510
|
storeApi.dispatch({
|
|
7504
7511
|
type: "setup/started",
|
|
@@ -7524,7 +7531,7 @@ function DepositFlow({
|
|
|
7524
7531
|
cacheable
|
|
7525
7532
|
});
|
|
7526
7533
|
try {
|
|
7527
|
-
const result = await
|
|
7534
|
+
const result = await _chunk6ZJTZ7DScjs.runAccountSetupDeduped.call(void 0,
|
|
7528
7535
|
setupInput,
|
|
7529
7536
|
{ service, debug },
|
|
7530
7537
|
requestKey
|
|
@@ -7539,7 +7546,7 @@ function DepositFlow({
|
|
|
7539
7546
|
}
|
|
7540
7547
|
});
|
|
7541
7548
|
} catch (error) {
|
|
7542
|
-
const message = error instanceof
|
|
7549
|
+
const message = error instanceof _chunk6ZJTZ7DScjs.SetupError ? error.message : "Deposit service is temporarily unavailable. Please try again shortly.";
|
|
7543
7550
|
storeApi.dispatch({
|
|
7544
7551
|
type: "setup/failed",
|
|
7545
7552
|
requestKey,
|
|
@@ -7588,7 +7595,7 @@ function DepositFlow({
|
|
|
7588
7595
|
address,
|
|
7589
7596
|
requestId,
|
|
7590
7597
|
totalUsd: portfolio.totalUsd,
|
|
7591
|
-
chainIds:
|
|
7598
|
+
chainIds: _chunkLBJFACLHcjs.chainIdsByValue.call(void 0, portfolio.tokens)
|
|
7592
7599
|
});
|
|
7593
7600
|
} catch (e34) {
|
|
7594
7601
|
storeApi.dispatch({
|
|
@@ -7627,8 +7634,8 @@ function DepositFlow({
|
|
|
7627
7634
|
);
|
|
7628
7635
|
const handleSolanaAmountContinue = _react.useCallback.call(void 0,
|
|
7629
7636
|
(token, sourceAmount, inputAmountUsd) => {
|
|
7630
|
-
const targetSym =
|
|
7631
|
-
const isTargetStable =
|
|
7637
|
+
const targetSym = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
7638
|
+
const isTargetStable = _chunk4R2ZHSDQcjs.isStablecoinSymbol.call(void 0, targetSym);
|
|
7632
7639
|
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
7633
7640
|
logFlow("solana:amount:continue", {
|
|
7634
7641
|
token: token.symbol,
|
|
@@ -7705,8 +7712,8 @@ function DepositFlow({
|
|
|
7705
7712
|
(amount, targetAmount, balance) => {
|
|
7706
7713
|
const entry = storeApi.getState().setup;
|
|
7707
7714
|
if (entry.status !== "ready") return;
|
|
7708
|
-
const targetSym =
|
|
7709
|
-
const isTargetStable =
|
|
7715
|
+
const targetSym = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
7716
|
+
const isTargetStable = _chunk4R2ZHSDQcjs.isStablecoinSymbol.call(void 0, targetSym);
|
|
7710
7717
|
const targetTokenPriceUsd = isTargetStable ? 1 : targetMarketPriceRef.current;
|
|
7711
7718
|
storeApi.dispatch({
|
|
7712
7719
|
type: "amount/entered",
|
|
@@ -7839,9 +7846,9 @@ function DepositFlow({
|
|
|
7839
7846
|
[logFlowError, onLifecycleRef]
|
|
7840
7847
|
);
|
|
7841
7848
|
const handleError = _react.useCallback.call(void 0,
|
|
7842
|
-
(message, code) => {
|
|
7843
|
-
logFlowError("flow:error", message, { code });
|
|
7844
|
-
_optionalChain([onErrorRef, 'access', _251 => _251.current, 'optionalCall', _252 => _252({ message, code })]);
|
|
7849
|
+
(message, code, cause) => {
|
|
7850
|
+
logFlowError("flow:error", _nullishCoalesce(cause, () => ( message)), { code });
|
|
7851
|
+
_optionalChain([onErrorRef, 'access', _251 => _251.current, 'optionalCall', _252 => _252({ message, code, cause })]);
|
|
7845
7852
|
},
|
|
7846
7853
|
[logFlowError, onErrorRef]
|
|
7847
7854
|
);
|
|
@@ -7981,8 +7988,8 @@ function DepositFlow({
|
|
|
7981
7988
|
onDepositComplete: handleDepositComplete,
|
|
7982
7989
|
onDepositFailed: handleDepositFailed,
|
|
7983
7990
|
onCopyAddress: () => {
|
|
7984
|
-
const chainName =
|
|
7985
|
-
const tokenSymbol =
|
|
7991
|
+
const chainName = _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChainId);
|
|
7992
|
+
const tokenSymbol = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
7986
7993
|
_optionalChain([onEvent, 'optionalCall', _256 => _256({
|
|
7987
7994
|
type: "deposit_modal_transfer_crypto_cta_click",
|
|
7988
7995
|
default_chain: chainName,
|
|
@@ -8030,7 +8037,7 @@ function DepositFlow({
|
|
|
8030
8037
|
}
|
|
8031
8038
|
),
|
|
8032
8039
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8033
|
-
|
|
8040
|
+
_chunk6ZJTZ7DScjs.ProcessingStep,
|
|
8034
8041
|
{
|
|
8035
8042
|
smartAccount: step.smartAccount,
|
|
8036
8043
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -8102,7 +8109,7 @@ function DepositFlow({
|
|
|
8102
8109
|
}
|
|
8103
8110
|
),
|
|
8104
8111
|
step.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8105
|
-
|
|
8112
|
+
_chunk6ZJTZ7DScjs.ProcessingStep,
|
|
8106
8113
|
{
|
|
8107
8114
|
smartAccount: step.smartAccount,
|
|
8108
8115
|
solanaDepositAddress: step.solanaDepositAddress,
|
|
@@ -8168,8 +8175,8 @@ function DepositFlow({
|
|
|
8168
8175
|
defaultAmount: effectiveStep.inputAmountUsd,
|
|
8169
8176
|
uiConfig,
|
|
8170
8177
|
targetChain,
|
|
8171
|
-
targetChainName:
|
|
8172
|
-
targetTokenSymbol:
|
|
8178
|
+
targetChainName: _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChainId),
|
|
8179
|
+
targetTokenSymbol: _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId),
|
|
8173
8180
|
appBalanceUsd,
|
|
8174
8181
|
onContinue: handleSolanaAmountContinue,
|
|
8175
8182
|
debug
|
|
@@ -8231,7 +8238,7 @@ function DepositFlow({
|
|
|
8231
8238
|
) })
|
|
8232
8239
|
] }) : null,
|
|
8233
8240
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8234
|
-
|
|
8241
|
+
_chunk6ZJTZ7DScjs.ProcessingStep,
|
|
8235
8242
|
{
|
|
8236
8243
|
smartAccount: effectiveStep.smartAccount,
|
|
8237
8244
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -8318,7 +8325,7 @@ function DepositFlow({
|
|
|
8318
8325
|
if (_optionalChain([signerContext, 'access', _271 => _271.publicClient, 'access', _272 => _272.chain, 'optionalAccess', _273 => _273.id]) === chainId) {
|
|
8319
8326
|
return signerContext.publicClient;
|
|
8320
8327
|
}
|
|
8321
|
-
return
|
|
8328
|
+
return _chunkLBJFACLHcjs.getPublicClient.call(void 0, chainId, rpcUrls);
|
|
8322
8329
|
};
|
|
8323
8330
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-body", children: [
|
|
8324
8331
|
effectiveStep.type === "setup" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -8370,7 +8377,7 @@ function DepositFlow({
|
|
|
8370
8377
|
service,
|
|
8371
8378
|
onContinue: handleAmountContinue,
|
|
8372
8379
|
onCtaClick: (ctaName) => {
|
|
8373
|
-
const receiveSymbol =
|
|
8380
|
+
const receiveSymbol = _chunk4R2ZHSDQcjs.getTargetTokenSymbol.call(void 0, targetToken, targetChainId);
|
|
8374
8381
|
_optionalChain([onEvent, 'optionalCall', _279 => _279({
|
|
8375
8382
|
type: "deposit_modal_connected_wallet_enter_value_cta_click",
|
|
8376
8383
|
send_token: effectiveStep.asset.symbol,
|
|
@@ -8429,7 +8436,7 @@ function DepositFlow({
|
|
|
8429
8436
|
}
|
|
8430
8437
|
),
|
|
8431
8438
|
effectiveStep.type === "processing" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8432
|
-
|
|
8439
|
+
_chunk6ZJTZ7DScjs.ProcessingStep,
|
|
8433
8440
|
{
|
|
8434
8441
|
smartAccount: effectiveStep.smartAccount,
|
|
8435
8442
|
solanaDepositAddress: effectiveStep.solanaDepositAddress,
|
|
@@ -8482,9 +8489,9 @@ function formatDate(iso) {
|
|
|
8482
8489
|
function resolveChainId(value) {
|
|
8483
8490
|
if (value === void 0 || value === null) return null;
|
|
8484
8491
|
if (typeof value === "number") return value;
|
|
8485
|
-
if (
|
|
8486
|
-
if (
|
|
8487
|
-
const parsed =
|
|
8492
|
+
if (_chunk4R2ZHSDQcjs.isSolanaCaip2.call(void 0, value) || value === "solana") return "solana";
|
|
8493
|
+
if (_chunk4R2ZHSDQcjs.isHyperCoreCaip2.call(void 0, value) || value === "hypercore") return "hypercore";
|
|
8494
|
+
const parsed = _chunk4R2ZHSDQcjs.parseEvmChainId.call(void 0, value);
|
|
8488
8495
|
if (parsed !== null) return parsed;
|
|
8489
8496
|
const num = Number(value);
|
|
8490
8497
|
return Number.isFinite(num) ? num : null;
|
|
@@ -8493,7 +8500,7 @@ function resolveTokenSymbol(token, chainId) {
|
|
|
8493
8500
|
if (!token) return "";
|
|
8494
8501
|
if (chainId === "solana") {
|
|
8495
8502
|
const normalized = token.toLowerCase();
|
|
8496
|
-
const matched =
|
|
8503
|
+
const matched = _chunk4R2ZHSDQcjs.SOLANA_TOKENS.find(
|
|
8497
8504
|
(entry) => entry.mint.toLowerCase() === normalized
|
|
8498
8505
|
);
|
|
8499
8506
|
if (matched) return matched.symbol;
|
|
@@ -8502,8 +8509,8 @@ function resolveTokenSymbol(token, chainId) {
|
|
|
8502
8509
|
}
|
|
8503
8510
|
}
|
|
8504
8511
|
if (chainId !== null && chainId !== void 0 && chainId !== "solana" && /^0x[a-fA-F0-9]{40}$/.test(token)) {
|
|
8505
|
-
const evmChainId = chainId === "hypercore" ?
|
|
8506
|
-
const sym =
|
|
8512
|
+
const evmChainId = chainId === "hypercore" ? _chunk4R2ZHSDQcjs.HYPERCORE_CHAIN_ID : chainId;
|
|
8513
|
+
const sym = _chunk4R2ZHSDQcjs.getTokenSymbol.call(void 0, token, evmChainId);
|
|
8507
8514
|
if (sym !== "Token") return sym;
|
|
8508
8515
|
}
|
|
8509
8516
|
return shortenHash(token);
|
|
@@ -8514,7 +8521,7 @@ function formatAmount(rawAmount, token, chainId) {
|
|
|
8514
8521
|
if (token && chainId !== null && chainId !== void 0) {
|
|
8515
8522
|
if (chainId === "solana") {
|
|
8516
8523
|
const normalized = token.toLowerCase();
|
|
8517
|
-
const matched =
|
|
8524
|
+
const matched = _chunk4R2ZHSDQcjs.SOLANA_TOKENS.find(
|
|
8518
8525
|
(entry) => entry.mint.toLowerCase() === normalized
|
|
8519
8526
|
);
|
|
8520
8527
|
if (matched) {
|
|
@@ -8523,8 +8530,8 @@ function formatAmount(rawAmount, token, chainId) {
|
|
|
8523
8530
|
decimals = 9;
|
|
8524
8531
|
}
|
|
8525
8532
|
} else if (/^0x[a-fA-F0-9]{40}$/.test(token)) {
|
|
8526
|
-
const evmChainId = chainId === "hypercore" ?
|
|
8527
|
-
decimals =
|
|
8533
|
+
const evmChainId = chainId === "hypercore" ? _chunk4R2ZHSDQcjs.HYPERCORE_CHAIN_ID : chainId;
|
|
8534
|
+
decimals = _chunk4R2ZHSDQcjs.getTokenDecimalsByAddress.call(void 0, token, evmChainId);
|
|
8528
8535
|
}
|
|
8529
8536
|
}
|
|
8530
8537
|
try {
|
|
@@ -8542,7 +8549,7 @@ function formatAmount(rawAmount, token, chainId) {
|
|
|
8542
8549
|
}
|
|
8543
8550
|
function getTxExplorerUrl(txHash, chainId) {
|
|
8544
8551
|
if (!chainId) return null;
|
|
8545
|
-
const base2 =
|
|
8552
|
+
const base2 = _chunk4R2ZHSDQcjs.getExplorerUrl.call(void 0, chainId);
|
|
8546
8553
|
if (!base2) return null;
|
|
8547
8554
|
return `${base2}/tx/${txHash}`;
|
|
8548
8555
|
}
|
|
@@ -8607,7 +8614,7 @@ function DepositHistoryPanel({
|
|
|
8607
8614
|
className: "rs-modal-header-back",
|
|
8608
8615
|
"aria-label": "Back",
|
|
8609
8616
|
onClick: onClose,
|
|
8610
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8617
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronLeftIcon, {})
|
|
8611
8618
|
}
|
|
8612
8619
|
) }),
|
|
8613
8620
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-modal-header-nav-right", children: onCloseModal && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -8617,29 +8624,29 @@ function DepositHistoryPanel({
|
|
|
8617
8624
|
className: "rs-modal-close",
|
|
8618
8625
|
"aria-label": "Close",
|
|
8619
8626
|
onClick: onCloseModal,
|
|
8620
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8627
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CloseIcon, {})
|
|
8621
8628
|
}
|
|
8622
8629
|
) })
|
|
8623
8630
|
] }),
|
|
8624
8631
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen", children: [
|
|
8625
8632
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-screen-body", children: [
|
|
8626
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8633
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.BodyHeader, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.HistoryIcon, {}), title: "History" }),
|
|
8627
8634
|
isLoading && deposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
8628
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8635
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.HistoryIcon, {}) }),
|
|
8629
8636
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
8630
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8637
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.Spinner, { className: "rs-spinner--sm" }),
|
|
8631
8638
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Loading history\u2026" })
|
|
8632
8639
|
] })
|
|
8633
8640
|
] }),
|
|
8634
8641
|
error && !isLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
8635
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8642
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.AlertTriangleIcon, {}) }),
|
|
8636
8643
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
8637
8644
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "Couldn't load history" }),
|
|
8638
8645
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: error })
|
|
8639
8646
|
] })
|
|
8640
8647
|
] }),
|
|
8641
8648
|
!isLoading && !error && visibleDeposits.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty", children: [
|
|
8642
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8649
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-glyph", "aria-hidden": "true", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.HistoryIcon, {}) }),
|
|
8643
8650
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-empty-text", children: [
|
|
8644
8651
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-title", children: "No deposits yet" }),
|
|
8645
8652
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-empty-hint", children: "Your deposit history will appear here" })
|
|
@@ -8659,7 +8666,7 @@ function DepositHistoryPanel({
|
|
|
8659
8666
|
)
|
|
8660
8667
|
] })
|
|
8661
8668
|
] }),
|
|
8662
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8669
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.PoweredBy, {})
|
|
8663
8670
|
] })
|
|
8664
8671
|
]
|
|
8665
8672
|
}
|
|
@@ -8670,10 +8677,10 @@ function HistoryCard({ deposit }) {
|
|
|
8670
8677
|
const status = normalizeStatus(deposit.status, deposit.isSpam);
|
|
8671
8678
|
const sourceChainId = resolveChainId(deposit.chain);
|
|
8672
8679
|
const targetChainId = resolveChainId(deposit.targetChain);
|
|
8673
|
-
const sourceChainName = sourceChainId ?
|
|
8674
|
-
const targetChainName = targetChainId ?
|
|
8675
|
-
const sourceChainIcon = sourceChainId ?
|
|
8676
|
-
const targetChainIcon = targetChainId ?
|
|
8680
|
+
const sourceChainName = sourceChainId ? _chunk4R2ZHSDQcjs.getChainName.call(void 0, sourceChainId) : null;
|
|
8681
|
+
const targetChainName = targetChainId ? _chunk4R2ZHSDQcjs.getChainName.call(void 0, targetChainId) : null;
|
|
8682
|
+
const sourceChainIcon = sourceChainId ? _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, sourceChainId) : void 0;
|
|
8683
|
+
const targetChainIcon = targetChainId ? _chunk4R2ZHSDQcjs.getChainIcon.call(void 0, targetChainId) : void 0;
|
|
8677
8684
|
const sourceSymbol = resolveTokenSymbol(deposit.token, sourceChainId);
|
|
8678
8685
|
const rawAmount = deposit.sourceAmount && deposit.sourceAmount !== "0" ? deposit.sourceAmount : deposit.amount;
|
|
8679
8686
|
const formattedAmount = rawAmount ? formatAmount(rawAmount, deposit.token, sourceChainId) : null;
|
|
@@ -8695,8 +8702,8 @@ function HistoryCard({ deposit }) {
|
|
|
8695
8702
|
children: [
|
|
8696
8703
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-row", children: [
|
|
8697
8704
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-icons", children: [
|
|
8698
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-token", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8699
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-chain", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8705
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-token", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.TokenIcon, { symbol: sourceSymbol, fallback: sourceSymbol.slice(0, 2) }) }),
|
|
8706
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-chain", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
8700
8707
|
] }),
|
|
8701
8708
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-history-card-text", children: [
|
|
8702
8709
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-history-card-title", children: txTypeLabel }),
|
|
@@ -8712,14 +8719,14 @@ function HistoryCard({ deposit }) {
|
|
|
8712
8719
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Source chain" }),
|
|
8713
8720
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-detail-value", children: [
|
|
8714
8721
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: sourceChainName }),
|
|
8715
|
-
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8722
|
+
sourceChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: sourceChainIcon }) })
|
|
8716
8723
|
] })
|
|
8717
8724
|
] }),
|
|
8718
8725
|
targetChainName && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
8719
8726
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "Destination chain" }),
|
|
8720
8727
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "rs-amount-detail-value", children: [
|
|
8721
8728
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: targetChainName }),
|
|
8722
|
-
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8729
|
+
targetChainIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-amount-detail-icon", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: targetChainIcon }) })
|
|
8723
8730
|
] })
|
|
8724
8731
|
] }),
|
|
8725
8732
|
srcTxUrl && srcTxHash && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-amount-detail-row", children: [
|
|
@@ -8734,7 +8741,7 @@ function HistoryCard({ deposit }) {
|
|
|
8734
8741
|
onClick: (e) => e.stopPropagation(),
|
|
8735
8742
|
children: [
|
|
8736
8743
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: shortenHash(srcTxHash) }),
|
|
8737
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8744
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ArrowUpRightIcon, {})
|
|
8738
8745
|
]
|
|
8739
8746
|
}
|
|
8740
8747
|
)
|
|
@@ -8749,7 +8756,7 @@ DepositHistoryPanel.displayName = "DepositHistoryPanel";
|
|
|
8749
8756
|
// src/DepositModal.tsx
|
|
8750
8757
|
|
|
8751
8758
|
var ReownDepositInner = _react.lazy.call(void 0,
|
|
8752
|
-
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-
|
|
8759
|
+
() => Promise.resolve().then(() => _interopRequireWildcard(require("./DepositModalReown-PZXHTPIS.cjs"))).then((m) => ({ default: m.DepositModalReown }))
|
|
8753
8760
|
);
|
|
8754
8761
|
function sortByCreatedAtDesc(items) {
|
|
8755
8762
|
return [...items].sort((a, b) => {
|
|
@@ -8763,8 +8770,8 @@ function hasSuppliedWalletClient(props) {
|
|
|
8763
8770
|
return Object.prototype.hasOwnProperty.call(props, WALLET_CLIENT_PROP);
|
|
8764
8771
|
}
|
|
8765
8772
|
function DepositModal(props) {
|
|
8766
|
-
|
|
8767
|
-
|
|
8773
|
+
_chunk6ZJTZ7DScjs.warnRemovedProps.call(void 0, "DepositModal", props);
|
|
8774
|
+
_chunkLBJFACLHcjs.checkBackendUrl.call(void 0, "DepositModal", props.backendUrl);
|
|
8768
8775
|
const needsReown = !!props.reownAppId;
|
|
8769
8776
|
const hasWalletClientProp = hasSuppliedWalletClient(props);
|
|
8770
8777
|
if (needsReown) {
|
|
@@ -8826,14 +8833,13 @@ function DepositModalInner({
|
|
|
8826
8833
|
debug
|
|
8827
8834
|
}) {
|
|
8828
8835
|
const modalRef = _react.useRef.call(void 0, null);
|
|
8829
|
-
const onReadyRef =
|
|
8836
|
+
const onReadyRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onReady);
|
|
8830
8837
|
const [currentScreen, setCurrentScreen] = _react.useState.call(void 0, "connect");
|
|
8831
8838
|
const [swappedImmersive, setSwappedImmersive] = _react.useState.call(void 0, false);
|
|
8832
8839
|
const [backHandler, setBackHandler] = _react.useState.call(void 0,
|
|
8833
8840
|
void 0
|
|
8834
8841
|
);
|
|
8835
|
-
const
|
|
8836
|
-
const historyButtonVisible = showHistoryButton && (currentScreen === "select-asset" || currentScreen === "deposit-address");
|
|
8842
|
+
const historyButtonVisible = currentScreen === "connect";
|
|
8837
8843
|
const [historyOpen, setHistoryOpen] = _react.useState.call(void 0, false);
|
|
8838
8844
|
const [historyDeposits, setHistoryDeposits] = _react.useState.call(void 0, []);
|
|
8839
8845
|
const [hasMoreHistory, setHasMoreHistory] = _react.useState.call(void 0, false);
|
|
@@ -8843,11 +8849,11 @@ function DepositModalInner({
|
|
|
8843
8849
|
const cursorRef = _react.useRef.call(void 0, null);
|
|
8844
8850
|
const historyStaleRef = _react.useRef.call(void 0, false);
|
|
8845
8851
|
const historyLoadedRef = _react.useRef.call(void 0, false);
|
|
8846
|
-
const targetChain = targetChainProp === "solana" || targetChainProp ===
|
|
8847
|
-
const sourceChain = sourceChainProp ?
|
|
8848
|
-
const rpcUrls =
|
|
8852
|
+
const targetChain = targetChainProp === "solana" || targetChainProp === _chunk4R2ZHSDQcjs.HYPERCORE_SPOT_CAIP2 ? targetChainProp : _chunk4R2ZHSDQcjs.getChainId.call(void 0, targetChainProp);
|
|
8853
|
+
const sourceChain = sourceChainProp ? _chunk4R2ZHSDQcjs.getChainId.call(void 0, sourceChainProp) : void 0;
|
|
8854
|
+
const rpcUrls = _chunkLBJFACLHcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
8849
8855
|
const service = _react.useMemo.call(void 0,
|
|
8850
|
-
() =>
|
|
8856
|
+
() => _chunkLBJFACLHcjs.createDepositService.call(void 0, backendUrl, {
|
|
8851
8857
|
debug,
|
|
8852
8858
|
debugScope: "service:deposit"
|
|
8853
8859
|
}),
|
|
@@ -8881,12 +8887,12 @@ function DepositModalInner({
|
|
|
8881
8887
|
}, [store, targetChain, targetToken]);
|
|
8882
8888
|
_react.useEffect.call(void 0, () => {
|
|
8883
8889
|
if (isOpen && modalRef.current) {
|
|
8884
|
-
|
|
8890
|
+
_chunkLBJFACLHcjs.applyTheme.call(void 0, modalRef.current, theme);
|
|
8885
8891
|
}
|
|
8886
8892
|
}, [isOpen, theme]);
|
|
8887
8893
|
_react.useEffect.call(void 0, () => {
|
|
8888
8894
|
if (isOpen) {
|
|
8889
|
-
_optionalChain([onReadyRef, 'access',
|
|
8895
|
+
_optionalChain([onReadyRef, 'access', _283 => _283.current, 'optionalCall', _284 => _284()]);
|
|
8890
8896
|
}
|
|
8891
8897
|
}, [isOpen, onReadyRef]);
|
|
8892
8898
|
const handleStepChange = _react.useCallback.call(void 0,
|
|
@@ -8962,18 +8968,18 @@ function DepositModalInner({
|
|
|
8962
8968
|
fetchHistory("initial");
|
|
8963
8969
|
}
|
|
8964
8970
|
}, [historyOpen, fetchHistory]);
|
|
8965
|
-
const onLifecycleRef =
|
|
8971
|
+
const onLifecycleRef = _chunkLBJFACLHcjs.useLatestRef.call(void 0, onLifecycle);
|
|
8966
8972
|
const handleLifecycle = _react.useCallback.call(void 0,
|
|
8967
8973
|
(event) => {
|
|
8968
|
-
_optionalChain([onLifecycleRef, 'access',
|
|
8974
|
+
_optionalChain([onLifecycleRef, 'access', _285 => _285.current, 'optionalCall', _286 => _286(event)]);
|
|
8969
8975
|
if (event.type === "smart-account-changed" && !event.evm && !event.solana) {
|
|
8970
8976
|
historyStaleRef.current = true;
|
|
8971
8977
|
}
|
|
8972
|
-
if (
|
|
8978
|
+
if (event.type === "submitted" || event.type === "complete" || event.type === "failed") {
|
|
8973
8979
|
markHistoryStale();
|
|
8974
8980
|
}
|
|
8975
8981
|
},
|
|
8976
|
-
[onLifecycleRef,
|
|
8982
|
+
[onLifecycleRef, markHistoryStale]
|
|
8977
8983
|
);
|
|
8978
8984
|
_react.useEffect.call(void 0, () => {
|
|
8979
8985
|
if (!isOpen) {
|
|
@@ -8994,12 +9000,12 @@ function DepositModalInner({
|
|
|
8994
9000
|
store.dispatch({ type: "flow/reset" });
|
|
8995
9001
|
}
|
|
8996
9002
|
}, [isOpen, store]);
|
|
8997
|
-
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess',
|
|
9003
|
+
const showBackButton = _nullishCoalesce(_optionalChain([uiConfig, 'optionalAccess', _287 => _287.showBackButton]), () => ( true));
|
|
8998
9004
|
const canGoBack = backHandler !== void 0;
|
|
8999
9005
|
const hideHeaderChrome = swappedImmersive;
|
|
9000
9006
|
const modalClassName = `rs-modal${hideHeaderChrome ? " rs-modal--swapped-iframe" : ""}`;
|
|
9001
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9002
|
-
|
|
9007
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.RpcUrlsProvider, { value: rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChainCatalogProvider, { service, rpcUrls, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositStoreProvider, { store, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9008
|
+
_chunkLBJFACLHcjs.Modal,
|
|
9003
9009
|
{
|
|
9004
9010
|
isOpen,
|
|
9005
9011
|
onClose,
|
|
@@ -9015,7 +9021,7 @@ function DepositModalInner({
|
|
|
9015
9021
|
className: "rs-modal-header-back",
|
|
9016
9022
|
"aria-label": "Go back",
|
|
9017
9023
|
onClick: backHandler,
|
|
9018
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9024
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronLeftIcon, {})
|
|
9019
9025
|
}
|
|
9020
9026
|
) }),
|
|
9021
9027
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-modal-header-nav-right", children: [
|
|
@@ -9027,7 +9033,7 @@ function DepositModalInner({
|
|
|
9027
9033
|
"aria-label": "Deposit history",
|
|
9028
9034
|
onClick: handleHistoryOpen,
|
|
9029
9035
|
disabled: !recipient,
|
|
9030
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9036
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.HistoryIcon, {})
|
|
9031
9037
|
}
|
|
9032
9038
|
),
|
|
9033
9039
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -9037,7 +9043,7 @@ function DepositModalInner({
|
|
|
9037
9043
|
onClick: onClose,
|
|
9038
9044
|
className: "rs-modal-close",
|
|
9039
9045
|
"aria-label": "Close",
|
|
9040
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9046
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CloseIcon, {})
|
|
9041
9047
|
}
|
|
9042
9048
|
)
|
|
9043
9049
|
] })
|
|
@@ -9071,7 +9077,7 @@ function DepositModalInner({
|
|
|
9071
9077
|
onDisconnect,
|
|
9072
9078
|
onRequestConnect,
|
|
9073
9079
|
uiConfig,
|
|
9074
|
-
appFees: _optionalChain([clientSetup, 'optionalAccess',
|
|
9080
|
+
appFees: _optionalChain([clientSetup, 'optionalAccess', _288 => _288.appFees]),
|
|
9075
9081
|
appFeesResolved: clientSetup !== null,
|
|
9076
9082
|
onStepChange: handleStepChange,
|
|
9077
9083
|
onSwappedImmersiveChange: setSwappedImmersive,
|
|
@@ -9082,7 +9088,7 @@ function DepositModalInner({
|
|
|
9082
9088
|
debug
|
|
9083
9089
|
}
|
|
9084
9090
|
),
|
|
9085
|
-
|
|
9091
|
+
historyOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9086
9092
|
DepositHistoryPanel,
|
|
9087
9093
|
{
|
|
9088
9094
|
deposits: historyDeposits,
|