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

@@ -86,8 +86,7 @@ namespace BTCPayServer.Controllers
// we just assume that it is 20 blocks
var assumedFeeRate = await fr.GetFeeRateAsync(20);
var settings = (this.GetCurrentStore().GetDerivationSchemeSettings(NetworkProvider, network.CryptoCode));
var derivationScheme = settings.AccountDerivation;
var derivationScheme = (this.GetCurrentStore().GetDerivationSchemeSettings(NetworkProvider, network.CryptoCode))?.AccountDerivation;
if (derivationScheme is null)
return NotFound();