coinley-checkout 1.1.3 → 1.1.5
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.
|
@@ -19087,7 +19087,8 @@ const sendAlgorandAssetTransaction = (walletConnection, tokenConfig, toAddress,
|
|
|
19087
19087
|
let apiConfig = {
|
|
19088
19088
|
apiKey: null,
|
|
19089
19089
|
apiSecret: null,
|
|
19090
|
-
apiUrl:
|
|
19090
|
+
// apiUrl: 'https://coinleyserver-production.up.railway.app',
|
|
19091
|
+
apiUrl: "https://hub.coinley.io",
|
|
19091
19092
|
merchantWalletAddresses: {},
|
|
19092
19093
|
authToken: null,
|
|
19093
19094
|
merchantFeePercentage: null,
|
|
@@ -21257,39 +21258,70 @@ const PaymentMethods = ({ onSelect, selected, theme: theme2 = "light", supported
|
|
|
21257
21258
|
return iconMap[shortName] || EthIcon;
|
|
21258
21259
|
};
|
|
21259
21260
|
const getTokenIcon = (token) => {
|
|
21260
|
-
|
|
21261
|
+
console.log("🔍 getTokenIcon called with token:", token);
|
|
21262
|
+
console.log("🔍 Token symbol:", token.symbol);
|
|
21263
|
+
console.log("🔍 Token logo from backend:", token.logo);
|
|
21264
|
+
if (token.symbol === "PYUSD") {
|
|
21265
|
+
console.log("✅ Using PYUSD component");
|
|
21261
21266
|
return { type: "component", value: PyusdIcon };
|
|
21262
|
-
|
|
21267
|
+
}
|
|
21268
|
+
if (token.symbol === "USDP") {
|
|
21269
|
+
console.log("✅ Using USDP component");
|
|
21263
21270
|
return { type: "component", value: UsdpIcon };
|
|
21271
|
+
}
|
|
21264
21272
|
if (token.logo && token.logo !== "" && !token.logo.includes("placeholder")) {
|
|
21273
|
+
console.log("✅ Using backend logo:", token.logo);
|
|
21265
21274
|
return { type: "image", value: token.logo };
|
|
21266
21275
|
}
|
|
21267
21276
|
const fallbackImages = {
|
|
21268
|
-
|
|
21269
|
-
"
|
|
21270
|
-
"
|
|
21271
|
-
"
|
|
21272
|
-
"
|
|
21273
|
-
"
|
|
21274
|
-
|
|
21277
|
+
// Stablecoins
|
|
21278
|
+
"USDT": "https://s2.coinmarketcap.com/static/img/coins/64x64/825.png",
|
|
21279
|
+
"USDC": "https://s2.coinmarketcap.com/static/img/coins/64x64/3408.png",
|
|
21280
|
+
"DAI": "https://s2.coinmarketcap.com/static/img/coins/64x64/4943.png",
|
|
21281
|
+
"BUSD": "https://s2.coinmarketcap.com/static/img/coins/64x64/4687.png",
|
|
21282
|
+
"USDP": "https://s2.coinmarketcap.com/static/img/coins/64x64/6958.png",
|
|
21283
|
+
// Pax Dollar
|
|
21284
|
+
"PYUSD": "https://s2.coinmarketcap.com/static/img/coins/64x64/28134.png",
|
|
21285
|
+
// PayPal USD
|
|
21286
|
+
"FRAX": "https://s2.coinmarketcap.com/static/img/coins/64x64/6952.png",
|
|
21275
21287
|
"USDJ": "https://s2.coinmarketcap.com/static/img/coins/64x64/5446.png",
|
|
21276
|
-
|
|
21277
|
-
"
|
|
21278
|
-
|
|
21279
|
-
"
|
|
21280
|
-
|
|
21281
|
-
"
|
|
21282
|
-
|
|
21283
|
-
"
|
|
21288
|
+
// JUST Stablecoin
|
|
21289
|
+
"TUSD": "https://s2.coinmarketcap.com/static/img/coins/64x64/2563.png",
|
|
21290
|
+
// Native Cryptocurrencies
|
|
21291
|
+
"ETH": "https://s2.coinmarketcap.com/static/img/coins/64x64/1027.png",
|
|
21292
|
+
// Ethereum
|
|
21293
|
+
"BNB": "https://s2.coinmarketcap.com/static/img/coins/64x64/1839.png",
|
|
21294
|
+
// BNB
|
|
21295
|
+
"TRX": "https://s2.coinmarketcap.com/static/img/coins/64x64/1958.png",
|
|
21296
|
+
// TRON
|
|
21297
|
+
"ALGO": "https://s2.coinmarketcap.com/static/img/coins/64x64/4030.png",
|
|
21298
|
+
// Algorand
|
|
21299
|
+
"SOL": "https://s2.coinmarketcap.com/static/img/coins/64x64/5426.png",
|
|
21300
|
+
// Solana
|
|
21301
|
+
"AVAX": "https://s2.coinmarketcap.com/static/img/coins/64x64/5805.png",
|
|
21302
|
+
// Avalanche
|
|
21303
|
+
"MATIC": "https://s2.coinmarketcap.com/static/img/coins/64x64/3890.png"
|
|
21304
|
+
// Polygon
|
|
21284
21305
|
};
|
|
21285
|
-
const fallbackUrl = fallbackImages[token.symbol]
|
|
21286
|
-
|
|
21306
|
+
const fallbackUrl = fallbackImages[token.symbol];
|
|
21307
|
+
if (fallbackUrl) {
|
|
21308
|
+
console.log("✅ Using fallback image for", token.symbol, ":", fallbackUrl);
|
|
21309
|
+
return { type: "image", value: fallbackUrl };
|
|
21310
|
+
}
|
|
21311
|
+
const placeholder = `https://via.placeholder.com/64x64/6366f1/ffffff?text=${token.symbol}`;
|
|
21312
|
+
console.log("⚠️ Using placeholder for", token.symbol, ":", placeholder);
|
|
21313
|
+
return { type: "image", value: placeholder };
|
|
21287
21314
|
};
|
|
21288
21315
|
const renderTokenIcon = (tokenIconData, size = 32, className = "rounded-full") => {
|
|
21316
|
+
console.log("🎨 renderTokenIcon called with:", tokenIconData);
|
|
21317
|
+
console.log("🎨 Icon type:", tokenIconData.type);
|
|
21318
|
+
console.log("🎨 Icon value:", tokenIconData.value);
|
|
21289
21319
|
if (tokenIconData.type === "component") {
|
|
21290
21320
|
const IconComponent = tokenIconData.value;
|
|
21321
|
+
console.log("🎨 Rendering component:", IconComponent);
|
|
21291
21322
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(IconComponent, { size });
|
|
21292
21323
|
} else {
|
|
21324
|
+
console.log("🎨 Rendering image with URL:", tokenIconData.value);
|
|
21293
21325
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
21294
21326
|
"img",
|
|
21295
21327
|
{
|
|
@@ -21297,7 +21329,9 @@ const PaymentMethods = ({ onSelect, selected, theme: theme2 = "light", supported
|
|
|
21297
21329
|
alt: "Token",
|
|
21298
21330
|
className: `h-${size / 4} w-${size / 4} ${className}`,
|
|
21299
21331
|
style: { height: `${size}px`, width: `${size}px` },
|
|
21332
|
+
onLoad: () => console.log("✅ Image loaded successfully:", tokenIconData.value),
|
|
21300
21333
|
onError: (e) => {
|
|
21334
|
+
console.error("❌ Image failed to load:", tokenIconData.value);
|
|
21301
21335
|
e.target.src = `https://via.placeholder.com/${size}x${size}/6366f1/ffffff?text=?`;
|
|
21302
21336
|
}
|
|
21303
21337
|
}
|
|
@@ -21868,12 +21902,12 @@ const CoinleyModal = ({
|
|
|
21868
21902
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: "Currency:" }),
|
|
21869
21903
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: selectedPaymentMethod.currency })
|
|
21870
21904
|
] }),
|
|
21871
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-b
|
|
21905
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-b border-black" }),
|
|
21872
21906
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
|
21873
21907
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: "Network:" }),
|
|
21874
21908
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: getNetworkDisplayName(selectedPaymentMethod.network) })
|
|
21875
21909
|
] }),
|
|
21876
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-b
|
|
21910
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-b border-black" }),
|
|
21877
21911
|
payment.feeChargedTo === "customer" && payment.feeAmount > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
21878
21912
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
|
|
21879
21913
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: "Processing Fee:" }),
|
|
@@ -21882,7 +21916,7 @@ const CoinleyModal = ({
|
|
|
21882
21916
|
"%"
|
|
21883
21917
|
] })
|
|
21884
21918
|
] }),
|
|
21885
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-b
|
|
21919
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "border border-b border-black" }),
|
|
21886
21920
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between border-t pt-2 mt-1", children: [
|
|
21887
21921
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-bold", children: "Total:" }),
|
|
21888
21922
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "font-bold text-lg", children: [
|