Revert "Remove unused variables" (#5667)

This reverts commit f070b22355.
This commit is contained in:
Nicolas Dorier
2024-01-18 00:05:50 +09:00
committed by GitHub
parent 3ae1f13323
commit 1d6d146fb2
39 changed files with 127 additions and 79 deletions

View File

@@ -504,7 +504,7 @@ namespace BTCPayServer.Controllers
var methodCriterion = model.PaymentMethodCriteria[index];
if (!string.IsNullOrWhiteSpace(methodCriterion.Value))
{
if (!CurrencyValue.TryParse(methodCriterion.Value, out _))
if (!CurrencyValue.TryParse(methodCriterion.Value, out var value))
{
model.AddModelError(viewModel => viewModel.PaymentMethodCriteria[index].Value,
$"{methodCriterion.PaymentMethod}: Invalid format. Make sure to enter a valid amount and currency code. Examples: '5 USD', '0.001 BTC'", this);
@@ -674,7 +674,7 @@ namespace BTCPayServer.Controllers
});
break;
case LNURLPayPaymentType:
case LNURLPayPaymentType lnurlPayPaymentType:
break;
case LightningPaymentType _:
@@ -1000,7 +1000,7 @@ namespace BTCPayServer.Controllers
var store = model.StoreId switch
{
null => CurrentStore,
_ => await _Repo.FindStore(storeId, userId)
string id => await _Repo.FindStore(storeId, userId)
};
if (store == null)
return Challenge(AuthenticationSchemes.Cookie);