From 349ceadfbaec13026e1ed064e0680bc3425ef705 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Mon, 15 Jan 2024 15:02:50 +0400 Subject: [PATCH 1/2] fix --- src/status_im/contexts/wallet/send/events.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/status_im/contexts/wallet/send/events.cljs b/src/status_im/contexts/wallet/send/events.cljs index bf739d7f4ea..89ec00f316b 100644 --- a/src/status_im/contexts/wallet/send/events.cljs +++ b/src/status_im/contexts/wallet/send/events.cljs @@ -47,10 +47,11 @@ (update-in [:wallet :ui :send] dissoc :to-address)) :fx [[:navigate-to-within-stack [:wallet-select-asset stack-id]]]})) +(rf/reg-event-fx :wallet/select-send-address (fn [{:keys [db]} [{:keys [address token stack-id]}]] {:db (assoc-in db [:wallet :ui :send :to-address] address) :fx [[:navigate-to-within-stack - (if token [:wallet-send-input-amount stack-id] [:wallet-select-asset stack-id])]]}) + (if token [:wallet-send-input-amount stack-id] [:wallet-select-asset stack-id])]]})) (rf/reg-event-fx :wallet/send-select-token (fn [{:keys [db]} [{:keys [token stack-id]}]] From 186a0dc05a5e82104814031cde3617f75f97dc43 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Mon, 15 Jan 2024 20:07:04 +0400 Subject: [PATCH 2/2] lint --- .clj-kondo/rewrite-clj/rewrite-clj/config.edn | 5 +++++ .clj-kondo/taoensso/encore/config.edn | 1 + .clj-kondo/taoensso/encore/taoensso/encore.clj | 16 ++++++++++++++++ src/status_im/contexts/wallet/send/events.cljs | 8 ++++---- 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 .clj-kondo/rewrite-clj/rewrite-clj/config.edn create mode 100644 .clj-kondo/taoensso/encore/config.edn create mode 100644 .clj-kondo/taoensso/encore/taoensso/encore.clj diff --git a/.clj-kondo/rewrite-clj/rewrite-clj/config.edn b/.clj-kondo/rewrite-clj/rewrite-clj/config.edn new file mode 100644 index 00000000000..19ecae96a0f --- /dev/null +++ b/.clj-kondo/rewrite-clj/rewrite-clj/config.edn @@ -0,0 +1,5 @@ +{:lint-as + {rewrite-clj.zip/subedit-> clojure.core/-> + rewrite-clj.zip/subedit->> clojure.core/->> + rewrite-clj.zip/edit-> clojure.core/-> + rewrite-clj.zip/edit->> clojure.core/->>}} diff --git a/.clj-kondo/taoensso/encore/config.edn b/.clj-kondo/taoensso/encore/config.edn new file mode 100644 index 00000000000..7b0ff3c2b7b --- /dev/null +++ b/.clj-kondo/taoensso/encore/config.edn @@ -0,0 +1 @@ +{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}} diff --git a/.clj-kondo/taoensso/encore/taoensso/encore.clj b/.clj-kondo/taoensso/encore/taoensso/encore.clj new file mode 100644 index 00000000000..7f6d30ac94e --- /dev/null +++ b/.clj-kondo/taoensso/encore/taoensso/encore.clj @@ -0,0 +1,16 @@ +(ns taoensso.encore + (:require + [clj-kondo.hooks-api :as hooks])) + +(defn defalias [{:keys [node]}] + (let [[sym-raw src-raw] (rest (:children node)) + src (if src-raw src-raw sym-raw) + sym (if src-raw + sym-raw + (symbol (name (hooks/sexpr src))))] + {:node (with-meta + (hooks/list-node + [(hooks/token-node 'def) + (hooks/token-node (hooks/sexpr sym)) + (hooks/token-node (hooks/sexpr src))]) + (meta src))})) diff --git a/src/status_im/contexts/wallet/send/events.cljs b/src/status_im/contexts/wallet/send/events.cljs index 89ec00f316b..1ccec122920 100644 --- a/src/status_im/contexts/wallet/send/events.cljs +++ b/src/status_im/contexts/wallet/send/events.cljs @@ -48,10 +48,10 @@ :fx [[:navigate-to-within-stack [:wallet-select-asset stack-id]]]})) (rf/reg-event-fx :wallet/select-send-address -(fn [{:keys [db]} [{:keys [address token stack-id]}]] - {:db (assoc-in db [:wallet :ui :send :to-address] address) - :fx [[:navigate-to-within-stack - (if token [:wallet-send-input-amount stack-id] [:wallet-select-asset stack-id])]]})) + (fn [{:keys [db]} [{:keys [address token stack-id]}]] + {:db (assoc-in db [:wallet :ui :send :to-address] address) + :fx [[:navigate-to-within-stack + (if token [:wallet-send-input-amount stack-id] [:wallet-select-asset stack-id])]]})) (rf/reg-event-fx :wallet/send-select-token (fn [{:keys [db]} [{:keys [token stack-id]}]]