Skip to content

pagination perPage calculation wrong #3065

@cryptom-dev

Description

@cryptom-dev

return defaultPerPage

func validatePerPage(perPage int) int {
	if perPage < 1 || perPage > maxPerPage {
		return defaultPerPage
	}
	return perPage
}

if perPage > maxPerPage we should return maxPerPage rather than defaultPerPage.

This is related with cosmos/cosmos-sdk#2894
And we are talking about increase the perPage to 100 to 200 there

Metadata

Metadata

Assignees

Labels

C:rpcComponent: JSON RPC, gRPCS:proposalStatus: Proposal

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions