Skip to content

Commit

Permalink
Merge pull request #46 from invariant-labs/add-cross-both-sides-tests
Browse files Browse the repository at this point in the history
Added cross-both-side tests
  • Loading branch information
Sniezka1927 authored Dec 13, 2023
2 parents 7ac32fe + c3ee434 commit ec3cac5
Show file tree
Hide file tree
Showing 3 changed files with 414 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/e2e/cross.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ fn test_cross() {
.get_pool(pool_key.token_x, pool_key.token_y, fee_tier)
.unwrap();

let slippage = SqrtPrice::new(U128::from(MIN_SQRT_PRICE));
let sqrt_price_limit = SqrtPrice::new(U128::from(MIN_SQRT_PRICE));
let swap_amount = TokenAmount::new(amount);
invariant
.swap(pool_key, true, swap_amount, true, slippage)
.swap(pool_key, true, swap_amount, true, sqrt_price_limit)
.unwrap();

let pool_after = invariant
Expand Down
Loading

0 comments on commit ec3cac5

Please sign in to comment.