Resolve correct module for council derive (#5851)
* Resolve correct module for council derive * remove console
This commit is contained in:
@@ -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[]]> {
|
||||
|
||||
Reference in New Issue
Block a user