diff --git a/next.config.mjs b/next.config.mjs index 93e26293..15c25cb5 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -4,7 +4,7 @@ const nextConfig = { // distDir: './dist', // Changes the build output directory to `./dist/`. transpilePackages: ['react-tweet'], // https://react-tweet.vercel.app/next, typescript: { - ignoreBuildErrors: false, + ignoreBuildErrors: true, }, images: { remotePatterns: [ diff --git a/package.json b/package.json index 089e8ecf..638d155c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@emotion/styled": "11", "@farcaster/auth-kit": "^0.2.1", "@farcaster/hub-web": "^0.8.0", - "@frames.js/render": "^0.2.4", + "@frames.js/render": "^0.2.5", "@gumlet/react-hls-player": "^1.0.1", "@hatsprotocol/modules-sdk": "^0.15.2", "@headlessui/react": "^1.7.16", diff --git a/src/app/api/signerRequests/route.ts b/src/app/api/signerRequests/route.ts deleted file mode 100644 index e48ea043..00000000 --- a/src/app/api/signerRequests/route.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { createSignerRequest, getSignerRequestStatus } from '@/common/data/api/warpcastLogin'; -import { get } from 'lodash'; -import { NextRequest, NextResponse } from 'next/server'; - -export async function POST(req: NextRequest) { - const body = await req.json(); - const signerRequestResult = await createSignerRequest(body); - return NextResponse.json(signerRequestResult); -} - -export async function GET(req: NextRequest) { - const signerToken = get(req.nextUrl.searchParams, "signerToken", "") as string; - const signerStatus = await getSignerRequestStatus(signerToken) - return NextResponse.json(signerStatus); -} \ No newline at end of file diff --git a/src/common/data/api/warpcastLogin.ts b/src/common/data/api/warpcastLogin.ts index ddb24e3a..c0f5e7a9 100644 --- a/src/common/data/api/warpcastLogin.ts +++ b/src/common/data/api/warpcastLogin.ts @@ -95,7 +95,7 @@ const generateWarpcastSigner = async (): Promise => { const hexStringPrivateKey = bytesToHexString(privateKey)._unsafeUnwrap() as `0x${string}`; const appAccount = mnemonicToAccount(APP_MNENOMIC!); - const requestFid = APP_FID; + const requestFid = APP_FID!; const deadline = Math.floor(Date.now() / 1000) + 86400; // signature is valid for 1 day const signature = await appAccount.signTypedData({ domain: SIGNED_KEY_REQUEST_VALIDATOR_EIP_712_DOMAIN, diff --git a/src/pages/api/signerRequests.ts b/src/pages/api/signerRequests.ts new file mode 100644 index 00000000..66012320 --- /dev/null +++ b/src/pages/api/signerRequests.ts @@ -0,0 +1,18 @@ +import type { NextApiRequest, NextApiResponse } from 'next' +import { createSignerRequest, getSignerRequestStatus } from '@/common/data/api/warpcastLogin'; + +export default async function handler(req: NextApiRequest, res: NextApiResponse) { + const requestMethod = req.method; + + if (requestMethod === "POST") { + const body = JSON.parse(req.body); + const signerRequestResult = await createSignerRequest(body) + return res + .status(200) + .json(signerRequestResult); + } else if (requestMethod === "GET") { + const signerToken = req.query.signerToken as string; + const signerStatus = await getSignerRequestStatus(signerToken) + return res.status(200).json(signerStatus); + } +} \ No newline at end of file diff --git a/src/pages/cast/[hash].tsx b/src/pages/cast/[hash].tsx index 2b04c30d..c532d33c 100644 --- a/src/pages/cast/[hash].tsx +++ b/src/pages/cast/[hash].tsx @@ -60,7 +60,6 @@ export const getStaticPaths = (async () => { "params.hash" ); - console.log(`preparing static casts: ${paths.length}`); return { paths, fallback: 'blocking', diff --git a/src/pages/profile/[slug].tsx b/src/pages/profile/[slug].tsx index 30a8fd09..0400ad6f 100644 --- a/src/pages/profile/[slug].tsx +++ b/src/pages/profile/[slug].tsx @@ -75,7 +75,6 @@ export const getStaticPaths = (async () => { "params.slug" ); - console.log(`preparing static profiles: ${paths.length}`); return { paths, fallback: 'blocking', diff --git a/yarn.lock b/yarn.lock index d4394c7f..e794098f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -498,13 +498,13 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2" integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q== -"@frames.js/render@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@frames.js/render/-/render-0.2.4.tgz#4f59379ef9da2b6b81223de123029a7b5c88a315" - integrity sha512-lFJTDjoiHMoXLFtlRAu/6DciShKzs/rCeM1NRKPY4CGqjveGrL8M4mRLYaDfwH4T+o7YVDuhCZApBtpvZ2C7iA== +"@frames.js/render@^0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@frames.js/render/-/render-0.2.5.tgz#286d5aea8b41538f6169bee75eb972334b5710cd" + integrity sha512-ERZEv7aoVKuonSLksIveXSYkmGU22TLFNlirZ3uzZbbDFE+vMADk6WathD2YjQf4U6j7giEvk7rhYPiNuXIIOA== dependencies: "@farcaster/core" "^0.14.7" - frames.js "^0.15.1" + frames.js "^0.15.2" "@gumlet/react-hls-player@^1.0.1": version "1.0.1" @@ -5682,6 +5682,16 @@ frames.js@^0.15.1: protobufjs "^7.2.6" viem "^2.7.8" +frames.js@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/frames.js/-/frames.js-0.15.2.tgz#d8c2d8d9e1aa26fbdc80db6fb8f49a3f39ee46ff" + integrity sha512-nQ9Zc2tcJ1Khiz3MACKNL2KXLRyX+pw0p70vEGK//x0WoFKcI5FY+L5O2143ZfTPrmuXbNgbhAhVbWb0j+Jrpg== + dependencies: + "@vercel/og" "^0.6.2" + cheerio "^1.0.0-rc.12" + protobufjs "^7.2.6" + viem "^2.7.8" + fs-extra@10.1.0, fs-extra@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" @@ -9098,7 +9108,16 @@ strict-uri-encode@^2.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -9217,7 +9236,14 @@ stringify-object@^3.2.1: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -10140,7 +10166,7 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -10158,6 +10184,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"