diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..254efb2 --- /dev/null +++ b/.env.sample @@ -0,0 +1 @@ +NEXT_PUBLIC_WC_ID = "" \ No newline at end of file diff --git a/README.md b/README.md index 82a0c5c..2cab967 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Prerequisites: Run development server: +Copy .env.sample to .env.local and add wallet connect project ID + ```bash yarn install yarn dev diff --git a/pages/_app.tsx b/pages/_app.tsx index 261751c..4803782 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -17,7 +17,10 @@ interface MyAppProps extends AppProps { } // 1. Get projectId -const projectId = '97235759ff6e7ec7545379f2a2046295' +const env = process.env +const projectId = env?.NEXT_PUBLIC_WC_ID || '' + +console.info("WC", `${projectId?.slice(0, 4)}...`) // 2. Create wagmiConfig const metadata = { diff --git a/pages/index.tsx b/pages/index.tsx index 340fee3..57227f9 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -97,7 +97,7 @@ const Home: NextPage = () => { setIsMinting(true) try { await writeAsync?.() - console.log("START", Date.now()) + console.info("START", Date.now()) setStartTime(Date.now()) } catch (error: any) { setIsMinting(false) @@ -112,7 +112,7 @@ const Home: NextPage = () => { useEffect(() => { if (status === "error" && startTime > 0) { - console.log("ERROR", Date.now()) + console.error("ERROR", Date.now()) setStartTime(0) setCurrentTime(0) } @@ -120,7 +120,7 @@ const Home: NextPage = () => { useEffect(() => { if ((isSuccess || isError) && startTime > 0 && isMinting) { - console.log(`Time taken ${Date.now() - startTime}ms`) + console.info(`Time taken ${Date.now() - startTime}ms`) appendSpeed(chain?.name || "unknown", Date.now() - startTime) } if (isSuccess || isError) {