diff --git a/src/modules/api/api.controller.ts b/src/modules/api/api.controller.ts index 18a8f2e..f150383 100644 --- a/src/modules/api/api.controller.ts +++ b/src/modules/api/api.controller.ts @@ -26,7 +26,7 @@ export class ApiController { return res.status(HttpStatus.BAD_REQUEST).json({ error: "The job doesn't exist" }); } - return job; + return res.json(job); } @Post('/transaction') @@ -38,6 +38,8 @@ export class ApiController { return res.status(HttpStatus.BAD_REQUEST).json({ error: inputError }); } - return await this.service.transaction(JSON.parse(body)); + const jobId = await this.service.transaction(JSON.parse(body)); + + return res.send(jobId); } } diff --git a/src/modules/queue/transaction.processor.ts b/src/modules/queue/transaction.processor.ts index ea0e4ad..e553191 100644 --- a/src/modules/queue/transaction.processor.ts +++ b/src/modules/queue/transaction.processor.ts @@ -30,6 +30,7 @@ export type ArgsProof = { inputNullifiers: string[]; outputCommitments: BytesLike[]; outPathIndices: string; + publicAmount: string; extDataHash: string; }; @@ -134,7 +135,7 @@ export class TransactionProcessor extends BaseProcessor { data, gasLimit, to: contract.address, - gasPrice: fast.toString(), + gasPrice: toWei(fast.toString(), 'gwei'), value: BigNumber.from(0)._hex, }; }