Fix clojure.set and clojure.walk inconsistent namespace aliases (#14715)
This commit is contained in:
parent
951fd43d10
commit
bad796db90
|
@ -11,6 +11,8 @@
|
|||
taoensso.tufte/defnp clojure.core/defn}
|
||||
:linters {:consistent-alias {:level :error
|
||||
:aliases {clojure.string string
|
||||
clojure.set set
|
||||
clojure.walk walk
|
||||
taoensso.timbre log}}
|
||||
:invalid-arity {:skip-args [status-im.utils.fx/defn utils.re-frame/defn]}
|
||||
;; TODO remove number when this is fixed
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.communities.core
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[clojure.walk :as walk]
|
||||
[quo.design-system.colors :as colors]
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
(defn <-request-to-join-community-rpc
|
||||
[r]
|
||||
(clojure.set/rename-keys r
|
||||
(set/rename-keys r
|
||||
{:communityId :community-id
|
||||
:publicKey :public-key
|
||||
:chatId :chat-id}))
|
||||
|
@ -64,7 +64,7 @@
|
|||
(defn <-rpc
|
||||
[c]
|
||||
(-> c
|
||||
(clojure.set/rename-keys {:canRequestAccess :can-request-access?
|
||||
(set/rename-keys {:canRequestAccess :can-request-access?
|
||||
:canManageUsers :can-manage-users?
|
||||
:canDeleteMessageForEveryone :can-delete-message-for-everyone?
|
||||
:canJoin :can-join?
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.contact.db
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
|
@ -68,7 +68,7 @@
|
|||
(let [current-contact (some->
|
||||
current-account
|
||||
(select-keys [:name :preferred-name :public-key :identicon :images])
|
||||
(clojure.set/rename-keys {:name :alias
|
||||
(set/rename-keys {:name :alias
|
||||
:preferred-name :name}))
|
||||
all-contacts (cond-> contacts
|
||||
current-contact
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.data-store.chats
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.data-store.messages :as messages]
|
||||
[utils.re-frame :as rf]
|
||||
|
@ -58,7 +58,7 @@
|
|||
(defn <-rpc
|
||||
[chat]
|
||||
(-> chat
|
||||
(clojure.set/rename-keys {:id :chat-id
|
||||
(set/rename-keys {:id :chat-id
|
||||
:communityId :community-id
|
||||
:syncedFrom :synced-from
|
||||
:syncedTo :synced-to
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
(ns status-im.data-store.contacts
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[utils.re-frame :as rf]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(defn <-rpc
|
||||
[contact]
|
||||
(-> contact
|
||||
(clojure.set/rename-keys
|
||||
(set/rename-keys
|
||||
{:id :public-key
|
||||
:ensVerifiedAt :ens-verified-at
|
||||
:displayName :display-name
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.data-store.messages
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[utils.re-frame :as rf]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
(assoc :text (:text content)
|
||||
:sticker (:sticker content))
|
||||
:always
|
||||
(clojure.set/rename-keys {:chat-id :chat_id
|
||||
(set/rename-keys {:chat-id :chat_id
|
||||
:whisper-timestamp :whisperTimestamp
|
||||
:community-id :communityId
|
||||
:clock-value :clock})))
|
||||
|
@ -18,7 +18,7 @@
|
|||
(defn <-rpc
|
||||
[message]
|
||||
(-> message
|
||||
(clojure.set/rename-keys {:id :message-id
|
||||
(set/rename-keys {:id :message-id
|
||||
:whisperTimestamp :whisper-timestamp
|
||||
:editedAt :edited-at
|
||||
:contactVerificationState :contact-verification-state
|
||||
|
@ -39,11 +39,11 @@
|
|||
:new :new?})
|
||||
|
||||
(update :quoted-message
|
||||
clojure.set/rename-keys
|
||||
set/rename-keys
|
||||
{:parsedText :parsed-text :communityId :community-id})
|
||||
(update :outgoing-status keyword)
|
||||
(update :command-parameters
|
||||
clojure.set/rename-keys
|
||||
set/rename-keys
|
||||
{:transactionHash :transaction-hash
|
||||
:commandState :command-state})
|
||||
(assoc :content {:chat-id (:chatId message)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.data-store.pin-messages
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[status-im.data-store.messages :as messages]
|
||||
[utils.re-frame :as rf]
|
||||
[taoensso.timbre :as log]))
|
||||
|
@ -8,7 +8,7 @@
|
|||
[message]
|
||||
(-> message
|
||||
(merge (messages/<-rpc (message :message)))
|
||||
(clojure.set/rename-keys {:pinnedAt :pinned-at
|
||||
(set/rename-keys {:pinnedAt :pinned-at
|
||||
:pinnedBy :pinned-by})
|
||||
(dissoc :message)))
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
|||
{:json-rpc/call [{:method "wakuext_chatPinnedMessages"
|
||||
:params [chat-id cursor limit]
|
||||
:on-success (fn [result]
|
||||
(let [result (clojure.set/rename-keys result
|
||||
(let [result (set/rename-keys result
|
||||
{:pinnedMessages
|
||||
:pinned-messages})]
|
||||
(on-success (update result :pinned-messages #(map <-rpc %)))))
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
(ns status-im.data-store.reactions
|
||||
(:require [clojure.set :as clojure.set]))
|
||||
(:require [clojure.set :as set]))
|
||||
|
||||
(defn ->rpc
|
||||
[message]
|
||||
(-> message
|
||||
(clojure.set/rename-keys {:message-id :messageId
|
||||
(set/rename-keys {:message-id :messageId
|
||||
:emoji-id :emojiId
|
||||
:chat-id :localChatId
|
||||
:message-type :messageType
|
||||
|
@ -14,7 +14,7 @@
|
|||
[message]
|
||||
(-> message
|
||||
(dissoc :chat_id)
|
||||
(clojure.set/rename-keys {:messageId :message-id
|
||||
(set/rename-keys {:messageId :message-id
|
||||
:localChatId :chat-id
|
||||
:emojiId :emoji-id
|
||||
:messageType :message-type
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
(ns status-im.data-store.visibility-status-updates
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[re-frame.core :as re-frame]
|
||||
[utils.re-frame :as rf]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(defn <-rpc
|
||||
[visibility-status-update]
|
||||
(clojure.set/rename-keys visibility-status-update
|
||||
(set/rename-keys visibility-status-update
|
||||
{:publicKey :public-key
|
||||
:statusType :status-type}))
|
||||
(defn <-rpc-settings
|
||||
[settings]
|
||||
(-> settings
|
||||
(clojure.set/rename-keys
|
||||
(set/rename-keys
|
||||
{:current-user-status :current-user-visibility-status})
|
||||
(update :current-user-visibility-status <-rpc)))
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(:require ["react-native" :as rn]
|
||||
["react-native-gesture-handler" :refer (gestureHandlerRootHOC)]
|
||||
["react-native-navigation" :refer (Navigation)]
|
||||
[clojure.set :as clojure.set]
|
||||
[clojure.set :as set]
|
||||
[quo.components.text-input :as quo.text-input]
|
||||
[quo.design-system.colors :as quo.colors]
|
||||
[re-frame.core :as re-frame]
|
||||
|
@ -299,7 +299,7 @@
|
|||
(fn [^js evn]
|
||||
(let [selected-tab-index (.-selectedTabIndex evn)
|
||||
comp (get tab-root-ids selected-tab-index)
|
||||
tab-key (get (clojure.set/map-invert tab-key-idx) 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)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.signing.core
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.constants :as constants]
|
||||
|
@ -596,4 +596,4 @@
|
|||
(sign cofx
|
||||
{:tx-obj (-> tx
|
||||
(select-keys [:from :to :value :input :gas :nonce :hash])
|
||||
(clojure.set/rename-keys {:input :data}))})))
|
||||
(set/rename-keys {:input :data}))})))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.ui.screens.communities.reorder-categories
|
||||
(:require [clojure.set :as clojure.set]
|
||||
(:require [clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[clojure.walk :as walk]
|
||||
[quo.core :as quo]
|
||||
|
@ -48,7 +48,7 @@
|
|||
[{:keys [id community-id] :as home-item} is-active? drag]
|
||||
(let [chat-id (string/replace id community-id "")
|
||||
background-color (if is-active? colors/gray-lighter colors/white)
|
||||
home-item (clojure.set/rename-keys home-item {:id :chat-id})]
|
||||
home-item (set/rename-keys home-item {:id :chat-id})]
|
||||
[rn/view
|
||||
{:accessibility-label :chat-item
|
||||
:style (merge styles/category-item
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
(ns status-im.utils.views
|
||||
(:require [clojure.walk :as w]))
|
||||
(:require [clojure.walk :as walk]))
|
||||
|
||||
(defn atom?
|
||||
[sub]
|
||||
|
@ -9,7 +9,7 @@
|
|||
(defn walk-sub
|
||||
[sub form->sym]
|
||||
(if (coll? sub)
|
||||
(w/postwalk (fn [f]
|
||||
(walk/postwalk (fn [f]
|
||||
(or (form->sym f) f))
|
||||
sub)
|
||||
(or (form->sym sub) sub)))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(ns status-im.wallet.core
|
||||
(:require
|
||||
[clojure.set :as clojure.set]
|
||||
[clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.async-storage.core :as async-storage]
|
||||
|
@ -360,7 +360,7 @@
|
|||
(rf/merge cofx
|
||||
(multiaccounts.update/multiaccount-update
|
||||
:wallet/visible-tokens
|
||||
(update visible-tokens chain clojure.set/union chain-visible-tokens)
|
||||
(update visible-tokens chain set/union chain-visible-tokens)
|
||||
{})
|
||||
(update-tokens-balances balances)
|
||||
(prices/update-prices))))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(ns status-im2.subs.multiaccount
|
||||
(:require [cljs.spec.alpha :as spec]
|
||||
[clojure.set :as clojure.set]
|
||||
[clojure.set :as set]
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
|
@ -23,7 +23,7 @@
|
|||
(some->
|
||||
current-account
|
||||
(select-keys [:name :preferred-name :public-key :identicon :image :images])
|
||||
(clojure.set/rename-keys {:name :alias})
|
||||
(set/rename-keys {:name :alias})
|
||||
(multiaccounts/contact-with-names))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
|
|
Loading…
Reference in New Issue