From c26d29857313934a7228b2117fc1c6fbad6cbe03 Mon Sep 17 00:00:00 2001 From: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:56:57 +0530 Subject: [PATCH] fix_: slider reset in standard authentication (#21779) This commit resets the slider-button after the completion of slider in standard authentication. Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> --- .../standard_auth/slide_button/view.cljs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs b/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs index 108bb023a3..4c4ce5c9ec 100644 --- a/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs +++ b/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs @@ -15,18 +15,18 @@ auth-method (rf/sub [:auth-method]) biometric-auth? (= auth-method constants/auth-method-biometric) on-complete (rn/use-callback - (fn [reset] - (rf/dispatch [:standard-auth/authorize - {:on-close (fn [success?] - (js/setTimeout #(reset success?) 200)) - :auth-button-icon-left auth-button-icon-left - :theme theme - :blur? blur? - :keycard-supported? keycard-supported? - :biometric-auth? biometric-auth? - :on-auth-success on-auth-success - :on-auth-fail on-auth-fail - :auth-button-label auth-button-label}])) + (fn [reset-slider-fn] + (js/setTimeout #(reset-slider-fn false) 500) + (rf/dispatch + [:standard-auth/authorize + {:auth-button-icon-left auth-button-icon-left + :theme theme + :blur? blur? + :keycard-supported? keycard-supported? + :biometric-auth? biometric-auth? + :on-auth-success on-auth-success + :on-auth-fail on-auth-fail + :auth-button-label auth-button-label}])) (vec (conj dependencies on-auth-success on-auth-fail))) biometric-type (rf/sub [:biometrics/supported-type])] [quo/slide-button