@@ -423,7 +423,7 @@ void SettingsConsoleWidget::clear(bool clearHistory)
423423 QString clsKey = " Ctrl-L" ;
424424#endif
425425
426- message (CMD_REPLY, (tr (" Welcome to the PIVX RPC console." ) + " <br>" +
426+ messageInternal (CMD_REPLY, (tr (" Welcome to the PIVX RPC console." ) + " <br>" +
427427 tr (" Use up and down arrows to navigate history, and %1 to clear screen." ).arg (" <b>" +clsKey+" </b>" ) + " <br>" +
428428 tr (" Type <b>help</b> for an overview of available commands." ) +
429429 " <br><span class=\" secwarning\" ><br>" +
@@ -432,7 +432,7 @@ void SettingsConsoleWidget::clear(bool clearHistory)
432432 true );
433433}
434434
435- void SettingsConsoleWidget::message (int category, const QString& message, bool html)
435+ void SettingsConsoleWidget::messageInternal (int category, const QString& message, bool html)
436436{
437437 QTime time = QTime::currentTime ();
438438 QString timeString = time.toString ();
@@ -454,7 +454,13 @@ void SettingsConsoleWidget::on_lineEdit_returnPressed()
454454 ui->lineEdit ->clear ();
455455
456456 if (!cmd.isEmpty ()) {
457- message (CMD_REQUEST, cmd);
457+
458+ if ((cmd == " dumpwallet" || cmd == " dumpprivkey" ) &&
459+ !ask (" DANGER!" , " Your coins will be STOLEN if you give\n the info to anyone!\n\n Are you sure?\n " )) {
460+ return ;
461+ }
462+
463+ messageInternal (CMD_REQUEST, cmd);
458464 Q_EMIT cmdCommandRequest (cmd);
459465 // Remove command, if already in history
460466 history.removeOne (cmd);
@@ -491,7 +497,7 @@ void SettingsConsoleWidget::startExecutor()
491497 executor->moveToThread (thread);
492498
493499 // Replies from executor object must go to this object
494- connect (executor, &RPCExecutor::reply, this , static_cast < void (SettingsConsoleWidget::*)( int , const QString&)>(& SettingsConsoleWidget::message) );
500+ connect (executor, &RPCExecutor::reply, this , & SettingsConsoleWidget::response );
495501 // Requests from this object must go to executor
496502 connect (this , &SettingsConsoleWidget::cmdCommandRequest, executor, &RPCExecutor::requestCommand);
497503
0 commit comments