[#9705] fix java.lang.IllegalArgumentException: 16 > 0 after entering PIN code

This commit is contained in:
Roman Volosovskyi 2020-03-25 16:45:05 +02:00
parent cda7564bbe
commit c9cdd48849
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
3 changed files with 5 additions and 1 deletions

View File

@ -171,6 +171,7 @@
{:db (update-in db [:hardwallet :pin] merge {:status nil
:error-label nil})}
(common/clear-on-card-connected)
(common/clear-on-card-read)
;; TODO(Ferossgp): Each pin input should handle this event on it's own,
;; now for simplicity do not hide bottom sheet when generating key
;; but should be refactored.
@ -179,7 +180,8 @@
(when-not (contains? #{:hardwallet/unpair
:hardwallet/generate-and-load-key
:hardwallet/remove-key-with-unpair
:hardwallet/unpair-and-delete} on-verified)
:hardwallet/unpair-and-delete
:hardwallet/generate-mnemonic} on-verified)
(common/get-application-info pairing nil))
(when on-verified
(dispatch-on-verified-event on-verified)))))

View File

@ -72,6 +72,7 @@
(fx/defn proceed-to-generate-mnemonic
{:events [:hardwallet/proceed-to-generate-mnemonic]}
[{:keys [db] :as cofx}]
(log/debug "[hardwallet] proceed-to-generate-mnemonic")
(if (= (get-in db [:hardwallet :flow]) :create)
(load-generating-mnemonic-screen cofx)
{:db (assoc-in db [:hardwallet :setup-step] :recovery-phrase)}))

View File

@ -218,6 +218,7 @@
(fx/defn card-ready-next-button-pressed
{:events [:hardwallet.ui/card-ready-next-button-pressed]}
[{:keys [db] :as cofx}]
(log/debug "[hardwallet] card-ready-next-button-pressed")
(let [pin (get-in db [:hardwallet :secrets :pin])
pin-already-set? (boolean pin)]
(if pin-already-set?