Skip to content

Commit

Permalink
remove mentions of FOK
Browse files Browse the repository at this point in the history
  • Loading branch information
jayy04 committed May 31, 2024
1 parent 6842050 commit 7ff1ffa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion protocol/x/clob/simulation/place_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ func SimulateMsgPlaceOrder(
if err != nil {
switch {
case errors.Is(err, satypes.ErrIntegerOverflow),
errors.Is(err, types.ErrFokOrderCouldNotBeFullyFilled),
errors.Is(err, types.ErrPostOnlyWouldCrossMakerOrder),
errors.Is(err, types.ErrWouldViolateIsolatedSubaccountConstraints):
// These errors are expected, and can occur during normal operation. We shouldn't panic on them.
Expand Down
4 changes: 2 additions & 2 deletions protocol/x/clob/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ var (
ErrImmediateExecutionOrderAlreadyFilled = errorsmod.Register(
ModuleName,
2004,
"IOC/FOK order is already filled, remaining size is cancelled.",
"IOC order is already filled, remaining size is cancelled.",
)
ErrWouldViolateIsolatedSubaccountConstraints = errorsmod.Register(
ModuleName,
Expand Down Expand Up @@ -524,7 +524,7 @@ var (
ErrReduceOnlyDisabled = errorsmod.Register(
ModuleName,
9003,
"Reduce-only is currently disabled for non-FOK/IOC orders",
"Reduce-only is currently disabled for non-IOC orders",
)

// Equity tier limit errors.
Expand Down
2 changes: 1 addition & 1 deletion protocol/x/clob/types/match_with_orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (match MatchWithOrders) Validate() error {
// Make sure the maker order is not an IOC order.
unwrappedMakerOrder := makerOrder.MustGetOrder()
if unwrappedMakerOrder.RequiresImmediateExecution() {
return errors.New("IOC / FOK order cannot be matched as a maker order")
return errors.New("IOC order cannot be matched as a maker order")
}
return nil
}
2 changes: 1 addition & 1 deletion protocol/x/clob/types/message_place_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (msg *MsgPlaceOrder) ValidateBasic() (err error) {
}

if msg.Order.ReduceOnly && !msg.Order.RequiresImmediateExecution() {
return errorsmod.Wrapf(ErrReduceOnlyDisabled, "reduce only orders must be short term IOC or FOK orders")
return errorsmod.Wrapf(ErrReduceOnlyDisabled, "reduce only orders must be short term IOC orders")
}

if msg.Order.Subticks == uint64(0) {
Expand Down

0 comments on commit 7ff1ffa

Please sign in to comment.