mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Can inject currency data in CurrencyNameTable (#6276)
This commit is contained in:
@@ -368,7 +368,12 @@ public partial class UIStoresController
|
||||
var existingCriteria = blob.PaymentMethodCriteria.FirstOrDefault(c => c.PaymentMethod == paymentMethodId);
|
||||
if (existingCriteria != null)
|
||||
blob.PaymentMethodCriteria.Remove(existingCriteria);
|
||||
CurrencyValue.TryParse(newCriteria.Value, out var cv);
|
||||
if (CurrencyValue.TryParse(newCriteria.Value, out var cv))
|
||||
{
|
||||
var currencyData = _currencyNameTable.GetCurrencyData(cv.Currency, false);
|
||||
if (currencyData is not null)
|
||||
cv = cv.Round(currencyData.Divisibility);
|
||||
}
|
||||
blob.PaymentMethodCriteria.Add(new PaymentMethodCriteria()
|
||||
{
|
||||
Above = newCriteria.Type == PaymentMethodCriteriaViewModel.CriteriaType.GreaterThan,
|
||||
|
||||
Reference in New Issue
Block a user