Cater for new phragmenElection module (#3528)

This commit is contained in:
Jaco
2021-05-14 19:07:47 +03:00
committed by GitHub
parent 2fe1e5031e
commit cbc255b4e7
4 changed files with 14 additions and 6 deletions
+5 -1
View File
@@ -42,7 +42,11 @@ function sortAccounts ([, balanceA]: [AccountId, Balance], [, balanceB]: [Accoun
}
function queryElections (api: ApiInterfaceRx): Observable<DeriveElectionsInfo> {
const section = api.query.electionsPhragmen ? 'electionsPhragmen' : 'elections';
const section = api.query.phragmenElection
? 'phragmenElection'
: api.query.electionsPhragmen
? 'electionsPhragmen'
: 'elections';
return api.queryMulti<[Vec<AccountId>, Vec<Candidate>, Vec<Member>, Vec<Member>]>([
api.query.council.members,