generally, the advice we give is that if there's anything wrong with your heart, you shouldn't take mdma. but that's equally valid for all kinds of stimulants. basically that's due to tachycardia, constriction of blood vessels / rais in blood pressure and iirc mdma (like amphetamine and many other pharmaceutical drugs) is also a (weak) hERG-inhibitor, which can lead to arrhytmias, especially in people with mutation in the hERG gene.
so in the short term mdma should be about as safe or unsafe as amphetamine, which i also wouldn't recommend for someone with heart conditions.
additionally, mdma may cause growth of the mitral valve if abused, but if used responsibly that's nothing to worry about.