From be215d3f75ed64a1794e87497a3682b5050842b7 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Fri, 20 Dec 2024 12:26:07 +0300 Subject: [PATCH] set the code to an empty byte for it to move to the top node --- internal/handlers/ussd/menuhandler.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/internal/handlers/ussd/menuhandler.go b/internal/handlers/ussd/menuhandler.go index b3c6f1d..f509ff4 100644 --- a/internal/handlers/ussd/menuhandler.go +++ b/internal/handlers/ussd/menuhandler.go @@ -124,16 +124,11 @@ func (h *Handlers) Init(ctx context.Context, sym string, input []byte) (resource h.st = h.pe.GetState() h.ca = h.pe.GetMemory() - - fmt.Println("Pre restart state:", h.st) - if len(input) == 0 { - h.st.Restart() - h.st = h.pe.GetState() + // move to the top node + h.st.Code = []byte{} } - fmt.Println("New state:", h.st) - sessionId, _ := ctx.Value("SessionId").(string) flag_admin_privilege, _ := h.flagManager.GetFlag("flag_admin_privilege")