Make LNURL enabled when only method (#3930)

* Make LNURL enabled when only method

This fixes the scenario where LNURL for standard invoices are disabled, but the POS Print view only shows LNURL, so the QR code would always error out. The fix is to bypass the setting when lnurl is the only enabled payment method on the invoice

* Make sure not to affect other flows

* fix
This commit is contained in:
Andrew Camilleri
2022-07-06 15:09:05 +02:00
committed by GitHub
parent 3576ebd14f
commit 612a0397a7
10 changed files with 39 additions and 24 deletions

View File

@@ -474,8 +474,7 @@ namespace BTCPayServer
var isTopup = i.IsUnsetTopUp();
var lnurlSupportedPaymentMethod =
i.GetSupportedPaymentMethod<LNURLPaySupportedPaymentMethod>(pmi).FirstOrDefault();
if (lnurlSupportedPaymentMethod is null ||
(!isTopup && !lnurlSupportedPaymentMethod.EnableForStandardInvoices))
if (lnurlSupportedPaymentMethod is null)
{
return NotFound();
}