fix null instance on invoice when using paymentCurrencies (#1766)

fixes #1765
This commit is contained in:
Andrew Camilleri
2020-07-24 08:16:41 +02:00
committed by GitHub
parent df413d1af0
commit 310f6a385c

View File

@@ -138,6 +138,8 @@ namespace BTCPayServer.Controllers
if (invoice.PaymentCurrencies?.Any() is true)
{
invoice.SupportedTransactionCurrencies ??=
new Dictionary<string, InvoiceSupportedTransactionCurrency>();
foreach (string paymentCurrency in invoice.PaymentCurrencies)
{
invoice.SupportedTransactionCurrencies.TryAdd(paymentCurrency,