Skip to content

Commit 1d07895

Browse files
committed
qml: fix #9677
1 parent bf317af commit 1d07895

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

electrum/gui/qml/qerequestdetails.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,13 @@ def expiration(self):
120120
@pyqtProperty(str, notify=detailsChanged)
121121
def bolt11(self):
122122
wallet = self._wallet.wallet
123+
if not wallet.lnworker:
124+
return ''
123125
amount_sat = self._req.get_amount_sat() or 0 if self._req else 0
124-
can_receive = wallet.lnworker.num_sats_can_receive() if wallet.lnworker else 0
126+
can_receive = wallet.lnworker.num_sats_can_receive()
125127
will_req_zeroconf = wallet.lnworker.receive_requires_jit_channel(amount_msat=amount_sat*1000)
126128
if self._req and ((can_receive > 0 and amount_sat <= can_receive)
127-
or (will_req_zeroconf and amount_sat >= MIN_FUNDING_SAT)):
129+
or (will_req_zeroconf and amount_sat >= MIN_FUNDING_SAT)):
128130
bolt11 = wallet.get_bolt11_invoice(self._req)
129131
else:
130132
return ''

0 commit comments

Comments
 (0)