-
Notifications
You must be signed in to change notification settings - Fork 122
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
[TRA-461] Remove x/vault/MsgWithdrawFromVault
#1859
Conversation
WalkthroughThe primary changes involve the removal of the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (3)
protocol/x/vault/types/errors.go (1)
Line range hint
3-3
:
Remove unused import.The import
errorsmod
is no longer used and can be removed.- import errorsmod "cosmossdk.io/errors"
protocol/app/module/interface_registry.go (1)
Line range hint
48-48
:
Remove unused entry.The entry for
MsgWithdrawFromVault
is no longer used and can be removed.- "dydxprotocol.vault.MsgWithdrawFromVault": getLegacyMsgSignerFn( - []string{"subaccount_id", "owner"}, - ),indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/tx.ts (1)
Line range hint
61-61
:
Replace empty interface with type alias.An empty interface is equivalent to
{}
. Use a type alias instead.- export interface MsgUpdateParamsResponse {} + export type MsgUpdateParamsResponse = {};
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
protocol/x/vault/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (10)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/tx.rpc.msg.ts (3 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/tx.ts (3 hunks)
- proto/dydxprotocol/vault/tx.proto (2 hunks)
- protocol/app/module/interface_registry.go (1 hunks)
- protocol/app/msgs/all_msgs.go (1 hunks)
- protocol/app/msgs/normal_msgs.go (1 hunks)
- protocol/app/msgs/normal_msgs_test.go (1 hunks)
- protocol/testutil/constants/vault.go (2 hunks)
- protocol/testutil/encoding/utils.go (1 hunks)
- protocol/x/vault/types/errors.go (1 hunks)
Files skipped from review due to trivial changes (5)
- proto/dydxprotocol/vault/tx.proto
- protocol/app/msgs/all_msgs.go
- protocol/app/msgs/normal_msgs.go
- protocol/testutil/constants/vault.go
- protocol/testutil/encoding/utils.go
Additional context used
Biome
indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/tx.ts
[error] 41-41: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Additional comments not posted (2)
protocol/app/msgs/normal_msgs_test.go (2)
Line range hint
1-107
:
Ensure the removal ofMsgWithdrawFromVault
andMsgWithdrawFromVaultResponse
from the expected messages list.The
expectedMsgs
list should no longer include/dydxprotocol.vault.MsgWithdrawFromVault
and/dydxprotocol.vault.MsgWithdrawFromVaultResponse
.Verification successful
Verification successful: The message types
/dydxprotocol.vault.MsgWithdrawFromVault
and/dydxprotocol.vault.MsgWithdrawFromVaultResponse
have been successfully removed from the codebase, as indicated by the absence of these types in the repository.
- No occurrences of
/dydxprotocol.vault.MsgWithdrawFromVault
found.- No occurrences of
/dydxprotocol.vault.MsgWithdrawFromVaultResponse
found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the expected messages list does not include MsgWithdrawFromVault and MsgWithdrawFromVaultResponse. # Test: Ensure that the messages are not present in the expected messages list. Expect: No occurrences of the removed messages. rg --type go '/dydxprotocol.vault.MsgWithdrawFromVault|/dydxprotocol.vault.MsgWithdrawFromVaultResponse' protocol/app/msgs/normal_msgs_test.goLength of output: 144
Script:
#!/bin/bash # Description: Verify that the entire repository does not include MsgWithdrawFromVault and MsgWithdrawFromVaultResponse. # Test: Ensure that the messages are not present in the repository. Expect: No occurrences of the removed messages. rg '/dydxprotocol.vault.MsgWithdrawFromVault|/dydxprotocol.vault.MsgWithdrawFromVaultResponse'Length of output: 96
Script:
#!/bin/bash # Description: Verify that the entire repository does not include MsgWithdrawFromVault and MsgWithdrawFromVaultResponse. # Test: Ensure that the messages are not present in the repository. Expect: No occurrences of the removed messages. rg --type go 'MsgWithdrawFromVault|MsgWithdrawFromVaultResponse'Length of output: 66
Line range hint
109-111
:
Verify the handling of the removed message types invalidateMsgValue
.Ensure that the
validateMsgValue
function correctly handles the absence ofMsgWithdrawFromVault
andMsgWithdrawFromVaultResponse
.
@@ -1,14 +1,11 @@ | |||
import { Rpc } from "../../helpers"; | |||
import * as _m0 from "protobufjs/minimal"; | |||
import { MsgDepositToVault, MsgDepositToVaultResponse, MsgWithdrawFromVault, MsgWithdrawFromVaultResponse, MsgUpdateParams, MsgUpdateParamsResponse } from "./tx"; | |||
import { MsgDepositToVault, MsgDepositToVaultResponse, MsgUpdateParams, MsgUpdateParamsResponse } from "./tx"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused import.
The import MsgWithdrawFromVault
and MsgWithdrawFromVaultResponse
is no longer used and can be removed.
- import { MsgDepositToVault, MsgDepositToVaultResponse, MsgUpdateParams, MsgUpdateParamsResponse, MsgWithdrawFromVault, MsgWithdrawFromVaultResponse } from "./tx";
+ import { MsgDepositToVault, MsgDepositToVaultResponse, MsgUpdateParams, MsgUpdateParamsResponse } from "./tx";
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. Thoroughly test & benchmark the code to ensure it meets the requirements.
import { MsgDepositToVault, MsgDepositToVaultResponse, MsgUpdateParams, MsgUpdateParamsResponse } from "./tx"; | |
import { MsgDepositToVault, MsgDepositToVaultResponse, MsgUpdateParams, MsgUpdateParamsResponse } from "./tx"; |
@@ -39,88 +39,6 @@ export interface MsgDepositToVaultResponse {} | |||
/** MsgDepositToVaultResponse is the Msg/DepositToVault response type. */ | |||
|
|||
export interface MsgDepositToVaultResponseSDKType {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace empty interface with type alias.
An empty interface is equivalent to {}
. Use a type alias instead.
- export interface MsgDepositToVaultResponse {}
+ export type MsgDepositToVaultResponse = {};
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. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface MsgDepositToVaultResponseSDKType {} | |
export type MsgDepositToVaultResponseSDKType = {}; |
Tools
Biome
[error] 41-41: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Changelist
x/vault/MsgWIthdrawFromVault
(reasoning: waiting for Vault-of-Vaults spec)make proto-gen
andcd indexer/packages/v4-protos && npm run build:proto
Test Plan
n/a
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit
Removed Features
Bug Fixes
Testing
Code Maintenance