Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Nov 24, 2023
1 parent b13b2dc commit 229ad5a
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 position_after_fill = maker
.get_perp_position(market_index)
.map_or(0, |p| p.base_asset_amount);
let position_before = position_after_fill.safe_sub(based_asset_amount_filled)?;
let position_before = position_after_fill.safe_sub(base_asset_amount_filled)?;

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

0 comments on commit 229ad5a

Please sign in to comment.