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

fix ListPoolsByDenom method #7341

Merged
merged 4 commits into from
Feb 17, 2024
Merged

Conversation

doggystylez
Copy link
Contributor

@doggystylez doggystylez commented Jan 19, 2024

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

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@czarcas7ic czarcas7ic added the V:state/breaking State machine breaking PR label Jan 21, 2024
@czarcas7ic
Copy link
Member

Hey @doggystylez would you be able to add a changelog entry for this?

Copy link
Member

@mattverse mattverse left a 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())
Copy link
Member

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?

Copy link
Contributor Author

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)

Copy link
Member

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!

@p0mvn
Copy link
Member

p0mvn commented Jan 28, 2024

@doggystylez please add changelog entry

@p0mvn p0mvn marked this pull request as draft January 28, 2024 05:52
@doggystylez
Copy link
Contributor Author

changelog is added. sorry about that

Copy link
Contributor

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!

@github-actions github-actions bot added the Stale label Feb 16, 2024
@p0mvn p0mvn self-assigned this Feb 16, 2024
@p0mvn p0mvn marked this pull request as ready for review February 16, 2024 01:14
@p0mvn p0mvn closed this Feb 16, 2024
@p0mvn p0mvn reopened this Feb 16, 2024
@github-actions github-actions bot removed the Stale label Feb 17, 2024
@ValarDragon ValarDragon merged commit 7d734f6 into osmosis-labs:main Feb 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/poolmanager V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants