-
Notifications
You must be signed in to change notification settings - Fork 33
wip: state migration msg #169
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
base: main
Are you sure you want to change the base?
Conversation
todo: finish feegrants and work on pagination
// =============== | ||
func (k *Keeper) migrateDelegations(ctx sdk.Context, originalAddress sdk.AccAddress, maxValidators uint16, newAddress sdk.AccAddress) error { | ||
|
||
delegations, err := k.stakingKeeper.GetDelegatorDelegations(ctx, originalAddress, maxValidators) |
Check warning
Code scanning / CodeQL
Useless assignment to local variable Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 17 days ago
To fix the issue, we should remove the unused assignment to the err
variable on line 39. Since the delegations
variable is used in the subsequent loop, we can retain the call to k.stakingKeeper.GetDelegatorDelegations
but discard the unused err
assignment by replacing it with the blank identifier _
. This ensures that the code remains functional while eliminating the unnecessary variable assignment.
-
Copy modified line R39
@@ -38,3 +38,3 @@ | ||
|
||
delegations, err := k.stakingKeeper.GetDelegatorDelegations(ctx, originalAddress, maxValidators) | ||
delegations, _ := k.stakingKeeper.GetDelegatorDelegations(ctx, originalAddress, maxValidators) | ||
|
todo: finish feegrants and work on pagination
closes: #147