-
Notifications
You must be signed in to change notification settings - Fork 608
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 ListPoolsByDenom
method
#7341
Conversation
Hey @doggystylez would you be able to add a changelog entry for 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.
nice, lgtm
@@ -577,7 +577,10 @@ func (k Keeper) ListPoolsByDenom( | |||
|
|||
var poolsByDenom []types.PoolI | |||
for _, pool := range currentModulePools { | |||
poolDenoms := pool.GetPoolDenoms(ctx) | |||
poolDenoms, err := poolModule.GetPoolDenoms(ctx, pool.GetId()) |
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.
can we add test case where we have error from 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.
I have been thinking about this logic and I wonder if instead of returning an error should any pools that dont expose the denoms be skipped? considering the case for future cosm wasm pools, we would be relying that every single potential contract has the query implemented (correctly)
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.
Yeah, I think they should be skipped, filing as a new issue!
@doggystylez please add changelog entry |
changelog is added. sorry about that |
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! |
Closes: #XXX
What is the purpose of the change
fixes the query for list pools by denom, it was panicking because you can't get the denom from cosmwasm pool directly
(E.g.: This pull request improves documentation of area A by adding ....
Testing and Verifying
added a test case for cw pool
Documentation and Release Note
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)