Skip to content

Commit

Permalink
fix: skip crank and finalize when no proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasDeco committed Sep 15, 2024
1 parent a6ad462 commit cee9b0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/entrypoints/cron/crank-and-finalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ const run = async () => {
new PublicKey(proposal.proposal_acct)
);

// no proposals to crank so returning
if (inProgressProposalPublicKeys.length === 0) return;

logger.log(
`cranking ${inProgressProposalPublicKeys.length} proposals, and finalizing ${shouldFinalizeProposalPublicKeys.length} proposals.`
);
Expand Down

0 comments on commit cee9b0d

Please sign in to comment.