The Immigrants (Muhajirun) said: Messenger of Allah! the Helpers (Ansar) got the entire reward. He said: no, so long as you pray to Allah for them and praise them. (Using translation from Abū Dāʾūd 4812)
أَنَّ الْمُهَاجِرِينَ قَالُوا لِلنَّبِيِّ ﷺ ذَهَبَ الْأَنْصَارُ بِالْأَجْرِ كُلِّهِ قَالَ «لَا مَا دَعَوْتُمُ اللَّهَ لَهُمْ وَأَثْنَيْتُمْ»