diff --git a/app/api/frame/route.ts b/app/api/frame/route.ts index 47701013..80f593ee 100644 --- a/app/api/frame/route.ts +++ b/app/api/frame/route.ts @@ -4,7 +4,12 @@ import { NEXT_PUBLIC_URL } from '../../config'; async function getResponse(req: NextRequest): Promise { const body: FrameRequest = await req.json(); - const { isValid, message } = await getFrameMessage(body, { neynarApiKey: 'NEYNAR_ONCHAIN_KIT' }); + const allowFramegear = process.env.NODE_ENV !== 'production'; + // Remember to replace 'NEYNAR_ONCHAIN_KIT' with your own Neynar API key + const { isValid, message } = await getFrameMessage(body, { + neynarApiKey: 'NEYNAR_ONCHAIN_KIT', + allowFramegear, + }); if (!isValid) { return new NextResponse('Message not valid', { status: 500 }); diff --git a/app/api/tx/route.ts b/app/api/tx/route.ts index a00a2726..f268322f 100644 --- a/app/api/tx/route.ts +++ b/app/api/tx/route.ts @@ -8,8 +8,12 @@ import type { FrameTransactionResponse } from '@coinbase/onchainkit/frame'; async function getResponse(req: NextRequest): Promise { const body: FrameRequest = await req.json(); + const allowFramegear = process.env.NODE_ENV !== 'production'; // Remember to replace 'NEYNAR_ONCHAIN_KIT' with your own Neynar API key - const { isValid } = await getFrameMessage(body, { neynarApiKey: 'NEYNAR_ONCHAIN_KIT' }); + const { isValid } = await getFrameMessage(body, { + neynarApiKey: 'NEYNAR_ONCHAIN_KIT', + allowFramegear, + }); if (!isValid) { return new NextResponse('Message not valid', { status: 500 });