electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit ec3e0def241dfc4a8b00a3937d892109f1706d15
parent 8951dc3120f08b8cdd4eda3a68360f3525f837bb
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 26 Feb 2018 11:21:37 +0100

Merge pull request #3967 from SomberNight/fix_3965

qt save_payment_request catch exception
Diffstat:
Mgui/qt/main_window.py | 16+++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -904,11 +904,17 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): i = self.expires_combo.currentIndex() expiration = list(map(lambda x: x[1], expiration_values))[i] req = self.wallet.make_payment_request(addr, amount, message, expiration) - self.wallet.add_payment_request(req, self.config) - self.sign_payment_request(addr) - self.request_list.update() - self.address_list.update() - self.save_request_button.setEnabled(False) + try: + self.wallet.add_payment_request(req, self.config) + except Exception as e: + traceback.print_exc(file=sys.stderr) + 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): dialog = WindowModalDialog(self, title)