-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
client: fix Paginate's arguments validation #6205
Conversation
👋 Thanks for creating a PR! Before we can merge this PR, please make sure that all the following items have been For contributor use:
For admin use:
Thank you for your contribution to the Cosmos-SDK! 🚀 |
Codecov Report
@@ Coverage Diff @@
## master #6205 +/- ##
==========================================
+ Coverage 54.85% 54.86% +0.01%
==========================================
Files 444 444
Lines 26785 26787 +2
==========================================
+ Hits 14693 14697 +4
+ Misses 11049 11048 -1
+ Partials 1043 1042 -1 |
Check both page and defLimit against negative values. Follow up of #6205
438e893
to
9416388
Compare
|
||
// fallback to default limit if supplied limit is invalid | ||
if limit <= 0 { | ||
if defLimit < 0 { |
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.
hmm shouldn't this be defLimit <= 0
?
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.
We'll, in case defLimit is 0 and applied as the actual limit though I think 0 results would be returned. That should be ok.
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.
utACK
Check both page and defLimit against negative values.
Follow up of #6163