Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jayy04 committed Sep 30, 2024
1 parent c5cee6e commit 4095af9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export enum OrderRemoval_RemovalReason {
REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS = 8,

/**
* REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED - REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED represents a removal of an order that
* was placed using an expired permissioned key.
* REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED - REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED represents a removal of an order
* that was placed using an expired permissioned key.
*/
REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED = 9,
UNRECOGNIZED = -1,
Expand Down Expand Up @@ -139,8 +139,8 @@ export enum OrderRemoval_RemovalReasonSDKType {
REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS = 8,

/**
* REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED - REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED represents a removal of an order that
* was placed using an expired permissioned key.
* REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED - REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED represents a removal of an order
* that was placed using an expired permissioned key.
*/
REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED = 9,
UNRECOGNIZED = -1,
Expand Down
4 changes: 2 additions & 2 deletions proto/dydxprotocol/clob/order_removals.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ message OrderRemoval {
// REMOVAL_REASON_FULLY_FILLED represents a removal of an order that
// would lead to the subaccount violating isolated subaccount constraints.
REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS = 8;
// REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED represents a removal of an order that
// was placed using an expired permissioned key.
// REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED represents a removal of an order
// that was placed using an expired permissioned key.
REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED = 9;
}

Expand Down
2 changes: 2 additions & 0 deletions protocol/indexer/shared/order_removal_reason.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func ConvertOrderRemovalReasonToIndexerOrderRemovalReason(
case clobtypes.OrderRemoval_REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS:
reason = sharedtypes.OrderRemovalReason_ORDER_REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS
case clobtypes.OrderRemoval_REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED:
// This is a special case where the order is no longer valid because the permissioned key used to placed
// the order has expired.
reason = sharedtypes.OrderRemovalReason_ORDER_REMOVAL_REASON_EXPIRED
default:
panic("ConvertOrderRemovalReasonToIndexerOrderRemovalReason: unspecified removal reason not allowed")
Expand Down
4 changes: 2 additions & 2 deletions protocol/x/clob/types/order_removals.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4095af9

Please sign in to comment.