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

fix lint #1323

Merged
merged 1 commit into from
Apr 3, 2024
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
3 changes: 2 additions & 1 deletion protocol/x/clob/keeper/equity_tier_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ func (k Keeper) getEquityTierLimitForSubaccount(
return equityTierLimit, nil, nil
}

// Deprecated: Equity tier limits were removed for short term orders. See https://github.com/dydxprotocol/v4-chain/pull/1318.
// Deprecated: Equity tier limits were removed for short term orders.
// See https://github.com/dydxprotocol/v4-chain/pull/1318.
Comment on lines +98 to +99
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark the entire ValidateSubaccountEquityTierLimitForShortTermOrder function as deprecated and ensure its logic is either removed or clearly isolated to prevent unintended behavior.

// Deprecated: Equity tier limits were removed for short-term orders.
// See https://github.com/dydxprotocol/v4-chain/pull/1318.
- func (k Keeper) ValidateSubaccountEquityTierLimitForShortTermOrder(ctx sdk.Context, order types.Order) error {
+ // Deprecated function body removed or logic isolated
+ func (k Keeper) ValidateSubaccountEquityTierLimitForShortTermOrder(ctx sdk.Context, order types.Order) error {
+     // Deprecated: This function is no longer operational.
+     return nil
}

Additionally, verify that this deprecation does not negatively impact other parts of the system.


Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
// Deprecated: Equity tier limits were removed for short term orders.
// See https://github.com/dydxprotocol/v4-chain/pull/1318.
// Deprecated: Equity tier limits were removed for short-term orders.
// See https://github.com/dydxprotocol/v4-chain/pull/1318.
// Deprecated function body removed or logic isolated
func (k Keeper) ValidateSubaccountEquityTierLimitForShortTermOrder(ctx sdk.Context, order types.Order) error {
// Deprecated: This function is no longer operational.
return nil
}

//
// ValidateSubaccountEquityTierLimitForShortTermOrder returns an error if adding the order would exceed the equity
// tier limit on how many short term open orders a subaccount can have. Short-term fill-or-kill and immediate-or-cancel
Expand Down
Loading