Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/api/frame/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { NEXT_PUBLIC_URL } from '../../config';

async function getResponse(req: NextRequest): Promise<NextResponse> {
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 });
Expand Down
6 changes: 5 additions & 1 deletion app/api/tx/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import type { FrameTransactionResponse } from '@coinbase/onchainkit/frame';

async function getResponse(req: NextRequest): Promise<NextResponse | Response> {
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 });
Expand Down