Don't show the LES debug label if the network wasn't initialized just yet.
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
f5a0c2a7d9
commit
0547bfec0c
|
@ -12,6 +12,12 @@
|
|||
:chain-sync-state
|
||||
(fn [{:node/keys [chain-sync-state]} _] chain-sync-state))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:current-network-initialized?
|
||||
(fn [db _]
|
||||
(let [network (get-in db [:account/account :networks (:network db)])]
|
||||
(boolean network))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:current-network-uses-rpc?
|
||||
(fn [db _]
|
||||
|
|
|
@ -92,7 +92,8 @@
|
|||
view-id [:get :view-id]
|
||||
sync-state [:chain-sync-state]
|
||||
latest-block-number [:latest-block-number]
|
||||
rpc-network? [:current-network-uses-rpc?]]
|
||||
rpc-network? [:current-network-uses-rpc?]
|
||||
network-initialized? [:current-network-initialized?]]
|
||||
{:component-did-mount
|
||||
(fn [this]
|
||||
(let [[_ loading?] (.. this -props -argv)]
|
||||
|
@ -108,7 +109,7 @@
|
|||
(true? old-loading?))
|
||||
(re-frame/dispatch [:load-chats-messages]))))}
|
||||
[react/view styles/container
|
||||
[toolbar show-welcome? (not rpc-network?) sync-state latest-block-number]
|
||||
[toolbar show-welcome? (and network-initialized? (not rpc-network?)) sync-state latest-block-number]
|
||||
(cond show-welcome?
|
||||
[welcome view-id]
|
||||
loading?
|
||||
|
|
Loading…
Reference in New Issue