@rhinestone/deposit-modal 0.11.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DepositModalReown-YGB73NMW.cjs → DepositModalReown-CH6FUTCR.cjs} +17 -17
- package/dist/{DepositModalReown-MO5QDLIT.mjs → DepositModalReown-SXAXHYTN.mjs} +7 -7
- package/dist/{chunk-SSQ27YFB.cjs → chunk-2BOEUV6B.cjs} +543 -540
- package/dist/{chunk-CWGUBFJL.mjs → chunk-2K44IE3V.mjs} +18 -23
- package/dist/{chunk-53IFZGSF.mjs → chunk-3STTWRAN.mjs} +0 -10
- package/dist/{chunk-MZ53PDIX.mjs → chunk-4ZXQPFNU.mjs} +1 -1
- package/dist/{chunk-ZQR36NCV.cjs → chunk-65MLWUQD.cjs} +95 -100
- package/dist/{chunk-JPRV36DT.cjs → chunk-75DVGSAX.cjs} +2 -2
- package/dist/{chunk-4FTI3GTB.cjs → chunk-DMYA7U53.cjs} +1 -1
- package/dist/{chunk-HUHBNYD3.cjs → chunk-FKHPVLJY.cjs} +81 -81
- package/dist/{chunk-YELNYILK.mjs → chunk-KPWB2JAX.mjs} +287 -284
- package/dist/{chunk-V6T7LORJ.mjs → chunk-NHGFU3WC.mjs} +1 -1
- package/dist/{chunk-URFSTNRS.mjs → chunk-O2TQLD4I.mjs} +1 -1
- package/dist/{chunk-OWYPKCYD.mjs → chunk-O4AXBFHU.mjs} +4 -4
- package/dist/{chunk-TENL4H64.cjs → chunk-O7BCVQ6L.cjs} +4 -14
- package/dist/{chunk-5746YXKC.mjs → chunk-PVWZN66D.mjs} +6 -6
- package/dist/{chunk-EIWOVX53.mjs → chunk-TQWEGW3A.mjs} +3 -3
- package/dist/{chunk-FVUXJ3RP.cjs → chunk-TYBMAUGH.cjs} +3 -3
- package/dist/{chunk-ZRIRCIQM.cjs → chunk-UGK4JRK6.cjs} +62 -62
- package/dist/{chunk-LQGYPM5B.cjs → chunk-ZLCY33FQ.cjs} +79 -79
- 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-CsGa-HxD.d.cts → types-BO4iP6fG.d.cts} +0 -1
- package/dist/{types-DdS8OySJ.d.ts → types-oFblf65g.d.ts} +0 -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDMYA7U53cjs = require('./chunk-DMYA7U53.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -27,10 +27,7 @@ var _chunk4FTI3GTBcjs = require('./chunk-4FTI3GTB.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var _chunkTENL4H64cjs = require('./chunk-TENL4H64.cjs');
|
|
30
|
+
var _chunkO7BCVQ6Lcjs = require('./chunk-O7BCVQ6L.cjs');
|
|
34
31
|
|
|
35
32
|
// src/components/ui/Modal.tsx
|
|
36
33
|
|
|
@@ -72,12 +69,7 @@ function Modal({
|
|
|
72
69
|
}, [isOpen]);
|
|
73
70
|
_react.useEffect.call(void 0, () => {
|
|
74
71
|
if (isOpen && contentRef.current) {
|
|
75
|
-
|
|
76
|
-
if (focusable.length > 0) {
|
|
77
|
-
focusable[0].focus();
|
|
78
|
-
} else {
|
|
79
|
-
contentRef.current.focus();
|
|
80
|
-
}
|
|
72
|
+
contentRef.current.focus();
|
|
81
73
|
}
|
|
82
74
|
}, [isOpen]);
|
|
83
75
|
_react.useEffect.call(void 0, () => {
|
|
@@ -102,7 +94,7 @@ function Modal({
|
|
|
102
94
|
const firstElement = focusable[0];
|
|
103
95
|
const lastElement = focusable[focusable.length - 1];
|
|
104
96
|
if (event.shiftKey) {
|
|
105
|
-
if (document.activeElement === firstElement) {
|
|
97
|
+
if (document.activeElement === firstElement || document.activeElement === contentRef.current) {
|
|
106
98
|
event.preventDefault();
|
|
107
99
|
lastElement.focus();
|
|
108
100
|
}
|
|
@@ -336,7 +328,7 @@ function preconnectIconCdn() {
|
|
|
336
328
|
const link = document.createElement("link");
|
|
337
329
|
link.id = "rs-icon-cdn-preconnect";
|
|
338
330
|
link.rel = "preconnect";
|
|
339
|
-
link.href =
|
|
331
|
+
link.href = _chunkO7BCVQ6Lcjs.ICON_CDN;
|
|
340
332
|
link.crossOrigin = "anonymous";
|
|
341
333
|
document.head.appendChild(link);
|
|
342
334
|
}
|
|
@@ -554,7 +546,7 @@ function parseChain(caip2, value) {
|
|
|
554
546
|
// `parseEvmChainId` returns null for `solana:`/`tron:`/`hypercore:` keys,
|
|
555
547
|
// which is the intended answer — those chains have no numeric id, and the
|
|
556
548
|
// modal addresses them by their CAIP-2 string or a sentinel.
|
|
557
|
-
chainId:
|
|
549
|
+
chainId: _chunkO7BCVQ6Lcjs.parseEvmChainId.call(void 0, caip2),
|
|
558
550
|
name,
|
|
559
551
|
testnet,
|
|
560
552
|
deposit,
|
|
@@ -583,12 +575,21 @@ function parseChainCatalog(body) {
|
|
|
583
575
|
if (chain.chainId !== null) byChainId.set(chain.chainId, chain);
|
|
584
576
|
}
|
|
585
577
|
if (all.length === 0) return null;
|
|
578
|
+
aliasHyperCoreOrigin(byCaip2, all);
|
|
586
579
|
return { all, byCaip2, byChainId };
|
|
587
580
|
}
|
|
581
|
+
function aliasHyperCoreOrigin(byCaip2, all) {
|
|
582
|
+
const origin = _nullishCoalesce(all.find((c) => _chunkO7BCVQ6Lcjs.isHyperCoreCaip2.call(void 0, c.caip2) && c.deposit), () => ( all.find((c) => _chunkO7BCVQ6Lcjs.isHyperCoreCaip2.call(void 0, c.caip2))));
|
|
583
|
+
if (!origin) return;
|
|
584
|
+
byCaip2.set(_chunkO7BCVQ6Lcjs.HYPERCORE_MAINNET_CAIP2, origin);
|
|
585
|
+
if (!byCaip2.has(_chunkO7BCVQ6Lcjs.HYPERCORE_SPOT_CAIP2)) {
|
|
586
|
+
byCaip2.set(_chunkO7BCVQ6Lcjs.HYPERCORE_SPOT_CAIP2, origin);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
588
589
|
function catalogKeyForChain(chainId) {
|
|
589
|
-
if (chainId === "solana") return
|
|
590
|
-
if (chainId === "hypercore" || chainId ===
|
|
591
|
-
return
|
|
590
|
+
if (chainId === "solana") return _chunkO7BCVQ6Lcjs.SOLANA_MAINNET_CAIP2;
|
|
591
|
+
if (chainId === "hypercore" || chainId === _chunkO7BCVQ6Lcjs.HYPERCORE_CHAIN_ID) {
|
|
592
|
+
return _chunkO7BCVQ6Lcjs.HYPERCORE_MAINNET_CAIP2;
|
|
592
593
|
}
|
|
593
594
|
return chainId;
|
|
594
595
|
}
|
|
@@ -893,7 +894,7 @@ function createDepositService(baseUrl, options) {
|
|
|
893
894
|
try {
|
|
894
895
|
const response = await fetch(apiUrl("/qr/tokens"), {
|
|
895
896
|
method: "GET",
|
|
896
|
-
headers:
|
|
897
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS
|
|
897
898
|
});
|
|
898
899
|
if (!response.ok) {
|
|
899
900
|
debugLog(debug, scope, "getTopTokens:unavailable", {
|
|
@@ -920,7 +921,7 @@ function createDepositService(baseUrl, options) {
|
|
|
920
921
|
try {
|
|
921
922
|
const response = await fetch(apiUrl("/chains"), {
|
|
922
923
|
method: "GET",
|
|
923
|
-
headers:
|
|
924
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS
|
|
924
925
|
});
|
|
925
926
|
if (!response.ok) {
|
|
926
927
|
debugLog(debug, scope, "getChains:unavailable", {
|
|
@@ -974,7 +975,7 @@ function createDepositService(baseUrl, options) {
|
|
|
974
975
|
});
|
|
975
976
|
const response = await fetch(url, {
|
|
976
977
|
method: "POST",
|
|
977
|
-
headers:
|
|
978
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
978
979
|
body: JSON.stringify({ account: params })
|
|
979
980
|
});
|
|
980
981
|
if (!response.ok) {
|
|
@@ -1007,7 +1008,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1007
1008
|
debugLog(debug, scope, "fetchPortfolio:request", { url, address });
|
|
1008
1009
|
const response = await fetch(url, {
|
|
1009
1010
|
method: "GET",
|
|
1010
|
-
headers:
|
|
1011
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS
|
|
1011
1012
|
});
|
|
1012
1013
|
if (!response.ok) {
|
|
1013
1014
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1054,7 +1055,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1054
1055
|
debugLog(debug, scope, "fetchSolanaPortfolio:request", { url, address });
|
|
1055
1056
|
const response = await fetch(url, {
|
|
1056
1057
|
method: "GET",
|
|
1057
|
-
headers:
|
|
1058
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS
|
|
1058
1059
|
});
|
|
1059
1060
|
if (!response.ok) {
|
|
1060
1061
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1084,7 +1085,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1084
1085
|
debugLog(debug, scope, "checkAccount:request", { url, address });
|
|
1085
1086
|
const response = await fetch(url, {
|
|
1086
1087
|
method: "GET",
|
|
1087
|
-
headers:
|
|
1088
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS
|
|
1088
1089
|
});
|
|
1089
1090
|
if (!response.ok) {
|
|
1090
1091
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
@@ -1119,7 +1120,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1119
1120
|
);
|
|
1120
1121
|
const response = await fetch(url, {
|
|
1121
1122
|
method: "GET",
|
|
1122
|
-
headers:
|
|
1123
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1123
1124
|
cache: "no-store"
|
|
1124
1125
|
});
|
|
1125
1126
|
if (!response.ok) {
|
|
@@ -1147,7 +1148,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1147
1148
|
);
|
|
1148
1149
|
const response = await fetch(url, {
|
|
1149
1150
|
method: "GET",
|
|
1150
|
-
headers:
|
|
1151
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1151
1152
|
cache: "no-store"
|
|
1152
1153
|
});
|
|
1153
1154
|
if (!response.ok) {
|
|
@@ -1171,7 +1172,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1171
1172
|
);
|
|
1172
1173
|
const response = await fetch(url, {
|
|
1173
1174
|
method: "GET",
|
|
1174
|
-
headers:
|
|
1175
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1175
1176
|
cache: "no-store"
|
|
1176
1177
|
});
|
|
1177
1178
|
if (!response.ok) {
|
|
@@ -1193,7 +1194,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1193
1194
|
async getPositions(address) {
|
|
1194
1195
|
const url = apiUrl(`/positions/${address}`);
|
|
1195
1196
|
debugLog(debug, scope, "getPositions:request", { url, address });
|
|
1196
|
-
const response = await fetch(url, { headers:
|
|
1197
|
+
const response = await fetch(url, { headers: _chunkDMYA7U53cjs.SERVICE_HEADERS });
|
|
1197
1198
|
if (!response.ok) {
|
|
1198
1199
|
const error = await response.json().catch(() => ({ error: "Unknown error" }));
|
|
1199
1200
|
debugError(debug, scope, "getPositions:failed", error, {
|
|
@@ -1227,7 +1228,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1227
1228
|
});
|
|
1228
1229
|
const response = await fetch(url, {
|
|
1229
1230
|
method: "POST",
|
|
1230
|
-
headers:
|
|
1231
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1231
1232
|
body: JSON.stringify({ account, market, chainId, asset, amount })
|
|
1232
1233
|
});
|
|
1233
1234
|
if (!response.ok) {
|
|
@@ -1263,7 +1264,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1263
1264
|
});
|
|
1264
1265
|
const response = await fetch(url, {
|
|
1265
1266
|
method: "POST",
|
|
1266
|
-
headers:
|
|
1267
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1267
1268
|
body: JSON.stringify({
|
|
1268
1269
|
depositWallet,
|
|
1269
1270
|
owner,
|
|
@@ -1305,7 +1306,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1305
1306
|
});
|
|
1306
1307
|
const response = await fetch(url, {
|
|
1307
1308
|
method: "GET",
|
|
1308
|
-
headers:
|
|
1309
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1309
1310
|
cache: "no-store"
|
|
1310
1311
|
});
|
|
1311
1312
|
if (!response.ok) {
|
|
@@ -1332,8 +1333,8 @@ function createDepositService(baseUrl, options) {
|
|
|
1332
1333
|
return { deposits, nextCursor };
|
|
1333
1334
|
},
|
|
1334
1335
|
async checkLiquidity(params) {
|
|
1335
|
-
if (
|
|
1336
|
-
const token =
|
|
1336
|
+
if (_chunkO7BCVQ6Lcjs.isSolanaCaip2.call(void 0, params.destinationChainId) || params.destinationChainId === "solana") {
|
|
1337
|
+
const token = _chunkO7BCVQ6Lcjs.getSolanaTokenByMint.call(void 0, params.destinationToken);
|
|
1337
1338
|
return {
|
|
1338
1339
|
hasLiquidity: true,
|
|
1339
1340
|
symbol: _nullishCoalesce(_optionalChain([token, 'optionalAccess', _40 => _40.symbol]), () => ( "Token")),
|
|
@@ -1343,7 +1344,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1343
1344
|
};
|
|
1344
1345
|
}
|
|
1345
1346
|
const searchParams = new URLSearchParams({
|
|
1346
|
-
sourceChainId:
|
|
1347
|
+
sourceChainId: _chunkO7BCVQ6Lcjs.toEvmCaip2.call(void 0, params.sourceChainId),
|
|
1347
1348
|
sourceToken: params.sourceToken,
|
|
1348
1349
|
destinationChainId: params.destinationChainId,
|
|
1349
1350
|
destinationToken: params.destinationToken,
|
|
@@ -1358,7 +1359,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1358
1359
|
});
|
|
1359
1360
|
const response = await fetch(url, {
|
|
1360
1361
|
method: "GET",
|
|
1361
|
-
headers:
|
|
1362
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1362
1363
|
cache: "no-store"
|
|
1363
1364
|
});
|
|
1364
1365
|
if (!response.ok) {
|
|
@@ -1390,7 +1391,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1390
1391
|
const body = {
|
|
1391
1392
|
account: params.account,
|
|
1392
1393
|
// HyperCore has its own CAIP-2 namespace — never the eip155 placeholder.
|
|
1393
|
-
sourceChainId: params.sourceChainId === "hypercore" ?
|
|
1394
|
+
sourceChainId: params.sourceChainId === "hypercore" ? _chunkO7BCVQ6Lcjs.HYPERCORE_MAINNET_CAIP2 : `eip155:${params.sourceChainId}`,
|
|
1394
1395
|
sourceToken: params.sourceToken,
|
|
1395
1396
|
amount: params.amount
|
|
1396
1397
|
};
|
|
@@ -1403,7 +1404,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1403
1404
|
try {
|
|
1404
1405
|
const response = await fetch(url, {
|
|
1405
1406
|
method: "POST",
|
|
1406
|
-
headers:
|
|
1407
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1407
1408
|
body: JSON.stringify(body),
|
|
1408
1409
|
cache: "no-store"
|
|
1409
1410
|
});
|
|
@@ -1440,7 +1441,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1440
1441
|
try {
|
|
1441
1442
|
const response = await fetch(url, {
|
|
1442
1443
|
method: "GET",
|
|
1443
|
-
headers:
|
|
1444
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1444
1445
|
cache: "no-store"
|
|
1445
1446
|
});
|
|
1446
1447
|
if (!response.ok) {
|
|
@@ -1470,7 +1471,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1470
1471
|
try {
|
|
1471
1472
|
const response = await fetch(url, {
|
|
1472
1473
|
method: "GET",
|
|
1473
|
-
headers:
|
|
1474
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1474
1475
|
cache: "no-store"
|
|
1475
1476
|
});
|
|
1476
1477
|
if (!response.ok) {
|
|
@@ -1495,7 +1496,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1495
1496
|
});
|
|
1496
1497
|
const response = await fetch(url, {
|
|
1497
1498
|
method: "POST",
|
|
1498
|
-
headers:
|
|
1499
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1499
1500
|
body: JSON.stringify(params)
|
|
1500
1501
|
});
|
|
1501
1502
|
if (!response.ok) {
|
|
@@ -1527,7 +1528,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1527
1528
|
});
|
|
1528
1529
|
const response = await fetch(url, {
|
|
1529
1530
|
method: "POST",
|
|
1530
|
-
headers:
|
|
1531
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1531
1532
|
body: JSON.stringify(params)
|
|
1532
1533
|
});
|
|
1533
1534
|
if (!response.ok) {
|
|
@@ -1564,7 +1565,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1564
1565
|
debugLog(debug, scope, "getSwappedConnectExchanges:request");
|
|
1565
1566
|
const response = await fetch(url, {
|
|
1566
1567
|
method: "GET",
|
|
1567
|
-
headers:
|
|
1568
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1568
1569
|
cache: "no-store"
|
|
1569
1570
|
});
|
|
1570
1571
|
if (!response.ok) {
|
|
@@ -1617,7 +1618,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1617
1618
|
try {
|
|
1618
1619
|
const response = await fetch(url, {
|
|
1619
1620
|
method: "GET",
|
|
1620
|
-
headers:
|
|
1621
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1621
1622
|
cache: "no-store"
|
|
1622
1623
|
});
|
|
1623
1624
|
if (!response.ok) {
|
|
@@ -1703,7 +1704,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1703
1704
|
try {
|
|
1704
1705
|
const response = await fetch(url, {
|
|
1705
1706
|
method: "GET",
|
|
1706
|
-
headers:
|
|
1707
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1707
1708
|
cache: "no-store"
|
|
1708
1709
|
});
|
|
1709
1710
|
if (!response.ok) {
|
|
@@ -1730,7 +1731,7 @@ function createDepositService(baseUrl, options) {
|
|
|
1730
1731
|
);
|
|
1731
1732
|
const response = await fetch(url, {
|
|
1732
1733
|
method: "GET",
|
|
1733
|
-
headers:
|
|
1734
|
+
headers: _chunkDMYA7U53cjs.SERVICE_HEADERS,
|
|
1734
1735
|
cache: "no-store"
|
|
1735
1736
|
});
|
|
1736
1737
|
if (!response.ok) return null;
|
|
@@ -1794,14 +1795,14 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1794
1795
|
const unlocked = _nullishCoalesce(_optionalChain([chainBalance, 'access', _45 => _45.balance, 'optionalAccess', _46 => _46.unlocked]), () => ( "0"));
|
|
1795
1796
|
const normalizedName = tokenData.tokenName.trim();
|
|
1796
1797
|
const isNativeSymbol = normalizedName.toUpperCase() === "ETH" || normalizedName.toUpperCase() === "ETHER";
|
|
1797
|
-
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => (
|
|
1798
|
-
const resolvedTokenAddress = isNativeSymbol ?
|
|
1798
|
+
const tokenAddress = _nullishCoalesce(_nullishCoalesce(chainBalance.tokenAddress, () => ( extractTokenAddress(tokenData, chainBalance.chainId))), () => ( _chunkO7BCVQ6Lcjs.getTokenAddress.call(void 0, tokenData.tokenName, chainBalance.chainId)));
|
|
1799
|
+
const resolvedTokenAddress = isNativeSymbol ? _chunkO7BCVQ6Lcjs.NATIVE_TOKEN_ADDRESS : tokenAddress;
|
|
1799
1800
|
if (!resolvedTokenAddress) {
|
|
1800
1801
|
continue;
|
|
1801
1802
|
}
|
|
1802
|
-
const registrySymbol =
|
|
1803
|
+
const registrySymbol = _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, resolvedTokenAddress, chainBalance.chainId);
|
|
1803
1804
|
const symbol = registrySymbol !== "Token" ? registrySymbol : normalizedName || "Token";
|
|
1804
|
-
const decimals = registrySymbol !== "Token" ?
|
|
1805
|
+
const decimals = registrySymbol !== "Token" ? _chunkO7BCVQ6Lcjs.getTokenDecimalsByAddress.call(void 0, resolvedTokenAddress, chainBalance.chainId) : _nullishCoalesce(tokenData.tokenDecimals, () => ( 18));
|
|
1805
1806
|
tokens.push({
|
|
1806
1807
|
chainId: chainBalance.chainId,
|
|
1807
1808
|
address: resolvedTokenAddress,
|
|
@@ -1821,13 +1822,13 @@ function normalizeOrchestratorPortfolio(data) {
|
|
|
1821
1822
|
function normalizeDirectToken(token) {
|
|
1822
1823
|
const rawChainId = _nullishCoalesce(extractNumber(token, "chainId"), () => ( extractNumber(token.chain, "id")));
|
|
1823
1824
|
const rawChainString = _nullishCoalesce(extractString(token, "chainId"), () => ( extractString(token.chain, "id")));
|
|
1824
|
-
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ?
|
|
1825
|
+
const chainId = _nullishCoalesce(rawChainId, () => ( (rawChainString ? _chunkO7BCVQ6Lcjs.isSolanaCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "solana" ? "solana" : (
|
|
1825
1826
|
// HyperCore (`hypercore:mainnet`) is a non-EVM source; keep its USDC
|
|
1826
1827
|
// instead of dropping it as an unparseable chain string.
|
|
1827
|
-
|
|
1828
|
+
_chunkO7BCVQ6Lcjs.isHyperCoreCaip2.call(void 0, rawChainString) || rawChainString.toLowerCase() === "hypercore" ? "hypercore" : _chunkO7BCVQ6Lcjs.parseEvmChainId.call(void 0, rawChainString)
|
|
1828
1829
|
) : null)));
|
|
1829
1830
|
if (chainId === null) return null;
|
|
1830
|
-
const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ?
|
|
1831
|
+
const registryChainId = typeof chainId === "number" ? chainId : chainId === "hypercore" ? _chunkO7BCVQ6Lcjs.HYPERCORE_CHAIN_ID : void 0;
|
|
1831
1832
|
const symbol = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "symbol"), () => ( extractString(token, "tokenSymbol"))), () => ( extractString(token, "tokenName"))), () => ( extractString(token, "name")));
|
|
1832
1833
|
if (!symbol) return null;
|
|
1833
1834
|
const balanceValue = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "balance"), () => ( extractString(token, "amount"))), () => ( extractString(token, "value"))), () => ( extractString(token, "rawBalance"))), () => ( _optionalChain([extractNumber, 'call', _47 => _47(token, "balance"), 'optionalAccess', _48 => _48.toString, 'call', _49 => _49()]))), () => ( _optionalChain([extractNumber, 'call', _50 => _50(token, "amount"), 'optionalAccess', _51 => _51.toString, 'call', _52 => _52()]))), () => ( _optionalChain([extractNumber, 'call', _53 => _53(token, "value"), 'optionalAccess', _54 => _54.toString, 'call', _55 => _55()]))), () => ( _optionalChain([extractNumber, 'call', _56 => _56(token, "rawBalance"), 'optionalAccess', _57 => _57.toString, 'call', _58 => _58()])));
|
|
@@ -1835,14 +1836,14 @@ function normalizeDirectToken(token) {
|
|
|
1835
1836
|
const address = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractString(token, "address"), () => ( extractString(token, "tokenAddress"))), () => ( extractString(
|
|
1836
1837
|
token.token,
|
|
1837
1838
|
"address"
|
|
1838
|
-
))), () => ( (registryChainId !== void 0 ?
|
|
1839
|
+
))), () => ( (registryChainId !== void 0 ? _chunkO7BCVQ6Lcjs.getTokenAddress.call(void 0, symbol, registryChainId) : void 0)));
|
|
1839
1840
|
if (!address) return null;
|
|
1840
1841
|
const balanceUsd = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(extractNumber(token, "balanceUsd"), () => ( extractNumber(token, "usdValue"))), () => ( extractNumber(token, "valueUsd"))), () => ( extractNumericString(token, "balanceUsd"))), () => ( extractNumericString(token, "usdValue"))), () => ( extractNumericString(token, "valueUsd"))), () => ( 0));
|
|
1841
1842
|
const isSolanaToken = chainId === "solana";
|
|
1842
|
-
const registrySymbol = isSolanaToken ? "Token" :
|
|
1843
|
+
const registrySymbol = isSolanaToken ? "Token" : _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, address, registryChainId);
|
|
1843
1844
|
const resolvedSymbol = isSolanaToken ? symbol : registrySymbol !== "Token" ? registrySymbol : symbol;
|
|
1844
1845
|
const backendDecimals = _nullishCoalesce(extractNumber(token, "decimals"), () => ( extractNumber(token, "tokenDecimals")));
|
|
1845
|
-
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ?
|
|
1846
|
+
const resolvedDecimals = !isSolanaToken && registrySymbol !== "Token" ? _chunkO7BCVQ6Lcjs.getTokenDecimalsByAddress.call(void 0, address, registryChainId) : _nullishCoalesce(backendDecimals, () => ( 18));
|
|
1846
1847
|
return {
|
|
1847
1848
|
chainId,
|
|
1848
1849
|
address,
|
|
@@ -1930,7 +1931,7 @@ function getPublicClient(chainId, rpcUrls) {
|
|
|
1930
1931
|
const cacheKey = `${chainId}|${_nullishCoalesce(url, () => ( ""))}`;
|
|
1931
1932
|
let client = clientCache.get(cacheKey);
|
|
1932
1933
|
if (!client) {
|
|
1933
|
-
const chain = _nullishCoalesce(
|
|
1934
|
+
const chain = _nullishCoalesce(_chunkO7BCVQ6Lcjs.CHAIN_BY_ID[chainId], () => ( runtimeChainById.get(chainId)));
|
|
1934
1935
|
client = _viem.createPublicClient.call(void 0, {
|
|
1935
1936
|
chain,
|
|
1936
1937
|
transport: _viem.http.call(void 0, url)
|
|
@@ -2073,7 +2074,7 @@ function peekRuntimeChains(backendUrl, overrides) {
|
|
|
2073
2074
|
return _nullishCoalesce(resolvedChainsByKey.get(runtimeChainsKey(backendUrl, overrides)), () => ( null));
|
|
2074
2075
|
}
|
|
2075
2076
|
function publishCatalogTokens(catalog) {
|
|
2076
|
-
|
|
2077
|
+
_chunkO7BCVQ6Lcjs.setRuntimeTokens.call(void 0,
|
|
2077
2078
|
catalog.all.flatMap(
|
|
2078
2079
|
(chain) => chain.chainId === null || !Array.isArray(chain.supportedTokens) ? [] : chain.supportedTokens.map((token) => ({
|
|
2079
2080
|
chainId: chain.chainId,
|
|
@@ -2085,11 +2086,11 @@ function publishCatalogTokens(catalog) {
|
|
|
2085
2086
|
);
|
|
2086
2087
|
}
|
|
2087
2088
|
function publishRuntimeChainMeta(catalog) {
|
|
2088
|
-
|
|
2089
|
+
_chunkO7BCVQ6Lcjs.setRuntimeChainMeta.call(void 0,
|
|
2089
2090
|
catalog.all.flatMap((chain) => {
|
|
2090
2091
|
const ids = [];
|
|
2091
2092
|
if (chain.chainId !== null) ids.push(chain.chainId);
|
|
2092
|
-
if (
|
|
2093
|
+
if (_chunkO7BCVQ6Lcjs.isHyperCoreCaip2.call(void 0, chain.caip2)) ids.push(_chunkO7BCVQ6Lcjs.HYPERCORE_CHAIN_ID);
|
|
2093
2094
|
return ids.map((chainId) => ({
|
|
2094
2095
|
chainId,
|
|
2095
2096
|
name: chain.name,
|
|
@@ -2135,7 +2136,7 @@ function useCatalogChain(chainId) {
|
|
|
2135
2136
|
function useDepositChainIds() {
|
|
2136
2137
|
const { catalog } = useChainCatalog();
|
|
2137
2138
|
return _react.useMemo.call(void 0, () => {
|
|
2138
|
-
if (!catalog) return
|
|
2139
|
+
if (!catalog) return [];
|
|
2139
2140
|
const ids = catalog.all.filter(
|
|
2140
2141
|
(c) => c.deposit && c.vmType === "evm" && c.chainId !== null && // `/chains` enumerates testnets; the bundled list never did, and a
|
|
2141
2142
|
// production picker offering Sepolia next to Ethereum is a way to
|
|
@@ -2144,8 +2145,8 @@ function useDepositChainIds() {
|
|
|
2144
2145
|
!c.testnet
|
|
2145
2146
|
).map((c) => c.chainId);
|
|
2146
2147
|
const rank = (id) => {
|
|
2147
|
-
const i =
|
|
2148
|
-
return i === -1 ?
|
|
2148
|
+
const i = _chunkO7BCVQ6Lcjs.CHAIN_DISPLAY_ORDER.indexOf(id);
|
|
2149
|
+
return i === -1 ? _chunkO7BCVQ6Lcjs.CHAIN_DISPLAY_ORDER.length : i;
|
|
2149
2150
|
};
|
|
2150
2151
|
return ids.map((id, i) => ({ id, i })).sort((a, b) => rank(a.id) - rank(b.id) || a.i - b.i).map(({ id }) => id);
|
|
2151
2152
|
}, [catalog]);
|
|
@@ -2153,14 +2154,10 @@ function useDepositChainIds() {
|
|
|
2153
2154
|
function useDestinationChains() {
|
|
2154
2155
|
const { catalog } = useChainCatalog();
|
|
2155
2156
|
return _react.useMemo.call(void 0, () => {
|
|
2156
|
-
if (!catalog)
|
|
2157
|
-
return _chunkTENL4H64cjs.SOURCE_CHAINS.filter(
|
|
2158
|
-
(chain) => _chunkTENL4H64cjs.getSupportedTargetTokens.call(void 0, chain.id).length > 0
|
|
2159
|
-
).map((chain) => ({ id: chain.id, name: chain.name }));
|
|
2160
|
-
}
|
|
2157
|
+
if (!catalog) return [];
|
|
2161
2158
|
const rank = (id) => {
|
|
2162
|
-
const i =
|
|
2163
|
-
return i === -1 ?
|
|
2159
|
+
const i = _chunkO7BCVQ6Lcjs.CHAIN_DISPLAY_ORDER.indexOf(id);
|
|
2160
|
+
return i === -1 ? _chunkO7BCVQ6Lcjs.CHAIN_DISPLAY_ORDER.length : i;
|
|
2164
2161
|
};
|
|
2165
2162
|
return catalog.all.filter(
|
|
2166
2163
|
(c) => c.destination && c.vmType === "evm" && c.chainId !== null && !c.testnet
|
|
@@ -2171,18 +2168,16 @@ function useTargetTokens() {
|
|
|
2171
2168
|
const { catalog, shortlist } = useChainCatalog();
|
|
2172
2169
|
return _react.useMemo.call(void 0, () => {
|
|
2173
2170
|
return (chainId) => {
|
|
2174
|
-
const bundled = _chunkTENL4H64cjs.getBundledTargetTokens.call(void 0, chainId);
|
|
2175
|
-
if (bundled.length > 0) return bundled;
|
|
2176
2171
|
const fromShortlist = _optionalChain([shortlist, 'optionalAccess', _90 => _90[String(chainId)]]);
|
|
2177
|
-
if (
|
|
2172
|
+
if (fromShortlist) {
|
|
2178
2173
|
return fromShortlist.map((token) => ({
|
|
2179
2174
|
symbol: token.symbol,
|
|
2180
2175
|
address: token.address,
|
|
2181
2176
|
decimals: token.decimals
|
|
2182
2177
|
}));
|
|
2183
2178
|
}
|
|
2184
|
-
const entry = _optionalChain([catalog, 'optionalAccess',
|
|
2185
|
-
return Array.isArray(_optionalChain([entry, 'optionalAccess',
|
|
2179
|
+
const entry = _optionalChain([catalog, 'optionalAccess', _91 => _91.byChainId, 'access', _92 => _92.get, 'call', _93 => _93(chainId)]);
|
|
2180
|
+
return Array.isArray(_optionalChain([entry, 'optionalAccess', _94 => _94.supportedTokens])) ? entry.supportedTokens.map((token) => ({
|
|
2186
2181
|
symbol: token.symbol,
|
|
2187
2182
|
address: token.address,
|
|
2188
2183
|
decimals: token.decimals
|
|
@@ -2202,10 +2197,10 @@ function useChainName() {
|
|
|
2202
2197
|
const { catalog } = useChainCatalog();
|
|
2203
2198
|
return _react.useMemo.call(void 0, () => {
|
|
2204
2199
|
return (chainId) => {
|
|
2205
|
-
if (!catalog) return
|
|
2200
|
+
if (!catalog) return _chunkO7BCVQ6Lcjs.getChainName.call(void 0, chainId);
|
|
2206
2201
|
const key = catalogKeyForChain(chainId);
|
|
2207
2202
|
const entry = typeof key === "number" ? catalog.byChainId.get(key) : catalog.byCaip2.get(key);
|
|
2208
|
-
return _nullishCoalesce(_optionalChain([entry, 'optionalAccess',
|
|
2203
|
+
return _nullishCoalesce(_optionalChain([entry, 'optionalAccess', _95 => _95.name]), () => ( _chunkO7BCVQ6Lcjs.getChainName.call(void 0, chainId)));
|
|
2209
2204
|
};
|
|
2210
2205
|
}, [catalog]);
|
|
2211
2206
|
}
|
|
@@ -2213,10 +2208,10 @@ function useExplorerTxUrl() {
|
|
|
2213
2208
|
const { catalog } = useChainCatalog();
|
|
2214
2209
|
return _react.useMemo.call(void 0, () => {
|
|
2215
2210
|
return (chainId, txHash) => {
|
|
2216
|
-
if (chainId === "hypercore") return
|
|
2211
|
+
if (chainId === "hypercore") return _chunkO7BCVQ6Lcjs.getExplorerTxUrl.call(void 0, chainId, txHash);
|
|
2217
2212
|
const key = catalog ? catalogKeyForChain(chainId) : void 0;
|
|
2218
|
-
const entry = key === void 0 ? void 0 : typeof key === "number" ? _optionalChain([catalog, 'optionalAccess',
|
|
2219
|
-
return _nullishCoalesce(catalogExplorerTxUrl(entry, txHash), () => (
|
|
2213
|
+
const entry = key === void 0 ? void 0 : typeof key === "number" ? _optionalChain([catalog, 'optionalAccess', _96 => _96.byChainId, 'access', _97 => _97.get, 'call', _98 => _98(key)]) : _optionalChain([catalog, 'optionalAccess', _99 => _99.byCaip2, 'access', _100 => _100.get, 'call', _101 => _101(key)]);
|
|
2214
|
+
return _nullishCoalesce(catalogExplorerTxUrl(entry, txHash), () => ( _chunkO7BCVQ6Lcjs.getExplorerTxUrl.call(void 0, chainId, txHash)));
|
|
2220
2215
|
};
|
|
2221
2216
|
}, [catalog]);
|
|
2222
2217
|
}
|
|
@@ -2274,7 +2269,7 @@ function ChainCatalogProvider({
|
|
|
2274
2269
|
setShortlist(null);
|
|
2275
2270
|
service.getTopTokens().then((tokens) => {
|
|
2276
2271
|
if (!active || !tokens) return;
|
|
2277
|
-
|
|
2272
|
+
_chunkO7BCVQ6Lcjs.publishShortlistTokens.call(void 0, tokens);
|
|
2278
2273
|
setShortlist(tokens);
|
|
2279
2274
|
});
|
|
2280
2275
|
return () => {
|
|
@@ -2426,7 +2421,7 @@ function TokenIcon({ symbol, className, fallback }) {
|
|
|
2426
2421
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2427
2422
|
CdnIcon,
|
|
2428
2423
|
{
|
|
2429
|
-
src:
|
|
2424
|
+
src: _chunkO7BCVQ6Lcjs.tokenIconUrl.call(void 0, symbol),
|
|
2430
2425
|
className: `rs-token-icon ${_nullishCoalesce(className, () => ( ""))}`.trimEnd(),
|
|
2431
2426
|
fallback
|
|
2432
2427
|
}
|
|
@@ -2559,29 +2554,29 @@ var EVM_ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
|
|
|
2559
2554
|
function resolveTokenDisplay(token, chain, fallback) {
|
|
2560
2555
|
if (token !== void 0) {
|
|
2561
2556
|
if (chain === "solana") {
|
|
2562
|
-
const solanaToken =
|
|
2557
|
+
const solanaToken = _chunkO7BCVQ6Lcjs.getSolanaTokenByMint.call(void 0, token);
|
|
2563
2558
|
if (solanaToken) {
|
|
2564
2559
|
return { symbol: solanaToken.symbol, decimals: solanaToken.decimals };
|
|
2565
2560
|
}
|
|
2566
2561
|
} else if (chain === "hypercore") {
|
|
2567
|
-
const t =
|
|
2562
|
+
const t = _chunkO7BCVQ6Lcjs.HYPERCORE_SOURCE_TOKENS.find(
|
|
2568
2563
|
(x) => x.address.toLowerCase() === token.toLowerCase()
|
|
2569
2564
|
);
|
|
2570
2565
|
if (t) return { symbol: t.symbol, decimals: t.decimals };
|
|
2571
2566
|
} else if (EVM_ADDRESS_RE.test(token)) {
|
|
2572
|
-
const symbol =
|
|
2573
|
-
const decimals =
|
|
2567
|
+
const symbol = _chunkO7BCVQ6Lcjs.getTokenSymbol.call(void 0, token, chain);
|
|
2568
|
+
const decimals = _chunkO7BCVQ6Lcjs.findTokenDecimals.call(void 0, token, chain);
|
|
2574
2569
|
if (symbol !== "Token" || decimals !== void 0) {
|
|
2575
2570
|
return {
|
|
2576
|
-
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
2577
|
-
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess',
|
|
2571
|
+
symbol: symbol !== "Token" ? symbol : _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _102 => _102.symbol]), () => ( symbol)),
|
|
2572
|
+
decimals: _nullishCoalesce(decimals, () => ( _optionalChain([fallback, 'optionalAccess', _103 => _103.decimals])))
|
|
2578
2573
|
};
|
|
2579
2574
|
}
|
|
2580
2575
|
}
|
|
2581
2576
|
}
|
|
2582
2577
|
return {
|
|
2583
|
-
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess',
|
|
2584
|
-
decimals: _optionalChain([fallback, 'optionalAccess',
|
|
2578
|
+
symbol: _nullishCoalesce(_optionalChain([fallback, 'optionalAccess', _104 => _104.symbol]), () => ( "Token")),
|
|
2579
|
+
decimals: _optionalChain([fallback, 'optionalAccess', _105 => _105.decimals])
|
|
2585
2580
|
};
|
|
2586
2581
|
}
|
|
2587
2582
|
function maxFractionDigitsFor(symbol) {
|
|
@@ -2619,13 +2614,13 @@ function priceUsdFor(symbol, prices) {
|
|
|
2619
2614
|
}
|
|
2620
2615
|
function isRecognizedToken(address, chain) {
|
|
2621
2616
|
if (address === void 0 || chain === void 0) return false;
|
|
2622
|
-
if (chain === "solana") return
|
|
2617
|
+
if (chain === "solana") return _chunkO7BCVQ6Lcjs.getSolanaTokenByMint.call(void 0, address) !== void 0;
|
|
2623
2618
|
if (chain === "hypercore") {
|
|
2624
|
-
return
|
|
2619
|
+
return _chunkO7BCVQ6Lcjs.HYPERCORE_SOURCE_TOKENS.some(
|
|
2625
2620
|
(t) => t.address.toLowerCase() === address.toLowerCase()
|
|
2626
2621
|
);
|
|
2627
2622
|
}
|
|
2628
|
-
return EVM_ADDRESS_RE.test(address) &&
|
|
2623
|
+
return EVM_ADDRESS_RE.test(address) && _chunkO7BCVQ6Lcjs.isRegistryTokenOnChain.call(void 0, address, chain);
|
|
2629
2624
|
}
|
|
2630
2625
|
function estimateReceiveAmount(params) {
|
|
2631
2626
|
const {
|
|
@@ -2778,19 +2773,19 @@ var CUSTOM_PRIMARY_VARS = [
|
|
|
2778
2773
|
function applyTheme(element, theme) {
|
|
2779
2774
|
if (!element) return;
|
|
2780
2775
|
const parent = element.parentElement;
|
|
2781
|
-
const targets = _optionalChain([parent, 'optionalAccess',
|
|
2782
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2776
|
+
const targets = _optionalChain([parent, 'optionalAccess', _106 => _106.classList, 'access', _107 => _107.contains, 'call', _108 => _108("rs-modal-content")]) ? [element, parent] : [element];
|
|
2777
|
+
if (_optionalChain([theme, 'optionalAccess', _109 => _109.mode])) {
|
|
2783
2778
|
for (const t of targets) t.setAttribute("data-theme", theme.mode);
|
|
2784
2779
|
} else {
|
|
2785
2780
|
for (const t of targets) t.removeAttribute("data-theme");
|
|
2786
2781
|
}
|
|
2787
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2782
|
+
if (_optionalChain([theme, 'optionalAccess', _110 => _110.fontColor])) {
|
|
2788
2783
|
setVar(targets, "--rs-foreground", theme.fontColor);
|
|
2789
2784
|
}
|
|
2790
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2785
|
+
if (_optionalChain([theme, 'optionalAccess', _111 => _111.iconColor])) {
|
|
2791
2786
|
setVar(targets, "--rs-icon", theme.iconColor);
|
|
2792
2787
|
}
|
|
2793
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2788
|
+
if (_optionalChain([theme, 'optionalAccess', _112 => _112.ctaColor])) {
|
|
2794
2789
|
const derived = deriveCustomPrimary(theme.ctaColor);
|
|
2795
2790
|
if (derived) {
|
|
2796
2791
|
setVar(targets, "--rs-primary", derived.base);
|
|
@@ -2815,18 +2810,18 @@ function applyTheme(element, theme) {
|
|
|
2815
2810
|
}
|
|
2816
2811
|
} else {
|
|
2817
2812
|
for (const v of CUSTOM_PRIMARY_VARS) clearVar(targets, v);
|
|
2818
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2813
|
+
if (_optionalChain([theme, 'optionalAccess', _113 => _113.ctaHoverColor])) {
|
|
2819
2814
|
setVar(targets, "--rs-primary-hover", theme.ctaHoverColor);
|
|
2820
2815
|
}
|
|
2821
2816
|
}
|
|
2822
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2817
|
+
if (_optionalChain([theme, 'optionalAccess', _114 => _114.borderColor])) {
|
|
2823
2818
|
setVar(targets, "--rs-border", theme.borderColor);
|
|
2824
2819
|
setVar(targets, "--rs-border-surface", theme.borderColor);
|
|
2825
2820
|
}
|
|
2826
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2821
|
+
if (_optionalChain([theme, 'optionalAccess', _115 => _115.backgroundColor])) {
|
|
2827
2822
|
setVar(targets, "--rs-background", theme.backgroundColor);
|
|
2828
2823
|
}
|
|
2829
|
-
if (_optionalChain([theme, 'optionalAccess',
|
|
2824
|
+
if (_optionalChain([theme, 'optionalAccess', _116 => _116.radius])) {
|
|
2830
2825
|
const scale = RADIUS_SCALE[theme.radius];
|
|
2831
2826
|
setVar(targets, "--rs-radius-sm", scale.sm);
|
|
2832
2827
|
setVar(targets, "--rs-radius-md", scale.md);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkO7BCVQ6Lcjs = require('./chunk-O7BCVQ6L.cjs');
|
|
4
4
|
|
|
5
5
|
// src/core/dapp-imports/polymarket/constants.ts
|
|
6
6
|
var POLYMARKET_POLYGON_CHAIN_ID = 137;
|
|
@@ -9,7 +9,7 @@ var POLYMARKET_USDCE_ADDRESS = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174";
|
|
|
9
9
|
var POLYMARKET_COLLATERAL_OFFRAMP_ADDRESS = "0x2957922Eb93258b93368531d39fAcCA3B4dC5854";
|
|
10
10
|
var SAFE_MULTI_SEND_CALL_ONLY_ADDRESS = "0x40A2aCCbd92BCA938b02010E17A5b8929b49130D";
|
|
11
11
|
var GAMMA_API_PUBLIC_PROFILE = "https://gamma-api.polymarket.com/public-profile";
|
|
12
|
-
var POLYMARKET_ICON_URL =
|
|
12
|
+
var POLYMARKET_ICON_URL = _chunkO7BCVQ6Lcjs.cdnIconUrl.call(void 0, "dapps", "polymarket");
|
|
13
13
|
|
|
14
14
|
// src/core/dapp-imports/polymarket/gamma-api.ts
|
|
15
15
|
var _viem = require('viem');
|