Prevent error dialog reentry

This commit is contained in:
adityapk00
2018-11-23 11:10:16 -08:00
parent ba080c1ce4
commit d71d08cd88
3 changed files with 15 additions and 9 deletions

View File

@@ -657,8 +657,15 @@ void Connection::doRPCIgnoreError(const json& payload, const std::function<void(
void Connection::showTxError(const QString& error) {
if (error.isNull()) return;
// Prevent multiple dialog boxes from showing, because they're all called async
static bool shown = false;
if (shown)
return;
shown = true;
QMessageBox::critical(main, "Transaction Error", "There was an error sending the transaction. The error was: \n\n"
+ error, QMessageBox::StandardButton::Ok);
shown = false;
}
/**