From e72533b5e5040f17453cecb2b39fb87c4a83fc33 Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Tue, 14 Jan 2020 15:56:00 +0000 Subject: [PATCH] don't allow maker dialog without loaded wallet --- scripts/joinmarket-qt.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/joinmarket-qt.py b/scripts/joinmarket-qt.py index 7c14e9322..b82336722 100644 --- a/scripts/joinmarket-qt.py +++ b/scripts/joinmarket-qt.py @@ -1323,6 +1323,10 @@ def closeEvent(self, event): event.ignore() def makerManager(self): + if not self.wallet_service: + JMQtMessageBox(self, "No wallet loaded.", + mbtype='crit', title="Error") + return action_fn = self.stopMaker if self.maker_running else self.startMaker self.makerDialog = MakerDialog(action_fn, self.maker_running, self.maker_settings) @@ -1340,8 +1344,6 @@ def toggle_non_maker_function(self): tab.setEnabled(not self.maker_running) def startMaker(self): - if not self.wallet_service: - return (False, "Wallet is not loaded and synced, cannot start maker.") mle = self.makerDialog.maker_settings_ql offertype = 'swreloffer' if mle[0][1].currentText() == "Relative fee" else 'swabsoffer' cjabsfee = int(mle[1][1].text())