Fix QT startup for custom chains

This commit is contained in:
Gregory Sanders 2019-08-22 15:25:00 -04:00 committed by Steven Roose
parent 1cd81acdd7
commit 523a7e9d6c
No known key found for this signature in database
GPG key ID: 2F2A88D7F8D68E87

View file

@ -83,7 +83,8 @@ const NetworkStyle* NetworkStyle::instantiate(const std::string& networkId)
std::string titleAddText = networkId == "liquidv1" ? "" : strprintf("[%s]", networkId);
for (unsigned x=0; x<network_styles_count; ++x)
{
if (networkId == network_styles[x].networkId)
// If it doesn't match any, use regtest since it's a custom chain
if (networkId == network_styles[x].networkId || x == network_styles_count - 1)
{
return new NetworkStyle(
network_styles[x].appName,
@ -92,5 +93,4 @@ const NetworkStyle* NetworkStyle::instantiate(const std::string& networkId)
titleAddText.c_str());
}
}
return nullptr;
}