* Adjust object index typings * CHANGELOG * Remove dot-notation overrides * Align overrides * Ordering * Revert lint formatting changes * Bump common
15 lines
406 B
TypeScript
15 lines
406 B
TypeScript
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { DeriveApi } from '../types.js';
|
|
|
|
export function getQueryInterface (api: DeriveApi): DeriveApi['query']['voterList'] {
|
|
return (
|
|
// latest substrate & polkadot
|
|
api.query.voterList ||
|
|
// previous substrate
|
|
api.query['voterBagsList'] ||
|
|
api.query['bagsList']
|
|
);
|
|
}
|