Add payment hash to job creation response in stub mode

Include the `paymentHash` in the `evalInvoice` object when creating a job in stub mode via `POST /api/jobs` to ensure the frontend receives it correctly.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 418bf6f8-212b-4bb0-a7a5-8231a061da4e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 7c57683f-4afc-46df-83b9-8b259c160aea
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/9f85e954-647c-46a5-90a7-396e495a805a/418bf6f8-212b-4bb0-a7a5-8231a061da4e/Q83Uqvu
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
alexpaynex
2026-03-18 20:36:49 +00:00
parent feacdb7e45
commit e44d64ac44
2 changed files with 5 additions and 1 deletions

View File

@@ -215,7 +215,11 @@ router.post("/jobs", async (req: Request, res: Response) => {
res.status(201).json({
jobId,
evalInvoice: { paymentRequest: lnbitsInvoice.paymentRequest, amountSats: evalFee },
evalInvoice: {
paymentRequest: lnbitsInvoice.paymentRequest,
amountSats: evalFee,
...(lnbitsService.stubMode ? { paymentHash: lnbitsInvoice.paymentHash } : {}),
},
});
} catch (err) {
const message = err instanceof Error ? err.message : "Failed to create job";

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB