Correctly dispatch on updates & disable them

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Andrea Maria Piana
2020-01-28 16:09:25 +01:00
committed by Andrey Shovkoplyas
parent a9762702f5
commit 4375caa331
2 changed files with 7 additions and 2 deletions
@@ -1,5 +1,6 @@
(ns status-im.multiaccounts.update.publisher
(:require [taoensso.timbre :as log]
[re-frame.core :as re-frame]
[status-im.constants :as constants]
[status-im.multiaccounts.update.core :as multiaccounts]
[status-im.ethereum.json-rpc :as json-rpc]
@@ -25,4 +26,9 @@
(log/debug "sending contact updates")
(json-rpc/call {:method "shhext_sendContactUpdates"
:params [(or preferred-name name) photo-path]
:on-success #(log/debug "sent contact updates")})))))
:on-failure #(do
(log/warn "failed to send contact updates")
(re-frame/dispatch [:multiaccounts.update.callback/failed-to-publish]))
:on-success #(do
(log/debug "sent contact updates")
(re-frame/dispatch [:multiaccounts.update.callback/published]))})))))
-1
View File
@@ -20,7 +20,6 @@
(let [cofx {:now (datetime/timestamp)
:db @re-frame.db/app-db}]
(mailserver/check-connection!)
(multiaccounts/publish-update! cofx)
(done-fn)))
sync-interval-ms
sync-timeout-ms)))