set the first voucher as the active voucher when the current active sym is not found in the vouchers response
Some checks failed
release / docker (push) Has been cancelled

This commit is contained in:
Alfred Kamanda 2025-07-02 19:10:02 +03:00
parent a3dae12c7a
commit 16dd0f6ebf
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -2088,8 +2088,9 @@ func (h *MenuHandlers) ManageVouchers(ctx context.Context, sym string, input []b
}
if activeData == nil {
logg.ErrorCtxf(ctx, "activeSym not found in vouchers", "activeSym", activeSymStr)
return res, fmt.Errorf("activeSym %s not found in vouchers", activeSymStr)
logg.ErrorCtxf(ctx, "activeSym not found in vouchers, setting the first voucher as the default", "activeSym", activeSymStr)
firstVoucher := vouchersResp[0]
activeData = &firstVoucher
}
// Scale down the balance