[#8939] hide keycard options from ios
Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
This commit is contained in:
parent
7ba83bde74
commit
b4ffb5b3ea
|
@ -13,7 +13,8 @@
|
||||||
[status-im.utils.security :as security]
|
[status-im.utils.security :as security]
|
||||||
[status-im.utils.signing-phrase.core :as signing-phrase]
|
[status-im.utils.signing-phrase.core :as signing-phrase]
|
||||||
[status-im.utils.types :as types]
|
[status-im.utils.types :as types]
|
||||||
[status-im.utils.utils :as utils]))
|
[status-im.utils.utils :as utils]
|
||||||
|
[status-im.utils.platform :as platform]))
|
||||||
|
|
||||||
(defn get-signing-phrase [cofx]
|
(defn get-signing-phrase [cofx]
|
||||||
(assoc cofx :signing-phrase (signing-phrase/generate)))
|
(assoc cofx :signing-phrase (signing-phrase/generate)))
|
||||||
|
@ -29,11 +30,17 @@
|
||||||
|
|
||||||
(defn dec-step [step]
|
(defn dec-step [step]
|
||||||
(let [inverted (map-invert step-kw-to-num)]
|
(let [inverted (map-invert step-kw-to-num)]
|
||||||
(inverted (dec (step-kw-to-num step)))))
|
(if (and (= step :create-code)
|
||||||
|
(not platform/android?))
|
||||||
|
:choose-key
|
||||||
|
(inverted (dec (step-kw-to-num step))))))
|
||||||
|
|
||||||
(defn inc-step [step]
|
(defn inc-step [step]
|
||||||
(let [inverted (map-invert step-kw-to-num)]
|
(let [inverted (map-invert step-kw-to-num)]
|
||||||
(inverted (inc (step-kw-to-num step)))))
|
(if (and (= step :choose-key)
|
||||||
|
(not platform/android?))
|
||||||
|
:create-code
|
||||||
|
(inverted (inc (step-kw-to-num step))))))
|
||||||
|
|
||||||
;; multiaccounts create module
|
;; multiaccounts create module
|
||||||
(defn get-selected-multiaccount [{:keys [db]}]
|
(defn get-selected-multiaccount [{:keys [db]}]
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
[status-im.ui.screens.navigation :as navigation]
|
[status-im.ui.screens.navigation :as navigation]
|
||||||
[status-im.utils.fx :as fx]
|
[status-im.utils.fx :as fx]
|
||||||
[status-im.utils.security :as security]
|
[status-im.utils.security :as security]
|
||||||
[status-im.utils.types :as types]))
|
[status-im.utils.types :as types]
|
||||||
|
[status-im.utils.platform :as platform]))
|
||||||
|
|
||||||
(defn check-password-errors [password]
|
(defn check-password-errors [password]
|
||||||
(cond (string/blank? password) :required-field
|
(cond (string/blank? password) :required-field
|
||||||
|
@ -140,13 +141,6 @@
|
||||||
(assoc-in [:multiaccounts/recover :derived] derived-data))}
|
(assoc-in [:multiaccounts/recover :derived] derived-data))}
|
||||||
(navigation/navigate-to-cofx :recover-multiaccount-success nil)))
|
(navigation/navigate-to-cofx :recover-multiaccount-success nil)))
|
||||||
|
|
||||||
(fx/defn re-encrypt-pressed
|
|
||||||
{:events [::re-encrypt-pressed]}
|
|
||||||
[{:keys [db] :as cofx}]
|
|
||||||
(fx/merge cofx
|
|
||||||
{:db (assoc-in db [:intro-wizard :selected-storage-type] :default)}
|
|
||||||
(navigation/navigate-to-cofx :recover-multiaccount-select-storage nil)))
|
|
||||||
|
|
||||||
(fx/defn enter-phrase-pressed
|
(fx/defn enter-phrase-pressed
|
||||||
{:events [::enter-phrase-pressed]}
|
{:events [::enter-phrase-pressed]}
|
||||||
[{:keys [db] :as cofx}]
|
[{:keys [db] :as cofx}]
|
||||||
|
@ -180,6 +174,15 @@
|
||||||
{:dispatch [:recovery.ui/keycard-option-pressed]})
|
{:dispatch [:recovery.ui/keycard-option-pressed]})
|
||||||
(navigation/navigate-to-cofx cofx :recover-multiaccount-enter-password nil)))
|
(navigation/navigate-to-cofx cofx :recover-multiaccount-enter-password nil)))
|
||||||
|
|
||||||
|
(fx/defn re-encrypt-pressed
|
||||||
|
{:events [::re-encrypt-pressed]}
|
||||||
|
[{:keys [db] :as cofx}]
|
||||||
|
(fx/merge cofx
|
||||||
|
{:db (assoc-in db [:intro-wizard :selected-storage-type] :default)}
|
||||||
|
(if platform/android?
|
||||||
|
(navigation/navigate-to-cofx :recover-multiaccount-select-storage nil)
|
||||||
|
(select-storage-next-pressed))))
|
||||||
|
|
||||||
(fx/defn proceed-to-password-confirm
|
(fx/defn proceed-to-password-confirm
|
||||||
[{:keys [db] :as cofx}]
|
[{:keys [db] :as cofx}]
|
||||||
(when (nil? (get-in db [:multiaccounts/recover :password-error]))
|
(when (nil? (get-in db [:multiaccounts/recover :password-error]))
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
[status-im.i18n :as i18n]
|
[status-im.i18n :as i18n]
|
||||||
[status-im.ui.components.status-bar.view :as status-bar]
|
[status-im.ui.components.status-bar.view :as status-bar]
|
||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
[status-im.utils.config :as config]))
|
[status-im.utils.config :as config]
|
||||||
|
[status-im.utils.platform :as platform]))
|
||||||
|
|
||||||
(defn dots-selector [{:keys [on-press n selected color]}]
|
(defn dots-selector [{:keys [on-press n selected color]}]
|
||||||
[react/view {:style (styles/dot-selector n)}
|
[react/view {:style (styles/dot-selector n)}
|
||||||
|
@ -139,7 +140,8 @@
|
||||||
[react/text {:style (assoc styles/wizard-text :text-align :left :margin-left 16)}
|
[react/text {:style (assoc styles/wizard-text :text-align :left :margin-left 16)}
|
||||||
(i18n/label type)]]
|
(i18n/label type)]]
|
||||||
[react/touchable-highlight
|
[react/touchable-highlight
|
||||||
{:on-press #(re-frame/dispatch [:intro-wizard/on-key-storage-selected (if config/hardwallet-enabled? type :default)])}
|
{:on-press #(re-frame/dispatch [:intro-wizard/on-key-storage-selected (if (and config/hardwallet-enabled?
|
||||||
|
platform/android?) type :default)])}
|
||||||
[react/view (assoc (styles/list-item selected?)
|
[react/view (assoc (styles/list-item selected?)
|
||||||
:align-items :flex-start
|
:align-items :flex-start
|
||||||
:padding-top 20
|
:padding-top 20
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
[status-im.ui.screens.intro.views :as intro.views]
|
[status-im.ui.screens.intro.views :as intro.views]
|
||||||
[status-im.utils.utils :as utils]
|
[status-im.utils.utils :as utils]
|
||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
[status-im.ui.components.list-item.views :as list-item]))
|
[status-im.ui.components.list-item.views :as list-item]
|
||||||
|
[status-im.utils.platform :as platform]))
|
||||||
|
|
||||||
(defn bottom-sheet-view []
|
(defn bottom-sheet-view []
|
||||||
[react/view {:flex 1 :flex-direction :row}
|
[react/view {:flex 1 :flex-direction :row}
|
||||||
|
@ -29,17 +30,19 @@
|
||||||
:accessibility-label :enter-seed-phrase-button
|
:accessibility-label :enter-seed-phrase-button
|
||||||
:icon :main-icons/text
|
:icon :main-icons/text
|
||||||
:on-press #(re-frame/dispatch [::multiaccounts.recover/enter-phrase-pressed])}]
|
:on-press #(re-frame/dispatch [::multiaccounts.recover/enter-phrase-pressed])}]
|
||||||
[list-item/list-item
|
(when (and config/hardwallet-enabled?
|
||||||
{:theme :action
|
platform/android?)
|
||||||
:title :t/recover-with-keycard
|
[list-item/list-item
|
||||||
:disabled? (not config/hardwallet-enabled?)
|
{:theme :action
|
||||||
:accessibility-label :recover-with-keycard-button
|
:title :t/recover-with-keycard
|
||||||
:icon :main-icons/keycard-logo
|
:disabled? (not config/hardwallet-enabled?)
|
||||||
:on-press #(re-frame/dispatch [::hardwallet/recover-with-keycard-pressed])}]]])
|
:accessibility-label :recover-with-keycard-button
|
||||||
|
:icon :main-icons/keycard-logo
|
||||||
|
:on-press #(re-frame/dispatch [::hardwallet/recover-with-keycard-pressed])}])]])
|
||||||
|
|
||||||
(def bottom-sheet
|
(def bottom-sheet
|
||||||
{:content bottom-sheet-view
|
{:content bottom-sheet-view
|
||||||
:content-height 130})
|
:content-height (if platform/android? 130 65)})
|
||||||
|
|
||||||
(defview enter-phrase []
|
(defview enter-phrase []
|
||||||
(letsubs [{:keys [processing?
|
(letsubs [{:keys [processing?
|
||||||
|
|
Loading…
Reference in New Issue