mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
fix error if invoice is requested without existing
This commit is contained in:
@@ -119,7 +119,8 @@ namespace BTCPayServer.Controllers
|
||||
private async Task<PaymentModel> GetInvoiceModel(string invoiceId, string cryptoCode)
|
||||
{
|
||||
var invoice = await _InvoiceRepository.GetInvoice(null, invoiceId);
|
||||
|
||||
if (invoice == null)
|
||||
return null;
|
||||
var store = await _StoreRepository.FindStore(invoice.StoreId);
|
||||
if (cryptoCode == null)
|
||||
cryptoCode = store.GetDefaultCrypto();
|
||||
|
||||
Reference in New Issue
Block a user