Allow creating top-up invoice when min/max payment amount criteria is active

closes #2831
This commit is contained in:
Umar Bolatov
2021-09-05 19:35:26 -07:00
committed by Andrew Camilleri
parent e584ebe7de
commit 522c990278

View File

@@ -375,7 +375,7 @@ namespace BTCPayServer.Controllers
} }
var criteria = storeBlob.PaymentMethodCriteria?.Find(methodCriteria => methodCriteria.PaymentMethod == supportedPaymentMethod.PaymentId); var criteria = storeBlob.PaymentMethodCriteria?.Find(methodCriteria => methodCriteria.PaymentMethod == supportedPaymentMethod.PaymentId);
if (criteria?.Value != null) if (criteria?.Value != null && entity.Type != InvoiceType.TopUp)
{ {
var currentRateToCrypto = var currentRateToCrypto =
await fetchingByCurrencyPair[new CurrencyPair(supportedPaymentMethod.PaymentId.CryptoCode, criteria.Value.Currency)]; await fetchingByCurrencyPair[new CurrencyPair(supportedPaymentMethod.PaymentId.CryptoCode, criteria.Value.Currency)];