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: avoid hardcoding pool types #2833

Closed
p0mvn opened this issue Feb 20, 2024 · 3 comments
Closed

fix: avoid hardcoding pool types #2833

p0mvn opened this issue Feb 20, 2024 · 3 comments

Comments

@p0mvn
Copy link
Member

p0mvn commented Feb 20, 2024

Currently, we hardcode pool types as strings:

const allPooltypes = [
"concentrated",
"weighted",
"stable",
"cosmwasm-transmuter",
"cosmwasm-astroport-pcl",
"cosmwasm",
] as const;

Instead, these should be enum values imported from a single file rather than hardcoded in various locations

Acceptance Criteria

  • Pool types consolidated in a single file
  • Constans are imported everywhere else instead of being hardcoded
@p0mvn p0mvn changed the title fix: avoid hard coding pool types fix: avoid hardcoding pool types Feb 20, 2024
@jonator
Copy link
Member

jonator commented Feb 20, 2024

Long term, those should be the only place pool types are used. Once we have the prices query, and once the pool detail page is migrated to tRPC, we won't need the existing pools package and it and all other pools queries should be deleted.

@MaxMillington
Copy link
Collaborator

@p0mvn @jonator prices are migrated now right? Do we still need this issue?

@jonator
Copy link
Member

jonator commented Oct 8, 2024

Those are the only place they are defined, but the remaining references should be type safe string literals

@jonator jonator closed this as completed Oct 8, 2024
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