Skip to content

Commit

Permalink
Clean up small TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Jan 9, 2024
1 parent 208244f commit 617fba4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/external/cw-abc/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ fn calculate_exit_fee(
CommonsPhase::Closed => return Ok(Uint128::zero()),

Check warning on line 262 in contracts/external/cw-abc/src/commands.rs

View check run for this annotation

Codecov / codecov/patch

contracts/external/cw-abc/src/commands.rs#L259-L262

Added lines #L259 - L262 were not covered by tests
};

// TODO more normal check?
debug_assert!(
// Ensure the exit fee is not greater than 100%
ensure!(
exit_fee <= StdDecimal::percent(100),
"Exit tax must be <= 100%"
ContractError::InvalidExitFee {}

Check warning on line 268 in contracts/external/cw-abc/src/commands.rs

View check run for this annotation

Codecov / codecov/patch

contracts/external/cw-abc/src/commands.rs#L266-L268

Added lines #L266 - L268 were not covered by tests
);

// This won't ever overflow because it's checked
Expand Down
3 changes: 3 additions & 0 deletions contracts/external/cw-abc/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ pub enum ContractError {
#[error("Hatch phase config error {0}")]
HatchPhaseConfigError(String),

#[error("Invalid exit fee, must be less than 100%.")]
InvalidExitFee {},

#[error("Invalid subdenom: {subdenom:?}")]
InvalidSubdenom { subdenom: String },

Expand Down

0 comments on commit 617fba4

Please sign in to comment.