coinley-test 0.0.45 → 0.0.46
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/index.esm.js
CHANGED
|
@@ -2150,17 +2150,26 @@ const getCmcLogoUrl = (symbol) => {
|
|
|
2150
2150
|
return null;
|
|
2151
2151
|
};
|
|
2152
2152
|
const NetworkLogos = {
|
|
2153
|
-
ethereum:
|
|
2154
|
-
bsc:
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
solana:
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
avalanche:
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2153
|
+
ethereum: "https://s2.coinmarketcap.com/static/img/coins/64x64/1027.png",
|
|
2154
|
+
bsc: "https://s2.coinmarketcap.com/static/img/coins/64x64/1839.png",
|
|
2155
|
+
tron: "https://s2.coinmarketcap.com/static/img/coins/64x64/1958.png",
|
|
2156
|
+
algorand: "https://s2.coinmarketcap.com/static/img/coins/64x64/4030.png",
|
|
2157
|
+
solana: "https://s2.coinmarketcap.com/static/img/coins/64x64/5426.png",
|
|
2158
|
+
polygon: "https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png",
|
|
2159
|
+
arbitrum: "https://s2.coinmarketcap.com/static/img/coins/64x64/11841.png",
|
|
2160
|
+
avalanche: "https://s2.coinmarketcap.com/static/img/coins/64x64/5805.png",
|
|
2161
|
+
celo: "https://s2.coinmarketcap.com/static/img/coins/64x64/5567.png",
|
|
2162
|
+
optimism: "https://s2.coinmarketcap.com/static/img/coins/64x64/11840.png",
|
|
2163
|
+
// Alternative shortNames that might be used
|
|
2164
|
+
eth: "https://s2.coinmarketcap.com/static/img/coins/64x64/1027.png",
|
|
2165
|
+
bnb: "https://s2.coinmarketcap.com/static/img/coins/64x64/1839.png",
|
|
2166
|
+
trx: "https://s2.coinmarketcap.com/static/img/coins/64x64/1958.png",
|
|
2167
|
+
algo: "https://s2.coinmarketcap.com/static/img/coins/64x64/4030.png",
|
|
2168
|
+
sol: "https://s2.coinmarketcap.com/static/img/coins/64x64/5426.png",
|
|
2169
|
+
matic: "https://s2.coinmarketcap.com/static/img/coins/64x64/28321.png",
|
|
2170
|
+
arb: "https://s2.coinmarketcap.com/static/img/coins/64x64/11841.png",
|
|
2171
|
+
avax: "https://s2.coinmarketcap.com/static/img/coins/64x64/5805.png",
|
|
2172
|
+
op: "https://s2.coinmarketcap.com/static/img/coins/64x64/11840.png"
|
|
2164
2173
|
};
|
|
2165
2174
|
const getTokenLogoUrl = (symbol) => {
|
|
2166
2175
|
return getCmcLogoUrl(symbol);
|
|
@@ -2922,36 +2931,35 @@ const EnhancedSimpleCoinleyPayment = ({
|
|
|
2922
2931
|
return "No wallet address configured for this network";
|
|
2923
2932
|
};
|
|
2924
2933
|
const renderNetworkOption = (network) => {
|
|
2925
|
-
var _a2, _b2;
|
|
2926
|
-
const networkLogoUrl = NetworkLogos[network.shortName];
|
|
2927
|
-
|
|
2928
|
-
console.log("Network:", network.shortName, "Logo URL:", finalLogoUrl);
|
|
2934
|
+
var _a2, _b2, _c2;
|
|
2935
|
+
const networkLogoUrl = NetworkLogos[(_a2 = network.shortName) == null ? void 0 : _a2.toLowerCase()];
|
|
2936
|
+
console.log("Network:", network.shortName, "Logo URL:", networkLogoUrl);
|
|
2929
2937
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
2930
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2938
|
+
networkLogoUrl ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2931
2939
|
"img",
|
|
2932
2940
|
{
|
|
2933
|
-
src:
|
|
2941
|
+
src: networkLogoUrl,
|
|
2934
2942
|
alt: network.name,
|
|
2935
2943
|
className: "w-8 h-8 rounded-full",
|
|
2936
|
-
onLoad: () => console.log("Logo loaded successfully for", network.shortName),
|
|
2944
|
+
onLoad: () => console.log("✅ Logo loaded successfully for", network.shortName),
|
|
2937
2945
|
onError: (e) => {
|
|
2938
|
-
console.log("Logo failed to load for", network.shortName, "URL:",
|
|
2946
|
+
console.log("❌ Logo failed to load for", network.shortName, "URL:", networkLogoUrl);
|
|
2939
2947
|
e.target.style.display = "none";
|
|
2940
2948
|
e.target.nextSibling.style.display = "flex";
|
|
2941
2949
|
}
|
|
2942
2950
|
}
|
|
2943
|
-
),
|
|
2951
|
+
) : null,
|
|
2944
2952
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2945
2953
|
"div",
|
|
2946
2954
|
{
|
|
2947
2955
|
className: "w-8 h-8 rounded-full bg-gray-200 flex items-center justify-center",
|
|
2948
|
-
style: { display: "none" },
|
|
2949
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-600", children: (
|
|
2956
|
+
style: { display: networkLogoUrl ? "none" : "flex" },
|
|
2957
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs font-bold text-gray-600", children: (_b2 = network.shortName) == null ? void 0 : _b2.slice(0, 2).toUpperCase() })
|
|
2950
2958
|
}
|
|
2951
2959
|
),
|
|
2952
2960
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2953
2961
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-semibold text-gray-800", children: network.name }),
|
|
2954
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500", children: (
|
|
2962
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500", children: (_c2 = network.shortName) == null ? void 0 : _c2.toUpperCase() })
|
|
2955
2963
|
] })
|
|
2956
2964
|
] });
|
|
2957
2965
|
};
|