Skip to content

Commit

Permalink
fix - do not error on bugged/low liquidity pools
Browse files Browse the repository at this point in the history
  • Loading branch information
Dvisacker committed Dec 10, 2024
1 parent a3543d6 commit 965a9f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/amm/ve33/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,10 +570,10 @@ impl Ve33Pool {

if stable {
self.get_amount_out_stable(amount_in_with_fee, token_in, reserve_in, reserve_out)
.expect("Failed to get amount out")
.unwrap_or_else(|_| U256::ZERO)
} else {
self.get_amount_out_volatile(amount_in_with_fee, reserve_in, reserve_out)
.expect("Failed to get amount out")
.unwrap_or_else(|_| U256::ZERO)
}
}

Expand Down

0 comments on commit 965a9f5

Please sign in to comment.