[#9577] Fix keycard account creation after card reconnection
`:on-card-read` callback wasn't properly cleared before entering pin.
This commit is contained in:
parent
78d694f52f
commit
5ccf1c0377
|
@ -516,7 +516,11 @@
|
||||||
(when (= card-state :pre-init)
|
(when (= card-state :pre-init)
|
||||||
(if (= flow :import)
|
(if (= flow :import)
|
||||||
(navigation/navigate-to-cofx :keycard-recovery-no-key nil)
|
(navigation/navigate-to-cofx :keycard-recovery-no-key nil)
|
||||||
(load-pin-screen)))
|
(fn [cofx]
|
||||||
|
(fx/merge
|
||||||
|
cofx
|
||||||
|
(clear-on-card-read)
|
||||||
|
(load-pin-screen)))))
|
||||||
(when (and (= card-state :multiaccount)
|
(when (and (= card-state :multiaccount)
|
||||||
(= flow :import))
|
(= flow :import))
|
||||||
(let [{:keys [address]} (find-multiaccount-by-key-uid db key-uid)]
|
(let [{:keys [address]} (find-multiaccount-by-key-uid db key-uid)]
|
||||||
|
@ -1418,9 +1422,10 @@
|
||||||
(fx/defn process-pin-input
|
(fx/defn process-pin-input
|
||||||
[{:keys [db]}]
|
[{:keys [db]}]
|
||||||
(let [enter-step (get-in db [:hardwallet :pin :enter-step])
|
(let [enter-step (get-in db [:hardwallet :pin :enter-step])
|
||||||
setup-step (get-in db [:hardwallet :setup-step])
|
|
||||||
pin (get-in db [:hardwallet :pin enter-step])
|
pin (get-in db [:hardwallet :pin enter-step])
|
||||||
numbers-entered (count pin)]
|
numbers-entered (count pin)]
|
||||||
|
(log/debug "[hardwallet] process-pin-input"
|
||||||
|
"enter-step" enter-step)
|
||||||
(cond-> {:db (assoc-in db [:hardwallet :pin :status] nil)}
|
(cond-> {:db (assoc-in db [:hardwallet :pin :status] nil)}
|
||||||
|
|
||||||
(and (= enter-step :login)
|
(and (= enter-step :login)
|
||||||
|
|
Loading…
Reference in New Issue