@@ -312,7 +312,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) :
312
312
313
313
// Install global event filter to catch QFileOpenEvents
314
314
// on Mac: sent when you click bitcoin: links
315
- // other OSes: helpful when dealing with payment request files (in the future)
315
+ // other OSes: helpful when dealing with payment request files
316
316
if (parent)
317
317
parent->installEventFilter (this );
318
318
@@ -343,14 +343,13 @@ PaymentServer::~PaymentServer()
343
343
}
344
344
345
345
//
346
- // OSX-specific way of handling bitcoin: URIs and
347
- // PaymentRequest mime types
346
+ // OSX-specific way of handling bitcoin: URIs and PaymentRequest mime types.
347
+ // Also used by paymentservertests.cpp and when opening a payment request file
348
+ // via "Open URI..." menu entry.
348
349
//
349
350
bool PaymentServer::eventFilter (QObject *object, QEvent *event)
350
351
{
351
- // clicking on bitcoin: URIs creates FileOpen events on the Mac
352
- if (event->type () == QEvent::FileOpen)
353
- {
352
+ if (event->type () == QEvent::FileOpen) {
354
353
QFileOpenEvent *fileEvent = static_cast <QFileOpenEvent*>(event);
355
354
if (!fileEvent->file ().isEmpty ())
356
355
handleURIOrFile (fileEvent->file ());
@@ -571,9 +570,9 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
571
570
addresses.append (QString::fromStdString (CBitcoinAddress (dest).ToString ()));
572
571
}
573
572
else if (!recipient.authenticatedMerchant .isEmpty ()) {
574
- // Insecure payments to custom bitcoin addresses are not supported
575
- // (there is no good way to tell the user where they are paying in a way
576
- // they'd have a chance of understanding).
573
+ // Unauthenticated payment requests to custom bitcoin addresses are not supported
574
+ // (there is no good way to tell the user where they are paying in a way they'd
575
+ // have a chance of understanding).
577
576
emit message (tr (" Payment request rejected" ),
578
577
tr (" Unverified payment requests to custom payment scripts are unsupported." ),
579
578
CClientUIInterface::MSG_ERROR);
0 commit comments