Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lint
Browse files Browse the repository at this point in the history
mmsqe committed Apr 8, 2024
1 parent 8b1b3f7 commit f667588
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions x/bank/keeper/grpc_query.go
Original file line number Diff line number Diff line change
@@ -301,13 +301,13 @@ func (k BaseKeeper) SendEnabled(goCtx context.Context, req *types.QuerySendEnabl
var params types.Params
k.legacySubspace.GetParamSetIfExists(ctx, &params)
if len(req.Denoms) > 0 {
for _, sendEnabled := range params.SendEnabled {
for _, sendEnabled := range params.SendEnabled { //nolint:staticcheck
if slices.Contains(req.Denoms, sendEnabled.Denom) {
resp.SendEnabled = append(resp.SendEnabled, sendEnabled)
}
}
} else {
resp.SendEnabled = params.SendEnabled
resp.SendEnabled = params.SendEnabled //nolint:staticcheck
resp.Pagination = new(query.PageResponse)

if req.Pagination == nil {
@@ -323,7 +323,7 @@ func (k BaseKeeper) SendEnabled(goCtx context.Context, req *types.QuerySendEnabl
resp.SendEnabled = resp.SendEnabled[:limit]
}
if req.Pagination.CountTotal {
resp.Pagination.Total = uint64(len(params.SendEnabled))
resp.Pagination.Total = uint64(len(params.SendEnabled)) //nolint:staticcheck
}
}
}
4 changes: 2 additions & 2 deletions x/bank/keeper/send.go
Original file line number Diff line number Diff line change
@@ -113,8 +113,8 @@ func (k BaseSendKeeper) SetParams(ctx sdk.Context, params types.Params) error {
// Normally SendEnabled is deprecated but we still support it for backwards
// compatibility. Using params.Validate() would fail due to the SendEnabled
// deprecation.
if len(params.SendEnabled) > 0 {
k.SetAllSendEnabled(ctx, params.SendEnabled)
if len(params.SendEnabled) > 0 { //nolint:staticcheck
k.SetAllSendEnabled(ctx, params.SendEnabled) //nolint:staticcheck

// override params without SendEnabled
params = types.NewParams(params.DefaultSendEnabled)

0 comments on commit f667588

Please sign in to comment.