Skip to content

Commit

Permalink
Program: move fill or kill data at the end of enum for backward compa…
Browse files Browse the repository at this point in the history
…tibility (#269)
  • Loading branch information
farnyser authored Jun 3, 2024
1 parent c0cf159 commit b954445
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
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

0 comments on commit b954445

Please sign in to comment.