qml: fix #9677
This commit is contained in:
@@ -120,11 +120,13 @@ class QERequestDetails(QObject, QtEventListener):
|
||||
@pyqtProperty(str, notify=detailsChanged)
|
||||
def bolt11(self):
|
||||
wallet = self._wallet.wallet
|
||||
if not wallet.lnworker:
|
||||
return ''
|
||||
amount_sat = self._req.get_amount_sat() or 0 if self._req else 0
|
||||
can_receive = wallet.lnworker.num_sats_can_receive() if wallet.lnworker else 0
|
||||
can_receive = wallet.lnworker.num_sats_can_receive()
|
||||
will_req_zeroconf = wallet.lnworker.receive_requires_jit_channel(amount_msat=amount_sat*1000)
|
||||
if self._req and ((can_receive > 0 and amount_sat <= can_receive)
|
||||
or (will_req_zeroconf and amount_sat >= MIN_FUNDING_SAT)):
|
||||
or (will_req_zeroconf and amount_sat >= MIN_FUNDING_SAT)):
|
||||
bolt11 = wallet.get_bolt11_invoice(self._req)
|
||||
else:
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user