Skip to content

refactor: display tokens #427

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

Merged
merged 13 commits into from
Jan 13, 2025
Merged

refactor: display tokens #427

merged 13 commits into from
Jan 13, 2025

Conversation

agualis
Copy link
Collaborator

@agualis agualis commented Jan 10, 2025

Main changes:

  • Removes all API deprecated pool.displayTokens calls.
  • Simplifies token related components types by using ApiToken instead of types like GqlDisplayToken
  • Centralises token display helpers in a new file (pool.tokens.utils.ts).
  • Sorts display pool tokens by index to have a more predictable token display outputs.
  • Adds integration tests to cover all the new extracted functions above (covering all the pool edge cases).
  • Introduces a new PoolCore type to start cleaning the mess around different Pool types (Pool, PoolListItem, PoolData...) used across the Pool token display related components. (This must be simplified even more in incoming PRs but we need it now to enable previous points).

TODO:
VoteListTableRow and other components in #148 once this PR is merged into main.
This PR contained the necessary code: #373

Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mono-beets-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 1:18pm
mono-frontend-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 1:18pm
mono-test-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 1:18pm

@agualis agualis merged commit d43a400 into main Jan 13, 2025
12 checks passed
@agualis agualis deleted the refactor/displayTokens branch January 13, 2025 11:34
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

Successfully merging this pull request may close these issues.

Refactor pool token helpers
3 participants