diff --git a/BTCPayServer/Data/StoreDataExtensions.cs b/BTCPayServer/Data/StoreDataExtensions.cs index 34fc21997..a4272537c 100644 --- a/BTCPayServer/Data/StoreDataExtensions.cs +++ b/BTCPayServer/Data/StoreDataExtensions.cs @@ -57,7 +57,9 @@ namespace BTCPayServer.Data return storeData.GetEnabledPaymentIds(networkProvider).Select(paymentMethodId=> { var matchedFromBlob = +#pragma warning disable CS0618 // Type or member is obsolete storeBlob.PaymentMethodCriteria?.SingleOrDefault(criteria => criteria.PaymentMethod == paymentMethodId && criteria.Value != null); +#pragma warning restore CS0618 // Type or member is obsolete if (matchedFromBlob is null && paymentMethodId.PaymentType == LightningPaymentType.Instance && storeBlob.LightningMaxValue != null) { return new PaymentMethodCriteria() diff --git a/BTCPayServer/Payments/Lightning/LightningListener.cs b/BTCPayServer/Payments/Lightning/LightningListener.cs index 542559dd0..7fd40e53e 100644 --- a/BTCPayServer/Payments/Lightning/LightningListener.cs +++ b/BTCPayServer/Payments/Lightning/LightningListener.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Threading; using System.Threading.Channels; using System.Threading.Tasks; +using AngleSharp.Dom.Events; using BTCPayServer.Client.Models; using BTCPayServer.Data; using BTCPayServer.Events; @@ -177,7 +178,7 @@ namespace BTCPayServer.Payments.Lightning if (_InstanceListeners.TryGetValue(instanceListenerKey, out var instanceListener)) { - await _InvoiceRepository.NewAddress(invoice.Id, newPaymentMethodDetails, + await _InvoiceRepository.NewPaymentDetails(invoice.Id, newPaymentMethodDetails, paymentMethod.Network); instanceListener.AddListenedInvoice(new ListenedInvoice() @@ -191,8 +192,8 @@ namespace BTCPayServer.Payments.Lightning InvoiceId = invoice.Id }); - _Aggregator.Publish(new InvoiceNewAddressEvent(invoice.Id, - newPaymentMethodDetails.GetPaymentDestination(), paymentMethod.Network)); + _Aggregator.Publish(new Events.InvoiceNewPaymentDetailsEvent(invoice.Id, + newPaymentMethodDetails, paymentMethod.GetId())); } } catch (Exception e)