From 522c990278664cadb05bde16a7f53b6a402a43c9 Mon Sep 17 00:00:00 2001 From: Umar Bolatov Date: Sun, 5 Sep 2021 19:35:26 -0700 Subject: [PATCH] Allow creating top-up invoice when min/max payment amount criteria is active closes #2831 --- BTCPayServer/Controllers/InvoiceController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Controllers/InvoiceController.cs b/BTCPayServer/Controllers/InvoiceController.cs index 87e0d31fc..fcdd1ea93 100644 --- a/BTCPayServer/Controllers/InvoiceController.cs +++ b/BTCPayServer/Controllers/InvoiceController.cs @@ -375,7 +375,7 @@ namespace BTCPayServer.Controllers } var criteria = storeBlob.PaymentMethodCriteria?.Find(methodCriteria => methodCriteria.PaymentMethod == supportedPaymentMethod.PaymentId); - if (criteria?.Value != null) + if (criteria?.Value != null && entity.Type != InvoiceType.TopUp) { var currentRateToCrypto = await fetchingByCurrencyPair[new CurrencyPair(supportedPaymentMethod.PaymentId.CryptoCode, criteria.Value.Currency)];