diff --git a/src/status_im/subs/communities.cljs b/src/status_im/subs/communities.cljs index 9fcabd10347a..cb99715a0df0 100644 --- a/src/status_im/subs/communities.cljs +++ b/src/status_im/subs/communities.cljs @@ -4,8 +4,8 @@ [legacy.status-im.ui.screens.profile.visibility-status.utils :as visibility-status-utils] [re-frame.core :as re-frame] [status-im.constants :as constants] - [status-im.contexts.wallet.common.utils :as wallet.utils] - [utils.i18n :as i18n])) + [utils.i18n :as i18n] + [utils.money :as money])) (re-frame/reg-sub :communities/fetching-community @@ -266,8 +266,8 @@ :position position :mentions-count (or unviewed-mentions-count 0) :can-post? can-post? - ;; NOTE: this is a troolean nil->no permissions, true->no access, false -> - ;; has access + ;; NOTE: this is a troolean nil->no permissions, true->no access, false + ;; -> has access :locked? (when token-gated? (and (not can-view?) (not can-post?))) @@ -306,12 +306,13 @@ [checking-permissions? token-images {:keys [satisfied criteria]}] - (let [sym (:symbol criteria) - amount (:amount criteria)] + (let [sym (:symbol criteria) + amountInWei (:amountInWei criteria) + decimals (:decimals criteria)] {:symbol sym :sufficient? satisfied :loading? checking-permissions? - :amount (wallet.utils/remove-trailing-zeroes amount) + :amount (money/to-fixed (money/token->unit amountInWei decimals)) :img-src (get token-images sym)})) (re-frame/reg-sub