Skip to content

Conversation

@vladjdk
Copy link
Member

@vladjdk vladjdk commented Jan 26, 2026

Limits pagination to the default limit if provided limit exceeds.

@github-actions

This comment has been minimized.

@vladjdk vladjdk changed the title limit pagination fix: limit pagination Jan 26, 2026
Comment on lines +176 to +179
// if the custom limit is greater than the default limit, adjust it back down
if limit > query.DefaultLimit {
limit = query.DefaultLimit
}
Copy link
Contributor

@technicallyty technicallyty Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment for DefaultLimit only says it is used when no limit is supplied. we should either:

  • update comment

or

  • make a new variable, MaxLimit, to make the code more self-documenting. there is a PaginationMaxLimit, however, it's only used in tests and here:
    totalSupply, _, err := k.GetPaginatedTotalSupply(ctx, &query.PageRequest{Limit: query.PaginationMaxLimit})
    So we can probably just update these usages to use math.MaxUint64 directly.

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.24%. Comparing base (0deda3b) to head (9775dd1).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #25828   +/-   ##
=======================================
  Coverage   68.23%   68.24%           
=======================================
  Files         894      894           
  Lines       58150    58152    +2     
=======================================
+ Hits        39680    39684    +4     
+ Misses      18470    18468    -2     
Files with missing lines Coverage Δ
x/auth/tx/service.go 87.35% <100.00%> (+0.14%) ⬆️

... and 1 file with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants