Usage of a web application that I sold for an academic project: Copyright issues?
After your clarifications, I don't see that from the point of view of the company, you did anything wrong. Since you sold them the application and not the source code and since you didn't transfer your copyrights to them, or signed any contract saying you will not resell/reuse the app, there is no issue.

From the point of view of your university, it really depends. You reused previous work for your project and you will find people arguing on both sides of whether that's ethical (check Is reusing old code for a new assignment considered self plagiarism? How to protect yourself if you consider it to be, and a group partner does not?). In my opinion, it is not the best thing you can do because you are supposed to learn something new in your master thesis, but personally I don't find it unethical. 

Moreover, your supervisor(s) must have realized it when you showed up with a finished/polished product, with a designer on the acknowledgments and without asking him/her any questions on how to get there. If he/she didn't realize, then he/she didn't really care.

If this is really eating you up, you can have someone else (maybe a current student at the same institute) send an email to your past supervisor and asking if it's OK to use material from previous work in ones master thesis. In any case, don't beat up yourself.