From 1c01f766c26bb79ccc094a56d4aab2e7d67ed335 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Thu, 7 Nov 2019 01:46:39 +0200 Subject: [PATCH] Handle exceptions in direct_send() --- scripts/joinmarket-qt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/joinmarket-qt.py b/scripts/joinmarket-qt.py index 0a9ea63..6930001 100644 --- a/scripts/joinmarket-qt.py +++ b/scripts/joinmarket-qt.py @@ -618,9 +618,13 @@ class SpendTab(QWidget): makercount = int(self.widgets[1][1].text()) mixdepth = int(self.widgets[2][1].text()) if makercount == 0: - txid = direct_send(mainWindow.wallet_service, amount, mixdepth, + try: + txid = direct_send(mainWindow.wallet_service, amount, mixdepth, destaddr, accept_callback=self.checkDirectSend, info_callback=self.infoDirectSend) + except Exception as e: + JMQtMessageBox(self, e.args[0], title="Error", mbtype="warn") + return if not txid: self.giveUp() else: