diff --git a/BTCPayServer.Tests/UnitTest1.cs b/BTCPayServer.Tests/UnitTest1.cs index a0f36f3f4..6951ce720 100644 --- a/BTCPayServer.Tests/UnitTest1.cs +++ b/BTCPayServer.Tests/UnitTest1.cs @@ -2639,7 +2639,7 @@ donation: } }); - Assert.Equal(1, invoice.SupportedTransactionCurrencies.Count); + Assert.Single(invoice.SupportedTransactionCurrencies); } } diff --git a/BTCPayServer/Hosting/ResourceBundleProvider.cs b/BTCPayServer/Hosting/ResourceBundleProvider.cs index 0d7875f1a..6f10cd214 100644 --- a/BTCPayServer/Hosting/ResourceBundleProvider.cs +++ b/BTCPayServer/Hosting/ResourceBundleProvider.cs @@ -28,8 +28,8 @@ namespace BTCPayServer.Hosting return JArray.Parse(content).OfType() .Select(jobj => new Bundle() { - Name = jobj.Property("name")?.Value.Value() ?? jobj.Property("outputFileName").Value.Value(), - OutputFileUrl = Path.Combine(hosting.ContentRootPath, jobj.Property("outputFileName").Value.Value()) + Name = jobj.Property("name", StringComparison.OrdinalIgnoreCase)?.Value.Value() ?? jobj.Property("outputFileName", StringComparison.OrdinalIgnoreCase).Value.Value(), + OutputFileUrl = Path.Combine(hosting.ContentRootPath, jobj.Property("outputFileName", StringComparison.OrdinalIgnoreCase).Value.Value()) }).ToDictionary(o => o.Name, o => o); } }, true); diff --git a/BTCPayServer/Services/HardwareWalletService.cs b/BTCPayServer/Services/HardwareWalletService.cs index dbdb1ec07..08d19dc26 100644 --- a/BTCPayServer/Services/HardwareWalletService.cs +++ b/BTCPayServer/Services/HardwareWalletService.cs @@ -118,7 +118,7 @@ namespace BTCPayServer.Services if (network.NBitcoinNetwork.NetworkType == NetworkType.Mainnet) throw new Exception($"The opened ledger app does not seems to support {network.NBitcoinNetwork.Name}."); } - var fingerprint = onlyChaincode ? new byte[4] : (await ledger.GetWalletPubKeyAsync(account.Parent, cancellation: cancellation)).UncompressedPublicKey.Compress().Hash.ToBytes().Take(4).ToArray(); + var fingerprint = onlyChaincode ? default : (await ledger.GetWalletPubKeyAsync(account.Parent, cancellation: cancellation)).UncompressedPublicKey.Compress().GetHDFingerPrint(); var extpubkey = new ExtPubKey(pubKey.UncompressedPublicKey.Compress(), pubKey.ChainCode, (byte)account.Indexes.Length, fingerprint, account.Indexes.Last()).GetWif(network.NBitcoinNetwork); return extpubkey; }