-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Comments
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. |
That will be very beneficial to those of us with blockchain explorers, thank you.
Would be great to have it but understand if this is more difficult. |
Here is the PR -> #8815 |
Closed as already being worked on. |
For history's sake, this is a duplicate of #8686 |
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 betweenAND
andOR
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
The text was updated successfully, but these errors were encountered: