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

Merged
merged 8 commits into from
Oct 8, 2024
Merged

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

nbetsaif and others added 4 commits October 8, 2024 16:06
@nbetsaif nbetsaif merged commit 335e4fd into main Oct 8, 2024
0 of 3 checks passed
@Zied-Dahmani Zied-Dahmani deleted the bugfix/retrieve-unity-and-quorum branch October 11, 2024 10:05
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
3 participants