From 78f9b5160fea32f85c6ced16b3b0cccda6d3b181 Mon Sep 17 00:00:00 2001
From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Date: Sat, 18 May 2019 22:06:43 +0300
Subject: Do not show list for the only recipient.
---
src/qt/sendcoinsdialog.cpp | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
(limited to 'src/qt/sendcoinsdialog.cpp')
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index e39e692a06..8872e649ed 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -321,7 +321,7 @@ void SendCoinsDialog::on_sendButton_clicked()
QString questionString = tr("Are you sure you want to send?");
questionString.append("
");
questionString.append(tr("Please, review your transaction."));
- questionString.append("");
+ questionString.append("%1");
if(txFee > 0)
{
@@ -362,7 +362,17 @@ void SendCoinsDialog::on_sendButton_clicked()
questionString.append(QString("
(=%1)")
.arg(alternativeUnits.join(" " + tr("or") + " ")));
- SendConfirmationDialog confirmationDialog(tr("Confirm send coins"), questionString, "To review recipient list click \"Show Details...\"", formatted.join("\n\n"), SEND_CONFIRM_DELAY, this);
+ QString informative_text;
+ QString detailed_text;
+ if (formatted.size() > 1) {
+ questionString = questionString.arg("");
+ informative_text = tr("To review recipient list click \"Show Details...\"");
+ detailed_text = formatted.join("\n\n");
+ } else {
+ questionString = questionString.arg("
" + formatted.at(0));
+ }
+
+ SendConfirmationDialog confirmationDialog(tr("Confirm send coins"), questionString, informative_text, detailed_text, SEND_CONFIRM_DELAY, this);
confirmationDialog.exec();
QMessageBox::StandardButton retval = static_cast(confirmationDialog.result());
--
cgit v1.2.3