From a2e2c0d68e03ff93047814faf828531311d9c6a9 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Fri, 20 Feb 2026 13:33:43 +0300 Subject: [PATCH] ensure the number is valid --- handlers/application/send.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers/application/send.go b/handlers/application/send.go index aef8095..e59ad22 100644 --- a/handlers/application/send.go +++ b/handlers/application/send.go @@ -418,7 +418,7 @@ func (h *MenuHandlers) MaxAmount(ctx context.Context, sym string, input []byte) // 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 { + if err != nil || !phone.IsValidPhoneNumber(string(recipientPhoneNumber)) { // 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))