|
@@ -392,10 +392,12 @@ export const getPost = async (api: ApiPromise, id: number): Promise<Post> =>
|
|
(await api.query.forum.postById(id)) as Post;
|
|
(await api.query.forum.postById(id)) as Post;
|
|
|
|
|
|
// proposals
|
|
// proposals
|
|
-export const getActiveProposals = async (api: ApiPromise): Promise<number[]> =>
|
|
|
|
|
|
+export const getActiveProposals = async (
|
|
|
|
+ api: ApiPromise
|
|
|
|
+): Promise<ProposalId[]> =>
|
|
api.query.proposalsEngine.activeProposalIds
|
|
api.query.proposalsEngine.activeProposalIds
|
|
.keys()
|
|
.keys()
|
|
- .then((ids) => ids.map(([key]) => key));
|
|
|
|
|
|
+ .then((ids) => ids.map(([key]) => key as unknown as ProposalId));
|
|
|
|
|
|
export const getProposalCount = async (
|
|
export const getProposalCount = async (
|
|
api: ApiPromise,
|
|
api: ApiPromise,
|