Skip to content

Commit

Permalink
update status fucntion
Browse files Browse the repository at this point in the history
  • Loading branch information
josemarinas committed Jul 20, 2023
1 parent 049a362 commit f02486b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions modules/client/src/client-common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,12 @@ export function computeProposalStatusFilter(
where = { executed: true };
break;
case ProposalStatus.SUCCEEDED:
where = { potentiallyExecutable: true };
where = { potentiallyExecutable: true, endDate_lt: now };
break;
case ProposalStatus.DEFEATED:
where = {
endDate_lt: now,
executed: false,
potentiallyExecutable: false,
};
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,6 @@ describe("Client Address List", () => {
where: {
endDate_lt: nowFilter,
executed: false,
potentiallyExecutable: false,
},
skip: 0,
limit: params.limit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ describe("Client Multisig", () => {
where: {
endDate_lt: nowFilter,
executed: false,
potentiallyExecutable: false,
},
skip: 0,
limit: params.limit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,6 @@ describe("Token Voting Client", () => {
where: {
endDate_lt: nowFilter,
executed: false,
potentiallyExecutable: false,
},
skip: 0,
limit: params.limit,
Expand Down
2 changes: 1 addition & 1 deletion modules/client/test/unit/client-common/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe("client-common utils", () => {
expect(computeProposalStatus({
endDate: endDate.toString(),
startDate: startDate.toString(),
potentiallyExecutable: false,
potentiallyExecutable: true,
executed: false,
earlyExecutable: false,
})).toBe(ProposalStatus.DEFEATED);
Expand Down

0 comments on commit f02486b

Please sign in to comment.