mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 15:31:31 +00:00
qt: channel_details: prevent crash on stuck SENT htlc
This commit is contained in:
parent
5f1feee331
commit
98e85fd16d
1 changed files with 7 additions and 3 deletions
|
@ -71,16 +71,20 @@ class ChannelDetailsDialog(QtWidgets.QDialog):
|
||||||
invoices = dict(self.window.wallet.lnworker.invoices)
|
invoices = dict(self.window.wallet.lnworker.invoices)
|
||||||
for pay_hash, item in htlcs.items():
|
for pay_hash, item in htlcs.items():
|
||||||
chan_id, i, direction, status = item
|
chan_id, i, direction, status = item
|
||||||
|
lnaddr = None
|
||||||
if pay_hash in invoices:
|
if pay_hash in invoices:
|
||||||
invoice = invoices[pay_hash][1]
|
invoice = invoices[pay_hash][1]
|
||||||
lnaddr = lndecode(invoice)
|
lnaddr = lndecode(invoice)
|
||||||
if status == 'inflight':
|
if status == 'inflight':
|
||||||
|
if lnaddr is not None:
|
||||||
it = self.make_inflight(lnaddr, i, direction)
|
it = self.make_inflight(lnaddr, i, direction)
|
||||||
|
else:
|
||||||
|
it = self.make_htlc_item(i, direction)
|
||||||
elif status == 'settled':
|
elif status == 'settled':
|
||||||
it = self.make_htlc_item(i, direction)
|
it = self.make_htlc_item(i, direction)
|
||||||
# if we made the invoice and still have it, we can show more info
|
# if we made the invoice and still have it, we can show more info
|
||||||
if pay_hash in invoices:
|
if lnaddr is not None:
|
||||||
self.append_lnaddr(it, lndecode(invoice))
|
self.append_lnaddr(it, lnaddr)
|
||||||
self.folders[status].appendRow(it)
|
self.folders[status].appendRow(it)
|
||||||
mapping[i.payment_hash] = num
|
mapping[i.payment_hash] = num
|
||||||
num += 1
|
num += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue