diff --git a/packages/api-derive/src/elections/info.ts b/packages/api-derive/src/elections/info.ts index a6e3837bf8..4db0aff33c 100644 --- a/packages/api-derive/src/elections/info.ts +++ b/packages/api-derive/src/elections/info.ts @@ -27,10 +27,10 @@ function deriveElections (api: ApiInterfaceRx, candidates: AccountId[], members: } function queryElections (api: ApiInterfaceRx): Observable { + const section = api.query.electionsPhragmen ? 'electionsPhragmen' : 'elections'; + // NOTE We have an issue where candidates can return `null` for an empty array, hence // we are not using multi queries here, so empty array is empty (instead of space-filled) - const section = api.query.electionPhragmen ? 'electionPhragmen' : 'elections'; - return combineLatest([ api.query[section].candidates>(), api.query[section].members>>(),