fix compilation warnings

This commit is contained in:
Eric Dvorsak 2017-09-02 02:35:02 +02:00 committed by Andrey Shovkoplyas
parent bc37283cb7
commit c46a465b98
2 changed files with 16 additions and 15 deletions

View File

@ -1,6 +1,7 @@
(ns status-im.chat.views.input.validation-messages (ns status-im.chat.views.input.validation-messages
(:require-macros [status-im.utils.views :refer [defview]]) (:require-macros [status-im.utils.views :refer [defview letsubs]])
(:require [status-im.components.react :as c] (:require [re-frame.core :as re-frame]
[status-im.components.react :as c]
[status-im.chat.styles.input.validation-message :as style] [status-im.chat.styles.input.validation-message :as style]
[status-im.utils.listview :as lw] [status-im.utils.listview :as lw]
[status-im.i18n :as i18n])) [status-im.i18n :as i18n]))
@ -17,12 +18,12 @@
markup]) markup])
(defview validation-messages-view [] (defview validation-messages-view []
[chat-input-margin [:chat-input-margin] (letsubs [chat-input-margin [:chat-input-margin]
input-height [:chat-ui-props :input-height] input-height [:chat-ui-props :input-height]
messages [:chat-ui-props :validation-messages]] messages [:chat-ui-props :validation-messages]]
(when messages (when messages
[c/view (style/root (+ input-height chat-input-margin)) [c/view (style/root (+ input-height chat-input-margin))
(if (string? messages) (if (string? messages)
[messages-list [validation-message {:title (i18n/label :t/error) [messages-list [validation-message {:title (i18n/label :t/error)
:description messages}]] :description messages}]]
[messages-list messages])])) [messages-list messages])])))

View File

@ -62,9 +62,9 @@
(assoc-in db [:wallet :wallet/error] err)) (assoc-in db [:wallet :wallet/error] err))
(handlers/register-handler-db (handlers/register-handler-db
:wallet/clear-error-message :wallet/clear-error-message
(fn [db [_]] (fn [db [_]]
(update db :wallet dissoc :wallet/error))) (update db :wallet dissoc :wallet/error)))
(handlers/register-handler-db (handlers/register-handler-db
:update-balance :update-balance
@ -84,6 +84,6 @@
(handlers/register-handler-db (handlers/register-handler-db
:update-prices-fail :update-prices-fail
(fn [_ [_ err]] (fn [db [_ err]]
(log/debug "Unable to get prices: " err) (log/debug "Unable to get prices: " err)
(set-error-message db :error))) (set-error-message db :error)))