mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
BIP21 + LNURL fix (#4616)
In case of the unified invoice, the LNURL wasn't correct — with this change we are simply reusing th one that was issued on invoice creation instead of generating it anew on the fly. Also fixes missing uppercasing for the QR code in case of non-unified QR. And removes the `lightning:` scheme from the LNURL that's displayed to the user (unifies it with what we do for Onchain and Lightning)
This commit is contained in:
@@ -655,7 +655,7 @@ namespace BTCPayServer.Controllers
|
||||
var enabledPaymentIds = store.GetEnabledPaymentIds(_NetworkProvider)
|
||||
.Where(pmId => storeBlob.CheckoutType == CheckoutType.V1 ||
|
||||
// Exclude LNURL for Checkout v2 + non-top up invoices
|
||||
(pmId.PaymentType is not LNURLPayPaymentType || invoice.IsUnsetTopUp()))
|
||||
pmId != lnurlId || invoice.IsUnsetTopUp())
|
||||
.ToArray();
|
||||
|
||||
// Exclude Lightning if OnChainWithLnInvoiceFallback is active and we have both payment methods
|
||||
@@ -805,7 +805,7 @@ namespace BTCPayServer.Controllers
|
||||
AvailableCryptos = invoice.GetPaymentMethods()
|
||||
.Where(i => i.Network != null && storeBlob.CheckoutType == CheckoutType.V1 ||
|
||||
// Exclude LNURL for Checkout v2 + non-top up invoices
|
||||
i.GetId().PaymentType is not LNURLPayPaymentType || invoice.IsUnsetTopUp())
|
||||
i.GetId() != lnurlId || invoice.IsUnsetTopUp())
|
||||
.Select(kv =>
|
||||
{
|
||||
var availableCryptoPaymentMethodId = kv.GetId();
|
||||
|
||||
Reference in New Issue
Block a user