Skip to content

Commit

Permalink
[#8989] hide keycard settings for regular accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryn committed Sep 26, 2019
1 parent acd7e56 commit 60ff2a5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/status_im/ui/screens/profile/user/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)))

Expand All @@ -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
Expand Down

0 comments on commit 60ff2a5

Please sign in to comment.