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
|
:chain-sync-state
|
||||||
(fn [{:node/keys [chain-sync-state]} _] 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
|
(re-frame/reg-sub
|
||||||
:current-network-uses-rpc?
|
:current-network-uses-rpc?
|
||||||
(fn [db _]
|
(fn [db _]
|
||||||
|
|
|
@ -92,7 +92,8 @@
|
||||||
view-id [:get :view-id]
|
view-id [:get :view-id]
|
||||||
sync-state [:chain-sync-state]
|
sync-state [:chain-sync-state]
|
||||||
latest-block-number [:latest-block-number]
|
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
|
{:component-did-mount
|
||||||
(fn [this]
|
(fn [this]
|
||||||
(let [[_ loading?] (.. this -props -argv)]
|
(let [[_ loading?] (.. this -props -argv)]
|
||||||
|
@ -108,7 +109,7 @@
|
||||||
(true? old-loading?))
|
(true? old-loading?))
|
||||||
(re-frame/dispatch [:load-chats-messages]))))}
|
(re-frame/dispatch [:load-chats-messages]))))}
|
||||||
[react/view styles/container
|
[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?
|
(cond show-welcome?
|
||||||
[welcome view-id]
|
[welcome view-id]
|
||||||
loading?
|
loading?
|
||||||
|
|
Loading…
Reference in New Issue