coinley-test 0.0.69 → 0.0.72

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
@@ -1919,7 +1919,7 @@ class UniversalWalletManager {
1919
1919
  this.connectedWallet = null;
1920
1920
  this.walletType = null;
1921
1921
  }
1922
- // Detect all available wallets - VERY INCLUSIVE approach + FIXED providers detection
1922
+ // Detect all available wallets - VERY INCLUSIVE approach
1923
1923
  getAvailableWallets() {
1924
1924
  var _a;
1925
1925
  const wallets = [];
@@ -1935,19 +1935,8 @@ class UniversalWalletManager {
1935
1935
  providersLength: (_a = window.ethereum.providers) == null ? void 0 : _a.length,
1936
1936
  hasMetaMaskProperty: !!window.ethereum._metamask,
1937
1937
  hasRabbyGlobal: !!window.rabby,
1938
- hasZerionGlobal: !!window.zerion,
1939
- // CRITICAL: Actually check if providers array exists
1940
- providersArray: window.ethereum.providers ? "EXISTS" : "MISSING"
1938
+ hasZerionGlobal: !!window.zerion
1941
1939
  });
1942
- if (!window.ethereum.providers && window.ethereum.request) {
1943
- console.log("🔧 CRITICAL FIX: Providers array missing, attempting to create it...");
1944
- try {
1945
- window.ethereum.request({ method: "eth_accounts" }).catch(() => {
1946
- });
1947
- } catch (e) {
1948
- console.log("Provider detection trigger failed safely");
1949
- }
1950
- }
1951
1940
  if (this.isMetaMaskAvailable()) {
1952
1941
  wallets.push({
1953
1942
  type: "metamask",
@@ -2093,117 +2082,56 @@ class UniversalWalletManager {
2093
2082
  console.log("❌ Rabby not detected through any method");
2094
2083
  return false;
2095
2084
  }
2096
- // NEW: COMPREHENSIVE Zerion detection - FIXED providers array detection
2085
+ // NEW: VERY STRICT Zerion detection - must distinguish from MetaMask
2097
2086
  isZerionAvailable() {
2098
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
2099
- console.log("🔷 COMPREHENSIVE Zerion Detection Starting...");
2087
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
2100
2088
  if (!window.ethereum && !window.zerion) {
2101
2089
  console.log("❌ Zerion check: No window.ethereum or window.zerion");
2102
2090
  return false;
2103
2091
  }
2104
- if (((_a = window.ethereum) == null ? void 0 : _a.providers) && Array.isArray(window.ethereum.providers) && window.ethereum.providers.length > 0) {
2092
+ if (((_a = window.ethereum) == null ? void 0 : _a.providers) && Array.isArray(window.ethereum.providers)) {
2105
2093
  console.log("🔍 Zerion check: Searching in providers array...");
2106
2094
  for (let i = 0; i < window.ethereum.providers.length; i++) {
2107
2095
  const provider = window.ethereum.providers[i];
2108
- console.log(`Provider ${i} FULL details:`, {
2096
+ console.log(`Provider ${i} Zerion check:`, {
2109
2097
  isZerion: provider.isZerion,
2110
2098
  isZerionWallet: provider.isZerionWallet,
2111
2099
  isMetaMask: provider.isMetaMask,
2112
- isRabby: provider.isRabby,
2113
2100
  constructor: (_b = provider.constructor) == null ? void 0 : _b.name,
2114
- zerion: !!provider.zerion,
2115
- _zerion: !!provider._zerion,
2116
- // Check for more Zerion properties
2117
- selectedAddress: provider.selectedAddress,
2118
- networkVersion: provider.networkVersion,
2119
- // Look for Zerion-specific methods
2120
- hasZerionMethods: !!(provider.wallet_addEthereumChain || provider.wallet_switchEthereumChain),
2121
- // Check all properties safely
2122
- allKeys: Object.keys(provider).filter((key) => key.toLowerCase().includes("zerion"))
2101
+ zerion: !!provider.zerion
2123
2102
  });
2124
- if (provider.isZerion === true || provider.isZerionWallet === true || provider.zerion || provider._zerion || ((_d = (_c = provider.constructor) == null ? void 0 : _c.name) == null ? void 0 : _d.toLowerCase().includes("zerion")) || Object.keys(provider).some((key) => key.toLowerCase().includes("zerion"))) {
2125
- console.log("✅ Zerion found in providers array via comprehensive check");
2103
+ if ((provider.isZerion === true || provider.isZerionWallet === true || provider.zerion) && provider.isMetaMask !== true) {
2104
+ console.log("✅ Zerion found in providers array (not MetaMask)");
2126
2105
  return true;
2127
2106
  }
2128
2107
  }
2129
- } else {
2130
- console.log("⚠️ No providers array found or empty - this might be why Zerion isn't detected");
2131
2108
  }
2132
2109
  if (window.ethereum) {
2133
- console.log("🔍 Checking main ethereum object for Zerion...", {
2134
- isZerion: window.ethereum.isZerion,
2135
- isZerionWallet: window.ethereum.isZerionWallet,
2136
- zerion: !!window.ethereum.zerion,
2137
- _zerion: !!window.ethereum._zerion,
2138
- constructor: (_e = window.ethereum.constructor) == null ? void 0 : _e.name,
2139
- allKeys: Object.keys(window.ethereum).filter((key) => key.toLowerCase().includes("zerion"))
2140
- });
2141
- if (window.ethereum.isZerion === true || window.ethereum.isZerionWallet === true || window.ethereum.zerion || window.ethereum._zerion || ((_g = (_f = window.ethereum.constructor) == null ? void 0 : _f.name) == null ? void 0 : _g.toLowerCase().includes("zerion")) || Object.keys(window.ethereum).some((key) => key.toLowerCase().includes("zerion"))) {
2142
- console.log("✅ Zerion detected: Main ethereum object comprehensive check");
2110
+ if ((window.ethereum.isZerion === true || window.ethereum.isZerionWallet === true) && window.ethereum.isMetaMask !== true) {
2111
+ console.log("✅ Zerion detected: Direct isZerion property (not MetaMask)");
2143
2112
  return true;
2144
2113
  }
2145
2114
  }
2146
2115
  if (window.zerion) {
2147
- console.log("✅ Zerion detected: Global window.zerion object found", window.zerion);
2116
+ console.log("✅ Zerion detected: Global window.zerion object found");
2148
2117
  return true;
2149
2118
  }
2150
- if (typeof window !== "undefined") {
2151
- const userAgent = ((_h = window.navigator) == null ? void 0 : _h.userAgent) || "";
2152
- console.log("🔍 Checking user agent for Zerion:", userAgent);
2153
- if (userAgent.includes("Zerion") || userAgent.includes("zerion")) {
2154
- console.log("✅ Zerion detected: User agent contains Zerion");
2155
- return true;
2156
- }
2157
- }
2158
- if (typeof document !== "undefined") {
2159
- console.log("🔍 Checking DOM for Zerion indicators...");
2160
- const zerionMeta = document.querySelector('meta[name*="zerion" i]') || document.querySelector('meta[content*="zerion" i]') || document.querySelector('script[src*="zerion" i]') || document.querySelector('link[href*="zerion" i]');
2161
- if (zerionMeta) {
2162
- console.log("✅ Zerion detected: DOM elements found", zerionMeta);
2163
- return true;
2164
- }
2165
- }
2166
- if (typeof window !== "undefined") {
2167
- console.log("🔍 Checking for Zerion in-app browser...");
2168
- const isZerionApp = ((_j = (_i = window.location) == null ? void 0 : _i.href) == null ? void 0 : _j.includes("zerion")) || ((_k = window.origin) == null ? void 0 : _k.includes("zerion")) || ((_l = document.title) == null ? void 0 : _l.includes("Zerion")) || ((_m = document.title) == null ? void 0 : _m.includes("zerion"));
2169
- if (isZerionApp) {
2170
- console.log("✅ Zerion detected: Running in Zerion app/browser");
2171
- return true;
2172
- }
2119
+ if (((_e = (_d = (_c = window.ethereum) == null ? void 0 : _c.constructor) == null ? void 0 : _d.name) == null ? void 0 : _e.toLowerCase().includes("zerion")) && !((_g = (_f = window.ethereum.constructor) == null ? void 0 : _f.name) == null ? void 0 : _g.toLowerCase().includes("metamask"))) {
2120
+ console.log("✅ Zerion detected: Constructor name contains Zerion (not MetaMask)");
2121
+ return true;
2173
2122
  }
2174
- if (window.ethereum) {
2175
- console.log("🔍 EXPERIMENTAL: Checking for Zerion-specific behavior...");
2176
- try {
2177
- const hasZerionPattern = window.ethereum.request && typeof window.ethereum.request === "function" && // Check if ethereum object has properties that might indicate Zerion
2178
- (((_n = window.ethereum.isConnected) == null ? void 0 : _n.toString().includes("zerion")) || ((_o = window.ethereum.enable) == null ? void 0 : _o.toString().includes("zerion")));
2179
- if (hasZerionPattern) {
2180
- console.log("✅ Zerion detected: Experimental method pattern");
2181
- return true;
2182
- }
2183
- } catch (e) {
2184
- console.log("🔍 Experimental detection failed safely:", e.message);
2185
- }
2123
+ if (typeof window !== "undefined" && ((_i = (_h = window.navigator) == null ? void 0 : _h.userAgent) == null ? void 0 : _i.includes("Zerion")) && !((_k = (_j = window.navigator) == null ? void 0 : _j.userAgent) == null ? void 0 : _k.includes("MetaMask"))) {
2124
+ console.log(" Zerion detected: User agent contains Zerion (not MetaMask)");
2125
+ return true;
2186
2126
  }
2187
- if (typeof window !== "undefined") {
2188
- console.log("🔍 LAST RESORT: Checking all window properties for Zerion...");
2189
- const windowKeys = Object.keys(window);
2190
- const zerionRelated = windowKeys.filter((key) => {
2191
- try {
2192
- return key.toLowerCase().includes("zerion") || typeof window[key] === "object" && window[key] && window[key].constructor && window[key].constructor.name && window[key].constructor.name.toLowerCase().includes("zerion");
2193
- } catch (e) {
2194
- return false;
2195
- }
2196
- });
2197
- console.log("🔍 Zerion-related window properties:", zerionRelated);
2198
- if (zerionRelated.length > 0) {
2199
- console.log("✅ Zerion detected: Found Zerion-related window properties", zerionRelated);
2127
+ if (typeof document !== "undefined") {
2128
+ const zerionMeta = document.querySelector('meta[name="zerion"]') || document.querySelector('meta[content*="zerion"]');
2129
+ if (zerionMeta && !document.querySelector('meta[content*="metamask"]')) {
2130
+ console.log("✅ Zerion detected: DOM meta tags (not MetaMask)");
2200
2131
  return true;
2201
2132
  }
2202
2133
  }
2203
- console.log("❌ Zerion not detected through ANY method");
2204
- console.log("🔍 FULL DEBUG - Window ethereum object keys:", window.ethereum ? Object.keys(window.ethereum) : "No ethereum");
2205
- console.log("🔍 FULL DEBUG - Window has providers array:", !!((_p = window.ethereum) == null ? void 0 : _p.providers));
2206
- console.log("🔍 FULL DEBUG - Providers array length:", ((_r = (_q = window.ethereum) == null ? void 0 : _q.providers) == null ? void 0 : _r.length) || 0);
2134
+ console.log("❌ Zerion not detected through any method (or conflicts with MetaMask)");
2207
2135
  return false;
2208
2136
  }
2209
2137
  // Get the correct provider for a specific wallet - VERY AGGRESSIVE approach
@@ -2770,94 +2698,97 @@ const WalletSelector = ({
2770
2698
  connectedWallet,
2771
2699
  loading
2772
2700
  }) => {
2773
- var _a, _b, _c, _d, _e, _f, _g, _h;
2701
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
2774
2702
  const [selectedWalletType, setSelectedWalletType] = useState(null);
2775
2703
  const walletManager = useRef(new UniversalWalletManager());
2776
2704
  const getAvailableWallets = () => {
2777
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j, _k, _l, _m, _n, _o;
2778
2705
  if (!selectedNetwork) return [];
2779
2706
  if (["ethereum", "bsc", "polygon", "arbitrum", "optimism", "avalanche", "solana"].includes(selectedNetwork.shortName)) {
2780
2707
  const detectedWallets = walletManager.current.getAvailableWallets();
2781
- console.log("🔍 SMART DETECTION: Actually detected wallets:", detectedWallets.map((w) => w.name));
2782
- const smartWallets = [...detectedWallets];
2783
- if (((_a2 = window.ethereum) == null ? void 0 : _a2.isMetaMask) && !smartWallets.find((w) => w.type === "metamask")) {
2784
- console.log("🦊 Adding MetaMask (confirmed installed)");
2785
- smartWallets.push({
2786
- type: "metamask",
2787
- name: "MetaMask",
2788
- icon: "🦊",
2789
- description: "Connect using MetaMask wallet",
2790
- color: "orange",
2791
- isInstalled: true
2792
- });
2793
- }
2794
- if (window.rabby && !smartWallets.find((w) => w.type === "rabby")) {
2795
- console.log("🐰 Adding Rabby (confirmed installed)");
2796
- smartWallets.push({
2797
- type: "rabby",
2798
- name: "Rabby",
2799
- icon: "🐰",
2800
- description: "Connect using Rabby wallet",
2801
- color: "blue",
2802
- isInstalled: true
2803
- });
2708
+ if (detectedWallets.length === 0 && window.ethereum) {
2709
+ console.log("🚨 EMERGENCY OVERRIDE: No wallets detected but ethereum exists, forcing all three wallets to show");
2710
+ return [
2711
+ {
2712
+ type: "metamask",
2713
+ name: "MetaMask",
2714
+ icon: "🦊",
2715
+ description: "Connect using MetaMask wallet",
2716
+ color: "orange",
2717
+ isInstalled: true
2718
+ },
2719
+ {
2720
+ type: "rabby",
2721
+ name: "Rabby",
2722
+ icon: "🐰",
2723
+ description: "Connect using Rabby wallet",
2724
+ color: "blue",
2725
+ isInstalled: true
2726
+ },
2727
+ {
2728
+ type: "zerion",
2729
+ name: "Zerion",
2730
+ icon: "🔷",
2731
+ description: "Connect using Zerion wallet",
2732
+ color: "purple",
2733
+ isInstalled: true
2734
+ }
2735
+ ];
2804
2736
  }
2805
- const hasRealZerion = window.zerion || ((_b2 = window.ethereum) == null ? void 0 : _b2.isZerion) === true || ((_c2 = window.ethereum) == null ? void 0 : _c2.isZerionWallet) === true || ((_d2 = navigator.userAgent) == null ? void 0 : _d2.includes("Zerion")) || ((_e2 = navigator.userAgent) == null ? void 0 : _e2.includes("zerion")) || // Check providers array
2806
- ((_f2 = window.ethereum) == null ? void 0 : _f2.providers) && window.ethereum.providers.some(
2807
- (p2) => {
2808
- var _a3, _b3;
2809
- return p2.isZerion === true || p2.isZerionWallet === true || p2.zerion || p2._zerion || ((_b3 = (_a3 = p2.constructor) == null ? void 0 : _a3.name) == null ? void 0 : _b3.toLowerCase().includes("zerion")) || Object.keys(p2).some((key) => key.toLowerCase().includes("zerion"));
2810
- }
2811
- ) || // Check main ethereum object
2812
- window.ethereum && (window.ethereum.zerion || window.ethereum._zerion || ((_h2 = (_g2 = window.ethereum.constructor) == null ? void 0 : _g2.name) == null ? void 0 : _h2.toLowerCase().includes("zerion")) || Object.keys(window.ethereum).some((key) => key.toLowerCase().includes("zerion"))) || // Check global window for any Zerion properties
2813
- Object.keys(window).some((key) => key.toLowerCase().includes("zerion")) || // Check if running in Zerion app
2814
- ((_j = (_i = window.location) == null ? void 0 : _i.href) == null ? void 0 : _j.includes("zerion")) || ((_k = document.title) == null ? void 0 : _k.toLowerCase().includes("zerion"));
2815
- if (hasRealZerion && !smartWallets.find((w) => w.type === "zerion")) {
2816
- console.log("🔷 Adding Zerion (confirmed installed via comprehensive detection)");
2817
- smartWallets.push({
2818
- type: "zerion",
2819
- name: "Zerion",
2820
- icon: "🔷",
2821
- description: "Connect using Zerion wallet",
2822
- color: "purple",
2823
- isInstalled: true
2824
- });
2825
- } else if (!hasRealZerion && !smartWallets.find((w) => w.type === "zerion")) {
2826
- console.log("Zerion comprehensive detection result:", {
2827
- hasRealZerion,
2828
- windowZerion: !!window.zerion,
2829
- ethereumIsZerion: (_l = window.ethereum) == null ? void 0 : _l.isZerion,
2830
- userAgentZerion: (_m = navigator.userAgent) == null ? void 0 : _m.includes("Zerion"),
2831
- providersWithZerion: (_o = (_n = window.ethereum) == null ? void 0 : _n.providers) == null ? void 0 : _o.filter(
2832
- (p2) => {
2833
- var _a3, _b3;
2834
- return p2.isZerion || p2.isZerionWallet || p2.zerion || p2._zerion || ((_b3 = (_a3 = p2.constructor) == null ? void 0 : _a3.name) == null ? void 0 : _b3.toLowerCase().includes("zerion"));
2835
- }
2836
- ),
2837
- ethereumKeys: window.ethereum ? Object.keys(window.ethereum).filter((k2) => k2.toLowerCase().includes("zerion")) : [],
2838
- windowKeys: Object.keys(window).filter((k2) => k2.toLowerCase().includes("zerion"))
2737
+ if (detectedWallets.length < 3 && window.ethereum) {
2738
+ console.log("🚨 SAFETY CHECK: Adding missing wallets");
2739
+ const allWallets = [
2740
+ {
2741
+ type: "metamask",
2742
+ name: "MetaMask",
2743
+ icon: "🦊",
2744
+ description: "Connect using MetaMask wallet",
2745
+ color: "orange",
2746
+ isInstalled: true
2747
+ },
2748
+ {
2749
+ type: "rabby",
2750
+ name: "Rabby",
2751
+ icon: "🐰",
2752
+ description: "Connect using Rabby wallet",
2753
+ color: "blue",
2754
+ isInstalled: true
2755
+ },
2756
+ {
2757
+ type: "zerion",
2758
+ name: "Zerion",
2759
+ icon: "🔷",
2760
+ description: "Connect using Zerion wallet",
2761
+ color: "purple",
2762
+ isInstalled: true
2763
+ }
2764
+ ];
2765
+ const combinedWallets = [];
2766
+ const addedTypes = /* @__PURE__ */ new Set();
2767
+ detectedWallets.forEach((wallet) => {
2768
+ if (!addedTypes.has(wallet.type)) {
2769
+ combinedWallets.push(wallet);
2770
+ addedTypes.add(wallet.type);
2771
+ }
2839
2772
  });
2840
- smartWallets.push({
2841
- type: "zerion",
2842
- name: "Zerion",
2843
- icon: "🔷",
2844
- description: "Install Zerion wallet to use",
2845
- color: "purple",
2846
- isInstalled: false
2773
+ allWallets.forEach((wallet) => {
2774
+ if (!addedTypes.has(wallet.type)) {
2775
+ combinedWallets.push(wallet);
2776
+ addedTypes.add(wallet.type);
2777
+ }
2847
2778
  });
2779
+ return combinedWallets;
2848
2780
  }
2849
- return smartWallets;
2781
+ return detectedWallets;
2850
2782
  }
2851
2783
  return [];
2852
2784
  };
2853
2785
  const availableWallets = getAvailableWallets();
2854
- console.log("💡 SMART WALLET SELECTOR: Showing wallets:", availableWallets.map((w) => `${w.name} (${w.isInstalled ? "installed" : "not installed"})`));
2786
+ console.log("💡 WALLET SELECTOR: Showing wallets:", availableWallets.map((w) => w.name));
2787
+ console.log("💡 WALLET SELECTOR: window.ethereum exists:", !!window.ethereum);
2788
+ console.log("💡 WALLET SELECTOR: window.ethereum.isMetaMask:", (_a = window.ethereum) == null ? void 0 : _a.isMetaMask);
2789
+ console.log("💡 WALLET SELECTOR: window.ethereum.isRabby:", (_b = window.ethereum) == null ? void 0 : _b.isRabby);
2790
+ console.log("💡 WALLET SELECTOR: window.ethereum.isZerion:", (_c = window.ethereum) == null ? void 0 : _c.isZerion);
2855
2791
  const handleWalletClick = async (walletType) => {
2856
- const wallet = availableWallets.find((w) => w.type === walletType);
2857
- if (!(wallet == null ? void 0 : wallet.isInstalled)) {
2858
- alert(`${(wallet == null ? void 0 : wallet.name) || "This wallet"} is not installed. Please install it first and refresh the page.`);
2859
- return;
2860
- }
2861
2792
  setSelectedWalletType(walletType);
2862
2793
  onWalletSelect(walletType);
2863
2794
  await onConnect(walletType);
@@ -2898,81 +2829,65 @@ const WalletSelector = ({
2898
2829
  ] }),
2899
2830
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-gray-500 mb-2", style: { fontFamily: "Bricolage Grotesque, sans-serif" }, children: [
2900
2831
  "Debug: Found ",
2901
- availableWallets.filter((w) => w.isInstalled).length,
2902
- " installed wallet(s) - ",
2903
- availableWallets.filter((w) => w.isInstalled).map((w) => w.name).join(", ")
2832
+ availableWallets.length,
2833
+ " wallet(s) - ",
2834
+ availableWallets.map((w) => w.name).join(", ")
2904
2835
  ] }),
2905
2836
  availableWallets.map((wallet) => /* @__PURE__ */ jsxRuntimeExports.jsx(
2906
2837
  "button",
2907
2838
  {
2908
2839
  onClick: () => handleWalletClick(wallet.type),
2909
- disabled: loading || !wallet.isInstalled,
2910
- className: `w-full p-4 border-2 rounded-xl text-left transition-all duration-200 ${!wallet.isInstalled ? "border-gray-300 bg-gray-50 opacity-60 cursor-not-allowed" : (connectedWallet == null ? void 0 : connectedWallet.walletType) === wallet.type ? "border-green-500 bg-green-50" : "border-gray-200 hover:border-[#7042D2]/50 hover:bg-[#7042D2]/5"}`,
2840
+ disabled: loading,
2841
+ className: `w-full p-4 border-2 rounded-xl text-left transition-all duration-200 ${(connectedWallet == null ? void 0 : connectedWallet.walletType) === wallet.type ? "border-green-500 bg-green-50" : "border-gray-200 hover:border-[#7042D2]/50 hover:bg-[#7042D2]/5"}`,
2911
2842
  style: { fontFamily: "Bricolage Grotesque, sans-serif" },
2912
2843
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center space-x-3", children: [
2913
2844
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-2xl", children: wallet.icon }),
2914
2845
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1", children: [
2915
2846
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "font-semibold text-gray-800 flex items-center", children: [
2916
2847
  wallet.name,
2917
- wallet.type === "rabby" && wallet.isInstalled && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-1 bg-blue-100 text-blue-700 text-xs rounded-full", children: "NEW" }),
2918
- wallet.type === "zerion" && wallet.isInstalled && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-1 bg-purple-100 text-purple-700 text-xs rounded-full", children: "HOT" }),
2919
- !wallet.isInstalled && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-1 bg-red-100 text-red-700 text-xs rounded-full", children: "NOT INSTALLED" })
2848
+ 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" }),
2849
+ wallet.type === "zerion" && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2 px-2 py-1 bg-purple-100 text-purple-700 text-xs rounded-full", children: "HOT" })
2920
2850
  ] }),
2921
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500", children: !wallet.isInstalled ? `Click to install ${wallet.name}` : (connectedWallet == null ? void 0 : connectedWallet.walletType) === wallet.type ? "✅ Connected" : wallet.description })
2851
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-500", children: (connectedWallet == null ? void 0 : connectedWallet.walletType) === wallet.type ? "✅ Connected" : wallet.description })
2922
2852
  ] }),
2923
2853
  loading && selectedWalletType === wallet.type && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "animate-spin rounded-full h-5 w-5 border-b-2 border-[#7042D2]" })
2924
2854
  ] })
2925
2855
  },
2926
2856
  wallet.type
2927
2857
  )),
2928
- availableWallets.some((w) => !w.isInstalled) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 p-3 bg-blue-50 rounded-lg border border-blue-200", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm text-blue-800", style: { fontFamily: "Bricolage Grotesque, sans-serif" }, children: [
2929
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium mb-2", children: "📲 Quick Install Links:" }),
2930
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-1 text-xs", children: availableWallets.filter((w) => !w.isInstalled).map((wallet) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2931
- "• ",
2932
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
2933
- "a",
2934
- {
2935
- href: wallet.type === "metamask" ? "https://metamask.io" : wallet.type === "rabby" ? "https://rabby.io" : "https://zerion.io",
2936
- target: "_blank",
2937
- rel: "noopener noreferrer",
2938
- className: "text-blue-700 underline hover:text-blue-900",
2939
- children: [
2940
- "Install ",
2941
- wallet.name
2942
- ]
2943
- }
2944
- ),
2945
- " - Then refresh this page"
2946
- ] }, wallet.type)) })
2947
- ] }) }),
2948
2858
  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: [
2949
2859
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium", children: "✅ Wallet Connected" }),
2950
2860
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs mt-1", children: [
2951
- (_a = connectedWallet.account) == null ? void 0 : _a.slice(0, 6),
2861
+ (_d = connectedWallet.account) == null ? void 0 : _d.slice(0, 6),
2952
2862
  "...",
2953
- (_b = connectedWallet.account) == null ? void 0 : _b.slice(-4),
2863
+ (_e = connectedWallet.account) == null ? void 0 : _e.slice(-4),
2954
2864
  " (",
2955
2865
  connectedWallet.walletType,
2956
2866
  ")"
2957
2867
  ] })
