From 60ff2a57ae452656d2e4149c590c7a0f92e597b9 Mon Sep 17 00:00:00 2001 From: Dmitry Novotochinov Date: Thu, 26 Sep 2019 16:47:40 +0300 Subject: [PATCH] [#8989] hide keycard settings for regular accounts --- src/status_im/ui/screens/profile/user/views.cljs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/status_im/ui/screens/profile/user/views.cljs b/src/status_im/ui/screens/profile/user/views.cljs index 7d3264e76a08..5c935dfc1b00 100644 --- a/src/status_im/ui/screens/profile/user/views.cljs +++ b/src/status_im/ui/screens/profile/user/views.cljs @@ -108,7 +108,8 @@ opts)]) (defn- flat-list-content [preferred-name registrar tribute-to-talk - active-contacts-count show-backup-seed?] + active-contacts-count show-backup-seed? + keycard-account?] [(cond-> {:title (or preferred-name :t/ens-usernames) :subtitle (if (boolean registrar) (if preferred-name @@ -163,7 +164,8 @@ :accessories [:chevron] :on-press #(re-frame/dispatch [:navigate-to :sync-settings])} (when (and platform/android? - config/hardwallet-enabled?) + config/hardwallet-enabled? + keycard-account?) {:icon :main-icons/keycard :title :t/keycard :accessibility-label :keycard-button @@ -198,11 +200,13 @@ {:keys [public-key preferred-name seed-backed-up? - mnemonic] + mnemonic + address] :as multiaccount} [:multiaccount] active-contacts-count [:contacts/active-count] tribute-to-talk [:tribute-to-talk/profile] - registrar [:ens.stateofus/registrar]] + registrar [:ens.stateofus/registrar] + multiaccounts [:multiaccounts/multiaccounts]] (let [show-backup-seed? (and (not seed-backed-up?) (not (string/blank? mnemonic))) @@ -212,9 +216,11 @@ ;; flatlist contents header (header multiaccount) + keycard-account? (boolean (get-in multiaccounts [address :keycard-key-uid])) content (flat-list-content preferred-name registrar tribute-to-talk - active-contacts-count show-backup-seed?) + active-contacts-count show-backup-seed? + keycard-account?) ;; generated toolbar and content with header generated-view (large-toolbar/generate-view