Fix several potential NullReferenceException (Fix #4017)

This commit is contained in:
nicolas.dorier
2022-08-04 12:07:59 +09:00
parent c71e671311
commit 40e39b82e8
7 changed files with 73 additions and 53 deletions

View File

@@ -1,3 +1,4 @@
#nullable enable
using System.Linq;
using BTCPayServer.Data;
@@ -5,7 +6,7 @@ namespace BTCPayServer
{
public static class StoreExtensions
{
public static DerivationSchemeSettings GetDerivationSchemeSettings(this StoreData store, BTCPayNetworkProvider networkProvider, string cryptoCode)
public static DerivationSchemeSettings? GetDerivationSchemeSettings(this StoreData store, BTCPayNetworkProvider networkProvider, string cryptoCode)
{
var paymentMethod = store
.GetSupportedPaymentMethods(networkProvider)