From 01d7b0157af6c573e87f558d8da2cafbab82e10e Mon Sep 17 00:00:00 2001 From: Ramiro Vazquez Date: Wed, 15 Apr 2020 17:25:26 -0300 Subject: [PATCH] change MKR participation decimals to 4 --- src/containers/Polls/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/containers/Polls/index.tsx b/src/containers/Polls/index.tsx index df15cd7..64fa4aa 100644 --- a/src/containers/Polls/index.tsx +++ b/src/containers/Polls/index.tsx @@ -56,6 +56,7 @@ function PollsInfo(props) { return totalMkr .times(100) .div(mkrSupply) + .dp(4) .toString() } @@ -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) }