diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index f10008682..f20c3ea16 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -232,6 +232,9 @@ Item { onValidationWarning: { if (code == 'no_channels') { var dialog = app.messageDialog.createObject(app, { text: message }) + dialog.closed.connect(function() { + restartSendDialog() + }) dialog.open() // TODO: ask user to open a channel, if funds allow // and maybe store invoice if expiry allows diff --git a/electrum/gui/qml/qeinvoice.py b/electrum/gui/qml/qeinvoice.py index 2118c8aef..6ef09e7c7 100644 --- a/electrum/gui/qml/qeinvoice.py +++ b/electrum/gui/qml/qeinvoice.py @@ -554,10 +554,14 @@ class QEInvoiceParser(QEInvoice): self._logger.debug('flow with LN but not LN enabled AND having bip21 uri') self._validateRecipient_bip21_onchain(bip21) else: - self.setValidLightningInvoice(lninvoice) if not self._wallet.wallet.lnworker.channels: - self.validationWarning.emit('no_channels',_('Detected valid Lightning invoice, but there are no open channels')) + if bip21 and 'address' in bip21: + self._logger.debug('flow where invoice has both LN and onchain, we have LN enabled but no channels') + self._validateRecipient_bip21_onchain(bip21) + else: + self.validationWarning.emit('no_channels',_('Detected valid Lightning invoice, but there are no open channels')) else: + self.setValidLightningInvoice(lninvoice) self.validationSuccess.emit() else: self._logger.debug('flow without LN but having bip21 uri')