diff --git a/packages/api-derive/src/elections/info.ts b/packages/api-derive/src/elections/info.ts index 4a1600fc30..50cd635cf7 100644 --- a/packages/api-derive/src/elections/info.ts +++ b/packages/api-derive/src/elections/info.ts @@ -67,8 +67,11 @@ function getModules (api: DeriveApi): [string, string | null] { : api.query.elections ? 'elections' : null; + // In some cases council here can refer to `generalCouncil` depending on what the chain specific override is. + // Therefore, we check to see if it exists in the query field. If it does not we default to `council`. + const resolvedCouncil = api.query[council] ? council : 'council'; - return [council, elections]; + return [resolvedCouncil, elections]; } function queryAll (api: DeriveApi, council: string, elections: string): Observable<[AccountId32[], Candidate[], Member[], Member[]]> {