@@ -11,7 +11,6 @@ import BalanceIcon from "svgs/icons/law-balance.svg";
11
11
import { KLEROS_CONTRACT_ADDRESS , WETH_CONTRACT_ADDRESS } from "src/consts/index" ;
12
12
import { commify } from "utils/commify" ;
13
13
import { isUndefined } from "utils/index" ;
14
- import { roundDecimals } from "utils/roundDecimals" ;
15
14
import { useHomePageContext , HomePageQuery , HomePageQueryDataPoints } from "hooks/useHomePageContext" ;
16
15
import { useCoinPrice } from "hooks/useCoinPrice" ;
17
16
@@ -40,7 +39,7 @@ const stats: IStat[] = [
40
39
{
41
40
title : "PNK staked" ,
42
41
coinId : 0 ,
43
- getText : ( counters ) => commify ( roundDecimals ( formatUnits ( getLastOrZero ( counters , "stakedPNK" ) , 18 ) , 0 ) ) ,
42
+ getText : ( counters ) => commify ( Number ( formatUnits ( getLastOrZero ( counters , "stakedPNK" ) , 18 ) ) . toFixed ( 0 ) ) ,
44
43
getSubtext : ( counters , coinPrice ) =>
45
44
( parseInt ( formatUnits ( getLastOrZero ( counters , "stakedPNK" ) , 18 ) ) * ( coinPrice ?? 0 ) ) . toFixed ( 2 ) . toString ( ) + "$" ,
46
45
color : "purple" ,
@@ -49,7 +48,7 @@ const stats: IStat[] = [
49
48
{
50
49
title : "ETH Paid to jurors" ,
51
50
coinId : 1 ,
52
- getText : ( counters ) => commify ( roundDecimals ( formatEther ( getLastOrZero ( counters , "paidETH" ) ) , 4 ) ) ,
51
+ getText : ( counters ) => commify ( Number ( formatEther ( getLastOrZero ( counters , "paidETH" ) ) ) . toFixed ( 4 ) ) ,
53
52
getSubtext : ( counters , coinPrice ) =>
54
53
( Number ( formatUnits ( getLastOrZero ( counters , "paidETH" ) , 18 ) ) * ( coinPrice ?? 0 ) ) . toFixed ( 2 ) . toString ( ) + "$" ,
55
54
color : "blue" ,
@@ -58,7 +57,7 @@ const stats: IStat[] = [
58
57
{
59
58
title : "PNK redistributed" ,
60
59
coinId : 0 ,
61
- getText : ( counters ) => commify ( roundDecimals ( formatUnits ( getLastOrZero ( counters , "redistributedPNK" ) , 18 ) , 0 ) ) ,
60
+ getText : ( counters ) => commify ( Number ( formatUnits ( getLastOrZero ( counters , "redistributedPNK" ) , 18 ) ) . toFixed ( 0 ) ) ,
62
61
getSubtext : ( counters , coinPrice ) =>
63
62
( parseInt ( formatUnits ( getLastOrZero ( counters , "redistributedPNK" ) , 18 ) ) * ( coinPrice ?? 0 ) )
64
63
. toFixed ( 2 )
0 commit comments