-
Notifications
You must be signed in to change notification settings - Fork 607
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
Fix: Support HTTP requests for FilteredPools
#3737
Conversation
x/gamm/client/cli/query.go
Outdated
} | ||
|
||
min_liquidity = coins | ||
min_liquidity = args[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make more sense to do:
min_liquidity := args[0]
var pool_type string
if len(args) > 1 {
pool_type = args[1]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Nice catch!
Do you have an example of how the query should be serialized? |
@jonator are you asking for what an example request would look like? If so, it would look something like this
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but needs API break changelog update
Changed labels, this is query breaking, but state compatible, as its not a query exposed to state machine. (If it was we couldn't backport) |
No I meant something like: We can't send a body in a GET request |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you! |
@jonator Ah I see, it could be done using something like https://lcd-osmosis.keplr.app/osmosis/gamm/v1beta1/filtered_pools?pagination.limit=100&min_liquidity=100uosmo&pool_type=Balancer |
* Fix: Support GRPC For coins struct * Add changelog entry * use parse coin normalized * Nicolas' review :) (cherry picked from commit 010d4cf)
* Fix: Support GRPC For coins struct * Add changelog entry * use parse coin normalized * Nicolas' review :) (cherry picked from commit 010d4cf) Co-authored-by: Matt, Park <[email protected]>
cref: https://github.com/googleapis/googleapis/blob/master/google/api/http.proto
Current
FilteredPools
does not support http requests, as grpc gateway cannot doGET
requests for non primitive types that are repeated.This PR brings the solution using coins string, and then parsing the coins string manually with in the grp_query.go logic.
Brief Changelog
FilteredPools
MinLiquidity
field from sdk.Coins struct to stringTesting and Verifying
Passes existing test on the grpc method, also added new test cases for the helper method.
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? yesx/<module>/spec/
) / Osmosis docs repo / not documented)