Skip to content

Commit

Permalink
Update InvalidActivePercentage error message for accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Sep 17, 2023
1 parent 5f509ed commit 36f5d33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,9 @@ fn test_update_active_threshold() {
}

#[test]
#[should_panic(expected = "Active threshold percentage must be greater than 0 and less than 1")]
#[should_panic(
expected = "Active threshold percentage must be greater than 0 and not greater than 1"
)]
fn test_active_threshold_percentage_gt_100() {
let mut app = App::default();

Expand All @@ -1195,7 +1197,9 @@ fn test_active_threshold_percentage_gt_100() {
}

#[test]
#[should_panic(expected = "Active threshold percentage must be greater than 0 and less than 1")]
#[should_panic(
expected = "Active threshold percentage must be greater than 0 and not greater than 1"
)]
fn test_active_threshold_percentage_lte_0() {
let mut app = App::default();

Expand Down
2 changes: 1 addition & 1 deletion packages/dao-voting/src/threshold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub enum ActiveThresholdError {
#[error("Absolute count threshold cannot be greater than the total token supply")]
InvalidAbsoluteCount {},

#[error("Active threshold percentage must be greater than 0 and less than 1")]
#[error("Active threshold percentage must be greater than 0 and not greater than 1")]
InvalidActivePercentage {},

#[error("Active threshold count must be greater than zero")]
Expand Down

0 comments on commit 36f5d33

Please sign in to comment.