diff --git a/electrum/gui/qml/qebitcoin.py b/electrum/gui/qml/qebitcoin.py index 274f9cd81..c03eecb17 100644 --- a/electrum/gui/qml/qebitcoin.py +++ b/electrum/gui/qml/qebitcoin.py @@ -107,7 +107,6 @@ class QEBitcoin(QObject): @pyqtSlot(str, str, result=bool) def verifyMasterKey(self, key, wallet_type='standard'): - # FIXME exceptions raised in here are not well-behaved... self.validationMessage = '' if not keystore.is_master_key(key): self.validationMessage = _('Not a master key') @@ -126,7 +125,10 @@ class QEBitcoin(QObject): self.validationMessage = '%s: %s' % (_('Wrong key type'), t1) return False return True - raise Exception(f'Unsupported wallet type: {wallet_type}') + else: + self.validationMessage = '%s: %s' % (_('Unsupported wallet type'), wallet_type) + self.logger.error(f'Unsupported wallet type: {wallet_type}') + return False return True @pyqtSlot(str, result=bool)