diff --git a/CHANGELOG.md b/CHANGELOG.md index e1c7284192..ca8e6c1f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/datanode/entities/pagination.go b/datanode/entities/pagination.go index 6ffbf266fb..5187ce842d 100644 --- a/datanode/entities/pagination.go +++ b/datanode/entities/pagination.go @@ -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 }