mirror of
https://github.com/tornadocash/tornado-pool-relayer
synced 2024-02-02 15:04:09 +01:00
revert
This commit is contained in:
parent
005951cf5f
commit
ded50dc62b
@ -48,6 +48,12 @@ export class TransactionProcessor extends BaseProcessor<Transaction> {
|
|||||||
await job.update(job.data);
|
await job.update(job.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OnQueueCompleted()
|
||||||
|
async onCompleted(job: Job) {
|
||||||
|
job.data.status = 'CONFIRMED';
|
||||||
|
await job.update(job.data);
|
||||||
|
}
|
||||||
|
|
||||||
@OnQueueFailed()
|
@OnQueueFailed()
|
||||||
async onFailed(job: Job) {
|
async onFailed(job: Job) {
|
||||||
job.data.status = 'FAILED';
|
job.data.status = 'FAILED';
|
||||||
@ -82,10 +88,6 @@ export class TransactionProcessor extends BaseProcessor<Transaction> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (BigNumber.from(receipt.status).eq(1)) {
|
if (BigNumber.from(receipt.status).eq(1)) {
|
||||||
job.data.status = 'CONFIRMED';
|
|
||||||
|
|
||||||
await job.update(job.data);
|
|
||||||
|
|
||||||
return receipt.transactionHash;
|
return receipt.transactionHash;
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Submitted transaction failed');
|
throw new Error('Submitted transaction failed');
|
||||||
|
Loading…
Reference in New Issue
Block a user