mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Make sure currency is in uppercase
This commit is contained in:
@@ -67,6 +67,7 @@ namespace BTCPayServer.Controllers
|
||||
{
|
||||
if (!store.HasClaim(Policies.CanCreateInvoice.Key))
|
||||
throw new UnauthorizedAccessException();
|
||||
invoice.Currency = invoice.Currency?.ToUpperInvariant() ?? "USD";
|
||||
InvoiceLogs logs = new InvoiceLogs();
|
||||
logs.Write("Creation of invoice starting");
|
||||
var entity = _InvoiceRepository.CreateNewInvoice();
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace BTCPayServer.Services.Rates
|
||||
AddCurrency(_CurrencyProviders, network.CryptoCode, 8, network.CryptoCode);
|
||||
}
|
||||
}
|
||||
return _CurrencyProviders.TryGet(currency);
|
||||
return _CurrencyProviders.TryGet(currency.ToUpperInvariant());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user