remove console logs

This commit is contained in:
Shreyaschorge 2025-07-14 20:51:03 +05:30
parent e74b2581df
commit 8475b28107
No known key found for this signature in database
6 changed files with 3 additions and 53 deletions

View File

@ -41,7 +41,6 @@
"format:check": "prettier --check .", "format:check": "prettier --check .",
"format:fix": "prettier --write . && eslint --fix . --max-warnings 50", "format:fix": "prettier --write . && eslint --fix . --max-warnings 50",
"type-check": "tsc --noEmit", "type-check": "tsc --noEmit",
"type-check:dev": "tsc --project tsconfig.dev.json --noEmit",
"check": "npm run type-check && npm run lint:check && npm run format:check", "check": "npm run type-check && npm run lint:check && npm run format:check",
"check:dev": "npm run type-check:dev && npm run lint:check && npm run format:check", "check:dev": "npm run type-check:dev && npm run lint:check && npm run format:check",
"deploy:vercel": "node scripts/deploy.js", "deploy:vercel": "node scripts/deploy.js",

View File

@ -1,6 +1,7 @@
'use client'; 'use client';
import { useState } from 'react'; import { useState } from 'react';
import Image from 'next/image';
import sdk from '@farcaster/miniapp-sdk'; import sdk from '@farcaster/miniapp-sdk';
import { useMiniApp } from '@neynar/react'; import { useMiniApp } from '@neynar/react';
import { APP_NAME } from '~/lib/constants'; import { APP_NAME } from '~/lib/constants';
@ -28,7 +29,7 @@ export function Header({ neynarUser }: HeaderProps) {
}} }}
> >
{context.user.pfpUrl && ( {context.user.pfpUrl && (
<img <Image
src={context.user.pfpUrl} src={context.user.pfpUrl}
alt="Profile" alt="Profile"
className="w-10 h-10 rounded-full border-2 border-primary" className="w-10 h-10 rounded-full border-2 border-primary"

View File

@ -565,7 +565,7 @@ export function NeynarAuthButton() {
} }
} catch (e) { } catch (e) {
if (e instanceof SignInCore.RejectedByUser) { if (e instanceof SignInCore.RejectedByUser) {
console.log(' Sign-in rejected by user'); console.error(' Sign-in rejected by user');
} else { } else {
console.error('❌ Backend sign-in error:', e); console.error('❌ Backend sign-in error:', e);
} }

View File

@ -109,11 +109,6 @@ function ConnectionControls({
</Button> </Button>
<Button <Button
onClick={() => { onClick={() => {
console.log('Manual Farcaster connection attempt');
console.log(
'Connectors:',
connectors.map((c, i) => `${i}: ${c.name}`),
);
connect({ connector: connectors[0] }); connect({ connector: connectors[0] });
}} }}
className="w-full" className="w-full"
@ -209,27 +204,12 @@ export function WalletTab() {
connectors.length > 0 && connectors.length > 0 &&
isInFarcasterClient isInFarcasterClient
) { ) {
console.log('Attempting auto-connection with Farcaster context...');
console.log('- User FID:', context.user.fid);
console.log(
'- Available connectors:',
connectors.map((c, i) => `${i}: ${c.name}`),
);
console.log('- Using connector:', connectors[0].name);
console.log('- In Farcaster client:', isInFarcasterClient);
// Use the first connector (farcasterFrame) for auto-connection // Use the first connector (farcasterFrame) for auto-connection
try { try {
connect({ connector: connectors[0] }); connect({ connector: connectors[0] });
} catch (error) { } catch (error) {
console.error('Auto-connection failed:', error); console.error('Auto-connection failed:', error);
} }
} else {
console.log('Auto-connection conditions not met:');
console.log('- Has context:', !!context?.user?.fid);
console.log('- Is connected:', isConnected);
console.log('- Has connectors:', connectors.length > 0);
console.log('- In Farcaster client:', isInFarcasterClient);
} }
}, [context?.user?.fid, isConnected, connectors, connect, context?.client]); }, [context?.user?.fid, isConnected, connectors, connect, context?.client]);

View File

@ -68,7 +68,6 @@ export async function getFarcasterMetadata(): Promise<MiniAppManifest> {
if (process.env.MINI_APP_METADATA) { if (process.env.MINI_APP_METADATA) {
try { try {
const metadata = JSON.parse(process.env.MINI_APP_METADATA); const metadata = JSON.parse(process.env.MINI_APP_METADATA);
console.log('Using pre-signed mini app metadata from environment');
return metadata; return metadata;
} catch (error) { } catch (error) {
console.warn( console.warn(
@ -82,10 +81,6 @@ export async function getFarcasterMetadata(): Promise<MiniAppManifest> {
throw new Error('NEXT_PUBLIC_URL not configured'); throw new Error('NEXT_PUBLIC_URL not configured');
} }
// Get the domain from the URL (without https:// prefix)
const domain = new URL(APP_URL).hostname;
console.log('Using domain for manifest:', domain);
return { return {
accountAssociation: { accountAssociation: {
header: '', header: '',

View File

@ -1,25 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"skipLibCheck": true,
"noEmit": true
},
"ts-node": {
"skipIgnore": true
},
"exclude": [
"node_modules",
".next",
"out",
"build",
"dist",
// Exclude files that depend on Farcaster SDK packages not in devDependencies
"src/app/api/send-notification/**",
"src/app/api/webhook/**",
"src/components/providers/SafeFarcasterSolanaProvider.tsx",
"src/components/ui/tabs/WalletTab.tsx",
"src/components/ui/wallet/SendSolana.tsx",
"src/lib/kv.ts",
"src/lib/notifs.ts"
]
}