mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 22:44:29 +01:00
fix bad network throwing nullreferenceexception
This commit is contained in:
@@ -72,6 +72,10 @@ namespace BTCPayServer.Configuration
|
||||
if (network != null)
|
||||
{
|
||||
var n = Network.GetNetwork(network);
|
||||
if (n == null)
|
||||
{
|
||||
throw new ConfigException($"Invalid network parameter '{network}'");
|
||||
}
|
||||
return n.ToChainType();
|
||||
}
|
||||
var net = conf.GetOrDefault<bool>("regtest", false) ? ChainType.Regtest :
|
||||
|
||||
Reference in New Issue
Block a user