You really need to go see your doctor. It might be a direct reaction to the MDMA, it might be an infection because of lowered immune system caused by MDMA, it could have been an unrelated allergic reaction to something, could be angioedema like Mel said, could be a lot of things. Could be harmless, could be harmful. You are not going to get any certainty by replies on here. Go see your doctor, tell him or her honestly what went down, you are protected by physician–patient privilege so no need to worry about privacy. Tell him you never had this reaction before, and you're sure it was MDMA you took (you are talking about
these pills?). Tell them things that might be relevant, like what medication you're on if any, how hydrated you kept yourself during the night, how often you use MDMA, if you did any other drugs right before or during that night, if you have any allergies, make sure to show them the pictures if the swelling has already gone away, tell them everything you think might be relevant
The good thing is you tested your drugs, allergic reactions to MDMA are very rare, though there have been documented cases. Makes me think it's not directly caused by MDMA, though it's probably a contributing factor. In any case, nobody on here is going to be able to tell you for sure what caused this
If they are the pills I've linked above, I've done them myself, more than once, tested them too. Never had any issues with them. They are high-dosed though. I'm going to add the (tested) prefix to your thread