[#10012] Show remaining PIN attemts only after entering wrong PIN
This commit is contained in:
parent
807c8377d4
commit
59184b12d0
|
@ -10,6 +10,8 @@
|
||||||
[status-im.utils.platform :as platform]
|
[status-im.utils.platform :as platform]
|
||||||
[status-im.ui.components.topbar :as topbar]))
|
[status-im.ui.components.topbar :as topbar]))
|
||||||
|
|
||||||
|
(def ^:const default-pin-retries-number 3)
|
||||||
|
|
||||||
(defn numpad-button [n step enabled? small-screen?]
|
(defn numpad-button [n step enabled? small-screen?]
|
||||||
[react/touchable-highlight
|
[react/touchable-highlight
|
||||||
{:on-press #(when enabled?
|
{:on-press #(when enabled?
|
||||||
|
@ -102,7 +104,7 @@
|
||||||
:error [react/view (styles/error-container small-screen?)
|
:error [react/view (styles/error-container small-screen?)
|
||||||
[react/text {:style (styles/error-text small-screen?)}
|
[react/text {:style (styles/error-text small-screen?)}
|
||||||
(i18n/label error-label)]]
|
(i18n/label error-label)]]
|
||||||
(when retry-counter
|
(when (and retry-counter (< retry-counter default-pin-retries-number))
|
||||||
[react/view {:margin-top (if (= step :puk) 24 8)}
|
[react/view {:margin-top (if (= step :puk) 24 8)}
|
||||||
[react/text {:style {:text-align :center}}
|
[react/text {:style {:text-align :center}}
|
||||||
(i18n/label :t/pin-retries-left {:number retry-counter})]]))]
|
(i18n/label :t/pin-retries-left {:number retry-counter})]]))]
|
||||||
|
|
Loading…
Reference in New Issue