diff --git a/webapp/src/components/Done.tsx b/webapp/src/components/Done.tsx index 32945055..b09e7391 100644 --- a/webapp/src/components/Done.tsx +++ b/webapp/src/components/Done.tsx @@ -71,7 +71,7 @@ export const Done = ({ pid, setPid, usernames, setUsernames, censusRecords, shor You created a census for a total of {usernames.length} farcaster users, containing{' '} - {Math.round((usernames.length / censusRecords) * 1000) / 10}% of the provided CSV file.{` `} + {Math.round((usernames.length / censusRecords) * 1000) / 10}% of the specified census.{` `} Download usernames list diff --git a/webapp/src/components/Form.tsx b/webapp/src/components/Form.tsx index 572fecb9..6b114ddb 100644 --- a/webapp/src/components/Form.tsx +++ b/webapp/src/components/Form.tsx @@ -109,6 +109,7 @@ const Form: React.FC = (props: FlexProps) => { name: 'addresses', }) const censusType = watch('censusType') + const notify = watch('notify') const notifyAllowed = ['custom', 'nft', 'erc20'] @@ -240,8 +241,10 @@ const Form: React.FC = (props: FlexProps) => { if (census.usernames && census.usernames.length) { setUsernames(census.usernames) } - if (data.censusType === 'custom') { + if (census.fromTotalAddresses) { setCensusRecords(census.fromTotalAddresses) + } + if (data.censusType === 'custom') { census.size = census.usernames.length } @@ -291,7 +294,7 @@ const Form: React.FC = (props: FlexProps) => { return ( - + farcaster.vote @@ -377,7 +380,9 @@ const Form: React.FC = (props: FlexProps) => { {notifyAllowed.includes(censusType) && ( - Notify farcaster users (only for censuses < 1k) + + Notify farcaster users via cast (only for censuses < 1k) + )} {['erc20', 'nft'].includes(censusType) && @@ -403,7 +408,7 @@ const Form: React.FC = (props: FlexProps) => { placeholder='Smart contract address' {...register(`addresses.${index}.address`, { required })} /> - {(censusType === 'nft' || (censusType === 'erc20' && index > 0)) && ( + {addressFields.length > 1 && ( { )} - {usernames.length > 1000 && ( + {notify && usernames.length > 1000 && (