Skip to content

Commit

Permalink
Codearena 30 randomly revert due to improper equality check
Browse files Browse the repository at this point in the history
  • Loading branch information
af-afk committed Sep 23, 2024
1 parent 80cba71 commit 139e595
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/seawater/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub enum Error {
#[error("Swap result too high")]
SwapResultTooHigh,

// 26 (0x1a)
// 26 (0x1a) UNUSED
#[error("Internal swap amounts not matched")]
InterimSwapNotEq,

Expand Down
2 changes: 1 addition & 1 deletion pkg/seawater/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ impl Pools {
min_out.to_string()
));

assert_eq_or!(interim_usdc_out, interim_usdc_in, Error::InterimSwapNotEq);
assert_or!(amount_out >= min_out, Error::MinOutNotReached);

Ok((
original_amount,
amount_in,
Expand Down

0 comments on commit 139e595

Please sign in to comment.