@@ -206,21 +206,22 @@ bool MasterNodeWizardDialog::createMN(){
206206
207207 prepareStatus = walletModel->prepareTransaction (currentTransaction);
208208
209+ QString returnMsg = " Unknown error" ;
209210 // process prepareStatus and on error generate message shown to user
210- processSendCoinsReturn (prepareStatus,
211+ returnMsg = processSendCoinsReturn (prepareStatus,
211212 BitcoinUnits::formatWithUnit (walletModel->getOptionsModel ()->getDisplayUnit (),
212213 currentTransaction.getTransactionFee ()),
213214 true
214215 );
215216
216217 if (prepareStatus.status != WalletModel::OK) {
217- returnStr = tr (" Prepare master node failed.. " );
218+ returnStr = tr (" Prepare master node failed.\n\n %1 \n " ). arg (returnMsg );
218219 return false ;
219220 }
220221
221222 WalletModel::SendCoinsReturn sendStatus = walletModel->sendCoins (currentTransaction);
222223 // process sendStatus and on error generate message shown to user
223- processSendCoinsReturn (sendStatus);
224+ returnMsg = processSendCoinsReturn (sendStatus);
224225
225226 if (sendStatus.status == WalletModel::OK) {
226227 // now change the conf
@@ -286,7 +287,7 @@ bool MasterNodeWizardDialog::createMN(){
286287 }
287288 }
288289 if (indexOut == -1 ) {
289- returnStr = tr (" Invalid collaterall output index" );
290+ returnStr = tr (" Invalid collateral output index" );
290291 return false ;
291292 }
292293 std::string indexOutStr = std::to_string (indexOut);
@@ -323,6 +324,8 @@ bool MasterNodeWizardDialog::createMN(){
323324 } else {
324325 returnStr = tr (" masternode.conf file doesn't exists" );
325326 }
327+ } else {
328+ returnStr = tr (" Cannot send collateral transaction.\n\n %1" ).arg (returnMsg);
326329 }
327330 }
328331 return false ;
@@ -359,7 +362,7 @@ void MasterNodeWizardDialog::onBackClicked(){
359362 }
360363}
361364
362- void MasterNodeWizardDialog::processSendCoinsReturn (const WalletModel::SendCoinsReturn& sendCoinsReturn, const QString& msgArg, bool fPrepare )
365+ QString MasterNodeWizardDialog::processSendCoinsReturn (const WalletModel::SendCoinsReturn& sendCoinsReturn, const QString& msgArg, bool fPrepare )
363366{
364367 bool fAskForUnlock = false ;
365368
@@ -408,7 +411,7 @@ void MasterNodeWizardDialog::processSendCoinsReturn(const WalletModel::SendCoins
408411 // included to prevent a compiler warning.
409412 case WalletModel::OK:
410413 default :
411- return ;
414+ return msgParams. first ;
412415 }
413416
414417 // Unlock wallet if it wasn't fully unlocked already
@@ -419,11 +422,11 @@ void MasterNodeWizardDialog::processSendCoinsReturn(const WalletModel::SendCoins
419422 }
420423 else {
421424 // Wallet unlocked
422- return ;
425+ return msgParams. first ;
423426 }
424427 }
425428
426- inform ( msgParams.first ) ;
429+ return msgParams.first ;
427430}
428431
429432void MasterNodeWizardDialog::inform (QString text){
0 commit comments