From 5ca02206b50acf2c833c8977f3498822f38b2347 Mon Sep 17 00:00:00 2001 From: Ajay Sivan Date: Fri, 26 Jul 2024 11:43:49 +0530 Subject: [PATCH] Selected state --- .../wallet/sheets/select_account/view.cljs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/status_im/contexts/wallet/sheets/select_account/view.cljs b/src/status_im/contexts/wallet/sheets/select_account/view.cljs index b9fb5186ed..353f3d55d7 100644 --- a/src/status_im/contexts/wallet/sheets/select_account/view.cljs +++ b/src/status_im/contexts/wallet/sheets/select_account/view.cljs @@ -8,16 +8,18 @@ (defn- render-account-item [{:keys [color address] :as account} _ _ {:keys [selected-account-address]}] - [quo/account-item - {:type :tag - :token-props {:symbol "SNT" - :value "1,000"} - :account-props (assoc account :customization-color color) - :customization-color color - :state (if (= address selected-account-address) :selected :default) - :on-press (fn [] - (rf/dispatch [:wallet/switch-current-viewing-account address]) - (rf/dispatch [:hide-bottom-sheet]))}]) + (let [state (if (= address selected-account-address) :selected :default)] + [quo/account-item + {:type (if (= state :selected) :default :tag) + :token-props {:symbol "SNT" + :value "1,000"} + :account-props (assoc account :customization-color color) + :customization-color color + :state state + :on-press + (fn [] + (rf/dispatch [:wallet/switch-current-viewing-account address]) + (rf/dispatch [:hide-bottom-sheet]))}])) (defn view [{:keys [show-token-balance? token-symbol]}]