Skip to content

Commit

Permalink
don't allow maker dialog without loaded wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamISZ committed Jan 14, 2020
1 parent 9615cf1 commit e72533b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/joinmarket-qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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())
Expand Down

0 comments on commit e72533b

Please sign in to comment.