1
0

qml: don't pass lightning flag from GUI when creating payment requests

This commit is contained in:
Sander van Grieken
2023-03-14 14:49:58 +01:00
parent 950d8f4885
commit 1b0a58a0ff
2 changed files with 16 additions and 12 deletions

View File

@@ -616,12 +616,9 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
@pyqtSlot(QEAmount, str, int, bool)
@pyqtSlot(QEAmount, str, int, bool, bool)
@pyqtSlot(QEAmount, str, int, bool, bool, bool)
def createRequest(self, amount: QEAmount, message: str, expiration: int, is_lightning: bool = False, ignore_gap: bool = False, reuse_address: bool = False):
def createRequest(self, amount: QEAmount, message: str, expiration: int, ignore_gap: bool = False, reuse_address: bool = False):
try:
if is_lightning:
if not self.wallet.lnworker.channels:
self.requestCreateError.emit('fatal',_("You need to open a Lightning channel first."))
return
if self.wallet.lnworker and self.wallet.lnworker.channels:
# TODO maybe show a warning if amount exceeds lnworker.num_sats_can_receive (as in kivy)
# TODO fallback address robustness
addr = self.wallet.get_unused_address()