From 7d8fd065f0276c4f14d2a5a55c7517c830ca55c6 Mon Sep 17 00:00:00 2001 From: Alfred Kamanda Date: Thu, 15 Jan 2026 10:56:20 +0300 Subject: [PATCH] default to a normal send if an error occurs on calculateSendCreditLimits --- handlers/application/send.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/handlers/application/send.go b/handlers/application/send.go index 08e83c5..53aa36a 100644 --- a/handlers/application/send.go +++ b/handlers/application/send.go @@ -380,8 +380,10 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte) // retrieve the max credit send amounts maxSAT, maxRAT, err := h.calculateSendCreditLimits(ctx, activePoolAddress, activeAddress, recipientActiveAddress, publicKey, activeDecimal, recipientActiveDecimal) if err != nil { - res.FlagSet = append(res.FlagSet, flag_api_call_error) + // if an error (such as Swap rates not found for the speficied pool and tokens), fall back to a normal transaction logg.ErrorCtxf(ctx, "failed on calculateSendCreditLimits", "error", err) + res.FlagReset = append(res.FlagReset, flag_swap_transaction) + res.Content = l.Get("Maximum amount: %s %s\nEnter amount:", formattedBalance, string(activeSym)) return res, nil }