Skip to content

Commit

Permalink
Merge pull request #74 from sotatek-dev/fix/crawler
Browse files Browse the repository at this point in the history
fix: duplicate event
  • Loading branch information
Sotatek-TanHoang authored Sep 24, 2024
2 parents e8273ab + c0cce56 commit a3cd22d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/crawler/crawler.evmbridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export class BlockchainEVMCrawler {
const isExist = await queryRunner.manager.findOneBy(EventLog, { txHashLock: event.transactionHash });
if (isExist) {
this.logger.warn('Duplicated event', event.transactionHash);
return;
}
const blockTimeOfBlockNumber = await this.ethBridgeContract.getBlockTimeByBlockNumber(event.blockNumber);
const eventUnlock = {
Expand Down
1 change: 1 addition & 0 deletions src/modules/crawler/crawler.minabridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export class SCBridgeMinaCrawler {
const isExist = await queryRunner.manager.findOneBy(EventLog, { txHashLock });
if (isExist) {
this.logger.warn('Duplicated event', txHashLock);
return;
}
const eventUnlock = {
senderAddress: JSON.parse(JSON.stringify(event.event.data.locker)),
Expand Down

0 comments on commit a3cd22d

Please sign in to comment.