From ef9129ecc0e065075429c8d7116cdb7af6a97ce1 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Fri, 30 Aug 2024 11:25:54 +0530 Subject: [PATCH] Fix total count in page response --- x/registry/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/registry/keeper/keeper.go b/x/registry/keeper/keeper.go index e1e14699..89540541 100644 --- a/x/registry/keeper/keeper.go +++ b/x/registry/keeper/keeper.go @@ -770,7 +770,7 @@ func paginate[T any](data []T, pagination *query.PageRequest) ([]T, *query.PageR paginatedItems := data[start:end] if countTotal { - return paginatedItems, &query.PageResponse{Total: end - start} + return paginatedItems, &query.PageResponse{Total: totalItems} } else { return paginatedItems, nil }