Skip to content

Commit 88cb3ca

Browse files
authored
Merge pull request #1200 from kleros/fix(web)/vote-stake-data
fix(web): vote-stake-data
2 parents f946f6e + f7f1dec commit 88cb3ca

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

web/src/pages/Courts/CourtDetails/Stats.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ const stats: IStat[] = [
4545
{
4646
title: "Vote Stake",
4747
coinId: 0,
48-
getText: (data) => formatPNK(data?.minStake),
49-
getSubtext: (data, coinPrice) => formatUSD(Number(formatUnitsWei(data?.minStake)) * (coinPrice ?? 0)),
48+
getText: (data) => {
49+
const stake = BigInt((data?.minStake * data?.alpha) / 1e4);
50+
return formatPNK(stake);
51+
},
52+
getSubtext: (data, coinPrice) => {
53+
const stake = BigInt((data?.minStake * data?.alpha) / 1e4);
54+
return formatUSD(Number(formatUnitsWei(stake)) * (coinPrice ?? 0));
55+
},
5056
color: "purple",
5157
icon: VoteStake,
5258
},

0 commit comments

Comments
 (0)