Skip to content

Commit

Permalink
chore(db): save the tx if signature already processed
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Sep 17, 2024
1 parent 545d2fe commit e3e29a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/handler/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ export async function listenEvents(
ev.metaDataUri,
);
if (ev.id) lev.id = ev.id;
await em.persistAndFlush(ev);
await em.upsert(ev);
await em.flush();
}
return;
}
Expand Down Expand Up @@ -216,7 +217,8 @@ export async function listenEvents(
ev.metaDataUri,
);
if (ev.id) lev.id = ev.id;
await em.persistAndFlush(ev);
await em.upsert(ev);
await em.flush();
}
}

Expand Down

0 comments on commit e3e29a6

Please sign in to comment.