Skip to content

BME ledger endpoint: pagination.reverse param has no effect #442

@ygrishajev

Description

@ygrishajev

Describe the bug
The pagination.reverse=true parameter on the BME ledger LCD endpoint has no effect — records are always returned in ascending order by block height.

To Reproduce

  1. Open this URL: https://testnetapi.akashnet.net/akash/bme/v1/ledger?filters.source=akash1ss0d2yw38r6e7ew8ndye9h7kg62sem36zak4d5&pagination.limit=5&pagination.offset=0&pagination.reverse=true
  2. Observe records are in ascending height order (oldest first)
  3. Compare with reverse=false: https://testnetapi.akashnet.net/akash/bme/v1/ledger?filters.source=akash1ss0d2yw38r6e7ew8ndye9h7kg62sem36zak4d5&pagination.limit=5&pagination.offset=0&pagination.reverse=false
  4. Same order in both cases

Expected behavior
When pagination.reverse=true is set, records should be returned in descending order (newest first), consistent with other cosmos SDK paginated endpoints.

Additional context
Console needs to display mint/burn history with newest records first. Without server-side reverse ordering, we have to fetch the total count first and then calculate reversed offsets manually, which adds an extra request per page load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions