From 817ee53330a1b63af78acd7d66de9e2dd67199b0 Mon Sep 17 00:00:00 2001 From: flexsurfer Date: Thu, 30 May 2024 15:05:30 +0200 Subject: [PATCH] View token-gated requirements is shown for non toked gated communities (i.e. Status) #20237 (#20240) --- .../actions/community_options/component_spec.cljs | 8 ++++---- .../actions/community_options/view.cljs | 15 ++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/status_im/contexts/communities/actions/community_options/component_spec.cljs b/src/status_im/contexts/communities/actions/community_options/component_spec.cljs index 86a3f174ea..020b0f6f77 100644 --- a/src/status_im/contexts/communities/actions/community_options/component_spec.cljs +++ b/src/status_im/contexts/communities/actions/community_options/component_spec.cljs @@ -27,7 +27,7 @@ (h/render [options/community-options-bottom-sheet {:id "test"}]) (h/is-truthy (h/get-by-translation-text :t/view-members)) (h/is-truthy (h/get-by-translation-text :t/view-community-rules)) - (h/is-truthy (h/get-by-translation-text :t/view-token-gating)) + ;(h/is-truthy (h/get-by-translation-text :t/view-token-gating)) (h/is-truthy (h/get-by-translation-text :t/mark-as-read)) (h/is-truthy (h/get-by-translation-text :t/mute-community)) ;(h/is-truthy (h/get-by-translation-text :t/notification-settings)) @@ -79,7 +79,7 @@ :communities/community {:role-permissions? true}}) (h/render [options/community-options-bottom-sheet {:id "test"}]) (h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts)) - (h/is-truthy (h/get-by-translation-text :t/view-token-gating)) + ;(h/is-truthy (h/get-by-translation-text :t/view-token-gating)) (h/is-truthy (h/get-by-translation-text :t/show-qr)) (h/is-truthy (h/get-by-translation-text :t/share-community)) (h/is-truthy (h/get-by-translation-text :t/cancel-request-to-join))) @@ -100,7 +100,7 @@ :role-permissions? true}}) (h/render [options/community-options-bottom-sheet {:id "test"}]) (h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts)) - (h/is-truthy (h/get-by-translation-text :t/view-token-gating)) + ;(h/is-truthy (h/get-by-translation-text :t/view-token-gating)) (h/is-truthy (h/get-by-translation-text :t/show-qr)) (h/is-truthy (h/get-by-translation-text :t/share-community))) @@ -110,7 +110,7 @@ :role-permissions? true}}) (h/render [options/community-options-bottom-sheet {:id "test"}]) (h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts)) - (h/is-truthy (h/get-by-translation-text :t/view-token-gating)) + ;(h/is-truthy (h/get-by-translation-text :t/view-token-gating)) (h/is-truthy (h/get-by-translation-text :t/show-qr)) (h/is-truthy (h/get-by-translation-text :t/share-community))) diff --git a/src/status_im/contexts/communities/actions/community_options/view.cljs b/src/status_im/contexts/communities/actions/community_options/view.cljs index 43f0fc2743..674de0ba47 100644 --- a/src/status_im/contexts/communities/actions/community_options/view.cljs +++ b/src/status_im/contexts/communities/actions/community_options/view.cljs @@ -36,13 +36,14 @@ (defn view-token-gating [id] - {:icon :i/token - :right-icon :i/chevron-right - :accessibility-label :view-token-gating - :on-press #(rf/dispatch [:show-bottom-sheet - {:content (fn [] [permissions-sheet/view id]) - :padding-bottom-override 16}]) - :label (i18n/label :t/view-token-gating)}) + (when config/show-not-implemented-features? + {:icon :i/token + :right-icon :i/chevron-right + :accessibility-label :view-token-gating + :on-press #(rf/dispatch [:show-bottom-sheet + {:content (fn [] [permissions-sheet/view id]) + :padding-bottom-override 16}]) + :label (i18n/label :t/view-token-gating)})) (defn edit-shared-addresses [id]