From 15d671275f743a0b6b3750fde407bd626ffc6419 Mon Sep 17 00:00:00 2001 From: Michele Balistreri Date: Thu, 16 Dec 2021 11:44:11 +0300 Subject: [PATCH] avoid closing/opening NFC dialog in rapid sequence Signed-off-by: Michele Balistreri --- src/status_im/keycard/core.cljs | 8 ++++---- src/status_im/keycard/mnemonic.cljs | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/status_im/keycard/core.cljs b/src/status_im/keycard/core.cljs index 430044efc7..de927209a5 100644 --- a/src/status_im/keycard/core.cljs +++ b/src/status_im/keycard/core.cljs @@ -525,14 +525,14 @@ (fx/merge cofx {:db (assoc-in db [:keycard :card-state] card-state)} (set-setup-step card-state) - (common/hide-connection-sheet) (when paired? (load-pairing)) - (when (and flow - (= card-state :init)) - (proceed-setup-with-initialized-card flow instance-uid paired?)) + (if (and flow + (= card-state :init)) + (proceed-setup-with-initialized-card flow instance-uid paired?) + (common/hide-connection-sheet)) (when (= card-state :pre-init) (if (= flow :import) diff --git a/src/status_im/keycard/mnemonic.cljs b/src/status_im/keycard/mnemonic.cljs index 8ff3e1b5f0..077070d84b 100644 --- a/src/status_im/keycard/mnemonic.cljs +++ b/src/status_im/keycard/mnemonic.cljs @@ -21,6 +21,7 @@ (assoc-in [:keycard :setup-step] :recovery-phrase) (assoc-in [:keycard :secrets :mnemonic] mnemonic))} (common/clear-on-card-connected) + (common/hide-connection-sheet) (navigation/navigate-replace :keycard-onboarding-recovery-phrase nil)))) (fx/defn load-loading-keys-screen