From 7cbe45bebf95c5582598d053319c5a53f24a8bb7 Mon Sep 17 00:00:00 2001 From: amperstand Date: Wed, 31 Jan 2024 08:48:02 +0100 Subject: [PATCH] correct syntax for making sure that the amount of sats in the bolt11 invoice is equal to the amount of sats specified by the parameter. Tested and seems to work. https://github.com/ElementsProject/lightning/issues/7020 --- plugins/pay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pay.c b/plugins/pay.c index e45072a778fa..1f584d504866 100644 --- a/plugins/pay.c +++ b/plugins/pay.c @@ -1183,7 +1183,7 @@ static struct command_result *json_pay(struct command *cmd, return command_fail(cmd, PAY_INVOICE_EXPIRED, "Invoice expired"); if (invmsat) { - if (msat && *msat != *invmsat) { + if (msat && msat->millisatoshis != invmsat->millisatoshis) { return command_fail(cmd, JSONRPC2_INVALID_PARAMS, "msatoshi parameter must be None or equal to value decoded from invoice"); }