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

Refactor balances.ts to make use of DenomMetadata and ValueView #427

Closed
5 tasks done
Tracked by #392
grod220 opened this issue Jan 30, 2024 · 0 comments · Fixed by #453
Closed
5 tasks done
Tracked by #392

Refactor balances.ts to make use of DenomMetadata and ValueView #427

grod220 opened this issue Jan 30, 2024 · 0 comments · Fixed by #453
Assignees
Labels
refactor Improving existing system with new design rpc Related to proto rpc services/methods

Comments

@grod220
Copy link
Collaborator

grod220 commented Jan 30, 2024

  • The extension and frontend code should be making use of the DenomMetadata at all times. For instance, the assets list makes use of an AssetBalance, which has an ad-hoc subset of different parts of the DenomMetadata, plus an amount. But we already have a way to represent a typed amount (Value) and a way to attach metadata to that typed amount (ValueView).
  • Values should be rendered using standardized components that take a ValueView, rather than having custom rendering in different places (similarly to how we have a standardized AddressView component)
  • Values should use the ticker symbols defined in the DenomMetadata.
  • Do a search for fromBaseUnitAmount. Should find a view examples of where ValueView should replace.
  • Support DenomMetadataByIdRequest #429

Will affect things downstream (swap/send/ibc). Ensure those are not formatting their own values but using ValueView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improving existing system with new design rpc Related to proto rpc services/methods
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants