Dotnet reformat

This commit is contained in:
nicolas.dorier
2023-04-10 11:07:03 +09:00
parent f598c70a4f
commit 7546ef7a8e
110 changed files with 518 additions and 486 deletions

View File

@@ -192,7 +192,7 @@ namespace BTCPayServer
case PayResult.Error:
default:
await _pullPaymentHostedService.Cancel(
new PullPaymentHostedService.CancelRequest(new []
new PullPaymentHostedService.CancelRequest(new[]
{ claimResponse.PayoutData.Id }, null));
return BadRequest(new LNUrlStatusResponse
@@ -305,7 +305,7 @@ namespace BTCPayServer
};
var invoiceMetadata = new InvoiceMetadata();
invoiceMetadata.OrderId =AppService.GetAppOrderId(app);
invoiceMetadata.OrderId = AppService.GetAppOrderId(app);
if (item != null)
{
invoiceMetadata.ItemCode = item.Id;
@@ -355,8 +355,8 @@ namespace BTCPayServer
public string InvoiceMetadata { get; set; }
}
public ConcurrentDictionary<string, LightningAddressItem> Items { get; } = new ();
public ConcurrentDictionary<string, string[]> StoreToItemMap { get; } = new ();
public ConcurrentDictionary<string, LightningAddressItem> Items { get; } = new();
public ConcurrentDictionary<string, string[]> StoreToItemMap { get; } = new();
public override string ToString()
{
@@ -466,7 +466,7 @@ namespace BTCPayServer
lnurlRequest ??= new LNURLPayRequest();
lnUrlMetadata ??= new Dictionary<string, string>();
if (lnUrlMetadata?.TryGetValue("text/identifier", out var lnAddress) is true && lnAddress is string)
if (lnUrlMetadata?.TryGetValue("text/identifier", out var lnAddress) is true && lnAddress is not null)
{
var pm = i.GetPaymentMethod(pmi);
var paymentMethodDetails = (LNURLPayPaymentMethodDetails)pm.GetPaymentMethodDetails();
@@ -642,7 +642,7 @@ namespace BTCPayServer
{
var expiry = i.ExpirationTime.ToUniversalTime() - DateTimeOffset.UtcNow;
var metadata = JsonConvert.SerializeObject(lnurlPayRequest.Metadata);
var description = (await _pluginHookService.ApplyFilter("modify-lnurlp-description", metadata)) as string;
var description = (await _pluginHookService.ApplyFilter("modify-lnurlp-description", metadata)) as string;
if (description is null)
return NotFound();
@@ -704,7 +704,7 @@ namespace BTCPayServer
Reason = "Invoice not in a valid payable state"
});
}
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie)]
[Authorize(Policy = Policies.CanModifyStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Cookie)]
[HttpGet("~/stores/{storeId}/plugins/lightning-address")]
@@ -759,11 +759,11 @@ namespace BTCPayServer
}
JObject metadata = null;
if (!string.IsNullOrEmpty(vm.Add.InvoiceMetadata) )
if (!string.IsNullOrEmpty(vm.Add.InvoiceMetadata))
{
try
{
metadata = JObject.Parse(vm.Add.InvoiceMetadata);
metadata = JObject.Parse(vm.Add.InvoiceMetadata);
}
catch (Exception e)
{