File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/api-derive/src/staking Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ import { memo } from '../util/index.js';
1212export function nextElected ( instanceId : string , api : DeriveApi ) : ( ) => Observable < AccountId [ ] > {
1313 return memo ( instanceId , ( ) : Observable < AccountId [ ] > =>
1414 // Compatibility for future generation changes in staking.
15- api . query . staking . erasStakersPaged
15+ api . query . staking . erasStakersOverview
1616 ? api . derive . session . indexes ( ) . pipe (
1717 // only populate for next era in the last session, so track both here - entries are not
1818 // subscriptions, so we need a trigger - currentIndex acts as that trigger to refresh
19- switchMap ( ( { currentEra } ) => api . query . staking . erasStakersPaged . keys ( currentEra ) ) ,
19+ switchMap ( ( { currentEra } ) => api . query . staking . erasStakersOverview . keys ( currentEra ) ) ,
2020 // Dedupe any duplicates
2121 map ( ( keys ) => [ ...new Set ( keys . map ( ( { args : [ , accountId ] } ) => accountId . toString ( ) ) ) ] . map ( ( a ) => api . registry . createType ( 'AccountId' , a ) ) )
2222 )
You can’t perform that action at this time.
0 commit comments