-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
There was a problem hiding this 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
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) { |
There was a problem hiding this 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;
There was a problem hiding this 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;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you - approved
# Conflicts: # lib/core/network/api/services/proposal_service.dart
…' into bugfix/retrieve-unity-and-quorum
…' into bugfix/retrieve-unity-and-quorum
Scope
Ticket
I have implemented the logic to retrieve and display the
unity
andquorum
values. Additionally, the display color changes dynamically based on specific rules related to theunity
andquorum
thresholds.Screenshots