diff --git a/.zprintrc b/.zprintrc index 1f938b862a..2c8e8fbd22 100644 --- a/.zprintrc +++ b/.zprintrc @@ -16,7 +16,11 @@ ;; respect blank line ;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl - :respect-bl] + :respect-bl + + ;; hang multiline left-hand-thing + ;; https://github.com/kkinnear/zprint/issues/273 + :multi-lhs-hang] :fn-map {"reg-sub" :arg1-pair "h/describe" :arg1-body diff --git a/nix/overlay.nix b/nix/overlay.nix index 8175841d12..26fcaddb8d 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -32,6 +32,18 @@ in { # For parsing gradle.properties into an attrset gradlePropParser = callPackage ./tools/gradlePropParser.nix { }; + # Clojure formatting tool + zprint = super.zprint.override rec { + buildGraalvmNativeImage = args: super.buildGraalvmNativeImage ( args // rec { + inherit (args) pname; + version = "1.2.5"; + src = self.fetchurl { + url = "https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}"; + sha256 = "sha256-PWdR5jqyzvTk9HoxqDldwtZNik34dmebBtZZ5vtva4A="; + }; + }); + }; + # Package version adjustments gradle = super.gradle_5; nodejs = super.nodejs-16_x; diff --git a/shadow-cljs.edn b/shadow-cljs.edn index 4b01f08bdc..6c1bc54dca 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -1,64 +1,64 @@ ;; shadow-cljs configuration -{:source-paths ["src" "test/cljs"] +{:source-paths ["src" "test/cljs"] - :dependencies [[reagent "1.0.0"] - [re-frame "0.12.0"] - [binaryage/oops "0.7.0"] - [com.andrewmcveigh/cljs-time "0.5.2"] - [status-im/timbre "4.10.0-2-status"] - [com.taoensso/encore "2.105.0"] - [hickory "0.7.1"] - [cljs-bean "1.3.0"] - [com.cognitect/transit-cljs "0.8.248"] - [mvxcvi/alphabase "1.0.0"] - [camel-snake-kebab "0.4.3"] - ;; dev dependencies - [refactor-nrepl "2.5.0"] - [cider/cider-nrepl "0.25.3"] - [cider/piggieback "0.4.1"] - [re-frisk-remote "1.6.0"] - ;; routing - [bidi "2.1.6"] - ;; test dependencies - [day8.re-frame/test "0.1.5"] - [com.taoensso/tufte "2.1.0"]] + :dependencies [[reagent "1.0.0"] + [re-frame "0.12.0"] + [binaryage/oops "0.7.0"] + [com.andrewmcveigh/cljs-time "0.5.2"] + [status-im/timbre "4.10.0-2-status"] + [com.taoensso/encore "2.105.0"] + [hickory "0.7.1"] + [cljs-bean "1.3.0"] + [com.cognitect/transit-cljs "0.8.248"] + [mvxcvi/alphabase "1.0.0"] + [camel-snake-kebab "0.4.3"] + ;; dev dependencies + [refactor-nrepl "2.5.0"] + [cider/cider-nrepl "0.25.3"] + [cider/piggieback "0.4.1"] + [re-frisk-remote "1.6.0"] + ;; routing + [bidi "2.1.6"] + ;; test dependencies + [day8.re-frame/test "0.1.5"] + [com.taoensso/tufte "2.1.0"]] ;; port and middleware for repl in development - :nrepl {:port 7888 - :middleware [cider.piggieback/wrap-cljs-repl - refactor-nrepl.middleware/wrap-refactor]} + :nrepl {:port 7888 + :middleware [cider.piggieback/wrap-cljs-repl + refactor-nrepl.middleware/wrap-refactor]} ;; shadow-cljs web interface - :http {:port 3449 - :host "0.0.0.0"} + :http {:port 3449 + :host "0.0.0.0"} :cache-blockers #{status-im.utils.js-resources status-im.ui.components.icons.icons} :builds {:mobile - {:target :react-native + {:target :react-native :output-dir "app" - :init-fn status-im2.core/init + :init-fn status-im2.core/init ;; When false, the Shadow-CLJS watcher won't automatically refresh ;; the target files (a.k.a hot reload). When false, you can manually ;; reload by calling `shadow.cljs.devtools.api/watch-compile-all!`. - :devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]} - :dev {:devtools {:after-load status-im2.setup.hot-reload/reload - :build-notify status-im2.setup.hot-reload/build-notify - :preloads [re-frisk-remote.preload]} - :closure-defines - {status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN" - status-im2.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} - :compiler-options {:output-feature-set :es5 - :closure-defines - {re-frame.trace/trace-enabled? true} - :source-map false - :infer-externs true} - ;; if you want to use a real device, set your local ip - ;; in the SHADOW_HOST env variable to make sure that - ;; it will use the right interface - :local-ip #shadow/env "SHADOW_HOST"} - :chunks {:fleets status-im.fleet.default-fleet/default-fleets} + :devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]} + :dev {:devtools {:after-load status-im2.setup.hot-reload/reload + :build-notify status-im2.setup.hot-reload/build-notify + :preloads [re-frisk-remote.preload]} + :closure-defines + {status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN" + status-im2.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"} + :compiler-options {:output-feature-set :es5 + :closure-defines + {re-frame.trace/trace-enabled? true} + :source-map false + :infer-externs true} + ;; if you want to use a real device, set your local ip + ;; in the SHADOW_HOST env variable to make sure that + ;; it will use the right interface + :local-ip #shadow/env "SHADOW_HOST"} + :chunks {:fleets status-im.fleet.default-fleet/default-fleets} :release {:closure-defines {status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN" @@ -77,10 +77,10 @@ ;; produced by the target :mocks below and redefines node require ;; function to use the mocks instead of the rn libraries :test - {:output-to "target/test/test.js" - :output-dir "target/test" - :optimizations :simple - :target :node-test + {:output-to "target/test/test.js" + :output-dir "target/test" + :optimizations :simple + :target :node-test ;; When running tests without a REPL you can uncomment below line to `make test-watch` a specific file ;; :ns-regexp "status-im2.subs.chat.messages-test$" :main diff --git a/src/mocks/js_dependencies.cljs b/src/mocks/js_dependencies.cljs index 17b4faf99b..d63af6661f 100644 --- a/src/mocks/js_dependencies.cljs +++ b/src/mocks/js_dependencies.cljs @@ -33,63 +33,64 @@ globalThis.__STATUS_MOBILE_JS_IDENTITY_PROXY__ = new Proxy({}, {get() { return ( (def svg #js {}) (def react-native - (clj->js {:NativeModules {:RNGestureHandlerModule {:Direction (fn [])} - :PushNotifications {} - :Status utils.test/status - :ReanimatedModule {:configureProps (fn [])}} + (clj->js + {:NativeModules {:RNGestureHandlerModule {:Direction (fn [])} + :PushNotifications {} + :Status utils.test/status + :ReanimatedModule {:configureProps (fn [])}} - :View {} - :RefreshControl {} - :AppState {} - :Alert {:alert (fn [])} - :FlatList {} - :SectionList {} - :Text {} - :StatusBar {} - :ScrollView {} - :KeyboardAvoidingView {} - :TextInput {} - :Image {} - :Picker {:Item {}} - :Switch {} - :Modal {} - :Keyboard {:dismiss (fn [])} - :Linking {} - :TouchableWithoutFeedback {} - :TouchableHighlight {} - :Pressable {} - :TouchableOpacity {} - :ActivityIndicator {} - :StyleSheet {:create (fn [])} - :Animated {:createAnimatedComponent identity - :Value (fn []) - :ValueXY (fn []) - :View {} - :FlatList {} - :ScrollView {} - :Text {}} - :Easing {:bezier (fn []) - :poly (fn []) - :out (fn []) - :in (fn []) - :inOut (fn [])} - :DeviceEventEmitter {:addListener (fn [])} - :Dimensions {:get (fn []) :addEventListener identity} - :useWindowDimensions {} - :Platform {:select (fn [])} - :I18nManager {:isRTL ""} - :NativeEventEmitter (fn []) - :LayoutAnimation {:Presets #js - {:easeInEaseOut nil - :linear nil - :spring nil} - :Types #js {} - :Properties #{} - :create (fn []) - :configureNext (fn [])} - :requireNativeComponent (fn [] {:propTypes ""}) - :Appearance {:getColorScheme (fn []) - :addChangeListener (fn [])}})) + :View {} + :RefreshControl {} + :AppState {} + :Alert {:alert (fn [])} + :FlatList {} + :SectionList {} + :Text {} + :StatusBar {} + :ScrollView {} + :KeyboardAvoidingView {} + :TextInput {} + :Image {} + :Picker {:Item {}} + :Switch {} + :Modal {} + :Keyboard {:dismiss (fn [])} + :Linking {} + :TouchableWithoutFeedback {} + :TouchableHighlight {} + :Pressable {} + :TouchableOpacity {} + :ActivityIndicator {} + :StyleSheet {:create (fn [])} + :Animated {:createAnimatedComponent identity + :Value (fn []) + :ValueXY (fn []) + :View {} + :FlatList {} + :ScrollView {} + :Text {}} + :Easing {:bezier (fn []) + :poly (fn []) + :out (fn []) + :in (fn []) + :inOut (fn [])} + :DeviceEventEmitter {:addListener (fn [])} + :Dimensions {:get (fn []) :addEventListener identity} + :useWindowDimensions {} + :Platform {:select (fn [])} + :I18nManager {:isRTL ""} + :NativeEventEmitter (fn []) + :LayoutAnimation {:Presets #js + {:easeInEaseOut nil + :linear nil + :spring nil} + :Types #js {} + :Properties #{} + :create (fn []) + :configureNext (fn [])} + :requireNativeComponent (fn [] {:propTypes ""}) + :Appearance {:getColorScheme (fn []) + :addChangeListener (fn [])}})) (set! js/ReactNative react-native) @@ -175,19 +176,19 @@ globalThis.__STATUS_MOBILE_JS_IDENTITY_PROXY__ = new Proxy({}, {get() { return ( (def react-native-navigation #js {:Navigation #js - {:constants (fn [] #js {:then identity}) - :setDefaultOptions identity - :setRoot identity - :dismissOverlay #(js/Promise.resolve) - :showOverlay identity + {:constants (fn [] #js {:then identity}) + :setDefaultOptions identity + :setRoot identity + :dismissOverlay #(js/Promise.resolve) + :showOverlay identity :setLazyComponentRegistrator identity - :pop identity - :push identity - :mergeOptions identity - :popToRoot identity - :showModal identity - :dismissModal identity - :registerComponent identity + :pop identity + :push identity + :mergeOptions identity + :popToRoot identity + :showModal identity + :dismissModal identity + :registerComponent identity :events (fn [] #js diff --git a/src/quo/components/button/view.cljs b/src/quo/components/button/view.cljs index a35aea044d..dd6f7601bb 100644 --- a/src/quo/components/button/view.cljs +++ b/src/quo/components/button/view.cljs @@ -66,15 +66,15 @@ border-radius 8 haptic-type :selection}} children] - (let [theme' (cond - disabled :disabled - :else theme) + (let [theme' (cond + disabled :disabled + :else theme) {:keys [icon-color background-color text-color border-color]} (themes theme') - optional-haptic (fn [] - (when haptic-feedback - (haptic/trigger haptic-type)))] + optional-haptic (fn [] + (when haptic-feedback + (haptic/trigger haptic-type)))] [animation/pressable (merge {:bg-color background-color :border-radius border-radius diff --git a/src/quo/components/controls/view.cljs b/src/quo/components/controls/view.cljs index 6c2e525fb7..75cff937b3 100644 --- a/src/quo/components/controls/view.cljs +++ b/src/quo/components/controls/view.cljs @@ -14,24 +14,24 @@ (fn [props] (let [{:keys [value onChange disabled]} (bean/bean props) - state (animated/use-value 0) - tap-state (animated/use-value (:undetermined gh/states)) - tap-handler (animated/on-gesture {:state tap-state}) - hold (react/use-memo - (fn [] - (animated/with-timing-transition - (animated/eq tap-state (:began gh/states)) - {})) - []) - transition (react/use-memo - (fn [] - (animated/with-spring-transition state - (:lazy - animated/springs))) - []) - press-end (fn [] - (when (and (not disabled) onChange) - (onChange (not value))))] + state (animated/use-value 0) + tap-state (animated/use-value (:undetermined gh/states)) + tap-handler (animated/on-gesture {:state tap-state}) + hold (react/use-memo + (fn [] + (animated/with-timing-transition + (animated/eq tap-state (:began gh/states)) + {})) + []) + transition (react/use-memo + (fn [] + (animated/with-spring-transition state + (:lazy + animated/springs))) + []) + press-end (fn [] + (when (and (not disabled) onChange) + (onChange (not value))))] (animated/code! (fn [] (animated/cond* (animated/eq tap-state (:end gh/states)) diff --git a/src/quo/components/header.cljs b/src/quo/components/header.cljs index eac11ec57c..c7d16a715c 100644 --- a/src/quo/components/header.cljs +++ b/src/quo/components/header.cljs @@ -102,7 +102,7 @@ (into [rn/view {:style header-actions-style}] (map header-action accessories)) - component component + component component :else [rn/view {:style header-action-placeholder}])]) @@ -111,7 +111,7 @@ [{:keys [title subtitle component title-align]}] [:<> (cond - component component + component component (and title subtitle) [:<> @@ -125,12 +125,12 @@ :number-of-lines 1} subtitle]] - title [text/text - {:weight :bold - :number-of-lines 0 - :align title-align - :size :large} - title])]) + title [text/text + {:weight :bold + :number-of-lines 0 + :align title-align + :size :large} + title])]) (defn header [{:keys [left-width right-width]}] diff --git a/src/quo/components/list/item.cljs b/src/quo/components/list/item.cljs index aae2b913f8..63160a2fb7 100644 --- a/src/quo/components/list/item.cljs +++ b/src/quo/components/list/item.cljs @@ -227,22 +227,22 @@ animated platform/ios? active-background-enabled true haptic-type :selection}}] - (let [theme (if disabled :disabled theme) + (let [theme (if disabled :disabled theme) {:keys [text-color active-background passive-background]} (themes theme) - icon-color (or icon-color - (:icon-color (themes theme))) - icon-bg-color (or icon-bg-color - (:icon-bg-color (themes theme))) - optional-haptic (fn [] - (when haptic-feedback - (haptic/trigger haptic-type))) - component (cond - (and (not on-press) - (not on-long-press)) - rn/view - animated animated/pressable - :else rn/touchable-highlight)] + icon-color (or icon-color + (:icon-color (themes theme))) + icon-bg-color (or icon-bg-color + (:icon-bg-color (themes theme))) + optional-haptic (fn [] + (when haptic-feedback + (haptic/trigger haptic-type))) + component (cond + (and (not on-press) + (not on-long-press)) + rn/view + animated animated/pressable + :else rn/touchable-highlight)] [rn/view {:background-color (cond (not= background-color nil) background-color diff --git a/src/quo/components/text.cljs b/src/quo/components/text.cljs index 47e893916e..e8b4e828ad 100644 --- a/src/quo/components/text.cljs +++ b/src/quo/components/text.cljs @@ -47,7 +47,10 @@ (into [component (merge {:style (text-style props)} (dissoc props - :style :size - :weight :color - :align :animated?))] + :style + :size + :weight + :color + :align + :animated?))] (reagent/children this)))) diff --git a/src/quo/components/text_input.cljs b/src/quo/components/text_input.cljs index ebfe48cce5..78edd8d176 100644 --- a/src/quo/components/text_input.cljs +++ b/src/quo/components/text_input.cljs @@ -186,7 +186,7 @@ {:icon :main-icons/show :on-press #(reset! visible true)} - :else after) + :else after) secure (boolean (and secure-text-entry (not @visible))) ; must be a boolean to work on ; iOS auto-complete (cond @@ -259,12 +259,15 @@ (when (and platform/ios? (not after)) {:clear-button-mode :while-editing}) (dissoc props - :style - :keyboard-type :on-focus - :on-blur - :secure-text-entry - :ref :get-ref - :auto-correct :auto-complete-type))] + :style + :keyboard-type + :on-focus + :on-blur + :secure-text-entry + :ref + :get-ref + :auto-correct + :auto-complete-type))] (when after [accessory-element after])] (when (and show-cancel diff --git a/src/quo/previews/button.cljs b/src/quo/previews/button.cljs index b7d54cfac5..5de8449e17 100644 --- a/src/quo/previews/button.cljs +++ b/src/quo/previews/button.cljs @@ -61,9 +61,9 @@ :justify-content :center} [quo/button (merge (dissoc @state - :theme - :before - :after) + :theme + :before + :after) {:on-press #(println "Hello world!")} (when @theme {:theme @theme}) diff --git a/src/quo/react_native.cljs b/src/quo/react_native.cljs index 1b1df5c451..202bebf8b0 100644 --- a/src/quo/react_native.cljs +++ b/src/quo/react_native.cljs @@ -121,8 +121,8 @@ :property (:opacity layout-animation-properties)}}}) (defonce enable-layout-animations - (when platform/android? - (.setLayoutAnimationEnabledExperimental ^js ui-manager true))) + (when platform/android? + (.setLayoutAnimationEnabledExperimental ^js ui-manager true))) (def activity-indicator (reagent/adapt-react-class (.-ActivityIndicator ^js rn))) diff --git a/src/quo2/components/animated_header_flatlist/view.cljs b/src/quo2/components/animated_header_flatlist/view.cljs index 27069d5ce1..1c2a5aa3a6 100644 --- a/src/quo2/components/animated_header_flatlist/view.cljs +++ b/src/quo2/components/animated_header_flatlist/view.cljs @@ -1,16 +1,16 @@ (ns quo2.components.animated-header-flatlist.view (:require - [quo2.core :as quo] - [react-native.core :as rn] - [react-native.platform :as platform] - [react-native.reanimated :as reanimated] - [react-native.safe-area :as safe-area] - [reagent.core :as reagent] - [quo2.foundations.colors :as colors] - [status-im.ui.components.fast-image :as fast-image] - [quo2.components.animated-header-flatlist.style :as style] - [oops.core :as oops] - [utils.re-frame :as rf])) + [quo2.core :as quo] + [react-native.core :as rn] + [react-native.platform :as platform] + [react-native.reanimated :as reanimated] + [react-native.safe-area :as safe-area] + [reagent.core :as reagent] + [quo2.foundations.colors :as colors] + [status-im.ui.components.fast-image :as fast-image] + [quo2.components.animated-header-flatlist.style :as style] + [oops.core :as oops] + [utils.re-frame :as rf])) (def header-height 234) (def cover-height 192) diff --git a/src/quo2/components/buttons/button.cljs b/src/quo2/components/buttons/button.cljs index 1f395d7d66..0414bfa2a9 100644 --- a/src/quo2/components/buttons/button.cljs +++ b/src/quo2/components/buttons/button.cljs @@ -256,7 +256,7 @@ (if (= state :pressed) (colors/theme-colors colors/neutral-100 colors/white) :transparent) - :width width} + :width width} style)} [rn/view {:style (merge diff --git a/src/quo2/components/community/token_gating.cljs b/src/quo2/components/community/token_gating.cljs index afcf99e3b9..53a5f9a761 100644 --- a/src/quo2/components/community/token_gating.cljs +++ b/src/quo2/components/community/token_gating.cljs @@ -90,32 +90,36 @@ (defn token-requirement-list [props community-color] - (let [{:keys [gate token-requirements-changed? required-tokens-lost?]} props + (let [{:keys [gate token-requirements-changed? + required-tokens-lost?]} props [gate-type token-requirement-lists] gate - multiple-token-requirements? (multiple-token-requirements? token-requirement-lists) - is-sufficient? (are-multiple-token-requirements-met? token-requirement-lists) - you-must-hold-label (if (= gate-type :join) - (cond - token-requirements-changed? :t/you-must-now-hold - required-tokens-lost? :t/you-must-always-hold - :else :t/you-must-hold) - :t/you-must-hold) - message-label (cond - (= gate-type :join) - (cond - token-requirements-changed? :t/community-join-requirements-changed - required-tokens-lost? :t/community-join-requirements-tokens-lost - :else (if is-sufficient? + multiple-token-requirements? (multiple-token-requirements? token-requirement-lists) + is-sufficient? (are-multiple-token-requirements-met? + token-requirement-lists) + you-must-hold-label (if (= gate-type :join) + (cond + token-requirements-changed? :t/you-must-now-hold + required-tokens-lost? :t/you-must-always-hold + :else :t/you-must-hold) + :t/you-must-hold) + message-label (cond + (= gate-type :join) + (cond + token-requirements-changed? + :t/community-join-requirements-changed + required-tokens-lost? + :t/community-join-requirements-tokens-lost + :else (if is-sufficient? :t/community-join-requirements-met :t/community-join-requirements-not-met)) - (= gate-type :read) - (if is-sufficient? - :t/community-channel-read-requirements-met - :t/community-channel-read-requirements-not-met) - (= gate-type :write) - (if is-sufficient? - :t/community-channel-write-requirements-met - :t/community-channel-write-requirements-not-met))] + (= gate-type :read) + (if is-sufficient? + :t/community-channel-read-requirements-met + :t/community-channel-read-requirements-not-met) + (= gate-type :write) + (if is-sufficient? + :t/community-channel-write-requirements-met + :t/community-channel-write-requirements-not-met))] [rn/view [rn/view {:style (get styles :token-requirement-text-spacing)} [text/text diff --git a/src/quo2/components/header.cljs b/src/quo2/components/header.cljs index 307aad9679..f02fba3da9 100644 --- a/src/quo2/components/header.cljs +++ b/src/quo2/components/header.cljs @@ -103,7 +103,7 @@ (into [rn/view {:style header-actions-style}] (map header-action accessories)) - component component + component component :else [rn/view {:style header-action-placeholder}])]) @@ -112,7 +112,7 @@ [{:keys [title subtitle component title-align]}] [:<> (cond - component component + component component (and title subtitle) [:<> @@ -126,12 +126,12 @@ :number-of-lines 1} subtitle]] - title [text/text - {:weight :bold - :number-of-lines 0 - :align title-align - :size :large} - title])]) + title [text/text + {:weight :bold + :number-of-lines 0 + :align title-align + :size :large} + title])]) (defn header [{:keys [left-width right-width]}] diff --git a/src/quo2/components/icon.cljs b/src/quo2/components/icon.cljs index fdf22d623e..cf4c2dda2d 100644 --- a/src/quo2/components/icon.cljs +++ b/src/quo2/components/icon.cljs @@ -24,6 +24,6 @@ container-style) :accessibility-label accessibility-label - :source (icons/icon-source (str (name icon-name) size))}]))) + :source (icons/icon-source (str (name icon-name) size))}]))) (def icon (memoize memo-icon-fn)) diff --git a/src/quo2/components/profile/profile_card/view.cljs b/src/quo2/components/profile/profile_card/view.cljs index d7fb59e205..061717d967 100644 --- a/src/quo2/components/profile/profile_card/view.cljs +++ b/src/quo2/components/profile/profile_card/view.cljs @@ -1,12 +1,12 @@ (ns quo2.components.profile.profile-card.view (:require - [quo2.components.profile.profile-card.style :as style] - [quo2.foundations.colors :as colors] - [quo2.components.avatars.user-avatar :as user-avatar] - [quo2.components.icon :as icon] - [quo2.components.markdown.text :as text] - [quo2.components.buttons.button :as button] - [react-native.core :as rn])) + [quo2.components.profile.profile-card.style :as style] + [quo2.foundations.colors :as colors] + [quo2.components.avatars.user-avatar :as user-avatar] + [quo2.components.icon :as icon] + [quo2.components.markdown.text :as text] + [quo2.components.buttons.button :as button] + [react-native.core :as rn])) (defn profile-card diff --git a/src/quo2/components/record_audio/record_audio/buttons/send_button.cljs b/src/quo2/components/record_audio/record_audio/buttons/send_button.cljs index 73646d74b5..c200da0970 100644 --- a/src/quo2/components/record_audio/record_audio/buttons/send_button.cljs +++ b/src/quo2/components/record_audio/record_audio/buttons/send_button.cljs @@ -71,7 +71,7 @@ (cond @ready-to-send? (start-y-animation) - @recording? (reset-y-animation))) + @recording? (reset-y-animation))) [@ready-to-send?]) [:<> [reanimated/view {:style (style/send-button-container opacity)} diff --git a/src/quo2/components/record_audio/record_audio/view.cljs b/src/quo2/components/record_audio/record_audio/view.cljs index 8c2eca9c03..2e32b98695 100644 --- a/src/quo2/components/record_audio/record_audio/view.cljs +++ b/src/quo2/components/record_audio/record_audio/view.cljs @@ -157,28 +157,28 @@ [{:keys [on-start-recording on-send on-cancel on-reviewing-audio]}] [:f> (fn [] - (let [recording? (reagent/atom false) - locked? (reagent/atom false) - ready-to-send? (reagent/atom false) - ready-to-lock? (reagent/atom false) - ready-to-delete? (reagent/atom false) - reviewing-audio? (reagent/atom false) - playing-audio? (reagent/atom false) - recording-length-ms (reagent/atom 0) - audio-current-time-ms (reagent/atom 0) - seeking-audio? (reagent/atom false) - clear-timeout (atom nil) + (let [recording? (reagent/atom false) + locked? (reagent/atom false) + ready-to-send? (reagent/atom false) + ready-to-lock? (reagent/atom false) + ready-to-delete? (reagent/atom false) + reviewing-audio? (reagent/atom false) + playing-audio? (reagent/atom false) + recording-length-ms (reagent/atom 0) + audio-current-time-ms (reagent/atom 0) + seeking-audio? (reagent/atom false) + clear-timeout (atom nil) record-button-at-initial-position? (atom true) - record-button-is-animating? (atom false) - idle? (atom false) - touch-active? (atom false) - recording-timer (atom nil) - playing-timer (atom nil) - recorder-ref (atom nil) - player-ref (atom nil) - record-audio-permission-granted (atom true) - output-file (atom nil) - reached-max-duration? (atom false) + record-button-is-animating? (atom false) + idle? (atom false) + touch-active? (atom false) + recording-timer (atom nil) + playing-timer (atom nil) + recorder-ref (atom nil) + player-ref (atom nil) + record-audio-permission-granted (atom true) + output-file (atom nil) + reached-max-duration? (atom false) check-audio-permission (fn [] (permissions/permission-granted? diff --git a/src/quo2/components/tabs/tabs.cljs b/src/quo2/components/tabs/tabs.cljs index 67cf2ad193..6ed9c2c638 100644 --- a/src/quo2/components/tabs/tabs.cljs +++ b/src/quo2/components/tabs/tabs.cljs @@ -145,12 +145,12 @@ [rn/flat-list (merge (dissoc props - :default-active - :fade-end-percentage - :fade-end? - :on-change - :scroll-on-press? - :size) + :default-active + :fade-end-percentage + :fade-end? + :on-change + :scroll-on-press? + :size) (when scroll-on-press? {:initial-scroll-index (utils.collection/first-index #(= @active-tab-id (:id %)) data)}) {:ref #(reset! flat-list-ref %) diff --git a/src/quo2/components/tags/tag.cljs b/src/quo2/components/tags/tag.cljs index 56579ad751..ef03c3f8fa 100644 --- a/src/quo2/components/tags/tag.cljs +++ b/src/quo2/components/tags/tag.cljs @@ -85,9 +85,9 @@ (fn [{:keys [id on-press disabled? size resource active accessibility-label label type labelled? blurred? icon-color] :or {size 32}}] - (let [state (cond disabled? :disabled - active :active - :else :default) + (let [state (cond disabled? :disabled + active :active + :else :default) {:keys [border-color blurred-border-color text-color]} (get-in themes [(theme/get-theme) state])] [rn/view {:style {:align-items :center}} diff --git a/src/quo2/components/tags/tags.cljs b/src/quo2/components/tags/tags.cljs index d563141487..e477180b6e 100644 --- a/src/quo2/components/tags/tags.cljs +++ b/src/quo2/components/tags/tags.cljs @@ -95,12 +95,12 @@ [rn/flat-list (merge (dissoc props - :default-active - :fade-end-percentage - :fade-end? - :on-change - :scroll-on-press? - :size) + :default-active + :fade-end-percentage + :fade-end? + :on-change + :scroll-on-press? + :size) (when scroll-on-press? {:initial-scroll-index (utils.collection/first-index #(= @active-tab-id (:id %)) data)}) {:ref #(reset! flat-list-ref %) diff --git a/src/quo2/components/tags/token_tag.cljs b/src/quo2/components/tags/token_tag.cljs index c201050a3a..102a17f05f 100644 --- a/src/quo2/components/tags/token_tag.cljs +++ b/src/quo2/components/tags/token_tag.cljs @@ -57,11 +57,11 @@ :margin-right (get-value-from-size size 8 6)} token-img-style)}] [text/text - {:weight :medium + {:weight :medium :number-of-lines 1 :style {:margin-right (get-value-from-size size 12 11)} - :size (get-value-from-size size :paragraph-2 :label)} label] + :size (get-value-from-size size :paragraph-2 :label)} label] overlay]])) (defn token-tag @@ -82,9 +82,9 @@ {size :small border-color (colors/custom-color-by-theme :purple 50 60)}}] [tag - {:size size + {:size size :token-img-src token-img-src - :border-color (when is-required border-color) + :border-color (when is-required border-color) :overlay (when (or is-required is-purchasable) [rn/view diff --git a/src/quo2/core.cljs b/src/quo2/core.cljs index 875a9eb1e9..759b817b4f 100644 --- a/src/quo2/core.cljs +++ b/src/quo2/core.cljs @@ -1,65 +1,65 @@ (ns quo2.core (:refer-clojure :exclude [filter]) (:require - quo2.components.avatars.account-avatar - quo2.components.avatars.channel-avatar - quo2.components.avatars.group-avatar - quo2.components.avatars.icon-avatar - quo2.components.avatars.user-avatar - quo2.components.avatars.wallet-user-avatar - quo2.components.banners.banner.view - quo2.components.buttons.button - quo2.components.buttons.dynamic-button - quo2.components.community.community-card-view - quo2.components.community.community-list-view - quo2.components.community.community-view - quo2.components.community.discover-card - quo2.components.community.icon - quo2.components.community.token-gating - quo2.components.counter.counter - quo2.components.dividers.date - quo2.components.dividers.divider-label - quo2.components.dividers.new-messages - quo2.components.drawers.action-drawers.view - quo2.components.drawers.drawer-buttons.view - quo2.components.drawers.permission-context.view - quo2.components.dropdowns.dropdown - quo2.components.header - quo2.components.icon - quo2.components.info.info-message - quo2.components.info.information-box - quo2.components.list-items.channel - quo2.components.list-items.menu-item - quo2.components.list-items.preview-list - quo2.components.loaders.skeleton - quo2.components.markdown.text - quo2.components.messages.author.view - quo2.components.messages.gap - quo2.components.messages.system-message - quo2.components.navigation.floating-shell-button - quo2.components.navigation.page-nav - quo2.components.notifications.activity-log.view - quo2.components.notifications.count-down-circle - quo2.components.notifications.info-count - quo2.components.notifications.notification-dot - quo2.components.notifications.toast - quo2.components.profile.profile-card.view - quo2.components.reactions.reaction - quo2.components.selectors.disclaimer.view - quo2.components.selectors.filter.view - quo2.components.selectors.selectors - quo2.components.separator - quo2.components.settings.accounts.view - quo2.components.settings.privacy-option - quo2.components.onboarding.small-option-card.view - quo2.components.tabs.account-selector - quo2.components.tabs.tabs - quo2.components.tags.context-tags - quo2.components.tags.status-tags - quo2.components.tags.permission-tag - quo2.components.tags.tag - quo2.components.tags.tags - quo2.components.tags.token-tag)) + quo2.components.avatars.account-avatar + quo2.components.avatars.channel-avatar + quo2.components.avatars.group-avatar + quo2.components.avatars.icon-avatar + quo2.components.avatars.user-avatar + quo2.components.avatars.wallet-user-avatar + quo2.components.banners.banner.view + quo2.components.buttons.button + quo2.components.buttons.dynamic-button + quo2.components.community.community-card-view + quo2.components.community.community-list-view + quo2.components.community.community-view + quo2.components.community.discover-card + quo2.components.community.icon + quo2.components.community.token-gating + quo2.components.counter.counter + quo2.components.dividers.date + quo2.components.dividers.divider-label + quo2.components.dividers.new-messages + quo2.components.drawers.action-drawers.view + quo2.components.drawers.drawer-buttons.view + quo2.components.drawers.permission-context.view + quo2.components.dropdowns.dropdown + quo2.components.header + quo2.components.icon + quo2.components.info.info-message + quo2.components.info.information-box + quo2.components.list-items.channel + quo2.components.list-items.menu-item + quo2.components.list-items.preview-list + quo2.components.loaders.skeleton + quo2.components.markdown.text + quo2.components.messages.author.view + quo2.components.messages.gap + quo2.components.messages.system-message + quo2.components.navigation.floating-shell-button + quo2.components.navigation.page-nav + quo2.components.notifications.activity-log.view + quo2.components.notifications.count-down-circle + quo2.components.notifications.info-count + quo2.components.notifications.notification-dot + quo2.components.notifications.toast + quo2.components.profile.profile-card.view + quo2.components.reactions.reaction + quo2.components.selectors.disclaimer.view + quo2.components.selectors.filter.view + quo2.components.selectors.selectors + quo2.components.separator + quo2.components.settings.accounts.view + quo2.components.settings.privacy-option + quo2.components.onboarding.small-option-card.view + quo2.components.tabs.account-selector + quo2.components.tabs.tabs + quo2.components.tags.context-tags + quo2.components.tags.status-tags + quo2.components.tags.permission-tag + quo2.components.tags.tag + quo2.components.tags.tags + quo2.components.tags.token-tag)) (def toast quo2.components.notifications.toast/toast) (def button quo2.components.buttons.button/button) diff --git a/src/quo2/foundations/colors.cljs b/src/quo2/foundations/colors.cljs index 2e68f474f7..9f9be077e9 100644 --- a/src/quo2/foundations/colors.cljs +++ b/src/quo2/foundations/colors.cljs @@ -168,7 +168,7 @@ ;; Colors for customizing profiles and communities themes (def customization - {:primary {50 primary-50 ;; User can also use primary color as customisation color + {:primary {50 primary-50 ;; User can also use primary color as customisation color 60 primary-60} :purple {50 "#8661C1" 60 "#5E478C"} diff --git a/src/react_native/core.cljs b/src/react_native/core.cljs index 2feea4ef5c..720f617bc3 100644 --- a/src/react_native/core.cljs +++ b/src/react_native/core.cljs @@ -131,5 +131,5 @@ (.-RNSelectableTextInputManager ^js (.-NativeModules ^js react-native)))) (defonce selectable-text-input - (reagent/adapt-react-class - (.requireNativeComponent ^js react-native "RNSelectableTextInput"))) + (reagent/adapt-react-class + (.requireNativeComponent ^js react-native "RNSelectableTextInput"))) diff --git a/src/status_im/bootnodes/core_test.cljs b/src/status_im/bootnodes/core_test.cljs index 8852b38793..9096a9b044 100644 --- a/src/status_im/bootnodes/core_test.cljs +++ b/src/status_im/bootnodes/core_test.cljs @@ -125,8 +125,8 @@ (let [cofx {:db {:networks/current-network "mainnet_rpc" :multiaccount {:custom-bootnodes {"mainnet_rpc" - {"a" {:id "a" - :name "name" + {"a" {:id "a" + :name "name" :address "enode://old-id:old-password@url:port"}}}}}}] (is (model/fetch cofx "a"))))) @@ -154,8 +154,8 @@ (let [cofx {:db {:networks/current-network "mainnet_rpc" :multiaccount {:custom-bootnodes {"mainnet_rpc" - {"a" {:id "a" - :name "name" + {"a" {:id "a" + :name "name" :address "enode://old-id:old-password@url:port"}}} :custom-bootnodes-enabled? @@ -167,8 +167,8 @@ (let [cofx {:db {:networks/current-network "mainnet_rpc" :multiaccount {:custom-bootnodes {"mainnet_rpc" - {"a" {:id "a" - :name "name" + {"a" {:id "a" + :name "name" :address "enode://old-id:old-password@url:port"}}} :custom-bootnodes-enabled? diff --git a/src/status_im/browser/core.cljs b/src/status_im/browser/core.cljs index 02250c4b79..a093e23a47 100644 --- a/src/status_im/browser/core.cljs +++ b/src/status_im/browser/core.cljs @@ -1,31 +1,31 @@ (ns status-im.browser.core (:require - ["eth-phishing-detect" :as eth-phishing-detect] - [clojure.string :as string] - [re-frame.core :as re-frame] - [status-im2.common.bottom-sheet.events :as bottom-sheet] - [status-im.browser.eip3085 :as eip3085] - [status-im.browser.eip3326 :as eip3326] - [status-im.browser.permissions :as browser.permissions] - [status-im.browser.webview-ref :as webview-ref] - [status-im2.constants :as constants] - [status-im.ethereum.core :as ethereum] - [status-im.ethereum.ens :as ens] - [utils.i18n :as i18n] - [status-im.multiaccounts.update.core :as multiaccounts.update] - [status-im.native-module.core :as status] - [status-im.signing.core :as signing] - [status-im.ui.components.list-selection :as list-selection] - [utils.re-frame :as rf] - [status-im.utils.http :as http] - [status-im.utils.platform :as platform] - [status-im.utils.random :as random] - [status-im.utils.types :as types] - [status-im.utils.universal-links.utils :as links] - [status-im2.navigation.events :as navigation] - [taoensso.timbre :as log] - [utils.debounce :as debounce] - [utils.security.core :as security])) + ["eth-phishing-detect" :as eth-phishing-detect] + [clojure.string :as string] + [re-frame.core :as re-frame] + [status-im2.common.bottom-sheet.events :as bottom-sheet] + [status-im.browser.eip3085 :as eip3085] + [status-im.browser.eip3326 :as eip3326] + [status-im.browser.permissions :as browser.permissions] + [status-im.browser.webview-ref :as webview-ref] + [status-im2.constants :as constants] + [status-im.ethereum.core :as ethereum] + [status-im.ethereum.ens :as ens] + [utils.i18n :as i18n] + [status-im.multiaccounts.update.core :as multiaccounts.update] + [status-im.native-module.core :as status] + [status-im.signing.core :as signing] + [status-im.ui.components.list-selection :as list-selection] + [utils.re-frame :as rf] + [status-im.utils.http :as http] + [status-im.utils.platform :as platform] + [status-im.utils.random :as random] + [status-im.utils.types :as types] + [status-im.utils.universal-links.utils :as links] + [status-im2.navigation.events :as navigation] + [taoensso.timbre :as log] + [utils.debounce :as debounce] + [utils.security.core :as security])) (rf/defn update-browser-option [{:keys [db]} option-key option-value] @@ -201,8 +201,8 @@ {:db (-> (update db :browser/options assoc - :url (str gateway path) - :resolving? false) + :url (str gateway path) + :resolving? false) (assoc-in [:browser/options :resolved-ens host] gateway))}))) (rf/defn resolve-ens-multihash-error @@ -384,8 +384,9 @@ (not (vector? params))) ;; We don't use signer argument for keycard sign-typed-data ["0x0" params] - message? (normalize-sign-message-params params typed?) - :else [nil nil])] + message? (normalize-sign-message-params params + typed?) + :else [nil nil])] (when (or (not message?) (and address data)) (signing/sign cofx (merge diff --git a/src/status_im/browser/eip3326.cljs b/src/status_im/browser/eip3326.cljs index 2568f7489b..7688bee1af 100644 --- a/src/status_im/browser/eip3326.cljs +++ b/src/status_im/browser/eip3326.cljs @@ -42,10 +42,10 @@ {:dispatch [:bottom-sheet/show-sheet {:content (fn [] [sheet/permissions-panel dapp-name message-id params])}]})) - {:browser/send-to-bridge {:type constants/web3-send-async-callback + {:browser/send-to-bridge {:type constants/web3-send-async-callback :messageId message-id :error - {:code 4902 + {:code 4902 :message (str "Unrecognized chain ID: " diff --git a/src/status_im/chat/models/input.cljs b/src/status_im/chat/models/input.cljs index 2330a9e062..a4463864d4 100644 --- a/src/status_im/chat/models/input.cljs +++ b/src/status_im/chat/models/input.cljs @@ -135,9 +135,9 @@ (when-not (string/blank? input-text) (let [{:keys [message-id]} (get-in db [:chat/inputs current-chat-id :metadata :responding-to-message]) - preferred-name (get-in db [:multiaccount :preferred-name]) - emoji? (message-content/emoji-only-content? {:text input-text - :response-to message-id})] + preferred-name (get-in db [:multiaccount :preferred-name]) + emoji? (message-content/emoji-only-content? {:text input-text + :response-to message-id})] {:chat-id current-chat-id :content-type (if emoji? constants/content-type-emoji diff --git a/src/status_im/chat/models/loading.cljs b/src/status_im/chat/models/loading.cljs index 966b182a5e..9c8f447e02 100644 --- a/src/status_im/chat/models/loading.cljs +++ b/src/status_im/chat/models/loading.cljs @@ -118,7 +118,7 @@ (when-not (and (get-in db [:pagination-info chat-id :messages-initialized?]) (not= session-id (get-in db [:pagination-info chat-id :messages-initialized?]))) - (let [already-loaded-messages (get-in db [:messages chat-id]) + (let [already-loaded-messages (get-in db [:messages chat-id]) ;; We remove those messages that are already loaded, as we might get some duplicates {:keys [all-messages new-messages senders contacts]} (reduce (fn [{:keys [all-messages] :as acc} @@ -138,11 +138,11 @@ :contacts {} :new-messages []} messages) - current-clock-value (get-in db - [:pagination-info chat-id - :cursor-clock-value]) - clock-value (when cursor (cursor->clock-value cursor)) - new-messages (map mark-album new-messages)] + current-clock-value (get-in db + [:pagination-info chat-id + :cursor-clock-value]) + clock-value (when cursor (cursor->clock-value cursor)) + new-messages (map mark-album new-messages)] {:dispatch [:chat/add-senders-to-chat-users (vals senders)] :db (-> db (update-in [:pagination-info chat-id :cursor-clock-value] diff --git a/src/status_im/chat/models/mentions.cljs b/src/status_im/chat/models/mentions.cljs index c510290e7c..b430e34789 100644 --- a/src/status_im/chat/models/mentions.cljs +++ b/src/status_im/chat/models/mentions.cljs @@ -163,7 +163,7 @@ (inc idx)) code-tag? - (let [len (code-tag-len idxs idx) + (let [len (code-tag-len idxs idx) {:keys [data next-idx]} (apply-style-tag data idx pos c len true true)] (recur data next-idx)) @@ -175,7 +175,7 @@ (apply-style-tag data idx pos c len can-be-start? can-be-end?)] (recur data next-idx)) - :else (recur data (inc idx))))))))) + :else (recur data (inc idx))))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -273,7 +273,7 @@ (= chat-type constants/public-chat-type) (merge mentionable-users (select-keys mentionable-contacts (keys mentionable-users))) - :else mentionable-users))) + :else mentionable-users))) (def ending-chars "[\\s\\.,;:]") (def ending-chars-regex (re-pattern ending-chars)) @@ -431,35 +431,36 @@ {:from idx :checked? false}) new-idxs) - (let [diff (- new-text-len old-text-len) + (let [diff (- new-text-len old-text-len) {:keys [state added?]} (->> at-idxs - (keep (fn [{:keys [from to] :as entry}] - (let [to+1 (inc to)] - (cond - ;; starts after change - (>= from old-end) - (assoc entry - :from (+ from diff) - :to (+ to diff)) + (keep + (fn [{:keys [from to] :as entry}] + (let [to+1 (inc to)] + (cond + ;; starts after change + (>= from old-end) + (assoc entry + :from (+ from diff) + :to (+ to diff)) - ;; starts and end before change - (and - (< from start) - (or - ;; is not checked yet - (not to+1) - (< to+1 start))) - entry + ;; starts and end before change + (and + (< from start) + (or + ;; is not checked yet + (not to+1) + (< to+1 start))) + entry - ;; starts before change intersects with it - (and (< from start) - (>= to+1 start)) - {:from from - :checked? false} + ;; starts before change intersects with it + (and (< from start) + (>= to+1 start)) + {:from from + :checked? false} - ;; starts in changed part of text - :else nil)))) + ;; starts in changed part of text + :else nil)))) (reduce (fn [{:keys [state added?] :as acc} {:keys [from] :as entry}] (if (and last-new-idx @@ -595,11 +596,11 @@ (rf/defn calculate-suggestions {:events [::calculate-suggestions]} [{:keys [db]} mentionable-users] - (let [chat-id (:current-chat-id db) - text (get-in db [:chat/inputs chat-id :input-text]) + (let [chat-id (:current-chat-id db) + text (get-in db [:chat/inputs chat-id :input-text]) {:keys [new-text at-idxs start end] :as state} (get-in db [:chats/mentions chat-id :mentions]) - new-text (or new-text text)] + new-text (or new-text text)] (log/debug "[mentions] calculate suggestions" "state" state) @@ -608,17 +609,17 @@ (assoc-in [:chats/mention-suggestions chat-id] nil) (assoc-in [:chats/mentions chat-id :mentions :at-idxs] nil) (assoc-in [:chat/inputs-with-mentions chat-id] [[:text text]]))} - (let [new-at-idxs (check-idx-for-mentions - text - at-idxs - mentionable-users) + (let [new-at-idxs (check-idx-for-mentions + text + at-idxs + mentionable-users) calculated-input (calculate-input text new-at-idxs) - addition? (<= start end) - end (if addition? - (+ start (count new-text)) - start) - at-sign-idx (string/last-index-of text at-sign start) - searched-text (string/lower-case (subs text (inc at-sign-idx) end)) + addition? (<= start end) + end (if addition? + (+ start (count new-text)) + start) + at-sign-idx (string/last-index-of text at-sign start) + searched-text (string/lower-case (subs text (inc at-sign-idx) end)) mentions (when (and (not (> at-sign-idx start)) (not (> (- end at-sign-idx) 100))) @@ -642,8 +643,8 @@ (defn new-input-text-with-mention [{:keys [db]} {:keys [name]}] - (let [chat-id (:current-chat-id db) - text (get-in db [:chat/inputs chat-id :input-text]) + (let [chat-id (:current-chat-id db) + text (get-in db [:chat/inputs chat-id :input-text]) {:keys [mention-end at-sign-idx]} (get-in db [:chats/mentions chat-id :mentions])] (log/debug "[mentions] clear suggestions" @@ -688,7 +689,7 @@ [{:keys [db] :as cofx} {:keys [start end] :as selection} mentionable-users] - (let [chat-id (:current-chat-id db) + (let [chat-id (:current-chat-id db) {:keys [mention-end at-idxs]} (get-in db [:chats/mentions chat-id :mentions])] (when (seq at-idxs) diff --git a/src/status_im/chat/models/message.cljs b/src/status_im/chat/models/message.cljs index baaf6e3b5e..cb6f7fa0b7 100644 --- a/src/status_im/chat/models/message.cljs +++ b/src/status_im/chat/models/message.cljs @@ -117,14 +117,14 @@ (defn receive-many [{:keys [db]} ^js response-js] - (let [messages-js ^js (.splice (.-messages response-js) 0 (if platform/low-device? 3 10)) + (let [messages-js ^js (.splice (.-messages response-js) 0 (if platform/low-device? 3 10)) {:keys [db senders]} (reduce reduce-js-messages {:db db :chats #{} :senders {} :transactions #{}} messages-js)] ;;we want to render new messages as soon as possible ;;so we dispatch later all other events which can be handled async - {:db db + {:db db :utils/dispatch-later (concat [{:ms 20 :dispatch [:process-response response-js]}] (when (and (:current-chat-id db) (= "active" (:app-state db))) diff --git a/src/status_im/chat/models/message_test.cljs b/src/status_im/chat/models/message_test.cljs index 48284f4e84..43a5bed9db 100644 --- a/src/status_im/chat/models/message_test.cljs +++ b/src/status_im/chat/models/message_test.cljs @@ -36,11 +36,11 @@ {:messages-initialized? true :cursor "00000000000000000000000000000000000000000000000000090x0000000000000000000000000000000000000000000000000000000000000000" - :cursor-clock-value 9}}}} + :cursor-clock-value 9}}}} (dissoc (message/receive-many cofx #js {:messages (to-array [message])}) - :utils/dispatch-later))))) + :utils/dispatch-later))))) ;; <- cursor ;; <- first-hidden-item ;; <- message @@ -56,11 +56,11 @@ {:messages-initialized? true :cursor "00000000000000000000000000000000000000000000000000090x0000000000000000000000000000000000000000000000000000000000000000" - :cursor-clock-value 9}}}} + :cursor-clock-value 9}}}} (dissoc (message/receive-many cofx #js {:messages (to-array [message])}) - :utils/dispatch-later))))) + :utils/dispatch-later))))) ;; <- cursor ;; <- message ;; <- first-hidden-item @@ -70,7 +70,7 @@ (let [result (dissoc (message/receive-many cofx #js {:messages (to-array [message])}) - :utils/dispatch-later)] + :utils/dispatch-later)] (testing "it sets all-loaded? to false" (is (not (get-in result [:db :pagination-info chat-id :all-loaded?])))) (testing "it updates cursor-clock-value & cursor" @@ -89,7 +89,7 @@ :cursor :cursor-clock-value) #js {:messages (to-array [message])}) - :utils/dispatch-later)] + :utils/dispatch-later)] (testing "it sets all-loaded? to false" (is (not (get-in result [:db :pagination-info chat-id :all-loaded?])))) (testing "it updates cursor-clock-value & cursor" @@ -112,7 +112,7 @@ result (dissoc (message/receive-many cofx #js {:messages (to-array [message])}) - :utils/dispatch-later)] + :utils/dispatch-later)] (testing "it sets all-loaded? to false" (is (not (get-in result [:db :pagination-info chat-id :all-loaded?])))) (testing "it does not update cursor-clock-value & cursor" diff --git a/src/status_im/communities/core.cljs b/src/status_im/communities/core.cljs index 3dc97c5c65..8dfa8d95ce 100644 --- a/src/status_im/communities/core.cljs +++ b/src/status_im/communities/core.cljs @@ -210,11 +210,11 @@ (rf/defn chat-created {:events [::chat-created]} [_ community-id user-pk] - {:json-rpc/call [{:method "wakuext_sendChatMessage" - :params [{:chatId user-pk - :text "Upgrade here to see an invitation to community" - :communityId community-id - :contentType constants/content-type-community}] + {:json-rpc/call [{:method "wakuext_sendChatMessage" + :params [{:chatId user-pk + :text "Upgrade here to see an invitation to community" + :communityId community-id + :contentType constants/content-type-community}] :js-response true :on-success #(re-frame/dispatch [:transport/message-sent %]) diff --git a/src/status_im/contact/block.cljs b/src/status_im/contact/block.cljs index 92b565998d..078197d5a5 100644 --- a/src/status_im/contact/block.cljs +++ b/src/status_im/contact/block.cljs @@ -43,11 +43,11 @@ (types/js->clj chats)))] (apply rf/merge cofx - {:db (-> db - (update :chats dissoc public-key) - (update :chats-home-list disj public-key) - (assoc-in [:contacts/contacts public-key :added] false)) - :dispatch [:shell/close-switcher-card public-key] + {:db (-> db + (update :chats dissoc public-key) + (update :chats-home-list disj public-key) + (assoc-in [:contacts/contacts public-key :added] false)) + :dispatch [:shell/close-switcher-card public-key] :clear-message-notifications [[public-key] (get-in db [:multiaccount :remote-push-notifications-enabled?])]} (activity-center/notifications-fetch-unread-count) diff --git a/src/status_im/contact/db.cljs b/src/status_im/contact/db.cljs index c7c07383eb..26907d24a0 100644 --- a/src/status_im/contact/db.cljs +++ b/src/status_im/contact/db.cljs @@ -66,10 +66,10 @@ (defn get-all-contacts-in-group-chat [members admins contacts {:keys [public-key] :as current-account}] (let [current-contact (some-> - current-account - (select-keys [:name :preferred-name :public-key :identicon :images]) - (set/rename-keys {:name :alias - :preferred-name :name})) + current-account + (select-keys [:name :preferred-name :public-key :identicon :images]) + (set/rename-keys {:name :alias + :preferred-name :name})) all-contacts (cond-> contacts current-contact (assoc public-key current-contact))] diff --git a/src/status_im/contact/db_test.cljs b/src/status_im/contact/db_test.cljs index d66f10d79e..ec83e8bbbe 100644 --- a/src/status_im/contact/db_test.cljs +++ b/src/status_im/contact/db_test.cljs @@ -19,17 +19,17 @@ contacts {"0x04985040682b77a32bb4bb58268a0719bd24ca4d07c255153fe1eb2ccd5883669627bd1a092d7cc76e8e4b9104327667b19dcda3ac469f572efabe588c38c1985f" {:last-updated 0 - :name "User B" - :identicon "photo1" - :last-online 0 + :name "User B" + :identicon "photo1" + :last-online 0 :public-key "0x04985040682b77a32bb4bb58268a0719bd24ca4d07c255153fe1eb2ccd5883669627bd1a092d7cc76e8e4b9104327667b19dcda3ac469f572efabe588c38c1985f"}} current-multiaccount - {:last-updated 0 - :signed-up? true + {:last-updated 0 + :signed-up? true :sharing-usage-data? false - :name "User A" - :identicon "photo2" + :name "User A" + :identicon "photo2" :public-key "0x048a2f8b80c60f89a91b4c1316e56f75b087f446e7b8701ceca06a40142d8efe1f5aa36bd0fee9e248060a8d5207b43ae98bef4617c18c71e66f920f324869c09f"}] (is @@ -38,19 +38,19 @@ admins contacts current-multiaccount) - [{:name "generated" - :identicon "generated" - :alias "generated" - :admin? true + [{:name "generated" + :identicon "generated" + :alias "generated" + :admin? true :public-key "0x04fcf40c526b09ff9fb22f4a5dbd08490ef9b64af700870f8a0ba2133f4251d5607ed83cd9047b8c2796576bc83fa0de23a13a4dced07654b8ff137fe744047917"} - {:alias "User A" - :identicon "photo2" + {:alias "User A" + :identicon "photo2" :public-key "0x048a2f8b80c60f89a91b4c1316e56f75b087f446e7b8701ceca06a40142d8efe1f5aa36bd0fee9e248060a8d5207b43ae98bef4617c18c71e66f920f324869c09f"} {:last-updated 0 - :name "User B" - :identicon "photo1" - :last-online 0 + :name "User B" + :identicon "photo1" + :last-online 0 :public-key "0x04985040682b77a32bb4bb58268a0719bd24ca4d07c255153fe1eb2ccd5883669627bd1a092d7cc76e8e4b9104327667b19dcda3ac469f572efabe588c38c1985f"}])))))) diff --git a/src/status_im/data_store/activities_test.cljs b/src/status_im/data_store/activities_test.cljs index ee9320f3e9..23f5353ddd 100644 --- a/src/status_im/data_store/activities_test.cljs +++ b/src/status_im/data_store/activities_test.cljs @@ -27,38 +27,39 @@ (dissoc :last-message :message :reply-message))))) (testing "transforms messages from RPC response" - (is (= {:last-message {:quoted-message nil - :outgoing-status nil - :command-parameters nil - :content {:sticker nil - :rtl? nil - :ens-name nil - :parsed-text nil - :response-to nil - :chat-id nil - :image nil - :line-count nil - :links nil - :text nil} - :outgoing false} - :message nil - :reply-message {:quoted-message nil - :outgoing-status nil - :command-parameters nil - :content {:sticker nil - :rtl? nil - :ens-name nil - :parsed-text nil - :response-to nil - :chat-id nil - :image nil - :line-count nil - :links nil - :text nil} - :outgoing false}} - (-> raw-notification - store/<-rpc - (select-keys [:last-message :message :reply-message]))))) + (is + (= {:last-message {:quoted-message nil + :outgoing-status nil + :command-parameters nil + :content {:sticker nil + :rtl? nil + :ens-name nil + :parsed-text nil + :response-to nil + :chat-id nil + :image nil + :line-count nil + :links nil + :text nil} + :outgoing false} + :message nil + :reply-message {:quoted-message nil + :outgoing-status nil + :command-parameters nil + :content {:sticker nil + :rtl? nil + :ens-name nil + :parsed-text nil + :response-to nil + :chat-id nil + :image nil + :line-count nil + :links nil + :text nil} + :outgoing false}} + (-> raw-notification + store/<-rpc + (select-keys [:last-message :message :reply-message]))))) (testing "augments notification based on its type" (is (= {:chat-name chat-name diff --git a/src/status_im/data_store/chats.cljs b/src/status_im/data_store/chats.cljs index c25a318074..b5270d37ea 100644 --- a/src/status_im/data_store/chats.cljs +++ b/src/status_im/data_store/chats.cljs @@ -39,10 +39,10 @@ (defn- unmarshal-members [{:keys [members chat-type] :as chat}] (cond - (= constants/public-chat-type chat-type) (assoc chat - :contacts #{} - :admins #{} - :members-joined #{}) + (= constants/public-chat-type chat-type) (assoc chat + :contacts #{} + :admins #{} + :members-joined #{}) (= constants/private-group-chat-type chat-type) (merge chat (reduce members-reducer {:admins #{} diff --git a/src/status_im/data_store/messages.cljs b/src/status_im/data_store/messages.cljs index 09c8f0fae1..3bfae20841 100644 --- a/src/status_im/data_store/messages.cljs +++ b/src/status_im/data_store/messages.cljs @@ -18,29 +18,30 @@ (defn <-rpc [message] (-> message - (set/rename-keys {:id :message-id - :whisperTimestamp :whisper-timestamp - :compressedKey :compressed-key - :editedAt :edited-at - :contactVerificationState :contact-verification-state - :contactRequestState :contact-request-state - :commandParameters :command-parameters - :gapParameters :gap-parameters - :messageType :message-type - :localChatId :chat-id - :communityId :community-id - :contentType :content-type - :clock :clock-value - :quotedMessage :quoted-message - :outgoingStatus :outgoing-status - :audioDurationMs :audio-duration-ms - :deleted :deleted? - :deletedForMe :deleted-for-me? - :deletedBy :deleted-by - :albumId :album-id - :imageWidth :image-width - :imageHeight :image-height - :new :new?}) + (set/rename-keys + {:id :message-id + :whisperTimestamp :whisper-timestamp + :compressedKey :compressed-key + :editedAt :edited-at + :contactVerificationState :contact-verification-state + :contactRequestState :contact-request-state + :commandParameters :command-parameters + :gapParameters :gap-parameters + :messageType :message-type + :localChatId :chat-id + :communityId :community-id + :contentType :content-type + :clock :clock-value + :quotedMessage :quoted-message + :outgoingStatus :outgoing-status + :audioDurationMs :audio-duration-ms + :deleted :deleted? + :deletedForMe :deleted-for-me? + :deletedBy :deleted-by + :albumId :album-id + :imageWidth :image-width + :imageHeight :image-height + :new :new?}) (update :quoted-message set/rename-keys diff --git a/src/status_im/ens/core.cljs b/src/status_im/ens/core.cljs index 4ad834c72a..4db54fc2dc 100644 --- a/src/status_im/ens/core.cljs +++ b/src/status_im/ens/core.cljs @@ -170,7 +170,7 @@ (let [{:keys [username]} (:ens/registration db) {:keys [public-key]} (:multiaccount db) - chain-id (ethereum/chain-id db)] + chain-id (ethereum/chain-id db)] (ens/register-prepare-tx chain-id address diff --git a/src/status_im/ethereum/eip681_test.cljs b/src/status_im/ethereum/eip681_test.cljs index b2d4887927..4bb94bf11a 100644 --- a/src/status_im/ethereum/eip681_test.cljs +++ b/src/status_im/ethereum/eip681_test.cljs @@ -107,14 +107,14 @@ (def all-tokens {:mainnet {"0x744d70fdbe2ba4cf95131626614a1763df805b9e" {:address "0x744d70fdbe2ba4cf95131626614a1763df805b9e" - :name "Status Network Token" - :symbol :SNT + :name "Status Network Token" + :symbol :SNT :decimals 18}} :goerli {"0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a" {:address "0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a" - :name "Status Test Token" - :symbol :STT + :name "Status Test Token" + :symbol :STT :decimals 18}}}) (deftest generate-erc20-uri @@ -209,8 +209,8 @@ :function-arguments {:uint256 1000 :address "0x89205a3a3b2a69de6dbf7f01ed13b2108b2c43e7"}} {"0x744d70fdbe2ba4cf95131626614a1763df805b9e" {:address "0x744d70fdbe2ba4cf95131626614a1763df805b9e" - :name "Status Network Token" - :symbol :SNT + :name "Status Network Token" + :symbol :SNT :decimals 18}})] (is (.equals (money/bignumber 1000) value)) (is (= :SNT symbol)) diff --git a/src/status_im/ethereum/subscriptions.cljs b/src/status_im/ethereum/subscriptions.cljs index 78de7e6194..b022a28e94 100644 --- a/src/status_im/ethereum/subscriptions.cljs +++ b/src/status_im/ethereum/subscriptions.cljs @@ -31,16 +31,16 @@ (log/debug "[wallet-subs] recent-history-fetching-ended" "accounts" accounts "block" blockNumber) - {:db (-> db - (assoc :ethereum/current-block blockNumber) - (update-in [:wallet :accounts] - wallet/remove-transactions-since-block - blockNumber) - (transactions/update-fetching-status accounts :recent? false) - (dissoc :wallet/waiting-for-recent-history? - :wallet/refreshing-history? - :wallet/fetching-error - :wallet/recent-history-fetching-started?)) + {:db (-> db + (assoc :ethereum/current-block blockNumber) + (update-in [:wallet :accounts] + wallet/remove-transactions-since-block + blockNumber) + (transactions/update-fetching-status accounts :recent? false) + (dissoc :wallet/waiting-for-recent-history? + :wallet/refreshing-history? + :wallet/fetching-error + :wallet/recent-history-fetching-started?)) :transactions/get-transfers {:chain-tokens (:wallet/all-tokens db) :addresses (reduce diff --git a/src/status_im/ethereum/transactions/core.cljs b/src/status_im/ethereum/transactions/core.cljs index 76ca3cd021..2debe0abfb 100644 --- a/src/status_im/ethereum/transactions/core.cljs +++ b/src/status_im/ethereum/transactions/core.cljs @@ -185,7 +185,7 @@ (rf/defn set-lowest-fetched-block [{:keys [db]} address transfers] - (let [checksum (eip55/address->checksum address) + (let [checksum (eip55/address->checksum address) {:keys [min-block min-block-transfers-count]} (reduce (fn [{:keys [min-block] :as acc} @@ -295,29 +295,32 @@ (rf/defn check-ens-transactions [{:keys [db] :as cofx} transfers] (let [set-of-transactions-hash (reduce (fn [acc {:keys [hash]}] (conj acc hash)) #{} transfers) - registrations (filter - (fn [[hash {:keys [state]}]] - (and - (or (= state :dismissed) (= state :submitted)) - (contains? set-of-transactions-hash hash))) - (get db :ens/registrations)) - fxs (map (fn [[hash {:keys [username custom-domain?]}]] - (let [transfer (first (filter (fn [transfer] - (let [transfer-hash (get transfer :hash)] - (= transfer-hash hash))) - transfers)) - type (get transfer :type) - transaction-success (get transfer :transfer)] - (cond - (= transaction-success true) - (rf/merge cofx - (ens/clear-ens-registration hash) - (ens/save-username custom-domain? username false)) - (= type :failed) - (ens/update-ens-tx-state :failure username custom-domain? hash) - :else - nil))) - registrations)] + registrations (filter + (fn [[hash {:keys [state]}]] + (and + (or (= state :dismissed) (= state :submitted)) + (contains? set-of-transactions-hash hash))) + (get db :ens/registrations)) + fxs (map + (fn [[hash {:keys [username custom-domain?]}]] + (let [transfer (first (filter (fn [transfer] + (let [transfer-hash + (get transfer + :hash)] + (= transfer-hash hash))) + transfers)) + type (get transfer :type) + transaction-success (get transfer :transfer)] + (cond + (= transaction-success true) + (rf/merge cofx + (ens/clear-ens-registration hash) + (ens/save-username custom-domain? username false)) + (= type :failed) + (ens/update-ens-tx-state :failure username custom-domain? hash) + :else + nil))) + registrations)] (apply rf/merge cofx fxs))) (rf/defn new-transfers diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index 32edb24bee..a766a95e17 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -1,64 +1,64 @@ (ns status-im.events (:require - clojure.set - [re-frame.core :as re-frame] - [status-im.async-storage.core :as async-storage] - status-im.backup.core - status-im.bootnodes.core - status-im.browser.core - status-im.browser.permissions - status-im.chat.models - status-im.chat.models.images - status-im.chat.models.input - status-im.chat.models.loading - status-im.chat.models.transport - [status-im2.constants :as constants] - status-im.contact.block - status-im.contact.chat - status-im.contact.core - status-im.currency.core - status-im.ethereum.subscriptions - status-im.fleet.core - status-im.http.core - [utils.i18n :as i18n] - [status-im.keycard.core :as keycard] - status-im.log-level.core - status-im.mailserver.constants - [status-im.mailserver.core :as mailserver] - [status-im.multiaccounts.biometric.core :as biometric] - status-im.multiaccounts.login.core - status-im.multiaccounts.logout.core - [status-im.multiaccounts.model :as multiaccounts.model] - status-im.multiaccounts.update.core - [status-im.native-module.core :as status] - status-im.network.net-info - status-im.pairing.core - status-im.profile.core - status-im.search.core - status-im.signals.core - status-im.stickers.core - status-im.transport.core - [status-im.ui.components.permissions :as permissions] - [status-im.ui.components.react :as react] - status-im.ui.screens.privacy-and-security-settings.events - [status-im.utils.dimensions :as dimensions] - [utils.re-frame :as rf] - status-im.utils.logging.core - [status-im.utils.universal-links.core :as universal-links] - [status-im.utils.utils :as utils] - status-im.visibility-status-popover.core - status-im.visibility-status-updates.core - status-im.waku.core - status-im.wallet-connect-legacy.core - status-im.wallet-connect.core - status-im.wallet.accounts.core - status-im.wallet.choose-recipient.core - [status-im.wallet.core :as wallet] - status-im.wallet.custom-tokens.core - status-im2.contexts.activity-center.events - status-im2.contexts.shell.events - status-im.chat.models.gaps - [status-im2.navigation.events :as navigation])) + clojure.set + [re-frame.core :as re-frame] + [status-im.async-storage.core :as async-storage] + status-im.backup.core + status-im.bootnodes.core + status-im.browser.core + status-im.browser.permissions + status-im.chat.models + status-im.chat.models.images + status-im.chat.models.input + status-im.chat.models.loading + status-im.chat.models.transport + [status-im2.constants :as constants] + status-im.contact.block + status-im.contact.chat + status-im.contact.core + status-im.currency.core + status-im.ethereum.subscriptions + status-im.fleet.core + status-im.http.core + [utils.i18n :as i18n] + [status-im.keycard.core :as keycard] + status-im.log-level.core + status-im.mailserver.constants + [status-im.mailserver.core :as mailserver] + [status-im.multiaccounts.biometric.core :as biometric] + status-im.multiaccounts.login.core + status-im.multiaccounts.logout.core + [status-im.multiaccounts.model :as multiaccounts.model] + status-im.multiaccounts.update.core + [status-im.native-module.core :as status] + status-im.network.net-info + status-im.pairing.core + status-im.profile.core + status-im.search.core + status-im.signals.core + status-im.stickers.core + status-im.transport.core + [status-im.ui.components.permissions :as permissions] + [status-im.ui.components.react :as react] + status-im.ui.screens.privacy-and-security-settings.events + [status-im.utils.dimensions :as dimensions] + [utils.re-frame :as rf] + status-im.utils.logging.core + [status-im.utils.universal-links.core :as universal-links] + [status-im.utils.utils :as utils] + status-im.visibility-status-popover.core + status-im.visibility-status-updates.core + status-im.waku.core + status-im.wallet-connect-legacy.core + status-im.wallet-connect.core + status-im.wallet.accounts.core + status-im.wallet.choose-recipient.core + [status-im.wallet.core :as wallet] + status-im.wallet.custom-tokens.core + status-im2.contexts.activity-center.events + status-im2.contexts.shell.events + status-im.chat.models.gaps + [status-im2.navigation.events :as navigation])) (re-frame/reg-fx :dismiss-keyboard diff --git a/src/status_im/fleet/core.cljs b/src/status_im/fleet/core.cljs index 63a34a0f82..58d79e167b 100644 --- a/src/status_im/fleet/core.cljs +++ b/src/status_im/fleet/core.cljs @@ -37,13 +37,13 @@ {:events [:fleet.ui/fleet-selected]} [_ fleet] {:ui/show-confirmation - {:title (i18n/label :t/close-app-title) - :content (i18n/label :t/change-fleet - {:fleet fleet}) + {:title (i18n/label :t/close-app-title) + :content (i18n/label :t/change-fleet + {:fleet fleet}) :confirm-button-text (i18n/label :t/close-app-button) :on-accept #(re-frame/dispatch [:fleet.ui/save-fleet-confirmed (keyword fleet)]) - :on-cancel nil}}) + :on-cancel nil}}) (defn nodes->fleet [nodes] diff --git a/src/status_im/integration_test.cljs b/src/status_im/integration_test.cljs index 2eae154c78..c2950da3ca 100644 --- a/src/status_im/integration_test.cljs +++ b/src/status_im/integration_test.cljs @@ -310,7 +310,7 @@ (deftest add-contact-test (log/info "========= add-contact-test ==================") (let - [compressed-key "zQ3shWj4WaBdf2zYKCkXe6PHxDxNTzZyid1i75879Ue9cX9gA" + [compressed-key "zQ3shWj4WaBdf2zYKCkXe6PHxDxNTzZyid1i75879Ue9cX9gA" public-key "0x048a6773339d11ccf5fd81677b7e54daeec544a1287bd92b725047ad6faa9a9b9f8ea86ed5a226d2a994f5f46d0b43321fd8de7b7997a166e67905c8c73cd37cea" three-words-name "Rich Total Pondskater"] diff --git a/src/status_im/keycard/backup_key.cljs b/src/status_im/keycard/backup_key.cljs index 7da275e6c4..2088e02016 100644 --- a/src/status_im/keycard/backup_key.cljs +++ b/src/status_im/keycard/backup_key.cljs @@ -61,9 +61,9 @@ {:db (-> db (update :intro-wizard assoc - :root-key root-data - :derived derived-data - :recovering? true + :root-key root-data + :derived derived-data + :recovering? true :selected-storage-type :advanced) (assoc-in [:keycard :flow] :recovery) (update :multiaccounts/key-storage dissoc :seed-phrase)) diff --git a/src/status_im/keycard/card.cljs b/src/status_im/keycard/card.cljs index 101a6a3613..69494821fd 100644 --- a/src/status_im/keycard/card.cljs +++ b/src/status_im/keycard/card.cljs @@ -7,9 +7,9 @@ [taoensso.timbre :as log])) (defonce card - (if config/keycard-test-menu-enabled? - (simulated-keycard/SimulatedKeycard.) - (real-keycard/RealKeycard.))) + (if config/keycard-test-menu-enabled? + (simulated-keycard/SimulatedKeycard.) + (real-keycard/RealKeycard.))) (defn check-nfc-support [] @@ -153,7 +153,7 @@ (log/debug "[keycard] init-card") (keycard/init-card card - {:pin pin + {:pin pin :on-success (fn [response] (log/debug "[keycard response succ] init-card") @@ -171,7 +171,7 @@ (log/debug "[keycard] install-applet-and-init-card") (keycard/install-applet-and-init-card card - {:pin pin + {:pin pin :on-success (fn [response] (log/debug "[keycard response succ] install-applet-and-init-card") @@ -508,7 +508,7 @@ (log/debug "[keycard] sign-typed-data") (keycard/sign-typed-data card - {:hash hash + {:hash hash :on-success (fn [response] (log/debug "[keycard response succ] sign-typed-data") diff --git a/src/status_im/keycard/change_pin.cljs b/src/status_im/keycard/change_pin.cljs index 944edc5010..34cf9b0764 100644 --- a/src/status_im/keycard/change_pin.cljs +++ b/src/status_im/keycard/change_pin.cljs @@ -73,7 +73,7 @@ (onboarding/load-preparing-screen cofx) (common/show-connection-sheet cofx - {:sheet-options {:on-cancel [::on-cancel]} + {:sheet-options {:on-cancel [::on-cancel]} :on-card-connected :keycard/change-pin :handler (fn [{:keys [db] :as cofx}] @@ -83,7 +83,7 @@ (get-in db [:keycard :pin :current]))] (rf/merge cofx - {:db (assoc-in db [:keycard :pin :status] :verifying) + {:db (assoc-in db [:keycard :pin :status] :verifying) :keycard/change-pin {:new-pin new-pin @@ -94,7 +94,7 @@ [{:keys [db] :as cofx}] (common/show-connection-sheet cofx - {:sheet-options {:on-cancel [::on-cancel]} + {:sheet-options {:on-cancel [::on-cancel]} :on-card-connected :keycard/change-puk :handler (fn [{:keys [db] :as cofx}] @@ -113,7 +113,7 @@ [{:keys [db] :as cofx}] (common/show-connection-sheet cofx - {:sheet-options {:on-cancel [::on-cancel]} + {:sheet-options {:on-cancel [::on-cancel]} :on-card-connected :keycard/change-pairing :handler (fn [{:keys [db] :as cofx}] diff --git a/src/status_im/keycard/core.cljs b/src/status_im/keycard/core.cljs index 14d7d3f780..bcf77fb3dd 100644 --- a/src/status_im/keycard/core.cljs +++ b/src/status_im/keycard/core.cljs @@ -297,7 +297,7 @@ (let [puk (common/vector->string (get-in db [:keycard :pin :puk])) pin (common/vector->string (get-in db [:keycard :pin :reset])) key-uid (get-in db [:keycard :application-info :key-uid])] - {:db (assoc-in db [:keycard :pin :status] :verifying) + {:db (assoc-in db [:keycard :pin :status] :verifying) :keycard/unblock-pin {:puk puk :new-pin pin}}))})) diff --git a/src/status_im/keycard/core_test.cljs b/src/status_im/keycard/core_test.cljs index fbb3fe2940..243c29e461 100644 --- a/src/status_im/keycard/core_test.cljs +++ b/src/status_im/keycard/core_test.cljs @@ -55,23 +55,23 @@ :status "" :db {}} #js - {"whisper-private-key" "f342f3ef17ce86abfa92b912b3a108a4546cfc687fd8e0f02fedf87a60ee4c0f" + {"whisper-private-key" "f342f3ef17ce86abfa92b912b3a108a4546cfc687fd8e0f02fedf87a60ee4c0f" "whisper-public-key" "04de2e21f1642ebee03b9aa4bf1936066124cc89967eaf269544c9b90c539fd5c980166a897d06dd4d3732b38116239f63c89395a8d73eac72881fab802010cb56" "encryption-public-key" "04f2a432677a1b7c4f1bb22078135821d1d10fce23422297b5c808a545f2b61cdba38ee7394762172fc6ff5e9e28db7535e555efe2812905ffd4e0c25e82a98ae8" - "whisper-address" "87df2285f90b71221fab6267b7cb37532fedbb1f" - "wallet-address" "7e92236392a850980d00d0cd2a4b92886bd7fe7b"}) + "whisper-address" "87df2285f90b71221fab6267b7cb37532fedbb1f" + "wallet-address" "7e92236392a850980d00d0cd2a4b92886bd7fe7b"}) [:db :keycard :multiaccount]) [:whisper-private-key :whisper-public-key :encryption-public-key :wallet-address :whisper-address])) - {:whisper-private-key "f342f3ef17ce86abfa92b912b3a108a4546cfc687fd8e0f02fedf87a60ee4c0f" + {:whisper-private-key "f342f3ef17ce86abfa92b912b3a108a4546cfc687fd8e0f02fedf87a60ee4c0f" :whisper-public-key "0x04de2e21f1642ebee03b9aa4bf1936066124cc89967eaf269544c9b90c539fd5c980166a897d06dd4d3732b38116239f63c89395a8d73eac72881fab802010cb56" :encryption-public-key "04f2a432677a1b7c4f1bb22078135821d1d10fce23422297b5c808a545f2b61cdba38ee7394762172fc6ff5e9e28db7535e555efe2812905ffd4e0c25e82a98ae8" - :whisper-address "87df2285f90b71221fab6267b7cb37532fedbb1f" - :wallet-address "7e92236392a850980d00d0cd2a4b92886bd7fe7b"})) + :whisper-address "87df2285f90b71221fab6267b7cb37532fedbb1f" + :wallet-address "7e92236392a850980d00d0cd2a4b92886bd7fe7b"})) diff --git a/src/status_im/keycard/onboarding.cljs b/src/status_im/keycard/onboarding.cljs index 698511a43b..9a7b547c92 100644 --- a/src/status_im/keycard/onboarding.cljs +++ b/src/status_im/keycard/onboarding.cljs @@ -263,19 +263,19 @@ {:keys [selected-id multiaccounts]} (:intro-wizard db) - multiaccount (or (->> multiaccounts - (filter #(= (:id %) selected-id)) - first) - (assoc (get-in db [:intro-wizard :root-key]) - :derived - (get-in db [:intro-wizard :derived]))) - recovery-mnemonic (get-in db [:intro-wizard :passphrase]) - mnemonic (or (:mnemonic multiaccount) - recovery-mnemonic) - pin' (or pin - (common/vector->string (get-in db - [:keycard :pin - :current])))] + multiaccount (or (->> multiaccounts + (filter #(= (:id %) selected-id)) + first) + (assoc (get-in db [:intro-wizard :root-key]) + :derived + (get-in db [:intro-wizard :derived]))) + recovery-mnemonic (get-in db [:intro-wizard :passphrase]) + mnemonic (or (:mnemonic multiaccount) + recovery-mnemonic) + pin' (or pin + (common/vector->string (get-in db + [:keycard :pin + :current])))] {:keycard/generate-and-load-key {:mnemonic mnemonic :pin pin' diff --git a/src/status_im/keycard/real_keycard.cljs b/src/status_im/keycard/real_keycard.cljs index f52d25f3c0..7bf6d667a9 100644 --- a/src/status_im/keycard/real_keycard.cljs +++ b/src/status_im/keycard/real_keycard.cljs @@ -10,9 +10,9 @@ [taoensso.timbre :as log])) (defonce event-emitter - (if platform/ios? - (new (.-NativeEventEmitter rn) status-keycard) - (.-DeviceEventEmitter rn))) + (if platform/ios? + (new (.-NativeEventEmitter rn) status-keycard) + (.-DeviceEventEmitter rn))) (defonce active-listeners (atom [])) diff --git a/src/status_im/keycard/recovery.cljs b/src/status_im/keycard/recovery.cljs index 714580b5c3..9c316df881 100644 --- a/src/status_im/keycard/recovery.cljs +++ b/src/status_im/keycard/recovery.cljs @@ -107,7 +107,7 @@ (update :keycard dissoc :secrets - :card-state :multiaccount-wallet-address + :card-state :multiaccount-wallet-address :multiaccount-whisper-public-key :application-info) (assoc-in [:keycard :setup-step] :begin) @@ -123,7 +123,7 @@ [{:keys [db] :as cofx}] (rf/merge cofx {:db (update db - :keycard dissoc + :keycard dissoc :multiaccount-wallet-address :multiaccount-whisper-public-key)} (navigation/navigate-to-cofx (if platform/android? @@ -337,13 +337,13 @@ (assoc :multiaccounts/new-installation-id (random-guid-generator)))} (common/remove-listener-to-hardware-back-button) (common/hide-connection-sheet) - (cond backup? (on-backup-success backup?) - migration? (migrate-account) + (cond backup? (on-backup-success backup?) + migration? (migrate-account) (get-in db [:keycard :delete-account?]) (delete-multiaccount) - :else (create-keycard-multiaccount))))) + :else (create-keycard-multiaccount))))) (rf/defn on-generate-and-load-key-error {:events [:keycard.callback/on-generate-and-load-key-error]} @@ -364,12 +364,12 @@ pairing' (or pairing (common/get-pairing db key-uid)) pin (common/vector->string (get-in db [:keycard :pin :import-multiaccount]))] (rf/merge cofx - {:db (-> db - (assoc-in [:keycard :multiaccount :instance-uid] instance-uid) - (assoc-in [:keycard :pin :status] :verifying) - (assoc-in [:keycard :secrets] - {:pairing pairing' - :paired-on (datetime/timestamp)})) + {:db (-> db + (assoc-in [:keycard :multiaccount :instance-uid] instance-uid) + (assoc-in [:keycard :pin :status] :verifying) + (assoc-in [:keycard :secrets] + {:pairing pairing' + :paired-on (datetime/timestamp)})) :keycard/import-keys {:pin pin :on-success :keycard.callback/on-generate-and-load-key-success}}))) diff --git a/src/status_im/keycard/sign.cljs b/src/status_im/keycard/sign.cljs index 2849cb6abd..e127162df6 100644 --- a/src/status_im/keycard/sign.cljs +++ b/src/status_im/keycard/sign.cljs @@ -76,9 +76,9 @@ [:sign/send-accept-transaction-message message-id tx-hash signature] [:sign/send-transaction-message chat-id value contract tx-hash signature]) :signing/show-transaction-result nil - :db (-> db - (assoc-in [:keycard :pin :sign] []) - (assoc-in [:keycard :pin :status] nil))} + :db (-> db + (assoc-in [:keycard :pin :sign] []) + (assoc-in [:keycard :pin :status] nil))} (common/clear-on-card-connected) (common/get-application-info nil) (common/hide-connection-sheet))) diff --git a/src/status_im/keycard/simulated_keycard.cljs b/src/status_im/keycard/simulated_keycard.cljs index 7ff6487b7c..548d0b7bcc 100644 --- a/src/status_im/keycard/simulated_keycard.cljs +++ b/src/status_im/keycard/simulated_keycard.cljs @@ -34,17 +34,17 @@ [] (swap! state assoc :application-info - {:free-pairing-slots 5 - :app-version "3.0" + {:free-pairing-slots 5 + :app-version "3.0" :secure-channel-pub-key "04c3071768912a515c00aeab7ceb8a5bfda91d036f4a4e60b7944cee3ca7fb67b6d118e8df1e2480b87fd636c6615253245bbbc93a6a407f155f2c58f76c96ef0e" - :instance-uid "1b360b10a9a68b7d494e8f059059f118" - :paired? true - :has-master-key? true - :initialized? true - :pin-retry-counter 3 - :puk-retry-counter 5 - :key-uid (get-in @re-frame.db/app-db [:multiaccounts/login :key-uid])}) + :instance-uid "1b360b10a9a68b7d494e8f059059f118" + :paired? true + :has-master-key? true + :initialized? true + :pin-retry-counter 3 + :puk-retry-counter 5 + :key-uid (get-in @re-frame.db/app-db [:multiaccounts/login :key-uid])}) (swap! state assoc :pin default-pin :puk default-puk :password kk1-password) (connect-card)) @@ -55,17 +55,17 @@ (reset! initialization false) (swap! state assoc :application-info - {:free-pairing-slots 5 - :app-version "3.0" + {:free-pairing-slots 5 + :app-version "3.0" :secure-channel-pub-key "04c3071768912a515c00aeab7ceb8a5bfda91d036f4a4e60b7944cee3ca7fb67b6d118e8df1e2480b87fd636c6615253245bbbc93a6a407f155f2c58f76c96ef0e" - :instance-uid "1b360b10a9a68b7d494e8f059059f118" - :paired? false - :has-master-key? true - :initialized? true - :pin-retry-counter 3 - :puk-retry-counter 5 - :key-uid "0x16839e8b1b8a395acb18100c7e2b161701c225adf31eefa02114099b4d81a30b"}) + :instance-uid "1b360b10a9a68b7d494e8f059059f118" + :paired? false + :has-master-key? true + :initialized? true + :pin-retry-counter 3 + :puk-retry-counter 5 + :key-uid "0x16839e8b1b8a395acb18100c7e2b161701c225adf31eefa02114099b4d81a30b"}) (swap! state assoc :pin default-pin :puk default-puk :password kk1-password) (connect-card)) @@ -195,17 +195,17 @@ (reset! initialization true) (swap! state assoc :application-info - {:free-pairing-slots 5 - :app-version "3.0" + {:free-pairing-slots 5 + :app-version "3.0" :secure-channel-pub-key "04c3071768912a515c00aeab7ceb8a5bfda91d036f4a4e60b7944cee3ca7fb67b6d118e8df1e2480b87fd636c6615253245bbbc93a6a407f155f2c58f76c96ef0e" - :key-uid "" - :instance-uid "1b360b10a9a68b7d494e8f059059f118" - :paired? false - :has-master-key? false - :pin-retry-counter 3 - :puk-retry-counter 5 - :initialized? true}) + :key-uid "" + :instance-uid "1b360b10a9a68b7d494e8f059059f118" + :paired? false + :has-master-key? false + :pin-retry-counter 3 + :puk-retry-counter 5 + :initialized? true}) (swap! state assoc :pin pin :puk default-puk :password kk1-password) (later #(on-success {:password kk1-password @@ -393,11 +393,11 @@ on-failure #(let [{:keys [key-uid wallet-root-address]} (get @re-frame.db/app-db :multiaccount) - accounts (get @re-frame.db/app-db :multiaccount/accounts) - hashed-password account-password - path-num (inc (get-in @re-frame.db/app-db - [:multiaccount :latest-derived-path])) - path (str "m/" path-num)] + accounts (get @re-frame.db/app-db :multiaccount/accounts) + hashed-password account-password + path-num (inc (get-in @re-frame.db/app-db + [:multiaccount :latest-derived-path])) + path (str "m/" path-num)] (status/multiaccount-load-account wallet-root-address hashed-password diff --git a/src/status_im/mailserver/core.cljs b/src/status_im/mailserver/core.cljs index c8945c8fa0..231df5e764 100644 --- a/src/status_im/mailserver/core.cljs +++ b/src/status_im/mailserver/core.cljs @@ -281,10 +281,10 @@ (:value name) (:value url)) current (connected? db (:id mailserver))] - {:db (-> db - (dissoc :mailserver.edit/mailserver) - (assoc-in [:mailserver/mailservers current-fleet (:id mailserver)] - mailserver)) + {:db (-> db + (dissoc :mailserver.edit/mailserver) + (assoc-in [:mailserver/mailservers current-fleet (:id mailserver)] + mailserver)) :json-rpc/call [{:method "mailservers_addMailserver" :params [(mailserver->rpc mailserver current-fleet)] @@ -296,7 +296,7 @@ [:multiaccounts.logout.ui/logout-confirmed])) (log/debug "saved mailserver" id "successfuly")) :on-failure #(log/error "failed to save mailserver" id %)}] - :dispatch [:navigate-back]})))) + :dispatch [:navigate-back]})))) (defn can-delete? [db id] @@ -307,18 +307,18 @@ {:events [:mailserver.ui/delete-confirmed]} [{:keys [db] :as cofx} id] (if (can-delete? db id) - {:db (-> db - (update-in - [:mailserver/mailservers (node/current-fleet-key db)] - dissoc - id) - (dissoc :mailserver.edit/mailserver)) + {:db (-> db + (update-in + [:mailserver/mailservers (node/current-fleet-key db)] + dissoc + id) + (dissoc :mailserver.edit/mailserver)) :json-rpc/call [{:method "mailservers_deleteMailserver" :params [(name id)] :on-success #(log/debug "deleted mailserver" id) :on-failure #(log/error "failed to delete mailserver" id %)}] - :dispatch [:navigate-back]} + :dispatch [:navigate-back]} {:dispatch [:navigate-back]})) (rf/defn show-connection-confirmation @@ -326,7 +326,7 @@ [{:keys [db]} mailserver-id] (let [current-fleet (node/current-fleet-key db)] {:ui/show-confirmation - {:title (i18n/label :t/close-app-title) + {:title (i18n/label :t/close-app-title) :content (i18n/label :t/connect-mailserver-content {:name (get-in db @@ -336,7 +336,7 @@ :on-accept #(re-frame/dispatch [:mailserver.ui/connect-confirmed current-fleet mailserver-id]) - :on-cancel nil}})) + :on-cancel nil}})) (rf/defn show-delete-confirmation {:events [:mailserver.ui/delete-pressed]} diff --git a/src/status_im/mobile_sync_settings/core.cljs b/src/status_im/mobile_sync_settings/core.cljs index 464d129427..1347bc0bbf 100644 --- a/src/status_im/mobile_sync_settings/core.cljs +++ b/src/status_im/mobile_sync_settings/core.cljs @@ -52,12 +52,12 @@ ([sync?] (apply-settings sync? :default)) ([sync? remember?] (fn [{:keys [db] :as cofx}] - (let [network (:network/type db) + (let [network (:network/type db) remember-choice? (if (not= :default remember?) remember? (:mobile-network/remember-choice? db)) - cellular? (utils/cellular? network)] + cellular? (utils/cellular? network)] (log/info "apply mobile network settings" "sunc?" sync? "remember?" remember? diff --git a/src/status_im/multiaccounts/core_test.cljs b/src/status_im/multiaccounts/core_test.cljs index 77971c5126..61b0122b83 100644 --- a/src/status_im/multiaccounts/core_test.cljs +++ b/src/status_im/multiaccounts/core_test.cljs @@ -54,19 +54,19 @@ (= [random-name short-compressed-key] (ma/contact-two-names (dissoc contact - :nickname - :name - :display-name) + :nickname + :name + :display-name) public-key))))) (testing "public-key is the least favorite" (is (= [random-name short-public-key] (ma/contact-two-names (dissoc contact - :nickname - :name - :compressed-key - :display-name) + :nickname + :name + :compressed-key + :display-name) public-key)))) (testing "names is provided" (let [names {:nickname override-nickname diff --git a/src/status_im/multiaccounts/create/core.cljs b/src/status_im/multiaccounts/create/core.cljs index a643a4970e..1c7c54dce9 100644 --- a/src/status_im/multiaccounts/create/core.cljs +++ b/src/status_im/multiaccounts/create/core.cljs @@ -192,31 +192,31 @@ (cond-> (merge {;; address of the master key - :address address + :address address ;; sha256 of master public key - :key-uid key-uid + :key-uid key-uid ;; The address from which we derive any wallet :wallet-root-address (get-in multiaccount [:derived constants/path-wallet-root-keyword :address]) - :name name - :identicon identicon + :name name + :identicon identicon ;; public key of the chat account - :public-key public-key + :public-key public-key ;; compressed key of the chat account - :compressed-key compressed-key + :compressed-key compressed-key ;; default address for Dapps - :dapps-address (:address wallet-account) - :latest-derived-path 0 - :signing-phrase signing-phrase + :dapps-address (:address wallet-account) + :latest-derived-path 0 + :signing-phrase signing-phrase :send-push-notifications? true - :backup-enabled? true - :installation-id (random-guid-generator) + :backup-enabled? true + :installation-id (random-guid-generator) ;; default mailserver (history node) setting - :use-mailservers? true - :recovered recovered} + :use-mailservers? true + :recovered recovered} config/default-multiaccount) ;; The address from which we derive any chat ;; account/encryption keys diff --git a/src/status_im/multiaccounts/key_storage/core.cljs b/src/status_im/multiaccounts/key_storage/core.cljs index 9bd173d175..305e35c657 100644 --- a/src/status_im/multiaccounts/key_storage/core.cljs +++ b/src/status_im/multiaccounts/key_storage/core.cljs @@ -173,7 +173,7 @@ We don't need to take the exact steps, just set the required state and redirect " (rf/defn import-multiaccount [{:keys [db] :as cofx}] - {:dispatch [:bottom-sheet/hide] + {:dispatch [:bottom-sheet/hide] ::multiaccounts.recover/import-multiaccount {:passphrase (get-in db [:multiaccounts/key-storage :seed-phrase]) :password nil @@ -235,9 +235,9 @@ We don't need to take the exact steps, just set the required state and redirect {:db (-> db (update :intro-wizard assoc - :root-key root-data - :derived derived-data - :recovering? true + :root-key root-data + :derived derived-data + :recovering? true :selected-storage-type :advanced) (assoc-in [:keycard :flow] :recovery) (assoc-in [:keycard :from-key-storage-and-migration?] true) diff --git a/src/status_im/multiaccounts/login/core.cljs b/src/status_im/multiaccounts/login/core.cljs index 5f70c93386..668f3b43a5 100644 --- a/src/status_im/multiaccounts/login/core.cljs +++ b/src/status_im/multiaccounts/login/core.cljs @@ -1,51 +1,51 @@ (ns status-im.multiaccounts.login.core (:require - [clojure.string :as string] - [re-frame.core :as re-frame] - [status-im.async-storage.core :as async-storage] - [status-im.communities.core :as communities] - [status-im.contact.core :as contact] - [status-im.data-store.chats :as data-store.chats] - [status-im.data-store.invitations :as data-store.invitations] - [status-im.data-store.settings :as data-store.settings] - [status-im.data-store.switcher-cards :as switcher-cards-store] - [status-im.data-store.visibility-status-updates :as visibility-status-updates-store] - [status-im.ethereum.core :as ethereum] - [status-im.ethereum.eip55 :as eip55] - [status-im.ethereum.tokens :as tokens] - [status-im.ethereum.transactions.core :as transactions] - [status-im.fleet.core :as fleet] - [utils.i18n :as i18n] - [status-im.keycard.common :as keycard.common] - [status-im.mobile-sync-settings.core :as mobile-network] - [status-im.multiaccounts.biometric.core :as biometric] - [status-im.multiaccounts.core :as multiaccounts] - [status-im.native-module.core :as status] - [status-im.node.core :as node] - [status-im.notifications.core :as notifications] - [status-im.popover.core :as popover] - [status-im.signing.eip1559 :as eip1559] - [status-im.transport.core :as transport] - [status-im.ui.components.react :as react] - [status-im2.config :as config] - [utils.re-frame :as rf] - [status-im.utils.keychain.core :as keychain] - [status-im.utils.mobile-sync :as utils.mobile-sync] - [status-im.utils.platform :as platform] - [status-im.utils.types :as types] - [status-im.utils.utils :as utils] - [status-im.utils.wallet-connect :as wallet-connect] - [status-im.wallet-connect-legacy.core :as wallet-connect-legacy] - [status-im.wallet.core :as wallet] - [status-im.wallet.prices :as prices] - [status-im2.common.json-rpc.events :as json-rpc] - [status-im2.contexts.activity-center.events :as activity-center] - [status-im2.contexts.chat.messages.link-preview.events :as link-preview] - [status-im2.navigation.events :as navigation] - [status-im2.common.log :as logging] - [taoensso.timbre :as log] - [utils.security.core :as security] - [status-im2.contexts.emoji-hash.events :as emoji-hash])) + [clojure.string :as string] + [re-frame.core :as re-frame] + [status-im.async-storage.core :as async-storage] + [status-im.communities.core :as communities] + [status-im.contact.core :as contact] + [status-im.data-store.chats :as data-store.chats] + [status-im.data-store.invitations :as data-store.invitations] + [status-im.data-store.settings :as data-store.settings] + [status-im.data-store.switcher-cards :as switcher-cards-store] + [status-im.data-store.visibility-status-updates :as visibility-status-updates-store] + [status-im.ethereum.core :as ethereum] + [status-im.ethereum.eip55 :as eip55] + [status-im.ethereum.tokens :as tokens] + [status-im.ethereum.transactions.core :as transactions] + [status-im.fleet.core :as fleet] + [utils.i18n :as i18n] + [status-im.keycard.common :as keycard.common] + [status-im.mobile-sync-settings.core :as mobile-network] + [status-im.multiaccounts.biometric.core :as biometric] + [status-im.multiaccounts.core :as multiaccounts] + [status-im.native-module.core :as status] + [status-im.node.core :as node] + [status-im.notifications.core :as notifications] + [status-im.popover.core :as popover] + [status-im.signing.eip1559 :as eip1559] + [status-im.transport.core :as transport] + [status-im.ui.components.react :as react] + [status-im2.config :as config] + [utils.re-frame :as rf] + [status-im.utils.keychain.core :as keychain] + [status-im.utils.mobile-sync :as utils.mobile-sync] + [status-im.utils.platform :as platform] + [status-im.utils.types :as types] + [status-im.utils.utils :as utils] + [status-im.utils.wallet-connect :as wallet-connect] + [status-im.wallet-connect-legacy.core :as wallet-connect-legacy] + [status-im.wallet.core :as wallet] + [status-im.wallet.prices :as prices] + [status-im2.common.json-rpc.events :as json-rpc] + [status-im2.contexts.activity-center.events :as activity-center] + [status-im2.contexts.chat.messages.link-preview.events :as link-preview] + [status-im2.navigation.events :as navigation] + [status-im2.common.log :as logging] + [taoensso.timbre :as log] + [utils.security.core :as security] + [status-im2.contexts.emoji-hash.events :as emoji-hash])) (re-frame/reg-fx ::initialize-communities-enabled @@ -270,7 +270,7 @@ (rf/defn check-network-version [_ network-id] {:json-rpc/call - [{:method "net_version" + [{:method "net_version" :on-success (fn [fetched-network-id] (when (not= network-id (str (int fetched-network-id))) @@ -447,9 +447,9 @@ {:events [::get-chats-callback]} [{:keys [db] :as cofx}] (let [{:networks/keys [current-network networks]} db - notifications-enabled? (get-in db [:multiaccount :notifications-enabled?]) - network-id (str (get-in networks - [current-network :config :NetworkId])) + notifications-enabled? (get-in db [:multiaccount :notifications-enabled?]) + network-id (str (get-in networks + [current-network :config :NetworkId])) remote-push-notifications-enabled? (get-in db [:multiaccount :remote-push-notifications-enabled?])] (rf/merge cofx @@ -462,7 +462,7 @@ (fn [accounts tokens custom-tokens favourites] (re-frame/dispatch [::initialize-wallet accounts tokens custom-tokens favourites]))] - ::open-last-chat (get-in db [:multiaccount :key-uid])} + ::open-last-chat (get-in db [:multiaccount :key-uid])} (or notifications-enabled? remote-push-notifications-enabled?) (assoc ::notifications/enable remote-push-notifications-enabled?)) (transport/start-messenger) @@ -503,7 +503,7 @@ "auth-method" auth-method "new-auth-method" new-auth-method) (rf/merge cofx - {:db (assoc db :chats/loading? true) + {:db (assoc db :chats/loading? true) :json-rpc/call [{:method "settings_getSettings" :on-success #(do (re-frame/dispatch [::get-settings-callback %]) @@ -552,7 +552,7 @@ (-> db (dissoc :connectivity/ui-status-properties) (update :keycard dissoc :from-key-storage-and-migration?) - (update :keycard dissoc + (update :keycard dissoc :on-card-read :card-read-in-progress? :pin @@ -569,20 +569,20 @@ (let [{:keys [key-uid password save-password? creating?]} (:multiaccounts/login db) - multiaccounts (:multiaccounts/multiaccounts db) - recovered-account? (get db :recovered-account?) - login-only? (not (or creating? - recovered-account? - (keycard-setup? cofx))) - from-migration? (get-in db - [:keycard - :from-key-storage-and-migration?]) - nodes nil] + multiaccounts (:multiaccounts/multiaccounts db) + recovered-account? (get db :recovered-account?) + login-only? (not (or creating? + recovered-account? + (keycard-setup? cofx))) + from-migration? (get-in db + [:keycard + :from-key-storage-and-migration?]) + nodes nil] (log/debug "[multiaccount] multiaccount-login-success" "login-only?" login-only? "recovered-account?" recovered-account?) (rf/merge cofx - {:db (on-login-update-db db login-only? now) + {:db (on-login-update-db db login-only? now) :json-rpc/call [{:method "web3_clientVersion" :on-success #(re-frame/dispatch [::initialize-web3-client-version %])}]} diff --git a/src/status_im/multiaccounts/login/data_test.cljs b/src/status_im/multiaccounts/login/data_test.cljs index aa723fe766..fd35fdf238 100644 --- a/src/status_im/multiaccounts/login/data_test.cljs +++ b/src/status_im/multiaccounts/login/data_test.cljs @@ -2,22 +2,22 @@ (def all-contacts [{:last-updated 1547185503000 - :tags #{} - :address "2f88d65f3cb52605a54a833ae118fb1363acccd2" - :name "Darkviolet Lightgreen Halcyon" + :tags #{} + :address "2f88d65f3cb52605a54a833ae118fb1363acccd2" + :name "Darkviolet Lightgreen Halcyon" :identicon "data:image/png;base64iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAADAFBMVEX///+M2KwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADdPOdBAAABAHRSTlP//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKmfXxgAABnNJREFUeNoBaAaX+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5UBARL8TK8AAAAASUVORK5CYII=" - :added true - :last-online 0 + :added true + :last-online 0 :public-key "0x04d6e56a475cd35f512d6ce0bf76c2c2af435c85ff48c2b9bdefd129f620e051a436f50961eae5717b2a750e59c3f5b60647d927da46d0b8b11621640b5678fc24"} {:last-updated 1547271764000 - :address "b267ff8336ac10b3a1986c04a70ff91fb03d0b78" - :name "rv" + :address "b267ff8336ac10b3a1986c04a70ff91fb03d0b78" + :name "rv" :identicon "data:image/png;base64iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAADAFBMVEX////VjNgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwYzy6AAABAHRSTlP//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKmfXxgAABnNJREFUeNoBaAaX+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAAAAAAEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEAAAAAAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQAAAAABAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAAAAAAEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6IYA4bRtf+EAAAAASUVORK5CYII=" - :added true - :last-online 0 + :added true + :last-online 0 :public-key "0x043ae31038ff45a31b096a91d3f8290e079366fbbae76a00fbbd349cd0e5b8d7598965d206772ec4504f68908649a08383cdc51a52cdae5e9ccc744ace4d37020f"}]) @@ -40,74 +40,74 @@ :chat-id "status" :timestamp 1547361080397 :deleted-at-clock-value nil} - {:updated-at nil - :tags #{} - :color "#d37ef4" + {:updated-at nil + :tags #{} + :color "#d37ef4" :contacts #{"0x043ae31038ff45a31b096a91d3f8290e079366fbbae76a00fbbd349cd0e5b8d7598965d206772ec4504f68908649a08383cdc51a52cdae5e9ccc744ace4d37020f"} - :last-clock-value 154727176928001 - :admins #{} - :members-joined #{} - :name "rv" - :membership-updates () - :unviewed-messages-count 0 + :last-clock-value 154727176928001 + :admins #{} + :members-joined #{} + :name "rv" + :membership-updates () + :unviewed-messages-count 0 :last-message-content-type "text/plain" :last-message-content {:chat-id "0x04173f7cdea0076a7998abb674cc79fe61337c42db77043c01d5b0f3e3ac1e5a45bca0c93bb9f3c3d38b7cc9a7337cd64f9f9b2114fe4bbdfe1ae2633ba14d8c9c" - :text "Hey"} - :debug? false - :group-chat false - :public? false + :text "Hey"} + :debug? false + :group-chat false + :public? false :chat-id "0x043ae31038ff45a31b096a91d3f8290e079366fbbae76a00fbbd349cd0e5b8d7598965d206772ec4504f68908649a08383cdc51a52cdae5e9ccc744ace4d37020f" - :timestamp 1547271770816 - :deleted-at-clock-value nil} - {:updated-at nil - :tags #{} - :color "#7cda00" + :timestamp 1547271770816 + :deleted-at-clock-value nil} + {:updated-at nil + :tags #{} + :color "#7cda00" :contacts #{"0x04d6e56a475cd35f512d6ce0bf76c2c2af435c85ff48c2b9bdefd129f620e051a436f50961eae5717b2a750e59c3f5b60647d927da46d0b8b11621640b5678fc24"} - :last-clock-value 154718689430301 - :admins #{} - :members-joined #{} - :name "Darkviolet Lightgreen Halcyon" - :membership-updates () - :unviewed-messages-count 0 + :last-clock-value 154718689430301 + :admins #{} + :members-joined #{} + :name "Darkviolet Lightgreen Halcyon" + :membership-updates () + :unviewed-messages-count 0 :last-message-content-type "text/plain" :last-message-content {:chat-id "0x04173f7cdea0076a7998abb674cc79fe61337c42db77043c01d5b0f3e3ac1e5a45bca0c93bb9f3c3d38b7cc9a7337cd64f9f9b2114fe4bbdfe1ae2633ba14d8c9c" - :text "Djndjd"} - :debug? false - :group-chat false - :public? false + :text "Djndjd"} + :debug? false + :group-chat false + :public? false :chat-id "0x04d6e56a475cd35f512d6ce0bf76c2c2af435c85ff48c2b9bdefd129f620e051a436f50961eae5717b2a750e59c3f5b60647d927da46d0b8b11621640b5678fc24" - :timestamp 1547186895328 - :deleted-at-clock-value nil}]) + :timestamp 1547186895328 + :deleted-at-clock-value nil}]) (def multiaccount - {:last-updated 0 - :address "7540c34d6c4082391f12468580a9a4e0724c6755" - :mnemonic "tumble gorilla neglect dumb budget involve tennis ocean diary eagle lady ring" - :custom-bootnodes {} - :signing-phrase "bull exam weed" - :signed-up? true - :name "name" - :last-request nil + {:last-updated 0 + :address "7540c34d6c4082391f12468580a9a4e0724c6755" + :mnemonic "tumble gorilla neglect dumb budget involve tennis ocean diary eagle lady ring" + :custom-bootnodes {} + :signing-phrase "bull exam weed" + :signed-up? true + :name "name" + :last-request nil :wallet/visible-tokens {:mainnet #{:SNT} :goerli #{:STT} :xdai #{}} - :preview-privacy? true - :fleet :eth.prod + :preview-privacy? true + :fleet :eth.prod :identicon "data:image/png;base64iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAADAFBMVEX////YsYwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPGFwxAAABAHRSTlP//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKmfXxgAABnNJREFUeNoBaAaX+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAQEBAQAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAABAQEBAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAEBAQEAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAQEBAQAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAABAQEBAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAEBAQEAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAQEBAQAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAABAQEBAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAEBAQEAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEAAAAAAQEBAQAAAAABAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQAAAAABAQEBAAAAAAEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAAAAAAEBAQEAAAAAAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAAAAAAEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEAAAAAAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQAAAAABAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAAAAAAEBAQEBAQEBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAloYA4a9rBHIAAAAASUVORK5CYII=" :wallet-set-up-passed? false :public-key "0x04173f7cdea0076a7998abb674cc79fe61337c42db77043c01d5b0f3e3ac1e5a45bca0c93bb9f3c3d38b7cc9a7337cd64f9f9b2114fe4bbdfe1ae2633ba14d8c9c" - :keycard-key-uid nil - :installation-id "618ec020-13c8-5505-8aa6-9c5444317e7f"}) + :keycard-key-uid nil + :installation-id "618ec020-13c8-5505-8aa6-9c5444317e7f"}) (def multiaccounts {"address" multiaccount}) diff --git a/src/status_im/multiaccounts/login/flow_test.cljs b/src/status_im/multiaccounts/login/flow_test.cljs index 21396e40de..bf10ed7708 100644 --- a/src/status_im/multiaccounts/login/flow_test.cljs +++ b/src/status_im/multiaccounts/login/flow_test.cljs @@ -40,18 +40,18 @@ #_(deftest login (testing "login with keycard" (let - [wpk "c56c7ac797c27b3790ce02c2459e9957c5d20d7a2c55320535526ce9e4dcbbef" + [wpk "c56c7ac797c27b3790ce02c2459e9957c5d20d7a2c55320535526ce9e4dcbbef" epk "04f43da85ff1c333f3e7277b9ac4df92c9120fbb251f1dede7d41286e8c055acfeb845f6d2654821afca25da119daff9043530b296ee0e28e202ba92ec5842d617" db {:keycard {:multiaccount {:encryption-public-key epk - :whisper-private-key wpk - :wallet-address "83278851e290d2488b6add2a257259f5741a3b7d" + :whisper-private-key wpk + :wallet-address "83278851e290d2488b6add2a257259f5741a3b7d" :whisper-public-key "0x04491c1272149d7fa668afa45968c9914c0661641ace7dbcbc585c15070257840a0b4b1f71ce66c2147e281e1a44d6231b4731a26f6cc0a49e9616bbc7fc2f1a93" - :whisper-address "b8bec30855ff20c2ddab32282e2b2c8c8baca70d"}}} + :whisper-address "b8bec30855ff20c2ddab32282e2b2c8c8baca70d"}}} result (login.core/login {:db db})] (is (= (-> result (get :keycard/login-with-keycard) keys count) 3)) diff --git a/src/status_im/multiaccounts/recover/core.cljs b/src/status_im/multiaccounts/recover/core.cljs index 55d09287a4..dbfb506118 100644 --- a/src/status_im/multiaccounts/recover/core.cljs +++ b/src/status_im/multiaccounts/recover/core.cljs @@ -137,9 +137,9 @@ {:db (update db :intro-wizard assoc - :root-key root-data - :derived derived-data - :step :recovery-success)} + :root-key root-data + :derived derived-data + :step :recovery-success)} (when (existing-account? multiaccounts key-uid) (show-existing-multiaccount-alert key-uid)) (navigation/navigate-to-cofx :recover-multiaccount-success nil)))) @@ -199,14 +199,14 @@ (if (= step :enter-phrase) {:db (dissoc db :intro-wizard)} {:db (update db - :intro-wizard assoc + :intro-wizard assoc :step (case step :recovery-success :enter-phrase :select-key-storage :recovery-success :create-code :select-key-storage) :confirm-failure? false - :key-code nil)}))) + :key-code nil)}))) (rf/defn cancel-pressed {:events [:multiaccounts.recover/cancel-pressed]} @@ -243,7 +243,7 @@ {:db (update db :intro-wizard assoc - :step :select-key-storage + :step :select-key-storage :selected-storage-type :default)} (if (nfc/nfc-supported?) (navigation/navigate-to-cofx :select-key-storage nil) diff --git a/src/status_im/multiaccounts/recover/core_test.cljs b/src/status_im/multiaccounts/recover/core_test.cljs index 6573bd631b..fd4e815970 100644 --- a/src/status_im/multiaccounts/recover/core_test.cljs +++ b/src/status_im/multiaccounts/recover/core_test.cljs @@ -17,7 +17,7 @@ (= {:db {:intro-wizard {:passphrase "game buzz method pretty olympic fat quit display velvet unveil marine crater" - :passphrase-error nil + :passphrase-error nil :next-button-disabled? false}}} (models/set-phrase {:db {}} @@ -27,7 +27,7 @@ (= {:db {:intro-wizard {:passphrase "game buzz method pretty olympic fat quit display velvet unveil marine crater" - :passphrase-error nil + :passphrase-error nil :next-button-disabled? false}}} (models/set-phrase {:db {}} @@ -36,7 +36,7 @@ (is (= {:db {:intro-wizard {:passphrase "game buzz method pretty zeus fat quit display velvet unveil marine crater" - :passphrase-error nil + :passphrase-error nil :next-button-disabled? false}}} (models/set-phrase {:db {}} (security/mask-data @@ -46,7 +46,7 @@ {:db {:intro-wizard {:passphrase " game\t buzz method pretty olympic fat quit\t display velvet unveil marine crater " - :passphrase-error nil + :passphrase-error nil :next-button-disabled? false}}} (models/set-phrase {:db {}} @@ -55,7 +55,7 @@ (is (= {:db {:intro-wizard {:passphrase "game buzz method pretty 1234 fat quit display velvet unveil marine crater" - :passphrase-error nil + :passphrase-error nil :next-button-disabled? false}}} (models/set-phrase {:db {}} diff --git a/src/status_im/multiaccounts/update/core.cljs b/src/status_im/multiaccounts/update/core.cljs index 32a82f0231..2ce8462fdd 100644 --- a/src/status_im/multiaccounts/update/core.cljs +++ b/src/status_im/multiaccounts/update/core.cljs @@ -26,9 +26,9 @@ (js/Error. "Please shake the phone to report this error and restart the app. multiaccount is currently empty, which means something went wrong when trying to update it with")) (rf/merge cofx - {:db (if setting-value - (assoc-in db [:multiaccount setting] setting-value) - (update db :multiaccount dissoc setting)) + {:db (if setting-value + (assoc-in db [:multiaccount setting] setting-value) + (update db :multiaccount dissoc setting)) :json-rpc/call [{:method "settings_saveSetting" :params [setting setting-value] diff --git a/src/status_im/native_module/core.cljs b/src/status_im/native_module/core.cljs index b3390741fb..0fa242271d 100644 --- a/src/status_im/native_module/core.cljs +++ b/src/status_im/native_module/core.cljs @@ -116,9 +116,9 @@ (.logout ^js (status))) (defonce listener - (.addListener ^js react-native-utils/device-event-emitter - "gethEvent" - #(re-frame/dispatch [:signals/signal-received (.-jsonEvent ^js %)]))) + (.addListener ^js react-native-utils/device-event-emitter + "gethEvent" + #(re-frame/dispatch [:signals/signal-received (.-jsonEvent ^js %)]))) (defn multiaccount-load-account "NOTE: beware, the password has to be sha3 hashed @@ -466,7 +466,7 @@ (callback true)) ;; in unknown scenarios we also consider the device rooted to avoid degrading security - :else (callback true))) + :else (callback true))) (defn generate-gfycat "Generate a 3 words random name based on the user public-key, synchronously" diff --git a/src/status_im/navigation/core.cljs b/src/status_im/navigation/core.cljs index 4cd4a0d7f2..a692bab6ab 100644 --- a/src/status_im/navigation/core.cljs +++ b/src/status_im/navigation/core.cljs @@ -21,7 +21,7 @@ (def splash-screen (-> rn .-NativeModules .-SplashScreen)) (defonce set-navigation-default-options - (.setDefaultOptions Navigation (clj->js {:layout {:orientation "portrait"}}))) + (.setDefaultOptions Navigation (clj->js {:layout {:orientation "portrait"}}))) ;; REGISTER COMPONENT (LAZY) (defn reg-comp @@ -33,7 +33,7 @@ (.registerComponent Navigation key (fn [] (gestureHandlerRootHOC screen)) (fn [] screen))))) (defonce rset-lazy-reg - (.setLazyComponentRegistrator Navigation reg-comp)) + (.setLazyComponentRegistrator Navigation reg-comp)) (defn dismiss-all-modals [] @@ -104,17 +104,17 @@ (.dismissModal Navigation (name (last @state/modals)))) (defonce register-nav-button-reg - (.registerNavigationButtonPressedListener - (.events Navigation) - (fn [^js evn] - (let [id (.-buttonId evn)] - (if (= "dismiss-modal" id) - (do - (when-let [event (get-in views/screens [(last @state/modals) :on-dissmiss])] - (re-frame/dispatch event)) - (dissmissModal)) - (when-let [handler (get-in views/screens [(keyword id) :right-handler])] - (handler))))))) + (.registerNavigationButtonPressedListener + (.events Navigation) + (fn [^js evn] + (let [id (.-buttonId evn)] + (if (= "dismiss-modal" id) + (do + (when-let [event (get-in views/screens [(last @state/modals) :on-dissmiss])] + (re-frame/dispatch event)) + (dissmissModal)) + (when-let [handler (get-in views/screens [(keyword id) :right-handler])] + (handler))))))) (defn set-view-id [view-id] @@ -126,53 +126,53 @@ (re-frame/dispatch on-focus)))) (defonce register-modal-reg - (.registerModalDismissedListener - (.events Navigation) - (fn [_] - (if (> (count @state/modals) 1) - (let [new-modals (butlast @state/modals)] - (reset! state/modals (vec new-modals)) - (set-view-id (last new-modals))) - (do - (reset! state/modals []) - (reset! state/curr-modal false) - (set-view-id @state/pushed-screen-id))) + (.registerModalDismissedListener + (.events Navigation) + (fn [_] + (if (> (count @state/modals) 1) + (let [new-modals (butlast @state/modals)] + (reset! state/modals (vec new-modals)) + (set-view-id (last new-modals))) + (do + (reset! state/modals []) + (reset! state/curr-modal false) + (set-view-id @state/pushed-screen-id))) - (let [comp @state/dissmissing] - (reset! state/dissmissing false) - (when (keyword? comp) - (open-modal comp)))))) + (let [comp @state/dissmissing] + (reset! state/dissmissing false) + (when (keyword? comp) + (open-modal comp)))))) ;; SCREEN DID APPEAR (defonce screen-appear-reg - (.registerComponentDidAppearListener - (.events Navigation) - (fn [^js evn] - (let [view-id (keyword (.-componentName evn))] - (log/debug "screen-appear-reg" view-id) - (when (get views/screens view-id) - (when (and (not= view-id :bottom-sheet) - (not= view-id :popover) - (not= view-id :visibility-status-popover)) - (set-view-id view-id) - (when-not @state/curr-modal - (reset! state/pushed-screen-id view-id)))))))) + (.registerComponentDidAppearListener + (.events Navigation) + (fn [^js evn] + (let [view-id (keyword (.-componentName evn))] + (log/debug "screen-appear-reg" view-id) + (when (get views/screens view-id) + (when (and (not= view-id :bottom-sheet) + (not= view-id :popover) + (not= view-id :visibility-status-popover)) + (set-view-id view-id) + (when-not @state/curr-modal + (reset! state/pushed-screen-id view-id)))))))) ;; SCREEN DID DISAPPEAR (defonce screen-disappear-reg - (.registerComponentDidDisappearListener - (.events Navigation) - (fn [^js evn] - (let [view-id (keyword (.-componentName evn))] - (when-not (#{"popover" "bottom-sheet" "signing-sheet" "visibility-status-popover" - "wallet-connect-sheet" "wallet-connect-success-sheet" - "wallet-connect-app-management-sheet"} - (.-componentName evn)) - (re-frame/dispatch [::view-disappeared view-id]) - (doseq [[_ {:keys [ref value]}] @quo.text-input/text-input-refs] - (.setNativeProps ^js ref (clj->js {:text value}))) - (doseq [[^js text-input default-value] @react/text-input-refs] - (.setNativeProps text-input (clj->js {:text default-value})))))))) + (.registerComponentDidDisappearListener + (.events Navigation) + (fn [^js evn] + (let [view-id (keyword (.-componentName evn))] + (when-not (#{"popover" "bottom-sheet" "signing-sheet" "visibility-status-popover" + "wallet-connect-sheet" "wallet-connect-success-sheet" + "wallet-connect-app-management-sheet"} + (.-componentName evn)) + (re-frame/dispatch [::view-disappeared view-id]) + (doseq [[_ {:keys [ref value]}] @quo.text-input/text-input-refs] + (.setNativeProps ^js ref (clj->js {:text value}))) + (doseq [[^js text-input default-value] @react/text-input-refs] + (.setNativeProps text-input (clj->js {:text default-value})))))))) ;; SET ROOT (re-frame/reg-fx @@ -203,19 +203,19 @@ {:init-root-fx (if keycard-account? :multiaccounts-keycard :multiaccounts)})) (defonce - rset-app-launched - (.registerAppLaunchedListener (.events Navigation) - (fn [] - (reset! state/curr-modal false) - (reset! state/dissmissing false) - (if (or (= @state/root-id :multiaccounts) - (= @state/root-id :multiaccounts-keycard)) - (re-frame/dispatch-sync [::set-multiaccount-root]) - (when @state/root-id - (reset! state/root-comp-id @state/root-id) - (.setRoot Navigation (clj->js (get (roots/roots) @state/root-id))) - (re-frame/dispatch [::login-core/check-last-chat]))) - (.hide ^js splash-screen)))) + rset-app-launched + (.registerAppLaunchedListener (.events Navigation) + (fn [] + (reset! state/curr-modal false) + (reset! state/dissmissing false) + (if (or (= @state/root-id :multiaccounts) + (= @state/root-id :multiaccounts-keycard)) + (re-frame/dispatch-sync [::set-multiaccount-root]) + (when @state/root-id + (reset! state/root-comp-id @state/root-id) + (.setRoot Navigation (clj->js (get (roots/roots) @state/root-id))) + (re-frame/dispatch [::login-core/check-last-chat]))) + (.hide ^js splash-screen)))) (defn get-screen-component [comp] @@ -294,19 +294,19 @@ (.popToRoot Navigation (name comp)))) (defonce register-bottom-tab-reg - (.registerBottomTabSelectedListener - (.events Navigation) - (fn [^js evn] - (let [selected-tab-index (.-selectedTabIndex evn) - comp (get tab-root-ids selected-tab-index) - tab-key (get (set/map-invert tab-key-idx) selected-tab-index)] - (re-frame/dispatch [:set :current-tab tab-key]) - (when (= @state/root-comp-id comp) - (when (= :chat tab-key) - (re-frame/dispatch [:chat/close])) - (when platform/android? - (.popToRoot Navigation (name comp)))) - (reset! state/root-comp-id comp))))) + (.registerBottomTabSelectedListener + (.events Navigation) + (fn [^js evn] + (let [selected-tab-index (.-selectedTabIndex evn) + comp (get tab-root-ids selected-tab-index) + tab-key (get (set/map-invert tab-key-idx) selected-tab-index)] + (re-frame/dispatch [:set :current-tab tab-key]) + (when (= @state/root-comp-id comp) + (when (= :chat tab-key) + (re-frame/dispatch [:chat/close])) + (when platform/android? + (.popToRoot Navigation (name comp)))) + (reset! state/root-comp-id comp))))) ;; OVERLAY (Popover and bottom sheets) (defn dissmiss-overlay @@ -331,20 +331,20 @@ ;; POPOVER (defonce popover-reg - (.registerComponent Navigation - "popover" - (fn [] (gestureHandlerRootHOC views/popover-comp)) - (fn [] views/popover-comp))) + (.registerComponent Navigation + "popover" + (fn [] (gestureHandlerRootHOC views/popover-comp)) + (fn [] views/popover-comp))) (re-frame/reg-fx :show-popover (fn [] (show-overlay "popover"))) (re-frame/reg-fx :hide-popover (fn [] (dissmiss-overlay "popover"))) ;; VISIBILITY STATUS POPOVER (defonce visibility-status-popover-reg - (.registerComponent Navigation - "visibility-status-popover" - (fn [] (gestureHandlerRootHOC views/visibility-status-popover-comp)) - (fn [] views/visibility-status-popover-comp))) + (.registerComponent Navigation + "visibility-status-popover" + (fn [] (gestureHandlerRootHOC views/visibility-status-popover-comp)) + (fn [] views/visibility-status-popover-comp))) (re-frame/reg-fx :show-visibility-status-popover (fn [] (show-overlay "visibility-status-popover"))) @@ -353,10 +353,10 @@ ;; BOTTOM SHEETS (defonce bottom-sheet-reg - (.registerComponent Navigation - "bottom-sheet" - (fn [] (gestureHandlerRootHOC views/sheet-comp)) - (fn [] views/sheet-comp))) + (.registerComponent Navigation + "bottom-sheet" + (fn [] (gestureHandlerRootHOC views/sheet-comp)) + (fn [] views/sheet-comp))) (re-frame/reg-fx :show-bottom-sheet-overlay (fn [] (show-overlay "bottom-sheet"))) (re-frame/reg-fx :dismiss-bottom-sheet-overlay (fn [] (dissmiss-overlay "bottom-sheet"))) @@ -364,22 +364,22 @@ ;; WALLET CONNECT (defonce wallet-connect-sheet-reg - (.registerComponent Navigation - "wallet-connect-sheet" - (fn [] (gestureHandlerRootHOC views/wallet-connect-comp)) - (fn [] views/wallet-connect-comp))) + (.registerComponent Navigation + "wallet-connect-sheet" + (fn [] (gestureHandlerRootHOC views/wallet-connect-comp)) + (fn [] views/wallet-connect-comp))) (defonce wallet-connect-success-sheet-reg - (.registerComponent Navigation - "wallet-connect-success-sheet" - (fn [] (gestureHandlerRootHOC views/wallet-connect-success-comp)) - (fn [] views/wallet-connect-success-comp))) + (.registerComponent Navigation + "wallet-connect-success-sheet" + (fn [] (gestureHandlerRootHOC views/wallet-connect-success-comp)) + (fn [] views/wallet-connect-success-comp))) (defonce wallet-connect-app-management-sheet-reg - (.registerComponent Navigation - "wallet-connect-app-management-sheet" - (fn [] (gestureHandlerRootHOC views/wallet-connect-app-management-comp)) - (fn [] views/wallet-connect-app-management-comp))) + (.registerComponent Navigation + "wallet-connect-app-management-sheet" + (fn [] (gestureHandlerRootHOC views/wallet-connect-app-management-comp)) + (fn [] views/wallet-connect-app-management-comp))) (re-frame/reg-fx :show-wallet-connect-sheet (fn [] (show-overlay "wallet-connect-sheet"))) (re-frame/reg-fx :hide-wallet-connect-sheet (fn [] (dissmiss-overlay "wallet-connect-sheet"))) @@ -395,10 +395,10 @@ ;; SIGNING (defonce signing-sheet-reg - (.registerComponent Navigation - "signing-sheet" - (fn [] (gestureHandlerRootHOC views/signing-comp)) - (fn [] views/signing-comp))) + (.registerComponent Navigation + "signing-sheet" + (fn [] (gestureHandlerRootHOC views/signing-comp)) + (fn [] views/signing-comp))) (re-frame/reg-fx :show-signing-sheet (fn [] (show-overlay "signing-sheet"))) (re-frame/reg-fx :hide-signing-sheet (fn [] (dissmiss-overlay "signing-sheet"))) @@ -407,10 +407,10 @@ ;; TODO why is this not a regular bottom sheet ? (defonce select-acc-sheet-reg - (.registerComponent Navigation - "select-acc-sheet" - (fn [] (gestureHandlerRootHOC views/select-acc-comp)) - (fn [] views/select-acc-comp))) + (.registerComponent Navigation + "select-acc-sheet" + (fn [] (gestureHandlerRootHOC views/select-acc-comp)) + (fn [] views/select-acc-comp))) (re-frame/reg-fx :show-select-acc-sheet (fn [] (show-overlay "select-acc-sheet"))) (re-frame/reg-fx :hide-select-acc-sheet (fn [] (dissmiss-overlay "select-acc-sheet"))) diff --git a/src/status_im/network/core_test.cljs b/src/status_im/network/core_test.cljs index 91dd9dc558..113aec5a6e 100644 --- a/src/status_im/network/core_test.cljs +++ b/src/status_im/network/core_test.cljs @@ -94,26 +94,27 @@ (deftest set-input-test (testing "it updates and validate a field" - (is (= {:db {:networks/manage {:url {:value "http://valid.com" - :error false} - :name {:value "" - :error true} - :symbol {:value "symbol" - :error false} - :chain {:value "mainnet" - :error false} - :network-id {:value nil - :error false}}}} - (network.core/set-input {:db {:networks/manage {:url {:value "something" - :error true} - :name {:value "" - :error false} - :symbol {:value "symbol" - :error false} - :chain {:value "mainnet" - :error false}}}} - :url - "http://valid.com"))))) + (is + (= {:db {:networks/manage {:url {:value "http://valid.com" + :error false} + :name {:value "" + :error true} + :symbol {:value "symbol" + :error false} + :chain {:value "mainnet" + :error false} + :network-id {:value nil + :error false}}}} + (network.core/set-input {:db {:networks/manage {:url {:value "something" + :error true} + :name {:value "" + :error false} + :symbol {:value "symbol" + :error false} + :chain {:value "mainnet" + :error false}}}} + :url + "http://valid.com"))))) (deftest not-save-invalid-url (testing "it does not save a network with an invalid url" diff --git a/src/status_im/node/core.cljs b/src/status_im/node/core.cljs index 1506575136..f8f73b948f 100644 --- a/src/status_im/node/core.cljs +++ b/src/status_im/node/core.cljs @@ -139,8 +139,8 @@ current-fleet (assoc :NoDiscovery wakuv2-enabled :Rendezvous (if wakuv2-enabled false (boolean (seq rendezvous-nodes))) - :ClusterConfig {:Enabled true - :Fleet (name current-fleet-key) + :ClusterConfig {:Enabled true + :Fleet (name current-fleet-key) :DiscV5BootstrapNodes (if wakuv2-enabled waku-nodes @@ -155,22 +155,22 @@ (into (pick-nodes 2 (vals (:whisper current-fleet))) (vals (:static current-fleet)))) - :RendezvousNodes (if wakuv2-enabled [] rendezvous-nodes) - :WakuNodes (or waku-nodes [])}) + :RendezvousNodes (if wakuv2-enabled [] rendezvous-nodes) + :WakuNodes (or waku-nodes [])}) :always (assoc :LocalNotificationsConfig {:Enabled true} - :BrowsersConfig {:Enabled true} - :PermissionsConfig {:Enabled true} - :MailserversConfig {:Enabled true} - :EnableNTPSync true + :BrowsersConfig {:Enabled true} + :PermissionsConfig {:Enabled true} + :MailserversConfig {:Enabled true} + :EnableNTPSync true :WakuConfig {:Enabled true :BloomFilterMode waku-bloom-filter-mode :LightClient true :MinimumPoW 0.000001} - :WakuV2Config (merge (assoc wakuv2-config :Enabled wakuv2-enabled) - wakuv2-default-config) + :WakuV2Config (merge (assoc wakuv2-config :Enabled wakuv2-enabled) + wakuv2-default-config) :ShhextConfig {:BackupDisabledDataDir (utils.platform/no-backup-directory) :InstallationID installation-id @@ -182,8 +182,8 @@ :VerifyTransactionChainID config/verify-transaction-chain-id :DataSyncEnabled true :PFSEnabled true} - :RequireTopics (get-topics current-network) - :StatusAccountsConfig {:Enabled true}) + :RequireTopics (get-topics current-network) + :StatusAccountsConfig {:Enabled true}) (and config/bootnodes-settings-enabled? diff --git a/src/status_im/notifications/core.cljs b/src/status_im/notifications/core.cljs index 328ca511a5..4552ce6541 100644 --- a/src/status_im/notifications/core.cljs +++ b/src/status_im/notifications/core.cljs @@ -224,13 +224,13 @@ "wakuext_enableSendingNotifications" "wakuext_disableSendingNotifications")] (rf/merge cofx - {:json-rpc/call [{:method method - :params [] + {:json-rpc/call [{:method method + :params [] :on-success #(log/info "[push-notifications] switch-send-notifications successful" %) - :on-error #(re-frame/dispatch [::push-notifications-send-update-error - enabled? %])}]} + :on-error #(re-frame/dispatch [::push-notifications-send-update-error + enabled? %])}]} (multiaccounts.update/optimistic :send-push-notifications? (boolean enabled?))))) @@ -243,15 +243,15 @@ {:events [::add-server]} [{:keys [db] :as cofx} public-key] (rf/merge cofx - {:json-rpc/call [{:method "wakuext_addPushNotificationsServer" - :params [public-key] + {:json-rpc/call [{:method "wakuext_addPushNotificationsServer" + :params [public-key] :on-success #(do (log/info "[push-notifications] switch-send-notifications successful" %) (re-frame/dispatch [::fetch-servers])) - :on-error #(re-frame/dispatch [::push-notifications-add-server-error - public-key %])}]})) + :on-error #(re-frame/dispatch [::push-notifications-add-server-error + public-key %])}]})) (rf/defn handle-servers-fetched {:events [::servers-fetched]} diff --git a/src/status_im/signing/core.cljs b/src/status_im/signing/core.cljs index ce31ff18d6..3fa7fdfb2a 100644 --- a/src/status_im/signing/core.cljs +++ b/src/status_im/signing/core.cljs @@ -101,9 +101,10 @@ (rf/defn send-transaction {:events [:signing.ui/sign-is-pressed]} [{{:signing/keys [sign tx] :as db} :db :as cofx}] - (let [{:keys [in-progress? password]} sign - {:keys [tx-obj gas gasPrice maxPriorityFeePerGas maxFeePerGas message nonce]} tx - hashed-password (ethereum/sha3 (security/safe-unmask-data password))] + (let [{:keys [in-progress? password]} sign + {:keys [tx-obj gas gasPrice maxPriorityFeePerGas + maxFeePerGas message nonce]} tx + hashed-password (ethereum/sha3 (security/safe-unmask-data password))] (if message (sign-message cofx) (let [tx-obj-to-send (merge tx-obj @@ -294,7 +295,7 @@ :success-event :signing/update-estimated-gas-success :error-event :signing/update-estimated-gas-error}}) (fn [cofx] - {:db (assoc-in (:db cofx) [:signing/edit-fee :gas-price-loading?] true) + {:db (assoc-in (:db cofx) [:signing/edit-fee :gas-price-loading?] true) :signing/update-gas-price {:success-callback #(re-frame/dispatch [:wallet.send/update-gas-price-success :signing/tx % tx-obj]) @@ -311,12 +312,12 @@ (rf/defn send-transaction-message {:events [:sign/send-transaction-message]} [cofx chat-id value contract transaction-hash signature] - {:json-rpc/call [{:method "wakuext_sendTransaction" + {:json-rpc/call [{:method "wakuext_sendTransaction" ;; We make sure `value` is serialized as string, and not ;; as an integer or big-int - :params [chat-id (str value) contract transaction-hash - (or (:result (types/json->clj signature)) - (ethereum/normalized-hex signature))] + :params [chat-id (str value) contract transaction-hash + (or (:result (types/json->clj signature)) + (ethereum/normalized-hex signature))] :js-response true :on-success #(re-frame/dispatch [:transport/message-sent %])}]}) @@ -324,10 +325,10 @@ (rf/defn send-accept-request-transaction-message {:events [:sign/send-accept-transaction-message]} [cofx message-id transaction-hash signature] - {:json-rpc/call [{:method "wakuext_acceptRequestTransaction" - :params [transaction-hash message-id - (or (:result (types/json->clj signature)) - (ethereum/normalized-hex signature))] + {:json-rpc/call [{:method "wakuext_acceptRequestTransaction" + :params [transaction-hash message-id + (or (:result (types/json->clj signature)) + (ethereum/normalized-hex signature))] :js-response true :on-success #(re-frame/dispatch [:transport/message-sent %])}]}) @@ -356,7 +357,7 @@ (wallet/watch-tx (get from :address) transaction-hash) (if (keycard.common/keycard-multiaccount? db) (signing.keycard/hash-message - {:data data + {:data data :on-completed (fn [hash] (re-frame/dispatch @@ -370,9 +371,9 @@ hash]))}) (fn [_] {:signing.fx/sign-message - {:params {:data data - :password hashed-password - :account from} + {:params {:data data + :password hashed-password + :account from} :on-completed (fn [res] (re-frame/dispatch @@ -413,9 +414,9 @@ {:db (update db :signing/sign assoc - :error (if (= 5 (:code error)) - (i18n/label :t/wrong-password) - (:message error)) + :error (if (= 5 (:code error)) + (i18n/label :t/wrong-password) + (:message error)) :in-progress? false)} (rf/merge cofx (when-not (= (-> db :signing/sign :type) :pinless) @@ -495,7 +496,7 @@ :chat-id identity :command? true :data (status/encode-transfer to-norm amount-hex)})})) - {:db db + {:db db :json-rpc/call [{:method "wakuext_requestAddressForTransaction" :params [(:current-chat-id db) diff --git a/src/status_im/signing/gas.cljs b/src/status_im/signing/gas.cljs index 57b819786a..0178d0937d 100644 --- a/src/status_im/signing/gas.cljs +++ b/src/status_im/signing/gas.cljs @@ -190,7 +190,7 @@ (assoc-in [:signing/edit-fee :selected-fee-option] option) (update :signing/edit-fee build-edit - :maxFeePerGas (money/wei->gwei fee)) + :maxFeePerGas (money/wei->gwei fee)) (update :signing/edit-fee build-edit :maxPriorityFeePerGas (money/wei->gwei tip)))})) @@ -200,12 +200,12 @@ [{:keys [db]} value] (let [{:keys [maxFeePerGas maxPriorityFeePerGas]} (get db :signing/edit-fee) - latest-base-fee (get db :wallet/current-base-fee) - max-fee-value (:value-number maxFeePerGas) - max-priority-fee-value (:value-number maxPriorityFeePerGas) - new-value (money/bignumber value) - fee-without-tip (money/sub max-fee-value max-priority-fee-value) - base-fee (money/wei->gwei (money/bignumber latest-base-fee)) + latest-base-fee (get db :wallet/current-base-fee) + max-fee-value (:value-number maxFeePerGas) + max-priority-fee-value (:value-number maxPriorityFeePerGas) + new-value (money/bignumber value) + fee-without-tip (money/sub max-fee-value max-priority-fee-value) + base-fee (money/wei->gwei (money/bignumber latest-base-fee)) new-max-fee-value (money/to-fixed (if (money/greater-than base-fee fee-without-tip) diff --git a/src/status_im/signing/keycard.cljs b/src/status_im/signing/keycard.cljs index 1cae35b8e9..479c876cdc 100644 --- a/src/status_im/signing/keycard.cljs +++ b/src/status_im/signing/keycard.cljs @@ -57,15 +57,15 @@ [_ {:keys [v4 data typed? on-completed]}] (if typed? {::hash-typed-data - {:data data - :v4 v4 + {:data data + :v4 v4 :on-completed (or on-completed #(re-frame/dispatch [:signing.keycard.callback/hash-message-completed data typed? %]))}} {::hash-message - {:message data + {:message data :on-completed (or on-completed #(re-frame/dispatch diff --git a/src/status_im/test_runner.cljs b/src/status_im/test_runner.cljs index 7d8b0225f3..18efb7c964 100644 --- a/src/status_im/test_runner.cljs +++ b/src/status_im/test_runner.cljs @@ -38,7 +38,7 @@ (assoc opts :repl true) (string/starts-with? arg "--test=") - (let [test-arg (subs arg 7) + (let [test-arg (subs arg 7) test-syms (->> (string/split test-arg ",") (map symbol))] diff --git a/src/status_im/transport/message/core.cljs b/src/status_im/transport/message/core.cljs index 7542afacc7..4bb266c497 100644 --- a/src/status_im/transport/message/core.cljs +++ b/src/status_im/transport/message/core.cljs @@ -1,29 +1,29 @@ (ns ^{:doc "Definition of the StatusMessage protocol"} status-im.transport.message.core (:require - [clojure.string :as string] - [status-im.browser.core :as browser] - [status-im2.contexts.chat.events :as chat.events] - [status-im.chat.models.message :as models.message] - [status-im.chat.models.reactions :as models.reactions] - [status-im.communities.core :as models.communities] - [status-im2.constants :as constants] - [status-im.contact.core :as models.contact] - [status-im.data-store.activities :as data-store.activities] - [status-im.data-store.chats :as data-store.chats] - [status-im.data-store.contacts :as data-store.contacts] - [status-im.data-store.invitations :as data-store.invitations] - [status-im.data-store.messages :as data-store.messages] - [status-im.data-store.reactions :as data-store.reactions] - [status-im.group-chats.core :as models.group] - [status-im.multiaccounts.login.core :as multiaccounts.login] - [status-im.multiaccounts.model :as multiaccounts.model] - [status-im.multiaccounts.update.core :as update.core] - [status-im.pairing.core :as models.pairing] - [utils.re-frame :as rf] - [status-im.utils.types :as types] - [status-im.visibility-status-updates.core :as models.visibility-status-updates] - [status-im2.contexts.activity-center.events :as activity-center] - [status-im2.contexts.chat.messages.pin.events :as messages.pin])) + [clojure.string :as string] + [status-im.browser.core :as browser] + [status-im2.contexts.chat.events :as chat.events] + [status-im.chat.models.message :as models.message] + [status-im.chat.models.reactions :as models.reactions] + [status-im.communities.core :as models.communities] + [status-im2.constants :as constants] + [status-im.contact.core :as models.contact] + [status-im.data-store.activities :as data-store.activities] + [status-im.data-store.chats :as data-store.chats] + [status-im.data-store.contacts :as data-store.contacts] + [status-im.data-store.invitations :as data-store.invitations] + [status-im.data-store.messages :as data-store.messages] + [status-im.data-store.reactions :as data-store.reactions] + [status-im.group-chats.core :as models.group] + [status-im.multiaccounts.login.core :as multiaccounts.login] + [status-im.multiaccounts.model :as multiaccounts.model] + [status-im.multiaccounts.update.core :as update.core] + [status-im.pairing.core :as models.pairing] + [utils.re-frame :as rf] + [status-im.utils.types :as types] + [status-im.visibility-status-updates.core :as models.visibility-status-updates] + [status-im2.contexts.activity-center.events :as activity-center] + [status-im2.contexts.chat.messages.pin.events :as messages.pin])) (rf/defn process-next [cofx ^js response-js sync-handler] @@ -243,7 +243,7 @@ {:events [:sanitize-messages-and-process-response]} [{:keys [db] :as cofx} ^js response-js process-async] (when response-js - (let [current-chat-id (:current-chat-id db) + (let [current-chat-id (:current-chat-id db) {:keys [db messages transactions chats statuses]} (reduce group-by-and-update-unviewed-counts {:db db diff --git a/src/status_im/ui/components/copyable_text.cljs b/src/status_im/ui/components/copyable_text.cljs index 1554eb42ec..8f53d8978a 100644 --- a/src/status_im/ui/components/copyable_text.cljs +++ b/src/status_im/ui/components/copyable_text.cljs @@ -103,7 +103,7 @@ (- (+ 17 @height)))) (react/copy-to-clipboard copied-text))] [react/view - {:style (if container-style container-style {}) + {:style (if container-style container-style {}) :on-layout #(do (reset! width (-> ^js % .-nativeEvent .-layout .-width)) diff --git a/src/status_im/ui/components/toastable_highlight.cljs b/src/status_im/ui/components/toastable_highlight.cljs index df10875ea8..292236aef8 100644 --- a/src/status_im/ui/components/toastable_highlight.cljs +++ b/src/status_im/ui/components/toastable_highlight.cljs @@ -105,7 +105,7 @@ (when on-press (on-press)))] [react/view - {:style (if container-style container-style {}) + {:style (if container-style container-style {}) :on-layout #(do (reset! width (-> ^js % .-nativeEvent .-layout .-width)) diff --git a/src/status_im/ui/screens/about_app/views.cljs b/src/status_im/ui/screens/about_app/views.cljs index b761a8aeaf..3c2438de25 100644 --- a/src/status_im/ui/screens/about_app/views.cljs +++ b/src/status_im/ui/screens/about_app/views.cljs @@ -18,12 +18,12 @@ node-version [:get-app-node-version]] [react/scroll-view [quo/list-item - {:size :small - :title (i18n/label :t/privacy-policy) + {:size :small + :title (i18n/label :t/privacy-policy) :accessibility-label :privacy-policy :on-press #(re-frame/dispatch [:navigate-to :privacy-policy]) - :chevron true}] + :chevron true}] [quo/list-item {:size :small :title (i18n/label :t/terms-of-service) diff --git a/src/status_im/ui/screens/add_new/new_chat/views.cljs b/src/status_im/ui/screens/add_new/new_chat/views.cljs index 9fc095fcee..c3392545af 100644 --- a/src/status_im/ui/screens/add_new/new_chat/views.cljs +++ b/src/status_im/ui/screens/add_new/new_chat/views.cljs @@ -1,30 +1,30 @@ (ns status-im.ui.screens.add-new.new-chat.views (:require - [clojure.string :as string] - [quo.core :as quo] - [quo.design-system.colors :as colors] - [quo.platform :as platform] - [quo.react-native :as rn] - [re-frame.core :as re-frame] - [reagent.core :as reagent] - [status-im.ethereum.ens :as ens] - [utils.i18n :as i18n] - [status-im.multiaccounts.core :as multiaccounts] - [status-im.qr-scanner.core :as qr-scanner] - [status-im.ui.components.animation :as animation] - [status-im.ui.components.chat-icon.screen :as chat-icon] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.components.invite.views :as invite] - [status-im.ui.components.keyboard-avoid-presentation :as kb-presentation] - [status-im.ui.components.list.views :as list] - [status-im.ui.components.react :as react] - [status-im.ui.components.topbar :as topbar] - [status-im.ui.screens.chat.photos :as photos] - [status-im2.utils.validators :as validators] - [status-im.utils.gfycat.core :as gfycat] - [status-im.utils.identicon :as identicon] - [status-im.utils.utils :as utils] - [utils.debounce :as debounce]) + [clojure.string :as string] + [quo.core :as quo] + [quo.design-system.colors :as colors] + [quo.platform :as platform] + [quo.react-native :as rn] + [re-frame.core :as re-frame] + [reagent.core :as reagent] + [status-im.ethereum.ens :as ens] + [utils.i18n :as i18n] + [status-im.multiaccounts.core :as multiaccounts] + [status-im.qr-scanner.core :as qr-scanner] + [status-im.ui.components.animation :as animation] + [status-im.ui.components.chat-icon.screen :as chat-icon] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.invite.views :as invite] + [status-im.ui.components.keyboard-avoid-presentation :as kb-presentation] + [status-im.ui.components.list.views :as list] + [status-im.ui.components.react :as react] + [status-im.ui.components.topbar :as topbar] + [status-im.ui.screens.chat.photos :as photos] + [status-im2.utils.validators :as validators] + [status-im.utils.gfycat.core :as gfycat] + [status-im.utils.identicon :as identicon] + [status-im.utils.utils :as utils] + [utils.debounce :as debounce]) (:require-macros [status-im.utils.views :as views])) (defn- render-row @@ -155,8 +155,8 @@ [kb-presentation/keyboard-avoiding-view {:style {:flex 1}} [react/view {:style {:flex 1}} [topbar/topbar - {:title (i18n/label :t/new-chat) - :modal? true + {:title (i18n/label :t/new-chat) + :modal? true :right-accessories [{:icon :qr :accessibility-label :scan-contact-code-button @@ -176,13 +176,13 @@ :on-submit-editing #(when (= state :valid) (debounce/dispatch-and-chill [:contact.ui/contact-code-submitted false nil] 3000)) - :placeholder (i18n/label :t/enter-contact-code) - :show-cancel false + :placeholder (i18n/label :t/enter-contact-code) + :show-cancel false :accessibility-label :enter-contact-code-input - :auto-capitalize :none - :return-key-type :go - :monospace true - :auto-correct false}]]] + :auto-capitalize :none + :return-key-type :go + :monospace true + :auto-correct false}]]] [react/scroll-view {:style {:flex 1} :keyboard-dismiss-mode :on-drag @@ -306,8 +306,8 @@ public-key]))] [react/view {:style {:flex 1}} [topbar/topbar - {:title (i18n/label :t/new-contact) - :modal? true + {:title (i18n/label :t/new-contact) + :modal? true :right-accessories [{:icon :qr :accessibility-label :scan-contact-code-button @@ -331,11 +331,11 @@ #(when (= state :valid) (debounce/dispatch-and-chill [:contact.ui/contact-code-submitted true @entered-nickname] 3000)) - :placeholder (i18n/label :t/enter-contact-code) - :show-cancel false + :placeholder (i18n/label :t/enter-contact-code) + :show-cancel false :accessibility-label :enter-contact-code-input - :auto-capitalize :none - :return-key-type :go}]] + :auto-capitalize :none + :return-key-type :go}]] [react/view {:justify-content :center :align-items :center} @@ -351,7 +351,7 @@ (= state :valid) (str (when ens-name (str ens-name " • ")) (utils/get-shortened-address public-key)) - :else "")]] + :else "")]] [react/text {:style {:margin-horizontal 16 :color colors/gray}} (i18n/label :t/nickname-description)] [react/view {:padding 16} diff --git a/src/status_im/ui/screens/advanced_settings/views.cljs b/src/status_im/ui/screens/advanced_settings/views.cljs index a842c695d4..b63f2f1c89 100644 --- a/src/status_im/ui/screens/advanced_settings/views.cljs +++ b/src/status_im/ui/screens/advanced_settings/views.cljs @@ -17,104 +17,104 @@ webview-debug]}] (keep identity - [{:size :small - :title (i18n/label :t/network) - :accessibility-label :network-button + [{:size :small + :title (i18n/label :t/network) + :accessibility-label :network-button :container-margin-top 8 :on-press #(re-frame/dispatch [:navigate-to :network-settings]) - :accessory :text - :accessory-text network-name - :chevron true} - {:size :small - :title (i18n/label :t/network-info) - :accessibility-label :network-button + :accessory :text + :accessory-text network-name + :chevron true} + {:size :small + :title (i18n/label :t/network-info) + :accessibility-label :network-button :container-margin-top 8 :on-press #(re-frame/dispatch [:navigate-to :network-info]) - :chevron true} - {:size :small - :title (i18n/label :t/log-level) + :chevron true} + {:size :small + :title (i18n/label :t/log-level) :accessibility-label :log-level-settings-button :on-press #(re-frame/dispatch [:navigate-to :log-level-settings]) - :accessory :text - :accessory-text current-log-level - :chevron true} - {:size :small - :title (i18n/label :t/fleet) + :accessory :text + :accessory-text current-log-level + :chevron true} + {:size :small + :title (i18n/label :t/fleet) :accessibility-label :fleet-settings-button :on-press #(re-frame/dispatch [:navigate-to :fleet-settings]) - :accessory :text - :accessory-text current-fleet - :chevron true} + :accessory :text + :accessory-text current-fleet + :chevron true} (if wakuv2-flag - {:size :small - :title (i18n/label :t/wakuv2-settings) + {:size :small + :title (i18n/label :t/wakuv2-settings) :accessibility-label :wakuv2-settings-button :on-press #(re-frame/dispatch [:wakuv2.ui/enter-settings-pressed]) - :chevron true} - {:size :small - :title (i18n/label :t/bootnodes) + :chevron true} + {:size :small + :title (i18n/label :t/bootnodes) :accessibility-label :bootnodes-settings-button :on-press #(re-frame/dispatch [:navigate-to :bootnodes-settings]) - :chevron true}) - {:size :small - :title (i18n/label :t/rpc-usage-info) - :accessibility-label :rpc-usage-info + :chevron true}) + {:size :small + :title (i18n/label :t/rpc-usage-info) + :accessibility-label :rpc-usage-info :container-margin-top 8 :on-press #(re-frame/dispatch [:navigate-to :rpc-usage-info]) - :chevron true} - {:size :small - :title (i18n/label :t/peers-stats) - :accessibility-label :peers-stats + :chevron true} + {:size :small + :title (i18n/label :t/peers-stats) + :accessibility-label :peers-stats :container-margin-top 8 :on-press #(re-frame/dispatch [:navigate-to :peers-stats]) - :chevron true} + :chevron true} ;; If it's enabled in the config, we don't show the option (when (not config/communities-enabled?) - {:size :small - :title (i18n/label :t/communities-enabled) - :accessibility-label :communities-enabled + {:size :small + :title (i18n/label :t/communities-enabled) + :accessibility-label :communities-enabled :container-margin-bottom 8 :on-press #(re-frame/dispatch [:multiaccounts.ui/switch-communities-enabled (not communities-enabled?)]) - :accessory :switch - :active communities-enabled?}) - {:size :small - :title (i18n/label :t/transactions-management-enabled) - :accessibility-label :transactions-management-enabled + :accessory :switch + :active communities-enabled?}) + {:size :small + :title (i18n/label :t/transactions-management-enabled) + :accessibility-label :transactions-management-enabled :container-margin-bottom 8 :on-press #(re-frame/dispatch [:multiaccounts.ui/switch-transactions-management-enabled (not transactions-management-enabled?)]) - :accessory :switch - :active transactions-management-enabled?} - {:size :small - :title "Webview debug" - :accessibility-label :webview-debug-switch + :accessory :switch + :active transactions-management-enabled?} + {:size :small + :title "Webview debug" + :accessibility-label :webview-debug-switch :container-margin-bottom 8 :on-press #(re-frame/dispatch [:multiaccounts.ui/switch-webview-debug (not webview-debug)]) - :accessory :switch - :active webview-debug} - {:size :small - :title (i18n/label :t/waku-bloom-filter-mode) - :accessibility-label :waku-bloom-filter-mode-settings-switch + :accessory :switch + :active webview-debug} + {:size :small + :title (i18n/label :t/waku-bloom-filter-mode) + :accessibility-label :waku-bloom-filter-mode-settings-switch :container-margin-bottom 8 :on-press #(re-frame/dispatch [:multiaccounts.ui/waku-bloom-filter-mode-switched (not waku-bloom-filter-mode)]) - :accessory :switch - :active waku-bloom-filter-mode}])) + :accessory :switch + :active waku-bloom-filter-mode}])) (defn- flat-list-data [options] diff --git a/src/status_im/ui/screens/backup_settings/view.cljs b/src/status_im/ui/screens/backup_settings/view.cljs index 3076d2b80d..20e3ae405f 100644 --- a/src/status_im/ui/screens/backup_settings/view.cljs +++ b/src/status_im/ui/screens/backup_settings/view.cljs @@ -33,19 +33,19 @@ (views/letsubs [{:keys [last-backup backup-enabled?]} [:multiaccount] - performing-backup? [:backup/performing-backup]] + performing-backup? [:backup/performing-backup]] [:<> [react/scroll-view [quo/list-item - {:size :small - :title (i18n/label :t/backup-through-waku) - :accessibility-label :backup-enabled + {:size :small + :title (i18n/label :t/backup-through-waku) + :accessibility-label :backup-enabled :container-margin-bottom 8 :on-press #(re-frame/dispatch [:multiaccounts.ui/switch-backup-enabled (not backup-enabled?)]) - :accessory :switch - :active backup-enabled?}] + :accessory :switch + :active backup-enabled?}] [quo/list-item {:size :small :title (i18n/label :t/last-backup-performed) diff --git a/src/status_im/ui/screens/biometric/views.cljs b/src/status_im/ui/screens/biometric/views.cljs index 83c6c95bdf..2ba6222baa 100644 --- a/src/status_im/ui/screens/biometric/views.cljs +++ b/src/status_im/ui/screens/biometric/views.cljs @@ -65,9 +65,9 @@ [] (let [bio-label-type (get-bio-type-label)] [biometric-popover - {:title-label :t/biometric-disable-password-title - :ok-button-label :t/continue - :on-confirm :biometric/disable + {:title-label :t/biometric-disable-password-title + :ok-button-label :t/continue + :on-confirm :biometric/disable :description-text [[{:style {:color colors/gray}} diff --git a/src/status_im/ui/screens/bootnodes_settings/views.cljs b/src/status_im/ui/screens/bootnodes_settings/views.cljs index f6107c465b..326d36a613 100644 --- a/src/status_im/ui/screens/bootnodes_settings/views.cljs +++ b/src/status_im/ui/screens/bootnodes_settings/views.cljs @@ -28,7 +28,7 @@ bootnodes [:custom-bootnodes/network-bootnodes]] [:<> [topbar/topbar - {:title (i18n/label :t/bootnodes-settings) + {:title (i18n/label :t/bootnodes-settings) :right-accessories [{:icon :main-icons/add :accessibility-label :add-bootnode diff --git a/src/status_im/ui/screens/browser/tabs/views.cljs b/src/status_im/ui/screens/browser/tabs/views.cljs index d66fea8c64..3cd4cc392b 100644 --- a/src/status_im/ui/screens/browser/tabs/views.cljs +++ b/src/status_im/ui/screens/browser/tabs/views.cljs @@ -57,15 +57,15 @@ (views/letsubs [browsers [:browser/browsers-vals]] [react/view {:flex 1} [topbar/topbar - {:modal? true - :border-bottom false - :navigation :none + {:modal? true + :border-bottom false + :navigation :none :right-accessories [{:label (i18n/label :t/close-all) :accessibility-label :close-all :on-press #(do (re-frame/dispatch [:browser.ui/clear-all-browsers-pressed]) (re-frame/dispatch [:browser.ui/open-empty-tab]))}] - :title (i18n/label :t/tabs)}] + :title (i18n/label :t/tabs)}] [components/separator-dark] [list/flat-list {:data (conj browsers diff --git a/src/status_im/ui/screens/browser/views.cljs b/src/status_im/ui/screens/browser/views.cljs index 18cc7a6bd6..a68558bddb 100644 --- a/src/status_im/ui/screens/browser/views.cljs +++ b/src/status_im/ui/screens/browser/views.cljs @@ -1,29 +1,29 @@ (ns status-im.ui.screens.browser.views (:require - [quo.core :as quo] - [quo.design-system.colors :as colors] - [re-frame.core :as re-frame] - [reagent.core :as reagent] - [status-im.browser.core :as browser] - [status-im.browser.webview-ref :as webview-ref] - [utils.i18n :as i18n] - [status-im.qr-scanner.core :as qr-scanner] - [status-im.ui.components.chat-icon.screen :as chat-icon] - [status-im.ui.components.connectivity.view :as connectivity] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.components.permissions :as components.permissions] - [status-im.ui.components.react :as react] - [status-im.ui.components.tooltip.views :as tooltip] - [status-im.ui.components.webview :as components.webview] - [status-im.ui.screens.browser.accounts :as accounts] - [status-im.ui.screens.browser.options.views :as options] - [status-im.ui.screens.browser.permissions.views :as permissions.views] - [status-im.ui.screens.browser.site-blocked.views :as site-blocked.views] - [status-im.ui.screens.browser.styles :as styles] - [status-im.ui.screens.wallet.components.views :as components] - [status-im.utils.http :as http] - [status-im.utils.js-resources :as js-res] - [utils.debounce :as debounce]) + [quo.core :as quo] + [quo.design-system.colors :as colors] + [re-frame.core :as re-frame] + [reagent.core :as reagent] + [status-im.browser.core :as browser] + [status-im.browser.webview-ref :as webview-ref] + [utils.i18n :as i18n] + [status-im.qr-scanner.core :as qr-scanner] + [status-im.ui.components.chat-icon.screen :as chat-icon] + [status-im.ui.components.connectivity.view :as connectivity] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.permissions :as components.permissions] + [status-im.ui.components.react :as react] + [status-im.ui.components.tooltip.views :as tooltip] + [status-im.ui.components.webview :as components.webview] + [status-im.ui.screens.browser.accounts :as accounts] + [status-im.ui.screens.browser.options.views :as options] + [status-im.ui.screens.browser.permissions.views :as permissions.views] + [status-im.ui.screens.browser.site-blocked.views :as site-blocked.views] + [status-im.ui.screens.browser.styles :as styles] + [status-im.ui.screens.wallet.components.views :as components] + [status-im.utils.http :as http] + [status-im.utils.js-resources :as js-res] + [utils.debounce :as debounce]) (:require-macros [status-im.utils.views :as views])) (defn toolbar-content diff --git a/src/status_im/ui/screens/chat/components/accessory.cljs b/src/status_im/ui/screens/chat/components/accessory.cljs index 723d5f0bdc..ccfeabd38b 100644 --- a/src/status_im/ui/screens/chat/components/accessory.cljs +++ b/src/status_im/ui/screens/chat/components/accessory.cljs @@ -15,25 +15,26 @@ (defn create-pan-responder [y pan-active] (when-not platform/android? - (js->clj (.-panHandlers - ^js - (.create - ^js rn/pan-responder - #js - {:onPanResponderGrant (fn [] - (animated/set-value pan-active 1)) - :onPanResponderMove (fn [_ ^js state] - (animated/set-value y (.-moveY state))) - :onPanResponderRelease (fn [] - (animated/set-value pan-active 0) - (js/setTimeout - #(animated/set-value y 0) - 100)) - :onPanResponderTerminate (fn [] - (animated/set-value pan-active 0) - (js/setTimeout - #(animated/set-value y 0) - 100))}))))) + (js->clj + (.-panHandlers + ^js + (.create + ^js rn/pan-responder + #js + {:onPanResponderGrant (fn [] + (animated/set-value pan-active 1)) + :onPanResponderMove (fn [_ ^js state] + (animated/set-value y (.-moveY state))) + :onPanResponderRelease (fn [] + (animated/set-value pan-active 0) + (js/setTimeout + #(animated/set-value y 0) + 100)) + :onPanResponderTerminate (fn [] + (animated/set-value pan-active 0) + (js/setTimeout + #(animated/set-value y 0) + 100))}))))) (def ios-view (reagent/adapt-react-class diff --git a/src/status_im/ui/screens/chat/components/hooks.cljs b/src/status_im/ui/screens/chat/components/hooks.cljs index 0b6a11d817..8be96943fe 100644 --- a/src/status_im/ui/screens/chat/components/hooks.cljs +++ b/src/status_im/ui/screens/chat/components/hooks.cljs @@ -21,25 +21,26 @@ :max-height (+ (if platform/ios? bottom 0) default-kb-height)})] (react/effect! (fn [] - (letfn [(dimensions-change [evt] - (swap! keyboard assoc :end-position (-> ^js evt .-window .-height))) - (keyboard-dimensions [evt] - (let [duration (.-duration ^js evt) - easing (.-easing ^js evt) - screen-y (-> ^js evt .-endCoordinates .-screenY) - new-height (- height screen-y)] - (when-not (= new-height (:height @keyboard)) - (when (and duration easing platform/ios?) - (rn/configure-next - #js - {:duration (max min-duration duration) - :update #js - {:duration (max min-duration duration) - :type (-> ^js rn/layout-animation .-Types (aget easing))}}))) - (reset! keyboard {:height new-height - :end-position screen-y - :duration (max min-duration duration) - :max-height (max new-height (:max-height @keyboard))})))] + (letfn + [(dimensions-change [evt] + (swap! keyboard assoc :end-position (-> ^js evt .-window .-height))) + (keyboard-dimensions [evt] + (let [duration (.-duration ^js evt) + easing (.-easing ^js evt) + screen-y (-> ^js evt .-endCoordinates .-screenY) + new-height (- height screen-y)] + (when-not (= new-height (:height @keyboard)) + (when (and duration easing platform/ios?) + (rn/configure-next + #js + {:duration (max min-duration duration) + :update #js + {:duration (max min-duration duration) + :type (-> ^js rn/layout-animation .-Types (aget easing))}}))) + (reset! keyboard {:height new-height + :end-position screen-y + :duration (max min-duration duration) + :max-height (max new-height (:max-height @keyboard))})))] (.addEventListener rn/dimensions "change" dimensions-change) (reset! keyboard-listener (.addListener rn/keyboard keyboard-change-event keyboard-dimensions)) (fn [] diff --git a/src/status_im/ui/screens/chat/components/input.cljs b/src/status_im/ui/screens/chat/components/input.cljs index 2c848e14a2..589d3a6abd 100644 --- a/src/status_im/ui/screens/chat/components/input.cljs +++ b/src/status_im/ui/screens/chat/components/input.cljs @@ -275,30 +275,30 @@ contact-request @(re-frame/subscribe [:chats/sending-contact-request])] [rn/text-input - {:style (styles/text-input contact-request) - :ref (:text-input-ref refs) + {:style (styles/text-input contact-request) + :ref (:text-input-ref refs) :max-font-size-multiplier 1 - :accessibility-label :chat-message-input - :text-align-vertical :center - :multiline true - :editable (not cooldown-enabled?) - :blur-on-submit false - :auto-focus false - :on-focus #(set-active-panel nil) - :max-length chat.constants/max-text-size - :placeholder-text-color (:text-02 @colors/theme) - :placeholder (if cooldown-enabled? - (i18n/label :cooldown/text-input-disabled) - (i18n/label :t/type-a-message)) - :underline-color-android :transparent - :auto-capitalize :sentences - :on-selection-change (partial on-selection-change - timeout-id - last-text-change - mentionable-users) + :accessibility-label :chat-message-input + :text-align-vertical :center + :multiline true + :editable (not cooldown-enabled?) + :blur-on-submit false + :auto-focus false + :on-focus #(set-active-panel nil) + :max-length chat.constants/max-text-size + :placeholder-text-color (:text-02 @colors/theme) + :placeholder (if cooldown-enabled? + (i18n/label :cooldown/text-input-disabled) + (i18n/label :t/type-a-message)) + :underline-color-android :transparent + :auto-capitalize :sentences + :on-selection-change (partial on-selection-change + timeout-id + last-text-change + mentionable-users) :on-change (partial on-change last-text-change timeout-id mentionable-users refs chat-id sending-image) - :on-text-input (partial on-text-input mentionable-users chat-id)} + :on-text-input (partial on-text-input mentionable-users chat-id)} (if mentions-enabled (for [[idx [type text]] (map-indexed (fn [idx item] @@ -314,9 +314,9 @@ (let [ens-name? (not= alias name)] [list-item/list-item (cond-> - {:icon [photos/member-photo public-key] - :size :small - :text-size :small + {:icon [photos/member-photo public-key] + :size :small + :text-size :small :title [text/text {:weight :medium @@ -404,13 +404,14 @@ (let [;we want to control components on native level, so instead of RN state we set native props ;via reference ;we don't react on input text in this view, @input-texts below is a regular atom - refs {:actions-ref actions-ref - :send-ref send-ref - :sticker-ref sticker-ref - :text-input-ref text-input-ref} - {:keys [send stickers image extensions audio sending-image]} @toolbar-options - show-send (or show-send sending-image) - contact-request @(re-frame/subscribe [:chats/sending-contact-request])] + refs {:actions-ref actions-ref + :send-ref send-ref + :sticker-ref sticker-ref + :text-input-ref text-input-ref} + {:keys [send stickers image extensions audio + sending-image]} @toolbar-options + show-send (or show-send sending-image) + contact-request @(re-frame/subscribe [:chats/sending-contact-request])] [rn/view {:style (styles/toolbar) :on-layout on-chat-toolbar-layout} diff --git a/src/status_im/ui/screens/chat/styles/message/message.cljs b/src/status_im/ui/screens/chat/styles/message/message.cljs index 1352ad031e..fea141a1f8 100644 --- a/src/status_im/ui/screens/chat/styles/message/message.cljs +++ b/src/status_im/ui/screens/chat/styles/message/message.cljs @@ -144,7 +144,7 @@ (defn emoji-message [{:keys [incoming-group]}] {:font-size 28 - :line-height 34 ;TODO: Smaller crops the icon on the top + :line-height 34 ;TODO: Smaller crops the icon on the top :margin-right 0 ;; Margin to display outgoing message status :margin-top (if incoming-group 4 0)}) @@ -318,9 +318,9 @@ (update (default-text-style) :style assoc - :color (quo2.colors/theme-colors quo2.colors/neutral-40 quo2.colors/neutral-50) - :font-size 13 - :line-height 18.2 + :color (quo2.colors/theme-colors quo2.colors/neutral-40 quo2.colors/neutral-50) + :font-size 13 + :line-height 18.2 :letter-spacing (typography/tracking 13)))) (def code-block-background "#2E386B") @@ -361,8 +361,8 @@ :style assoc :line-height 19 - :font-size 14 - :color colors/black-transparent-50)) + :font-size 14 + :color colors/black-transparent-50)) (defn outgoing-blockquote-text-style [] diff --git a/src/status_im/ui/screens/communities/community.cljs b/src/status_im/ui/screens/communities/community.cljs index 8e9027f9b1..131beaa055 100644 --- a/src/status_im/ui/screens/communities/community.cljs +++ b/src/status_im/ui/screens/communities/community.cljs @@ -1,29 +1,29 @@ (ns status-im.ui.screens.communities.community (:require - [utils.i18n :as i18n] - [quo.core :as quo] - [quo.design-system.colors :as colors] - [quo2.components.community.style :as styles] ;; TODO reimplement with quo2 library and new - ;; designs - [quo2.components.navigation.floating-shell-button :as floating-shell-button] - [react-native.core :as rn] - [status-im.communities.core :as communities] - [status-im2.constants :as constants] - [status-im.react-native.resources :as resources] - [status-im.ui.components.accordion :as accordion] - [status-im.ui.components.chat-icon.screen :as chat-icon.screen] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.components.list.views :as list] - [status-im.ui.components.plus-button :as components.plus-button] - [status-im.ui.components.react :as react] - [status-im.ui.components.toolbar :as toolbar] - [status-im.ui.components.topbar :as topbar] - [status-im.ui.screens.chat.photos :as photos] - [status-im.ui.screens.chat.sheets :as sheets] - [status-im.ui.screens.home.views.inner-item :as inner-item] - [status-im.utils.core :as utils] - [utils.datetime :as datetime] - [utils.re-frame :as rf])) + [utils.i18n :as i18n] + [quo.core :as quo] + [quo.design-system.colors :as colors] + [quo2.components.community.style :as styles] ;; TODO reimplement with quo2 library and new + ;; designs + [quo2.components.navigation.floating-shell-button :as floating-shell-button] + [react-native.core :as rn] + [status-im.communities.core :as communities] + [status-im2.constants :as constants] + [status-im.react-native.resources :as resources] + [status-im.ui.components.accordion :as accordion] + [status-im.ui.components.chat-icon.screen :as chat-icon.screen] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.list.views :as list] + [status-im.ui.components.plus-button :as components.plus-button] + [status-im.ui.components.react :as react] + [status-im.ui.components.toolbar :as toolbar] + [status-im.ui.components.topbar :as topbar] + [status-im.ui.screens.chat.photos :as photos] + [status-im.ui.screens.chat.sheets :as sheets] + [status-im.ui.screens.home.views.inner-item :as inner-item] + [status-im.utils.core :as utils] + [utils.datetime :as datetime] + [utils.re-frame :as rf])) (def request-cooldown-ms (* 24 60 60 1000)) diff --git a/src/status_im/ui/screens/communities/members.cljs b/src/status_im/ui/screens/communities/members.cljs index 05b081ed7d..16fdf40c96 100644 --- a/src/status_im/ui/screens/communities/members.cljs +++ b/src/status_im/ui/screens/communities/members.cljs @@ -76,8 +76,8 @@ {:content (fn [] [member-sheet first-name member community-id can-kick-users? can-manage-users? admin?])}]) - :type :icon - :theme :icon + :type :icon + :theme :icon :accessibility-label :menu-option} :main-icons/more])}])) @@ -98,13 +98,13 @@ requests-count (count requests)] [:<> [quo/list-item - {:chevron true + {:chevron true :accessory [react/view {:flex-direction :row} (when (pos? requests-count) [unviewed-indicator/unviewed-indicator requests-count])] - :on-press #(rf/dispatch [:navigate-to :community-requests-to-join {:community-id community-id}]) - :title (i18n/label :t/membership-requests)}] + :on-press #(rf/dispatch [:navigate-to :community-requests-to-join {:community-id community-id}]) + :title (i18n/label :t/membership-requests)}] [quo/separator {:style {:margin-vertical 8}}]])) (defn members diff --git a/src/status_im/ui/screens/communities/profile.cljs b/src/status_im/ui/screens/communities/profile.cljs index 64bd3e8909..58eb2fef73 100644 --- a/src/status_im/ui/screens/communities/profile.cljs +++ b/src/status_im/ui/screens/communities/profile.cljs @@ -18,14 +18,15 @@ [] (let [{:keys [community-id]} (rf/sub [:get-screen-params])] (fn [] - (let [requests-to-join (rf/sub [:communities/requests-to-join-for-community community-id]) - community (rf/sub [:communities/community community-id]) - {:keys [color members permissions description name admin]} community - roles false - notifications false - show-members-count? (not= (:access permissions) constants/community-no-membership-access) - request-membership? (= (:access permissions) constants/community-on-request-access) - members-count (count members)] + (let [requests-to-join (rf/sub [:communities/requests-to-join-for-community community-id]) + community (rf/sub [:communities/community community-id]) + {:keys [color members permissions description + name admin]} community + roles false + notifications false + show-members-count? (not= (:access permissions) constants/community-no-membership-access) + request-membership? (= (:access permissions) constants/community-on-request-access) + members-count (count members)] [:<> [quo/animated-header {:left-accessories [{:icon :main-icons/arrow-left @@ -76,15 +77,15 @@ [quo/separator {:style {:margin-vertical 8}}]] (when show-members-count? [quo/list-item - {:chevron true + {:chevron true :accessory [react/view {:flex-direction :row} (when (pos? members-count) [quo/text {:color :secondary} (str members-count)]) [unviewed-indicator/unviewed-indicator (count requests-to-join)]] - :on-press #(rf/dispatch [:navigate-to :community-members {:community-id community-id}]) - :title (i18n/label :t/members-label) - :icon :main-icons/group-chat}]) + :on-press #(rf/dispatch [:navigate-to :community-members {:community-id community-id}]) + :title (i18n/label :t/members-label) + :icon :main-icons/group-chat}]) (when (and admin roles) [quo/list-item {:chevron true diff --git a/src/status_im/ui/screens/communities/reorder_categories.cljs b/src/status_im/ui/screens/communities/reorder_categories.cljs index d89b0f3ab1..362271ef74 100644 --- a/src/status_im/ui/screens/communities/reorder_categories.cljs +++ b/src/status_im/ui/screens/communities/reorder_categories.cljs @@ -188,22 +188,22 @@ (defn view [] - (let [{:keys [community-id]} (rf/sub [:get-screen-params]) + (let [{:keys [community-id]} (rf/sub [:get-screen-params]) {:keys [id name images members permissions color]} (rf/sub [:communities/community community-id]) - sorted-categories (rf/sub [:communities/sorted-categories - community-id]) - categories (if (categories-tab?) - sorted-categories - (conj sorted-categories - {:id "" - :position (count - sorted-categories) - :name (i18n/label :t/none) - :community-id community-id})) - chats (rf/sub - [:chats/sorted-categories-by-community-id - community-id])] + sorted-categories (rf/sub [:communities/sorted-categories + community-id]) + categories (if (categories-tab?) + sorted-categories + (conj sorted-categories + {:id "" + :position (count + sorted-categories) + :name (i18n/label :t/none) + :community-id community-id})) + chats (rf/sub + [:chats/sorted-categories-by-community-id + community-id])] (reset-data categories chats) [:<> [topbar/topbar diff --git a/src/status_im/ui/screens/communities/views.cljs b/src/status_im/ui/screens/communities/views.cljs index df0d870d85..31025113f3 100644 --- a/src/status_im/ui/screens/communities/views.cljs +++ b/src/status_im/ui/screens/communities/views.cljs @@ -149,7 +149,7 @@ (cond-> {:title (i18n/label :t/communities)} communities-enabled? (assoc :right-accessories - [{:icon :main-icons/more + [{:icon :main-icons/more :accessibility-label :chat-menu-button :on-press #(rf/dispatch [:bottom-sheet/show-sheet diff --git a/src/status_im/ui/screens/ens/views.cljs b/src/status_im/ui/screens/ens/views.cljs index dd95c5a1e9..7898477dcb 100644 --- a/src/status_im/ui/screens/ens/views.cljs +++ b/src/status_im/ui/screens/ens/views.cljs @@ -1,31 +1,31 @@ (ns status-im.ui.screens.ens.views (:require - [clojure.string :as string] - [quo.core :as quo] - [quo.design-system.colors :as colors] - [re-frame.core :as re-frame] - [reagent.core :as reagent] - [status-im.ens.core :as ens] - [status-im.ethereum.core :as ethereum] - [status-im.ethereum.ens :as ethereum.ens] - [status-im.ethereum.stateofus :as stateofus] - [status-im.ethereum.tokens :as tokens] - [utils.i18n :as i18n] - [status-im.multiaccounts.core :as multiaccounts] - [status-im.react-native.resources :as resources] - [status-im.ui.components.chat-icon.screen :as chat-icon] - [status-im.ui.components.checkbox.view :as checkbox] - [status-im.ui.components.common.common :as components.common] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.components.react :as react] - [status-im.ui.components.toolbar :as toolbar] - [status-im.ui.components.topbar :as topbar] - [status-im.ui.screens.chat.photos :as photos] - [status-im.ui.screens.chat.utils :as chat.utils] - [status-im.ui.screens.profile.components.views :as profile.components] - [status-im.ui.screens.wallet.send.sheets :as sheets] - [status-im.utils.utils :as utils] - [utils.debounce :as debounce]) + [clojure.string :as string] + [quo.core :as quo] + [quo.design-system.colors :as colors] + [re-frame.core :as re-frame] + [reagent.core :as reagent] + [status-im.ens.core :as ens] + [status-im.ethereum.core :as ethereum] + [status-im.ethereum.ens :as ethereum.ens] + [status-im.ethereum.stateofus :as stateofus] + [status-im.ethereum.tokens :as tokens] + [utils.i18n :as i18n] + [status-im.multiaccounts.core :as multiaccounts] + [status-im.react-native.resources :as resources] + [status-im.ui.components.chat-icon.screen :as chat-icon] + [status-im.ui.components.checkbox.view :as checkbox] + [status-im.ui.components.common.common :as components.common] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.react :as react] + [status-im.ui.components.toolbar :as toolbar] + [status-im.ui.components.topbar :as topbar] + [status-im.ui.screens.chat.photos :as photos] + [status-im.ui.screens.chat.utils :as chat.utils] + [status-im.ui.screens.profile.components.views :as profile.components] + [status-im.ui.screens.wallet.send.sheets :as sheets] + [status-im.utils.utils :as utils] + [utils.debounce :as debounce]) (:require-macros [status-im.utils.views :as views])) (defn- link @@ -269,7 +269,7 @@ [checked contract] [react/view {:flex-direction :row - :margin-left 26 ;; 10 for checkbox + 16 + :margin-left 26 ;; 10 for checkbox + 16 :margin-right 16 :margin-top 14 :align-items :flex-start diff --git a/src/status_im/ui/screens/help_center/views.cljs b/src/status_im/ui/screens/help_center/views.cljs index a265964cf9..f682650754 100644 --- a/src/status_im/ui/screens/help_center/views.cljs +++ b/src/status_im/ui/screens/help_center/views.cljs @@ -7,32 +7,32 @@ [status-im.ui.components.react :as react])) (def data - [{:size :small - :title (i18n/label :t/faq) + [{:size :small + :title (i18n/label :t/faq) :accessibility-label :faq-button :on-press #(.openURL ^js react/linking constants/faq) - :chevron true} - {:size :small - :title (i18n/label :t/glossary) + :chevron true} + {:size :small + :title (i18n/label :t/glossary) :accessibility-label :glossary-button :on-press #(re-frame/dispatch [:navigate-to :glossary]) - :chevron true} - {:size :small - :title (i18n/label :t/submit-bug) + :chevron true} + {:size :small + :title (i18n/label :t/submit-bug) :accessibility-label :submit-bug-button :on-press #(re-frame/dispatch [:open-modal :bug-report]) - :chevron true} - {:size :small - :title (i18n/label :t/request-feature) + :chevron true} + {:size :small + :title (i18n/label :t/request-feature) :accessibility-label :request-a-feature-button :on-press #(re-frame/dispatch [:chat.ui/start-public-chat "support"]) - :chevron true}]) + :chevron true}]) (defn help-center [] diff --git a/src/status_im/ui/screens/home/views.cljs b/src/status_im/ui/screens/home/views.cljs index bc4ac06ad8..b692a98e4b 100644 --- a/src/status_im/ui/screens/home/views.cljs +++ b/src/status_im/ui/screens/home/views.cljs @@ -1,32 +1,32 @@ (ns status-im.ui.screens.home.views (:require - [quo.core :as quo] - [quo.design-system.colors :as colors] - [quo2.components.buttons.button :as quo2.button] - [quo2.components.markdown.text :as quo2.text] - [quo2.foundations.colors :as quo2.colors] - [re-frame.core :as re-frame] - [reagent.core :as reagent] - [status-im.add-new.db :as db] - [utils.i18n :as i18n] - [status-im.qr-scanner.core :as qr-scanner] - [status-im.react-native.resources :as resources] - [status-im.ui.components.chat-icon.screen :as chat-icon.screen] - [status-im.ui.components.chat-icon.styles :as chat-icon.styles] - [status-im.ui.components.connectivity.view :as connectivity] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.components.invite.views :as invite] - [status-im.ui.components.list.views :as list] - [status-im.ui.components.plus-button :as components.plus-button] - [status-im.ui.components.react :as react] - [status-im.ui.components.search-input.view :as search-input] - [status-im.ui.components.topbar :as topbar] - [status-im.ui.screens.chat.sheets :as sheets] - [status-im.ui.screens.communities.views :as communities.views] - [status-im.ui.screens.home.styles :as styles] - [status-im.ui.screens.home.views.inner-item :as inner-item] - [status-im.utils.utils :as utils] - [utils.debounce :as debounce]) + [quo.core :as quo] + [quo.design-system.colors :as colors] + [quo2.components.buttons.button :as quo2.button] + [quo2.components.markdown.text :as quo2.text] + [quo2.foundations.colors :as quo2.colors] + [re-frame.core :as re-frame] + [reagent.core :as reagent] + [status-im.add-new.db :as db] + [utils.i18n :as i18n] + [status-im.qr-scanner.core :as qr-scanner] + [status-im.react-native.resources :as resources] + [status-im.ui.components.chat-icon.screen :as chat-icon.screen] + [status-im.ui.components.chat-icon.styles :as chat-icon.styles] + [status-im.ui.components.connectivity.view :as connectivity] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.invite.views :as invite] + [status-im.ui.components.list.views :as list] + [status-im.ui.components.plus-button :as components.plus-button] + [status-im.ui.components.react :as react] + [status-im.ui.components.search-input.view :as search-input] + [status-im.ui.components.topbar :as topbar] + [status-im.ui.screens.chat.sheets :as sheets] + [status-im.ui.screens.communities.views :as communities.views] + [status-im.ui.screens.home.styles :as styles] + [status-im.ui.screens.home.views.inner-item :as inner-item] + [status-im.utils.utils :as utils] + [utils.debounce :as debounce]) (:require-macros [status-im.utils.views :as views])) (defn home-tooltip-view @@ -117,8 +117,8 @@ [search-value] (let [{:keys [state ens-name public-key compressed-key]} @(re-frame/subscribe [:contacts/new-identity]) - valid-private? (= state :valid) - valid-public? (db/valid-topic? search-value)] + valid-private? (= state :valid) + valid-public? (db/valid-topic? search-value)] (when (or valid-public? valid-private?) [react/view [quo/list-header (i18n/label :t/search-no-chat-found)] diff --git a/src/status_im/ui/screens/keycard/keycard_interaction.cljs b/src/status_im/ui/screens/keycard/keycard_interaction.cljs index 1913a045d1..3458a94ff7 100644 --- a/src/status_im/ui/screens/keycard/keycard_interaction.cljs +++ b/src/status_im/ui/screens/keycard/keycard_interaction.cljs @@ -75,8 +75,8 @@ [(:header params)]) (if @(re-frame/subscribe [:keycard/nfc-enabled?]) [card-sync-flow - {:connected? connected? - :params (select-keys params [:state-translations]) + {:connected? connected? + :params (select-keys params [:state-translations]) :on-card-disconnected #(re-frame/dispatch [on-disconnect]) :on-card-connected diff --git a/src/status_im/ui/screens/keycard/settings/views.cljs b/src/status_im/ui/screens/keycard/settings/views.cljs index f76fe22750..453b4b1f31 100644 --- a/src/status_im/ui/screens/keycard/settings/views.cljs +++ b/src/status_im/ui/screens/keycard/settings/views.cljs @@ -138,4 +138,4 @@ {:back-button-handler :navigate-back :hide-login-actions? true - :default-enter-step :reset}]) + :default-enter-step :reset}]) diff --git a/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs b/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs index 8d9050d95a..52109c733f 100644 --- a/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs +++ b/src/status_im/ui/screens/multiaccounts/key_storage/views.cljs @@ -26,15 +26,15 @@ (when action {:navigation {:on-press #(re-frame/dispatch [action])}}))]) (defonce accordian-data - [{:id :type - :label (i18n/label :t/type) - :value (i18n/label :t/master-account)} - {:id :back-up - :label (i18n/label :t/back-up) - :value (i18n/label :t/recovery-phrase)} - {:id :storage - :label (i18n/label :t/storage) - :value (i18n/label :t/key-on-device)}]) + [{:id :type + :label (i18n/label :t/type) + :value (i18n/label :t/master-account)} + {:id :back-up + :label (i18n/label :t/back-up) + :value (i18n/label :t/recovery-phrase)} + {:id :storage + :label (i18n/label :t/storage) + :value (i18n/label :t/key-on-device)}]) (defn accordion-content [] diff --git a/src/status_im/ui/screens/multiaccounts/login/views.cljs b/src/status_im/ui/screens/multiaccounts/login/views.cljs index 8559c71f88..1018acab77 100644 --- a/src/status_im/ui/screens/multiaccounts/login/views.cljs +++ b/src/status_im/ui/screens/multiaccounts/login/views.cljs @@ -111,7 +111,7 @@ [key-storage/keycard-upsell-banner])) [toolbar/toolbar - {:size :large + {:size :large :center [react/view {:padding-horizontal 8} [quo/button diff --git a/src/status_im/ui/screens/network/views.cljs b/src/status_im/ui/screens/network/views.cljs index 4903ff01c3..a6fd710269 100644 --- a/src/status_im/ui/screens/network/views.cljs +++ b/src/status_im/ui/screens/network/views.cljs @@ -49,7 +49,7 @@ networks [:get-networks]] [:<> [topbar/topbar - {:title (i18n/label :t/network-settings) + {:title (i18n/label :t/network-settings) :right-accessories [{:icon :main-icons/add :on-press #(re-frame/dispatch [::network/add-network-pressed])}]}] diff --git a/src/status_im/ui/screens/network_info/views.cljs b/src/status_im/ui/screens/network_info/views.cljs index d540b8c786..f5dcbbcc72 100644 --- a/src/status_im/ui/screens/network_info/views.cljs +++ b/src/status_im/ui/screens/network_info/views.cljs @@ -26,7 +26,7 @@ (defn check-lag [] - (let [latest-block (reagent/atom nil) + (let [latest-block (reagent/atom nil) last-loaded-block (reagent/atom nil) on-press (fn [] diff --git a/src/status_im/ui/screens/offline_messaging_settings/views.cljs b/src/status_im/ui/screens/offline_messaging_settings/views.cljs index 615374a146..7f6ecb0ef1 100644 --- a/src/status_im/ui/screens/offline_messaging_settings/views.cljs +++ b/src/status_im/ui/screens/offline_messaging_settings/views.cljs @@ -56,7 +56,7 @@ {:keys [use-mailservers?]} [:multiaccount]] [react/view {:style styles/wrapper} [topbar/topbar - {:title (i18n/label :t/history-nodes) + {:title (i18n/label :t/history-nodes) :right-accessories [{:icon :main-icons/add-circle :on-press #(re-frame/dispatch [:mailserver.ui/add-pressed])}]}] diff --git a/src/status_im/ui/screens/onboarding/intro/views.cljs b/src/status_im/ui/screens/onboarding/intro/views.cljs index c65be2ba92..8214ae4d3c 100644 --- a/src/status_im/ui/screens/onboarding/intro/views.cljs +++ b/src/status_im/ui/screens/onboarding/intro/views.cljs @@ -72,7 +72,7 @@ :size :x-large} (i18n/label (:title s))] [quo/text - {:style (styles/wizard-text-with-height @text-height) + {:style (styles/wizard-text-with-height @text-height) :on-layout (fn [^js e] (let [new-height (-> e .-nativeEvent .-layout .-height)] diff --git a/src/status_im/ui/screens/onboarding/password/views.cljs b/src/status_im/ui/screens/onboarding/password/views.cljs index 568180ee11..ccff001bbc 100644 --- a/src/status_im/ui/screens/onboarding/password/views.cljs +++ b/src/status_im/ui/screens/onboarding/password/views.cljs @@ -90,8 +90,8 @@ (not (confirm-password @password @confirm)) (reset! show-error true) - :else (reset! show-error - false)))}]]] + :else (reset! show-error + false)))}]]] [quo/text {:color :secondary :align :center diff --git a/src/status_im/ui/screens/onboarding/phrase/view.cljs b/src/status_im/ui/screens/onboarding/phrase/view.cljs index a8d3b8c746..a13fa550d3 100644 --- a/src/status_im/ui/screens/onboarding/phrase/view.cljs +++ b/src/status_im/ui/screens/onboarding/phrase/view.cljs @@ -136,8 +136,8 @@ {:on-change-text #(re-frame/dispatch [:multiaccounts.recover/enter-passphrase-input-changed (security/mask-data %)]) - :placeholder (i18n/label :t/bip39-password-placeholder) - :show-cancel false}])]] + :placeholder (i18n/label :t/bip39-password-placeholder) + :show-cancel false}])]] [react/view {:align-items :center} [react/text {:style {:color colors/gray diff --git a/src/status_im/ui/screens/popover/views.cljs b/src/status_im/ui/screens/popover/views.cljs index 2203c9ee31..aac49024eb 100644 --- a/src/status_im/ui/screens/popover/views.cljs +++ b/src/status_im/ui/screens/popover/views.cljs @@ -99,7 +99,7 @@ :else (do (reset! current-popover nil) (on-hide)))) - :component-will-unmount on-hide + :component-will-unmount on-hide :reagent-render (fn [] (when @current-popover diff --git a/src/status_im/ui/screens/privacy_and_security_settings/events.cljs b/src/status_im/ui/screens/privacy_and_security_settings/events.cljs index eede26e6cc..89c207dd33 100644 --- a/src/status_im/ui/screens/privacy_and_security_settings/events.cljs +++ b/src/status_im/ui/screens/privacy_and_security_settings/events.cljs @@ -40,11 +40,11 @@ [{:keys [db] :as cofx} masked-password] (log/info "[delete-profile] delete") (let [{:keys [key-uid wallet-root-address]} (:multiaccount db)] - {:db (dissoc db :delete-profile/error) + {:db (dissoc db :delete-profile/error) ::delete-profile {:masked-password masked-password - :key-uid key-uid - :address wallet-root-address + :key-uid key-uid + :address wallet-root-address :callback (fn [error result] (log/info "[delete-profile] callback" error) diff --git a/src/status_im/ui/screens/profile/user/views.cljs b/src/status_im/ui/screens/profile/user/views.cljs index 4342e90351..7cd1f80c82 100644 --- a/src/status_im/ui/screens/profile/user/views.cljs +++ b/src/status_im/ui/screens/profile/user/views.cljs @@ -177,10 +177,10 @@ :on-press #(re-frame/dispatch [:navigate-to :settings-syncing])}]) [react/view {:padding-vertical 24} [quo/list-item - {:icon :main-icons/log-out - :title (i18n/label :t/sign-out) + {:icon :main-icons/log-out + :title (i18n/label :t/sign-out) :accessibility-label :log-out-button - :theme :negative + :theme :negative :on-press #(re-frame/dispatch [:multiaccounts.logout.ui/logout-pressed])}]]])) diff --git a/src/status_im/ui/screens/profile/visibility_status/views.cljs b/src/status_im/ui/screens/profile/visibility_status/views.cljs index 26322204f9..863dd90df3 100644 --- a/src/status_im/ui/screens/profile/visibility_status/views.cljs +++ b/src/status_im/ui/screens/profile/visibility_status/views.cljs @@ -209,7 +209,7 @@ :else (do (reset! current-popover nil) (on-hide)))) - :component-will-unmount on-hide + :component-will-unmount on-hide :reagent-render (fn [] (when @current-popover diff --git a/src/status_im/ui/screens/rpc_usage_info.cljs b/src/status_im/ui/screens/rpc_usage_info.cljs index 2577edd8a1..3a39aa1e19 100644 --- a/src/status_im/ui/screens/rpc_usage_info.cljs +++ b/src/status_im/ui/screens/rpc_usage_info.cljs @@ -161,4 +161,4 @@ :component-will-unmount (fn [] (utils/clear-interval @rpc-refresh-interval) (reset! rpc-refresh-interval nil)) - :reagent-render usage-info-render})) + :reagent-render usage-info-render})) diff --git a/src/status_im/ui/screens/screens.cljs b/src/status_im/ui/screens/screens.cljs index 712f69723a..ff0ea80f33 100644 --- a/src/status_im/ui/screens/screens.cljs +++ b/src/status_im/ui/screens/screens.cljs @@ -1,110 +1,110 @@ (ns status-im.ui.screens.screens (:require - [quo.design-system.colors :as colors] - [utils.i18n :as i18n] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.screens.about-app.views :as about-app] - [status-im.ui.screens.add-new.new-chat.views :as new-chat] - [status-im.ui.screens.add-new.new-public-chat.view :as new-public-chat] - [status-im.ui.screens.advanced-settings.views :as advanced-settings] - [status-im.ui.screens.appearance.views :as appearance] - [status-im.ui.screens.backup-settings.view :as backup-settings] - [status-im.ui.screens.bootnodes-settings.edit-bootnode.views :as edit-bootnode] - [status-im.ui.screens.bootnodes-settings.views :as bootnodes-settings] - [status-im.ui.screens.browser.bookmarks.views :as bookmarks] - [status-im.ui.screens.browser.empty-tab.views :as empty-tab] - [status-im.ui.screens.browser.tabs.views :as browser.tabs] - [status-im.ui.screens.browser.views :as browser] - [status-im.ui.screens.bug-report :as bug-report] - [status-im.ui.screens.communities.channel-details :as communities.channel-details] - [status-im.ui.screens.communities.community :as community] - [status-im.ui.screens.communities.community-emoji-thumbnail-picker :as - community-emoji-thumbnail-picker] - [status-im.ui.screens.communities.create :as communities.create] - [status-im.ui.screens.communities.create-category :as create-category] - [status-im.ui.screens.communities.create-channel :as create-channel] - [status-im.ui.screens.communities.edit :as community.edit] - [status-im.ui.screens.communities.edit-channel :as edit-channel] - [status-im.ui.screens.communities.import :as communities.import] - [status-im.ui.screens.communities.invite :as communities.invite] - [status-im.ui.screens.communities.members :as members] - [status-im.ui.screens.communities.membership :as membership] - [status-im.ui.screens.communities.profile :as community.profile] - [status-im.ui.screens.communities.reorder-categories :as reorder-categories] - [status-im.ui.screens.communities.requests-to-join :as requests-to-join] - [status-im.ui.screens.communities.select-category :as select-category] - [status-im.ui.screens.communities.views :as communities] - [status-im.ui.screens.contacts-list.views :as contacts-list] - [status-im.ui.screens.currency-settings.views :as currency-settings] - [status-im.ui.screens.dapps-permissions.views :as dapps-permissions] - [status-im.ui.screens.default-sync-period-settings.view :as default-sync-period-settings] - [status-im.ui.screens.ens.views :as ens] - [status-im.ui.screens.fleet-settings.views :as fleet-settings] - [status-im.ui.screens.glossary.view :as glossary] - [status-im.ui.screens.group.views :as group-chat] - [status-im.ui.screens.help-center.views :as help-center] - [status-im.ui.screens.keycard.authentication-method.views :as keycard.authentication] - [status-im.ui.screens.keycard.onboarding.views :as keycard.onboarding] - [status-im.ui.screens.keycard.pairing.views :as keycard.pairing] - [status-im.ui.screens.keycard.pin.views :as keycard.pin] - [status-im.ui.screens.keycard.recovery.views :as keycard.recovery] - [status-im.ui.screens.keycard.settings.views :as keycard.settings] - [status-im.ui.screens.keycard.views :as keycard] - [status-im.ui.screens.link-previews-settings.views :as link-previews-settings] - [status-im.ui.screens.log-level-settings.views :as log-level-settings] - [status-im.ui.screens.mobile-network-settings.view :as mobile-network-settings] - [status-im.ui.screens.multiaccounts.key-storage.views :as key-storage.views] - [status-im.ui.screens.multiaccounts.login.views :as login] - [status-im.ui.screens.multiaccounts.views :as multiaccounts] - [status-im.ui.screens.network-info.views :as network-info] - [status-im.ui.screens.network.edit-network.views :as edit-network] - [status-im.ui.screens.network.network-details.views :as network-details] - [status-im.ui.screens.network.views :as network] - [status-im.ui.screens.notifications-settings.views :as notifications-settings] - [status-im.ui.screens.offline-messaging-settings.edit-mailserver.views :as edit-mailserver] - [status-im.ui.screens.offline-messaging-settings.views :as offline-messaging-settings] - [status-im.ui.screens.onboarding.intro.views :as onboarding.intro] - [status-im.ui.screens.onboarding.keys.views :as onboarding.keys] - [status-im.ui.screens.onboarding.notifications.views :as onboarding.notifications] - [status-im.ui.screens.onboarding.password.views :as onboarding.password] - [status-im.ui.screens.onboarding.phrase.view :as onboarding.phrase] - [status-im.ui.screens.onboarding.storage.views :as onboarding.storage] - [status-im.ui.screens.onboarding.welcome.views :as onboarding.welcome] - [status-im.ui.screens.pairing.views :as pairing] - [status-im.ui.screens.peers-stats :as peers-stats] - [status-im.ui.screens.privacy-and-security-settings.delete-profile :as delete-profile] - [status-im.ui.screens.privacy-and-security-settings.messages-from-contacts-only :as - messages-from-contacts-only] - [status-im.ui.screens.privacy-and-security-settings.views :as privacy-and-security] - [status-im.ui.screens.profile.contact.views :as contact] - [status-im.ui.screens.profile.group-chat.views :as profile.group-chat] - [status-im.ui.screens.profile.seed.views :as profile.seed] - [status-im.ui.screens.profile.user.views :as profile.user] - [status-im.ui.screens.progress.views :as progress] - [status-im.ui.screens.qr-scanner.views :as qr-scanner] - [status-im.ui.screens.reset-password.views :as reset-password] - [status-im.ui.screens.rpc-usage-info :as rpc-usage-info] - [status-im.ui.screens.stickers.views :as stickers] - [status-im.ui.screens.sync-settings.views :as sync-settings] - [status-im.ui.screens.terms-of-service.views :as terms-of-service] - [status-im.ui.screens.wakuv2-settings.edit-node.views :as edit-wakuv2-node] - [status-im.ui.screens.wakuv2-settings.views :as wakuv2-settings] - [status-im.ui.screens.wallet.account-settings.views :as account-settings] - [status-im.ui.screens.wallet.account.views :as wallet.account] - [status-im.ui.screens.wallet.accounts-manage.views :as accounts-manage] - [status-im.ui.screens.wallet.accounts.views :as wallet.accounts] - [status-im.ui.screens.wallet.add-new.views :as add-account] - [status-im.ui.screens.wallet.buy-crypto.views :as wallet.buy-crypto] - [status-im.ui.screens.wallet.collectibles.views :as wallet.collectibles] - [status-im.ui.screens.wallet.custom-tokens.views :as custom-tokens] - [status-im.ui.screens.wallet.manage-connections.views :as manage-all-connections] - [status-im.ui.screens.wallet.recipient.views :as recipient] - [status-im.ui.screens.wallet.send.views :as wallet.send] - [status-im.ui.screens.wallet.settings.views :as wallet-settings] - [status-im.ui.screens.wallet.swap.views :as wallet.swap] - [status-im.ui.screens.wallet.transactions.views :as wallet-transactions] - [status-im2.contexts.chat.group-details.view :as group-details] - [status-im.ui2.screens.chat.components.new-chat.view :as new-chat-aio])) + [quo.design-system.colors :as colors] + [utils.i18n :as i18n] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.screens.about-app.views :as about-app] + [status-im.ui.screens.add-new.new-chat.views :as new-chat] + [status-im.ui.screens.add-new.new-public-chat.view :as new-public-chat] + [status-im.ui.screens.advanced-settings.views :as advanced-settings] + [status-im.ui.screens.appearance.views :as appearance] + [status-im.ui.screens.backup-settings.view :as backup-settings] + [status-im.ui.screens.bootnodes-settings.edit-bootnode.views :as edit-bootnode] + [status-im.ui.screens.bootnodes-settings.views :as bootnodes-settings] + [status-im.ui.screens.browser.bookmarks.views :as bookmarks] + [status-im.ui.screens.browser.empty-tab.views :as empty-tab] + [status-im.ui.screens.browser.tabs.views :as browser.tabs] + [status-im.ui.screens.browser.views :as browser] + [status-im.ui.screens.bug-report :as bug-report] + [status-im.ui.screens.communities.channel-details :as communities.channel-details] + [status-im.ui.screens.communities.community :as community] + [status-im.ui.screens.communities.community-emoji-thumbnail-picker :as + community-emoji-thumbnail-picker] + [status-im.ui.screens.communities.create :as communities.create] + [status-im.ui.screens.communities.create-category :as create-category] + [status-im.ui.screens.communities.create-channel :as create-channel] + [status-im.ui.screens.communities.edit :as community.edit] + [status-im.ui.screens.communities.edit-channel :as edit-channel] + [status-im.ui.screens.communities.import :as communities.import] + [status-im.ui.screens.communities.invite :as communities.invite] + [status-im.ui.screens.communities.members :as members] + [status-im.ui.screens.communities.membership :as membership] + [status-im.ui.screens.communities.profile :as community.profile] + [status-im.ui.screens.communities.reorder-categories :as reorder-categories] + [status-im.ui.screens.communities.requests-to-join :as requests-to-join] + [status-im.ui.screens.communities.select-category :as select-category] + [status-im.ui.screens.communities.views :as communities] + [status-im.ui.screens.contacts-list.views :as contacts-list] + [status-im.ui.screens.currency-settings.views :as currency-settings] + [status-im.ui.screens.dapps-permissions.views :as dapps-permissions] + [status-im.ui.screens.default-sync-period-settings.view :as default-sync-period-settings] + [status-im.ui.screens.ens.views :as ens] + [status-im.ui.screens.fleet-settings.views :as fleet-settings] + [status-im.ui.screens.glossary.view :as glossary] + [status-im.ui.screens.group.views :as group-chat] + [status-im.ui.screens.help-center.views :as help-center] + [status-im.ui.screens.keycard.authentication-method.views :as keycard.authentication] + [status-im.ui.screens.keycard.onboarding.views :as keycard.onboarding] + [status-im.ui.screens.keycard.pairing.views :as keycard.pairing] + [status-im.ui.screens.keycard.pin.views :as keycard.pin] + [status-im.ui.screens.keycard.recovery.views :as keycard.recovery] + [status-im.ui.screens.keycard.settings.views :as keycard.settings] + [status-im.ui.screens.keycard.views :as keycard] + [status-im.ui.screens.link-previews-settings.views :as link-previews-settings] + [status-im.ui.screens.log-level-settings.views :as log-level-settings] + [status-im.ui.screens.mobile-network-settings.view :as mobile-network-settings] + [status-im.ui.screens.multiaccounts.key-storage.views :as key-storage.views] + [status-im.ui.screens.multiaccounts.login.views :as login] + [status-im.ui.screens.multiaccounts.views :as multiaccounts] + [status-im.ui.screens.network-info.views :as network-info] + [status-im.ui.screens.network.edit-network.views :as edit-network] + [status-im.ui.screens.network.network-details.views :as network-details] + [status-im.ui.screens.network.views :as network] + [status-im.ui.screens.notifications-settings.views :as notifications-settings] + [status-im.ui.screens.offline-messaging-settings.edit-mailserver.views :as edit-mailserver] + [status-im.ui.screens.offline-messaging-settings.views :as offline-messaging-settings] + [status-im.ui.screens.onboarding.intro.views :as onboarding.intro] + [status-im.ui.screens.onboarding.keys.views :as onboarding.keys] + [status-im.ui.screens.onboarding.notifications.views :as onboarding.notifications] + [status-im.ui.screens.onboarding.password.views :as onboarding.password] + [status-im.ui.screens.onboarding.phrase.view :as onboarding.phrase] + [status-im.ui.screens.onboarding.storage.views :as onboarding.storage] + [status-im.ui.screens.onboarding.welcome.views :as onboarding.welcome] + [status-im.ui.screens.pairing.views :as pairing] + [status-im.ui.screens.peers-stats :as peers-stats] + [status-im.ui.screens.privacy-and-security-settings.delete-profile :as delete-profile] + [status-im.ui.screens.privacy-and-security-settings.messages-from-contacts-only :as + messages-from-contacts-only] + [status-im.ui.screens.privacy-and-security-settings.views :as privacy-and-security] + [status-im.ui.screens.profile.contact.views :as contact] + [status-im.ui.screens.profile.group-chat.views :as profile.group-chat] + [status-im.ui.screens.profile.seed.views :as profile.seed] + [status-im.ui.screens.profile.user.views :as profile.user] + [status-im.ui.screens.progress.views :as progress] + [status-im.ui.screens.qr-scanner.views :as qr-scanner] + [status-im.ui.screens.reset-password.views :as reset-password] + [status-im.ui.screens.rpc-usage-info :as rpc-usage-info] + [status-im.ui.screens.stickers.views :as stickers] + [status-im.ui.screens.sync-settings.views :as sync-settings] + [status-im.ui.screens.terms-of-service.views :as terms-of-service] + [status-im.ui.screens.wakuv2-settings.edit-node.views :as edit-wakuv2-node] + [status-im.ui.screens.wakuv2-settings.views :as wakuv2-settings] + [status-im.ui.screens.wallet.account-settings.views :as account-settings] + [status-im.ui.screens.wallet.account.views :as wallet.account] + [status-im.ui.screens.wallet.accounts-manage.views :as accounts-manage] + [status-im.ui.screens.wallet.accounts.views :as wallet.accounts] + [status-im.ui.screens.wallet.add-new.views :as add-account] + [status-im.ui.screens.wallet.buy-crypto.views :as wallet.buy-crypto] + [status-im.ui.screens.wallet.collectibles.views :as wallet.collectibles] + [status-im.ui.screens.wallet.custom-tokens.views :as custom-tokens] + [status-im.ui.screens.wallet.manage-connections.views :as manage-all-connections] + [status-im.ui.screens.wallet.recipient.views :as recipient] + [status-im.ui.screens.wallet.send.views :as wallet.send] + [status-im.ui.screens.wallet.settings.views :as wallet-settings] + [status-im.ui.screens.wallet.swap.views :as wallet.swap] + [status-im.ui.screens.wallet.transactions.views :as wallet-transactions] + [status-im2.contexts.chat.group-details.view :as group-details] + [status-im.ui2.screens.chat.components.new-chat.view :as new-chat-aio])) (defn right-button-options [id icon] diff --git a/src/status_im/ui/screens/signing/views.cljs b/src/status_im/ui/screens/signing/views.cljs index b2610a7721..d0151e5e94 100644 --- a/src/status_im/ui/screens/signing/views.cljs +++ b/src/status_im/ui/screens/signing/views.cljs @@ -1,32 +1,32 @@ (ns status-im.ui.screens.signing.views (:require-macros [status-im.utils.views :as views]) (:require - [clojure.string :as string] - [quo.core :as quo] - [quo.design-system.colors :as colors] - [re-frame.core :as re-frame] - [reagent.core :as reagent] - [status-im.ethereum.tokens :as tokens] - [utils.i18n :as i18n] - [status-im.keycard.common :as keycard.common] - [status-im.multiaccounts.core :as multiaccounts] - [status-im.react-native.resources :as resources] - [status-im.signing.eip1559 :as eip1559] - [status-im.ui.components.bottom-panel.views :as bottom-panel] - [status-im.ui.components.chat-icon.screen :as chat-icon] - [status-im.ui.components.copyable-text :as copyable-text] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.components.react :as react] - [status-im.ui.screens.keycard.keycard-interaction :as keycard-sheet] - [status-im.ui.screens.keycard.pin.views :as pin.views] - [status-im.ui.screens.signing.sheets :as sheets] - [status-im.ui.screens.signing.styles :as styles] - [status-im.ui.screens.wallet.components.views :as wallet.components] - [status-im.utils.platform :as platform] - [status-im.utils.types :as types] - [status-im.utils.utils :as utils] - [status-im.wallet.utils :as wallet.utils] - [utils.security.core :as security])) + [clojure.string :as string] + [quo.core :as quo] + [quo.design-system.colors :as colors] + [re-frame.core :as re-frame] + [reagent.core :as reagent] + [status-im.ethereum.tokens :as tokens] + [utils.i18n :as i18n] + [status-im.keycard.common :as keycard.common] + [status-im.multiaccounts.core :as multiaccounts] + [status-im.react-native.resources :as resources] + [status-im.signing.eip1559 :as eip1559] + [status-im.ui.components.bottom-panel.views :as bottom-panel] + [status-im.ui.components.chat-icon.screen :as chat-icon] + [status-im.ui.components.copyable-text :as copyable-text] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.react :as react] + [status-im.ui.screens.keycard.keycard-interaction :as keycard-sheet] + [status-im.ui.screens.keycard.pin.views :as pin.views] + [status-im.ui.screens.signing.sheets :as sheets] + [status-im.ui.screens.signing.styles :as styles] + [status-im.ui.screens.wallet.components.views :as wallet.components] + [status-im.utils.platform :as platform] + [status-im.utils.types :as types] + [status-im.utils.utils :as utils] + [status-im.wallet.utils :as wallet.utils] + [utils.security.core :as security])) (defn separator [] @@ -244,10 +244,10 @@ (let [message (:message formatted-data)] [react/view (assoc (styles/message) :padding-vertical 16) [keycard-sheet/connect-keycard - {:on-connect ::keycard.common/on-card-connected + {:on-connect ::keycard.common/on-card-connected :on-disconnect ::keycard.common/on-card-disconnected - :connected? connected? - :on-cancel #(re-frame/dispatch [:signing.ui/cancel-is-pressed]) + :connected? connected? + :on-cancel #(re-frame/dispatch [:signing.ui/cancel-is-pressed]) :params (cond (:receiver message) {:title (i18n/label :t/confirmation-request) diff --git a/src/status_im/ui/screens/stickers/views.cljs b/src/status_im/ui/screens/stickers/views.cljs index cd9ec13e0e..5ac9986ac5 100644 --- a/src/status_im/ui/screens/stickers/views.cljs +++ b/src/status_im/ui/screens/stickers/views.cljs @@ -33,11 +33,11 @@ [react/view styles/installed-icon [icons/icon :main-icons/check {:color colors/white-persist :height 20 :width 20}]] [react/touchable-highlight - {:on-press #(cond pending nil + {:on-press #(cond pending nil (or owned free) (re-frame/dispatch [:stickers/install-pack id]) not-enough-snt? nil - :else (re-frame/dispatch [:stickers/buy-pack id]))} + :else (re-frame/dispatch [:stickers/buy-pack id]))} [react/view (styles/price-badge (and (not (or owned free)) not-enough-snt?)) (when (and (not free) (not owned)) [icons/tiny-icon :tiny-icons/tiny-snt diff --git a/src/status_im/ui/screens/terms_of_service/views.cljs b/src/status_im/ui/screens/terms_of_service/views.cljs index aa52de3ab5..da2ec59488 100644 --- a/src/status_im/ui/screens/terms_of_service/views.cljs +++ b/src/status_im/ui/screens/terms_of_service/views.cljs @@ -98,7 +98,7 @@ [quo/separator {:style {:margin-vertical (:base spacing/spacing)}}] [toolbar/toolbar - {:size :large + {:size :large :center [react/view {:padding-horizontal 8} [quo/button diff --git a/src/status_im/ui/screens/wakuv2_settings/views.cljs b/src/status_im/ui/screens/wakuv2_settings/views.cljs index 2990831216..38c1949651 100644 --- a/src/status_im/ui/screens/wakuv2_settings/views.cljs +++ b/src/status_im/ui/screens/wakuv2_settings/views.cljs @@ -28,8 +28,8 @@ (views/letsubs [nodes [:wakuv2-nodes/list]] [:<> [topbar/topbar - {:title (i18n/label :t/wakuv2-settings) - :navigation :none + {:title (i18n/label :t/wakuv2-settings) + :navigation :none :right-accessories [{:icon :main-icons/add :accessibility-label :add-wakuv2-node diff --git a/src/status_im/ui/screens/wallet/account/views.cljs b/src/status_im/ui/screens/wallet/account/views.cljs index 09ccd0872b..806ddee987 100644 --- a/src/status_im/ui/screens/wallet/account/views.cljs +++ b/src/status_im/ui/screens/wallet/account/views.cljs @@ -1,29 +1,29 @@ (ns status-im.ui.screens.wallet.account.views (:require - [quo.core :as quo] - [quo.design-system.colors :as colors] - [quo.design-system.spacing :as spacing] - [quo2.components.buttons.button :as quo2.button] - [quo2.components.markdown.text :as quo2.text] - [quo2.components.tabs.tabs :as quo2.tabs] - [quo2.foundations.colors :as quo2.colors] - [re-frame.core :as re-frame] - [reagent.core :as reagent] - [status-im.ethereum.core :as ethereum] - [utils.i18n :as i18n] - [status-im.ui.components.animation :as animation] - [status-im.ui.components.icons.icons :as icons] - [status-im.ui.components.react :as react] - [status-im.ui.components.tabs :as tabs] - [status-im.ui.components.topbar :as topbar] - [status-im.ui.screens.wallet.account.styles :as styles] - [status-im.ui.screens.wallet.accounts.common :as common] - [status-im.ui.screens.wallet.accounts.sheets :as sheets] - [status-im.ui.screens.wallet.buy-crypto.views :as buy-crypto] - [status-im.ui.screens.wallet.collectibles.views :as collectibles.views] - [status-im.ui.screens.wallet.transactions.views :as history] - [status-im2.config :as config] - [utils.re-frame :as rf]) + [quo.core :as quo] + [quo.design-system.colors :as colors] + [quo.design-system.spacing :as spacing] + [quo2.components.buttons.button :as quo2.button] + [quo2.components.markdown.text :as quo2.text] + [quo2.components.tabs.tabs :as quo2.tabs] + [quo2.foundations.colors :as quo2.colors] + [re-frame.core :as re-frame] + [reagent.core :as reagent] + [status-im.ethereum.core :as ethereum] + [utils.i18n :as i18n] + [status-im.ui.components.animation :as animation] + [status-im.ui.components.icons.icons :as icons] + [status-im.ui.components.react :as react] + [status-im.ui.components.tabs :as tabs] + [status-im.ui.components.topbar :as topbar] + [status-im.ui.screens.wallet.account.styles :as styles] + [status-im.ui.screens.wallet.accounts.common :as common] + [status-im.ui.screens.wallet.accounts.sheets :as sheets] + [status-im.ui.screens.wallet.buy-crypto.views :as buy-crypto] + [status-im.ui.screens.wallet.collectibles.views :as collectibles.views] + [status-im.ui.screens.wallet.transactions.views :as history] + [status-im2.config :as config] + [utils.re-frame :as rf]) (:require-macros [status-im.utils.views :as views])) (def state (reagent/atom {:tab :assets})) @@ -313,7 +313,7 @@ (anim-listener anim-y scroll-y) [:<> [topbar/topbar - {:title name + {:title name :right-accessories [{:icon :main-icons/more :on-press #(re-frame/dispatch [:bottom-sheet/show-sheet diff --git a/src/status_im/ui/screens/wallet/account_settings/views.cljs b/src/status_im/ui/screens/wallet/account_settings/views.cljs index 45305e387b..768f00e884 100644 --- a/src/status_im/ui/screens/wallet/account_settings/views.cljs +++ b/src/status_im/ui/screens/wallet/account_settings/views.cljs @@ -104,7 +104,7 @@ (cond-> {:title (i18n/label :t/account-settings)} (and @new-account (not= "" (:name @new-account))) (assoc :right-accessories - [{:label (i18n/label :t/apply) + [{:label (i18n/label :t/apply) :on-press #(do (re-frame/dispatch [:wallet.accounts/save-account diff --git a/src/status_im/ui/screens/wallet/add_new/views.cljs b/src/status_im/ui/screens/wallet/add_new/views.cljs index 0e3ea3b966..5c0310bc1d 100644 --- a/src/status_im/ui/screens/wallet/add_new/views.cljs +++ b/src/status_im/ui/screens/wallet/add_new/views.cljs @@ -93,16 +93,16 @@ (when (= type :seed) [react/view {:padding-top 16} [quo/text-input - {:label (i18n/label :t/recovery-phrase) - :auto-focus false - :placeholder (i18n/label :t/multiaccounts-recover-enter-phrase-title) - :auto-correct false - :keyboard-type :visible-password - :multiline true - :height 95 - :error account-error + {:label (i18n/label :t/recovery-phrase) + :auto-focus false + :placeholder (i18n/label :t/multiaccounts-recover-enter-phrase-title) + :auto-correct false + :keyboard-type :visible-password + :multiline true + :height 95 + :error account-error :accessibility-label :add-account-enter-seed - :monospace true + :monospace true :on-change-text #(do (re-frame/dispatch [:set-in [:add-account :account-error] nil]) @@ -111,15 +111,15 @@ (when (= type :key) [react/view {:margin-top 30} [quo/text-input - {:label (i18n/label :t/private-key) - :auto-focus false - :placeholder (i18n/label :t/enter-a-private-key) - :auto-correct false - :keyboard-type :visible-password - :error account-error - :secure-text-entry true + {:label (i18n/label :t/private-key) + :auto-focus false + :placeholder (i18n/label :t/enter-a-private-key) + :auto-correct false + :keyboard-type :visible-password + :error account-error + :secure-text-entry true :accessibility-label :add-account-enter-private-key - :text-content-type :none + :text-content-type :none :on-change-text #(do (re-frame/dispatch [:set-in [:add-account :account-error] nil]) @@ -135,7 +135,7 @@ {:style {:flex 1} :ignore-offset true} [topbar/topbar - {:navigation :none + {:navigation :none :right-accessories [{:label (i18n/label :t/cancel) :on-press #(re-frame/dispatch [:keycard/new-account-pin-sheet-hide])}]}] @@ -169,8 +169,8 @@ {:show-border? true :right [quo/button - {:type :secondary - :after :main-icon/next + {:type :secondary + :after :main-icon/next :accessibility-label :add-account-add-account-button :on-press (if (and keycard? diff --git a/src/status_im/ui/screens/wallet/collectibles/views.cljs b/src/status_im/ui/screens/wallet/collectibles/views.cljs index 3839996aeb..9fa7000bf6 100644 --- a/src/status_im/ui/screens/wallet/collectibles/views.cljs +++ b/src/status_im/ui/screens/wallet/collectibles/views.cljs @@ -78,15 +78,15 @@ (defn nft-traits-scroller [traits] [react/scroll-view - {:horizontal true - :deceleration-rate "fast" - :snap-to-alignment "left" + {:horizontal true + :deceleration-rate "fast" + :snap-to-alignment "left" :shows-horizontal-scroll-indicator false - :scroll-event-throttle 64 - :style {:padding-left 16 - :margin-vertical 16 - :padding-bottom 8}} + :scroll-event-throttle 64 + :style {:padding-left 16 + :margin-vertical 16 + :padding-bottom 8}} (for [trait traits] ^{:key (:trait_type trait)} [nft-trait-card trait]) @@ -118,7 +118,7 @@ {:width width :border-radius 16 :margin-bottom 16} - :on-press (when clickable? #(re-frame/dispatch [::wallet/show-nft-details asset])) + :on-press (when clickable? #(re-frame/dispatch [::wallet/show-nft-details asset])) :accessibility-label :nft-asset} (cond @@ -146,7 +146,7 @@ :height "100%"}]] ;; ¯\_(ツ)_/¯ - :else [missing-image-placeholder])]) + :else [missing-image-placeholder])]) (defn nft-assets [{:keys [num-assets address collectible-slug]}] @@ -186,34 +186,34 @@ {:title [react/view {:flex 1} [quo/list-item - {:title (:name collectible) - :text-size :large + {:title (:name collectible) + :text-size :large :accessibility-label (keyword (str "collection-" index)) - :icon (if (seq (:image_url collectible)) - [wallet.components/token-icon - {:style {:border-radius 40 - :overflow :hidden - :border-width 1 - :border-color colors/gray-lighter} - :source {:uri (:image_url collectible)}}] - :main-icons/photo) - :accessory :text - :accessory-text (:owned_asset_count collectible)}]] - :padding-vertical 0 + :icon (if (seq (:image_url collectible)) + [wallet.components/token-icon + {:style {:border-radius 40 + :overflow :hidden + :border-width 1 + :border-color colors/gray-lighter} + :source {:uri (:image_url collectible)}}] + :main-icons/photo) + :accessory :text + :accessory-text (:owned_asset_count collectible)}]] + :padding-vertical 0 :dropdown-margin-left -12 :open-container-style {:border-top-width 8 :border-bottom-width 8 :border-color colors/gray-lighter} - :on-open #(re-frame/dispatch - [::wallet/fetch-collectible-assets-by-owner-and-collection - address - (:slug collectible) - (:owned_asset_count collectible)]) - :content [nft-assets - {:address address - :num-assets (:owned_asset_count collectible) - :collectible-slug (:slug collectible)}]}])])) + :on-open #(re-frame/dispatch + [::wallet/fetch-collectible-assets-by-owner-and-collection + address + (:slug collectible) + (:owned_asset_count collectible)]) + :content [nft-assets + {:address address + :num-assets (:owned_asset_count collectible) + :collectible-slug (:slug collectible)}]}])])) (defn enable-opensea-view [] @@ -238,8 +238,8 @@ :on-press #(re-frame/dispatch [::multiaccounts.update/toggle-opensea-nfts-visiblity true]) - :theme :main - :type :primary} + :theme :main + :type :primary} (i18n/label :display-collectibles)]] [quo/text {:size :small @@ -309,10 +309,10 @@ ;; the last string is an emoji. It might not show up in all editors but its there {:toast-label (str (i18n/label :profile-picture-updated)) " " "😎"} [quo/list-item - {:title (i18n/label :t/use-as-profile-picture) - :theme :accent - :on-press #(re-frame/dispatch - [::multiaccounts/save-profile-picture-from-url (:image_url nft)]) - :icon :main-icons/profile + {:title (i18n/label :t/use-as-profile-picture) + :theme :accent + :on-press #(re-frame/dispatch + [::multiaccounts/save-profile-picture-from-url (:image_url nft)]) + :icon :main-icons/profile :accessibility-label :set-nft-as-pfp}]])])) diff --git a/src/status_im/ui/screens/wallet/recipient/views.cljs b/src/status_im/ui/screens/wallet/recipient/views.cljs index 30305af1c0..a6cc2c71e4 100644 --- a/src/status_im/ui/screens/wallet/recipient/views.cljs +++ b/src/status_im/ui/screens/wallet/recipient/views.cljs @@ -23,14 +23,14 @@ (defn- recipient-topbar [] [topbar/topbar - {:navigation {:on-press - #(do - (re-frame/dispatch [:wallet/recipient-modal-closed]) - (re-frame/dispatch [:search/recipient-filter-changed nil]) - (re-frame/dispatch [:navigate-back]))} - :modal? true - :border-bottom false - :title (i18n/label :t/recipient) + {:navigation {:on-press + #(do + (re-frame/dispatch [:wallet/recipient-modal-closed]) + (re-frame/dispatch [:search/recipient-filter-changed nil]) + (re-frame/dispatch [:navigate-back]))} + :modal? true + :border-bottom false + :title (i18n/label :t/recipient) :right-accessories [{:icon :qr :accessibility-label :scan-contact-code-button @@ -61,8 +61,8 @@ (fn [title cnt content] [react/view {:padding-vertical 8} [quo/list-item - {:title title - :on-press #(swap! opened? not) + {:title title + :on-press #(swap! opened? not) :accessory [react/view {:flex-direction :row :align-items :center} (when (pos? cnt) diff --git a/src/status_im/ui/screens/wallet/settings/views.cljs b/src/status_im/ui/screens/wallet/settings/views.cljs index 03468cb8fa..870ea9f87d 100644 --- a/src/status_im/ui/screens/wallet/settings/views.cljs +++ b/src/status_im/ui/screens/wallet/settings/views.cljs @@ -17,7 +17,7 @@ (defn toolbar [] [topbar/topbar - {:title (i18n/label :t/wallet-assets) + {:title (i18n/label :t/wallet-assets) :navigation {:on-press #(re-frame/dispatch [:wallet.settings.ui/navigate-back-pressed])}}]) @@ -99,20 +99,20 @@ {:header [react/view {:margin-top 16} [quo/list-item - {:theme :accent - :title (i18n/label :t/add-custom-token) - :icon :main-icons/add + {:theme :accent + :title (i18n/label :t/add-custom-token) + :icon :main-icons/add :on-press #(re-frame/dispatch [:navigate-to :wallet-add-custom-token])}]] - :sections (concat - (when (seq custom-tokens) - [{:title (i18n/label :t/custom) - :data custom-tokens}]) - [{:title (i18n/label :t/default-assets) - :data default-tokens}]) - :key-fn :address + :sections (concat + (when (seq custom-tokens) + [{:title (i18n/label :t/custom) + :data custom-tokens}]) + [{:title (i18n/label :t/default-assets) + :data default-tokens}]) + :key-fn :address :stickySectionHeadersEnabled false :render-section-header-fn (fn [{:keys [title]}] [quo/list-header title]) - :render-fn render-token-wrapper}]]])) + :render-fn render-token-wrapper}]]])) diff --git a/src/status_im/ui/screens/wallet/swap/views.cljs b/src/status_im/ui/screens/wallet/swap/views.cljs index 7b9b717967..ad855523b5 100644 --- a/src/status_im/ui/screens/wallet/swap/views.cljs +++ b/src/status_im/ui/screens/wallet/swap/views.cljs @@ -21,28 +21,28 @@ (defn render-asset [{{:keys [icon decimals amount color value] - :as token} + :as token} :token currency :currency on-press :on-press}] [quo/list-item - {:title [quo/text {:weight :medium} - [quo/text {:weight :inherit} - (str (if amount - (wallet.utils/format-amount amount decimals) - "...") - " ")] - [quo/text - {:color :secondary - :weight :inherit} - (wallet.utils/display-symbol token)]] - :on-press on-press - :subtitle (str (if value value "...") " " currency) + {:title [quo/text {:weight :medium} + [quo/text {:weight :inherit} + (str (if amount + (wallet.utils/format-amount amount decimals) + "...") + " ")] + [quo/text + {:color :secondary + :weight :inherit} + (wallet.utils/display-symbol token)]] + :on-press on-press + :subtitle (str (if value value "...") " " currency) :accessibility-label (str (:symbol token) "-asset-value") - :icon (if icon - [wallet.components/token-icon icon] - [chat-icon/custom-icon-view-list (:name token) color])}]) + :icon (if icon + [wallet.components/token-icon icon] + [chat-icon/custom-icon-view-list (:name token) color])}]) (defn asset-selector [] @@ -92,14 +92,14 @@ [react/touchable-highlight {:on-press #(re-frame/dispatch [::wallet.swap/open-asset-selector-modal source?])} [react/view - {:style {:flex-direction :row - :align-items :center - :border-width 1 - :border-color colors/gray-lighter - :border-radius 8 - :margin-left 16 - :padding-horizontal 8 - :padding-vertical 2} + {:style {:flex-direction :row + :align-items :center + :border-width 1 + :border-color colors/gray-lighter + :border-radius 8 + :margin-left 16 + :padding-horizontal 8 + :padding-vertical 2} :accessibility-label :choose-asset-button} [quo/text {:style {:margin-right 8}} @@ -177,18 +177,18 @@ :margin-top 12 :border-color colors/gray-lighter}} [quo/list-item - {:title title - :subtitle body + {:title title + :subtitle body :active-background-enabled false - :on-press on-press - :theme :main - :chevron true - :icon [react/view - {:style {:background-color colors/blue-light - :padding 8 - :border-radius 4}} - (icons/icon icon {:color :dark})]}]]) + :on-press on-press + :theme :main + :chevron true + :icon [react/view + {:style {:background-color colors/blue-light + :padding 8 + :border-radius 4}} + (icons/icon icon {:color :dark})]}]]) (defn card-body-row [key value primary?] @@ -430,13 +430,13 @@ [] (let [{:keys [name]} (rf/sub [:multiaccount/current-account]) - all-tokens (rf/sub [:wallet/all-tokens]) - from-symbol (rf/sub [:wallet/swap-from-token]) - to-symbol (rf/sub [:wallet/swap-to-token]) + all-tokens (rf/sub [:wallet/all-tokens]) + from-symbol (rf/sub [:wallet/swap-from-token]) + to-symbol (rf/sub [:wallet/swap-to-token]) advanced-mode? (rf/sub [:wallet/swap-advanced-mode?]) - amount "0.02" - from-token (tokens/symbol->token all-tokens (or from-symbol :DGX)) - to-token (tokens/symbol->token all-tokens (or to-symbol :SNT))] + amount "0.02" + from-token (tokens/symbol->token all-tokens (or from-symbol :DGX)) + to-token (tokens/symbol->token all-tokens (or to-symbol :SNT))] [kb-presentation/keyboard-avoiding-view {:style (merge diff --git a/src/status_im/ui/screens/wallet/transactions/views.cljs b/src/status_im/ui/screens/wallet/transactions/views.cljs index 55d7842fd7..a73a2d85c1 100644 --- a/src/status_im/ui/screens/wallet/transactions/views.cljs +++ b/src/status_im/ui/screens/wallet/transactions/views.cljs @@ -147,10 +147,10 @@ {:size :large :animating true}]]) [list/section-list - {:sections transaction-history-sections - :key-fn :hash - :render-data {:keycard-account? keycard-account?} - :render-fn render-transaction + {:sections transaction-history-sections + :key-fn :hash + :render-data {:keycard-account? keycard-account?} + :render-fn render-transaction :empty-component [react/i18n-text {:style styles/empty-text diff --git a/src/status_im/ui2/screens/chat/composer/input.cljs b/src/status_im/ui2/screens/chat/composer/input.cljs index 17df38b6d4..7f216e9f3b 100644 --- a/src/status_im/ui2/screens/chat/composer/input.cljs +++ b/src/status_im/ui2/screens/chat/composer/input.cljs @@ -177,49 +177,49 @@ (defn text-input [{:keys [refs chat-id sending-image on-content-size-change]}] - (let [cooldown-enabled? (rf/sub [:chats/current-chat-cooldown-enabled?]) - mentionable-users (rf/sub [:chats/mentionable-users]) - timeout-id (reagent/atom nil) - last-text-change (reagent/atom nil) - mentions-enabled? (get @mentions-enabled? chat-id) + (let [cooldown-enabled? (rf/sub [:chats/current-chat-cooldown-enabled?]) + mentionable-users (rf/sub [:chats/mentionable-users]) + timeout-id (reagent/atom nil) + last-text-change (reagent/atom nil) + mentions-enabled? (get @mentions-enabled? chat-id) props - {:style (text-input-style) - :ref (:text-input-ref refs) + {:style (text-input-style) + :ref (:text-input-ref refs) :max-font-size-multiplier 1 - :accessibility-label :chat-message-input - :text-align-vertical :center - :multiline true - :editable (not cooldown-enabled?) - :blur-on-submit false - :auto-focus false - :max-length chat.constants/max-text-size - :placeholder-text-color (colors/theme-colors colors/neutral-40 colors/white-opa-30) - :placeholder (if cooldown-enabled? - (i18n/label :cooldown/text-input-disabled) - (i18n/label :t/type-a-message)) - :default-value (get @input-texts chat-id) - :underline-color-android :transparent - :auto-capitalize :sentences - :auto-correct false - :spell-check false - :on-content-size-change on-content-size-change - :on-selection-change (partial on-selection-change - timeout-id - last-text-change - mentionable-users) + :accessibility-label :chat-message-input + :text-align-vertical :center + :multiline true + :editable (not cooldown-enabled?) + :blur-on-submit false + :auto-focus false + :max-length chat.constants/max-text-size + :placeholder-text-color (colors/theme-colors colors/neutral-40 colors/white-opa-30) + :placeholder (if cooldown-enabled? + (i18n/label :cooldown/text-input-disabled) + (i18n/label :t/type-a-message)) + :default-value (get @input-texts chat-id) + :underline-color-android :transparent + :auto-capitalize :sentences + :auto-correct false + :spell-check false + :on-content-size-change on-content-size-change + :on-selection-change (partial on-selection-change + timeout-id + last-text-change + mentionable-users) :on-change (partial on-change last-text-change timeout-id mentionable-users refs chat-id sending-image) - :on-text-input (partial on-text-input mentionable-users chat-id)} + :on-text-input (partial on-text-input mentionable-users chat-id)} input-with-mentions (rf/sub [:chat/input-with-mentions]) - children (fn [] - (if mentions-enabled? - (map-indexed - (fn [index [_ text]] - ^{:key (str index "_" type "_" text)} - [rn/text (when (= type :mention) {:style {:color colors/primary-50}}) - text]) - input-with-mentions) - (get @input-texts chat-id)))] + children (fn [] + (if mentions-enabled? + (map-indexed + (fn [index [_ text]] + ^{:key (str index "_" type "_" text)} + [rn/text (when (= type :mention) {:style {:color colors/primary-50}}) + text]) + input-with-mentions) + (get @input-texts chat-id)))] (reset! text-input-ref (:text-input-ref refs)) ;when ios implementation for selectable-text-input is ready, we need remove this condition and use ;selectable-text-input directly. @@ -346,9 +346,9 @@ :reagent-render (fn [chat-id {:keys [style ref on-selection-change] :as props} children] - (let [ref #(do (reset! text-input-ref %) - (when ref - (quo.react/set-ref-val! ref %))) + (let [ref #(do (reset! text-input-ref %) + (when ref + (quo.react/set-ref-val! ref %))) on-selection-change (fn [args] (let [selection (.-selection ^js (.-nativeEvent ^js args)) start (.-start selection) @@ -365,10 +365,11 @@ (reset! selection-event nil)))) on-selection (fn [^js event] - (let [native-event (.-nativeEvent event) - native-event (transforms/js->clj native-event) - {:keys [eventType content selectionStart selectionEnd]} native-event - full-text (:input-text (rf/sub [:chats/current-chat-input]))] + (let [native-event (.-nativeEvent event) + native-event (transforms/js->clj native-event) + {:keys [eventType content selectionStart + selectionEnd]} native-event + full-text (:input-text (rf/sub [:chats/current-chat-input]))] (on-menu-item-touched {:first-level first-level :event-type eventType :content content @@ -380,11 +381,11 @@ :menu-items menu-items :chat-id chat-id :selection-event selection-event}))) - props (merge props - {:ref ref - :style (dissoc style :margin-horizontal) - :on-selection-change on-selection-change - :on-selection on-selection})] + props (merge props + {:ref ref + :style (dissoc style :margin-horizontal) + :on-selection-change on-selection-change + :on-selection on-selection})] [rn/selectable-text-input {:menuItems @menu-items :style style} [rn/text-input props children]]))}))) diff --git a/src/status_im/ui2/screens/chat/messages/message.cljs b/src/status_im/ui2/screens/chat/messages/message.cljs index 88e9e1f0b8..4e25f1d8cd 100644 --- a/src/status_im/ui2/screens/chat/messages/message.cljs +++ b/src/status_im/ui2/screens/chat/messages/message.cljs @@ -1,32 +1,32 @@ (ns status-im.ui2.screens.chat.messages.message (:require - [quo.design-system.colors :as quo.colors] - [quo.react-native :as rn] - [quo2.components.icon :as icons] - [quo2.components.markdown.text :as text] - [quo2.core :as quo] - [quo2.foundations.colors :as colors] - [quo2.foundations.typography :as typography] - [re-frame.core :as re-frame] - [reagent.core :as reagent] - [status-im.react-native.resources :as resources] - [status-im.ui.components.fast-image :as fast-image] - [status-im.ui.screens.chat.image.preview.views :as preview] - [status-im.ui.screens.chat.message.audio :as message.audio] - [status-im.ui.screens.chat.message.gap :as message.gap] - [status-im.ui.screens.chat.sheets :as sheets] - [status-im.ui.screens.chat.styles.message.message :as style] - [status-im.ui.screens.chat.utils :as chat.utils] - [status-im.ui.screens.communities.icon :as communities.icon] - [status-im.ui2.screens.chat.components.reply.view :as components.reply] - [status-im.utils.utils :as utils] - [status-im2.constants :as constants] - [status-im2.contexts.chat.home.chat-list-item.view :as home.chat-list-item] - [status-im2.contexts.chat.messages.delete-message-for-me.events] - [status-im2.contexts.chat.messages.delete-message.events] - [utils.datetime :as datetime] - [utils.i18n :as i18n] - [utils.re-frame :as rf]) + [quo.design-system.colors :as quo.colors] + [quo.react-native :as rn] + [quo2.components.icon :as icons] + [quo2.components.markdown.text :as text] + [quo2.core :as quo] + [quo2.foundations.colors :as colors] + [quo2.foundations.typography :as typography] + [re-frame.core :as re-frame] + [reagent.core :as reagent] + [status-im.react-native.resources :as resources] + [status-im.ui.components.fast-image :as fast-image] + [status-im.ui.screens.chat.image.preview.views :as preview] + [status-im.ui.screens.chat.message.audio :as message.audio] + [status-im.ui.screens.chat.message.gap :as message.gap] + [status-im.ui.screens.chat.sheets :as sheets] + [status-im.ui.screens.chat.styles.message.message :as style] + [status-im.ui.screens.chat.utils :as chat.utils] + [status-im.ui.screens.communities.icon :as communities.icon] + [status-im.ui2.screens.chat.components.reply.view :as components.reply] + [status-im.utils.utils :as utils] + [status-im2.constants :as constants] + [status-im2.contexts.chat.home.chat-list-item.view :as home.chat-list-item] + [status-im2.contexts.chat.messages.delete-message-for-me.events] + [status-im2.contexts.chat.messages.delete-message.events] + [utils.datetime :as datetime] + [utils.i18n :as i18n] + [utils.re-frame :as rf]) (:require-macros [status-im.utils.views :refer [defview letsubs]])) (defn system-text? diff --git a/src/status_im/utils/async.cljs b/src/status_im/utils/async.cljs index cd528dcad9..7c58e88e96 100644 --- a/src/status_im/utils/async.cljs +++ b/src/status_im/utils/async.cljs @@ -29,17 +29,17 @@ the output channel immediately (wrapped in a vector). When input channel is closed, output channel is closed as well and go-loop exits." [input-ch output-ch flush-time] - (async/go-loop [acc [] + (async/go-loop [acc [] flush? false] - (if flush? - (do (async/put! output-ch acc) - (recur [] false)) - (let [[v ch] (async/alts! [input-ch (timeout flush-time)])] - (if (= ch input-ch) - (if v - (recur (conj acc v) (and (seq acc) flush?)) - (async/close! output-ch)) - (recur acc (seq acc))))))) + (if flush? + (do (async/put! output-ch acc) + (recur [] false)) + (let [[v ch] (async/alts! [input-ch (timeout flush-time)])] + (if (= ch input-ch) + (if v + (recur (conj acc v) (and (seq acc) flush?)) + (async/close! output-ch)) + (recur acc (seq acc))))))) (defn task-queue "Creates `core.async` channel which will process 0 arg functions put there in serial fashion. @@ -49,8 +49,8 @@ [& args] (let [task-queue (apply async/chan args)] (async/go-loop [task-fn (async/> - (take 2)))) + (take 2)))) (defn- url-decode [string] diff --git a/src/status_im/utils/logging/core.cljs b/src/status_im/utils/logging/core.cljs index 1d0cf2a2ed..c2b73a5107 100644 --- a/src/status_im/utils/logging/core.cljs +++ b/src/status_im/utils/logging/core.cljs @@ -29,9 +29,9 @@ "logs attached" [{:keys [:web3-node-version :mailserver/current-id :node-info :peers-summary :bug-report/details]}] - (let [build-number build/build-no - build-version (str build/version " (" build-number ")") - separator (string/join (take 40 (repeat "-"))) + (let [build-number build/build-no + build-version (str build/version " (" build-number ")") + separator (string/join (take 40 (repeat "-"))) [enode-id ip-address port] (transport.utils/extract-url-components (:enode node-info))] (string/join @@ -142,7 +142,7 @@ {:events [:shake-event]} [{:keys [db]}] (when-not (:logging/dialog-shown? db) - {:db (assoc db :logging/dialog-shown? true) + {:db (assoc db :logging/dialog-shown? true) :utils/show-confirmation (cond-> {:title (i18n/label :t/send-logs) :content (i18n/label :t/send-logs-to @@ -221,11 +221,11 @@ (let [{:keys [steps description]} (get db :bug-report/details) - title (or description (i18n/label :t/bug-report-description-placeholder)) - body (str title - "\n\n" - (or steps (i18n/label :t/bug-report-steps-placeholder))) - url (gstring/format gh-issue-url (js/escape title) (js/escape body))] + title (or description (i18n/label :t/bug-report-description-placeholder)) + body (str title + "\n\n" + (or steps (i18n/label :t/bug-report-steps-placeholder))) + url (gstring/format gh-issue-url (js/escape title) (js/escape body))] {::open-url url})) (rf/defn submit-gh-issue diff --git a/src/status_im/utils/pairing.cljs b/src/status_im/utils/pairing.cljs index d7f4566706..7b8a1b00fb 100644 --- a/src/status_im/utils/pairing.cljs +++ b/src/status_im/utils/pairing.cljs @@ -4,8 +4,8 @@ [cofx] (let [our-installation-id (get-in cofx [:db :multiaccount :installation-id])] (->> - (get-in cofx [:db :pairing/installations]) - vals - (some (fn [{:keys [enabled? installation-id]}] - (and (not= installation-id our-installation-id) - enabled?)))))) + (get-in cofx [:db :pairing/installations]) + vals + (some (fn [{:keys [enabled? installation-id]}] + (and (not= installation-id our-installation-id) + enabled?)))))) diff --git a/src/status_im/utils/test.cljs b/src/status_im/utils/test.cljs index d816cfe802..3161afe806 100644 --- a/src/status_im/utils/test.cljs +++ b/src/status_im/utils/test.cljs @@ -35,11 +35,11 @@ (fn [json callback] (callback (.multiAccountStoreDerivedAccounts native-status json))) - :clearCookies identity + :clearCookies identity - :clearStorageAPIs identity + :clearStorageAPIs identity - :setBlankPreviewFlag identity + :setBlankPreviewFlag identity :callPrivateRPC (fn [payload callback] @@ -125,4 +125,4 @@ :validateMnemonic (fn [json callback] (callback (.validateMnemonic native-status json))) - :startLocalNotifications identity})) + :startLocalNotifications identity})) diff --git a/src/status_im/utils/views.clj b/src/status_im/utils/views.clj index 8c24775e1f..782725353d 100644 --- a/src/status_im/utils/views.clj +++ b/src/status_im/utils/views.clj @@ -70,7 +70,7 @@ (let [~@vars-bindings] (apply ~f ~args)))]))) (into {})) - {:display-name (name '~n) + {:display-name (name '~n) :reagent-render (fn ~params (let [~@vars-bindings] diff --git a/src/status_im/visibility_status_updates/core.cljs b/src/status_im/visibility_status_updates/core.cljs index c44f0f7d77..5aa142548a 100644 --- a/src/status_im/visibility_status_updates/core.cljs +++ b/src/status_im/visibility_status_updates/core.cljs @@ -51,7 +51,7 @@ (defn handle-other-visibility-status-updates [acc public-key clock visibility-status-update] - (let [status-type (:status-type visibility-status-update) + (let [status-type (:status-type visibility-status-update) visibility-status-update-old (get-in acc [:visibility-status-updates public-key])] (if (and (valid-status-type? status-type) @@ -123,7 +123,7 @@ [{:keys [db] :as cofx} status-type] (let [events-to-dispatch-later (cond-> - [{:ms 10 + [{:ms 10 :dispatch [:visibility-status-updates/update-visibility-status status-type]}] @@ -131,7 +131,7 @@ (= status-type constants/visibility-status-inactive) (> (:peers-count db) 0)) ;; Disable broadcasting further updates - (conj {:ms 1000 + (conj {:ms 1000 :dispatch [:visibility-status-updates/send-visibility-status-updates? false]}))] (rf/merge cofx @@ -143,7 +143,7 @@ {:events [:visibility-status-updates/delayed-visibility-status-update]} [{:keys [db]} status-type] {:dispatch-later - [{:ms 200 + [{:ms 200 :dispatch [:visibility-status-updates/visibility-status-option-pressed status-type]}]}) @@ -158,7 +158,7 @@ send-visibility-status-updates? (= status-type constants/visibility-status-inactive)) (rf/merge cofx - {:dispatch-later [{:ms 1000 + {:dispatch-later [{:ms 1000 :dispatch [:visibility-status-updates/send-visibility-status-updates? false]}] :db (assoc-in db [:multiaccount :send-status-updates?] false)} diff --git a/src/status_im/waku/core.cljs b/src/status_im/waku/core.cljs index 54fc33857b..c659ba2d80 100644 --- a/src/status_im/waku/core.cljs +++ b/src/status_im/waku/core.cljs @@ -56,8 +56,8 @@ {:db (update db :wakuv2-nodes/manage assoc - :new? (nil? name) - :id id)} + :new? (nil? name) + :id id)} (set-input :name name) (set-input :address address))] (assoc fxs :dispatch [:navigate-to :edit-wakuv2-node]))) @@ -93,12 +93,12 @@ {:events [:wakuv2.ui/save-all-pressed]} [{:keys [db] :as cofx}] {:ui/show-confirmation - {:title (i18n/label :t/close-app-title) - :content (i18n/label :t/wakuv2-change-nodes) + {:title (i18n/label :t/close-app-title) + :content (i18n/label :t/wakuv2-change-nodes) :confirm-button-text (i18n/label :t/close-app-button) :on-accept #(re-frame/dispatch [:wakuv2.ui/save-all-confirmed]) - :on-cancel nil}}) + :on-cancel nil}}) (rf/defn save-all {:events [:wakuv2.ui/save-all-confirmed]} diff --git a/src/status_im/wallet/accounts/core.cljs b/src/status_im/wallet/accounts/core.cljs index 50cb4766e6..0691e23862 100644 --- a/src/status_im/wallet/accounts/core.cljs +++ b/src/status_im/wallet/accounts/core.cljs @@ -1,30 +1,30 @@ (ns status-im.wallet.accounts.core (:require - [clojure.string :as string] - [quo.design-system.colors :as colors] - [re-frame.core :as re-frame] - [status-im2.constants :as constants] - [status-im.ens.core :as ens.core] - [status-im.ethereum.core :as ethereum] - [status-im.ethereum.eip55 :as eip55] - [status-im.ethereum.eip681 :as eip681] - [status-im.ethereum.mnemonic :as mnemonic] - [status-im.ethereum.stateofus :as stateofus] - [utils.i18n :as i18n] - [status-im.multiaccounts.core :as multiaccounts] - [status-im.multiaccounts.key-storage.core :as key-storage] - [status-im.multiaccounts.update.core :as multiaccounts.update] - [status-im.native-module.core :as status] - [status-im.ui.components.list-selection :as list-selection] - [utils.re-frame :as rf] - [status-im.utils.hex :as hex] - [status-im.utils.mobile-sync :as utils.mobile-sync] - [status-im.utils.types :as types] - [status-im.wallet.core :as wallet] - [status-im.wallet.prices :as prices] - [status-im2.navigation.events :as navigation] - [taoensso.timbre :as log] - [utils.security.core :as security])) + [clojure.string :as string] + [quo.design-system.colors :as colors] + [re-frame.core :as re-frame] + [status-im2.constants :as constants] + [status-im.ens.core :as ens.core] + [status-im.ethereum.core :as ethereum] + [status-im.ethereum.eip55 :as eip55] + [status-im.ethereum.eip681 :as eip681] + [status-im.ethereum.mnemonic :as mnemonic] + [status-im.ethereum.stateofus :as stateofus] + [utils.i18n :as i18n] + [status-im.multiaccounts.core :as multiaccounts] + [status-im.multiaccounts.key-storage.core :as key-storage] + [status-im.multiaccounts.update.core :as multiaccounts.update] + [status-im.native-module.core :as status] + [status-im.ui.components.list-selection :as list-selection] + [utils.re-frame :as rf] + [status-im.utils.hex :as hex] + [status-im.utils.mobile-sync :as utils.mobile-sync] + [status-im.utils.types :as types] + [status-im.wallet.core :as wallet] + [status-im.wallet.prices :as prices] + [status-im2.navigation.events :as navigation] + [taoensso.timbre :as log] + [utils.security.core :as security])) (rf/defn start-adding-new-account {:events [:wallet.accounts/start-adding-new-account]} @@ -152,8 +152,8 @@ [{:keys [db]} hashed-password] (let [{:keys [key-uid wallet-root-address]} (get db :multiaccount) - path-num (inc (get-in db [:multiaccount :latest-derived-path])) - accounts (:multiaccount/accounts db)] + path-num (inc (get-in db [:multiaccount :latest-derived-path])) + accounts (:multiaccount/accounts db)] {:db (assoc-in db [:add-account :step] :generating) ::generate-account {:derivation-info {:path (str "m/" path-num) :address wallet-root-address} diff --git a/src/status_im/wallet/choose_recipient/core.cljs b/src/status_im/wallet/choose_recipient/core.cljs index 2791a4f378..1d01cefe6d 100644 --- a/src/status_im/wallet/choose_recipient/core.cljs +++ b/src/status_im/wallet/choose_recipient/core.cljs @@ -100,8 +100,8 @@ {:success-callback #(re-frame/dispatch [:wallet.send/update-gas-price-success :wallet/prepare-transaction %]) - :network-id (get-in (ethereum/current-network db) - [:config :NetworkId])}}) + :network-id (get-in (ethereum/current-network db) + [:config :NetworkId])}}) (when (and chain-id (not= current-chain-id chain-id)) {:ui/show-error (i18n/label :t/wallet-invalid-chain-id {:data uri :chain current-chain-id})}))))) @@ -124,7 +124,7 @@ ;; if there are no ens-names, we dispatch request-uri-parsed immediately (request-uri-parsed cofx message uri) {::resolve-addresses - {:chain-id (ethereum/chain-id db) + {:chain-id (ethereum/chain-id db) :ens-names ens-names :callback (fn [addresses] diff --git a/src/status_im/wallet/core.cljs b/src/status_im/wallet/core.cljs index d7bd2c1d30..7ced31337d 100644 --- a/src/status_im/wallet/core.cljs +++ b/src/status_im/wallet/core.cljs @@ -1,36 +1,36 @@ (ns status-im.wallet.core (:require - [clojure.set :as set] - [clojure.string :as string] - [re-frame.core :as re-frame] - [status-im.async-storage.core :as async-storage] - [status-im2.common.bottom-sheet.events :as bottom-sheet] - [status-im.contact.db :as contact.db] - [status-im.ethereum.core :as ethereum] - [status-im.ethereum.eip55 :as eip55] - [status-im.ethereum.ens :as ens] - [status-im.ethereum.stateofus :as stateofus] - [status-im.ethereum.tokens :as tokens] - [utils.i18n :as i18n] - [status-im.multiaccounts.update.core :as multiaccounts.update] - [status-im.popover.core :as popover.core] - [status-im.qr-scanner.core :as qr-scaner] - [status-im.signing.eip1559 :as eip1559] - [status-im.signing.gas :as signing.gas] - [status-im2.config :as config] - [status-im.utils.core :as utils.core] - [utils.re-frame :as rf] - [utils.datetime :as datetime] - [status-im.utils.mobile-sync :as mobile-network-utils] - [status-im.utils.money :as money] - [status-im.utils.utils :as utils.utils] - [status-im.wallet.db :as wallet.db] - [status-im.wallet.prices :as prices] - status-im.wallet.recipient.core - [status-im.wallet.utils :as wallet.utils] - [status-im2.common.json-rpc.events :as json-rpc] - [status-im2.navigation.events :as navigation] - [taoensso.timbre :as log])) + [clojure.set :as set] + [clojure.string :as string] + [re-frame.core :as re-frame] + [status-im.async-storage.core :as async-storage] + [status-im2.common.bottom-sheet.events :as bottom-sheet] + [status-im.contact.db :as contact.db] + [status-im.ethereum.core :as ethereum] + [status-im.ethereum.eip55 :as eip55] + [status-im.ethereum.ens :as ens] + [status-im.ethereum.stateofus :as stateofus] + [status-im.ethereum.tokens :as tokens] + [utils.i18n :as i18n] + [status-im.multiaccounts.update.core :as multiaccounts.update] + [status-im.popover.core :as popover.core] + [status-im.qr-scanner.core :as qr-scaner] + [status-im.signing.eip1559 :as eip1559] + [status-im.signing.gas :as signing.gas] + [status-im2.config :as config] + [status-im.utils.core :as utils.core] + [utils.re-frame :as rf] + [utils.datetime :as datetime] + [status-im.utils.mobile-sync :as mobile-network-utils] + [status-im.utils.money :as money] + [status-im.utils.utils :as utils.utils] + [status-im.wallet.db :as wallet.db] + [status-im.wallet.prices :as prices] + status-im.wallet.recipient.core + [status-im.wallet.utils :as wallet.utils] + [status-im2.common.json-rpc.events :as json-rpc] + [status-im2.navigation.events :as navigation] + [taoensso.timbre :as log])) (defn get-balance [{:keys [address on-success on-error]}] @@ -125,8 +125,8 @@ (defn get-token-balances [{:keys [addresses tokens scan-all-tokens? assets]}] (json-rpc/call - {:method "wallet_getTokensBalances" - :params [addresses (keys tokens)] + {:method "wallet_getTokensBalances" + :params [addresses (keys tokens)] :number-of-retries 50 :on-success (fn [results] @@ -450,13 +450,13 @@ (rf/defn accept-request-transaction-button-clicked-from-command {:events [:wallet.ui/accept-request-transaction-button-clicked-from-command]} [{:keys [db]} chat-id {:keys [value contract] :as request-parameters}] - (let [identity (:current-chat-id db) - all-tokens (:wallet/all-tokens db) + (let [identity (:current-chat-id db) + all-tokens (:wallet/all-tokens db) {:keys [symbol decimals]} (if (seq contract) (get all-tokens contract) (tokens/native-currency (ethereum/get-current-network db))) - amount-text (str (money/internal->formatted value symbol decimals))] + amount-text (str (money/internal->formatted value symbol decimals))] {:db (assoc db :wallet/prepare-transaction {:from (ethereum/get-default-account (:multiaccount/accounts db)) @@ -499,13 +499,13 @@ :signing/update-gas-price {:success-callback #(re-frame/dispatch [:wallet.send/update-gas-price-success :wallet/prepare-transaction %]) - :network-id (get-in (ethereum/current-network db) - [:config :NetworkId])}}) + :network-id (get-in (ethereum/current-network db) + [:config :NetworkId])}}) (rf/defn prepare-transaction-from-chat {:events [:wallet/prepare-transaction-from-chat]} [{:keys [db]}] - (let [identity (:current-chat-id db) + (let [identity (:current-chat-id db) {:keys [ens-verified name] :as contact} (or (get-in db [:contacts/contacts identity]) (-> identity @@ -557,8 +557,8 @@ :signing/update-gas-price {:success-callback #(re-frame/dispatch [:wallet.send/update-gas-price-success :wallet/prepare-transaction %]) - :network-id (get-in (ethereum/current-network db) - [:config :NetworkId])}}) + :network-id (get-in (ethereum/current-network db) + [:config :NetworkId])}}) (rf/defn cancel-transaction-command {:events [:wallet/cancel-transaction-command]} @@ -695,8 +695,8 @@ [{:keys [db] :as cofx}] (log/info "[wallet] after-checking-history") {:db (dissoc db - :wallet/recent-history-fetching-started? - :wallet/refreshing-history?)}) + :wallet/recent-history-fetching-started? + :wallet/refreshing-history?)}) (defn set-timeout [db] @@ -713,14 +713,14 @@ timeout (if force-restart? old-timeout (set-timeout db))] - {:db (-> db - (assoc :wallet-service/restart-timeout timeout - :wallet-service/custom-interval (get-next-custom-interval - db) - :wallet/was-started? true - :wallet/on-recent-history-fetching - on-recent-history-fetching)) - ::check-recent-history addresses + {:db (-> db + (assoc :wallet-service/restart-timeout timeout + :wallet-service/custom-interval (get-next-custom-interval + db) + :wallet/was-started? true + :wallet/on-recent-history-fetching + on-recent-history-fetching)) + ::check-recent-history addresses ::utils.utils/clear-timeouts [(when (not= timeout old-timeout) old-timeout)]})) diff --git a/src/status_im/wallet/db_test.cljs b/src/status_im/wallet/db_test.cljs index 908a48ff80..7afc497e6d 100644 --- a/src/status_im/wallet/db_test.cljs +++ b/src/status_im/wallet/db_test.cljs @@ -15,7 +15,7 @@ (is (= false (#'status-im.wallet.db/too-precise-amount? "100.000000000000000001" 18))) (is (= false (#'status-im.wallet.db/too-precise-amount? "1e-18" 18))) (is (= true (#'status-im.wallet.db/too-precise-amount? "1e-19" 18))) - (is (= true (#'status-im.wallet.db/too-precise-amount? "0xa.a" 2))) ;; 0xa.a is 10.625 + (is (= true (#'status-im.wallet.db/too-precise-amount? "0xa.a" 2))) ;; 0xa.a is 10.625 (is (= false (#'status-im.wallet.db/too-precise-amount? "0xa.a" 3))) (is (= false (#'status-im.wallet.db/too-precise-amount? "1000" 3))))) diff --git a/src/status_im/wallet_connect/core.cljs b/src/status_im/wallet_connect/core.cljs index 5b20f6be2e..ca898ffd33 100644 --- a/src/status_im/wallet_connect/core.cljs +++ b/src/status_im/wallet_connect/core.cljs @@ -247,8 +247,10 @@ (not (vector? params))) ;; We don't use signer argument for keycard sign-typed-data ["0x0" params] - message? (browser/normalize-sign-message-params params typed?) - :else [nil nil])] + message? (browser/normalize-sign-message-params + params + typed?) + :else [nil nil])] (when (or (not message?) (and address data)) (signing/sign cofx (merge diff --git a/src/status_im/wallet_connect_legacy/core.cljs b/src/status_im/wallet_connect_legacy/core.cljs index 09bb708b1e..efb8ae3c7e 100644 --- a/src/status_im/wallet_connect_legacy/core.cljs +++ b/src/status_im/wallet_connect_legacy/core.cljs @@ -175,11 +175,11 @@ (update :wallet-connect-legacy/sessions conj session)) - :json-rpc/call [{:method "wakuext_addWalletConnectSession" - :params [{:id peer-id - :info info - :dappName dapp-name - :dappUrl dapp-url}] + :json-rpc/call [{:method "wakuext_addWalletConnectSession" + :params [{:id peer-id + :info info + :dappName dapp-name + :dappUrl dapp-url}] :on-success #(log/info "wakuext_addWalletConnectSession success call back , data =>" @@ -271,14 +271,14 @@ connector (:connector session) peer-id (get-in session [:params 0 :peerId])] {:hide-wallet-connect-app-management-sheet nil - :hide-wallet-connect-success-sheet nil - :wc-1-kill-session connector - :db (-> db - (assoc :wallet-connect-legacy/sessions - (filter #(not= (:connector %) connector) - sessions)) - (dissoc :wallet-connect/session-managed) - (dissoc :wallet-connect/session-connected)) + :hide-wallet-connect-success-sheet nil + :wc-1-kill-session connector + :db (-> db + (assoc :wallet-connect-legacy/sessions + (filter #(not= (:connector %) connector) + sessions)) + (dissoc :wallet-connect/session-managed) + (dissoc :wallet-connect/session-connected)) :json-rpc/call [{:method "wakuext_destroyWalletConnectSession" :params [peer-id] @@ -334,8 +334,10 @@ (not (vector? params))) ;; We don't use signer argument for keycard sign-typed-data ["0x0" params] - message? (browser/normalize-sign-message-params params typed?) - :else [nil nil])] + message? (browser/normalize-sign-message-params + params + typed?) + :else [nil nil])] (when (or (not message?) (and address data)) (signing/sign cofx diff --git a/src/status_im2/common/bottom_sheet/view.cljs b/src/status_im2/common/bottom_sheet/view.cljs index 613aaf0204..7213d2229e 100644 --- a/src/status_im2/common/bottom_sheet/view.cljs +++ b/src/status_im2/common/bottom_sheet/view.cljs @@ -236,5 +236,5 @@ children]] (when show-handle? handle-comp)]]] - (not show-handle?) - (conj [gesture/gesture-detector {:gesture bottom-sheet-gesture}]))]))])])) + (not show-handle?) + (conj [gesture/gesture-detector {:gesture bottom-sheet-gesture}]))]))])])) diff --git a/src/status_im2/common/confirmation_drawer/view.cljs b/src/status_im2/common/confirmation_drawer/view.cljs index ecaf2b3e31..7725d71c75 100644 --- a/src/status_im2/common/confirmation_drawer/view.cljs +++ b/src/status_im2/common/confirmation_drawer/view.cljs @@ -30,14 +30,14 @@ (let [extra-action-selected? (reagent/atom false)] (fn [] (let [{:keys [group-chat chat-id public-key color name]} context - id (or chat-id public-key) + id (or chat-id public-key) display-name (if-not group-chat (first (rf/sub [:contacts/contact-two-names-by-identity id])) name) - contact (when-not group-chat - (rf/sub [:contacts/contact-by-address - id])) - photo-path (when-not (empty? (:images contact)) - (rf/sub [:chats/photo-path id]))] + contact (when-not group-chat + (rf/sub [:contacts/contact-by-address + id])) + photo-path (when-not (empty? (:images contact)) + (rf/sub [:chats/photo-path id]))] [rn/view {:style {:margin-horizontal 20} :accessibility-label accessibility-label} diff --git a/src/status_im2/common/contact_list_item/view.cljs b/src/status_im2/common/contact_list_item/view.cljs index 16cee0898f..8e7f85148a 100644 --- a/src/status_im2/common/contact_list_item/view.cljs +++ b/src/status_im2/common/contact_list_item/view.cljs @@ -57,23 +57,24 @@ (defn contact-list-item [item _ _ {:keys [start-a-new-chat? on-toggle group] :as extra-data}] - (let [{:keys [public-key compressed-key ens-verified added? images]} item - display-name (first - (rf/sub - [:contacts/contact-two-names-by-identity - public-key])) - photo-path (when (seq images) - (rf/sub [:chats/photo-path public-key])) - online? (rf/sub [:visibility-status-updates/online? - public-key]) - user-selected? (rf/sub [:is-contact-selected? public-key]) + (let [{:keys [public-key compressed-key ens-verified + added? images]} item + display-name (first + (rf/sub + [:contacts/contact-two-names-by-identity + public-key])) + photo-path (when (seq images) + (rf/sub [:chats/photo-path public-key])) + online? (rf/sub [:visibility-status-updates/online? + public-key]) + user-selected? (rf/sub [:is-contact-selected? public-key]) {:keys [contacts admins]} group - member? (contains? contacts public-key) - current-pk (rf/sub [:multiaccount/public-key]) - admin? (get admins current-pk) - checked? (reagent/atom (if start-a-new-chat? - user-selected? - member?))] + member? (contains? contacts public-key) + current-pk (rf/sub [:multiaccount/public-key]) + admin? (get admins current-pk) + checked? (reagent/atom (if start-a-new-chat? + user-selected? + member?))] [rn/touchable-opacity (merge {:style (style/container) diff --git a/src/status_im2/common/scroll_page/view.cljs b/src/status_im2/common/scroll_page/view.cljs index 2e64d70eff..567a8bca33 100644 --- a/src/status_im2/common/scroll_page/view.cljs +++ b/src/status_im2/common/scroll_page/view.cljs @@ -21,10 +21,10 @@ (defn diff-with-max-min [value maximum minimum] (->> - (+ value scroll-position-0) - (- maximum) - (max minimum) - (min maximum))) + (+ value scroll-position-0) + (- maximum) + (max minimum) + (min maximum))) (defn scroll-page-header [scroll-height diff --git a/src/status_im2/common/toasts/view.cljs b/src/status_im2/common/toasts/view.cljs index f8416bbfca..fce53b8f89 100644 --- a/src/status_im2/common/toasts/view.cljs +++ b/src/status_im2/common/toasts/view.cljs @@ -40,11 +40,11 @@ (fn [] [:f> (fn [] - (let [duration (or (rf/sub [:toasts/toast-cursor id :duration]) 3000) + (let [duration (or (rf/sub [:toasts/toast-cursor id :duration]) 3000) on-dismissed #((or (rf/sub [:toasts/toast-cursor id :on-dismissed]) identity) id) create-timer (fn [] (reset! timer (utils.utils/set-timeout close! duration))) - translate-y (reanimated/use-shared-value 0) + translate-y (reanimated/use-shared-value 0) pan (-> (gesture/gesture-pan) diff --git a/src/status_im2/config.cljs b/src/status_im2/config.cljs index 301e9c50ee..710337b4b4 100644 --- a/src/status_im2/config.cljs +++ b/src/status_im2/config.cljs @@ -133,11 +133,11 @@ default-networks))) (def default-wallet-connect-metadata - {:name "Status Wallet" + {:name "Status Wallet" :description "Status is a secure messaging app, crypto wallet, and Web3 browser built with state of the art technology." - :url "#" - :icons ["https://statusnetwork.com/img/press-kit-status-logo.svg"]}) + :url "#" + :icons ["https://statusnetwork.com/img/press-kit-status-logo.svg"]}) (def wallet-connect-project-id "87815d72a81d739d2a7ce15c2cfdefb3") diff --git a/src/status_im2/contexts/add_new_contact/style.cljs b/src/status_im2/contexts/add_new_contact/style.cljs index 5ace1b6593..0a77ca3fa9 100644 --- a/src/status_im2/contexts/add_new_contact/style.cljs +++ b/src/status_im2/contexts/add_new_contact/style.cljs @@ -76,12 +76,12 @@ (defn text-input [error?] - {:accessibility-label :enter-contact-code-input - :auto-capitalize :none + {:accessibility-label :enter-contact-code-input + :auto-capitalize :none :placeholder-text-color (colors/theme-colors colors/neutral-40 colors/neutral-50) - :multiline true + :multiline true :style (merge typography/monospace typography/paragraph-1 diff --git a/src/status_im2/contexts/chat/events.cljs b/src/status_im2/contexts/chat/events.cljs index 3a8f0f28bf..e53f9c0e4a 100644 --- a/src/status_im2/contexts/chat/events.cljs +++ b/src/status_im2/contexts/chat/events.cljs @@ -277,7 +277,7 @@ (rf/merge cofx {:clear-message-notifications [[chat-id] (get-in db [:multiaccount :remote-push-notifications-enabled?])] - :dispatch [:shell/close-switcher-card chat-id]} + :dispatch [:shell/close-switcher-card chat-id]} (deactivate-chat chat-id) (offload-messages chat-id))) diff --git a/src/status_im2/contexts/chat/group_details/view.cljs b/src/status_im2/contexts/chat/group_details/view.cljs index 0301e80494..315dab6729 100644 --- a/src/status_im2/contexts/chat/group_details/view.cljs +++ b/src/status_im2/contexts/chat/group_details/view.cljs @@ -105,12 +105,14 @@ (defn group-details [] - (let [{:keys [admins chat-id chat-name color public? muted contacts] :as group} (rf/sub - [:chats/current-chat]) - members (rf/sub [:contacts/group-members-sections]) + (let [{:keys [admins chat-id chat-name color public? + muted contacts] + :as group} (rf/sub + [:chats/current-chat]) + members (rf/sub [:contacts/group-members-sections]) pinned-messages (rf/sub [:chats/pinned chat-id]) - current-pk (rf/sub [:multiaccount/public-key]) - admin? (get admins current-pk)] + current-pk (rf/sub [:multiaccount/public-key]) + admin? (get admins current-pk)] [rn/view {:style {:flex 1 :background-color (colors/theme-colors colors/white colors/neutral-95)}} diff --git a/src/status_im2/contexts/chat/home/contact_request/view.cljs b/src/status_im2/contexts/chat/home/contact_request/view.cljs index 7d2df16be6..46a90245ef 100644 --- a/src/status_im2/contexts/chat/home/contact_request/view.cljs +++ b/src/status_im2/contexts/chat/home/contact_request/view.cljs @@ -29,8 +29,8 @@ ", " (get-display-name (second requests)) " " (i18n/label :t/and) - " " (- (count requests) 2) - " " (i18n/label :t/more)))) + " " (- (count requests) 2) + " " (i18n/label :t/more)))) (defn contact-requests [requests] diff --git a/src/status_im2/contexts/chat/lightbox/view.cljs b/src/status_im2/contexts/chat/lightbox/view.cljs index 2f98279574..1eb4cea078 100644 --- a/src/status_im2/contexts/chat/lightbox/view.cljs +++ b/src/status_im2/contexts/chat/lightbox/view.cljs @@ -1,17 +1,17 @@ (ns status-im2.contexts.chat.lightbox.view (:require - [quo2.core :as quo] - [quo2.foundations.colors :as colors] - [react-native.core :as rn] - [react-native.fast-image :as fast-image] - [react-native.reanimated :as reanimated] - [utils.re-frame :as rf] - [react-native.safe-area :as safe-area] - [reagent.core :as reagent] - [status-im2.contexts.chat.lightbox.style :as style] - [utils.datetime :as datetime] - [react-native.gesture :as gesture] - [oops.core :refer [oget]])) + [quo2.core :as quo] + [quo2.foundations.colors :as colors] + [react-native.core :as rn] + [react-native.fast-image :as fast-image] + [react-native.reanimated :as reanimated] + [utils.re-frame :as rf] + [react-native.safe-area :as safe-area] + [reagent.core :as reagent] + [status-im2.contexts.chat.lightbox.style :as style] + [utils.datetime :as datetime] + [react-native.gesture :as gesture] + [oops.core :refer [oget]])) (def flat-list-ref (atom nil)) (def small-list-ref (atom nil)) diff --git a/src/status_im2/contexts/chat/messages/composer/view.cljs b/src/status_im2/contexts/chat/messages/composer/view.cljs index ff53ba73fc..e11f0e027f 100644 --- a/src/status_im2/contexts/chat/messages/composer/view.cljs +++ b/src/status_im2/contexts/chat/messages/composer/view.cljs @@ -177,48 +177,48 @@ (fn [chat-id insets] [:f> (fn [] - (let [reply (rf/sub [:chats/reply-message]) - edit (rf/sub [:chats/edit-message]) - suggestions (rf/sub [:chat/mention-suggestions]) - images (rf/sub [:chats/sending-image]) + (let [reply (rf/sub [:chats/reply-message]) + edit (rf/sub [:chats/edit-message]) + suggestions (rf/sub [:chat/mention-suggestions]) + images (rf/sub [:chats/sending-image]) - {window-height :height} (rn/use-window-dimensions) + {window-height :height} (rn/use-window-dimensions) {:keys [keyboard-shown keyboard-height]} (hooks/use-keyboard) - translate-y (reanimated/use-shared-value 0) - bg-opacity (reanimated/use-shared-value 0) - bg-bottom (reanimated/use-shared-value (- window-height)) + translate-y (reanimated/use-shared-value 0) + bg-opacity (reanimated/use-shared-value 0) + bg-bottom (reanimated/use-shared-value (- window-height)) - suggestions? (and (seq suggestions) - keyboard-shown - (not @keyboard-hiding?)) + suggestions? (and (seq suggestions) + keyboard-shown + (not @keyboard-hiding?)) - max-y (- window-height - (- (if (> keyboard-height 0) - keyboard-height - 360) - (:bottom insets)) - 46) + max-y (- window-height + (- (if (> keyboard-height 0) + keyboard-height + 360) + (:bottom insets)) + 46) - min-y (+ 108 - (:bottom insets) - (if suggestions? - (min (/ max-y 2) - (+ 16 - (* 46 (dec (count suggestions))))) - (+ 0 - (when (or edit reply) 38) - (when (seq images) 80)))) + min-y (+ 108 + (:bottom insets) + (if suggestions? + (min (/ max-y 2) + (+ 16 + (* 46 (dec (count suggestions))))) + (+ 0 + (when (or edit reply) 38) + (when (seq images) 80)))) - parent-height (reanimated/use-shared-value min-y) - max-parent-height (Math/abs (- max-y 110 (:bottom insets))) + parent-height (reanimated/use-shared-value min-y) + max-parent-height (Math/abs (- max-y 110 (:bottom insets))) params (prepare-params [refs window-height translate-y bg-opacity bg-bottom min-y max-y parent-height max-parent-height chat-id suggestions reply edit images keyboard-shown]) - input-content-change (get-input-content-change params) - bottom-sheet-gesture (get-bottom-sheet-gesture params)] + input-content-change (get-input-content-change params) + bottom-sheet-gesture (get-bottom-sheet-gesture params)] (effect! params) [reanimated/view {:style (reanimated/apply-animations-to-style diff --git a/src/status_im2/contexts/chat/messages/contact_requests/bottom_drawer.cljs b/src/status_im2/contexts/chat/messages/contact_requests/bottom_drawer.cljs index faf32a0d4c..f60ad08839 100644 --- a/src/status_im2/contexts/chat/messages/contact_requests/bottom_drawer.cljs +++ b/src/status_im2/contexts/chat/messages/contact_requests/bottom_drawer.cljs @@ -1,10 +1,10 @@ (ns status-im2.contexts.chat.messages.contact-requests.bottom-drawer (:require - [utils.i18n :as i18n] - [utils.re-frame :as rf] - [quo2.core :as quo] - [quo2.components.drawers.permission-context.view :as permission-context] - [status-im2.constants :as constants])) + [utils.i18n :as i18n] + [utils.re-frame :as rf] + [quo2.core :as quo] + [quo2.components.drawers.permission-context.view :as permission-context] + [status-im2.constants :as constants])) (defn view [contact-id contact-request-state] diff --git a/src/status_im2/contexts/chat/messages/content/image/view.cljs b/src/status_im2/contexts/chat/messages/content/image/view.cljs index e2450bf0d7..dcecd9da04 100644 --- a/src/status_im2/contexts/chat/messages/content/image/view.cljs +++ b/src/status_im2/contexts/chat/messages/content/image/view.cljs @@ -1,10 +1,10 @@ (ns status-im2.contexts.chat.messages.content.image.view (:require - [quo2.core :as quo] - [react-native.core :as rn] - [react-native.fast-image :as fast-image] - [status-im2.constants :as constants] - [utils.re-frame :as rf])) + [quo2.core :as quo] + [react-native.core :as rn] + [react-native.fast-image :as fast-image] + [status-im2.constants :as constants] + [utils.re-frame :as rf])) (defn calculate-dimensions [width height] diff --git a/src/status_im2/contexts/chat/messages/content/text/view.cljs b/src/status_im2/contexts/chat/messages/content/text/view.cljs index 899d0f85cb..0b27e04299 100644 --- a/src/status_im2/contexts/chat/messages/content/text/view.cljs +++ b/src/status_im2/contexts/chat/messages/content/text/view.cljs @@ -1,8 +1,8 @@ (ns status-im2.contexts.chat.messages.content.text.view (:require - [react-native.core :as rn] - [status-im.ui2.screens.chat.messages.message :as old-message] - [status-im2.contexts.chat.messages.link-preview.view :as link-preview])) + [react-native.core :as rn] + [status-im.ui2.screens.chat.messages.message :as old-message] + [status-im2.contexts.chat.messages.link-preview.view :as link-preview])) (defn text-content [message-data context] diff --git a/src/status_im2/contexts/chat/messages/delete_message/events.cljs b/src/status_im2/contexts/chat/messages/delete_message/events.cljs index 25a68b08ab..95e34ec21a 100644 --- a/src/status_im2/contexts/chat/messages/delete_message/events.cljs +++ b/src/status_im2/contexts/chat/messages/delete_message/events.cljs @@ -1,11 +1,11 @@ (ns status-im2.contexts.chat.messages.delete-message.events (:require - [quo2.foundations.colors :as colors] - [status-im2.contexts.chat.messages.list.events :as message-list] - [taoensso.timbre :as log] - [utils.datetime :as datetime] - [utils.i18n :as i18n] - [utils.re-frame :as rf])) + [quo2.foundations.colors :as colors] + [status-im2.contexts.chat.messages.list.events :as message-list] + [taoensso.timbre :as log] + [utils.datetime :as datetime] + [utils.i18n :as i18n] + [utils.re-frame :as rf])) (defn- update-db-clear-undo-timer [db chat-id message-id] @@ -76,18 +76,18 @@ ;; new delete operation will reset prev pending deletes' undo timelimit ;; undo will undo all pending deletes ;; all pending deletes are stored in toast - (let [unpin? (should-and-able-to-unpin-to-be-deleted-message - db - {:chat-id chat-id :message-id message-id}) + (let [unpin? (should-and-able-to-unpin-to-be-deleted-message + db + {:chat-id chat-id :message-id message-id}) - pub-key (get-in db [:multiaccount :public-key]) + pub-key (get-in db [:multiaccount :public-key]) ;; compute deleted by - message-from (get message :from) - deleted-by (when (not= pub-key message-from) pub-key) + message-from (get message :from) + deleted-by (when (not= pub-key message-from) pub-key) existing-undo-toast (get-in db [:toasts :toasts :delete-message-for-everyone]) - toast-count (inc (get existing-undo-toast :message-deleted-for-everyone-count 0)) + toast-count (inc (get existing-undo-toast :message-deleted-for-everyone-count 0)) existing-undos (-> existing-undo-toast (get :message-deleted-for-everyone-undos []) diff --git a/src/status_im2/contexts/chat/messages/delete_message/events_test.cljs b/src/status_im2/contexts/chat/messages/delete_message/events_test.cljs index 6361b728c8..f9f398711d 100644 --- a/src/status_im2/contexts/chat/messages/delete_message/events_test.cljs +++ b/src/status_im2/contexts/chat/messages/delete_message/events_test.cljs @@ -29,7 +29,7 @@ :message-deleted-for-everyone-count 1 :message-deleted-for-everyone-undos [{:message-id "pending-delete-message" - :chat-id cid}])) + :chat-id cid}])) effects (delete-message/delete {:db db} message 1000)] (is (= (get-in effects [:db :messages cid mid :deleted-undoable-till]) (get-in effects [:db :messages cid "pending-delete-message" :deleted-undoable-till]) diff --git a/src/status_im2/contexts/chat/messages/delete_message_for_me/events.cljs b/src/status_im2/contexts/chat/messages/delete_message_for_me/events.cljs index b188b53a8e..46001d4ddc 100644 --- a/src/status_im2/contexts/chat/messages/delete_message_for_me/events.cljs +++ b/src/status_im2/contexts/chat/messages/delete_message_for_me/events.cljs @@ -1,11 +1,11 @@ (ns status-im2.contexts.chat.messages.delete-message-for-me.events (:require - [utils.i18n :as i18n] - [quo2.foundations.colors :as colors] - [status-im2.contexts.chat.messages.list.events :as message-list] - [taoensso.timbre :as log] - [utils.datetime :as datetime] - [utils.re-frame :as rf])) + [utils.i18n :as i18n] + [quo2.foundations.colors :as colors] + [status-im2.contexts.chat.messages.list.events :as message-list] + [taoensso.timbre :as log] + [utils.datetime :as datetime] + [utils.re-frame :as rf])) (defn- update-db-clear-undo-timer [db chat-id message-id] diff --git a/src/status_im2/contexts/chat/messages/delete_message_for_me/events_test.cljs b/src/status_im2/contexts/chat/messages/delete_message_for_me/events_test.cljs index 9f5928331f..7d0437b3f4 100644 --- a/src/status_im2/contexts/chat/messages/delete_message_for_me/events_test.cljs +++ b/src/status_im2/contexts/chat/messages/delete_message_for_me/events_test.cljs @@ -30,7 +30,7 @@ :message-deleted-for-me-count 1 :message-deleted-for-me-undos [{:message-id "pending-delete-message" - :chat-id cid}])) + :chat-id cid}])) effects (delete-message-for-me/delete {:db db} message 1000)] (is (= (get-in effects [:db :messages cid mid :deleted-for-me-undoable-till]) (get-in effects @@ -67,7 +67,7 @@ (let [db (update-in db [:messages cid mid] assoc - :deleted-for-me? true + :deleted-for-me? true :deleted-for-me-undoable-till (+ (datetime/timestamp) 1000)) result-message (get-in (delete-message-for-me/undo {:db db} message) diff --git a/src/status_im2/contexts/chat/messages/link_preview/events.cljs b/src/status_im2/contexts/chat/messages/link_preview/events.cljs index 63eb2487b1..9b214e96f4 100644 --- a/src/status_im2/contexts/chat/messages/link_preview/events.cljs +++ b/src/status_im2/contexts/chat/messages/link_preview/events.cljs @@ -1,11 +1,11 @@ (ns status-im2.contexts.chat.messages.link-preview.events (:require - [camel-snake-kebab.core :as csk] - [status-im.communities.core :as models.communities] - [status-im.multiaccounts.update.core :as multiaccounts.update] - [taoensso.timbre :as log] - [utils.collection] - [utils.re-frame :as rf])) + [camel-snake-kebab.core :as csk] + [status-im.communities.core :as models.communities] + [status-im.multiaccounts.update.core :as multiaccounts.update] + [taoensso.timbre :as log] + [utils.collection] + [utils.re-frame :as rf])) (defn community-link [id] diff --git a/src/status_im2/contexts/chat/messages/link_preview/view.cljs b/src/status_im2/contexts/chat/messages/link_preview/view.cljs index f80a93519f..0ca14c6c8b 100644 --- a/src/status_im2/contexts/chat/messages/link_preview/view.cljs +++ b/src/status_im2/contexts/chat/messages/link_preview/view.cljs @@ -1,15 +1,15 @@ (ns status-im2.contexts.chat.messages.link-preview.view (:require - [clojure.string :as string] - [utils.i18n :as i18n] - [reagent.core :as reagent] - [react-native.core :as rn] - [status-im2.constants :as constants] - [status-im2.contexts.chat.messages.link-preview.events] - [status-im2.contexts.chat.messages.link-preview.style :as style] - [quo2.core :as quo] - [utils.re-frame :as rf] - [utils.security.core :as security])) + [clojure.string :as string] + [utils.i18n :as i18n] + [reagent.core :as reagent] + [react-native.core :as rn] + [status-im2.constants :as constants] + [status-im2.contexts.chat.messages.link-preview.events] + [status-im2.contexts.chat.messages.link-preview.style :as style] + [quo2.core :as quo] + [utils.re-frame :as rf] + [utils.security.core :as security])) (defn link-belongs-to-domain [link domain] diff --git a/src/status_im2/contexts/chat/messages/list/events.cljs b/src/status_im2/contexts/chat/messages/list/events.cljs index b583496521..7695e8e96f 100644 --- a/src/status_im2/contexts/chat/messages/list/events.cljs +++ b/src/status_im2/contexts/chat/messages/list/events.cljs @@ -100,11 +100,11 @@ [current-message next-message] (assoc next-message - :first? false + :first? false :first-outgoing? (and (not (:first-outgoing? current-message)) (:first-outgoing? next-message)) - :outgoing-seen? (:outgoing-seen? current-message) + :outgoing-seen? (:outgoing-seen? current-message) :first-in-group? (not (same-group? current-message next-message)))) diff --git a/src/status_im2/contexts/chat/messages/pin/banner/view.cljs b/src/status_im2/contexts/chat/messages/pin/banner/view.cljs index 458500ed05..c169a7661b 100644 --- a/src/status_im2/contexts/chat/messages/pin/banner/view.cljs +++ b/src/status_im2/contexts/chat/messages/pin/banner/view.cljs @@ -5,12 +5,12 @@ (defn banner [chat-id] - (let [pinned-messages (rf/sub [:chats/pinned-sorted-list - chat-id]) - latest-pinned-message (last pinned-messages) - latest-pin-text (get-in latest-pinned-message [:content :text]) + (let [pinned-messages (rf/sub [:chats/pinned-sorted-list + chat-id]) + latest-pinned-message (last pinned-messages) + latest-pin-text (get-in latest-pinned-message [:content :text]) {:keys [deleted? deleted-for-me?]} latest-pinned-message - pins-count (count pinned-messages) + pins-count (count pinned-messages) latest-pin-text (cond deleted? (i18n/label :t/message-deleted-for-everyone) diff --git a/src/status_im2/contexts/chat/messages/pin/list/view.cljs b/src/status_im2/contexts/chat/messages/pin/list/view.cljs index 11528b3aeb..69b8430999 100644 --- a/src/status_im2/contexts/chat/messages/pin/list/view.cljs +++ b/src/status_im2/contexts/chat/messages/pin/list/view.cljs @@ -19,15 +19,15 @@ (defn pinned-messages-list [chat-id] - (let [pinned-messages (rf/sub [:chats/pinned-sorted-list - chat-id]) - current-chat (rf/sub [:chat-by-id chat-id]) + (let [pinned-messages (rf/sub [:chats/pinned-sorted-list + chat-id]) + current-chat (rf/sub [:chat-by-id chat-id]) {:keys [group-chat chat-id public? community-id admins]} current-chat - community (rf/sub [:communities/community - community-id])] + community (rf/sub [:communities/community + community-id])] [rn/view {:accessibility-label :pinned-messages-list} ;; TODO (flexsurfer) this should be a component in quo2 ;; https://github.com/status-im/status-mobile/issues/14529 diff --git a/src/status_im2/contexts/chat/messages/view.cljs b/src/status_im2/contexts/chat/messages/view.cljs index 796a896aee..00f119ab29 100644 --- a/src/status_im2/contexts/chat/messages/view.cljs +++ b/src/status_im2/contexts/chat/messages/view.cljs @@ -26,13 +26,14 @@ (defn page-nav [] - (let [{:keys [group-chat chat-id chat-name emoji chat-type]} (rf/sub [:chats/current-chat]) - display-name (if (= chat-type constants/one-to-one-chat-type) - (first (rf/sub [:contacts/contact-two-names-by-identity chat-id])) - (str emoji " " chat-name)) - online? (rf/sub [:visibility-status-updates/online? chat-id]) - contact (when-not group-chat (rf/sub [:contacts/contact-by-address chat-id])) - photo-path (when-not (empty? (:images contact)) (rf/sub [:chats/photo-path chat-id]))] + (let [{:keys [group-chat chat-id chat-name emoji + chat-type]} (rf/sub [:chats/current-chat]) + display-name (if (= chat-type constants/one-to-one-chat-type) + (first (rf/sub [:contacts/contact-two-names-by-identity chat-id])) + (str emoji " " chat-name)) + online? (rf/sub [:visibility-status-updates/online? chat-id]) + contact (when-not group-chat (rf/sub [:contacts/contact-by-address chat-id])) + photo-path (when-not (empty? (:images contact)) (rf/sub [:chats/photo-path chat-id]))] [quo/page-nav {:align-mid? true diff --git a/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs b/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs index 0534b0e89c..9f9ee0231a 100644 --- a/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs +++ b/src/status_im2/contexts/chat/photo_selector/album_selector/view.cljs @@ -1,12 +1,12 @@ (ns status-im2.contexts.chat.photo-selector.album-selector.view (:require - [quo2.core :as quo] - [react-native.core :as rn] - [utils.i18n :as i18n] - [utils.re-frame :as rf] - [quo2.foundations.colors :as colors] - [status-im2.contexts.chat.photo-selector.view :refer [album-title]] - [status-im2.contexts.chat.photo-selector.album-selector.style :as style])) + [quo2.core :as quo] + [react-native.core :as rn] + [utils.i18n :as i18n] + [utils.re-frame :as rf] + [quo2.foundations.colors :as colors] + [status-im2.contexts.chat.photo-selector.view :refer [album-title]] + [status-im2.contexts.chat.photo-selector.album-selector.style :as style])) (defn album [{:keys [title count uri]} index _ selected-album] diff --git a/src/status_im2/contexts/chat/photo_selector/view.cljs b/src/status_im2/contexts/chat/photo_selector/view.cljs index 8b62409184..6d03959305 100644 --- a/src/status_im2/contexts/chat/photo_selector/view.cljs +++ b/src/status_im2/contexts/chat/photo_selector/view.cljs @@ -1,19 +1,19 @@ (ns status-im2.contexts.chat.photo-selector.view (:require - [react-native.platform :as platform] - [status-im2.constants :as constants] - [utils.i18n :as i18n] - [react-native.safe-area :as safe-area] - [quo2.components.notifications.info-count :as info-count] - [quo2.core :as quo] - [quo2.foundations.colors :as colors] - [react-native.core :as rn] - [react-native.linear-gradient :as linear-gradient] - [reagent.core :as reagent] - [status-im2.contexts.chat.photo-selector.style :as style] - [status-im.utils.core :as utils] - [quo.react] - [utils.re-frame :as rf])) + [react-native.platform :as platform] + [status-im2.constants :as constants] + [utils.i18n :as i18n] + [react-native.safe-area :as safe-area] + [quo2.components.notifications.info-count :as info-count] + [quo2.core :as quo] + [quo2.foundations.colors :as colors] + [react-native.core :as rn] + [react-native.linear-gradient :as linear-gradient] + [reagent.core :as reagent] + [status-im2.contexts.chat.photo-selector.style :as style] + [status-im.utils.core :as utils] + [quo.react] + [utils.re-frame :as rf])) (defn on-press-confirm-selection [selected] diff --git a/src/status_im2/contexts/communities/discover/view.cljs b/src/status_im2/contexts/communities/discover/view.cljs index d7ce10453d..69a7f35a91 100644 --- a/src/status_im2/contexts/communities/discover/view.cljs +++ b/src/status_im2/contexts/communities/discover/view.cljs @@ -14,7 +14,7 @@ [status-im2.contexts.communities.discover.style :as style] [utils.re-frame :as rf])) -(def mock-community-item-data ;; TODO: remove once communities are loaded with this data. +(def mock-community-item-data ;; TODO: remove once communities are loaded with this data. {:data {:community-color "#0052FF" :status :gated :locked? true diff --git a/src/status_im2/contexts/communities/menus/request_to_join/view.cljs b/src/status_im2/contexts/communities/menus/request_to_join/view.cljs index 7d13bc7247..86cd5e8676 100644 --- a/src/status_im2/contexts/communities/menus/request_to_join/view.cljs +++ b/src/status_im2/contexts/communities/menus/request_to_join/view.cljs @@ -10,23 +10,23 @@ ;; TODO: update with real data (def community-rules - [{:index 1 - :title "Be respectful" + [{:index 1 + :title "Be respectful" :content "You must respect all users, regardless of your liking towards them. Treat others the way you want to be treated."} - {:index 2 - :title "No Inappropriate Language" + {:index 2 + :title "No Inappropriate Language" :content "The use of profanity should be kept to a minimum. However, any derogatory language towards any user is prohibited."} - {:index 3 - :title "No spamming" + {:index 3 + :title "No spamming" :content "Don't send a lot of small messages right after each other. Do not disrupt chat by spamming."} {:index 4 :title "No pornographic, adult or NSFW material" :content "This is a community server and not meant to share this kind of material."} - {:index 5 - :title "No advertisements" + {:index 5 + :title "No advertisements" :content "We do not tolerate any kind of advertisements, whether it be for other communities or streams."} {:index 6 diff --git a/src/status_im2/contexts/quo_preview/animated_header_list/animated_header_list.cljs b/src/status_im2/contexts/quo_preview/animated_header_list/animated_header_list.cljs index ba24eed700..aeed2a28ba 100644 --- a/src/status_im2/contexts/quo_preview/animated_header_list/animated_header_list.cljs +++ b/src/status_im2/contexts/quo_preview/animated_header_list/animated_header_list.cljs @@ -1,11 +1,11 @@ (ns status-im2.contexts.quo-preview.animated-header-list.animated-header-list (:require - [quo2.core :as quo] - [quo2.foundations.colors :as colors] - [react-native.core :as rn] - [react-native.fast-image :as fast-image] - [react-native.reanimated :as reanimated] - [quo2.components.animated-header-flatlist.view :as animated-header-list])) + [quo2.core :as quo] + [quo2.foundations.colors :as colors] + [react-native.core :as rn] + [react-native.fast-image :as fast-image] + [react-native.reanimated :as reanimated] + [quo2.components.animated-header-flatlist.view :as animated-header-list])) (def data [0 1 2 3 4 5 6 7 8 9 10]) @@ -23,9 +23,9 @@ (defn main-comp [] [rn/flat-list - {:data data + {:data data :render-fn child - :key-fn (fn [item] (str item)) + :key-fn (fn [item] (str item)) :header [rn/view {:style {:height 70 @@ -39,10 +39,10 @@ [:f> (fn [] [reanimated/fast-image - {:style (reanimated/apply-animations-to-style - {:width animation - :height animation} - {:border-radius 72}) + {:style (reanimated/apply-animations-to-style + {:width animation + :height animation} + {:border-radius 72}) :source {:uri "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg"}}])]) @@ -75,13 +75,13 @@ (def theme-color (colors/theme-alpha "#5BCC95" 0.2 0.2)) (def parameters - {:theme-color theme-color + {:theme-color theme-color :cover-uri "https://hips.hearstapps.com/hmg-prod.s3.amazonaws.com/images/kitten-playing-with-toy-mouse-royalty-free-image-590055188-1542816918.jpg?crop=1.00xw:0.758xh;0,0.132xh&resize=480:*" :display-picture-comp display-picture-comp - :header-comp header-comp - :title-comp title-comp - :main-comp main-comp}) + :header-comp header-comp + :title-comp title-comp + :main-comp main-comp}) (defn mock-screen [] diff --git a/src/status_im2/contexts/quo_preview/avatars/group_avatar.cljs b/src/status_im2/contexts/quo_preview/avatars/group_avatar.cljs index 1c387e666d..138175047d 100644 --- a/src/status_im2/contexts/quo_preview/avatars/group_avatar.cljs +++ b/src/status_im2/contexts/quo_preview/avatars/group_avatar.cljs @@ -15,9 +15,9 @@ :value "Medium"} {:key :large :value "Large"}]} - {:label "Color" - :key :color - :type :select + {:label "Color" + :key :color + :type :select :options (map (fn [c] diff --git a/src/status_im2/contexts/quo_preview/buttons/button.cljs b/src/status_im2/contexts/quo_preview/buttons/button.cljs index 1871aa238d..b6792d18f9 100644 --- a/src/status_im2/contexts/quo_preview/buttons/button.cljs +++ b/src/status_im2/contexts/quo_preview/buttons/button.cljs @@ -75,9 +75,9 @@ :justify-content :center} [quo2/button (merge (dissoc @state - :theme - :before - :after) + :theme + :before + :after) {:on-press #(println "Hello world!")} (when @above {:above :i/placeholder}) diff --git a/src/status_im2/contexts/quo_preview/community/community_card_view.cljs b/src/status_im2/contexts/quo_preview/community/community_card_view.cljs index 159ad9b84b..7a92fbd7c2 100644 --- a/src/status_im2/contexts/quo_preview/community/community_card_view.cljs +++ b/src/status_im2/contexts/quo_preview/community/community_card_view.cljs @@ -10,21 +10,21 @@ [status-im2.contexts.quo-preview.preview :as preview])) (def community-data - {:id constants/status-community-id - :name "Status" + {:id constants/status-community-id + :name "Status" :description "Status is a secure messaging app, crypto wallet and web3 browser built with the state of the art technology" - :cover (resources/get-image :community-cover) + :cover (resources/get-image :community-cover) :community-icon (resources/get-image :status-logo) - :color (rand-nth quo.colors/chat-colors) - :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}] - :tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)} - {:id 2 - :tag-label (i18n/label :t/lifestyle) - :resource (resources/get-image :lifestyle)} - {:id 3 - :tag-label (i18n/label :t/podcasts) - :resource (resources/get-image :podcasts)}]}) + :color (rand-nth quo.colors/chat-colors) + :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}] + :tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)} + {:id 2 + :tag-label (i18n/label :t/lifestyle) + :resource (resources/get-image :lifestyle)} + {:id 3 + :tag-label (i18n/label :t/podcasts) + :resource (resources/get-image :podcasts)}]}) (def descriptor [{:label "Status:" diff --git a/src/status_im2/contexts/quo_preview/community/data.cljs b/src/status_im2/contexts/quo_preview/community/data.cljs index 6f02c9964e..645ada6cc2 100644 --- a/src/status_im2/contexts/quo_preview/community/data.cljs +++ b/src/status_im2/contexts/quo_preview/community/data.cljs @@ -7,17 +7,17 @@ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII") (def community - {:id "0xsomeid" - :name "Status" + {:id "0xsomeid" + :name "Status" :description "Status is a secure messaging app, crypto wallet and web3 browser built with the state of the art technology" :community-icon thumbnail - :color (rand-nth quo.colors/chat-colors) - :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}] - :tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)} - {:id 2 - :tag-label (i18n/label :t/lifestyle) - :resource (resources/get-image :lifestyle)} - {:id 3 - :tag-label (i18n/label :t/podcasts) - :resource (resources/get-image :podcasts)}]}) + :color (rand-nth quo.colors/chat-colors) + :tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-image :status-logo)}]}] + :tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)} + {:id 2 + :tag-label (i18n/label :t/lifestyle) + :resource (resources/get-image :lifestyle)} + {:id 3 + :tag-label (i18n/label :t/podcasts) + :resource (resources/get-image :podcasts)}]}) diff --git a/src/status_im2/contexts/quo_preview/foundations/shadows.cljs b/src/status_im2/contexts/quo_preview/foundations/shadows.cljs index 398d8f3b6c..bf68c9176d 100644 --- a/src/status_im2/contexts/quo_preview/foundations/shadows.cljs +++ b/src/status_im2/contexts/quo_preview/foundations/shadows.cljs @@ -1,11 +1,11 @@ (ns status-im2.contexts.quo-preview.foundations.shadows (:require - [quo2.foundations.shadows :as shadows] - [quo2.foundations.colors :as colors] - [quo2.core :as quo] - [react-native.core :as rn] - [reagent.core :as reagent] - [status-im2.contexts.quo-preview.preview :as preview])) + [quo2.foundations.shadows :as shadows] + [quo2.foundations.colors :as colors] + [quo2.core :as quo] + [react-native.core :as rn] + [reagent.core :as reagent] + [status-im2.contexts.quo-preview.preview :as preview])) (defn demo-box [shadow-on? name shadow-style] diff --git a/src/status_im2/contexts/quo_preview/main.cljs b/src/status_im2/contexts/quo_preview/main.cljs index 05ef61ab9e..89882e5e0b 100644 --- a/src/status_im2/contexts/quo_preview/main.cljs +++ b/src/status_im2/contexts/quo_preview/main.cljs @@ -1,77 +1,77 @@ (ns status-im2.contexts.quo-preview.main (:refer-clojure :exclude [filter]) (:require - [quo2.components.buttons.button :as quo2-button] - [quo2.components.markdown.text :as quo2-text] - [quo2.foundations.colors :as colors] - [quo2.theme :as theme] - [re-frame.core :as re-frame] - [react-native.core :as rn] - [react-native.safe-area :as safe-area] - [status-im2.contexts.quo-preview.animated-header-list.animated-header-list :as animated-header-list] - [status-im2.contexts.quo-preview.avatars.account-avatar :as account-avatar] - [status-im2.contexts.quo-preview.avatars.channel-avatar :as channel-avatar] - [status-im2.contexts.quo-preview.avatars.group-avatar :as group-avatar] - [status-im2.contexts.quo-preview.avatars.icon-avatar :as icon-avatar] - [status-im2.contexts.quo-preview.avatars.user-avatar :as user-avatar] - [status-im2.contexts.quo-preview.avatars.wallet-user-avatar :as wallet-user-avatar] - [status-im2.contexts.quo-preview.banners.banner :as banner] - [status-im2.contexts.quo-preview.buttons.button :as button] - [status-im2.contexts.quo-preview.buttons.dynamic-button :as dynamic-button] - [status-im2.contexts.quo-preview.code.snippet :as code-snippet] - [status-im2.contexts.quo-preview.community.community-card-view :as community-card] - [status-im2.contexts.quo-preview.community.community-list-view :as community-list-view] - [status-im2.contexts.quo-preview.community.community-membership-list-view :as - community-membership-list-view] - [status-im2.contexts.quo-preview.community.discover-card :as discover-card] - [status-im2.contexts.quo-preview.community.token-gating :as token-gating] - [status-im2.contexts.quo-preview.counter.counter :as counter] - [status-im2.contexts.quo-preview.dividers.date :as divider-date] - [status-im2.contexts.quo-preview.dividers.divider-label :as divider-label] - [status-im2.contexts.quo-preview.dividers.new-messages :as new-messages] - [status-im2.contexts.quo-preview.drawers.action-drawers :as action-drawers] - [status-im2.contexts.quo-preview.drawers.drawer-buttons :as drawer-buttons] - [status-im2.contexts.quo-preview.drawers.permission-drawers :as permission-drawers] - [status-im2.contexts.quo-preview.dropdowns.dropdown :as dropdown] - [status-im2.contexts.quo-preview.foundations.shadows :as shadows] - [status-im2.contexts.quo-preview.info.info-message :as info-message] - [status-im2.contexts.quo-preview.info.information-box :as information-box] - [status-im2.contexts.quo-preview.list-items.channel :as channel] - [status-im2.contexts.quo-preview.list-items.preview-lists :as preview-lists] - [status-im2.contexts.quo-preview.markdown.text :as text] - [status-im2.contexts.quo-preview.messages.author :as messages-author] - [status-im2.contexts.quo-preview.messages.gap :as messages-gap] - [status-im2.contexts.quo-preview.messages.system-message :as system-message] - [status-im2.contexts.quo-preview.navigation.bottom-nav-tab :as bottom-nav-tab] - [status-im2.contexts.quo-preview.navigation.floating-shell-button :as floating-shell-button] - [status-im2.contexts.quo-preview.navigation.page-nav :as page-nav] - [status-im2.contexts.quo-preview.navigation.top-nav :as top-nav] - [status-im2.contexts.quo-preview.notifications.activity-logs :as activity-logs] - [status-im2.contexts.quo-preview.notifications.toast :as toast] - [status-im2.contexts.quo-preview.onboarding.small-option-card :as small-option-card] - [status-im2.contexts.quo-preview.posts-and-attachments.messages-skeleton :as messages-skeleton] - [status-im2.contexts.quo-preview.profile.collectible :as collectible] - [status-im2.contexts.quo-preview.profile.profile-card :as profile-card] - [status-im2.contexts.quo-preview.reactions.react :as react] - [status-im2.contexts.quo-preview.record-audio.record-audio :as record-audio] - [status-im2.contexts.quo-preview.selectors.disclaimer :as disclaimer] - [status-im2.contexts.quo-preview.selectors.filter :as filter] - [status-im2.contexts.quo-preview.selectors.selectors :as selectors] - [status-im2.contexts.quo-preview.settings.accounts :as accounts] - [status-im2.contexts.quo-preview.settings.privacy-option :as privacy-option] - [status-im2.contexts.quo-preview.switcher.switcher-cards :as switcher-cards] - [status-im2.contexts.quo-preview.tabs.account-selector :as account-selector] - [status-im2.contexts.quo-preview.tabs.segmented-tab :as segmented] - [status-im2.contexts.quo-preview.tabs.tabs :as tabs] - [status-im2.contexts.quo-preview.tags.context-tags :as context-tags] - [status-im2.contexts.quo-preview.tags.permission-tag :as permission-tag] - [status-im2.contexts.quo-preview.tags.status-tags :as status-tags] - [status-im2.contexts.quo-preview.tags.tags :as tags] - [status-im2.contexts.quo-preview.tags.token-tag :as token-tag] - [status-im2.contexts.quo-preview.wallet.lowest-price :as lowest-price] - [status-im2.contexts.quo-preview.wallet.network-amount :as network-amount] - [status-im2.contexts.quo-preview.wallet.network-breakdown :as network-breakdown] - [status-im2.contexts.quo-preview.wallet.token-overview :as token-overview])) + [quo2.components.buttons.button :as quo2-button] + [quo2.components.markdown.text :as quo2-text] + [quo2.foundations.colors :as colors] + [quo2.theme :as theme] + [re-frame.core :as re-frame] + [react-native.core :as rn] + [react-native.safe-area :as safe-area] + [status-im2.contexts.quo-preview.animated-header-list.animated-header-list :as animated-header-list] + [status-im2.contexts.quo-preview.avatars.account-avatar :as account-avatar] + [status-im2.contexts.quo-preview.avatars.channel-avatar :as channel-avatar] + [status-im2.contexts.quo-preview.avatars.group-avatar :as group-avatar] + [status-im2.contexts.quo-preview.avatars.icon-avatar :as icon-avatar] + [status-im2.contexts.quo-preview.avatars.user-avatar :as user-avatar] + [status-im2.contexts.quo-preview.avatars.wallet-user-avatar :as wallet-user-avatar] + [status-im2.contexts.quo-preview.banners.banner :as banner] + [status-im2.contexts.quo-preview.buttons.button :as button] + [status-im2.contexts.quo-preview.buttons.dynamic-button :as dynamic-button] + [status-im2.contexts.quo-preview.code.snippet :as code-snippet] + [status-im2.contexts.quo-preview.community.community-card-view :as community-card] + [status-im2.contexts.quo-preview.community.community-list-view :as community-list-view] + [status-im2.contexts.quo-preview.community.community-membership-list-view :as + community-membership-list-view] + [status-im2.contexts.quo-preview.community.discover-card :as discover-card] + [status-im2.contexts.quo-preview.community.token-gating :as token-gating] + [status-im2.contexts.quo-preview.counter.counter :as counter] + [status-im2.contexts.quo-preview.dividers.date :as divider-date] + [status-im2.contexts.quo-preview.dividers.divider-label :as divider-label] + [status-im2.contexts.quo-preview.dividers.new-messages :as new-messages] + [status-im2.contexts.quo-preview.drawers.action-drawers :as action-drawers] + [status-im2.contexts.quo-preview.drawers.drawer-buttons :as drawer-buttons] + [status-im2.contexts.quo-preview.drawers.permission-drawers :as permission-drawers] + [status-im2.contexts.quo-preview.dropdowns.dropdown :as dropdown] + [status-im2.contexts.quo-preview.foundations.shadows :as shadows] + [status-im2.contexts.quo-preview.info.info-message :as info-message] + [status-im2.contexts.quo-preview.info.information-box :as information-box] + [status-im2.contexts.quo-preview.list-items.channel :as channel] + [status-im2.contexts.quo-preview.list-items.preview-lists :as preview-lists] + [status-im2.contexts.quo-preview.markdown.text :as text] + [status-im2.contexts.quo-preview.messages.author :as messages-author] + [status-im2.contexts.quo-preview.messages.gap :as messages-gap] + [status-im2.contexts.quo-preview.messages.system-message :as system-message] + [status-im2.contexts.quo-preview.navigation.bottom-nav-tab :as bottom-nav-tab] + [status-im2.contexts.quo-preview.navigation.floating-shell-button :as floating-shell-button] + [status-im2.contexts.quo-preview.navigation.page-nav :as page-nav] + [status-im2.contexts.quo-preview.navigation.top-nav :as top-nav] + [status-im2.contexts.quo-preview.notifications.activity-logs :as activity-logs] + [status-im2.contexts.quo-preview.notifications.toast :as toast] + [status-im2.contexts.quo-preview.onboarding.small-option-card :as small-option-card] + [status-im2.contexts.quo-preview.posts-and-attachments.messages-skeleton :as messages-skeleton] + [status-im2.contexts.quo-preview.profile.collectible :as collectible] + [status-im2.contexts.quo-preview.profile.profile-card :as profile-card] + [status-im2.contexts.quo-preview.reactions.react :as react] + [status-im2.contexts.quo-preview.record-audio.record-audio :as record-audio] + [status-im2.contexts.quo-preview.selectors.disclaimer :as disclaimer] + [status-im2.contexts.quo-preview.selectors.filter :as filter] + [status-im2.contexts.quo-preview.selectors.selectors :as selectors] + [status-im2.contexts.quo-preview.settings.accounts :as accounts] + [status-im2.contexts.quo-preview.settings.privacy-option :as privacy-option] + [status-im2.contexts.quo-preview.switcher.switcher-cards :as switcher-cards] + [status-im2.contexts.quo-preview.tabs.account-selector :as account-selector] + [status-im2.contexts.quo-preview.tabs.segmented-tab :as segmented] + [status-im2.contexts.quo-preview.tabs.tabs :as tabs] + [status-im2.contexts.quo-preview.tags.context-tags :as context-tags] + [status-im2.contexts.quo-preview.tags.permission-tag :as permission-tag] + [status-im2.contexts.quo-preview.tags.status-tags :as status-tags] + [status-im2.contexts.quo-preview.tags.tags :as tags] + [status-im2.contexts.quo-preview.tags.token-tag :as token-tag] + [status-im2.contexts.quo-preview.wallet.lowest-price :as lowest-price] + [status-im2.contexts.quo-preview.wallet.network-amount :as network-amount] + [status-im2.contexts.quo-preview.wallet.network-breakdown :as network-breakdown] + [status-im2.contexts.quo-preview.wallet.token-overview :as token-overview])) (def screens-categories {:foundations [{:name :shadows diff --git a/src/status_im2/contexts/quo_preview/navigation/page_nav.cljs b/src/status_im2/contexts/quo_preview/navigation/page_nav.cljs index 8e487eb5c8..b4530e1312 100644 --- a/src/status_im2/contexts/quo_preview/navigation/page_nav.cljs +++ b/src/status_im2/contexts/quo_preview/navigation/page_nav.cljs @@ -44,26 +44,26 @@ (defn- cool-preview [] (let - [right-icon {:background-color (if (colors/dark?) - colors/neutral-80 - colors/neutral-20) - :icon :i/placeholder - :icon-color nil} + [right-icon {:background-color (if (colors/dark?) + colors/neutral-80 + colors/neutral-20) + :icon :i/placeholder + :icon-color nil} base-props {:horizontal-description? true - :one-icon-align-left? true - :align-mid? false - :page-nav-color :transparent + :one-icon-align-left? true + :align-mid? false + :page-nav-color :transparent :page-nav-background-uri "" :mid-section - {:type :text-with-description - :icon :i/placeholder - :main-text "Status" - :left-icon :i/placeholder - :right-icon :i/placeholder - :description "SNT" - :description-color "black" - :description-icon :i/placeholder + {:type :text-with-description + :icon :i/placeholder + :main-text "Status" + :left-icon :i/placeholder + :right-icon :i/placeholder + :description "SNT" + :description-color "black" + :description-icon :i/placeholder :description-user-icon "https://i.picsum.photos/id/810/200/300.jpg?hmac=HgwlXd-OaLOAqhGyCiZDUb_75EgUI4u0GtS7nfgxd8s"} :left-section @@ -101,10 +101,10 @@ :horizontal-description? false :mid-section {:type :text-with-description}})} - state (reagent/atom - (-> (get variations (:selected-variation @selected-variation)) - (assoc :right-section-buttons - (repeat (:number-of-right-icons @selected-variation) right-icon))))] + state (reagent/atom + (-> (get variations (:selected-variation @selected-variation)) + (assoc :right-section-buttons + (repeat (:number-of-right-icons @selected-variation) right-icon))))] (fn [] [rn/view {:margin-bottom 50 diff --git a/src/status_im2/contexts/quo_preview/notifications/toast.cljs b/src/status_im2/contexts/quo_preview/notifications/toast.cljs index 306ce5cd50..15406e129d 100644 --- a/src/status_im2/contexts/quo_preview/notifications/toast.cljs +++ b/src/status_im2/contexts/quo_preview/notifications/toast.cljs @@ -45,8 +45,8 @@ [] [toast-button "Toast: multiline" - {:icon :placeholder - :icon-color "green" + {:icon :placeholder + :icon-color "green" :text "This is an example multiline toast This is an example multiline toast This is an example multiline toast" :undo-duration 4 @@ -74,7 +74,7 @@ (when toast-opts [rn/view {:style {:margin-bottom 10}} [button/button - {:size 32 + {:size 32 :on-press #(rf/dispatch [:toasts/upsert diff --git a/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs b/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs index d668439b53..15c63d1795 100644 --- a/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs +++ b/src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs @@ -1,11 +1,11 @@ (ns status-im2.contexts.quo-preview.onboarding.small-option-card (:require - [quo.react-native :as rn] - [quo2.components.onboarding.small-option-card.view :as quo2] - [quo2.foundations.colors :as colors] - [reagent.core :as reagent] - [status-im.react-native.resources :as resources] - [status-im2.contexts.quo-preview.preview :as preview])) + [quo.react-native :as rn] + [quo2.components.onboarding.small-option-card.view :as quo2] + [quo2.foundations.colors :as colors] + [reagent.core :as reagent] + [status-im.react-native.resources :as resources] + [status-im2.contexts.quo-preview.preview :as preview])) (def descriptor [{:label "Variant" diff --git a/src/status_im2/contexts/quo_preview/profile/collectible.cljs b/src/status_im2/contexts/quo_preview/profile/collectible.cljs index 1b9dd4de5d..9bb8728a4f 100644 --- a/src/status_im2/contexts/quo_preview/profile/collectible.cljs +++ b/src/status_im2/contexts/quo_preview/profile/collectible.cljs @@ -1,9 +1,9 @@ (ns status-im2.contexts.quo-preview.profile.collectible (:require - [quo2.components.profile.collectible.view :as quo] - [react-native.core :as rn] - [reagent.core :as reagent] - [status-im2.contexts.quo-preview.preview :as preview])) + [quo2.components.profile.collectible.view :as quo] + [react-native.core :as rn] + [reagent.core :as reagent] + [status-im2.contexts.quo-preview.preview :as preview])) (defonce test-image (js/require "../resources/images/mock/collectible.png")) (def test-images (repeat 10 test-image)) @@ -24,10 +24,10 @@ (let [state (reagent/atom {:num-images 1 :shuffle-images false})] (fn [] (let [images-to-show (cond->> test-images - (:shuffle-images @state) - (shuffle) - :always - (take (:num-images @state)))] + (:shuffle-images @state) + (shuffle) + :always + (take (:num-images @state)))] [rn/view {:margin-bottom 50 :padding 16} diff --git a/src/status_im2/contexts/quo_preview/settings/privacy_option.cljs b/src/status_im2/contexts/quo_preview/settings/privacy_option.cljs index 9c78839d67..847b6638c4 100644 --- a/src/status_im2/contexts/quo_preview/settings/privacy_option.cljs +++ b/src/status_im2/contexts/quo_preview/settings/privacy_option.cljs @@ -80,12 +80,12 @@ "Group name and number of people is public"]}]] [rn/view {:margin-vertical 8} [quo/privacy-option - {:icon :i/world - :header "Sample card with very long text to test proper overflow behavior" - :on-select #(swap! state assoc :selected :overflow) - :on-toggle #(js/alert "card toggled") - :active? (= :overflow (:selected @state)) - :footer "This footer is exceedingly long to test the overflowing behavior of text in it" + {:icon :i/world + :header "Sample card with very long text to test proper overflow behavior" + :on-select #(swap! state assoc :selected :overflow) + :on-toggle #(js/alert "card toggled") + :active? (= :overflow (:selected @state)) + :footer "This footer is exceedingly long to test the overflowing behavior of text in it" :list-items ["A very, very very long text line that serves to test the overflow behavior of this component"]}]]]])))) diff --git a/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs b/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs index d67752c9a0..67e5616cf7 100644 --- a/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs +++ b/src/status_im2/contexts/quo_preview/switcher/switcher_cards.cljs @@ -71,9 +71,9 @@ {:label "Last Message" :key :last-message :type :text} - {:label "Customization" - :key :customization-color - :type :select + {:label "Customization" + :key :customization-color + :type :select :options (map (fn [c] diff --git a/src/status_im2/contexts/quo_preview/tags/context_tags.cljs b/src/status_im2/contexts/quo_preview/tags/context_tags.cljs index 26c1173d0f..fbbbfd8ad8 100644 --- a/src/status_im2/contexts/quo_preview/tags/context_tags.cljs +++ b/src/status_im2/contexts/quo_preview/tags/context_tags.cljs @@ -53,25 +53,25 @@ :channel-name "Channel" :type :group-avatar})] (fn [] - (let [contacts {example-pk {:public-key example-pk - :names {:three-words-name - "Automatic incompatible Coati"} - :photo example-photo} - example-pk2 {:public-key example-pk2 - :names {:three-words-name - "Clearcut Flickering Rattlesnake"} - :photo example-photo2}} + (let [contacts {example-pk {:public-key example-pk + :names {:three-words-name + "Automatic incompatible Coati"} + :photo example-photo} + example-pk2 {:public-key example-pk2 + :names {:three-words-name + "Clearcut Flickering Rattlesnake"} + :photo example-photo2}} contacts-public-keys (map (fn [{:keys [public-key]}] {:key public-key :value (multiaccounts/displayed-name (get contacts public-key))}) (vals contacts)) - current-username (if (seq (:contact @state)) - (->> @state - :contact - contacts - multiaccounts/displayed-name) - "Please select a user") + current-username (if (seq (:contact @state)) + (->> @state + :contact + contacts + multiaccounts/displayed-name) + "Please select a user") descriptor (cond (= (:type @state) :context-tag) (into main-descriptor context-tag-descriptor) diff --git a/src/status_im2/contexts/shell/animation.cljs b/src/status_im2/contexts/shell/animation.cljs index 743d545284..f0872af918 100644 --- a/src/status_im2/contexts/shell/animation.cljs +++ b/src/status_im2/contexts/shell/animation.cljs @@ -3,7 +3,7 @@ [utils.re-frame :as rf] [react-native.reanimated :as reanimated] [reagent.core :as reagent] - [status-im.async-storage.core :as async-storage] ;;TODO remove when not used anymore + [status-im.async-storage.core :as async-storage] ;;TODO remove when not used anymore [status-im2.contexts.shell.constants :as shell.constants])) ;; Atoms diff --git a/src/status_im2/contexts/shell/cards/view.cljs b/src/status_im2/contexts/shell/cards/view.cljs index 170f718621..716dc2889b 100644 --- a/src/status_im2/contexts/shell/cards/view.cljs +++ b/src/status_im2/contexts/shell/cards/view.cljs @@ -25,7 +25,7 @@ :size :small :override-theme :dark :label (i18n/label :t/kicked)}] - (:count :permission) [:<>] ;; Add components for these cases + (:count :permission) [:<>] ;; Add components for these cases nil) diff --git a/src/status_im2/core.cljs b/src/status_im2/core.cljs index a48ce06caf..cfd4c799ad 100644 --- a/src/status_im2/core.cljs +++ b/src/status_im2/core.cljs @@ -1,27 +1,27 @@ (ns status-im2.core (:require - [utils.i18n :as i18n] - [status-im2.setup.i18n-resources :as i18n-resources] - [re-frame.core :as re-frame] - [re-frame.interop :as interop] - [react-native.core :as rn] - [react-native.languages :as react-native-languages] - [react-native.platform :as platform] - [react-native.shake :as react-native-shake] - [reagent.impl.batching :as batching] - [status-im2.contexts.shell.animation :as animation] - [status-im2.config :as config] - [status-im2.setup.dev :as dev] - [status-im2.setup.global-error :as global-error] - [status-im2.common.log :as log] - [status-im.async-storage.core :as async-storage] - [status-im.native-module.core :as status] - [status-im.notifications.local :as notifications] - [status-im.utils.universal-links.core :as utils.universal-links] - status-im.events - status-im2.events - status-im2.navigation.core - status-im2.subs.root)) + [utils.i18n :as i18n] + [status-im2.setup.i18n-resources :as i18n-resources] + [re-frame.core :as re-frame] + [re-frame.interop :as interop] + [react-native.core :as rn] + [react-native.languages :as react-native-languages] + [react-native.platform :as platform] + [react-native.shake :as react-native-shake] + [reagent.impl.batching :as batching] + [status-im2.contexts.shell.animation :as animation] + [status-im2.config :as config] + [status-im2.setup.dev :as dev] + [status-im2.setup.global-error :as global-error] + [status-im2.common.log :as log] + [status-im.async-storage.core :as async-storage] + [status-im.native-module.core :as status] + [status-im.notifications.local :as notifications] + [status-im.utils.universal-links.core :as utils.universal-links] + status-im.events + status-im2.events + status-im2.navigation.core + status-im2.subs.root)) ;;;; re-frame RN setup (set! interop/next-tick js/setTimeout) diff --git a/src/status_im2/core_spec.cljs b/src/status_im2/core_spec.cljs index 72ce9fa911..2f61919037 100644 --- a/src/status_im2/core_spec.cljs +++ b/src/status_im2/core_spec.cljs @@ -1,3 +1,3 @@ (ns status-im2.core-spec (:require - [status-im2.contexts.communities.menus.community-options.component-spec])) + [status-im2.contexts.communities.menus.community-options.component-spec])) diff --git a/src/status_im2/navigation/core.cljs b/src/status_im2/navigation/core.cljs index 62e579324e..9dd53487d6 100644 --- a/src/status_im2/navigation/core.cljs +++ b/src/status_im2/navigation/core.cljs @@ -301,59 +301,59 @@ (re-frame/reg-fx :hide-select-acc-sheet (fn [] (dissmiss-overlay "select-acc-sheet"))) (defonce - _ - [(navigation/set-default-options {:layout {:orientation "portrait"}}) - (navigation/set-lazy-component-registrator reg-comp) - (navigation/reg-button-pressed-listener button-pressed-listener) - (navigation/reg-modal-dismissed-listener modal-dismissed-listener) - (navigation/reg-component-did-appear-listener component-did-appear-listener) - (navigation/reg-component-did-disappear-listener component-did-disappear-listener) - (navigation/reg-app-launched-listener app-launched-listener) + _ + [(navigation/set-default-options {:layout {:orientation "portrait"}}) + (navigation/set-lazy-component-registrator reg-comp) + (navigation/reg-button-pressed-listener button-pressed-listener) + (navigation/reg-modal-dismissed-listener modal-dismissed-listener) + (navigation/reg-component-did-appear-listener component-did-appear-listener) + (navigation/reg-component-did-disappear-listener component-did-disappear-listener) + (navigation/reg-app-launched-listener app-launched-listener) - (navigation/register-component - "popover" - (fn [] (gesture/gesture-handler-root-hoc views/popover-comp)) - (fn [] views/popover-comp)) + (navigation/register-component + "popover" + (fn [] (gesture/gesture-handler-root-hoc views/popover-comp)) + (fn [] views/popover-comp)) - (navigation/register-component - "toasts" - (fn [] views/toasts-comp) - js/undefined) + (navigation/register-component + "toasts" + (fn [] views/toasts-comp) + js/undefined) - (navigation/register-component - "visibility-status-popover" - (fn [] (gesture/gesture-handler-root-hoc views/visibility-status-popover-comp)) - (fn [] views/visibility-status-popover-comp)) + (navigation/register-component + "visibility-status-popover" + (fn [] (gesture/gesture-handler-root-hoc views/visibility-status-popover-comp)) + (fn [] views/visibility-status-popover-comp)) - (navigation/register-component - "bottom-sheet" - (fn [] (gesture/gesture-handler-root-hoc views/sheet-comp)) - (fn [] views/sheet-comp)) + (navigation/register-component + "bottom-sheet" + (fn [] (gesture/gesture-handler-root-hoc views/sheet-comp)) + (fn [] views/sheet-comp)) - (navigation/register-component - "wallet-connect-sheet" - (fn [] (gesture/gesture-handler-root-hoc views/wallet-connect-comp)) - (fn [] views/wallet-connect-comp)) + (navigation/register-component + "wallet-connect-sheet" + (fn [] (gesture/gesture-handler-root-hoc views/wallet-connect-comp)) + (fn [] views/wallet-connect-comp)) - (navigation/register-component - "wallet-connect-success-sheet" - (fn [] (gesture/gesture-handler-root-hoc views/wallet-connect-success-comp)) - (fn [] views/wallet-connect-success-comp)) + (navigation/register-component + "wallet-connect-success-sheet" + (fn [] (gesture/gesture-handler-root-hoc views/wallet-connect-success-comp)) + (fn [] views/wallet-connect-success-comp)) - (navigation/register-component - "wallet-connect-app-management-sheet" - (fn [] (gesture/gesture-handler-root-hoc views/wallet-connect-app-management-comp)) - (fn [] views/wallet-connect-app-management-comp)) + (navigation/register-component + "wallet-connect-app-management-sheet" + (fn [] (gesture/gesture-handler-root-hoc views/wallet-connect-app-management-comp)) + (fn [] views/wallet-connect-app-management-comp)) - (navigation/register-component - "signing-sheet" - (fn [] (gesture/gesture-handler-root-hoc views/signing-comp)) - (fn [] views/signing-comp)) + (navigation/register-component + "signing-sheet" + (fn [] (gesture/gesture-handler-root-hoc views/signing-comp)) + (fn [] views/signing-comp)) - (navigation/register-component - "select-acc-sheet" - (fn [] (gesture/gesture-handler-root-hoc views/select-acc-comp)) - (fn [] views/select-acc-comp))]) + (navigation/register-component + "select-acc-sheet" + (fn [] (gesture/gesture-handler-root-hoc views/select-acc-comp)) + (fn [] views/select-acc-comp))]) ;; NAVIGATION diff --git a/src/status_im2/setup/i18n_resources.cljs b/src/status_im2/setup/i18n_resources.cljs index cad97bcc9b..d1830c1540 100644 --- a/src/status_im2/setup/i18n_resources.cljs +++ b/src/status_im2/setup/i18n_resources.cljs @@ -10,8 +10,8 @@ :tr :vi :zh :zh_Hant :zh_TW}) (defonce loaded-languages - (atom - (conj #{:en} default-device-language))) + (atom + (conj #{:en} default-device-language))) (defn valid-language [lang] diff --git a/src/status_im2/subs/chat/messages_test.cljs b/src/status_im2/subs/chat/messages_test.cljs index f1f392fb79..374c224169 100644 --- a/src/status_im2/subs/chat/messages_test.cljs +++ b/src/status_im2/subs/chat/messages_test.cljs @@ -109,58 +109,60 @@ [sub-name] (testing "It sorts three messages with pinned-at property" (swap! rf-db/app-db assoc :pin-messages pinned-messages-state) - (is (= [{:chat-id :0xChat - :message-id :0x1 - :pinned-at 1000 - :pinned-by :test-user - :pinned true - :deleted? nil - :deleted-for-me? nil - :deleted-by nil} - {:chat-id :0xChat - :message-id :0x2 - :pinned-at 2000 - :pinned-by :test-user - :pinned true - :deleted? nil - :deleted-for-me? nil - :deleted-by nil} - {:chat-id :0xChat - :message-id :0x3 - :pinned-at 3000 - :pinned-by :test-user - :pinned true - :deleted? nil - :deleted-for-me? nil - :deleted-by nil}] - (rf/sub [sub-name :0xChat])))) + (is + (= [{:chat-id :0xChat + :message-id :0x1 + :pinned-at 1000 + :pinned-by :test-user + :pinned true + :deleted? nil + :deleted-for-me? nil + :deleted-by nil} + {:chat-id :0xChat + :message-id :0x2 + :pinned-at 2000 + :pinned-by :test-user + :pinned true + :deleted? nil + :deleted-for-me? nil + :deleted-by nil} + {:chat-id :0xChat + :message-id :0x3 + :pinned-at 3000 + :pinned-by :test-user + :pinned true + :deleted? nil + :deleted-for-me? nil + :deleted-by nil}] + (rf/sub [sub-name :0xChat])))) (testing "It sorts messages from backend with pinned-at property and 1 new local pinned message" (swap! rf-db/app-db assoc :pin-messages pinned-messages-state-with-1-new-local-message) - (is (= [{:chat-id :0xChat - :message-id :0x1 - :pinned-at 2000 - :pinned-by :test-user - :pinned true - :deleted? nil - :deleted-for-me? nil - :deleted-by nil} - {:chat-id :0xChat - :message-id :0x2 - :pinned-at 3000 - :pinned-by :test-user - :pinned true - :deleted? nil - :deleted-for-me? nil - :deleted-by nil} - {:chat-id :0xChat - :message-id :0x3 - :pinned-at nil - :pinned-by :test-user - :pinned true - :deleted? nil - :deleted-for-me? nil - :deleted-by nil}] - (rf/sub [sub-name :0xChat])))) + (is + (= [{:chat-id :0xChat + :message-id :0x1 + :pinned-at 2000 + :pinned-by :test-user + :pinned true + :deleted? nil + :deleted-for-me? nil + :deleted-by nil} + {:chat-id :0xChat + :message-id :0x2 + :pinned-at 3000 + :pinned-by :test-user + :pinned true + :deleted? nil + :deleted-for-me? nil + :deleted-by nil} + {:chat-id :0xChat + :message-id :0x3 + :pinned-at nil + :pinned-by :test-user + :pinned true + :deleted? nil + :deleted-for-me? nil + :deleted-by nil}] + (rf/sub [sub-name :0xChat])))) (testing "It sorts messages from backend with pinned-at property and 2 new local pinned messages" (swap! rf-db/app-db assoc :pin-messages pinned-messages-state-with-2-new-local-messages) (is diff --git a/src/status_im2/subs/communities.cljs b/src/status_im2/subs/communities.cljs index 626bd22cc4..eec310ed35 100644 --- a/src/status_im2/subs/communities.cljs +++ b/src/status_im2/subs/communities.cljs @@ -195,10 +195,10 @@ :<- [:communities/requests-to-join] (fn [requests [_ community-id]] (->> - (get requests community-id {}) - vals - (filter (fn [{:keys [state]}] - (= state constants/request-to-join-pending-state)))))) + (get requests community-id {}) + vals + (filter (fn [{:keys [state]}] + (= state constants/request-to-join-pending-state)))))) (re-frame/reg-sub :community/categories diff --git a/src/status_im2/subs/multiaccount.cljs b/src/status_im2/subs/multiaccount.cljs index 85fb40ff37..b042222f43 100644 --- a/src/status_im2/subs/multiaccount.cljs +++ b/src/status_im2/subs/multiaccount.cljs @@ -21,10 +21,10 @@ :<- [:multiaccount] (fn [current-account] (some-> - current-account - (select-keys [:name :preferred-name :public-key :identicon :image :images]) - (set/rename-keys {:name :alias}) - (multiaccounts/contact-with-names)))) + current-account + (select-keys [:name :preferred-name :public-key :identicon :image :images]) + (set/rename-keys {:name :alias}) + (multiaccounts/contact-with-names)))) (re-frame/reg-sub :multiaccount/preferred-name @@ -194,9 +194,9 @@ :<- [:multiaccount/resetting-password?] (fn [[form-vals errors resetting?]] (let [{:keys [current-password new-password confirm-new-password]} form-vals] - {:form-vals form-vals - :errors errors - :resetting? resetting? + {:form-vals form-vals + :errors errors + :resetting? resetting? :next-enabled? (and (pos? (count current-password)) (pos? (count new-password)) diff --git a/src/status_im2/subs/root.cljs b/src/status_im2/subs/root.cljs index 9e2457ca59..56c90055c3 100644 --- a/src/status_im2/subs/root.cljs +++ b/src/status_im2/subs/root.cljs @@ -1,29 +1,29 @@ (ns status-im2.subs.root (:require - [re-frame.core :as re-frame] - status-im2.subs.activity-center - status-im2.subs.bootnodes - status-im2.subs.browser - status-im2.subs.chat.chats - status-im2.subs.chat.messages - status-im2.subs.communities - status-im2.subs.contact - status-im2.subs.ens - status-im2.subs.general - status-im2.subs.home - status-im2.subs.keycard - status-im2.subs.mailservers - status-im2.subs.multiaccount - status-im2.subs.networks - status-im2.subs.onboarding - status-im2.subs.pairing - status-im2.subs.search - status-im2.subs.shell - status-im2.subs.stickers - status-im2.subs.toasts - status-im2.subs.wallet.signing - status-im2.subs.wallet.transactions - status-im2.subs.wallet.wallet)) + [re-frame.core :as re-frame] + status-im2.subs.activity-center + status-im2.subs.bootnodes + status-im2.subs.browser + status-im2.subs.chat.chats + status-im2.subs.chat.messages + status-im2.subs.communities + status-im2.subs.contact + status-im2.subs.ens + status-im2.subs.general + status-im2.subs.home + status-im2.subs.keycard + status-im2.subs.mailservers + status-im2.subs.multiaccount + status-im2.subs.networks + status-im2.subs.onboarding + status-im2.subs.pairing + status-im2.subs.search + status-im2.subs.shell + status-im2.subs.stickers + status-im2.subs.toasts + status-im2.subs.wallet.signing + status-im2.subs.wallet.transactions + status-im2.subs.wallet.wallet)) (defn reg-root-key-sub [sub-name db-key] diff --git a/src/status_im2/subs/subs_test.cljs b/src/status_im2/subs/subs_test.cljs index 1886d94ef8..e2ba2975d5 100644 --- a/src/status_im2/subs/subs_test.cljs +++ b/src/status_im2/subs/subs_test.cljs @@ -10,11 +10,11 @@ (def grouped-transactions '({:title "20 Sep" - :key :20170920 + :key :20170920 :data ({:timestamp "1505912551000"})} {:title "18 Sep" - :key :20170918 + :key :20170918 :data ({:timestamp "1505764322000"} {:timestamp "1505750000000"})})) @@ -27,7 +27,7 @@ (deftest login-ma-keycard-pairing (testing "returns nil when no :multiaccounts/login" (let [res (onboarding/login-ma-keycard-pairing - {:multiaccounts/login nil + {:multiaccounts/login nil :multiaccounts/multiaccounts {"0x1" {:keycard-pairing "keycard-pairing-code"}}} {})] @@ -35,7 +35,7 @@ (testing "returns :keycard-pairing when :multiaccounts/login is present" (let [res (onboarding/login-ma-keycard-pairing - {:multiaccounts/login {:key-uid "0x1"} + {:multiaccounts/login {:key-uid "0x1"} :multiaccounts/multiaccounts {"0x1" {:keycard-pairing "keycard-pairing-code"}}} {})] diff --git a/src/status_im2/subs/wallet/signing.cljs b/src/status_im2/subs/wallet/signing.cljs index 022f14b73d..637885c2cf 100644 --- a/src/status_im2/subs/wallet/signing.cljs +++ b/src/status_im2/subs/wallet/signing.cljs @@ -128,7 +128,7 @@ (too-precise-amount? normalized-amount decimals) {:amount-error (i18n/label :t/validation-amount-is-too-precise {:decimals decimals})} - :else nil)))) + :else nil)))) (defn get-sufficient-funds-error [balance symbol amount] @@ -188,10 +188,10 @@ :<- [:current-network] (fn [[{:keys [symbol from to amount-text] :as transaction} wallet offline? all-tokens current-network]] - (let [balance (get-in wallet [:accounts (:address from) :balance]) - {:keys [decimals] :as token} (tokens/asset-for all-tokens current-network symbol) - {:keys [value error]} (wallet.db/parse-amount amount-text decimals) - amount (money/formatted->internal value symbol decimals) + (let [balance (get-in wallet [:accounts (:address from) :balance]) + {:keys [decimals] :as token} (tokens/asset-for all-tokens current-network symbol) + {:keys [value error]} (wallet.db/parse-amount amount-text decimals) + amount (money/formatted->internal value symbol decimals) {:keys [amount-error] :as transaction-new} (merge transaction {:amount-error error} @@ -215,10 +215,10 @@ :<- [:current-network] (fn [[{:keys [symbol from to amount-text] :as transaction} wallet offline? all-tokens current-network]] - (let [balance (get-in wallet [:accounts (:address from) :balance]) - {:keys [decimals] :as token} (tokens/asset-for all-tokens current-network symbol) - {:keys [value error]} (wallet.db/parse-amount amount-text decimals) - amount (money/formatted->internal value symbol decimals) + (let [balance (get-in wallet [:accounts (:address from) :balance]) + {:keys [decimals] :as token} (tokens/asset-for all-tokens current-network symbol) + {:keys [value error]} (wallet.db/parse-amount amount-text decimals) + amount (money/formatted->internal value symbol decimals) {:keys [amount-error] :as transaction-new} (assoc transaction :amount-error error)] (assoc transaction-new diff --git a/src/status_im2/subs/wallet/transactions.cljs b/src/status_im2/subs/wallet/transactions.cljs index 760087e72a..d9b70fd723 100644 --- a/src/status_im2/subs/wallet/transactions.cljs +++ b/src/status_im2/subs/wallet/transactions.cljs @@ -42,16 +42,16 @@ (if (= type :inbound) [from :from-contact :to-wallet] [to :to-contact :from-wallet]) - wallet (i18n/label :main-wallet) - contact (get contacts contact-address) + wallet (i18n/label :main-wallet) + contact (get contacts contact-address) {:keys [symbol-display symbol decimals] :as asset} (or token native-currency) - amount-text (if value - (wallet.utils/format-amount value decimals) - "...") - currency-text (when asset - (clojure.core/name (or symbol-display - symbol)))] + amount-text (if value + (wallet.utils/format-amount value decimals) + "...") + currency-text (when asset + (clojure.core/name (or symbol-display + symbol)))] (cond-> transaction contact (assoc key-contact (:name contact)) :always (assoc key-wallet @@ -155,8 +155,8 @@ (re-frame/subscribe [:wallet/filters]) (re-frame/subscribe [:wallet.transactions/all-filters?])]) (fn [[transactions filters all-filters?] [_ address]] - {:all-filters? all-filters? - :total (count transactions) + {:all-filters? all-filters? + :total (count transactions) :transaction-history-sections (->> transactions vals @@ -230,7 +230,7 @@ (let [confirmations (wallet.db/get-confirmations transaction current-block)] (assoc transaction - :confirmations confirmations + :confirmations confirmations :confirmations-progress (if (>= confirmations transactions/confirmations-count-threshold) 100 diff --git a/src/utils/i18n_goog.cljs b/src/utils/i18n_goog.cljs index 6e4485fc4a..2d69e66f42 100644 --- a/src/utils/i18n_goog.cljs +++ b/src/utils/i18n_goog.cljs @@ -1,244 +1,244 @@ (ns utils.i18n-goog (:require - [clojure.string :as string] - goog.i18n.CompactNumberFormatSymbols - goog.i18n.CompactNumberFormatSymbols_af - goog.i18n.CompactNumberFormatSymbols_am - goog.i18n.CompactNumberFormatSymbols_ar - goog.i18n.CompactNumberFormatSymbols_ar_DZ - goog.i18n.CompactNumberFormatSymbols_ar_EG - goog.i18n.CompactNumberFormatSymbols_az - goog.i18n.CompactNumberFormatSymbols_be - goog.i18n.CompactNumberFormatSymbols_bg - goog.i18n.CompactNumberFormatSymbols_bn - goog.i18n.CompactNumberFormatSymbols_br - goog.i18n.CompactNumberFormatSymbols_bs - goog.i18n.CompactNumberFormatSymbols_ca - goog.i18n.CompactNumberFormatSymbols_chr - goog.i18n.CompactNumberFormatSymbols_cs - goog.i18n.CompactNumberFormatSymbols_cy - goog.i18n.CompactNumberFormatSymbols_da - goog.i18n.CompactNumberFormatSymbols_de - goog.i18n.CompactNumberFormatSymbols_de_AT - goog.i18n.CompactNumberFormatSymbols_de_CH - goog.i18n.CompactNumberFormatSymbols_el - goog.i18n.CompactNumberFormatSymbols_en - goog.i18n.CompactNumberFormatSymbols_en_AU - goog.i18n.CompactNumberFormatSymbols_en_CA - goog.i18n.CompactNumberFormatSymbols_en_GB - goog.i18n.CompactNumberFormatSymbols_en_IE - goog.i18n.CompactNumberFormatSymbols_en_IN - goog.i18n.CompactNumberFormatSymbols_en_SG - goog.i18n.CompactNumberFormatSymbols_en_US - goog.i18n.CompactNumberFormatSymbols_en_ZA - goog.i18n.CompactNumberFormatSymbols_es - goog.i18n.CompactNumberFormatSymbols_es_419 - goog.i18n.CompactNumberFormatSymbols_es_ES - goog.i18n.CompactNumberFormatSymbols_es_MX - goog.i18n.CompactNumberFormatSymbols_es_US - goog.i18n.CompactNumberFormatSymbols_et - goog.i18n.CompactNumberFormatSymbols_eu - goog.i18n.CompactNumberFormatSymbols_fa - goog.i18n.CompactNumberFormatSymbols_fi - goog.i18n.CompactNumberFormatSymbols_fil - goog.i18n.CompactNumberFormatSymbols_fr - goog.i18n.CompactNumberFormatSymbols_fr_CA - goog.i18n.CompactNumberFormatSymbols_ga - goog.i18n.CompactNumberFormatSymbols_gl - goog.i18n.CompactNumberFormatSymbols_gsw - goog.i18n.CompactNumberFormatSymbols_gu - goog.i18n.CompactNumberFormatSymbols_haw - goog.i18n.CompactNumberFormatSymbols_he - goog.i18n.CompactNumberFormatSymbols_hi - goog.i18n.CompactNumberFormatSymbols_hr - goog.i18n.CompactNumberFormatSymbols_hu - goog.i18n.CompactNumberFormatSymbols_hy - goog.i18n.CompactNumberFormatSymbols_id - goog.i18n.CompactNumberFormatSymbols_in - goog.i18n.CompactNumberFormatSymbols_is - goog.i18n.CompactNumberFormatSymbols_it - goog.i18n.CompactNumberFormatSymbols_iw - goog.i18n.CompactNumberFormatSymbols_ja - goog.i18n.CompactNumberFormatSymbols_ka - goog.i18n.CompactNumberFormatSymbols_kk - goog.i18n.CompactNumberFormatSymbols_km - goog.i18n.CompactNumberFormatSymbols_kn - goog.i18n.CompactNumberFormatSymbols_ko - goog.i18n.CompactNumberFormatSymbols_ky - goog.i18n.CompactNumberFormatSymbols_ln - goog.i18n.CompactNumberFormatSymbols_lo - goog.i18n.CompactNumberFormatSymbols_lt - goog.i18n.CompactNumberFormatSymbols_lv - goog.i18n.CompactNumberFormatSymbols_mk - goog.i18n.CompactNumberFormatSymbols_ml - goog.i18n.CompactNumberFormatSymbols_mn - goog.i18n.CompactNumberFormatSymbols_mo - goog.i18n.CompactNumberFormatSymbols_mr - goog.i18n.CompactNumberFormatSymbols_ms - goog.i18n.CompactNumberFormatSymbols_mt - goog.i18n.CompactNumberFormatSymbols_my - goog.i18n.CompactNumberFormatSymbols_nb - goog.i18n.CompactNumberFormatSymbols_ne - goog.i18n.CompactNumberFormatSymbols_nl - goog.i18n.CompactNumberFormatSymbols_no - goog.i18n.CompactNumberFormatSymbols_no_NO - goog.i18n.CompactNumberFormatSymbols_or - goog.i18n.CompactNumberFormatSymbols_pa - goog.i18n.CompactNumberFormatSymbols_pl - goog.i18n.CompactNumberFormatSymbols_pt - goog.i18n.CompactNumberFormatSymbols_pt_BR - goog.i18n.CompactNumberFormatSymbols_pt_PT - goog.i18n.CompactNumberFormatSymbols_ro - goog.i18n.CompactNumberFormatSymbols_ru - goog.i18n.CompactNumberFormatSymbols_sh - goog.i18n.CompactNumberFormatSymbols_si - goog.i18n.CompactNumberFormatSymbols_sk - goog.i18n.CompactNumberFormatSymbols_sl - goog.i18n.CompactNumberFormatSymbols_sq - goog.i18n.CompactNumberFormatSymbols_sr - goog.i18n.CompactNumberFormatSymbols_sr_Latn - goog.i18n.CompactNumberFormatSymbols_sv - goog.i18n.CompactNumberFormatSymbols_sw - goog.i18n.CompactNumberFormatSymbols_ta - goog.i18n.CompactNumberFormatSymbols_te - goog.i18n.CompactNumberFormatSymbols_th - goog.i18n.CompactNumberFormatSymbols_tl - goog.i18n.CompactNumberFormatSymbols_tr - goog.i18n.CompactNumberFormatSymbols_uk - goog.i18n.CompactNumberFormatSymbols_ur - goog.i18n.CompactNumberFormatSymbols_uz - goog.i18n.CompactNumberFormatSymbols_vi - goog.i18n.CompactNumberFormatSymbols_zh - goog.i18n.CompactNumberFormatSymbols_zh_CN - goog.i18n.CompactNumberFormatSymbols_zh_HK - goog.i18n.CompactNumberFormatSymbols_zh_TW - goog.i18n.CompactNumberFormatSymbols_zu - goog.i18n.currency - goog.i18n.currency.CurrencyInfo - goog.i18n.currency.CurrencyInfoTier2 - goog.i18n.DateTimeFormat - goog.i18n.DateTimeFormat.Format - goog.i18n.DateTimeSymbols - goog.i18n.DateTimeSymbols_af - goog.i18n.DateTimeSymbols_am - goog.i18n.DateTimeSymbols_ar - goog.i18n.DateTimeSymbols_ar_DZ - goog.i18n.DateTimeSymbols_ar_EG - goog.i18n.DateTimeSymbols_az - goog.i18n.DateTimeSymbols_be - goog.i18n.DateTimeSymbols_bg - goog.i18n.DateTimeSymbols_bn - goog.i18n.DateTimeSymbols_br - goog.i18n.DateTimeSymbols_bs - goog.i18n.DateTimeSymbols_ca - goog.i18n.DateTimeSymbols_chr - goog.i18n.DateTimeSymbols_cs - goog.i18n.DateTimeSymbols_cy - goog.i18n.DateTimeSymbols_da - goog.i18n.DateTimeSymbols_de - goog.i18n.DateTimeSymbols_de_AT - goog.i18n.DateTimeSymbols_de_CH - goog.i18n.DateTimeSymbols_el - goog.i18n.DateTimeSymbols_en - goog.i18n.DateTimeSymbols_en_AU - goog.i18n.DateTimeSymbols_en_CA - goog.i18n.DateTimeSymbols_en_GB - goog.i18n.DateTimeSymbols_en_IE - goog.i18n.DateTimeSymbols_en_IN - goog.i18n.DateTimeSymbols_en_ISO - goog.i18n.DateTimeSymbols_en_SG - goog.i18n.DateTimeSymbols_en_US - goog.i18n.DateTimeSymbols_en_ZA - goog.i18n.DateTimeSymbols_es - goog.i18n.DateTimeSymbols_es_419 - goog.i18n.DateTimeSymbols_es_ES - goog.i18n.DateTimeSymbols_es_MX - goog.i18n.DateTimeSymbols_es_US - goog.i18n.DateTimeSymbols_et - goog.i18n.DateTimeSymbols_eu - goog.i18n.DateTimeSymbols_fa - goog.i18n.DateTimeSymbols_fi - goog.i18n.DateTimeSymbols_fil - goog.i18n.DateTimeSymbols_fr - goog.i18n.DateTimeSymbols_fr_CA - goog.i18n.DateTimeSymbols_ga - goog.i18n.DateTimeSymbols_gl - goog.i18n.DateTimeSymbols_gsw - goog.i18n.DateTimeSymbols_gu - goog.i18n.DateTimeSymbols_haw - goog.i18n.DateTimeSymbols_he - goog.i18n.DateTimeSymbols_hi - goog.i18n.DateTimeSymbols_hr - goog.i18n.DateTimeSymbols_hu - goog.i18n.DateTimeSymbols_hy - goog.i18n.DateTimeSymbols_id - goog.i18n.DateTimeSymbols_in - goog.i18n.DateTimeSymbols_is - goog.i18n.DateTimeSymbols_it - goog.i18n.DateTimeSymbols_iw - goog.i18n.DateTimeSymbols_ja - goog.i18n.DateTimeSymbols_ka - goog.i18n.DateTimeSymbols_kk - goog.i18n.DateTimeSymbols_km - goog.i18n.DateTimeSymbols_kn - goog.i18n.DateTimeSymbols_ko - goog.i18n.DateTimeSymbols_ky - goog.i18n.DateTimeSymbols_ln - goog.i18n.DateTimeSymbols_lo - goog.i18n.DateTimeSymbols_lt - goog.i18n.DateTimeSymbols_lv - goog.i18n.DateTimeSymbols_mk - goog.i18n.DateTimeSymbols_ml - goog.i18n.DateTimeSymbols_mn - goog.i18n.DateTimeSymbols_mo - goog.i18n.DateTimeSymbols_mr - goog.i18n.DateTimeSymbols_ms - goog.i18n.DateTimeSymbols_mt - goog.i18n.DateTimeSymbols_my - goog.i18n.DateTimeSymbols_nb - goog.i18n.DateTimeSymbols_ne - goog.i18n.DateTimeSymbols_nl - goog.i18n.DateTimeSymbols_no - goog.i18n.DateTimeSymbols_no_NO - goog.i18n.DateTimeSymbols_or - goog.i18n.DateTimeSymbols_pa - goog.i18n.DateTimeSymbols_pl - goog.i18n.DateTimeSymbols_pt - goog.i18n.DateTimeSymbols_pt_BR - goog.i18n.DateTimeSymbols_pt_PT - goog.i18n.DateTimeSymbols_ro - goog.i18n.DateTimeSymbols_ru - goog.i18n.DateTimeSymbols_sh - goog.i18n.DateTimeSymbols_si - goog.i18n.DateTimeSymbols_sk - goog.i18n.DateTimeSymbols_sl - goog.i18n.DateTimeSymbols_sq - goog.i18n.DateTimeSymbols_sr - goog.i18n.DateTimeSymbols_sr_Latn - goog.i18n.DateTimeSymbols_sv - goog.i18n.DateTimeSymbols_sw - goog.i18n.DateTimeSymbols_ta - goog.i18n.DateTimeSymbols_te - goog.i18n.DateTimeSymbols_th - goog.i18n.DateTimeSymbols_tl - goog.i18n.DateTimeSymbols_tr - goog.i18n.DateTimeSymbols_uk - goog.i18n.DateTimeSymbols_ur - goog.i18n.DateTimeSymbols_uz - goog.i18n.DateTimeSymbols_vi - goog.i18n.DateTimeSymbols_zh - goog.i18n.DateTimeSymbols_zh_CN - goog.i18n.DateTimeSymbols_zh_HK - goog.i18n.DateTimeSymbols_zh_TW - goog.i18n.DateTimeSymbols_zu - goog.i18n.DateTimeSymbolsType - goog.i18n.MessageFormat - goog.i18n.NumberFormat - goog.i18n.NumberFormat.CurrencyStyle - goog.i18n.NumberFormat.Format - goog.i18n.ordinalRules - goog.i18n.pluralRules - goog.i18n.TimeZone)) + [clojure.string :as string] + goog.i18n.CompactNumberFormatSymbols + goog.i18n.CompactNumberFormatSymbols_af + goog.i18n.CompactNumberFormatSymbols_am + goog.i18n.CompactNumberFormatSymbols_ar + goog.i18n.CompactNumberFormatSymbols_ar_DZ + goog.i18n.CompactNumberFormatSymbols_ar_EG + goog.i18n.CompactNumberFormatSymbols_az + goog.i18n.CompactNumberFormatSymbols_be + goog.i18n.CompactNumberFormatSymbols_bg + goog.i18n.CompactNumberFormatSymbols_bn + goog.i18n.CompactNumberFormatSymbols_br + goog.i18n.CompactNumberFormatSymbols_bs + goog.i18n.CompactNumberFormatSymbols_ca + goog.i18n.CompactNumberFormatSymbols_chr + goog.i18n.CompactNumberFormatSymbols_cs + goog.i18n.CompactNumberFormatSymbols_cy + goog.i18n.CompactNumberFormatSymbols_da + goog.i18n.CompactNumberFormatSymbols_de + goog.i18n.CompactNumberFormatSymbols_de_AT + goog.i18n.CompactNumberFormatSymbols_de_CH + goog.i18n.CompactNumberFormatSymbols_el + goog.i18n.CompactNumberFormatSymbols_en + goog.i18n.CompactNumberFormatSymbols_en_AU + goog.i18n.CompactNumberFormatSymbols_en_CA + goog.i18n.CompactNumberFormatSymbols_en_GB + goog.i18n.CompactNumberFormatSymbols_en_IE + goog.i18n.CompactNumberFormatSymbols_en_IN + goog.i18n.CompactNumberFormatSymbols_en_SG + goog.i18n.CompactNumberFormatSymbols_en_US + goog.i18n.CompactNumberFormatSymbols_en_ZA + goog.i18n.CompactNumberFormatSymbols_es + goog.i18n.CompactNumberFormatSymbols_es_419 + goog.i18n.CompactNumberFormatSymbols_es_ES + goog.i18n.CompactNumberFormatSymbols_es_MX + goog.i18n.CompactNumberFormatSymbols_es_US + goog.i18n.CompactNumberFormatSymbols_et + goog.i18n.CompactNumberFormatSymbols_eu + goog.i18n.CompactNumberFormatSymbols_fa + goog.i18n.CompactNumberFormatSymbols_fi + goog.i18n.CompactNumberFormatSymbols_fil + goog.i18n.CompactNumberFormatSymbols_fr + goog.i18n.CompactNumberFormatSymbols_fr_CA + goog.i18n.CompactNumberFormatSymbols_ga + goog.i18n.CompactNumberFormatSymbols_gl + goog.i18n.CompactNumberFormatSymbols_gsw + goog.i18n.CompactNumberFormatSymbols_gu + goog.i18n.CompactNumberFormatSymbols_haw + goog.i18n.CompactNumberFormatSymbols_he + goog.i18n.CompactNumberFormatSymbols_hi + goog.i18n.CompactNumberFormatSymbols_hr + goog.i18n.CompactNumberFormatSymbols_hu + goog.i18n.CompactNumberFormatSymbols_hy + goog.i18n.CompactNumberFormatSymbols_id + goog.i18n.CompactNumberFormatSymbols_in + goog.i18n.CompactNumberFormatSymbols_is + goog.i18n.CompactNumberFormatSymbols_it + goog.i18n.CompactNumberFormatSymbols_iw + goog.i18n.CompactNumberFormatSymbols_ja + goog.i18n.CompactNumberFormatSymbols_ka + goog.i18n.CompactNumberFormatSymbols_kk + goog.i18n.CompactNumberFormatSymbols_km + goog.i18n.CompactNumberFormatSymbols_kn + goog.i18n.CompactNumberFormatSymbols_ko + goog.i18n.CompactNumberFormatSymbols_ky + goog.i18n.CompactNumberFormatSymbols_ln + goog.i18n.CompactNumberFormatSymbols_lo + goog.i18n.CompactNumberFormatSymbols_lt + goog.i18n.CompactNumberFormatSymbols_lv + goog.i18n.CompactNumberFormatSymbols_mk + goog.i18n.CompactNumberFormatSymbols_ml + goog.i18n.CompactNumberFormatSymbols_mn + goog.i18n.CompactNumberFormatSymbols_mo + goog.i18n.CompactNumberFormatSymbols_mr + goog.i18n.CompactNumberFormatSymbols_ms + goog.i18n.CompactNumberFormatSymbols_mt + goog.i18n.CompactNumberFormatSymbols_my + goog.i18n.CompactNumberFormatSymbols_nb + goog.i18n.CompactNumberFormatSymbols_ne + goog.i18n.CompactNumberFormatSymbols_nl + goog.i18n.CompactNumberFormatSymbols_no + goog.i18n.CompactNumberFormatSymbols_no_NO + goog.i18n.CompactNumberFormatSymbols_or + goog.i18n.CompactNumberFormatSymbols_pa + goog.i18n.CompactNumberFormatSymbols_pl + goog.i18n.CompactNumberFormatSymbols_pt + goog.i18n.CompactNumberFormatSymbols_pt_BR + goog.i18n.CompactNumberFormatSymbols_pt_PT + goog.i18n.CompactNumberFormatSymbols_ro + goog.i18n.CompactNumberFormatSymbols_ru + goog.i18n.CompactNumberFormatSymbols_sh + goog.i18n.CompactNumberFormatSymbols_si + goog.i18n.CompactNumberFormatSymbols_sk + goog.i18n.CompactNumberFormatSymbols_sl + goog.i18n.CompactNumberFormatSymbols_sq + goog.i18n.CompactNumberFormatSymbols_sr + goog.i18n.CompactNumberFormatSymbols_sr_Latn + goog.i18n.CompactNumberFormatSymbols_sv + goog.i18n.CompactNumberFormatSymbols_sw + goog.i18n.CompactNumberFormatSymbols_ta + goog.i18n.CompactNumberFormatSymbols_te + goog.i18n.CompactNumberFormatSymbols_th + goog.i18n.CompactNumberFormatSymbols_tl + goog.i18n.CompactNumberFormatSymbols_tr + goog.i18n.CompactNumberFormatSymbols_uk + goog.i18n.CompactNumberFormatSymbols_ur + goog.i18n.CompactNumberFormatSymbols_uz + goog.i18n.CompactNumberFormatSymbols_vi + goog.i18n.CompactNumberFormatSymbols_zh + goog.i18n.CompactNumberFormatSymbols_zh_CN + goog.i18n.CompactNumberFormatSymbols_zh_HK + goog.i18n.CompactNumberFormatSymbols_zh_TW + goog.i18n.CompactNumberFormatSymbols_zu + goog.i18n.currency + goog.i18n.currency.CurrencyInfo + goog.i18n.currency.CurrencyInfoTier2 + goog.i18n.DateTimeFormat + goog.i18n.DateTimeFormat.Format + goog.i18n.DateTimeSymbols + goog.i18n.DateTimeSymbols_af + goog.i18n.DateTimeSymbols_am + goog.i18n.DateTimeSymbols_ar + goog.i18n.DateTimeSymbols_ar_DZ + goog.i18n.DateTimeSymbols_ar_EG + goog.i18n.DateTimeSymbols_az + goog.i18n.DateTimeSymbols_be + goog.i18n.DateTimeSymbols_bg + goog.i18n.DateTimeSymbols_bn + goog.i18n.DateTimeSymbols_br + goog.i18n.DateTimeSymbols_bs + goog.i18n.DateTimeSymbols_ca + goog.i18n.DateTimeSymbols_chr + goog.i18n.DateTimeSymbols_cs + goog.i18n.DateTimeSymbols_cy + goog.i18n.DateTimeSymbols_da + goog.i18n.DateTimeSymbols_de + goog.i18n.DateTimeSymbols_de_AT + goog.i18n.DateTimeSymbols_de_CH + goog.i18n.DateTimeSymbols_el + goog.i18n.DateTimeSymbols_en + goog.i18n.DateTimeSymbols_en_AU + goog.i18n.DateTimeSymbols_en_CA + goog.i18n.DateTimeSymbols_en_GB + goog.i18n.DateTimeSymbols_en_IE + goog.i18n.DateTimeSymbols_en_IN + goog.i18n.DateTimeSymbols_en_ISO + goog.i18n.DateTimeSymbols_en_SG + goog.i18n.DateTimeSymbols_en_US + goog.i18n.DateTimeSymbols_en_ZA + goog.i18n.DateTimeSymbols_es + goog.i18n.DateTimeSymbols_es_419 + goog.i18n.DateTimeSymbols_es_ES + goog.i18n.DateTimeSymbols_es_MX + goog.i18n.DateTimeSymbols_es_US + goog.i18n.DateTimeSymbols_et + goog.i18n.DateTimeSymbols_eu + goog.i18n.DateTimeSymbols_fa + goog.i18n.DateTimeSymbols_fi + goog.i18n.DateTimeSymbols_fil + goog.i18n.DateTimeSymbols_fr + goog.i18n.DateTimeSymbols_fr_CA + goog.i18n.DateTimeSymbols_ga + goog.i18n.DateTimeSymbols_gl + goog.i18n.DateTimeSymbols_gsw + goog.i18n.DateTimeSymbols_gu + goog.i18n.DateTimeSymbols_haw + goog.i18n.DateTimeSymbols_he + goog.i18n.DateTimeSymbols_hi + goog.i18n.DateTimeSymbols_hr + goog.i18n.DateTimeSymbols_hu + goog.i18n.DateTimeSymbols_hy + goog.i18n.DateTimeSymbols_id + goog.i18n.DateTimeSymbols_in + goog.i18n.DateTimeSymbols_is + goog.i18n.DateTimeSymbols_it + goog.i18n.DateTimeSymbols_iw + goog.i18n.DateTimeSymbols_ja + goog.i18n.DateTimeSymbols_ka + goog.i18n.DateTimeSymbols_kk + goog.i18n.DateTimeSymbols_km + goog.i18n.DateTimeSymbols_kn + goog.i18n.DateTimeSymbols_ko + goog.i18n.DateTimeSymbols_ky + goog.i18n.DateTimeSymbols_ln + goog.i18n.DateTimeSymbols_lo + goog.i18n.DateTimeSymbols_lt + goog.i18n.DateTimeSymbols_lv + goog.i18n.DateTimeSymbols_mk + goog.i18n.DateTimeSymbols_ml + goog.i18n.DateTimeSymbols_mn + goog.i18n.DateTimeSymbols_mo + goog.i18n.DateTimeSymbols_mr + goog.i18n.DateTimeSymbols_ms + goog.i18n.DateTimeSymbols_mt + goog.i18n.DateTimeSymbols_my + goog.i18n.DateTimeSymbols_nb + goog.i18n.DateTimeSymbols_ne + goog.i18n.DateTimeSymbols_nl + goog.i18n.DateTimeSymbols_no + goog.i18n.DateTimeSymbols_no_NO + goog.i18n.DateTimeSymbols_or + goog.i18n.DateTimeSymbols_pa + goog.i18n.DateTimeSymbols_pl + goog.i18n.DateTimeSymbols_pt + goog.i18n.DateTimeSymbols_pt_BR + goog.i18n.DateTimeSymbols_pt_PT + goog.i18n.DateTimeSymbols_ro + goog.i18n.DateTimeSymbols_ru + goog.i18n.DateTimeSymbols_sh + goog.i18n.DateTimeSymbols_si + goog.i18n.DateTimeSymbols_sk + goog.i18n.DateTimeSymbols_sl + goog.i18n.DateTimeSymbols_sq + goog.i18n.DateTimeSymbols_sr + goog.i18n.DateTimeSymbols_sr_Latn + goog.i18n.DateTimeSymbols_sv + goog.i18n.DateTimeSymbols_sw + goog.i18n.DateTimeSymbols_ta + goog.i18n.DateTimeSymbols_te + goog.i18n.DateTimeSymbols_th + goog.i18n.DateTimeSymbols_tl + goog.i18n.DateTimeSymbols_tr + goog.i18n.DateTimeSymbols_uk + goog.i18n.DateTimeSymbols_ur + goog.i18n.DateTimeSymbols_uz + goog.i18n.DateTimeSymbols_vi + goog.i18n.DateTimeSymbols_zh + goog.i18n.DateTimeSymbols_zh_CN + goog.i18n.DateTimeSymbols_zh_HK + goog.i18n.DateTimeSymbols_zh_TW + goog.i18n.DateTimeSymbols_zu + goog.i18n.DateTimeSymbolsType + goog.i18n.MessageFormat + goog.i18n.NumberFormat + goog.i18n.NumberFormat.CurrencyStyle + goog.i18n.NumberFormat.Format + goog.i18n.ordinalRules + goog.i18n.pluralRules + goog.i18n.TimeZone)) (def locales {"af" ^js goog.i18n.DateTimeSymbols_af diff --git a/src/utils/re_frame.cljs b/src/utils/re_frame.cljs index 27d215711a..07463a37b7 100644 --- a/src/utils/re_frame.cljs +++ b/src/utils/re_frame.cljs @@ -68,8 +68,8 @@ (when js/goog.DEBUG (swap! handler-nesting-level inc)) (let [[first-arg & rest-args] args - initial-fxs? (map? first-arg) - fx-fns (if initial-fxs? rest-args args) + initial-fxs? (map? first-arg) + fx-fns (if initial-fxs? rest-args args) res (clojure.core/reduce (fn [fxs fx-fn] (let [updated-cofx (update-db cofx fxs)]