Skip to content

Commit

Permalink
Clean up small TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell authored and Jake Hartnell committed Mar 26, 2024
1 parent 371d724 commit 6ab116d
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()),
};

// 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 {}
);

// 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 6ab116d

Please sign in to comment.