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

feat(ui): reward token improvements #154

Merged
merged 7 commits into from
May 18, 2024
Merged

Conversation

drichar
Copy link
Collaborator

@drichar drichar commented May 18, 2024

This makes a number of improvements to how the UI handles reward tokens:

Add Validator form

  • fetch asset info from reward token ID (debounced), showing unit name and green check mark if it exists
  • validate reward token is an actual asset, prevents form submission if not
  • validate reward per payout is set if reward token is set
  • reward per payout is expected in whole units, not base units

Validator object

  • fetches reward token's asset info and sets it to the Validator's rewardToken?: Asset property

Validator details page

  • show reward token name/unit-name in validator details instead of ID
  • reward token is a link to the asset in block explorer
  • show reward per payout in whole units of asset with unit name

Other Changes

Fixes a bug in formatNumber where no decimals were shown if options.precision was undefined. Now if precision is unset all decimals are shown.

Copy link

vercel bot commented May 18, 2024

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

Name Status Preview Comments Updated (UTC)
reti ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 18, 2024 5:27am

@drichar drichar merged commit 2b1423e into dev May 18, 2024
3 checks passed
@drichar drichar deleted the feat/ui-reward-token-asset branch May 18, 2024 05:36
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.

1 participant