kivy: use app.num_chain
This commit is contained in:
parent
b424a83a57
commit
12b62fb27d
|
@ -80,6 +80,7 @@ class ElectrumWindow(App):
|
|||
num_nodes = NumericProperty(0)
|
||||
server_host = StringProperty('')
|
||||
server_port = StringProperty('')
|
||||
num_chains = NumericProperty(0)
|
||||
blockchain_name = StringProperty('')
|
||||
blockchain_checkpoint = NumericProperty(0)
|
||||
|
||||
|
@ -594,6 +595,7 @@ class ElectrumWindow(App):
|
|||
|
||||
def on_network(self, event, *args):
|
||||
chain = self.network.blockchain()
|
||||
self.num_chains = len(self.network.get_blockchains())
|
||||
self.blockchain_checkpoint = chain.get_checkpoint()
|
||||
self.blockchain_name = chain.get_name()
|
||||
if self.network.interface:
|
||||
|
|
|
@ -46,8 +46,8 @@ Popup:
|
|||
|
||||
CardSeparator
|
||||
SettingsItem:
|
||||
title: _('Fork detected at block %d')%app.blockchain_checkpoint if app.blockchain_checkpoint else _('No fork detected')
|
||||
title: _('Fork detected at block %d')%app.blockchain_checkpoint if app.num_chains>1 else _('No fork detected')
|
||||
fork_description: (_('You are following branch') if app.auto_connect else _("Your server is on branch")) + ' ' + app.blockchain_name
|
||||
description: self.fork_description if app.blockchain_checkpoint else ''
|
||||
description: self.fork_description if app.num_chains>1 else _('Connected nodes are on the same chain')
|
||||
action: app.choose_blockchain_dialog
|
||||
disabled: app.blockchain_checkpoint == 0
|
||||
disabled: app.num_chains == 1
|
||||
|
|
Loading…
Reference in New Issue