coinley-test 0.0.73 → 0.0.74
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 +39 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/vanilla/coinley-vanilla.umd.js +1 -1
- package/dist/vanilla/coinley-vanilla.umd.js.map +1 -1
- package/dist/vanilla/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2581,7 +2581,7 @@ const WalletSelector = ({
|
|
|
2581
2581
|
connectedWallet,
|
|
2582
2582
|
loading
|
|
2583
2583
|
}) => {
|
|
2584
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2584
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
2585
2585
|
const [selectedWalletType, setSelectedWalletType] = useState(null);
|
|
2586
2586
|
const walletManager = useRef(new UniversalWalletManager());
|
|
2587
2587
|
const getAvailableWallets = () => {
|
|
@@ -2589,7 +2589,7 @@ const WalletSelector = ({
|
|
|
2589
2589
|
if (["ethereum", "bsc", "polygon", "arbitrum", "optimism", "avalanche", "solana"].includes(selectedNetwork.shortName)) {
|
|
2590
2590
|
const detectedWallets = walletManager.current.getAvailableWallets();
|
|
2591
2591
|
if (detectedWallets.length === 0 && window.ethereum) {
|
|
2592
|
-
console.log("🚨 EMERGENCY OVERRIDE: No wallets detected but ethereum exists, forcing
|
|
2592
|
+
console.log("🚨 EMERGENCY OVERRIDE: No wallets detected but ethereum exists, forcing all wallets to show");
|
|
2593
2593
|
return [
|
|
2594
2594
|
{
|
|
2595
2595
|
type: "metamask",
|
|
@@ -2606,10 +2606,18 @@ const WalletSelector = ({
|
|
|
2606
2606
|
description: "Connect using Rabby wallet",
|
|
2607
2607
|
color: "blue",
|
|
2608
2608
|
isInstalled: true
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
type: "cryptocom",
|
|
2612
|
+
name: "Crypto.com",
|
|
2613
|
+
icon: "💎",
|
|
2614
|
+
description: "Connect using Crypto.com DeFi Wallet",
|
|
2615
|
+
color: "blue",
|
|
2616
|
+
isInstalled: true
|
|
2609
2617
|
}
|
|
2610
2618
|
];
|
|
2611
2619
|
}
|
|
2612
|
-
if (detectedWallets.length <
|
|
2620
|
+
if (detectedWallets.length < 3 && window.ethereum) {
|
|
2613
2621
|
console.log("🚨 SAFETY CHECK: Adding missing wallets");
|
|
2614
2622
|
const allWallets = [
|
|
2615
2623
|
{
|
|
@@ -2627,6 +2635,14 @@ const WalletSelector = ({
|
|
|
2627
2635
|
description: "Connect using Rabby wallet",
|
|
2628
2636
|
color: "blue",
|
|
2629
2637
|
isInstalled: true
|
|
2638
|
+
},
|
|
2639
|
+
{
|
|
2640
|
+
type: "cryptocom",
|
|
2641
|
+
name: "Crypto.com",
|
|
2642
|
+
icon: "💎",
|
|
2643
|
+
description: "Connect using Crypto.com DeFi Wallet",
|
|
2644
|
+
color: "blue",
|
|
2645
|
+
isInstalled: true
|
|
2630
2646
|
}
|
|
2631
2647
|
];
|
|
2632
2648
|
const combinedWallets = [];
|
|
@@ -2654,6 +2670,7 @@ const WalletSelector = ({
|
|
|
2654
2670
|
console.log("💡 WALLET SELECTOR: window.ethereum exists:", !!window.ethereum);
|
|
2655
2671
|
console.log("💡 WALLET SELECTOR: window.ethereum.isMetaMask:", (_a = window.ethereum) == null ? void 0 : _a.isMetaMask);
|
|
2656
2672
|
console.log("💡 WALLET SELECTOR: window.ethereum.isRabby:", (_b = window.ethereum) == null ? void 0 : _b.isRabby);
|
|
2673
|
+
console.log("💡 WALLET SELECTOR: window.ethereum.isCryptoCom:", (_c = window.ethereum) == null ? void 0 : _c.isCryptoCom);
|
|
2657
2674
|
const handleWalletClick = async (walletType) => {
|
|
2658
2675
|
setSelectedWalletType(walletType);
|
|
2659
2676
|
onWalletSelect(walletType);
|
|
@@ -2678,6 +2695,10 @@ const WalletSelector = ({
|
|
|
2678
2695
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2679
2696
|
"• ",
|
|
2680
2697
|
/* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: "https://rabby.io", target: "_blank", rel: "noopener noreferrer", className: "text-amber-700 underline hover:text-amber-900", children: "Install Rabby Wallet" })
|
|
2698
|
+
] }),
|
|
2699
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2700
|
+
"• ",
|
|
2701
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: "https://crypto.com/defi-wallet", target: "_blank", rel: "noopener noreferrer", className: "text-amber-700 underline hover:text-amber-900", children: "Install Crypto.com DeFi Wallet" })
|
|
2681
2702
|
] })
|
|
2682
2703
|
] })
|
|
2683
2704
|
] }) })
|
|
@@ -2707,7 +2728,8 @@ const WalletSelector = ({
|
|
|
2707
2728
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1", children: [
|
|
2708
2729
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-semibold text-gray-800 flex items-center", children: [
|
|
2709
2730
|
wallet.name,
|
|
2710
|
-
wallet.type === "rabby" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded-full", children: "NEW" })
|
|
2731
|
+
wallet.type === "rabby" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded-full", children: "NEW" }),
|
|
2732
|
+
wallet.type === "cryptocom" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-1 bg-purple-100 text-purple-700 text-xs rounded-full", children: "DeFi" })
|
|
2711
2733
|
] }),
|
|
2712
2734
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500", children: (connectedWallet == null ? void 0 : connectedWallet.walletType) === wallet.type ? "✅ Connected" : wallet.description })
|
|
2713
2735
|
] }),
|
|
@@ -2719,9 +2741,9 @@ const WalletSelector = ({
|
|
|
2719
2741
|
connectedWallet && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 p-3 bg-green-50 rounded-lg border border-green-200", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm text-green-800 text-center", style: { fontFamily: "Bricolage Grotesque, sans-serif" }, children: [
|
|
2720
2742
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "✅ Wallet Connected" }),
|
|
2721
2743
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs mt-1", children: [
|
|
2722
|
-
(
|
|
2744
|
+
(_d = connectedWallet.account) == null ? void 0 : _d.slice(0, 6),
|
|
2723
2745
|
"...",
|
|
2724
|
-
(
|
|
2746
|
+
(_e = connectedWallet.account) == null ? void 0 : _e.slice(-4),
|
|
2725
2747
|
" (",
|
|
2726
2748
|
connectedWallet.walletType,
|
|
2727
2749
|
")"
|
|
@@ -2735,21 +2757,29 @@ const WalletSelector = ({
|
|
|
2735
2757
|
] }),
|
|
2736
2758
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2737
2759
|
"• window.ethereum.isMetaMask: ",
|
|
2738
|
-
((
|
|
2760
|
+
((_f = window.ethereum) == null ? void 0 : _f.isMetaMask) ? "✅" : "❌"
|
|
2739
2761
|
] }),
|
|
2740
2762
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2741
2763
|
"• window.ethereum.isRabby: ",
|
|
2742
|
-
((
|
|
2764
|
+
((_g = window.ethereum) == null ? void 0 : _g.isRabby) ? "✅" : "❌"
|
|
2765
|
+
] }),
|
|
2766
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2767
|
+
"• window.ethereum.isCryptoCom: ",
|
|
2768
|
+
((_h = window.ethereum) == null ? void 0 : _h.isCryptoCom) ? "✅" : "❌"
|
|
2743
2769
|
] }),
|
|
2744
2770
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2745
2771
|
"• window.ethereum.providers: ",
|
|
2746
|
-
((
|
|
2772
|
+
((_j = (_i = window.ethereum) == null ? void 0 : _i.providers) == null ? void 0 : _j.length) || 0,
|
|
2747
2773
|
" provider(s)"
|
|
2748
2774
|
] }),
|
|
2749
2775
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2750
2776
|
"• window.rabby exists: ",
|
|
2751
2777
|
window.rabby ? "✅" : "❌"
|
|
2752
2778
|
] }),
|
|
2779
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2780
|
+
"• window.cryptoCom exists: ",
|
|
2781
|
+
window.cryptoCom ? "✅" : "❌"
|
|
2782
|
+
] }),
|
|
2753
2783
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
2754
2784
|
"• Showing ",
|
|
2755
2785
|
availableWallets.length,
|