Explicitly check for regtest network
MODIFY
WalletWasabi.Gui/Config.cs
WalletWasabi.Gui/Config.cs
@@ -173,10 +173,14 @@ namespace WalletWasabi.Gui
{
_backendUri = new Uri(TestNetBackendUriV3);
}
- else // RegTest
+ else if (Network == Network.RegTest)
{
_backendUri = new Uri(RegTestBackendUriV3);
}
+ else
+ {
+ throw new NotSupportedException($"{nameof(Network)} not supported: {Network}.");
+ }
return _backendUri;
}
@@ -196,10 +200,14 @@ namespace WalletWasabi.Gui
{
_fallbackBackendUri = new Uri(TestNetFallbackBackendUri);
}
- else // RegTest
+ else if (Network == Network.RegTest)
{
_fallbackBackendUri = new Uri(RegTestBackendUriV3);
}
+ else
+ {
+ throw new NotSupportedException($"{nameof(Network)} not supported: {Network}.");
+ }
return _fallbackBackendUri;
}

MODIFY
WalletWasabi/Helpers/Constants.cs
WalletWasabi/Helpers/Constants.cs
@@ -68,10 +68,14 @@ namespace WalletWasabi.Helpers
{
return TestNetCoordinatorAddress;
}
- else // else regtest
+ else if (network == Network.RegTest)
{
return RegTestCoordinatorAddress;
}
+ else
+ {
+ throw new NotSupportedException($"{nameof(network)} not supported: {network}.");
+ }
}
public const string ChangeOfSpecialLabelStart = "change of (";

Explicitly check for regtest network