From ded50dc62b66ed4f83225a3fbbc89c518249779a Mon Sep 17 00:00:00 2001 From: Danil Kovtonyuk Date: Fri, 1 Oct 2021 16:07:19 +1000 Subject: [PATCH] revert --- src/modules/queue/transaction.processor.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/queue/transaction.processor.ts b/src/modules/queue/transaction.processor.ts index 41baa6b..1d07f04 100644 --- a/src/modules/queue/transaction.processor.ts +++ b/src/modules/queue/transaction.processor.ts @@ -48,6 +48,12 @@ export class TransactionProcessor extends BaseProcessor { await job.update(job.data); } + @OnQueueCompleted() + async onCompleted(job: Job) { + job.data.status = 'CONFIRMED'; + await job.update(job.data); + } + @OnQueueFailed() async onFailed(job: Job) { job.data.status = 'FAILED'; @@ -82,10 +88,6 @@ export class TransactionProcessor extends BaseProcessor { }); if (BigNumber.from(receipt.status).eq(1)) { - job.data.status = 'CONFIRMED'; - - await job.update(job.data); - return receipt.transactionHash; } else { throw new Error('Submitted transaction failed');