diff --git a/x/bridge/client/cli/query_withdraw.go b/x/bridge/client/cli/query_withdraw.go index 5dcf6dbe6f..9425ed67f5 100644 --- a/x/bridge/client/cli/query_withdraw.go +++ b/x/bridge/client/cli/query_withdraw.go @@ -1,4 +1,4 @@ -package cli //nolint:dupl +package cli import ( "context" diff --git a/x/bridge/keeper/query_withdraw.go b/x/bridge/keeper/query_withdraw.go index 3ec8efa835..e7005150b3 100644 --- a/x/bridge/keeper/query_withdraw.go +++ b/x/bridge/keeper/query_withdraw.go @@ -84,8 +84,8 @@ func PaginateWithdraws(withdraws []types.Withdraw, pageReq *query.PageRequest) ( } } - start, end := int(pageReq.Offset), int(pageReq.Offset+pageReq.Limit) - if end > len(withdraws) || end < 0 { // -ve end means that the end has overflown + start, end := int(pageReq.Offset), int(pageReq.Offset+pageReq.Limit) // #nosec + if end > len(withdraws) || end < 0 { // -ve end means that the end has overflown end = len(withdraws) } if start > len(withdraws) || start < 0 {