@rhinestone/deposit-modal 0.11.1 → 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-MO5QDLIT.mjs → DepositModalReown-MVVRUXO4.mjs} +7 -7
- package/dist/{DepositModalReown-YGB73NMW.cjs → DepositModalReown-PZXHTPIS.cjs} +17 -17
- package/dist/{chunk-OWYPKCYD.mjs → chunk-2AMRKYJ4.mjs} +4 -4
- package/dist/{chunk-FVUXJ3RP.cjs → chunk-2PQ34KU3.cjs} +3 -3
- package/dist/{chunk-TENL4H64.cjs → chunk-4R2ZHSDQ.cjs} +4 -9
- package/dist/{chunk-4FTI3GTB.cjs → chunk-4SRVZRZF.cjs} +1 -1
- package/dist/{chunk-MZ53PDIX.mjs → chunk-53IGTENZ.mjs} +1 -1
- package/dist/{chunk-CWGUBFJL.mjs → chunk-5IP67CL5.mjs} +5 -15
- package/dist/{chunk-HUHBNYD3.cjs → chunk-6ZJTZ7DS.cjs} +81 -80
- package/dist/{chunk-LQGYPM5B.cjs → chunk-BK54FZAE.cjs} +79 -79
- package/dist/{chunk-EIWOVX53.mjs → chunk-EUIPQ3T4.mjs} +3 -3
- package/dist/{chunk-URFSTNRS.mjs → chunk-GZNMBZHY.mjs} +1 -1
- package/dist/{chunk-ZQR36NCV.cjs → chunk-LBJFACLH.cjs} +84 -94
- package/dist/{chunk-SSQ27YFB.cjs → chunk-LTPVHQXJ.cjs} +543 -540
- package/dist/{chunk-YELNYILK.mjs → chunk-Q5MFRAWD.mjs} +287 -284
- package/dist/{chunk-5746YXKC.mjs → chunk-QF5T6HXC.mjs} +5 -4
- package/dist/{chunk-V6T7LORJ.mjs → chunk-RMYUE6HJ.mjs} +1 -1
- package/dist/{chunk-ZRIRCIQM.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-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,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModalInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-Q5MFRAWD.mjs";
|
|
4
|
+
import "./chunk-QF5T6HXC.mjs";
|
|
5
|
+
import "./chunk-RMYUE6HJ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
isUnsupportedChainSwitchError,
|
|
8
8
|
peekRuntimeChains,
|
|
9
9
|
primeRuntimeChains,
|
|
10
10
|
rpcUrlFor,
|
|
11
11
|
useStableRpcUrls
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-5IP67CL5.mjs";
|
|
13
|
+
import "./chunk-GZNMBZHY.mjs";
|
|
14
|
+
import "./chunk-53IGTENZ.mjs";
|
|
15
15
|
import {
|
|
16
16
|
SUPPORTED_CHAINS,
|
|
17
17
|
getChainName
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YR43AAX5.mjs";
|
|
19
19
|
|
|
20
20
|
// src/DepositModalReown.tsx
|
|
21
21
|
import { useCallback, useMemo as useMemo2 } from "react";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var _chunkLTPVHQXJcjs = require('./chunk-LTPVHQXJ.cjs');
|
|
4
|
+
require('./chunk-6ZJTZ7DS.cjs');
|
|
5
|
+
require('./chunk-2PQ34KU3.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
12
|
+
var _chunkLBJFACLHcjs = require('./chunk-LBJFACLH.cjs');
|
|
13
|
+
require('./chunk-4SRVZRZF.cjs');
|
|
14
|
+
require('./chunk-XJB3VG4C.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk4R2ZHSDQcjs = require('./chunk-4R2ZHSDQ.cjs');
|
|
19
19
|
|
|
20
20
|
// src/DepositModalReown.tsx
|
|
21
21
|
var _react = require('react');
|
|
@@ -72,7 +72,7 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
72
72
|
[_networks.katana.id]: _networks.katana,
|
|
73
73
|
[_networks.hyperEvm.id]: _networks.hyperEvm
|
|
74
74
|
};
|
|
75
|
-
var EVM_NETWORKS =
|
|
75
|
+
var EVM_NETWORKS = _chunk4R2ZHSDQcjs.SUPPORTED_CHAINS.map((chain) => {
|
|
76
76
|
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
77
77
|
if (!network) {
|
|
78
78
|
throw new Error(
|
|
@@ -91,14 +91,14 @@ function buildTransports(rpcUrls, networks = EVM_NETWORKS) {
|
|
|
91
91
|
const transports = {};
|
|
92
92
|
for (const network of networks) {
|
|
93
93
|
const id = Number(network.id);
|
|
94
|
-
transports[id] = _viem.http.call(void 0,
|
|
94
|
+
transports[id] = _viem.http.call(void 0, _chunkLBJFACLHcjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
95
95
|
}
|
|
96
96
|
return transports;
|
|
97
97
|
}
|
|
98
98
|
function getEvmRpcFingerprint(rpcUrls, networks) {
|
|
99
99
|
return networks.map((network) => {
|
|
100
100
|
const id = Number(network.id);
|
|
101
|
-
return `${id}=${_nullishCoalesce(
|
|
101
|
+
return `${id}=${_nullishCoalesce(_chunkLBJFACLHcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
102
102
|
}).join("|");
|
|
103
103
|
}
|
|
104
104
|
var cachedAdapter = null;
|
|
@@ -164,7 +164,7 @@ function getOrCreateAdapter(projectId, enableSolana, theme, rpcUrls, runtimeChai
|
|
|
164
164
|
function chainDisplayName(chainId) {
|
|
165
165
|
const runtime = runtimeNetworkById.get(chainId);
|
|
166
166
|
if (runtime) return runtime.name;
|
|
167
|
-
return
|
|
167
|
+
return _chunk4R2ZHSDQcjs.getChainName.call(void 0, chainId);
|
|
168
168
|
}
|
|
169
169
|
function resolveAppKitNetwork(chainId) {
|
|
170
170
|
return _nullishCoalesce(getAppKitNetwork(chainId), () => ( runtimeNetworkById.get(chainId)));
|
|
@@ -177,7 +177,7 @@ function ReownWalletProvider({
|
|
|
177
177
|
backendUrl,
|
|
178
178
|
children
|
|
179
179
|
}) {
|
|
180
|
-
const rpcUrls =
|
|
180
|
+
const rpcUrls = _chunkLBJFACLHcjs.useStableRpcUrls.call(void 0, rpcUrlsProp);
|
|
181
181
|
const [queryClient] = _react.useState.call(void 0, () => new (0, _reactquery.QueryClient)());
|
|
182
182
|
const overrides = _react.useMemo.call(void 0, () => {
|
|
183
183
|
if (!rpcUrls) return void 0;
|
|
@@ -189,14 +189,14 @@ function ReownWalletProvider({
|
|
|
189
189
|
return out;
|
|
190
190
|
}, [rpcUrls]);
|
|
191
191
|
const [state, setState] = _react.useState.call(void 0, () => {
|
|
192
|
-
const primed =
|
|
192
|
+
const primed = _chunkLBJFACLHcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
193
193
|
return { ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) };
|
|
194
194
|
});
|
|
195
195
|
_react.useEffect.call(void 0, () => {
|
|
196
196
|
let active = true;
|
|
197
|
-
const primed =
|
|
197
|
+
const primed = _chunkLBJFACLHcjs.peekRuntimeChains.call(void 0, backendUrl, overrides);
|
|
198
198
|
setState({ ready: primed !== null, chains: _nullishCoalesce(primed, () => ( [])) });
|
|
199
|
-
|
|
199
|
+
_chunkLBJFACLHcjs.primeRuntimeChains.call(void 0, backendUrl, overrides).then((chains) => {
|
|
200
200
|
if (active) setState({ ready: true, chains });
|
|
201
201
|
});
|
|
202
202
|
return () => {
|
|
@@ -258,7 +258,7 @@ function useReownWallet() {
|
|
|
258
258
|
await switchChainAsync({ chainId });
|
|
259
259
|
}
|
|
260
260
|
} catch (err) {
|
|
261
|
-
if (
|
|
261
|
+
if (_chunkLBJFACLHcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
262
262
|
throw new Error(
|
|
263
263
|
`Switch to ${chainDisplayName(chainId)} in your wallet to continue`
|
|
264
264
|
);
|
|
@@ -292,7 +292,7 @@ function DepositModalWithReown(props) {
|
|
|
292
292
|
reown.disconnect();
|
|
293
293
|
}, [reown.disconnect]);
|
|
294
294
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
295
|
-
|
|
295
|
+
_chunkLTPVHQXJcjs.DepositModalInner,
|
|
296
296
|
{
|
|
297
297
|
...props,
|
|
298
298
|
reownWallet: reownWithSolana,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ListRow
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RMYUE6HJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
AlertTriangleIcon,
|
|
6
6
|
BodyHeader,
|
|
@@ -28,17 +28,17 @@ import {
|
|
|
28
28
|
useExplorerTxUrl,
|
|
29
29
|
useLatestRef,
|
|
30
30
|
useStableRpcUrls
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5IP67CL5.mjs";
|
|
32
32
|
import {
|
|
33
33
|
SERVICE_HEADERS
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-GZNMBZHY.mjs";
|
|
35
35
|
import {
|
|
36
36
|
getChainIcon,
|
|
37
37
|
getChainName,
|
|
38
38
|
getTokenDecimalsByAddress,
|
|
39
39
|
getTokenSymbol,
|
|
40
40
|
tokenIconUrl
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-YR43AAX5.mjs";
|
|
42
42
|
|
|
43
43
|
// src/ClaimModal.tsx
|
|
44
44
|
import {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkLBJFACLHcjs = require('./chunk-LBJFACLH.cjs');
|
|
5
5
|
|
|
6
6
|
// src/components/ui/ListRow.tsx
|
|
7
7
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -19,7 +19,7 @@ function ListRow({
|
|
|
19
19
|
...props
|
|
20
20
|
}) {
|
|
21
21
|
const inner = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
22
|
-
leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
22
|
+
leadingMedia ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading rs-list-row-leading--media", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.CdnIcon, { src: leadingMedia }) }) : leading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-leading", children: leading }) : null,
|
|
23
23
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-body", children: [
|
|
24
24
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "rs-list-row-text", children: [
|
|
25
25
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-title", children: title }),
|
|
@@ -39,7 +39,7 @@ function ListRow({
|
|
|
39
39
|
}
|
|
40
40
|
) : meta && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rs-list-row-meta", children: meta })
|
|
41
41
|
] }),
|
|
42
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( (disabled ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
42
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "rs-list-row-chevron", children: _nullishCoalesce(trailing, () => ( (disabled ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLBJFACLHcjs.ChevronRightIcon, {})))) })
|
|
43
43
|
] });
|
|
44
44
|
if (action) {
|
|
45
45
|
const handleKey = (e) => {
|
|
@@ -705,10 +705,6 @@ function isSupportedTokenAddressForChain(token, chainId) {
|
|
|
705
705
|
function getSupportedTargetTokens(chainId) {
|
|
706
706
|
return toTokenOptions(getSupportedTokenSymbolsForChain(chainId), chainId);
|
|
707
707
|
}
|
|
708
|
-
function getBundledTargetTokens(chainId) {
|
|
709
|
-
const symbols = SUPPORTED_TOKENS_BY_CHAIN[chainId];
|
|
710
|
-
return _optionalChain([symbols, 'optionalAccess', _23 => _23.length]) ? toTokenOptions([...symbols], chainId) : [];
|
|
711
|
-
}
|
|
712
708
|
function toTokenOptions(symbols, chainId) {
|
|
713
709
|
const options = [];
|
|
714
710
|
for (const symbol of symbols) {
|
|
@@ -811,7 +807,7 @@ function getTokenSymbol(token, chainId) {
|
|
|
811
807
|
}
|
|
812
808
|
function getTargetTokenSymbol(token, chain) {
|
|
813
809
|
if (chain === "solana") {
|
|
814
|
-
return _nullishCoalesce(_optionalChain([getSolanaTokenByMint, 'call',
|
|
810
|
+
return _nullishCoalesce(_optionalChain([getSolanaTokenByMint, 'call', _23 => _23(String(token)), 'optionalAccess', _24 => _24.symbol]), () => ( "Token"));
|
|
815
811
|
}
|
|
816
812
|
return getTokenSymbol(token, resolveDisplayChainId(chain));
|
|
817
813
|
}
|
|
@@ -878,7 +874,7 @@ function badgeColorsFor(name) {
|
|
|
878
874
|
function getExplorerUrl(chainId) {
|
|
879
875
|
if (chainId === "solana") return "https://solscan.io";
|
|
880
876
|
if (chainId === "hypercore") return HYPERCORE_EXPLORER_URL;
|
|
881
|
-
return _optionalChain([CHAIN_BY_ID, 'access',
|
|
877
|
+
return _optionalChain([CHAIN_BY_ID, 'access', _25 => _25[chainId], 'optionalAccess', _26 => _26.blockExplorers, 'optionalAccess', _27 => _27.default, 'optionalAccess', _28 => _28.url]);
|
|
882
878
|
}
|
|
883
879
|
function getExplorerTxUrl(chainId, txHash) {
|
|
884
880
|
if (chainId === "solana") return `https://solscan.io/tx/${txHash}`;
|
|
@@ -890,7 +886,7 @@ function getExplorerTxUrl(chainId, txHash) {
|
|
|
890
886
|
function getExplorerName(chainId) {
|
|
891
887
|
if (chainId === "solana") return "Solscan";
|
|
892
888
|
if (chainId === "hypercore") return "Hyperliquid Explorer";
|
|
893
|
-
return _nullishCoalesce(_optionalChain([CHAIN_BY_ID, 'access',
|
|
889
|
+
return _nullishCoalesce(_optionalChain([CHAIN_BY_ID, 'access', _29 => _29[chainId], 'optionalAccess', _30 => _30.blockExplorers, 'optionalAccess', _31 => _31.default, 'optionalAccess', _32 => _32.name]), () => ( "Explorer"));
|
|
894
890
|
}
|
|
895
891
|
|
|
896
892
|
|
|
@@ -953,5 +949,4 @@ function getExplorerName(chainId) {
|
|
|
953
949
|
|
|
954
950
|
|
|
955
951
|
|
|
956
|
-
|
|
957
|
-
exports.SOLANA_MAINNET_CAIP2 = SOLANA_MAINNET_CAIP2; exports.toEvmCaip2 = toEvmCaip2; exports.targetChainToCaip2 = targetChainToCaip2; exports.targetChainToAccountKey = targetChainToAccountKey; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.isHyperCoreCaip2 = isHyperCoreCaip2; exports.HYPERCORE_CHAIN_ID = HYPERCORE_CHAIN_ID; exports.HYPERCORE_MAINNET_CAIP2 = HYPERCORE_MAINNET_CAIP2; exports.HYPERCORE_SPOT_CAIP2 = HYPERCORE_SPOT_CAIP2; exports.targetChainToChainId = targetChainToChainId; exports.isHyperCoreDestination = isHyperCoreDestination; exports.HYPERCORE_USDC_ADDRESS = HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = HYPERCORE_USDT0_ADDRESS; exports.HYPERCORE_SOURCE_TOKENS = HYPERCORE_SOURCE_TOKENS; exports.HYPERCORE_MIN_DEPOSIT_USD = HYPERCORE_MIN_DEPOSIT_USD; exports.isVirtualDestination = isVirtualDestination; exports.SOLANA_TOKENS = SOLANA_TOKENS; exports.getSolanaTokenBySymbol = getSolanaTokenBySymbol; exports.getSolanaTokenByMint = getSolanaTokenByMint; exports.isNativeSol = isNativeSol; exports.setRuntimeChainMeta = setRuntimeChainMeta; exports.setRuntimeTokens = setRuntimeTokens; exports.publishShortlistTokens = publishShortlistTokens; exports.ICON_CDN = ICON_CDN; exports.cdnIconUrl = cdnIconUrl; exports.getChainIcon = getChainIcon; exports.tokenIconUrl = tokenIconUrl; exports.getTokenIcon = getTokenIcon; exports.NATIVE_TOKEN_ADDRESS = NATIVE_TOKEN_ADDRESS; exports.CHAIN_DISPLAY_ORDER = CHAIN_DISPLAY_ORDER; exports.CHAIN_BY_ID = CHAIN_BY_ID; exports.SOURCE_CHAINS = SOURCE_CHAINS; exports.SUPPORTED_CHAINS = SUPPORTED_CHAINS; exports.chainRegistry = chainRegistry; exports.getChainId = getChainId; exports.getChainObject = getChainObject; exports.getUsdcAddress = getUsdcAddress; exports.getUsdcDecimals = getUsdcDecimals; exports.getTokenAddress = getTokenAddress; exports.getTokenDecimals = getTokenDecimals; exports.getTargetTokenSymbolsForChain = getTargetTokenSymbolsForChain; exports.getSupportedTokenSymbolsForChain = getSupportedTokenSymbolsForChain; exports.getSupportedChainIds = getSupportedChainIds; exports.isSupportedTokenAddressForChain = isSupportedTokenAddressForChain; exports.getSupportedTargetTokens = getSupportedTargetTokens; exports.getBundledTargetTokens = getBundledTargetTokens; exports.findTokenDecimals = findTokenDecimals; exports.getTokenDecimalsByAddress = getTokenDecimalsByAddress; exports.findChainIdForToken = findChainIdForToken; exports.isRegistryTokenOnChain = isRegistryTokenOnChain; exports.getNativeSymbol = getNativeSymbol; exports.getTokenSymbol = getTokenSymbol; exports.getTargetTokenSymbol = getTargetTokenSymbol; exports.isStablecoinSymbol = isStablecoinSymbol; exports.getChainName = getChainName; exports.getChainBadge = getChainBadge; exports.getExplorerUrl = getExplorerUrl; exports.getExplorerTxUrl = getExplorerTxUrl; exports.getExplorerName = getExplorerName;
|
|
952
|
+
exports.SOLANA_MAINNET_CAIP2 = SOLANA_MAINNET_CAIP2; exports.toEvmCaip2 = toEvmCaip2; exports.targetChainToCaip2 = targetChainToCaip2; exports.targetChainToAccountKey = targetChainToAccountKey; exports.parseEvmChainId = parseEvmChainId; exports.isSolanaCaip2 = isSolanaCaip2; exports.isHyperCoreCaip2 = isHyperCoreCaip2; exports.HYPERCORE_CHAIN_ID = HYPERCORE_CHAIN_ID; exports.HYPERCORE_MAINNET_CAIP2 = HYPERCORE_MAINNET_CAIP2; exports.HYPERCORE_SPOT_CAIP2 = HYPERCORE_SPOT_CAIP2; exports.targetChainToChainId = targetChainToChainId; exports.isHyperCoreDestination = isHyperCoreDestination; exports.HYPERCORE_USDC_ADDRESS = HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = HYPERCORE_USDT0_ADDRESS; exports.HYPERCORE_SOURCE_TOKENS = HYPERCORE_SOURCE_TOKENS; exports.HYPERCORE_MIN_DEPOSIT_USD = HYPERCORE_MIN_DEPOSIT_USD; exports.isVirtualDestination = isVirtualDestination; exports.SOLANA_TOKENS = SOLANA_TOKENS; exports.getSolanaTokenBySymbol = getSolanaTokenBySymbol; exports.getSolanaTokenByMint = getSolanaTokenByMint; exports.isNativeSol = isNativeSol; exports.setRuntimeChainMeta = setRuntimeChainMeta; exports.setRuntimeTokens = setRuntimeTokens; exports.publishShortlistTokens = publishShortlistTokens; exports.ICON_CDN = ICON_CDN; exports.cdnIconUrl = cdnIconUrl; exports.getChainIcon = getChainIcon; exports.tokenIconUrl = tokenIconUrl; exports.getTokenIcon = getTokenIcon; exports.NATIVE_TOKEN_ADDRESS = NATIVE_TOKEN_ADDRESS; exports.CHAIN_DISPLAY_ORDER = CHAIN_DISPLAY_ORDER; exports.CHAIN_BY_ID = CHAIN_BY_ID; exports.SOURCE_CHAINS = SOURCE_CHAINS; exports.SUPPORTED_CHAINS = SUPPORTED_CHAINS; exports.chainRegistry = chainRegistry; exports.getChainId = getChainId; exports.getChainObject = getChainObject; exports.getUsdcAddress = getUsdcAddress; exports.getUsdcDecimals = getUsdcDecimals; exports.getTokenAddress = getTokenAddress; exports.getTokenDecimals = getTokenDecimals; exports.getTargetTokenSymbolsForChain = getTargetTokenSymbolsForChain; exports.getSupportedTokenSymbolsForChain = getSupportedTokenSymbolsForChain; exports.getSupportedChainIds = getSupportedChainIds; exports.isSupportedTokenAddressForChain = isSupportedTokenAddressForChain; exports.getSupportedTargetTokens = getSupportedTargetTokens; exports.findTokenDecimals = findTokenDecimals; exports.getTokenDecimalsByAddress = getTokenDecimalsByAddress; exports.findChainIdForToken = findChainIdForToken; exports.isRegistryTokenOnChain = isRegistryTokenOnChain; exports.getNativeSymbol = getNativeSymbol; exports.getTokenSymbol = getTokenSymbol; exports.getTargetTokenSymbol = getTargetTokenSymbol; exports.isStablecoinSymbol = isStablecoinSymbol; exports.getChainName = getChainName; exports.getChainBadge = getChainBadge; exports.getExplorerUrl = getExplorerUrl; exports.getExplorerTxUrl = getExplorerTxUrl; exports.getExplorerName = getExplorerName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SERVICE_HEADERS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GZNMBZHY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
CHAIN_BY_ID,
|
|
6
6
|
CHAIN_DISPLAY_ORDER,
|
|
@@ -10,14 +10,10 @@ import {
|
|
|
10
10
|
ICON_CDN,
|
|
11
11
|
NATIVE_TOKEN_ADDRESS,
|
|
12
12
|
SOLANA_MAINNET_CAIP2,
|
|
13
|
-
SOURCE_CHAINS,
|
|
14
13
|
findTokenDecimals,
|
|
15
|
-
getBundledTargetTokens,
|
|
16
14
|
getChainName,
|
|
17
15
|
getExplorerTxUrl,
|
|
18
16
|
getSolanaTokenByMint,
|
|
19
|
-
getSupportedChainIds,
|
|
20
|
-
getSupportedTargetTokens,
|
|
21
17
|
getTokenAddress,
|
|
22
18
|
getTokenDecimalsByAddress,
|
|
23
19
|
getTokenSymbol,
|
|
@@ -30,7 +26,7 @@ import {
|
|
|
30
26
|
setRuntimeTokens,
|
|
31
27
|
toEvmCaip2,
|
|
32
28
|
tokenIconUrl
|
|
33
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YR43AAX5.mjs";
|
|
34
30
|
|
|
35
31
|
// src/components/ui/Modal.tsx
|
|
36
32
|
import {
|
|
@@ -2135,7 +2131,7 @@ function useCatalogChain(chainId) {
|
|
|
2135
2131
|
function useDepositChainIds() {
|
|
2136
2132
|
const { catalog } = useChainCatalog();
|
|
2137
2133
|
return useMemo2(() => {
|
|
2138
|
-
if (!catalog) return
|
|
2134
|
+
if (!catalog) return [];
|
|
2139
2135
|
const ids = catalog.all.filter(
|
|
2140
2136
|
(c) => c.deposit && c.vmType === "evm" && c.chainId !== null && // `/chains` enumerates testnets; the bundled list never did, and a
|
|
2141
2137
|
// production picker offering Sepolia next to Ethereum is a way to
|
|
@@ -2153,11 +2149,7 @@ function useDepositChainIds() {
|
|
|
2153
2149
|
function useDestinationChains() {
|
|
2154
2150
|
const { catalog } = useChainCatalog();
|
|
2155
2151
|
return useMemo2(() => {
|
|
2156
|
-
if (!catalog)
|
|
2157
|
-
return SOURCE_CHAINS.filter(
|
|
2158
|
-
(chain) => getSupportedTargetTokens(chain.id).length > 0
|
|
2159
|
-
).map((chain) => ({ id: chain.id, name: chain.name }));
|
|
2160
|
-
}
|
|
2152
|
+
if (!catalog) return [];
|
|
2161
2153
|
const rank = (id) => {
|
|
2162
2154
|
const i = CHAIN_DISPLAY_ORDER.indexOf(id);
|
|
2163
2155
|
return i === -1 ? CHAIN_DISPLAY_ORDER.length : i;
|
|
@@ -2171,10 +2163,8 @@ function useTargetTokens() {
|
|
|
2171
2163
|
const { catalog, shortlist } = useChainCatalog();
|
|
2172
2164
|
return useMemo2(() => {
|
|
2173
2165
|
return (chainId) => {
|
|
2174
|
-
const bundled = getBundledTargetTokens(chainId);
|
|
2175
|
-
if (bundled.length > 0) return bundled;
|
|
2176
2166
|
const fromShortlist = shortlist?.[String(chainId)];
|
|
2177
|
-
if (fromShortlist
|
|
2167
|
+
if (fromShortlist) {
|
|
2178
2168
|
return fromShortlist.map((token) => ({
|
|
2179
2169
|
symbol: token.symbol,
|
|
2180
2170
|
address: token.address,
|