mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-09 15:24:34 +00:00
refactor callback
This commit is contained in:
parent
ddefb9c0a0
commit
711bca5451
@ -8,6 +8,7 @@
|
||||
[status-im.contexts.profile.config :as profile.config]
|
||||
[status-im.contexts.syncing.utils :as sync-utils]
|
||||
[taoensso.timbre :as log]
|
||||
[oops.core :as oops]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.security.core :as security]
|
||||
@ -88,10 +89,8 @@
|
||||
{:response raw-response
|
||||
:event :syncing/preflight-outbound-check})
|
||||
(def --x raw-response)
|
||||
(let [^js response-js (transforms/json->js raw-response)
|
||||
error (transforms/js->clj (.-error response-js))]
|
||||
(prn "-------------------" error)
|
||||
(if (not (empty? error)) ;; TODO: check the received value
|
||||
(let [error? (-> raw-response transforms/json->js (oops/oget :error) seq)]
|
||||
(if error?
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:type :negative
|
||||
:theme :dark
|
||||
|
Loading…
x
Reference in New Issue
Block a user