Skip to content
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

Fix/9797 default pagination not always set #9798

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@
- [9762](https://github.com/vegaprotocol/vega/issues/9762) - Referral fees API not filtering by party correctly.
- [9775](https://github.com/vegaprotocol/vega/issues/9775) - Do not pay discount if set is not eligible
- [9788](https://github.com/vegaprotocol/vega/issues/9788) - Fix transfer account validation.
- [9797](https://github.com/vegaprotocol/vega/issues/9797) - Default pagination limits are not always correctly set.

## 0.72.1

Expand Down
5 changes: 4 additions & 1 deletion datanode/entities/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ func NewCursorPagination(first *int32, after *string, last *int32, before *strin
}

func CursorPaginationFromProto(cp *v2.Pagination) (CursorPagination, error) {
if cp == nil {
if cp == nil || (cp != nil && cp.First == nil && cp.Last == nil) {
if cp != nil && cp.NewestFirst != nil {
return DefaultCursorPagination(*cp.NewestFirst), nil
}
return DefaultCursorPagination(true), nil
}

Expand Down
Loading