Hello there.
I’m trying to get events from the contract but after going through the documentation and implementing
Moralis.Cloud.beforeConsume(eventTableName, (event) => {
return event && event.confirmed;
});
Moralis.Cloud.afterSave("xxx", async function(request) {
const confirmed = request.object.get("confirmed");
if (confirmed) {
// do something
} else {
// handle unconfirmed case
}
});
I still see that I get duplicate events saved in the database sometimes event triple saved…
I don’t understand why it’s saving same event multiple times when I want only one event