Skip to content

Commit

Permalink
fix(web): vote-stake-data
Browse files Browse the repository at this point in the history
  • Loading branch information
nhestrompia committed Aug 28, 2023
1 parent f6c2582 commit 3026e87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 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,8 @@ const stats: IStat[] = [
{
title: "Vote Stake",
coinId: 0,
getText: (data) => formatPNK(data?.minStake),
getSubtext: (data, coinPrice) => formatUSD(Number(formatUnitsWei(data?.minStake)) * (coinPrice ?? 0)),
getText: (data) => formatPNK(data?.alpha),
getSubtext: (data, coinPrice) => formatUSD(Number(formatUnitsWei(data?.alpha)) * (coinPrice ?? 0)),
color: "purple",
icon: VoteStake,
},
Expand Down
2 changes: 1 addition & 1 deletion web/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const isUndefined = (maybeObject: any): maybeObject is undefined => typeo

export const formatUnitsWei = (value: bigint) => formatUnits(value, 18);

export const formatPNK = (value: bigint, fractionDigits = 0) =>
export const formatPNK = (value: bigint, fractionDigits = 4) =>
commify(Number(formatUnitsWei(value)).toFixed(fractionDigits));

export const formatETH = (value: bigint, fractionDigits = 4) =>
Expand Down

0 comments on commit 3026e87

Please sign in to comment.