Former-commit-id: 2c72274025
This commit is contained in:
Roman Volosovskyi 2016-10-20 15:01:50 +03:00
parent 0f843fc96c
commit e3ec4757b7
1 changed files with 6 additions and 6 deletions

View File

@ -63,12 +63,12 @@
(register-handler :initialize-sync-listener
(fn [{:keys [web3 sync-listener] :as db} _]
(when sync-listener
(.stopWatching sync-listener))
(->> (.isSyncing (.-eth web3)
(fn [error sync]
(dispatch [:update-sync-state error sync])))
(assoc db :sync-listener))))
(if-not sync-listener
(->> (.isSyncing (.-eth web3)
(fn [error sync]
(dispatch [:update-sync-state error sync])))
(assoc db :sync-listener))
db)))
(register-handler :incoming-message
(u/side-effect!