Skip to content

Commit

Permalink
feat: Allow to create a proposal in a review state (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist authored Feb 28, 2024
1 parent 05fb66a commit a4a3a7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ impl Contract {
require!(self.proposal_categories.contains(&proposal_body.category), "Unknown category");

require!(
proposal_body.timeline.is_draft(),
"Cannot create proposal which is not in a draft state"
proposal_body.timeline.is_draft() || proposal_body.timeline.is_empty_review(),
"Cannot create proposal which is not in a draft or a review state"
);

for label in &labels {
Expand Down
2 changes: 1 addition & 1 deletion tests/proposals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ async fn test_proposal() -> anyhow::Result<()> {
"receiver_account": "polyprogrammist.near",
"requested_sponsor": "neardevdao.near",
"payouts": [],
"timeline": {"status": "REVIEW", "sponsor_requested_review": false, "reviewer_completed_attestation": false }
"timeline": {"status": "REVIEW", "sponsor_requested_review": true, "reviewer_completed_attestation": false }
},
"labels": ["test1", "test2"],
}))
Expand Down

0 comments on commit a4a3a7f

Please sign in to comment.