mirror of
https://github.com/status-im/status-react.git
synced 2025-02-20 06:39:22 +00:00
[#8989] hide keycard settings for regular accounts
[#9019] hide Add new account in Wallet for keycard users [#9023] fix redirect on keycard setup cancel Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
This commit is contained in:
parent
c1c195adbe
commit
7a642c76de
@ -249,8 +249,9 @@
|
|||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
(remove-listener-to-hardware-back-button)
|
(remove-listener-to-hardware-back-button)
|
||||||
(navigation/navigate-reset {:index 0
|
(navigation/navigate-reset {:index 0
|
||||||
:actions [{:routeName (if (:multiaccounts/multiaccounts db)
|
:actions [{:routeName (if (seq (:multiaccounts/multiaccounts db))
|
||||||
:multiaccounts :intro)}]})))
|
:multiaccounts
|
||||||
|
:intro)}]})))
|
||||||
|
|
||||||
(fx/defn load-finishing-screen
|
(fx/defn load-finishing-screen
|
||||||
{:events [:keycard.onboarding.recovery-phrase-confirm-word2.ui/next-pressed
|
{:events [:keycard.onboarding.recovery-phrase-confirm-word2.ui/next-pressed
|
||||||
@ -675,6 +676,10 @@
|
|||||||
flow (get-in db [:hardwallet :flow])]
|
flow (get-in db [:hardwallet :flow])]
|
||||||
(fx/merge cofx
|
(fx/merge cofx
|
||||||
{:db (-> db
|
{:db (-> db
|
||||||
|
(update :hardwallet
|
||||||
|
dissoc :secrets :card-state :multiaccount-wallet-address
|
||||||
|
:multiaccount-whisper-public-key
|
||||||
|
:application-info)
|
||||||
(assoc-in [:hardwallet :setup-step] :begin)
|
(assoc-in [:hardwallet :setup-step] :begin)
|
||||||
(assoc-in [:hardwallet :on-card-connected] :hardwallet/get-application-info)
|
(assoc-in [:hardwallet :on-card-connected] :hardwallet/get-application-info)
|
||||||
(assoc-in [:hardwallet :on-card-read] :hardwallet/check-card-state)
|
(assoc-in [:hardwallet :on-card-read] :hardwallet/check-card-state)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
:initial-props initial-props
|
:initial-props initial-props
|
||||||
:desktop/desktop (merge desktop (:desktop/desktop app-db))
|
:desktop/desktop (merge desktop (:desktop/desktop app-db))
|
||||||
:network/type type
|
:network/type type
|
||||||
:hardwallet hardwallet
|
:hardwallet (dissoc hardwallet :secrets)
|
||||||
:supported-biometric-auth supported-biometric-auth
|
:supported-biometric-auth supported-biometric-auth
|
||||||
:view-id view-id
|
:view-id view-id
|
||||||
:push-notifications/stored stored)})
|
:push-notifications/stored stored)})
|
||||||
|
@ -108,7 +108,8 @@
|
|||||||
opts)])
|
opts)])
|
||||||
|
|
||||||
(defn- flat-list-content [preferred-name registrar tribute-to-talk
|
(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)
|
[(cond-> {:title (or preferred-name :t/ens-usernames)
|
||||||
:subtitle (if (boolean registrar)
|
:subtitle (if (boolean registrar)
|
||||||
(if preferred-name
|
(if preferred-name
|
||||||
@ -163,7 +164,8 @@
|
|||||||
:accessories [:chevron]
|
:accessories [:chevron]
|
||||||
:on-press #(re-frame/dispatch [:navigate-to :sync-settings])}
|
:on-press #(re-frame/dispatch [:navigate-to :sync-settings])}
|
||||||
(when (and platform/android?
|
(when (and platform/android?
|
||||||
config/hardwallet-enabled?)
|
config/hardwallet-enabled?
|
||||||
|
keycard-account?)
|
||||||
{:icon :main-icons/keycard
|
{:icon :main-icons/keycard
|
||||||
:title :t/keycard
|
:title :t/keycard
|
||||||
:accessibility-label :keycard-button
|
:accessibility-label :keycard-button
|
||||||
@ -198,7 +200,9 @@
|
|||||||
{:keys [public-key
|
{:keys [public-key
|
||||||
preferred-name
|
preferred-name
|
||||||
seed-backed-up?
|
seed-backed-up?
|
||||||
mnemonic]
|
mnemonic
|
||||||
|
keycard-key-uid
|
||||||
|
address]
|
||||||
:as multiaccount} [:multiaccount]
|
:as multiaccount} [:multiaccount]
|
||||||
active-contacts-count [:contacts/active-count]
|
active-contacts-count [:contacts/active-count]
|
||||||
tribute-to-talk [:tribute-to-talk/profile]
|
tribute-to-talk [:tribute-to-talk/profile]
|
||||||
@ -214,7 +218,8 @@
|
|||||||
header (header multiaccount)
|
header (header multiaccount)
|
||||||
content (flat-list-content
|
content (flat-list-content
|
||||||
preferred-name registrar tribute-to-talk
|
preferred-name registrar tribute-to-talk
|
||||||
active-contacts-count show-backup-seed?)
|
active-contacts-count show-backup-seed?
|
||||||
|
keycard-key-uid)
|
||||||
|
|
||||||
;; generated toolbar and content with header
|
;; generated toolbar and content with header
|
||||||
generated-view (large-toolbar/generate-view
|
generated-view (large-toolbar/generate-view
|
||||||
|
@ -149,13 +149,15 @@
|
|||||||
[icons/icon :main-icons/more {:accessibility-label :accounts-more-options}]]]]))
|
[icons/icon :main-icons/more {:accessibility-label :accounts-more-options}]]]]))
|
||||||
|
|
||||||
(views/defview accounts []
|
(views/defview accounts []
|
||||||
(views/letsubs [{:keys [accounts]} [:multiaccount]]
|
(views/letsubs [{:keys [accounts address keycard-key-uid]} [:multiaccount]]
|
||||||
[react/scroll-view {:horizontal true}
|
[react/scroll-view {:horizontal true}
|
||||||
[react/view {:flex-direction :row :padding-top 11 :padding-bottom 12}
|
[react/view {:flex-direction :row :padding-top 11 :padding-bottom 12}
|
||||||
(for [account accounts]
|
(for [account accounts]
|
||||||
^{:key account}
|
^{:key account}
|
||||||
[account-card account])
|
[account-card account])
|
||||||
[add-card]]]))
|
; TODO: enable keycard support for adding new accounts
|
||||||
|
(when-not keycard-key-uid
|
||||||
|
[add-card])]]))
|
||||||
|
|
||||||
(defn accounts-overview []
|
(defn accounts-overview []
|
||||||
[react/view {:flex 1}
|
[react/view {:flex 1}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user