|
@@ -488,12 +488,12 @@ const formatProposalMessage = (
|
|
|
export const getProposalVotes = async (
|
|
|
api: ApiPromise,
|
|
|
id: ProposalId | number
|
|
|
-): Promise<{ memberId: number; vote: string }[]> => {
|
|
|
- let votes: { memberId: number; vote: string }[] = [];
|
|
|
+): Promise<{ memberId: MemberId; vote: string }[]> => {
|
|
|
+ let votes: { memberId: MemberId; vote: string }[] = [];
|
|
|
const entries =
|
|
|
await api.query.proposalsEngine.voteExistsByProposalByVoter.entries(id);
|
|
|
entries.forEach((entry: any) => {
|
|
|
- const memberId = entry[0].args[1].toJSON();
|
|
|
+ const memberId = entry[0].args[1] as MemberId;
|
|
|
const vote = entry[1].toString();
|
|
|
votes.push({ memberId, vote });
|
|
|
});
|