2958
2868
  ] }) }),
2959
2869
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-4 p-2 bg-yellow-50 rounded-lg border border-yellow-200", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-yellow-800", style: { fontFamily: "Bricolage Grotesque, sans-serif" }, children: [
2960
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium mb-1", children: "🔧 Enhanced Wallet Debug:" }),
2870
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium mb-1", children: "🔧 Wallet Debug Info:" }),
2961
2871
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2962
2872
  "• window.ethereum exists: ",
2963
2873
  window.ethereum ? "✅" : "❌"
2964
2874
  ] }),
2965
2875
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2966
2876
  "• window.ethereum.isMetaMask: ",
2967
- ((_c = window.ethereum) == null ? void 0 : _c.isMetaMask) ? "✅" : "❌"
2877
+ ((_f = window.ethereum) == null ? void 0 : _f.isMetaMask) ? "✅" : "❌"
2968
2878
  ] }),
2969
2879
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2970
2880
  "• window.ethereum.isRabby: ",
2971
- ((_d = window.ethereum) == null ? void 0 : _d.isRabby) ? "✅" : "❌"
2881
+ ((_g = window.ethereum) == null ? void 0 : _g.isRabby) ? "✅" : "❌"
2972
2882
  ] }),
2973
2883
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2974
2884
  "• window.ethereum.isZerion: ",
