Reward is confirmed for anything that is intended for the sake of Allah

رابط المقال

Al-Nawawi said, “Reward is confirmed for anything that is intended for the sake of Allah, even if in the process the doer obtains some personal fortune of pleasure or other than that.”

 [`Umdah al-Qari, al-`Ayni (2/354)]