lightningd: preapproveinvoice doesn't need to string lightning: prefix.

We already do this in param_invstring now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-10-25 07:38:30 +10:30
parent 95f20a3978
commit c490be62f0

View File

@ -1845,11 +1845,6 @@ static struct command_result *json_preapproveinvoice(struct command *cmd,
NULL))
return command_param_failed();
/* Strip optional URI preamble. */
if (strncmp(invstring, "lightning:", 10) == 0 ||
strncmp(invstring, "LIGHTNING:", 10) == 0)
invstring += 10;
msg = hsm_sync_req(tmpctx, cmd->ld,
take(towire_hsmd_preapprove_invoice(NULL, invstring)));
if (!fromwire_hsmd_preapprove_invoice_reply(msg, &approved))