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

Program: move fill or kill data at the end of enum for backward compatibility #269

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions programs/openbook-v2/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,12 @@ pub enum OpenBookError {
InvalidPostAmount,
#[msg("Oracle peg orders are not enabled for this market")]
DisabledOraclePeg,
#[msg("Fill-Or-Kill order would generate a partial execution")]
WouldExecutePartially,

#[msg("Cannot close a non-empty market")]
NonEmptyMarket,
#[msg("Cannot close a non-empty open orders account")]
NonEmptyOpenOrdersPosition,
#[msg("Fill-Or-Kill order would generate a partial execution")]
WouldExecutePartially,
}

impl From<OpenBookError> for ProgramError {
Expand Down
6 changes: 3 additions & 3 deletions programs/openbook-v2/src/state/orderbook/order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ pub enum OrderParams {
ImmediateOrCancel {
price_lots: i64,
},
FillOrKill {
price_lots: i64,
},
Fixed {
price_lots: i64,
order_type: PostOrderType,
Expand All @@ -43,6 +40,9 @@ pub enum OrderParams {
order_type: PostOrderType,
peg_limit: i64,
},
FillOrKill {
price_lots: i64,
},
}

impl Order {
Expand Down
Loading