Skip to content

Commit

Permalink
invoice: pay an rgb invoice
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed May 20, 2024
1 parent a6f1031 commit ad19869
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ad19869

Please sign in to comment.