Skip to content

Commit

Permalink
fix: change vote stake formula
Browse files Browse the repository at this point in the history
  • Loading branch information
nhestrompia committed Sep 13, 2023
1 parent 4bbf258 commit 7e3dc94
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web/src/pages/Courts/CourtDetails/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ const stats: IStat[] = [
{
title: "Vote Stake",
coinId: 0,
getText: (data) => formatPNK(data?.alpha),
getSubtext: (data, coinPrice) => formatUSD(Number(formatUnitsWei(data?.alpha)) * (coinPrice ?? 0)),
getText: (data) => {
const stake = BigInt((data?.minStake * data?.alpha) / 1e4);
return formatPNK(stake);
},
getSubtext: (data, coinPrice) => {
const stake = BigInt((data?.minStake * data?.alpha) / 1e4);
return formatUSD(Number(formatUnitsWei(stake)) * (coinPrice ?? 0));
},
color: "purple",
icon: VoteStake,
},
Expand Down

0 comments on commit 7e3dc94

Please sign in to comment.