From 9e93bb4b591f487c7d64b7f988f2521483c1b9f0 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Fri, 20 Feb 2026 13:25:39 +0300 Subject: [PATCH] revert to a normal transaction of the recipient phone number is not present --- handlers/application/send.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/handlers/application/send.go b/handlers/application/send.go index 9430709..1a322bc 100644 --- a/handlers/application/send.go +++ b/handlers/application/send.go @@ -414,12 +414,15 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte) return res, nil } - // Get the recipient's phone number to read other data items + // Get the recipient's phone number to read other data items (*) recipientPhoneNumber, err := userStore.ReadEntry(ctx, sessionId, storedb.DATA_RECIPIENT_PHONE_NUMBER) if err != nil { - // invalid state - return res, err + // revert to normal transaction + res.FlagReset = append(res.FlagReset, flag_swap_transaction) + res.Content = l.Get("Maximum amount: %s %s\nEnter amount:", formattedBalance, string(activeSym)) + return res, nil } + recipientActiveSym, recipientActiveAddress, recipientActiveDecimal, err := h.getRecipientData(ctx, string(recipientPhoneNumber)) if err != nil { return res, err