fixed some more bugs, moved dialog to an option

This commit is contained in:
janko33bd
2018-02-05 20:12:40 +01:00
parent 6e8ab87e81
commit e38ecb6e08
2 changed files with 13 additions and 14 deletions

View File

@@ -1197,9 +1197,17 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD
CWalletTx& txConflict = mapWallet[conflictHash];
NotifyTransactionChanged(this, conflictHash, CT_UPDATED); //Updates UI table
if (IsFromMe(txConflict) || IsMine(txConflict))
{
NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT); //Throws dialog
}
{
// external respend notify
std::string strCmd = GetArg("-respendnotify", "");
if (!strCmd.empty())
{
NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT); //Throws dialog
boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
boost::replace_all(strCmd, "%t", conflictHash.GetHex());
boost::thread t(runCommand, strCmd); // thread runs free
}
}
}
}
@@ -1212,15 +1220,6 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD
boost::thread t(runCommand, strCmd); // thread runs free
}
// external respend notify
std::string strCmdRespend = GetArg("-respendnotify", "");
if (!strCmdRespend.empty())
{
boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
boost::replace_all(strCmd, "%t", hash.GetHex());
boost::thread t(runCommand, strCmd); // thread runs free
}
}
return true;
}