From ad198699a86a7d470a1d1b36100da9931901b499 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Mon, 13 May 2024 21:01:09 +0200 Subject: [PATCH] invoice: pay an rgb invoice Signed-off-by: Vincenzo Palazzo --- plugins/pay.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/pay.c b/plugins/pay.c index 595d9fffd814..f164eafaf0bc 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -1073,6 +1073,8 @@ static struct command_result *json_pay(struct command *cmd, /* FIXME: parameter should be invstring now */ p_req("bolt11", param_invstring, &b11str), p_opt("amount_msat", param_msat, &msat), + // FIXME(vincenzopalazzo): adds the rgb_amount value that + // can be (maybe) optional inside the invoice. p_opt("label", param_string, &label), p_opt_def("riskfactor", param_millionths, &riskfactor_millionths, 10000000), @@ -1130,6 +1132,7 @@ static struct command_result *json_pay(struct command *cmd, "Invalid bolt11:" " sets feature var_onion with no secret"); } else { + // FIXME(vincenzopalazzo): fails if it is an bolt12 offer. b12 = invoice_decode(tmpctx, b11str, strlen(b11str), plugin_feature_set(cmd->plugin), chainparams, &b12_fail);