Skip to content

Commit

Permalink
Move function call outside of parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
csoreff committed Mar 11, 2024
1 parent fd6321a commit 5c03ac9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/lite/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ export const calculateChoiceTotal = (choice_voters: any[], decimals: any) => {
}

export const calculateWeightXTZ = (choice: Choice, totalXTZ: number) => {
let choiceTotal = new BigNumber(0)
if (choice && choice.walletAddresses.length > 0) {
return (calculateChoiceTotal(choice.walletAddresses, 6) / totalXTZ) * 100
choiceTotal = calculateChoiceTotal(choice.walletAddresses, 6)
return (choiceTotal / totalXTZ) * 100
}
return 0
}
Expand Down

0 comments on commit 5c03ac9

Please sign in to comment.