Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Jan 26, 2024
1 parent c20e213 commit f48d174
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions programs/jit-proxy/src/instructions/jit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use drift::state::user::{MarketType as DriftMarketType, OrderTriggerCondition, O
use drift::state::user::{User, UserStats};

use crate::error::ErrorCode;
use crate::state::{MarketType, PostOnlyParam, PriceType};
use crate::state::{PostOnlyParam, PriceType};

pub fn jit<'info>(ctx: Context<'_, '_, '_, 'info, Jit<'info>>, params: JitParams) -> Result<()> {
let clock = Clock::get()?;
Expand Down Expand Up @@ -128,7 +128,7 @@ pub fn jit<'info>(ctx: Context<'_, '_, '_, 'info, Jit<'info>>, params: JitParams
}
}

let maker_price = if market_type == MarketType::Perp {
let maker_price = if market_type == DriftMarketType::Perp {
let perp_market = perp_market_map.get_ref(&market_index)?;
let reserve_price = perp_market.amm.reserve_price()?;

Expand All @@ -143,7 +143,7 @@ pub fn jit<'info>(ctx: Context<'_, '_, '_, 'info, Jit<'info>>, params: JitParams
}
}
PositionDirection::Short => {
perp_market.amm.ask_price(reserve_price)?;
let amm_ask_price = perp_market.amm.ask_price(reserve_price)?;

if taker_price >= amm_ask_price && amm_ask_price > maker_worst_price {
maker_price = amm_ask_price;
Expand Down

0 comments on commit f48d174

Please sign in to comment.