Skip to content

Commit

Permalink
use oracle orders
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Jan 10, 2024
1 parent 1546850 commit 506a15e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions programs/drift/src/state/order_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ impl OrderParams {

let params = OrderParams {
direction: direction_to_close,
order_type: OrderType::Limit,
order_type: OrderType::Oracle,
market_index: market.market_index,

Check warning on line 137 in programs/drift/src/state/order_params.rs

View check run for this annotation

Codecov / codecov/patch

programs/drift/src/state/order_params.rs#L137

Added line #L137 was not covered by tests
base_asset_amount,
reduce_only: true,
auction_start_price: Some(estimated_offset_to_start),
auction_end_price: Some(estimated_offset_to_close),
auction_duration: Some(80),
oracle_price_offset: Some(0),
oracle_price_offset: Some(estimated_offset_to_close.cast()?),

Check warning on line 143 in programs/drift/src/state/order_params.rs

View check run for this annotation

Codecov / codecov/patch

programs/drift/src/state/order_params.rs#L140-L143

Added lines #L140 - L143 were not covered by tests
..OrderParams::default()
};

Expand Down

0 comments on commit 506a15e

Please sign in to comment.