he was appointed heir by the empress theodora shortly before her death