Skip to content

Commit

Permalink
frank/0.7.43 (#150)
Browse files Browse the repository at this point in the history
* fixes

* 0.7.43
  • Loading branch information
soundsonacid authored Mar 21, 2024
1 parent e3d85f2 commit 5789e55
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.7.42
current_version = 0.7.43
commit = True
tag = True
tag_name = {new_version}
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,8 @@ Fix enum interpretaton bug in `get_max_confidence_interval_multiplier`

## [0.7.42] - 2024-3-18

Add W-PERP to `constants/perp_markets.py`
Add W-PERP to `constants/perp_markets.py`

## [0.7.43] - 2024-3-21

Fix minor bugs in `DriftUser` math functions
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "driftpy"
version = "0.7.42"
version = "0.7.43"
description = "A Python client for the Drift DEX"
authors = ["x19 <https://twitter.com/[email protected]>", "bigz <https://twitter.com/bigz_pubkey>", "frank <https://twitter.com/soundsonacid>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/driftpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.42"
__version__ = "0.7.43"
6 changes: 2 additions & 4 deletions src/driftpy/drift_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ def get_perp_liq_price(

market = self.drift_client.get_perp_market_account(perp_market_index)
current_perp_pos = self.get_perp_position_with_lp_settle(
perp_market_index, burnLpShares=True
perp_market_index, burn_lp_shares=True
)[0] or self.get_empty_position(perp_market_index)

free_collateral_delta = self.calculate_free_collateral_delta_for_perp(
Expand Down Expand Up @@ -1057,9 +1057,7 @@ def get_spot_liq_price(
return None

total_collateral = self.get_total_collateral(MarginCategory.MAINTENANCE)
margin_req = self.get_margin_requirement(
MarginCategory.MAINTENANCE, None, True, False
)
margin_req = self.get_margin_requirement(MarginCategory.MAINTENANCE, None, True)
delta_liq = total_collateral - margin_req

spot_market = self.drift_client.get_spot_market_account(spot_market_index)
Expand Down

0 comments on commit 5789e55

Please sign in to comment.