Fix building error

This commit is contained in:
nicolas.dorier
2020-09-30 20:54:17 +09:00
parent a66578c46d
commit f28a898053
2 changed files with 6 additions and 3 deletions

View File

@@ -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()

View File

@@ -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)