Merge pull request #3967 from SomberNight/fix_3965
qt save_payment_request catch exception
This commit is contained in:
@@ -904,11 +904,17 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
|||||||
i = self.expires_combo.currentIndex()
|
i = self.expires_combo.currentIndex()
|
||||||
expiration = list(map(lambda x: x[1], expiration_values))[i]
|
expiration = list(map(lambda x: x[1], expiration_values))[i]
|
||||||
req = self.wallet.make_payment_request(addr, amount, message, expiration)
|
req = self.wallet.make_payment_request(addr, amount, message, expiration)
|
||||||
self.wallet.add_payment_request(req, self.config)
|
try:
|
||||||
self.sign_payment_request(addr)
|
self.wallet.add_payment_request(req, self.config)
|
||||||
self.request_list.update()
|
except Exception as e:
|
||||||
self.address_list.update()
|
traceback.print_exc(file=sys.stderr)
|
||||||
self.save_request_button.setEnabled(False)
|
self.show_error(_('Error adding payment request') + ':\n' + str(e))
|
||||||
|
else:
|
||||||
|
self.sign_payment_request(addr)
|
||||||
|
self.save_request_button.setEnabled(False)
|
||||||
|
finally:
|
||||||
|
self.request_list.update()
|
||||||
|
self.address_list.update()
|
||||||
|
|
||||||
def view_and_paste(self, title, msg, data):
|
def view_and_paste(self, title, msg, data):
|
||||||
dialog = WindowModalDialog(self, title)
|
dialog = WindowModalDialog(self, title)
|
||||||
|
|||||||
Reference in New Issue
Block a user