mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
bump libraries
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
|
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="78.0.3904.7000" />
|
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="78.0.3904.7000" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
|
|||||||
@@ -28,26 +28,26 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BTCPayServer.Hwi" Version="1.1.3" />
|
<PackageReference Include="BTCPayServer.Hwi" Version="1.1.3" />
|
||||||
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.1.7" />
|
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.1.7" />
|
||||||
<PackageReference Include="BuildBundlerMinifier" Version="3.1.430" />
|
<PackageReference Include="BuildBundlerMinifier" Version="3.2.435" />
|
||||||
<PackageReference Include="BundlerMinifier.Core" Version="3.1.430" />
|
<PackageReference Include="BundlerMinifier.Core" Version="3.2.435" />
|
||||||
<PackageReference Include="BundlerMinifier.TagHelpers" Version="3.1.430" />
|
<PackageReference Include="BundlerMinifier.TagHelpers" Version="3.2.435" />
|
||||||
<PackageReference Include="HtmlSanitizer" Version="4.0.217" />
|
<PackageReference Include="HtmlSanitizer" Version="4.0.217" />
|
||||||
<PackageReference Include="LedgerWallet" Version="2.0.0.5" />
|
<PackageReference Include="LedgerWallet" Version="2.0.0.5" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.2" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.2" />
|
||||||
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.6.2">
|
<PackageReference Include="Microsoft.NetCore.Analyzers" Version="2.9.8">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NBitpayClient" Version="1.0.0.34" />
|
<PackageReference Include="NBitpayClient" Version="1.0.0.35" />
|
||||||
<PackageReference Include="DBriize" Version="1.0.1.3" />
|
<PackageReference Include="DBriize" Version="1.0.1.3" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||||
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.2" />
|
<PackageReference Include="NicolasDorier.CommandLine" Version="1.0.0.2" />
|
||||||
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.3" />
|
<PackageReference Include="NicolasDorier.CommandLine.Configuration" Version="1.0.0.3" />
|
||||||
<PackageReference Include="NicolasDorier.RateLimits" Version="1.0.0.9" />
|
<PackageReference Include="NicolasDorier.RateLimits" Version="1.1.0" />
|
||||||
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="1.0.0.18" />
|
<PackageReference Include="NicolasDorier.StandardConfiguration" Version="1.0.0.18" />
|
||||||
<PackageReference Include="Serilog" Version="2.7.1" />
|
<PackageReference Include="Serilog" Version="2.9.0" />
|
||||||
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
|
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
|
||||||
<PackageReference Include="SSH.NET" Version="2016.1.0" />
|
<PackageReference Include="SSH.NET" Version="2016.1.0" />
|
||||||
<PackageReference Include="Text.Analyzers" Version="2.6.2">
|
<PackageReference Include="Text.Analyzers" Version="2.6.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
@@ -56,17 +56,17 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="TwentyTwenty.Storage" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage" Version="2.12.1" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Amazon" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage.Amazon" Version="2.12.1" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Azure" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage.Azure" Version="2.12.1" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Google" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage.Google" Version="2.12.1" />
|
||||||
<PackageReference Include="TwentyTwenty.Storage.Local" Version="2.11.2" />
|
<PackageReference Include="TwentyTwenty.Storage.Local" Version="2.12.1" />
|
||||||
<PackageReference Include="U2F.Core" Version="1.0.4" />
|
<PackageReference Include="U2F.Core" Version="1.0.4" />
|
||||||
<PackageReference Include="YamlDotNet" Version="5.2.1" />
|
<PackageReference Include="YamlDotNet" Version="5.2.1" />
|
||||||
<PackageReference Include="OpenIddict" Version="3.0.0-alpha1.20058.15" />
|
<PackageReference Include="OpenIddict" Version="3.0.0-alpha1.20058.15" />
|
||||||
<PackageReference Include="OpenIddict.Server.AspNetCore" Version="3.0.0-alpha1.20058.15"></PackageReference>
|
<PackageReference Include="OpenIddict.Server.AspNetCore" Version="3.0.0-alpha1.20058.15"></PackageReference>
|
||||||
<PackageReference Include="OpenIddict.Validation.AspNetCore" Version="3.0.0-alpha1.20058.15"></PackageReference>
|
<PackageReference Include="OpenIddict.Validation.AspNetCore" Version="3.0.0-alpha1.20058.15"></PackageReference>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.0.0" Condition="'$(Configuration)' == 'Debug'" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" Condition="'$(Configuration)' == 'Debug'" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0"></PackageReference>
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.0.0"></PackageReference>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.0.0" />
|
||||||
|
|||||||
@@ -374,7 +374,7 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
if (invoiceId != expectedId || webSocket.State != WebSocketState.Open)
|
if (invoiceId != expectedId || webSocket.State != WebSocketState.Open)
|
||||||
return;
|
return;
|
||||||
CancellationTokenSource cts = new CancellationTokenSource();
|
using CancellationTokenSource cts = new CancellationTokenSource();
|
||||||
cts.CancelAfter(5000);
|
cts.CancelAfter(5000);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -500,7 +500,7 @@ namespace BTCPayServer.Controllers
|
|||||||
public async Task<IActionResult> CreateInvoice()
|
public async Task<IActionResult> CreateInvoice()
|
||||||
{
|
{
|
||||||
var stores = new SelectList(await _StoreRepository.GetStoresByUserId(GetUserId()), nameof(StoreData.Id), nameof(StoreData.StoreName), null);
|
var stores = new SelectList(await _StoreRepository.GetStoresByUserId(GetUserId()), nameof(StoreData.Id), nameof(StoreData.StoreName), null);
|
||||||
if (stores.Count() == 0)
|
if (!stores.Any())
|
||||||
{
|
{
|
||||||
TempData[WellKnownTempData.ErrorMessage] = "You need to create at least one store before creating a transaction";
|
TempData[WellKnownTempData.ErrorMessage] = "You need to create at least one store before creating a transaction";
|
||||||
return RedirectToAction(nameof(UserStoresController.ListStores), "UserStores");
|
return RedirectToAction(nameof(UserStoresController.ListStores), "UserStores");
|
||||||
@@ -524,7 +524,7 @@ namespace BTCPayServer.Controllers
|
|||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (store.GetSupportedPaymentMethods(_NetworkProvider).Count() == 0)
|
if (!store.GetSupportedPaymentMethods(_NetworkProvider).Any())
|
||||||
{
|
{
|
||||||
ModelState.AddModelError(nameof(model.StoreId), "You need to configure the derivation scheme in order to create an invoice");
|
ModelState.AddModelError(nameof(model.StoreId), "You need to configure the derivation scheme in order to create an invoice");
|
||||||
return View(model);
|
return View(model);
|
||||||
@@ -624,7 +624,7 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
case JTokenType.Array:
|
case JTokenType.Array:
|
||||||
var items = item.Value.AsEnumerable().ToList();
|
var items = item.Value.AsEnumerable().ToList();
|
||||||
for (var i = 0; i < items.Count(); i++)
|
for (var i = 0; i < items.Count; i++)
|
||||||
{
|
{
|
||||||
result.Add($"{item.Key}[{i}]", ParsePosData(items[i].ToString()));
|
result.Add($"{item.Key}[{i}]", ParsePosData(items[i].ToString()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1121,9 +1121,11 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var client = model.Settings.CreateSmtpClient();
|
using (var client = model.Settings.CreateSmtpClient())
|
||||||
var message = model.Settings.CreateMailMessage(new MailAddress(model.TestEmail), "BTCPay test", "BTCPay test");
|
using (var message = model.Settings.CreateMailMessage(new MailAddress(model.TestEmail), "BTCPay test", "BTCPay test"))
|
||||||
await client.SendMailAsync(message);
|
{
|
||||||
|
await client.SendMailAsync(message);
|
||||||
|
}
|
||||||
TempData[WellKnownTempData.SuccessMessage] = "Email sent to " + model.TestEmail + ", please, verify you received it";
|
TempData[WellKnownTempData.SuccessMessage] = "Email sent to " + model.TestEmail + ", please, verify you received it";
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -117,7 +117,8 @@ namespace BTCPayServer.Controllers
|
|||||||
{
|
{
|
||||||
UTF8Encoding UTF8NOBOM = new UTF8Encoding(false);
|
UTF8Encoding UTF8NOBOM = new UTF8Encoding(false);
|
||||||
var bytes = UTF8NOBOM.GetBytes(JsonConvert.SerializeObject(result, network.NBXplorerNetwork.JsonSerializerSettings));
|
var bytes = UTF8NOBOM.GetBytes(JsonConvert.SerializeObject(result, network.NBXplorerNetwork.JsonSerializerSettings));
|
||||||
await webSocket.SendAsync(new ArraySegment<byte>(bytes), WebSocketMessageType.Text, true, new CancellationTokenSource(2000).Token);
|
using var cts = new CancellationTokenSource(2000);
|
||||||
|
await webSocket.SendAsync(new ArraySegment<byte>(bytes), WebSocketMessageType.Text, true, cts.Token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|||||||
@@ -750,7 +750,7 @@ namespace BTCPayServer.Controllers
|
|||||||
ViewBag.ShowMenu = false;
|
ViewBag.ShowMenu = false;
|
||||||
var stores = await _Repo.GetStoresByUserId(userId);
|
var stores = await _Repo.GetStoresByUserId(userId);
|
||||||
model.Stores = new SelectList(stores.Where(s => s.Role == StoreRoles.Owner), nameof(CurrentStore.Id), nameof(CurrentStore.StoreName));
|
model.Stores = new SelectList(stores.Where(s => s.Role == StoreRoles.Owner), nameof(CurrentStore.Id), nameof(CurrentStore.StoreName));
|
||||||
if (model.Stores.Count() == 0)
|
if (!model.Stores.Any())
|
||||||
{
|
{
|
||||||
TempData[WellKnownTempData.ErrorMessage] = "You need to be owner of at least one store before pairing";
|
TempData[WellKnownTempData.ErrorMessage] = "You need to be owner of at least one store before pairing";
|
||||||
return RedirectToAction(nameof(UserStoresController.ListStores), "UserStores");
|
return RedirectToAction(nameof(UserStoresController.ListStores), "UserStores");
|
||||||
@@ -827,9 +827,9 @@ namespace BTCPayServer.Controllers
|
|||||||
if (pairingResult == PairingResult.Complete || pairingResult == PairingResult.Partial)
|
if (pairingResult == PairingResult.Complete || pairingResult == PairingResult.Partial)
|
||||||
{
|
{
|
||||||
var excludeFilter = store.GetStoreBlob().GetExcludedPaymentMethods();
|
var excludeFilter = store.GetStoreBlob().GetExcludedPaymentMethods();
|
||||||
StoreNotConfigured = store.GetSupportedPaymentMethods(_NetworkProvider)
|
StoreNotConfigured = !store.GetSupportedPaymentMethods(_NetworkProvider)
|
||||||
.Where(p => !excludeFilter.Match(p.PaymentId))
|
.Where(p => !excludeFilter.Match(p.PaymentId))
|
||||||
.Count() == 0;
|
.Any();
|
||||||
TempData[WellKnownTempData.SuccessMessage] = "Pairing is successful";
|
TempData[WellKnownTempData.SuccessMessage] = "Pairing is successful";
|
||||||
if (pairingResult == PairingResult.Partial)
|
if (pairingResult == PairingResult.Partial)
|
||||||
TempData[WellKnownTempData.SuccessMessage] = "Server initiated pairing code: " + pairingCode;
|
TempData[WellKnownTempData.SuccessMessage] = "Server initiated pairing code: " + pairingCode;
|
||||||
|
|||||||
@@ -63,8 +63,8 @@ namespace BTCPayServer
|
|||||||
public async Task<T> WaitNext<T>(Func<T, bool> predicate, CancellationToken cancellation = default(CancellationToken))
|
public async Task<T> WaitNext<T>(Func<T, bool> predicate, CancellationToken cancellation = default(CancellationToken))
|
||||||
{
|
{
|
||||||
TaskCompletionSource<T> tcs = new TaskCompletionSource<T>();
|
TaskCompletionSource<T> tcs = new TaskCompletionSource<T>();
|
||||||
var subscription = Subscribe<T>((a, b) => { if (predicate(b)) { tcs.TrySetResult(b); a.Unsubscribe(); } });
|
using var subscription = Subscribe<T>((a, b) => { if (predicate(b)) { tcs.TrySetResult(b); a.Unsubscribe(); } });
|
||||||
using (cancellation.Register(() => { tcs.TrySetCanceled(); subscription.Unsubscribe(); }))
|
using (cancellation.Register(() => { tcs.TrySetCanceled(); }))
|
||||||
{
|
{
|
||||||
return await tcs.Task.ConfigureAwait(false);
|
return await tcs.Task.ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,9 +126,11 @@ namespace BTCPayServer
|
|||||||
{
|
{
|
||||||
if (webSocket.State == WebSocketState.Open)
|
if (webSocket.State == WebSocketState.Open)
|
||||||
{
|
{
|
||||||
CancellationTokenSource cts = new CancellationTokenSource();
|
using (CancellationTokenSource cts = new CancellationTokenSource())
|
||||||
cts.CancelAfter(5000);
|
{
|
||||||
await webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "Closing", cts.Token);
|
cts.CancelAfter(5000);
|
||||||
|
await webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "Closing", cts.Token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace BTCPayServer
|
|||||||
{
|
{
|
||||||
|
|
||||||
var file = Path.Combine(configuration.GetDataDir(), fileName);
|
var file = Path.Combine(configuration.GetDataDir(), fileName);
|
||||||
var rsa = new RSACryptoServiceProvider(2048);
|
using var rsa = new RSACryptoServiceProvider(2048);
|
||||||
if (File.Exists(file))
|
if (File.Exists(file))
|
||||||
{
|
{
|
||||||
rsa.FromXmlString2(File.ReadAllText(file));
|
rsa.FromXmlString2(File.ReadAllText(file));
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace BTCPayServer.HostedServices
|
|||||||
{
|
{
|
||||||
lock (_Processing)
|
lock (_Processing)
|
||||||
{
|
{
|
||||||
return _Processing.Count();
|
return _Processing.Count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,8 +118,6 @@ namespace BTCPayServer.HostedServices
|
|||||||
#pragma warning restore CS0618
|
#pragma warning restore CS0618
|
||||||
}
|
}
|
||||||
|
|
||||||
CancellationTokenSource cts = new CancellationTokenSource(10000);
|
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(invoice.NotificationEmail))
|
if (!String.IsNullOrEmpty(invoice.NotificationEmail))
|
||||||
{
|
{
|
||||||
var emailBody = NBitcoin.JsonConverters.Serializer.ToString(notification);
|
var emailBody = NBitcoin.JsonConverters.Serializer.ToString(notification);
|
||||||
|
|||||||
@@ -244,10 +244,10 @@ namespace BTCPayServer.Models
|
|||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty("paymentSubtotals")]
|
[JsonProperty("paymentSubtotals")]
|
||||||
public Dictionary<string, long> PaymentSubtotals { get; set; }
|
public Dictionary<string, decimal> PaymentSubtotals { get; set; }
|
||||||
|
|
||||||
[JsonProperty("paymentTotals")]
|
[JsonProperty("paymentTotals")]
|
||||||
public Dictionary<string, long> PaymentTotals { get; set; }
|
public Dictionary<string, decimal> PaymentTotals { get; set; }
|
||||||
|
|
||||||
[JsonProperty("amountPaid", DefaultValueHandling = DefaultValueHandling.Include)]
|
[JsonProperty("amountPaid", DefaultValueHandling = DefaultValueHandling.Include)]
|
||||||
public long AmountPaid { get; set; }
|
public long AmountPaid { get; set; }
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ namespace BTCPayServer.Payments.Changelly
|
|||||||
|
|
||||||
private async Task<ChangellyResponse<T>> PostToApi<T>(string message)
|
private async Task<ChangellyResponse<T>> PostToApi<T>(string message)
|
||||||
{
|
{
|
||||||
var hmac = new HMACSHA512(Encoding.UTF8.GetBytes(_apisecret));
|
using var hmac = new HMACSHA512(Encoding.UTF8.GetBytes(_apisecret));
|
||||||
var hashMessage = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
|
var hashMessage = hmac.ComputeHash(Encoding.UTF8.GetBytes(message));
|
||||||
var sign = ToHexString(hashMessage);
|
var sign = ToHexString(hashMessage);
|
||||||
|
|
||||||
var request = new HttpRequestMessage(HttpMethod.Post, "");
|
using var request = new HttpRequestMessage(HttpMethod.Post, "");
|
||||||
request.Headers.Add("sign", sign);
|
request.Headers.Add("sign", sign);
|
||||||
request.Content = new StringContent(message, Encoding.UTF8, "application/json");
|
request.Content = new StringContent(message, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace BTCPayServer
|
|||||||
IWebHost host = null;
|
IWebHost host = null;
|
||||||
var processor = new ConsoleLoggerProcessor();
|
var processor = new ConsoleLoggerProcessor();
|
||||||
CustomConsoleLogProvider loggerProvider = new CustomConsoleLogProvider(processor);
|
CustomConsoleLogProvider loggerProvider = new CustomConsoleLogProvider(processor);
|
||||||
var loggerFactory = new LoggerFactory();
|
using var loggerFactory = new LoggerFactory();
|
||||||
loggerFactory.AddProvider(loggerProvider);
|
loggerFactory.AddProvider(loggerProvider);
|
||||||
var logger = loggerFactory.CreateLogger("Configuration");
|
var logger = loggerFactory.CreateLogger("Configuration");
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ namespace BTCPayServer.Services.Apps
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(template))
|
if (string.IsNullOrWhiteSpace(template))
|
||||||
return Array.Empty<ViewPointOfSaleViewModel.Item>();
|
return Array.Empty<ViewPointOfSaleViewModel.Item>();
|
||||||
var input = new StringReader(template);
|
using var input = new StringReader(template);
|
||||||
YamlStream stream = new YamlStream();
|
YamlStream stream = new YamlStream();
|
||||||
stream.Load(input);
|
stream.Load(input);
|
||||||
var root = (YamlMappingNode)stream.Documents[0].RootNode;
|
var root = (YamlMappingNode)stream.Documents[0].RootNode;
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ namespace BTCPayServer.Services
|
|||||||
string errorMessage = null;
|
string errorMessage = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var result = await httpClient.SendAsync(CreateUpdateRequest());
|
using var request = CreateUpdateRequest();
|
||||||
|
var result = await httpClient.SendAsync(request);
|
||||||
if (!result.IsSuccessStatusCode)
|
if (!result.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -394,8 +394,8 @@ namespace BTCPayServer.Services.Invoices
|
|||||||
#pragma warning restore CS0618 // Type or member is obsolete
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
Currency = ProductInformation.Currency,
|
Currency = ProductInformation.Currency,
|
||||||
Flags = new Flags() { Refundable = Refundable },
|
Flags = new Flags() { Refundable = Refundable },
|
||||||
PaymentSubtotals = new Dictionary<string, long>(),
|
PaymentSubtotals = new Dictionary<string, decimal>(),
|
||||||
PaymentTotals = new Dictionary<string, long>(),
|
PaymentTotals = new Dictionary<string, decimal>(),
|
||||||
SupportedTransactionCurrencies = new Dictionary<string, InvoiceSupportedTransactionCurrency>(),
|
SupportedTransactionCurrencies = new Dictionary<string, InvoiceSupportedTransactionCurrency>(),
|
||||||
Addresses = new Dictionary<string, string>(),
|
Addresses = new Dictionary<string, string>(),
|
||||||
PaymentCodes = new Dictionary<string, InvoicePaymentUrls>(),
|
PaymentCodes = new Dictionary<string, InvoicePaymentUrls>(),
|
||||||
|
|||||||
@@ -52,10 +52,9 @@ namespace BTCPayServer.Services.Mails
|
|||||||
|
|
||||||
public bool IsComplete()
|
public bool IsComplete()
|
||||||
{
|
{
|
||||||
SmtpClient smtp = null;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
smtp = CreateSmtpClient();
|
using var smtp = CreateSmtpClient();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ namespace BTCPayServer.Services.Stores
|
|||||||
{
|
{
|
||||||
if (!ctx.Database.SupportDropForeignKey())
|
if (!ctx.Database.SupportDropForeignKey())
|
||||||
return;
|
return;
|
||||||
foreach (var store in await ctx.Stores.Where(s => s.UserStores.Where(u => u.Role == StoreRoles.Owner).Count() == 0).ToArrayAsync())
|
foreach (var store in await ctx.Stores.Where(s => !s.UserStores.Where(u => u.Role == StoreRoles.Owner).Any()).ToArrayAsync())
|
||||||
{
|
{
|
||||||
ctx.Stores.Remove(store);
|
ctx.Stores.Remove(store);
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ namespace BTCPayServer.Services.Stores
|
|||||||
{
|
{
|
||||||
if (ctx.Database.SupportDropForeignKey())
|
if (ctx.Database.SupportDropForeignKey())
|
||||||
{
|
{
|
||||||
if (await ctx.UserStore.Where(u => u.StoreDataId == storeId && u.Role == StoreRoles.Owner).CountAsync() == 0)
|
if (!await ctx.UserStore.Where(u => u.StoreDataId == storeId && u.Role == StoreRoles.Owner).AnyAsync())
|
||||||
{
|
{
|
||||||
var store = await ctx.Stores.FindAsync(storeId);
|
var store = await ctx.Stores.FindAsync(storeId);
|
||||||
if (store != null)
|
if (store != null)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
|
<TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">$(TargetFrameworkOverride)</TargetFramework>
|
||||||
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208</NoWarn>
|
<NoWarn>NU1701,CA1816,CA1308,CA1810,CA2208,CA1303,CA2000</NoWarn>
|
||||||
<LangVersion>8.0</LangVersion>
|
<LangVersion>8.0</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user