2975
- ((_e = window.ethereum) == null ? void 0 : _e.isZerion) ? "✅" : "❌"
2885
+ ((_h = window.ethereum) == null ? void 0 : _h.isZerion) ? "✅" : "❌"
2886
+ ] }),
2887
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2888
+ "• window.ethereum.providers: ",
2889
+ ((_j = (_i = window.ethereum) == null ? void 0 : _i.providers) == null ? void 0 : _j.length) || 0,
2890
+ " provider(s)"
2976
2891
  ] }),
2977
2892
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2978
2893
  "• window.rabby exists: ",
@@ -2983,12 +2898,9 @@ const WalletSelector = ({
2983
2898
  window.zerion ? "✅" : "❌"
2984
2899
  ] }),
2985
2900
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2986
- "• User agent Zerion: ",
2987
- ((_f = navigator.userAgent) == null ? void 0 : _f.includes("Zerion")) ? "✅" : "❌"
2988
- ] }),
2989
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2990
- "• Providers: ",
2991
- ((_h = (_g = window.ethereum) == null ? void 0 : _g.providers) == null ? void 0 : _h.length) || 0
2901
+ "• Showing ",
2902
+ availableWallets.length,
2903
+ " wallet options"
2992
2904
  ] })
2993
2905
  ] }) })
2994
2906
  ] });