Hadith 10 of an_Nawawi's collection teaches that Allah accepts only that which is good.He does not accept but that which is pure", the hadith refers to all good deeds. Allah does not accept any deeds that are spoilt.