diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index f1657738f..fdd9e72f7 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -1270,10 +1270,13 @@ class ElectrumWindow(QMainWindow): pr = PaymentRequest(self.config) pr.read_file(key) pr.domain = domain - pr.verify() self.gui_object.payment_request = pr self.prepare_for_payment_request() - self.payment_request_ok() + if pr.verify(): + self.payment_request_ok() + else: + self.payment_request_error() + def create_invoice_menu(self, position): item = self.invoices_list.itemAt(position) diff --git a/lib/paymentrequest.py b/lib/paymentrequest.py index e00de7dd5..6cea0639e 100644 --- a/lib/paymentrequest.py +++ b/lib/paymentrequest.py @@ -259,9 +259,9 @@ class PaymentRequest: self.payment_url = self.details.payment_url - #if self.has_expired(): - # self.error = "ERROR: Payment Request has Expired." - # return False + if self.has_expired(): + self.error = "ERROR: Payment Request has Expired." + return False return True