Skip to content

Commit 1f00819

Browse files
authored
Merge pull request #338 from anoma/fix-governance-executed-filter
gov: add executed types to filter
2 parents ecca638 + 649e0f3 commit 1f00819

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

swagger.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ paths:
365365
name: status
366366
schema:
367367
type: string
368-
enum: [pending, votingPeriod, passed, rejected]
368+
enum: [pending, votingPeriod, passed, rejected, executedPassed, executedRejected]
369369
description: The status of the proposal
370370
- in: query
371371
name: kind
@@ -401,7 +401,7 @@ paths:
401401
name: status
402402
schema:
403403
type: string
404-
enum: [pending, votingPeriod, passed, rejected]
404+
enum: [pending, votingPeriod, passed, rejected, executedPassed, executedRejected]
405405
description: The status of the proposal
406406
- in: query
407407
name: kind

webserver/src/dto/governance.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ pub enum ProposalStatus {
88
VotingPeriod,
99
Passed,
1010
Rejected,
11+
ExecutedPassed,
12+
ExecutedRejected,
1113
}
1214

1315
#[derive(Clone, Debug, Serialize, Deserialize)]

webserver/src/service/governance.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,12 @@ impl GovernanceService {
241241
}
242242
ProposalStatus::Passed => GovernanceProposalResultDb::Passed,
243243
ProposalStatus::Rejected => GovernanceProposalResultDb::Rejected,
244+
ProposalStatus::ExecutedPassed => {
245+
GovernanceProposalResultDb::ExecutedPassed
246+
}
247+
ProposalStatus::ExecutedRejected => {
248+
GovernanceProposalResultDb::ExecutedRejected
249+
}
244250
})
245251
}
246252

0 commit comments

Comments
 (0)