This repository was archived by the owner on Mar 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +166
-164
lines changed
packages/common/src/scorekeeper Expand file tree Collapse file tree 3 files changed +166
-164
lines changed Original file line number Diff line number Diff line change 104104 "@bull-board/koa" : " ^5.15.0" ,
105105 "@koa/router" : " ^12.0.1" ,
106106 "@octokit/rest" : " ^20.0.2" ,
107- "@polkadot/api" : " ^10.12 .2" ,
107+ "@polkadot/api" : " ^11.0 .2" ,
108108 "@polkadot/keyring" : " ^12.6.2" ,
109109 "@types/cron" : " ^2.4.0" ,
110110 "@types/jest" : " ^29.5.12" ,
Original file line number Diff line number Diff line change @@ -65,15 +65,17 @@ export const autoNumNominations = async (
6565 ) ;
6666
6767 // Query the staking info of the validator set
68- const query = await api ?. derive . staking . electedInfo ( ) ;
69- const { info } = query ;
68+ const { info } = await api ?. derive . staking . electedInfo ( {
69+ withExposureMeta : true ,
70+ } ) ;
7071
7172 const totalStakeAmounts = [ ] ;
7273
7374 // add formatted totals to list
7475 for ( const validator of info ) {
75- const { exposure } = validator ;
76- const { total, own, others } = exposure ;
76+ const { exposureMeta } = validator ;
77+ if ( ! exposureMeta ?. isSome ) continue ;
78+ const { total } = exposureMeta . value ;
7779
7880 const totalValue = total . unwrap ( ) ;
7981
You can’t perform that action at this time.
0 commit comments