[#10012] Show remaining PIN attemts only after entering wrong PIN

This commit is contained in:
Roman Volosovskyi 2020-02-24 11:04:59 +02:00
parent 807c8377d4
commit 59184b12d0
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@
[status-im.utils.platform :as platform]
[status-im.ui.components.topbar :as topbar]))
(def ^:const default-pin-retries-number 3)
(defn numpad-button [n step enabled? small-screen?]
[react/touchable-highlight
{:on-press #(when enabled?
@ -102,7 +104,7 @@
:error [react/view (styles/error-container small-screen?)
[react/text {:style (styles/error-text small-screen?)}
(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/text {:style {:text-align :center}}
(i18n/label :t/pin-retries-left {:number retry-counter})]]))]