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(GUI): adding availability score in wallet #1118

Merged
merged 8 commits into from Feb 16, 2024

Conversation

kehiy
Copy link
Contributor

@kehiy kehiy commented Feb 14, 2024

@kehiy kehiy requested review from b00f and Ja7ad February 14, 2024 21:02
@kehiy kehiy marked this pull request as ready for review February 14, 2024 21:02
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Merging #1118 (ce3f87a) into main (33fa943) will decrease coverage by 0.01%.
The diff coverage is n/a.

❗ Current head ce3f87a differs from pull request most recent head 44924f8. Consider uploading reports for the commit 44924f8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1118      +/-   ##
==========================================
- Coverage   81.40%   81.40%   -0.01%     
==========================================
  Files         173      173              
  Lines        9217     9216       -1     
==========================================
- Hits         7503     7502       -1     
  Misses       1359     1359              
  Partials      355      355              

Copy link
Collaborator

@b00f b00f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding GetAvailabilityScore to wallet is not a good practice.
We can pass node to walletModel to get validator info. Then we can even show if validators in unbonded or last sortition height as well


valAddr, err := crypto.AddressFromString(info.Address)
if err == nil {
val := model.node.State().ValidatorByAddress(valAddr)
Copy link
Collaborator

@b00f b00f Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val itself has availability_score. right?

Copy link
Contributor Author

@kehiy kehiy Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, validator type does not contain an availability_score.

Copy link
Collaborator

@b00f b00f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can get AvailabilityScore from val

@b00f b00f merged commit 5f4cddf into pactus-project:main Feb 16, 2024
10 checks passed
@kehiy kehiy deleted the hotfix/wallet branch February 16, 2024 10:54
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.

Show availability score in Default wallet address GUI
2 participants