fix kibit suggestions

This commit is contained in:
Yehonathan Sharvit 2017-02-04 19:18:46 +02:00 committed by Roman Volosovskyi
parent 80f4c54357
commit 37e871b117
4 changed files with 4 additions and 6 deletions

View File

@ -100,7 +100,7 @@
request (:request (:handler-data command)) request (:request (:handler-data command))
hidden-params (->> (:params (:command command)) hidden-params (->> (:params (:command command))
(filter #(= (:hidden %) true)) (filter #(= (:hidden %) true))
(map #(:name %))) (map :name))
command' (->> (assoc command-message :handler-data handler-data) command' (->> (assoc command-message :handler-data handler-data)
(prepare-command current-public-key chat-id clock-value request) (prepare-command current-public-key chat-id clock-value request)
(cu/check-author-direction db chat-id))] (cu/check-author-direction db chat-id))]

View File

@ -224,8 +224,7 @@
(fn [{:keys [chats contacts]} [_ chat-id]] (fn [{:keys [chats contacts]} [_ chat-id]]
(let [contact (if-let [contact-info (get-in chats [chat-id :contact-info])] (let [contact (if-let [contact-info (get-in chats [chat-id :contact-info])]
(read-string contact-info) (read-string contact-info)
(-> (get contacts chat-id) (assoc (get contacts chat-id) :pending false))]
(assoc :pending false)))
contact' (assoc contact :address (public-key->address chat-id))] contact' (assoc contact :address (public-key->address chat-id))]
(dispatch [::prepare-contact contact']) (dispatch [::prepare-contact contact'])
(dispatch [:watch-contact contact']) (dispatch [:watch-contact contact'])

View File

@ -7,5 +7,5 @@
(defn identicon (defn identicon
([hash] (identicon hash default-size)) ([hash] (identicon hash default-size))
([hash options] ([hash options]
(str "data:image/png;base64," (.toString (new identicon-js hash options))))) (str "data:image/png;base64," (str (new identicon-js hash options)))))

View File

@ -2,8 +2,7 @@
(:require-macros [status-im.utils.slurp :refer [slurp]]) (:require-macros [status-im.utils.slurp :refer [slurp]])
(:require [status-im.utils.types :refer [json->clj]])) (:require [status-im.utils.types :refer [json->clj]]))
(def default-contacts (-> (slurp "resources/default_contacts.json") (def default-contacts (json->clj (slurp "resources/default_contacts.json")))
(json->clj)))
(def commands-js (slurp "resources/commands.js")) (def commands-js (slurp "resources/commands.js"))
(def console-js (slurp "resources/console.js")) (def console-js (slurp "resources/console.js"))