diff --git a/packages/page-democracy/src/Overview/Fasttrack.tsx b/packages/page-democracy/src/Overview/Fasttrack.tsx index 39c6bd6bbe..53cf0f5451 100644 --- a/packages/page-democracy/src/Overview/Fasttrack.tsx +++ b/packages/page-democracy/src/Overview/Fasttrack.tsx @@ -62,13 +62,13 @@ function Fasttrack ({ imageHash, members, threshold }: Props): React.ReactElemen // @ts-ignore Old-type : api.tx[modLocation].propose(memberThreshold, proposal); - return withVote + return withVote && (members.length > 1) ? api.tx.utility.batch([ proposeTx, api.tx[modLocation].vote(proposal.method.hash, proposalCount, true) ]) : proposeTx; - }, [api, memberThreshold, modLocation, proposal, proposalCount, proposalLength, withVote] + }, [api, members, memberThreshold, modLocation, proposal, proposalCount, proposalLength, withVote] ); useEffect((): void => { @@ -133,13 +133,15 @@ function Fasttrack ({ imageHash, members, threshold }: Props): React.ReactElemen label={t('threshold')} /> - ('Submit an Aye vote alongside the proposal as part of a batch')}> - ('Submit Aye vote with proposal')} - onChange={toggleVote} - value={withVote} - /> - + {(members.length > 1) && ( + ('Submit an Aye vote alongside the proposal as part of a batch')}> + ('Submit Aye vote with proposal')} + onChange={toggleVote} + value={withVote} + /> + + )}