Now, we need to check the previous invoice was paid, and maybe get timebase */
| 400 | |
| 401 | /* Now, we need to check the previous invoice was paid, and maybe get timebase */ |
| 402 | static struct command_result *check_previous_invoice(struct command *cmd, |
| 403 | struct invreq *ir) |
| 404 | { |
| 405 | struct out_req *req; |
| 406 | |
| 407 | /* No previous? Just pass through */ |
| 408 | if (*ir->invreq->recurrence_counter == 0) |
| 409 | return check_period(cmd, ir, *ir->inv->created_at); |
| 410 | |
| 411 | req = jsonrpc_request_start(cmd->plugin, cmd, |
| 412 | "listinvoices", |
| 413 | prev_invoice_done, |
| 414 | error, |
| 415 | ir); |
| 416 | json_add_label(req->js, |
| 417 | ir->invreq->offer_id, |
| 418 | ir->invreq->payer_key, |
| 419 | *ir->invreq->recurrence_counter - 1); |
| 420 | return send_outreq(cmd->plugin, req); |
| 421 | } |
| 422 | |
| 423 | /* BOLT-offers #12: |
| 424 | * - MUST fail the request if `signature` is not correct. |
no test coverage detected