From b41df3b3c2f8b02b4d5379465c7174eee3de3155 Mon Sep 17 00:00:00 2001 From: yenda Date: Thu, 15 Nov 2018 14:03:19 +0100 Subject: [PATCH] updating cljs compiler Signed-off-by: yenda --- deps.edn | 8 +++----- project.clj | 6 +++--- src/status_im/data_store/realm/core.cljs | 8 ++++---- src/status_im/models/wallet.cljs | 2 +- src/status_im/ui/components/list_selection.cljs | 2 +- src/status_im/ui/screens/group/db.cljs | 2 +- src/status_im/ui/screens/hardwallet/components.cljs | 2 +- src/status_im/ui/screens/wallet/components/views.cljs | 8 ++++---- src/status_im/utils/clocks.cljs | 2 +- src/status_im/utils/ethereum/mnemonic.cljs | 4 ++-- 10 files changed, 21 insertions(+), 23 deletions(-) diff --git a/deps.edn b/deps.edn index 4c581f9852..4cdc0de734 100644 --- a/deps.edn +++ b/deps.edn @@ -1,6 +1,6 @@ {:paths ["components/src" "src" "react-native/src/cljsjs" "resources"] :deps {org.clojure/clojure {:mvn/version "1.9.0"} - org.clojure/clojurescript {:mvn/version "1.10.238"} + org.clojure/clojurescript {:mvn/version "1.10.439"} org.clojure/core.async {:mvn/version "0.4.474"} reagent {:mvn/version "0.7.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server cljsjs/create-react-class]} @@ -12,8 +12,7 @@ hickory {:mvn/version "0.7.1"} com.cognitect/transit-cljs {:mvn/version "0.8.248"} status-im/pluto {:mvn/version "iteration-4-1"} - mvxcvi/alphabase {:mvn/version "1.0.0"} - rasom/cljs-react-navigation {:mvn/version "0.1.4"}} + mvxcvi/alphabase {:mvn/version "1.0.0"}} :aliases {:dev {:extra-deps @@ -23,8 +22,7 @@ ;; Figwheel ClojureScript REPL cider/piggieback {:mvn/version "0.3.9" :exclusions [com.google.javascript/closure-compiler]} - figwheel-sidecar {:mvn/version "0.5.16" - :exclusions [com.google.javascript/closure-compiler]} + figwheel-sidecar {:mvn/version "0.5.18-SNAPSHOT"} re-frisk-remote {:mvn/version "0.5.5"} re-frisk-sidecar {:mvn/version "0.5.7"} hawk {:mvn/version "0.2.11"} diff --git a/project.clj b/project.clj index 7170677d6b..95a2dfeb02 100644 --- a/project.clj +++ b/project.clj @@ -34,8 +34,8 @@ ["do" "clean" ["with-profile" "prod" "cljsbuild" "once" "ios"]] "prod-build-desktop" ^{:doc "Recompile code for desktop with prod profile."} - ["do" "clean" - ["with-profile" "prod" "cljsbuild" "once" "desktop"]] + ["do" "clean" + ["with-profile" "prod" "cljsbuild" "once" "desktop"]] "figwheel-repl" ["with-profile" "+figwheel" "run" "-m" "clojure.main" "env/dev/run.clj"] "test-cljs" ["with-profile" "test" "doo" "node" "test" "once"] "test-protocol" ["with-profile" "test" "doo" "node" "protocol" "once"] @@ -64,7 +64,7 @@ :repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl] :timeout 240000}} :figwheel [:dev - {:dependencies [[figwheel-sidecar "0.5.16-SNAPSHOT"] + {:dependencies [[figwheel-sidecar "0.5.18-SNAPSHOT"] [re-frisk-remote "0.5.5"] [re-frisk-sidecar "0.5.7"] [day8.re-frame/tracing "0.5.0"] diff --git a/src/status_im/data_store/realm/core.cljs b/src/status_im/data_store/realm/core.cljs index 0baf657eb0..7a26f6e708 100644 --- a/src/status_im/data_store/realm/core.cljs +++ b/src/status_im/data_store/realm/core.cljs @@ -69,11 +69,11 @@ (str realm-dir "default.realm")) -(defn- delete-realms [] +(defn delete-realms [] (log/warn "realm: deleting all realms") (fs/unlink realm-dir)) -(defn- ensure-directories [] +(defn ensure-directories [] (.. (fs/mkdir realm-dir) (then #(fs/mkdir accounts-realm-dir)))) @@ -88,7 +88,7 @@ (fs/unlink path) (fs/move-file path new-path)))) -(defn- move-realms [] +(defn move-realms [] (log/info "realm: moving all realms") (.. (fs/read-dir old-realm-dir) @@ -265,7 +265,7 @@ (when realm-list (into coll (map map-fn) (range 0 (.-length realm-list))))) -(defn- list->clj [realm-list] +(defn list->clj [realm-list] (realm-list->clj-coll realm-list [] #(object/get realm-list %))) (defn- object-list->clj [realm-object-list entity-name] diff --git a/src/status_im/models/wallet.cljs b/src/status_im/models/wallet.cljs index 895ea65bb9..f6b8712dd3 100644 --- a/src/status_im/models/wallet.cljs +++ b/src/status_im/models/wallet.cljs @@ -18,7 +18,7 @@ (defmethod invalid-send-parameter? :gas-price [_ value] (cond (not value) :invalid-number - (< (money/->wei :gwei value) min-gas-price-wei) :not-enough-wei + (.lt (money/->wei :gwei value) min-gas-price-wei) :not-enough-wei (-> (money/->wei :gwei value) .decimalPlaces pos?) :invalid-number)) (defmethod invalid-send-parameter? :default [_ value] diff --git a/src/status_im/ui/components/list_selection.cljs b/src/status_im/ui/components/list_selection.cljs index d4861ad568..4ff6a6bf99 100644 --- a/src/status_im/ui/components/list_selection.cljs +++ b/src/status_im/ui/components/list_selection.cljs @@ -7,7 +7,7 @@ [status-im.utils.platform :as platform] [status-im.utils.http :as http])) -(defn- open-share [content] +(defn open-share [content] (when (or (:message content) (:url content)) (.share react/sharing (clj->js content)))) diff --git a/src/status_im/ui/screens/group/db.cljs b/src/status_im/ui/screens/group/db.cljs index 2b242a5117..4c9bb27838 100644 --- a/src/status_im/ui/screens/group/db.cljs +++ b/src/status_im/ui/screens/group/db.cljs @@ -1,4 +1,4 @@ (ns status-im.ui.screens.group.db (:require [cljs.spec.alpha :as spec])) -(spec/def :group/selected-contacts (spec/nilable (spec/* string?))) +(spec/def :group/selected-contacts (spec/nilable (spec/coll-of string? :kind set?))) diff --git a/src/status_im/ui/screens/hardwallet/components.cljs b/src/status_im/ui/screens/hardwallet/components.cljs index 7444928232..78d0ef9c6b 100644 --- a/src/status_im/ui/screens/hardwallet/components.cljs +++ b/src/status_im/ui/screens/hardwallet/components.cljs @@ -40,7 +40,7 @@ :number-of-lines 2} (i18n/label :t/maintain-card-to-phone-contact)]])}))) -(defn- wizard-step [step-number] +(defn wizard-step [step-number] (when step-number [react/text {:style styles/wizard-step-text} (i18n/label :wizard-step {:current step-number diff --git a/src/status_im/ui/screens/wallet/components/views.cljs b/src/status_im/ui/screens/wallet/components/views.cljs index c2bc77cbf6..14faa56ae0 100644 --- a/src/status_im/ui/screens/wallet/components/views.cljs +++ b/src/status_im/ui/screens/wallet/components/views.cljs @@ -44,7 +44,7 @@ (def default-action (actions/back-white actions/default-handler)) -(defn- toolbar +(defn toolbar ([title] (toolbar {} title)) ([props title] (toolbar props default-action title)) ([props action title] (toolbar props action title nil)) @@ -94,7 +94,7 @@ [react/text {:style styles/cartouche-primary-text} s]) -(defn- cartouche-secondary-text [s] +(defn cartouche-secondary-text [s] [react/text {:style styles/cartouche-secondary-text} s]) @@ -273,8 +273,8 @@ [recipient-contact address name request?] [recipient-address address modal?])]]) -(defn- amount-input [{:keys [input-options amount amount-text disabled?]} - {:keys [symbol decimals]}] +(defn amount-input [{:keys [input-options amount amount-text disabled?]} + {:keys [symbol decimals]}] [react/view {:style components.styles/flex :accessibility-label :specify-amount-button} [text-input diff --git a/src/status_im/utils/clocks.cljs b/src/status_im/utils/clocks.cljs index e89230821e..c93e5631b7 100644 --- a/src/status_im/utils/clocks.cljs +++ b/src/status_im/utils/clocks.cljs @@ -84,7 +84,7 @@ ; We should never receive messages from untrusted peers with a timestamp greater ; then now + 20s. ; We cap the timestamp to time now + 1 month to give some room for trusted peers -(defn- safe-timestamp [t] +(defn safe-timestamp [t] (min t (max-timestamp))) (defn safe-timestamp? [t] diff --git a/src/status_im/utils/ethereum/mnemonic.cljs b/src/status_im/utils/ethereum/mnemonic.cljs index 93ff129e60..efc19aa4fe 100644 --- a/src/status_im/utils/ethereum/mnemonic.cljs +++ b/src/status_im/utils/ethereum/mnemonic.cljs @@ -6,7 +6,7 @@ (defn sanitize-passphrase [s] (-> (string/trim s) - (string/replace-all #"\s+" " "))) + (string/replace #"\s+" " "))) (defn passphrase->words [s] (when s @@ -34,4 +34,4 @@ valid-words?)) (defn status-generated-phrase? [s] - (every? dictionary (passphrase->words s))) \ No newline at end of file + (every? dictionary (passphrase->words s)))