mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 00:54:20 +01:00
fetchinvoice: don't consider "msat" a change if fetchinvoice specified it.
We don't automatically *reject* an invoice which asks for a different msat than we specified (caller may!), but we don't bother noting it unless it is different. Reported-by: @shesek Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
0a0b2ce940
commit
57cc4e3c34
@@ -253,8 +253,11 @@ static struct command_result *handle_invreq_response(struct command *cmd,
|
||||
if ((badfield = field_diff(sent->invreq, inv, payer_info)))
|
||||
goto badinv;
|
||||
|
||||
/* Get the amount we expected. */
|
||||
if (sent->offer->amount && !sent->offer->currency) {
|
||||
/* Get the amount we expected: firstly, if that's what we sent,
|
||||
* secondly, if specified in the invoice. */
|
||||
if (sent->invreq->amount) {
|
||||
expected_amount = tal_dup(tmpctx, u64, sent->invreq->amount);
|
||||
} else if (sent->offer->amount && !sent->offer->currency) {
|
||||
expected_amount = tal(tmpctx, u64);
|
||||
|
||||
*expected_amount = *sent->offer->amount;
|
||||
|
||||
Reference in New Issue
Block a user