Skip to content

Instantly share code, notes, and snippets.

@corbifex
Created August 31, 2020 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corbifex/48e2bdb91b85475a273241b9ac7deef5 to your computer and use it in GitHub Desktop.
Save corbifex/48e2bdb91b85475a273241b9ac7deef5 to your computer and use it in GitHub Desktop.
vote weight no calculation
const voteWeightNo = votes
.filter(v => v.vote === 0)
.map(v => v.stake)
.reduce((accumulator, currentValue) => accumulator + currentValue);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment