| 450 | } |
| 451 | |
| 452 | static void json_populate_invreq(struct json_stream *response, |
| 453 | const struct sha256 *invreq_id, |
| 454 | const char *b12, |
| 455 | const struct json_escape *label, |
| 456 | enum offer_status status) |
| 457 | { |
| 458 | json_add_sha256(response, "invreq_id", invreq_id); |
| 459 | json_add_bool(response, "active", offer_status_active(status)); |
| 460 | json_add_bool(response, "single_use", offer_status_single(status)); |
| 461 | json_add_string(response, "bolt12", b12); |
| 462 | json_add_bool(response, "used", offer_status_used(status)); |
| 463 | if (label) |
| 464 | json_add_escaped_string(response, "label", label); |
| 465 | } |
| 466 | |
| 467 | static struct command_result *json_createinvoicerequest(struct command *cmd, |
| 468 | const char *buffer, |
no test coverage detected