You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to add precision to the way we calculate the necessary votes to determine if a proposal is approved or not. Currently what we do is just to assume all is approved and always show the execute button. We rely on the fact that the actual blockchain implementation checks everything perfectly and we are safe from any hack attempt. However, it is nicer to show the buttons only when they are available.
if it's the case of approval for BPs, then the calculation is already correct:
// If BPs are involved, we need 2/3 (+1) of the BPs to approve the proposalconstapproval=(activeProducers.value.length*2/3)+1;isApproved.value=activeProducersApproved.value.length>=Math.floor(approval);
if it's the case of approval for private parties, the calculated number should consider the weights of each vote and the minimum for that particular signer.
The text was updated successfully, but these errors were encountered:
Overview
We need to add precision to the way we calculate the necessary votes to determine if a proposal is approved or not. Currently what we do is just to assume all is approved and always show the execute button. We rely on the fact that the actual blockchain implementation checks everything perfectly and we are safe from any hack attempt. However, it is nicer to show the buttons only when they are available.
Related Issue: #856
Links
open-block-explorer/src/pages/ProposalItem.vue
Lines 304 to 318 in a413715
Acceptance Criteria
The text was updated successfully, but these errors were encountered: