Skip to content

Commit

Permalink
[#9019] hide Add new account in Wallet for keycard users
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryn committed Sep 26, 2019
1 parent 60ff2a5 commit 5fca8e0
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/status_im/ui/screens/wallet/accounts/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,17 @@
[icons/icon :main-icons/more {:accessibility-label :accounts-more-options}]]]]))

(views/defview accounts []
(views/letsubs [{:keys [accounts]} [:multiaccount]]
[react/scroll-view {:horizontal true}
[react/view {:flex-direction :row :padding-top 11 :padding-bottom 12}
(for [account accounts]
^{:key account}
[account-card account])
[add-card]]]))
(views/letsubs [{:keys [accounts address]} [:multiaccount]
multiaccounts [:multiaccounts/multiaccounts]]
(let [keycard-account? (boolean (get-in multiaccounts [address :keycard-key-uid]))]
[react/scroll-view {:horizontal true}
[react/view {:flex-direction :row :padding-top 11 :padding-bottom 12}
(for [account accounts]
^{:key account}
[account-card account])
; TODO: enable keycard support for adding new accounts
(when-not keycard-account?
[add-card])]])))

(defn accounts-overview []
[react/view {:flex 1}
Expand Down

0 comments on commit 5fca8e0

Please sign in to comment.