have-single-send-node #113

Merged
Alfred-mk merged 9 commits from have-single-send-node into master 2026-01-22 14:22:21 +01:00
Showing only changes of commit 523f680276 - Show all commits

View File

@ -344,8 +344,6 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte)
return res, nil return res, nil
} }
res.FlagSet = append(res.FlagSet, flag_swap_transaction)
// Resolve active pool address // Resolve active pool address
activePoolAddress, err := h.resolveActivePoolAddress(ctx, sessionId) activePoolAddress, err := h.resolveActivePoolAddress(ctx, sessionId)
if err != nil { 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.FlagReset = append(res.FlagReset, flag_swap_transaction)
res.Content = l.Get("Maximum amount: %s %s\nEnter amount:", formattedBalance, string(activeSym)) 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 return res, nil
} }
@ -417,6 +414,9 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte)
return res, err return res, err
} }
// only set the flag once all checks pass
res.FlagSet = append(res.FlagSet, flag_swap_transaction)
res.Content = l.Get( res.Content = l.Get(
"Credit Available: %s %s\n(You can swap up to %s %s -> %s %s).\nEnter %s amount:", "Credit Available: %s %s\n(You can swap up to %s %s -> %s %s).\nEnter %s amount:",
maxRAT, maxRAT,