Skip to content

Commit

Permalink
Fix incorrect variable ordering and test position.rs (#10)
Browse files Browse the repository at this point in the history
* Fixed incorrect variable ordering and added comprehensive tests in `position.rs`

Corrected the order of `sqrt_ratio_x96_upper` and `sqrt_ratio_x96_lower` in both `mint_amounts_with_slippage` and `burn_amounts_with_slippage` methods in `position.rs`. Added a variety of tests to ensure these methods function as expected under different conditions, including min/max pool price and different position scenarios.

* Make clippy happy

* Address comment
  • Loading branch information
shuhuiluo authored Jan 8, 2024
1 parent 1c4323f commit e32e8a7
Show file tree
Hide file tree
Showing 3 changed files with 463 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "uniswap-v3-sdk"
version = "0.8.1"
version = "0.8.2"
edition = "2021"
authors = ["Shuhui Luo <twitter.com/aureliano_law>"]
description = "Uniswap V3 SDK for Rust"
Expand Down
Loading

0 comments on commit e32e8a7

Please sign in to comment.