From f94f089b8a895cc5a27a244f88fdff5ff84caab8 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 4 Dec 2024 12:23:20 +0100 Subject: [PATCH 1/4] 10083 copy changes --- .../ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx b/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx index 1025bbdf942..df482ecf8a9 100644 --- a/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx +++ b/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx @@ -244,8 +244,9 @@ const DetailsFormStep = ({ Launch a contest using the funds from your community wallet to create engagement incentives.{' '} - Contests last 7 days in - blockchain time.{' '} + + Contests can be anywhere from 1 to 7 days in duration. + {' '} Date: Wed, 4 Dec 2024 12:24:38 +0100 Subject: [PATCH 2/4] 10084 copy changes --- .../ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx b/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx index df482ecf8a9..f4a3609acf9 100644 --- a/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx +++ b/packages/commonwealth/client/scripts/views/pages/CommunityManagement/Contests/ManageContest/steps/DetailsFormStep/DetailsFormStep.tsx @@ -261,8 +261,7 @@ const DetailsFormStep = ({ featureHint={{ title: 'How do I fund my contest?', description: - 'Contests are funded when community members purchase stake in the community. ' + - 'Each transaction includes a small contribution to the community pool that can be used to fund contests.', + 'Contests can be funded directly using any token that is on the same chain as your community.', }} >
From d24aa9c575fc5781c5a00c1674277bf388f6988b Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 4 Dec 2024 12:37:34 +0100 Subject: [PATCH 3/4] 10086 remove check eligibility --- .../frames/contest/checkEligibility.tsx | 72 ------------------- .../farcaster/frames/contest/contestCard.tsx | 9 +-- .../server/farcaster/frames/contest/index.ts | 3 +- .../commonwealth/server/farcaster/router.tsx | 3 +- 4 files changed, 3 insertions(+), 84 deletions(-) delete mode 100644 packages/commonwealth/server/farcaster/frames/contest/checkEligibility.tsx diff --git a/packages/commonwealth/server/farcaster/frames/contest/checkEligibility.tsx b/packages/commonwealth/server/farcaster/frames/contest/checkEligibility.tsx deleted file mode 100644 index 0cb0cc24616..00000000000 --- a/packages/commonwealth/server/farcaster/frames/contest/checkEligibility.tsx +++ /dev/null @@ -1,72 +0,0 @@ -import { Button } from 'frames.js/express'; -import React from 'react'; -import { frames } from '../../config'; -import { circleCheckIcon, circleXIcon, getFarcasterUser } from '../../utils'; - -export const checkEligibility = frames(async (ctx) => { - let ethAddress: string | null | undefined = null; - - try { - const fid = ctx.message?.requesterFid; - if (!fid) { - throw new Error('invalid fid'); - } - const user = await getFarcasterUser(fid); - ethAddress = user?.custody_address; - } catch (err) { - console.warn(err); - } - - const icon = ethAddress ? circleCheckIcon : circleXIcon; - const title = ethAddress - ? `You are eligible to enter` - : 'You are not eligible'; - const description = ethAddress - ? 'Reply to this cast or quote this frame to be entered into the contest.' - : 'In order to enter this contest you must connect an Ethereum wallet to your Farcaster account.'; - - const contest_address = ctx.url.pathname.split('/')[1]; - - return { - image: ( -
- {icon} - -

- {title} -

- -

{ethAddress}

- -

{description}

-
- ), - buttons: [ - , - ], - }; -}); diff --git a/packages/commonwealth/server/farcaster/frames/contest/contestCard.tsx b/packages/commonwealth/server/farcaster/frames/contest/contestCard.tsx index 2f8da787ef2..c99a4fea19f 100644 --- a/packages/commonwealth/server/farcaster/frames/contest/contestCard.tsx +++ b/packages/commonwealth/server/farcaster/frames/contest/contestCard.tsx @@ -94,15 +94,8 @@ export const contestCard = frames(async (ctx) => { > Prizes , - , , ], }; diff --git a/packages/commonwealth/server/farcaster/frames/contest/index.ts b/packages/commonwealth/server/farcaster/frames/contest/index.ts index b8d2006e5d0..0ecf4d434d2 100644 --- a/packages/commonwealth/server/farcaster/frames/contest/index.ts +++ b/packages/commonwealth/server/farcaster/frames/contest/index.ts @@ -1,5 +1,4 @@ -import { checkEligibility } from './checkEligibility'; import { contestCard } from './contestCard'; import { contestPrizes } from './contestPrizes'; -export { checkEligibility, contestCard, contestPrizes }; +export { contestCard, contestPrizes }; diff --git a/packages/commonwealth/server/farcaster/router.tsx b/packages/commonwealth/server/farcaster/router.tsx index a7c4701d413..6cb81f5eaa1 100644 --- a/packages/commonwealth/server/farcaster/router.tsx +++ b/packages/commonwealth/server/farcaster/router.tsx @@ -1,5 +1,5 @@ import express from 'express'; -import { checkEligibility, contestCard, contestPrizes } from './frames/contest'; +import { contestCard, contestPrizes } from './frames/contest'; const farcasterRouter = express.Router(); @@ -7,6 +7,5 @@ const farcasterRouter = express.Router(); farcasterRouter.get('/:contest_address/contestCard', contestCard); farcasterRouter.post('/:contest_address/contestCard', contestCard); farcasterRouter.post('/:contest_address/contestPrizes', contestPrizes); -farcasterRouter.post('/:contest_address/checkEligibility', checkEligibility); export default farcasterRouter; From 93c33d7b09f77d752947e0192dcb7d03dcf9f9b0 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 4 Dec 2024 13:25:57 +0100 Subject: [PATCH 4/4] 10087 fix placeholder --- .../client/scripts/views/pages/ContestPage/ContestPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/commonwealth/client/scripts/views/pages/ContestPage/ContestPage.tsx b/packages/commonwealth/client/scripts/views/pages/ContestPage/ContestPage.tsx index a97f871fefe..40db647af60 100644 --- a/packages/commonwealth/client/scripts/views/pages/ContestPage/ContestPage.tsx +++ b/packages/commonwealth/client/scripts/views/pages/ContestPage/ContestPage.tsx @@ -88,7 +88,7 @@ const ContestPage = ({ contestAddress }: ContestPageProps) => { - ) : !farcasterCasts?.length ? ( + ) : !farcasterCasts?.[0]?.replies?.length ? ( No entries for the contest yet ) : ( <>