From 123fb5fc5cdf76db0573fa9459909d3db9f99692 Mon Sep 17 00:00:00 2001 From: 0xbigz <83473873+0xbigz@users.noreply.github.com> Date: Sat, 2 Dec 2023 06:50:55 -0500 Subject: [PATCH] drift_client.py: fix get_oracle_price_data_and_slot typo --- src/driftpy/drift_client.py | 2 +- src/driftpy/math/positions.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/driftpy/drift_client.py b/src/driftpy/drift_client.py index b9705eba..666a6493 100644 --- a/src/driftpy/drift_client.py +++ b/src/driftpy/drift_client.py @@ -188,7 +188,7 @@ def get_spot_market_account(self, market_index: int) -> Optional[SpotMarketAccou return getattr(spot_market_and_slot, "data", None) def get_oracle_price_data(self, oracle: Pubkey) -> Optional[OraclePriceData]: - oracle_price_data_and_slot = self.account_subscriber.get_oracle_data_and_slot( + oracle_price_data_and_slot = self.account_subscriber.get_oracle_price_data_and_slot( oracle ) return getattr(oracle_price_data_and_slot, "data", None) diff --git a/src/driftpy/math/positions.py b/src/driftpy/math/positions.py index 9c18f596..e0e84dda 100644 --- a/src/driftpy/math/positions.py +++ b/src/driftpy/math/positions.py @@ -1,6 +1,7 @@ from driftpy.math.spot_market import * from driftpy.types import OraclePriceData - +from driftpy.constants.numeric_constants import * +from driftpy.math.amm import calculate_amm_reserves_after_swap, get_swap_direction def get_worst_case_token_amounts( position: SpotPosition,