File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,19 @@ export const Stats = ({ className, ...props }: HTMLProps<HTMLDivElement>) => {
47
47
OIS Rewards Distributed
48
48
</ div >
49
49
</ div >
50
+ < div className = "border-l border-neutral-600/50" />
51
+ < div className = "flex-1 sm:flex-none" >
52
+ { state . type === StateType . Loaded ? (
53
+ < Tokens className = "mb-1 text-xl font-semibold leading-none" >
54
+ { state . data . totalGovernance }
55
+ </ Tokens >
56
+ ) : (
57
+ < Loading />
58
+ ) }
59
+ < div className = "text-xs leading-none text-pythpurple-400" >
60
+ Pyth Governance Total Staked
61
+ </ div >
62
+ </ div >
50
63
</ div >
51
64
) ;
52
65
} ;
@@ -57,12 +70,14 @@ const Loading = () => (
57
70
58
71
const fetchStats = async ( connection : Connection ) => {
59
72
const client = new PythStakingClient ( { connection } ) ;
60
- const [ poolData , rewardCustodyAccount ] = await Promise . all ( [
73
+ const [ targetAccount , poolData , rewardCustodyAccount ] = await Promise . all ( [
74
+ client . getTargetAccount ( ) ,
61
75
client . getPoolDataAccount ( ) ,
62
76
client . getRewardCustodyAccount ( ) ,
63
77
] ) ;
64
78
65
79
return {
80
+ totalGovernance : targetAccount . locked + targetAccount . deltaLocked ,
66
81
totalStaked :
67
82
sumDelegations ( poolData . delState ) + sumDelegations ( poolData . selfDelState ) ,
68
83
rewardsDistributed :
You can’t perform that action at this time.
0 commit comments