"Rewards of deeds depends upon intentions." This is a beautiful hadith by our beloved prophet(sws ) lets understand what is actually this hadith means. I am giving one example quality of fruit depends upon the seed. If the condition of seed is good, the fruit we will get fresh tasty and healthy. If the condition of seed is not in good, the fruit we will get tastless and unhealthy. so here seed is our intention and according that we get fruits that means rewards. Always trust on (Allah swt) by having good intention you will get best reward. Remember we will get best reward by having only good intention which is beneficial for our both worlds that means this and life after death.