Skip to content

Commit

Permalink
program: calculdate_auction_price accounts for trigger limit price
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Dec 2, 2023
1 parent d094804 commit 3d9105f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions programs/drift/src/math/auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ pub fn calculate_auction_price(
valid_oracle_price: Option<i64>,
) -> DriftResult<u64> {
match order.order_type {
OrderType::Market | OrderType::TriggerMarket | OrderType::Limit => {
OrderType::Market
| OrderType::TriggerMarket
| OrderType::Limit
| OrderType::TriggerLimit => {
calculate_auction_price_for_fixed_auction(order, slot, tick_size)
}
OrderType::Oracle => calculate_auction_price_for_oracle_offset_auction(
Expand All @@ -94,7 +97,6 @@ pub fn calculate_auction_price(
tick_size,
valid_oracle_price,
),
_ => unreachable!(),
}
}

Expand Down

0 comments on commit 3d9105f

Please sign in to comment.