From 523f6802762bcc7edb1aa15429a225a6eb3eddc1 Mon Sep 17 00:00:00 2001 From: Alfred Kamanda Date: Thu, 15 Jan 2026 11:25:02 +0300 Subject: [PATCH] append the flag_swap_transaction once all checks pass --- handlers/application/send.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handlers/application/send.go b/handlers/application/send.go index 7b09eea..bbcea64 100644 --- a/handlers/application/send.go +++ b/handlers/application/send.go @@ -344,8 +344,6 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte) return res, nil } - res.FlagSet = append(res.FlagSet, flag_swap_transaction) - // Resolve active pool address activePoolAddress, err := h.resolveActivePoolAddress(ctx, sessionId) if err != nil { @@ -385,7 +383,6 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte) res.FlagReset = append(res.FlagReset, flag_swap_transaction) res.Content = l.Get("Maximum amount: %s %s\nEnter amount:", formattedBalance, string(activeSym)) - fmt.Println("the FlagReset:", res.FlagReset, "the FlagSet:", res.FlagSet) return res, nil } @@ -417,6 +414,9 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte) return res, err } + // only set the flag once all checks pass + res.FlagSet = append(res.FlagSet, flag_swap_transaction) + res.Content = l.Get( "Credit Available: %s %s\n(You can swap up to %s %s -> %s %s).\nEnter %s amount:", maxRAT,