Skip to content

Commit

Permalink
correct syntax for making sure that the amount of sats in the bolt11 …
Browse files Browse the repository at this point in the history
…invoice is equal to the amount of sats specified by the parameter.

Tested and seems to work.
ElementsProject#7020
  • Loading branch information
amperstand committed Jan 31, 2024
1 parent 91d953e commit 7cbe45b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/pay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 7cbe45b

Please sign in to comment.