feat: update constant writes

This commit is contained in:
veganbeef
2025-07-01 17:27:24 -07:00
parent e20a2a397d
commit 6f0300fd7c
4 changed files with 65 additions and 34 deletions

View File

@@ -5,6 +5,7 @@ import type { Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { MiniAppProvider } from "@neynar/react";
import { SafeFarcasterSolanaProvider } from "~/components/providers/SafeFarcasterSolanaProvider";
import { ANALYTICS_ENABLED } from "~/lib/constants";
const WagmiProvider = dynamic(
() => import("~/components/providers/WagmiProvider"),
@@ -18,7 +19,7 @@ export function Providers({ session, children }: { session: Session | null, chil
return (
<SessionProvider session={session}>
<WagmiProvider>
<MiniAppProvider analyticsEnabled={true} backButtonEnabled={true}>
<MiniAppProvider analyticsEnabled={ANALYTICS_ENABLED} backButtonEnabled={true}>
<SafeFarcasterSolanaProvider endpoint={solanaEndpoint}>
{children}
</SafeFarcasterSolanaProvider>

View File

@@ -157,19 +157,6 @@ export function WalletTab() {
} = useSwitchChain();
// --- Effects ---
/**
* Debug logging for wallet auto-connection and state changes.
* Logs context, connection status, address, and available connectors.
*/
useEffect(() => {
console.log("WalletTab Debug Info:");
console.log("- context:", context);
console.log("- isConnected:", isConnected);
console.log("- address:", address);
console.log("- connectors:", connectors);
console.log("- context?.user:", context?.user);
}, [context, isConnected, address, connectors]);
/**
* Auto-connect when Farcaster context is available.
*

View File

@@ -90,3 +90,12 @@ export const APP_WEBHOOK_URL = process.env.NEYNAR_API_KEY && process.env.NEYNAR_
* Useful for mini apps that don't require wallet integration.
*/
export const USE_WALLET = true;
/**
* Flag to enable/disable analytics tracking.
*
* When true, usage analytics are collected and sent to Neynar.
* When false, analytics collection is disabled.
* Useful for privacy-conscious users or development environments.
*/
export const ANALYTICS_ENABLED = true;