Skip to content

Commit

Permalink
feat: wait for C1 and errors (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
aashutoshrathi authored Jul 1, 2024
1 parent aaadee1 commit a65856a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ const main = async () => {
inputs,
});
const ack = await mru.submitAction(reducerName, signedAction);
// const { errors } = await ack.waitFor(ActionConfirmationStatus.C1);
// if (errors?.length) {
// throw new Error(errors[0].message);
// }
const { errors } = await ack.waitFor(ActionConfirmationStatus.C1);
if (errors?.length) {
throw new Error(errors[0].message);
}
res.status(201).send({ ack });
} catch (e: any) {
res.status(400).send({ error: e.message });
Expand Down

0 comments on commit a65856a

Please sign in to comment.