aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qt/sendcoinsdialog.cpp1
-rw-r--r--src/qt/test/wallettests.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 3c331c70ef..89bd35eb1b 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -406,6 +406,7 @@ void SendCoinsDialog::presentPSBT(PartiallySignedTransaction& psbtx)
msgBox.setInformativeText(tr("The PSBT has been copied to the clipboard. You can also save it."));
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard);
msgBox.setDefaultButton(QMessageBox::Discard);
+ msgBox.setObjectName("psbt_copied_message");
switch (msgBox.exec()) {
case QMessageBox::Save: {
QString selectedFilter;
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp
index f5b86f44a6..603df0b15f 100644
--- a/src/qt/test/wallettests.cpp
+++ b/src/qt/test/wallettests.cpp
@@ -418,7 +418,7 @@ void TestGUIWatchOnly(interfaces::Node& node, TestChain100Setup& test)
timer.setInterval(500);
QObject::connect(&timer, &QTimer::timeout, [&](){
for (QWidget* widget : QApplication::topLevelWidgets()) {
- if (widget->inherits("QMessageBox")) {
+ if (widget->inherits("QMessageBox") && widget->objectName().compare("psbt_copied_message") == 0) {
QMessageBox* dialog = qobject_cast<QMessageBox*>(widget);
QAbstractButton* button = dialog->button(QMessageBox::Discard);
button->setEnabled(true);