Some lightning invoice refactoring
Docker / build-and-push-image (backend, backend, coracle/caravel-backend) (push) Failing after 0s
Docker / build-and-push-image (frontend, frontend, coracle/caravel-frontend) (push) Failing after 1s

This commit is contained in:
Jon Staab
2026-05-21 17:19:35 -07:00
parent a998c9b833
commit e7c0e6fdbe
4 changed files with 75 additions and 157 deletions
+2 -2
View File
@@ -57,13 +57,13 @@ pub async fn get_lightning_invoice(
return Err(bad_request("invoice-not-open", "invoice is not open"));
}
let bolt11 = api
let invoice = api
.billing
.ensure_lightning_invoice(&invoice.id, &tenant.pubkey, invoice.amount_due, &invoice.currency)
.await
.map_err(internal)?;
ok(serde_json::json!({ "bolt11": bolt11 }))
ok(serde_json::json!(invoice))
}
/// Fetch a Stripe invoice and the tenant that owns it, enforcing that the