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))))