mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
fix gap visualization
This commit is contained in:
parent
7a8689f6aa
commit
c89fc345af
1 changed files with 4 additions and 1 deletions
|
@ -650,6 +650,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
self.receive_list.clear()
|
self.receive_list.clear()
|
||||||
self.change_list.clear()
|
self.change_list.clear()
|
||||||
gap = 0
|
gap = 0
|
||||||
|
is_red = False
|
||||||
for address in self.wallet.all_addresses():
|
for address in self.wallet.all_addresses():
|
||||||
if self.wallet.is_change(address):
|
if self.wallet.is_change(address):
|
||||||
l = self.change_list
|
l = self.change_list
|
||||||
|
@ -666,6 +667,8 @@ class ElectrumWindow(QMainWindow):
|
||||||
tx = "None"
|
tx = "None"
|
||||||
if l == self.receive_list:
|
if l == self.receive_list:
|
||||||
gap += 1
|
gap += 1
|
||||||
|
if gap > self.wallet.gap_limit:
|
||||||
|
is_red = True
|
||||||
else:
|
else:
|
||||||
tx = "%d"%n
|
tx = "%d"%n
|
||||||
if l == self.receive_list:
|
if l == self.receive_list:
|
||||||
|
@ -680,7 +683,7 @@ class ElectrumWindow(QMainWindow):
|
||||||
item.setBackgroundColor(0, QColor('lightgreen'))
|
item.setBackgroundColor(0, QColor('lightgreen'))
|
||||||
|
|
||||||
item.setFont(0, QFont(MONOSPACE_FONT))
|
item.setFont(0, QFont(MONOSPACE_FONT))
|
||||||
if gap > self.wallet.gap_limit and l == self.receive_list:
|
if is_red and l==self.receive_list:
|
||||||
item.setBackgroundColor(0, QColor('red'))
|
item.setBackgroundColor(0, QColor('red'))
|
||||||
|
|
||||||
l.addTopLevelItem(item)
|
l.addTopLevelItem(item)
|
||||||
|
|
Loading…
Add table
Reference in a new issue