|
@ -1602,11 +1602,15 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
"""Returns whether there are errors with outputs. |
|
|
"""Returns whether there are errors with outputs. |
|
|
Also shows error dialog to user if so. |
|
|
Also shows error dialog to user if so. |
|
|
""" |
|
|
""" |
|
|
if self.payment_request and self.payment_request.has_expired(): |
|
|
pr = self.payment_request |
|
|
self.show_error(_('Payment request has expired')) |
|
|
if pr: |
|
|
return True |
|
|
if pr.error: |
|
|
|
|
|
return True |
|
|
|
|
|
if pr.has_expired(): |
|
|
|
|
|
self.show_error(_('Payment request has expired')) |
|
|
|
|
|
return True |
|
|
|
|
|
|
|
|
if not self.payment_request: |
|
|
if not pr: |
|
|
errors = self.payto_e.get_errors() |
|
|
errors = self.payto_e.get_errors() |
|
|
if errors: |
|
|
if errors: |
|
|
self.show_warning(_("Invalid Lines found:") + "\n\n" + '\n'.join([ _("Line #") + str(x[0]+1) + ": " + x[1] for x in errors])) |
|
|
self.show_warning(_("Invalid Lines found:") + "\n\n" + '\n'.join([ _("Line #") + str(x[0]+1) + ": " + x[1] for x in errors])) |
|
@ -1820,6 +1824,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
|
|
|
|
|
|
def payment_request_ok(self): |
|
|
def payment_request_ok(self): |
|
|
pr = self.payment_request |
|
|
pr = self.payment_request |
|
|
|
|
|
if not pr: |
|
|
|
|
|
return |
|
|
key = self.invoices.add(pr) |
|
|
key = self.invoices.add(pr) |
|
|
status = self.invoices.get_status(key) |
|
|
status = self.invoices.get_status(key) |
|
|
self.invoice_list.update() |
|
|
self.invoice_list.update() |
|
@ -1840,7 +1846,10 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): |
|
|
self.amount_e.textEdited.emit("") |
|
|
self.amount_e.textEdited.emit("") |
|
|
|
|
|
|
|
|
def payment_request_error(self): |
|
|
def payment_request_error(self): |
|
|
self.show_message(self.payment_request.error) |
|
|
pr = self.payment_request |
|
|
|
|
|
if not pr: |
|
|
|
|
|
return |
|
|
|
|
|
self.show_message(pr.error) |
|
|
self.payment_request = None |
|
|
self.payment_request = None |
|
|
self.do_clear() |
|
|
self.do_clear() |
|
|
|
|
|
|
|
|