From 85b8775fd0b03fa0c4b73dc0125388767d2a0e4a Mon Sep 17 00:00:00 2001 From: Alfred Kamanda Date: Tue, 3 Feb 2026 13:32:13 +0300 Subject: [PATCH] return nil instead of an error to prevent failure --- handlers/application/balance.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/handlers/application/balance.go b/handlers/application/balance.go index e3b67ec..d2d92d7 100644 --- a/handlers/application/balance.go +++ b/handlers/application/balance.go @@ -152,7 +152,8 @@ func (h *MenuHandlers) CalculateCreditAndDebt(ctx context.Context, sym string, i // Fetch session data _, _, activeSym, _, publicKey, _, err := h.getSessionData(ctx, sessionId) if err != nil { - return res, err + // return if the user does not have an active voucher + return res, nil } // Get active pool address and symbol or fall back to default @@ -166,7 +167,7 @@ func (h *MenuHandlers) CalculateCreditAndDebt(ctx context.Context, sym string, i if err != nil { res.FlagSet = append(res.FlagSet, flag_api_call_error) logg.ErrorCtxf(ctx, "failed on GetPoolSwappableFromVouchers", "error", err) - return res, err + return res, nil } logg.InfoCtxf(ctx, "GetPoolSwappableFromVouchers", "swappable vouchers", swappableVouchers)