Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bigz/standardize-auction-prices-in-place #790

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion programs/drift/src/controller/orders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,16 @@
// if auction is non-zero, force it to be at least min_auction_duration
auction_duration.max(min_auction_duration)
};
Ok((auction_start_price, auction_end_price, auction_duration))

Ok((
standardize_price_i64(

Check warning on line 412 in programs/drift/src/controller/orders.rs

View check run for this annotation

Codecov / codecov/patch

programs/drift/src/controller/orders.rs#L411-L412

Added lines #L411 - L412 were not covered by tests
auction_start_price,
tick_size.cast()?,
params.direction,

Check warning on line 415 in programs/drift/src/controller/orders.rs

View check run for this annotation

Codecov / codecov/patch

programs/drift/src/controller/orders.rs#L414-L415

Added lines #L414 - L415 were not covered by tests
)?,
standardize_price_i64(auction_end_price, tick_size.cast()?, params.direction)?,
auction_duration,

Check warning on line 418 in programs/drift/src/controller/orders.rs

View check run for this annotation

Codecov / codecov/patch

programs/drift/src/controller/orders.rs#L417-L418

Added lines #L417 - L418 were not covered by tests
))
}
_ => Ok((0_i64, 0_i64, 0_u8)),
};
Expand Down
Loading