Skip to content

Commit

Permalink
change MKR participation decimals to 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ramirotw committed Apr 15, 2020
1 parent e908d6e commit 01d7b01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/containers/Polls/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function PollsInfo(props) {
return totalMkr
.times(100)
.div(mkrSupply)
.dp(4)
.toString()
}

Expand Down Expand Up @@ -86,7 +87,8 @@ function PollsInfo(props) {
Promise.all(
polls.map((poll: any) => {
if (poll.plurality && poll.participation) {
return Promise.resolve(poll)
const participation = new BigNumber(poll.participation)
return Promise.resolve({ ...poll, participation: participation.dp(4).toString() })
}
return getPollData(poll, pollsBalances).then(data => {
return { ...poll, plurality: setPlurality(data), participation: getParticipation(data, mkrSupply) }
Expand Down

0 comments on commit 01d7b01

Please sign in to comment.