@rhinestone/deposit-modal 0.8.0 → 0.8.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-RZ6VSMKP.mjs → DepositModalReown-4BSHOQ5Y.mjs} +6 -6
- package/dist/{DepositModalReown-J5YFZKFS.cjs → DepositModalReown-UND3DEJH.cjs} +9 -9
- package/dist/{WithdrawModalReown-4YUV2WWV.mjs → WithdrawModalReown-FVXSSGY5.mjs} +5 -5
- package/dist/{WithdrawModalReown-B6BGY52S.cjs → WithdrawModalReown-TVZWJKQI.cjs} +8 -8
- package/dist/{chunk-LXTAAHPC.mjs → chunk-2JPB3PLB.mjs} +2 -2
- package/dist/{chunk-4IOQIWDY.cjs → chunk-4NN7UTWQ.cjs} +4 -4
- package/dist/{chunk-5S5BQ2GM.mjs → chunk-7KHEIMWD.mjs} +24 -11
- package/dist/{chunk-IRI34U6N.cjs → chunk-7OKA6GNA.cjs} +255 -137
- package/dist/{chunk-XLXJW44N.cjs → chunk-D3Y7ZBED.cjs} +349 -336
- package/dist/{chunk-YLIPI3NU.mjs → chunk-DABKCJVL.mjs} +1 -1
- package/dist/{chunk-JRFPKFL6.cjs → chunk-HQWZCOMS.cjs} +105 -98
- package/dist/{chunk-RXWJ267K.mjs → chunk-NASHLEVQ.mjs} +165 -47
- package/dist/{chunk-SX52FXKH.mjs → chunk-O5OKA27M.mjs} +7 -0
- package/dist/{chunk-VURI4G2Z.cjs → chunk-Q3W53BKR.cjs} +7 -7
- package/dist/{chunk-7JJ4EFDY.mjs → chunk-T43VUEJH.mjs} +12 -5
- package/dist/{chunk-PUMTR35E.cjs → chunk-U7SVYWVD.cjs} +8 -1
- package/dist/{chunk-TYB6AA6D.mjs → chunk-WK5AFRSP.mjs} +1 -1
- package/dist/{chunk-WL7AXYQ4.cjs → chunk-XRWQMIBY.cjs} +3 -3
- package/dist/constants.cjs +2 -2
- package/dist/constants.mjs +1 -1
- package/dist/deposit.cjs +6 -6
- package/dist/deposit.mjs +5 -5
- package/dist/index.cjs +7 -7
- package/dist/index.mjs +6 -6
- package/dist/polymarket.cjs +6 -6
- package/dist/polymarket.mjs +3 -3
- package/dist/styles.css +29 -0
- package/dist/withdraw.cjs +5 -5
- package/dist/withdraw.mjs +4 -4
- package/package.json +1 -1
|
@@ -14,10 +14,12 @@ import {
|
|
|
14
14
|
getTokenDecimalsByAddress,
|
|
15
15
|
getTokenSymbol,
|
|
16
16
|
isHyperCoreCaip2,
|
|
17
|
+
isRegistryTokenOnChain,
|
|
17
18
|
isSolanaCaip2,
|
|
18
19
|
parseEvmChainId,
|
|
20
|
+
toEvmCaip2,
|
|
19
21
|
tokenIconUrl
|
|
20
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-O5OKA27M.mjs";
|
|
21
23
|
|
|
22
24
|
// src/components/ui/Modal.tsx
|
|
23
25
|
import {
|
|
@@ -1074,6 +1076,31 @@ function createDepositService(baseUrl, options) {
|
|
|
1074
1076
|
return {};
|
|
1075
1077
|
}
|
|
1076
1078
|
},
|
|
1079
|
+
async fetchPricesByAddress(caip2Ids) {
|
|
1080
|
+
const list = caip2Ids.filter((id) => id.length > 0);
|
|
1081
|
+
if (list.length === 0) return {};
|
|
1082
|
+
const url = apiUrl(
|
|
1083
|
+
`/prices?${new URLSearchParams({ addresses: list.join(",") }).toString()}`
|
|
1084
|
+
);
|
|
1085
|
+
try {
|
|
1086
|
+
const response = await fetch(url, {
|
|
1087
|
+
method: "GET",
|
|
1088
|
+
headers: { "Content-Type": "application/json" },
|
|
1089
|
+
cache: "no-store"
|
|
1090
|
+
});
|
|
1091
|
+
if (!response.ok) {
|
|
1092
|
+
debugError(debug, scope, "fetchPricesByAddress:failed", {
|
|
1093
|
+
status: response.status
|
|
1094
|
+
});
|
|
1095
|
+
return {};
|
|
1096
|
+
}
|
|
1097
|
+
const data = await response.json();
|
|
1098
|
+
return data.prices ?? {};
|
|
1099
|
+
} catch (err) {
|
|
1100
|
+
debugError(debug, scope, "fetchPricesByAddress:error", err);
|
|
1101
|
+
return {};
|
|
1102
|
+
}
|
|
1103
|
+
},
|
|
1077
1104
|
async getSwappedWidgetUrl(params) {
|
|
1078
1105
|
const url = apiUrl("/onramp/swapped/widget-url");
|
|
1079
1106
|
debugLog(debug, scope, "getSwappedWidgetUrl:request", {
|
|
@@ -2760,25 +2787,109 @@ ConnectStep.displayName = "ConnectStep";
|
|
|
2760
2787
|
// src/components/ui/TokenIcon.tsx
|
|
2761
2788
|
import { useState as useState2 } from "react";
|
|
2762
2789
|
import { Fragment as Fragment3, jsx as jsx19 } from "react/jsx-runtime";
|
|
2790
|
+
function preconnectIconCdn() {
|
|
2791
|
+
if (typeof document === "undefined") return;
|
|
2792
|
+
if (document.getElementById("rs-icon-cdn-preconnect")) return;
|
|
2793
|
+
const link = document.createElement("link");
|
|
2794
|
+
link.id = "rs-icon-cdn-preconnect";
|
|
2795
|
+
link.rel = "preconnect";
|
|
2796
|
+
link.href = "https://s3.rhinestone.dev";
|
|
2797
|
+
link.crossOrigin = "anonymous";
|
|
2798
|
+
document.head.appendChild(link);
|
|
2799
|
+
}
|
|
2800
|
+
preconnectIconCdn();
|
|
2763
2801
|
function TokenIcon({ symbol, className, fallback }) {
|
|
2764
|
-
const [
|
|
2765
|
-
|
|
2802
|
+
const [loadedSymbol, setLoadedSymbol] = useState2(null);
|
|
2803
|
+
const [erroredSymbol, setErroredSymbol] = useState2(null);
|
|
2804
|
+
if (erroredSymbol === symbol) {
|
|
2766
2805
|
return /* @__PURE__ */ jsx19(Fragment3, { children: fallback });
|
|
2767
2806
|
}
|
|
2807
|
+
const loading = loadedSymbol !== symbol;
|
|
2768
2808
|
return /* @__PURE__ */ jsx19(
|
|
2769
2809
|
"img",
|
|
2770
2810
|
{
|
|
2771
2811
|
src: tokenIconUrl(symbol),
|
|
2772
2812
|
alt: "",
|
|
2773
|
-
className,
|
|
2774
|
-
loading: "lazy",
|
|
2813
|
+
className: `rs-token-icon ${className ?? ""}`.trimEnd(),
|
|
2775
2814
|
decoding: "async",
|
|
2776
|
-
|
|
2777
|
-
|
|
2815
|
+
"data-loading": loading ? "" : void 0,
|
|
2816
|
+
onLoad: () => setLoadedSymbol(symbol),
|
|
2817
|
+
onError: () => setErroredSymbol(symbol)
|
|
2818
|
+
},
|
|
2819
|
+
symbol
|
|
2778
2820
|
);
|
|
2779
2821
|
}
|
|
2780
2822
|
TokenIcon.displayName = "TokenIcon";
|
|
2781
2823
|
|
|
2824
|
+
// src/core/useTokenPrices.ts
|
|
2825
|
+
import { useEffect as useEffect4, useState as useState3 } from "react";
|
|
2826
|
+
function isErc20(token) {
|
|
2827
|
+
return typeof token.chainId === "number" && !!token.address && token.address.toLowerCase() !== NATIVE_TOKEN_ADDRESS.toLowerCase();
|
|
2828
|
+
}
|
|
2829
|
+
function caip2For(token) {
|
|
2830
|
+
return `${toEvmCaip2(token.chainId)}:${token.address.toLowerCase()}`;
|
|
2831
|
+
}
|
|
2832
|
+
async function fetchTokenPriceUsd(service, token) {
|
|
2833
|
+
if (isErc20(token)) {
|
|
2834
|
+
const caip2 = caip2For(token);
|
|
2835
|
+
const prices2 = await service.fetchPricesByAddress([caip2]);
|
|
2836
|
+
const price2 = prices2[caip2];
|
|
2837
|
+
return typeof price2 === "number" && price2 > 0 ? price2 : null;
|
|
2838
|
+
}
|
|
2839
|
+
const symbol = token.symbol.toUpperCase();
|
|
2840
|
+
const prices = await service.fetchPrices([symbol]);
|
|
2841
|
+
const price = prices[symbol];
|
|
2842
|
+
return typeof price === "number" && price > 0 ? price : null;
|
|
2843
|
+
}
|
|
2844
|
+
function useTokenPrices(service, tokens) {
|
|
2845
|
+
const [prices, setPrices] = useState3({});
|
|
2846
|
+
const defined = tokens.filter((t) => Boolean(t?.symbol));
|
|
2847
|
+
const entries = [
|
|
2848
|
+
...new Map(
|
|
2849
|
+
defined.map((token) => {
|
|
2850
|
+
const erc20 = isErc20(token);
|
|
2851
|
+
const caip2 = erc20 ? caip2For(token) : null;
|
|
2852
|
+
const symbol = token.symbol.toUpperCase();
|
|
2853
|
+
return [caip2 ?? `sym:${symbol}`, { symbol, caip2 }];
|
|
2854
|
+
})
|
|
2855
|
+
).values()
|
|
2856
|
+
].sort(
|
|
2857
|
+
(a, b) => (a.caip2 ?? a.symbol).localeCompare(b.caip2 ?? b.symbol)
|
|
2858
|
+
);
|
|
2859
|
+
const key = JSON.stringify(entries);
|
|
2860
|
+
useEffect4(() => {
|
|
2861
|
+
if (key === "[]") return;
|
|
2862
|
+
let cancelled = false;
|
|
2863
|
+
const parsed = JSON.parse(key);
|
|
2864
|
+
const symbols = [
|
|
2865
|
+
...new Set(parsed.filter((e) => !e.caip2).map((e) => e.symbol))
|
|
2866
|
+
];
|
|
2867
|
+
const caip2Ids = [
|
|
2868
|
+
...new Set(
|
|
2869
|
+
parsed.filter((e) => e.caip2).map((e) => e.caip2)
|
|
2870
|
+
)
|
|
2871
|
+
];
|
|
2872
|
+
Promise.all([
|
|
2873
|
+
symbols.length > 0 ? service.fetchPrices(symbols) : Promise.resolve({}),
|
|
2874
|
+
caip2Ids.length > 0 ? service.fetchPricesByAddress(caip2Ids) : Promise.resolve({})
|
|
2875
|
+
]).then(([bySymbol, byAddress]) => {
|
|
2876
|
+
if (cancelled) return;
|
|
2877
|
+
const merged = { ...bySymbol };
|
|
2878
|
+
for (const entry of parsed) {
|
|
2879
|
+
if (!entry.caip2) continue;
|
|
2880
|
+
const price = byAddress[entry.caip2];
|
|
2881
|
+
if (typeof price === "number") merged[entry.symbol] = price;
|
|
2882
|
+
}
|
|
2883
|
+
setPrices(merged);
|
|
2884
|
+
}).catch(() => {
|
|
2885
|
+
});
|
|
2886
|
+
return () => {
|
|
2887
|
+
cancelled = true;
|
|
2888
|
+
};
|
|
2889
|
+
}, [service, key]);
|
|
2890
|
+
return prices;
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2782
2893
|
// src/components/steps/ProcessingStep.tsx
|
|
2783
2894
|
import { useCallback as useCallback3, useEffect as useEffect6, useRef as useRef4, useState as useState6 } from "react";
|
|
2784
2895
|
|
|
@@ -2824,16 +2935,16 @@ Button.displayName = "Button";
|
|
|
2824
2935
|
|
|
2825
2936
|
// src/components/ui/Tooltip.tsx
|
|
2826
2937
|
import {
|
|
2827
|
-
useState as
|
|
2938
|
+
useState as useState4,
|
|
2828
2939
|
useRef as useRef3,
|
|
2829
|
-
useEffect as
|
|
2940
|
+
useEffect as useEffect5,
|
|
2830
2941
|
useCallback as useCallback2
|
|
2831
2942
|
} from "react";
|
|
2832
2943
|
import { createPortal as createPortal2 } from "react-dom";
|
|
2833
2944
|
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2834
2945
|
function Tooltip({ content, children, className }) {
|
|
2835
|
-
const [open, setOpen] =
|
|
2836
|
-
const [position, setPosition] =
|
|
2946
|
+
const [open, setOpen] = useState4(false);
|
|
2947
|
+
const [position, setPosition] = useState4(null);
|
|
2837
2948
|
const triggerRef = useRef3(null);
|
|
2838
2949
|
const bubbleRef = useRef3(null);
|
|
2839
2950
|
const updatePosition = useCallback2(() => {
|
|
@@ -2845,7 +2956,7 @@ function Tooltip({ content, children, className }) {
|
|
|
2845
2956
|
left: rect.left + rect.width / 2
|
|
2846
2957
|
});
|
|
2847
2958
|
}, []);
|
|
2848
|
-
|
|
2959
|
+
useEffect5(() => {
|
|
2849
2960
|
if (!open) return;
|
|
2850
2961
|
updatePosition();
|
|
2851
2962
|
function handleOutside(event) {
|
|
@@ -2920,10 +3031,10 @@ function Tooltip({ content, children, className }) {
|
|
|
2920
3031
|
Tooltip.displayName = "Tooltip";
|
|
2921
3032
|
|
|
2922
3033
|
// src/components/ui/FeesAccordion.tsx
|
|
2923
|
-
import { useState as
|
|
3034
|
+
import { useState as useState5 } from "react";
|
|
2924
3035
|
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2925
3036
|
function FeesAccordion({ total, rows, tooltip }) {
|
|
2926
|
-
const [open, setOpen] =
|
|
3037
|
+
const [open, setOpen] = useState5(false);
|
|
2927
3038
|
const expandable = rows.length > 0;
|
|
2928
3039
|
return /* @__PURE__ */ jsxs19("div", { className: "rs-fees-accordion", children: [
|
|
2929
3040
|
/* @__PURE__ */ jsxs19("div", { className: "rs-fees-accordion-summary", children: [
|
|
@@ -3246,18 +3357,38 @@ function formatRawTokenAmount(rawAmount, token) {
|
|
|
3246
3357
|
if (value === void 0) return void 0;
|
|
3247
3358
|
return formatTokenAmount(value, token.symbol);
|
|
3248
3359
|
}
|
|
3360
|
+
function isDisplayStablecoinSymbol(symbol) {
|
|
3361
|
+
return symbol !== void 0 && STABLECOIN_SYMBOLS.has(symbol.toUpperCase());
|
|
3362
|
+
}
|
|
3249
3363
|
function priceUsdFor(symbol, prices) {
|
|
3250
3364
|
if (!symbol) return void 0;
|
|
3251
|
-
const
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3365
|
+
const quoted = prices[symbol.toUpperCase()];
|
|
3366
|
+
return typeof quoted === "number" && quoted > 0 ? quoted : void 0;
|
|
3367
|
+
}
|
|
3368
|
+
function isRecognizedToken(address, chain) {
|
|
3369
|
+
if (address === void 0 || chain === void 0) return false;
|
|
3370
|
+
if (chain === "solana") return getSolanaTokenByMint(address) !== void 0;
|
|
3371
|
+
if (chain === "hypercore") {
|
|
3372
|
+
return HYPERCORE_SOURCE_TOKENS.some(
|
|
3373
|
+
(t) => t.address.toLowerCase() === address.toLowerCase()
|
|
3374
|
+
);
|
|
3375
|
+
}
|
|
3376
|
+
return EVM_ADDRESS_RE.test(address) && isRegistryTokenOnChain(address, chain);
|
|
3255
3377
|
}
|
|
3256
3378
|
function estimateReceiveAmount(params) {
|
|
3257
|
-
const {
|
|
3258
|
-
|
|
3379
|
+
const {
|
|
3380
|
+
sourceAmount,
|
|
3381
|
+
sourceSymbol,
|
|
3382
|
+
targetSymbol,
|
|
3383
|
+
sourceAmountUsd,
|
|
3384
|
+
prices,
|
|
3385
|
+
sourceTrusted
|
|
3386
|
+
} = params;
|
|
3387
|
+
const trusted = sourceTrusted !== false;
|
|
3388
|
+
if (trusted && sourceSymbol !== void 0 && sourceSymbol.toUpperCase() === targetSymbol.toUpperCase()) {
|
|
3259
3389
|
return sourceAmount;
|
|
3260
3390
|
}
|
|
3391
|
+
if (!trusted) return void 0;
|
|
3261
3392
|
const usdValue = sourceAmountUsd !== void 0 && Number.isFinite(sourceAmountUsd) ? sourceAmountUsd : sourceAmount !== void 0 ? (() => {
|
|
3262
3393
|
const sourcePrice = priceUsdFor(sourceSymbol, prices);
|
|
3263
3394
|
return sourcePrice !== void 0 ? sourceAmount * sourcePrice : void 0;
|
|
@@ -3293,31 +3424,6 @@ function formatReceiveEstimate(params) {
|
|
|
3293
3424
|
return sameSymbol ? `${formatted} ${params.targetSymbol}` : `~${formatted} ${params.targetSymbol}`;
|
|
3294
3425
|
}
|
|
3295
3426
|
|
|
3296
|
-
// src/core/useTokenPrices.ts
|
|
3297
|
-
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
3298
|
-
function useTokenPrices(service, symbols) {
|
|
3299
|
-
const [prices, setPrices] = useState5({});
|
|
3300
|
-
const symbolsKey = [
|
|
3301
|
-
...new Set(
|
|
3302
|
-
symbols.filter((symbol) => Boolean(symbol)).map((symbol) => symbol.toUpperCase())
|
|
3303
|
-
)
|
|
3304
|
-
].sort().join(",");
|
|
3305
|
-
useEffect5(() => {
|
|
3306
|
-
if (!symbolsKey) return;
|
|
3307
|
-
let cancelled = false;
|
|
3308
|
-
service.fetchPrices(symbolsKey.split(",")).then((result) => {
|
|
3309
|
-
if (!cancelled && result && Object.keys(result).length > 0) {
|
|
3310
|
-
setPrices(result);
|
|
3311
|
-
}
|
|
3312
|
-
}).catch(() => {
|
|
3313
|
-
});
|
|
3314
|
-
return () => {
|
|
3315
|
-
cancelled = true;
|
|
3316
|
-
};
|
|
3317
|
-
}, [service, symbolsKey]);
|
|
3318
|
-
return prices;
|
|
3319
|
-
}
|
|
3320
|
-
|
|
3321
3427
|
// src/components/steps/ProcessingStep.tsx
|
|
3322
3428
|
import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3323
3429
|
function SuccessBadge() {
|
|
@@ -4010,8 +4116,16 @@ function ProcessingStep({
|
|
|
4010
4116
|
const formattedDestinationAmount = eventDestination.amount !== void 0 ? formatRawTokenAmount(eventDestination.amount, targetDisplay) : void 0;
|
|
4011
4117
|
const amountUsdNumber = amountUsd !== void 0 && Number(amountUsd) > 0 ? Number(amountUsd) : void 0;
|
|
4012
4118
|
const prices = useTokenPrices(service, [
|
|
4013
|
-
|
|
4014
|
-
|
|
4119
|
+
{
|
|
4120
|
+
chainId: displaySourceChain,
|
|
4121
|
+
address: displaySourceToken,
|
|
4122
|
+
symbol: sourceDisplay.symbol
|
|
4123
|
+
},
|
|
4124
|
+
{
|
|
4125
|
+
chainId: eventDestination.chainId ?? targetChain,
|
|
4126
|
+
address: eventDestination.token ?? targetToken,
|
|
4127
|
+
symbol: targetDisplay.symbol
|
|
4128
|
+
}
|
|
4015
4129
|
]);
|
|
4016
4130
|
const estimatedReceiveAmount = (() => {
|
|
4017
4131
|
const estimate = estimateReceiveAmount({
|
|
@@ -4019,6 +4133,7 @@ function ProcessingStep({
|
|
|
4019
4133
|
sourceSymbol: sourceDisplay.symbol,
|
|
4020
4134
|
targetSymbol: targetDisplay.symbol,
|
|
4021
4135
|
sourceAmountUsd: amountUsdNumber,
|
|
4136
|
+
sourceTrusted: isRecognizedToken(displaySourceToken, displaySourceChain),
|
|
4022
4137
|
prices
|
|
4023
4138
|
});
|
|
4024
4139
|
return estimate !== void 0 ? formatTokenAmount(estimate, targetDisplay.symbol) : void 0;
|
|
@@ -4395,6 +4510,8 @@ export {
|
|
|
4395
4510
|
formatUserError,
|
|
4396
4511
|
Tooltip,
|
|
4397
4512
|
formatTokenAmount,
|
|
4513
|
+
isDisplayStablecoinSymbol,
|
|
4514
|
+
isRecognizedToken,
|
|
4398
4515
|
formatQuotedReceive,
|
|
4399
4516
|
formatReceiveEstimate,
|
|
4400
4517
|
getEventTxHash,
|
|
@@ -4403,6 +4520,7 @@ export {
|
|
|
4403
4520
|
isFailedEvent,
|
|
4404
4521
|
txRefsMatch,
|
|
4405
4522
|
failureMessageForEvent,
|
|
4523
|
+
fetchTokenPriceUsd,
|
|
4406
4524
|
useTokenPrices,
|
|
4407
4525
|
ProcessingStep,
|
|
4408
4526
|
rpcUrlFor,
|
|
@@ -634,6 +634,12 @@ function findChainIdForToken(address) {
|
|
|
634
634
|
}
|
|
635
635
|
return void 0;
|
|
636
636
|
}
|
|
637
|
+
function isRegistryTokenOnChain(token, chainId) {
|
|
638
|
+
const normalized = token.toLowerCase();
|
|
639
|
+
if (normalized === NATIVE_TOKEN_ADDRESS) return true;
|
|
640
|
+
const chainEntry = chainRegistry[String(chainId)];
|
|
641
|
+
return chainEntry ? chainEntry.tokens.some((t) => t.address.toLowerCase() === normalized) : false;
|
|
642
|
+
}
|
|
637
643
|
var NATIVE_SYMBOL_BY_CHAIN = {
|
|
638
644
|
[bsc2.id]: "BNB",
|
|
639
645
|
[plasma2.id]: "XPL",
|
|
@@ -781,6 +787,7 @@ export {
|
|
|
781
787
|
findTokenDecimals,
|
|
782
788
|
getTokenDecimalsByAddress,
|
|
783
789
|
findChainIdForToken,
|
|
790
|
+
isRegistryTokenOnChain,
|
|
784
791
|
getNativeSymbol,
|
|
785
792
|
getTokenSymbol,
|
|
786
793
|
getTargetTokenSymbol,
|
|
@@ -1,11 +1,11 @@
|
|
|
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 _chunk7OKA6GNAcjs = require('./chunk-7OKA6GNA.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
|
|
9
9
|
|
|
10
10
|
// src/core/reown.tsx
|
|
11
11
|
var _react = require('react');
|
|
@@ -59,7 +59,7 @@ var APPKIT_NETWORK_BY_ID = {
|
|
|
59
59
|
[_networks.katana.id]: _networks.katana,
|
|
60
60
|
[_networks.hyperEvm.id]: _networks.hyperEvm
|
|
61
61
|
};
|
|
62
|
-
var EVM_NETWORKS =
|
|
62
|
+
var EVM_NETWORKS = _chunkU7SVYWVDcjs.SUPPORTED_CHAINS.map((chain) => {
|
|
63
63
|
const network = APPKIT_NETWORK_BY_ID[chain.id];
|
|
64
64
|
if (!network) {
|
|
65
65
|
throw new Error(
|
|
@@ -78,14 +78,14 @@ function buildTransports(rpcUrls) {
|
|
|
78
78
|
const transports = {};
|
|
79
79
|
for (const network of EVM_NETWORKS) {
|
|
80
80
|
const id = Number(network.id);
|
|
81
|
-
transports[id] = _viem.http.call(void 0,
|
|
81
|
+
transports[id] = _viem.http.call(void 0, _chunk7OKA6GNAcjs.rpcUrlFor.call(void 0, rpcUrls, id));
|
|
82
82
|
}
|
|
83
83
|
return transports;
|
|
84
84
|
}
|
|
85
85
|
function getEvmRpcFingerprint(rpcUrls) {
|
|
86
86
|
return EVM_NETWORKS.map((network) => {
|
|
87
87
|
const id = Number(network.id);
|
|
88
|
-
return `${id}=${_nullishCoalesce(
|
|
88
|
+
return `${id}=${_nullishCoalesce(_chunk7OKA6GNAcjs.rpcUrlFor.call(void 0, rpcUrls, id), () => ( ""))}`;
|
|
89
89
|
}).join("|");
|
|
90
90
|
}
|
|
91
91
|
var cachedAdapter = null;
|
|
@@ -179,9 +179,9 @@ function useReownWallet() {
|
|
|
179
179
|
await switchChainAsync({ chainId });
|
|
180
180
|
}
|
|
181
181
|
} catch (err) {
|
|
182
|
-
if (
|
|
182
|
+
if (_chunk7OKA6GNAcjs.isUnsupportedChainSwitchError.call(void 0, err)) {
|
|
183
183
|
throw new Error(
|
|
184
|
-
`Switch to ${
|
|
184
|
+
`Switch to ${_chunkU7SVYWVDcjs.getChainName.call(void 0, chainId)} in your wallet to continue`
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
throw err;
|
|
@@ -28,18 +28,19 @@ import {
|
|
|
28
28
|
getAssetId,
|
|
29
29
|
getPublicClient,
|
|
30
30
|
isNativeAsset,
|
|
31
|
+
isRecognizedToken,
|
|
31
32
|
loadSessionOwnerFromStorage,
|
|
32
33
|
saveSessionOwnerToStorage,
|
|
33
34
|
useLatestRef,
|
|
34
35
|
useRpcUrls,
|
|
35
36
|
useStableRpcUrls,
|
|
36
37
|
useTokenPrices
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-NASHLEVQ.mjs";
|
|
38
39
|
import {
|
|
39
40
|
buildSafeTransaction,
|
|
40
41
|
executeSafeErc20Transfer,
|
|
41
42
|
executeSafeEthTransfer
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-WK5AFRSP.mjs";
|
|
43
44
|
import {
|
|
44
45
|
DEFAULT_BACKEND_URL,
|
|
45
46
|
DEFAULT_SIGNER_ADDRESS,
|
|
@@ -52,7 +53,7 @@ import {
|
|
|
52
53
|
getTokenDecimalsByAddress,
|
|
53
54
|
getTokenSymbol,
|
|
54
55
|
toEvmCaip2
|
|
55
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-O5OKA27M.mjs";
|
|
56
57
|
|
|
57
58
|
// src/WithdrawModal.tsx
|
|
58
59
|
import {
|
|
@@ -681,6 +682,7 @@ function shortenAddress(addr) {
|
|
|
681
682
|
function WithdrawReviewStep({
|
|
682
683
|
sourceChain,
|
|
683
684
|
sourceSymbol,
|
|
685
|
+
sourceToken,
|
|
684
686
|
targetChain,
|
|
685
687
|
targetToken,
|
|
686
688
|
amount,
|
|
@@ -701,11 +703,15 @@ function WithdrawReviewStep({
|
|
|
701
703
|
const targetChainIcon = getChainIcon(targetChain);
|
|
702
704
|
const amountNumber = Number(amount);
|
|
703
705
|
const formattedSendAmount = formatTokenAmount(amountNumber, sourceSymbol) ?? amount;
|
|
704
|
-
const prices = useTokenPrices(service, [
|
|
706
|
+
const prices = useTokenPrices(service, [
|
|
707
|
+
{ chainId: sourceChain, address: sourceToken, symbol: sourceSymbol },
|
|
708
|
+
{ chainId: targetChain, address: targetToken, symbol: targetSymbol }
|
|
709
|
+
]);
|
|
705
710
|
const receiveDisplay = formatReceiveEstimate({
|
|
706
711
|
sourceAmount: Number.isFinite(amountNumber) ? amountNumber : void 0,
|
|
707
712
|
sourceSymbol,
|
|
708
713
|
targetSymbol,
|
|
714
|
+
sourceTrusted: isRecognizedToken(sourceToken, sourceChain),
|
|
709
715
|
prices
|
|
710
716
|
}) ?? // No price for the target token — an honest dash beats a wrong number.
|
|
711
717
|
"\u2014";
|
|
@@ -1536,6 +1542,7 @@ function WithdrawFlow({
|
|
|
1536
1542
|
{
|
|
1537
1543
|
sourceChain,
|
|
1538
1544
|
sourceSymbol: asset.symbol,
|
|
1545
|
+
sourceToken,
|
|
1539
1546
|
targetChain,
|
|
1540
1547
|
targetToken,
|
|
1541
1548
|
amount: storeApi.getState().amount ?? "0",
|
|
@@ -1590,7 +1597,7 @@ function deriveStepView(step, _registration) {
|
|
|
1590
1597
|
// src/WithdrawModal.tsx
|
|
1591
1598
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1592
1599
|
var ReownWithdrawInner = lazy(
|
|
1593
|
-
() => import("./WithdrawModalReown-
|
|
1600
|
+
() => import("./WithdrawModalReown-FVXSSGY5.mjs").then((m) => ({
|
|
1594
1601
|
default: m.WithdrawModalReown
|
|
1595
1602
|
}))
|
|
1596
1603
|
);
|
|
@@ -634,6 +634,12 @@ function findChainIdForToken(address) {
|
|
|
634
634
|
}
|
|
635
635
|
return void 0;
|
|
636
636
|
}
|
|
637
|
+
function isRegistryTokenOnChain(token, chainId) {
|
|
638
|
+
const normalized = token.toLowerCase();
|
|
639
|
+
if (normalized === NATIVE_TOKEN_ADDRESS) return true;
|
|
640
|
+
const chainEntry = chainRegistry[String(chainId)];
|
|
641
|
+
return chainEntry ? chainEntry.tokens.some((t) => t.address.toLowerCase() === normalized) : false;
|
|
642
|
+
}
|
|
637
643
|
var NATIVE_SYMBOL_BY_CHAIN = {
|
|
638
644
|
[_chains.bsc.id]: "BNB",
|
|
639
645
|
[_chains.plasma.id]: "XPL",
|
|
@@ -790,4 +796,5 @@ function getExplorerName(chainId) {
|
|
|
790
796
|
|
|
791
797
|
|
|
792
798
|
|
|
793
|
-
|
|
799
|
+
|
|
800
|
+
exports.toEvmCaip2 = toEvmCaip2; exports.targetChainToCaip2 = targetChainToCaip2; 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_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.isContractBytecode = isContractBytecode; exports.SOLANA_TOKENS = SOLANA_TOKENS; exports.getSolanaTokenBySymbol = getSolanaTokenBySymbol; exports.getSolanaTokenByMint = getSolanaTokenByMint; exports.isNativeSol = isNativeSol; exports.getChainIcon = getChainIcon; exports.tokenIconUrl = tokenIconUrl; exports.getTokenIcon = getTokenIcon; exports.DEFAULT_BACKEND_URL = DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = DEFAULT_SIGNER_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = NATIVE_TOKEN_ADDRESS; 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
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
|
|
4
4
|
|
|
5
5
|
// src/core/safe.ts
|
|
6
6
|
|
|
@@ -80,7 +80,7 @@ async function executeSafeEthTransfer(params) {
|
|
|
80
80
|
throw new Error("Wallet not connected");
|
|
81
81
|
}
|
|
82
82
|
if (chain.id !== chainId) {
|
|
83
|
-
throw new Error(`Switch to ${
|
|
83
|
+
throw new Error(`Switch to ${_chunkU7SVYWVDcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
84
84
|
}
|
|
85
85
|
const isOwner = await publicClient.readContract({
|
|
86
86
|
address: safeAddress,
|
|
@@ -163,7 +163,7 @@ async function executeSafeErc20Transfer(params) {
|
|
|
163
163
|
throw new Error("Wallet not connected");
|
|
164
164
|
}
|
|
165
165
|
if (chain.id !== chainId) {
|
|
166
|
-
throw new Error(`Switch to ${
|
|
166
|
+
throw new Error(`Switch to ${_chunkU7SVYWVDcjs.getChainName.call(void 0, chainId)} to sign`);
|
|
167
167
|
}
|
|
168
168
|
const isOwner = await publicClient.readContract({
|
|
169
169
|
address: safeAddress,
|
package/dist/constants.cjs
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -69,4 +69,4 @@ var _chunkPUMTR35Ecjs = require('./chunk-PUMTR35E.cjs');
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
exports.CHAIN_BY_ID =
|
|
72
|
+
exports.CHAIN_BY_ID = _chunkU7SVYWVDcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkU7SVYWVDcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkU7SVYWVDcjs.DEFAULT_SIGNER_ADDRESS; exports.HYPERCORE_CHAIN_ID = _chunkU7SVYWVDcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkU7SVYWVDcjs.HYPERCORE_USDC_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkU7SVYWVDcjs.NATIVE_TOKEN_ADDRESS; exports.SOLANA_TOKENS = _chunkU7SVYWVDcjs.SOLANA_TOKENS; exports.SOURCE_CHAINS = _chunkU7SVYWVDcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkU7SVYWVDcjs.SUPPORTED_CHAINS; exports.chainRegistry = _chunkU7SVYWVDcjs.chainRegistry; exports.findChainIdForToken = _chunkU7SVYWVDcjs.findChainIdForToken; exports.getChainBadge = _chunkU7SVYWVDcjs.getChainBadge; exports.getChainIcon = _chunkU7SVYWVDcjs.getChainIcon; exports.getChainId = _chunkU7SVYWVDcjs.getChainId; exports.getChainName = _chunkU7SVYWVDcjs.getChainName; exports.getChainObject = _chunkU7SVYWVDcjs.getChainObject; exports.getExplorerName = _chunkU7SVYWVDcjs.getExplorerName; exports.getExplorerTxUrl = _chunkU7SVYWVDcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkU7SVYWVDcjs.getExplorerUrl; exports.getSolanaTokenByMint = _chunkU7SVYWVDcjs.getSolanaTokenByMint; exports.getSolanaTokenBySymbol = _chunkU7SVYWVDcjs.getSolanaTokenBySymbol; exports.getSupportedChainIds = _chunkU7SVYWVDcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkU7SVYWVDcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkU7SVYWVDcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkU7SVYWVDcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkU7SVYWVDcjs.getTokenAddress; exports.getTokenDecimals = _chunkU7SVYWVDcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkU7SVYWVDcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkU7SVYWVDcjs.getTokenIcon; exports.getTokenSymbol = _chunkU7SVYWVDcjs.getTokenSymbol; exports.getUsdcAddress = _chunkU7SVYWVDcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkU7SVYWVDcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkU7SVYWVDcjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunkU7SVYWVDcjs.tokenIconUrl;
|
package/dist/constants.mjs
CHANGED
package/dist/deposit.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
3
|
+
var _chunkD3Y7ZBEDcjs = require('./chunk-D3Y7ZBED.cjs');
|
|
4
|
+
require('./chunk-4NN7UTWQ.cjs');
|
|
5
|
+
require('./chunk-7OKA6GNA.cjs');
|
|
6
|
+
require('./chunk-XRWQMIBY.cjs');
|
|
7
|
+
require('./chunk-U7SVYWVD.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.DepositModal =
|
|
10
|
+
exports.DepositModal = _chunkD3Y7ZBEDcjs.DepositModal;
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DepositModal
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7KHEIMWD.mjs";
|
|
4
|
+
import "./chunk-DABKCJVL.mjs";
|
|
5
|
+
import "./chunk-NASHLEVQ.mjs";
|
|
6
|
+
import "./chunk-WK5AFRSP.mjs";
|
|
7
|
+
import "./chunk-O5OKA27M.mjs";
|
|
8
8
|
export {
|
|
9
9
|
DepositModal
|
|
10
10
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunkD3Y7ZBEDcjs = require('./chunk-D3Y7ZBED.cjs');
|
|
4
|
+
require('./chunk-4NN7UTWQ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
7
|
+
var _chunkHQWZCOMScjs = require('./chunk-HQWZCOMS.cjs');
|
|
8
|
+
require('./chunk-7OKA6GNA.cjs');
|
|
9
|
+
require('./chunk-XRWQMIBY.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -40,7 +40,7 @@ require('./chunk-WL7AXYQ4.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkU7SVYWVDcjs = require('./chunk-U7SVYWVD.cjs');
|
|
44
44
|
|
|
45
45
|
// src/core/reown-disconnect.ts
|
|
46
46
|
var _react = require('@reown/appkit/react');
|
|
@@ -89,4 +89,4 @@ async function disconnectWallet() {
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
exports.CHAIN_BY_ID =
|
|
92
|
+
exports.CHAIN_BY_ID = _chunkU7SVYWVDcjs.CHAIN_BY_ID; exports.DEFAULT_BACKEND_URL = _chunkU7SVYWVDcjs.DEFAULT_BACKEND_URL; exports.DEFAULT_SIGNER_ADDRESS = _chunkU7SVYWVDcjs.DEFAULT_SIGNER_ADDRESS; exports.DepositModal = _chunkD3Y7ZBEDcjs.DepositModal; exports.HYPERCORE_CHAIN_ID = _chunkU7SVYWVDcjs.HYPERCORE_CHAIN_ID; exports.HYPERCORE_USDC_ADDRESS = _chunkU7SVYWVDcjs.HYPERCORE_USDC_ADDRESS; exports.HYPERCORE_USDT0_ADDRESS = _chunkU7SVYWVDcjs.HYPERCORE_USDT0_ADDRESS; exports.NATIVE_TOKEN_ADDRESS = _chunkU7SVYWVDcjs.NATIVE_TOKEN_ADDRESS; exports.SOURCE_CHAINS = _chunkU7SVYWVDcjs.SOURCE_CHAINS; exports.SUPPORTED_CHAINS = _chunkU7SVYWVDcjs.SUPPORTED_CHAINS; exports.WithdrawModal = _chunkHQWZCOMScjs.WithdrawModal; exports.chainRegistry = _chunkU7SVYWVDcjs.chainRegistry; exports.disconnectWallet = disconnectWallet; exports.findChainIdForToken = _chunkU7SVYWVDcjs.findChainIdForToken; exports.getChainBadge = _chunkU7SVYWVDcjs.getChainBadge; exports.getChainIcon = _chunkU7SVYWVDcjs.getChainIcon; exports.getChainId = _chunkU7SVYWVDcjs.getChainId; exports.getChainName = _chunkU7SVYWVDcjs.getChainName; exports.getChainObject = _chunkU7SVYWVDcjs.getChainObject; exports.getExplorerName = _chunkU7SVYWVDcjs.getExplorerName; exports.getExplorerTxUrl = _chunkU7SVYWVDcjs.getExplorerTxUrl; exports.getExplorerUrl = _chunkU7SVYWVDcjs.getExplorerUrl; exports.getSupportedChainIds = _chunkU7SVYWVDcjs.getSupportedChainIds; exports.getSupportedTargetTokens = _chunkU7SVYWVDcjs.getSupportedTargetTokens; exports.getSupportedTokenSymbolsForChain = _chunkU7SVYWVDcjs.getSupportedTokenSymbolsForChain; exports.getTargetTokenSymbolsForChain = _chunkU7SVYWVDcjs.getTargetTokenSymbolsForChain; exports.getTokenAddress = _chunkU7SVYWVDcjs.getTokenAddress; exports.getTokenDecimals = _chunkU7SVYWVDcjs.getTokenDecimals; exports.getTokenDecimalsByAddress = _chunkU7SVYWVDcjs.getTokenDecimalsByAddress; exports.getTokenIcon = _chunkU7SVYWVDcjs.getTokenIcon; exports.getTokenSymbol = _chunkU7SVYWVDcjs.getTokenSymbol; exports.getUsdcAddress = _chunkU7SVYWVDcjs.getUsdcAddress; exports.getUsdcDecimals = _chunkU7SVYWVDcjs.getUsdcDecimals; exports.isSupportedTokenAddressForChain = _chunkU7SVYWVDcjs.isSupportedTokenAddressForChain; exports.tokenIconUrl = _chunkU7SVYWVDcjs.tokenIconUrl;
|