renepay: refuse to pay BOLT12 invoice

We have not yet worked on supporting BOLT12 invoices,
we better refuse to pay them until we do.
This commit is contained in:
Lagrang3 2024-03-07 08:33:36 +01:00 committed by Christian Decker
parent 65efa2ab18
commit b51acf6a31

View file

@ -932,6 +932,11 @@ static struct command_result *json_pay(struct command *cmd,
routes = cast_const2(const struct route_info **,
b11->routes);
} else {
/* FIXME We have not yet added support for BOLT12 invoices,
* refuse to pay. */
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
"BOLT12 invoices are not yet supported.");
// TODO(eduardo): check this, compare with `pay`
const struct tlv_invoice *b12;
char *fail;