Merge #693: Qt fixes post 18

0fef2be3c Fix QT transaction blinding details being committed to wallet (Gregory Sanders)
172ad7198 Fix QT startup for custom chains (Gregory Sanders)

Pull request description:

  resolves https://github.com/ElementsProject/elements/issues/692

Tree-SHA512: bc18ada2350df95ebcd96fbc64be4085ca4f85e272ed89a3052d91bb02d48f6fc3c9cd0451db9741b14f4c416574d7f9db44cdc7a1502026a48729820ffb6aee
This commit is contained in:
Gregory Sanders 2019-09-03 10:08:50 -04:00
commit 66c5045d5a
No known key found for this signature in database
GPG key ID: F3F68E2D86A48FDB
2 changed files with 3 additions and 3 deletions

View file

@ -276,7 +276,7 @@ public:
}
}
if (!m_wallet->CreateTransaction(*locked_chain, recipients, pending->m_tx, pending->m_keys, fee, change_pos,
fail_reason, coin_control, sign)) {
fail_reason, coin_control, sign, gArgs.GetBoolArg("-blindedaddresses", g_con_elementsmode) ? &pending->m_blind_details : nullptr)) {
return {};
}
out_amounts = pending->m_blind_details.o_amounts;

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;
}