diff --git a/jmclient/jmclient/wallet_utils.py b/jmclient/jmclient/wallet_utils.py index 3d53f08..a070211 100644 --- a/jmclient/jmclient/wallet_utils.py +++ b/jmclient/jmclient/wallet_utils.py @@ -523,6 +523,10 @@ def wallet_generate_recover_bip39(method, walletspath, default_wallet_name, return False wallet_name = callbacks[3]() + if wallet_name == "cancelled": + # currently used only by Qt, because user has option + # to click cancel in dialog. + return False if not wallet_name: wallet_name = default_wallet_name wallet_path = os.path.join(walletspath, wallet_name) diff --git a/scripts/joinmarket-qt.py b/scripts/joinmarket-qt.py index eb27c45..8cf7e94 100644 --- a/scripts/joinmarket-qt.py +++ b/scripts/joinmarket-qt.py @@ -1482,7 +1482,9 @@ class JMMainWindow(QMainWindow): QLineEdit.Normal, "wallet.jmdat") if not ok: JMQtMessageBox(self, "Create wallet aborted", mbtype='warn') - return None + # cannot use None for a 'fail' condition, as this is used + # for the case where the default wallet name is to be used in non-Qt. + return "cancelled" self.walletname = str(walletname) return self.walletname