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:
@@ -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";
|
||||
|
||||
BIN
attached_assets/IMG_0027_1773866089965.jpeg
Normal file
BIN
attached_assets/IMG_0027_1773866089965.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
Reference in New Issue
Block a user