Browse Source

fix getActiveProposals

Joystream Stats 2 years ago
parent
commit
5a7c37b8d2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api.ts

+ 1 - 1
api.ts

@@ -394,7 +394,7 @@ export const getActiveProposals = async (
 ): Promise<ProposalId[]> =>
 ): Promise<ProposalId[]> =>
   api.query.proposalsEngine.activeProposalIds
   api.query.proposalsEngine.activeProposalIds
     .keys()
     .keys()
-    .then((ids) => ids.map(([key]) => key as unknown as ProposalId));
+    .then((keys) => keys.map(({ args: [id] }) => id as ProposalId));
 
 
 export const getProposalCount = async (
 export const getProposalCount = async (
   api: ApiPromise,
   api: ApiPromise,