From 91c4967efa99c1953bb0ba1116347e37f834c78b Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Fri, 21 Feb 2025 11:01:42 +0300 Subject: [PATCH] check for back --- handlers/application/menuhandler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/application/menuhandler.go b/handlers/application/menuhandler.go index a05d981..0337c9b 100644 --- a/handlers/application/menuhandler.go +++ b/handlers/application/menuhandler.go @@ -318,7 +318,7 @@ func (h *MenuHandlers) VerifyNewPin(ctx context.Context, sym string, input []byt return res, fmt.Errorf("missing session") } flag_valid_pin, _ := h.flagManager.GetFlag("flag_valid_pin") - if !h.st.Back() { + if string(input) != "0" { pinInput := string(input) // Validate that the PIN is a 4-digit number. if pin.IsValidPIN(pinInput) { @@ -456,7 +456,7 @@ func (h *MenuHandlers) ConfirmPinChange(ctx context.Context, sym string, input [ } flag_pin_mismatch, _ := h.flagManager.GetFlag("flag_pin_mismatch") - if h.st.Back() { + if string(input) == "0" { res.FlagReset = append(res.FlagReset, flag_pin_mismatch) return res, nil }