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: retrieve unity and quorum #337

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Zied-Dahmani
Copy link
Collaborator

Scope

Ticket

I have implemented the logic to retrieve and display the unity and quorum values. Additionally, the display color changes dynamically based on specific rules related to the unity and quorum thresholds.

Screenshots

Image 2

@Zied-Dahmani Zied-Dahmani requested a review from n13 October 1, 2024 14:44
@Zied-Dahmani Zied-Dahmani self-assigned this Oct 1, 2024
@Zied-Dahmani Zied-Dahmani linked an issue Oct 1, 2024 that may be closed by this pull request
Copy link
Collaborator

@n13 n13 left a comment

Choose a reason for hiding this comment

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

Please use quantityAsDouble - no duplicate code - see comments

@Zied-Dahmani Zied-Dahmani requested a review from n13 October 3, 2024 13:01
final double fail = this['votetally'][0]['fail_votePower_a'].quantityAsDouble();
final double unity = (pass + fail > 0) ? pass / (pass + fail) : 0;

if (this['details_ballotSupply_a'] != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

one more...

double supply = this['details_ballotSupply_a']?.quantityAsDouble() ?? 0;

Copy link
Collaborator

@n13 n13 left a comment

Choose a reason for hiding this comment

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

one more...
double supply = this['details_ballotSupply_a']?.quantityAsDouble() ?? 0;

@Zied-Dahmani Zied-Dahmani requested a review from n13 October 4, 2024 07:39
Copy link
Collaborator

@n13 n13 left a comment

Choose a reason for hiding this comment

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

Thank you - approved

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.

Unity and Quorum
2 participants