Skip to content

Commit

Permalink
fix max ticks cross
Browse files Browse the repository at this point in the history
  • Loading branch information
none00y committed Sep 13, 2024
1 parent 9598c3b commit 0015c67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/e2e/max_tick_cross.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub mod e2e_tests {
.unwrap();
assert_eq!(pool.liquidity, liquidity);

let amount = 602_500;
let amount = 462_500;
let bob = ink_e2e::bob();
mint!(client, token_x, address_of!(Bob), amount, bob).unwrap();
let amount_x = balance_of!(client, token_x, address_of!(Bob));
Expand Down Expand Up @@ -113,7 +113,7 @@ pub mod e2e_tests {
let crosses_after_quote =
((pool_after_quote.current_tick_index - pool_before.current_tick_index) / 10).abs();
assert_eq!(crosses_after_quote, 0);
assert_eq!(quote_result.ticks.len(), 117);
assert_eq!(quote_result.ticks.len(), 90);

swap!(
client,
Expand All @@ -137,7 +137,7 @@ pub mod e2e_tests {
.unwrap();

let crosses = ((pool_after.current_tick_index - pool_before.current_tick_index) / 10).abs();
assert_eq!(crosses, 117);
assert_eq!(crosses, 90);
assert_eq!(
pool_after.current_tick_index,
get_tick_at_sqrt_price(quote_result.target_sqrt_price, 10).unwrap()
Expand Down

0 comments on commit 0015c67

Please sign in to comment.