Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbigz committed Nov 24, 2023
1 parent 5f4473a commit e9acb73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions programs/drift/src/math/orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1250,13 +1250,13 @@ pub fn estimate_price_from_side(side: &Side, depth: u64) -> DriftResult<Option<u

pub fn select_margin_type_for_perp_maker(
maker: &User,
based_asset_amount_filled: i64,
base_asset_amount_filled: i64,
market_index: u16,
) -> DriftResult<MarginRequirementType> {
let current_position = maker
.get_perp_position(market_index)
.map_or(0, |p| p.base_asset_amount);
let position_before = current_position.safe_sub(based_asset_amount_filled)?;
let position_before = current_position.safe_sub(base_asset_amount_filled)?;

if current_position == 0 {
return Ok(MarginRequirementType::Maintenance);
Expand Down

0 comments on commit e9acb73

Please sign in to comment.