From ea3cb76474b4d587d1c2aa4907aab6a72a0dae21 Mon Sep 17 00:00:00 2001 From: Preet Parekh Date: Tue, 28 May 2024 23:57:44 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Remove=20interactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/api/[[...routes]]/route.tsx | 41 ++++++++++++++++++----------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/src/app/api/[[...routes]]/route.tsx b/src/app/api/[[...routes]]/route.tsx index 6533f28..138cedc 100644 --- a/src/app/api/[[...routes]]/route.tsx +++ b/src/app/api/[[...routes]]/route.tsx @@ -20,7 +20,7 @@ const neynarClient = new NeynarAPIClient(NEYNAR_API_KEY); type State = { confirm: { - interactor: NeynarMiddlewareUser; + // interactor: NeynarMiddlewareUser; devfolio: NeynarUserV1; searchUser: NeynarUserV2; } | null; @@ -31,12 +31,13 @@ const app = new Frog<{ State: State }>({ browserLocation: '/:path', ui: { vars }, initialState: {}, -}).use( - neynarMiddleware({ - apiKey: NEYNAR_API_KEY, - features: ['interactor'], - }) -); +}) +// .use( +// neynarMiddleware({ +// apiKey: NEYNAR_API_KEY, +// features: ['interactor'], +// }) +// ); // COMPONENTS START @@ -111,11 +112,11 @@ app.frame('/nominate', c => { }); app.frame('/confirm', async c => { - const interactor = c.var.interactor; - if (!interactor) { - // @todo Update Error Message - return c.res(ErrorResponse('Invalid Interactor')); - } + // const interactor = c.var.interactor; + // if (!interactor) { + // // @todo Update Error Message + // return c.res(ErrorResponse('Invalid Interactor')); + // } const devfolioLookupResponse = await neynarClient.lookupUserByUsername('devfolio').catch(() => false); if (typeof devfolioLookupResponse === 'boolean') { @@ -156,7 +157,7 @@ app.frame('/confirm', async c => { const state = c.deriveState(previousState => { previousState.confirm = { devfolio: devfolio, - interactor, + // interactor, searchUser, }; }); @@ -216,9 +217,13 @@ app.frame('/confirm', async c => { hu */} - + {/* 🔵 gm @{confirmState.searchUser.username}. @{confirmState.interactor.username} thinks {"you're"} a super based builder, and has nominated you for the Onchain Summer Buildathon. + */} + + 🔵 gm @{confirmState.searchUser.username}. Someone thinks {"you're"} a + super based builder, and has nominated you for the Onchain Summer Buildathon. Participate, mint your SupaBald Jesse NFT, and just build it. LFG 🛠️ @@ -248,7 +253,13 @@ app.frame('/cast', c => { return c.res(ErrorResponse('Invalid State')); } - const cast = `🔵 gm @${confirmState.searchUser.username}. @${confirmState.interactor.username} thinks you're a super based builder, and has nominated you for the Onchain Summer Buildathon. +// const cast = `🔵 gm @${confirmState.searchUser.username}. @${confirmState.interactor.username} thinks you're a super based builder, and has nominated you for the Onchain Summer Buildathon. + +// Hop in, mint your SupaBald Jesse NFT, and just build it. LFG + +// https://letsgetjessebald.com/`; + +const cast = `🔵 gm @${confirmState.searchUser.username}. Someone thinks you're a super based builder, and has nominated you for the Onchain Summer Buildathon. Hop in, mint your SupaBald Jesse NFT, and just build it. LFG