diff --git a/src/status_im/ui/screens/wallet/main/views.cljs b/src/status_im/ui/screens/wallet/main/views.cljs index 21c73c01b4..3dffd9e376 100644 --- a/src/status_im/ui/screens/wallet/main/views.cljs +++ b/src/status_im/ui/screens/wallet/main/views.cljs @@ -45,7 +45,7 @@ transaction-history-action]]]) (defn- change-display [change] - (let [pos-change? (pos? change)] + (let [pos-change? (or (pos? change) (zero? change))] [react/view {:style (if pos-change? wallet.styles/today-variation-container-positive wallet.styles/today-variation-container-negative)} diff --git a/src/status_im/ui/screens/wallet/subs.cljs b/src/status_im/ui/screens/wallet/subs.cljs index 2802b90ce4..cc9a4d21fa 100644 --- a/src/status_im/ui/screens/wallet/subs.cljs +++ b/src/status_im/ui/screens/wallet/subs.cljs @@ -46,11 +46,14 @@ (reg-sub :portfolio-change :<- [:price] :<- [:last-day] - (fn [[price last-day]] + :<- [:balance] + (fn [[price last-day balance]] (when (and price last-day) - (-> (money/percent-change price last-day) - (money/with-precision 2) - .toNumber)))) + (if (> balance 0) + (-> (money/percent-change price last-day) + (money/with-precision 2) + .toNumber) + 0)))) (reg-sub :prices-loading? (fn [db]