Skip to content

Commit

Permalink
add fixes for statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
josemarinas committed Jul 12, 2023
1 parent 38e5144 commit db408b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/client/src/client-common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ export function computeProposalStatus(
if (startDate >= now) {
return ProposalStatus.PENDING;
}
if (proposal.potentiallyExecutable || proposal.earlyExecutable) {
if (
(proposal.potentiallyExecutable || proposal.earlyExecutable) &&
endDate >= now
) {
return ProposalStatus.SUCCEEDED;
}
if (endDate >= now) {
Expand Down Expand Up @@ -77,7 +80,6 @@ export function computeProposalStatusFilter(
break;
case ProposalStatus.DEFEATED:
where = {
potentiallyExecutable: false,
endDate_lt: now,
executed: false,
};
Expand Down

0 comments on commit db408b3

Please sign in to comment.