Do not do anything expecting thanks.

Don’t do it expecting any thanks.

You don’t do it because you expect gratitude from the other party, you do it because you feel it is the best course of action.