File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,13 @@ def expiration(self):
120
120
@pyqtProperty (str , notify = detailsChanged )
121
121
def bolt11 (self ):
122
122
wallet = self ._wallet .wallet
123
+ if not wallet .lnworker :
124
+ return ''
123
125
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 ()
125
127
will_req_zeroconf = wallet .lnworker .receive_requires_jit_channel (amount_msat = amount_sat * 1000 )
126
128
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 )):
128
130
bolt11 = wallet .get_bolt11_invoice (self ._req )
129
131
else :
130
132
return ''
You can’t perform that action at this time.
0 commit comments