fix ordering in list-action query#102
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an ordering issue in the list-action query where reverse pagination was using lexical ordering instead of numeric ordering for action IDs. This caused issues on mainnet where action ID "99999" would appear before "123611" in reverse order (lexically correct but numerically incorrect).
Changes:
- Added numeric ordering logic for reverse pagination when no filters are applied
- Added test case to verify numeric ordering behavior with reverse pagination
- Swapped import order of testify and gomock in test file
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| x/action/v1/keeper/query_list_actions_test.go | Swapped import order and added test for numeric reverse pagination |
| x/action/v1/keeper/query_list_actions.go | Added helper functions for numeric sorting and custom pagination logic for reverse queries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Both items from previous reviews are now addressed. The offset+key guard in
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
No description provided.