mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-03 17:36:59 +01:00
fix error if invoice is requested without existing
This commit is contained in:
parent
cb4468d3b3
commit
bafdcb04ed
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue