Skip to content

Commit

Permalink
fix: await sends
Browse files Browse the repository at this point in the history
  • Loading branch information
iFergal committed Aug 27, 2024
1 parent 000fd57 commit ff4c0ad
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/keri/app/exchanging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,20 @@ export class Exchanges {
embeds: Dict<any>,
recipients: string[]
): Promise<any[]> {
return recipients.map(async (recipient) => {
const responses: any[] = [];
for (const recipient of recipients) {
const [exn, sigs, atc] = await this.createExchangeMessage(
sender,
route,
payload,
embeds,
recipient
);
return this.sendFromEvents(name, topic, exn, sigs, atc, [
responses.push(await this.sendFromEvents(name, topic, exn, sigs, atc, [
recipient,
]);
});
]));
};
return responses;
}

/**
Expand Down

0 comments on commit ff4c0ad

Please sign in to comment.