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

Allow sorting on LCD /txs endpoint and OR filter #8819

Closed
4 tasks
JaTochNietDan opened this issue Mar 8, 2021 · 5 comments
Closed
4 tasks

Allow sorting on LCD /txs endpoint and OR filter #8819

JaTochNietDan opened this issue Mar 8, 2021 · 5 comments

Comments

@JaTochNietDan
Copy link

Summary

Adding support to be able to pass ASC/DESC sorting through the LCD client into the underlying Tendermint layer should be pretty trivial, looking here. It'd just be a case of passing c.Form("pagination.order") in there. Sure, you would want to do some validation ideally, but not being able to do this right now is arguably worse than having poor validation on that parameter.

Being able to do an OR on the query would also be huge. It doesn't seem that difficult either. Right now it defaults to an AND as seen here by doing a simple string slice join. In theory it'd be trivial enough to add another parameter to be able to change between AND and OR as the splitter, or specify the splitter yourself.

I think adding both of these would help those of us with blockchain explorers out significantly, without much hassle and basically utilising stuff that's already there by opening it up a bit. I think if validation has to be sacrificed to get this through, it'd be worth it because of the benefit it'd add to LCD API users.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez
Copy link
Contributor

Supporting order by is already being done. PR is up somewhere. Re; supporting OR, that's a Tendermint concern and we have issues for that. We can close this issue.

@JaTochNietDan
Copy link
Author

Supporting order by is already being done. PR is up somewhere.

That will be very beneficial to those of us with blockchain explorers, thank you.

Re; supporting OR, that's a Tendermint concern and we have issues for that. We can close this issue.

Would be great to have it but understand if this is more difficult.

@alexanderbez
Copy link
Contributor

Here is the PR -> #8815

@JaTochNietDan
Copy link
Author

Closed as already being worked on.

@alessio
Copy link
Contributor

alessio commented Mar 9, 2021

For history's sake, this is a duplicate of #8686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants