From cabe5ab02915c93c9d91773a124efd8e5c7d7f24 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Mon, 6 May 2024 12:52:19 +0400 Subject: [PATCH] lint --- src/status_im/contexts/wallet/account/view.cljs | 3 +-- src/status_im/subs/wallet/activities.cljs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/status_im/contexts/wallet/account/view.cljs b/src/status_im/contexts/wallet/account/view.cljs index 4425d9f9e2bd..3ba11c6a71f7 100644 --- a/src/status_im/contexts/wallet/account/view.cljs +++ b/src/status_im/contexts/wallet/account/view.cljs @@ -54,8 +54,7 @@ :default-active @selected-tab :data (tabs-data watch-only?) :on-change (rn/use-callback (fn [tab] - (when (and (= :activity tab) - true) + (when (= :activity tab) (rf/dispatch [:wallet/fetch-activities])) (reset! selected-tab tab))) :scrollable? true diff --git a/src/status_im/subs/wallet/activities.cljs b/src/status_im/subs/wallet/activities.cljs index 435880ab2244..bf5707e4c73e 100644 --- a/src/status_im/subs/wallet/activities.cljs +++ b/src/status_im/subs/wallet/activities.cljs @@ -13,11 +13,11 @@ :<- [:wallet/all-activities] :<- [:wallet/current-viewing-account-address] (fn [[activities current-viewing-account-address]] - (let [relevant-activities (filter (fn [{:keys [sender recipient]}] + (let [account-activities (filter (fn [{:keys [sender recipient]}] (or (= sender current-viewing-account-address) (= recipient current-viewing-account-address))) activities) grouped-by-day (group-by (fn [{:keys [timestamp]}] (datetime/timestamp->relative-short-date (* timestamp 1000))) - relevant-activities)] + account-activities)] (map (fn [[date acts]] {:title date :data acts}) grouped-by-day))))