Sahih Muslim 123 b
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
أَسْلَمْتَ عَلَى مَا أَسْلَفْتَ مِنْ خَيْرٍ "
Hakim b. Hizam reported to 'Urwa b. Zubair that he said to the Messenger of Allah (ﷺ):
Messenger of Allah, do you think if there is any reward (of the Lord with me on the Day of Resurrection) for the deeds of religious purification that I performed in the state of ignorance, such as charity, freeing a slave, cementing of blood-relations? Upon this he (the Messenger of Allah) said to him: You have accepted Islam with all the previous virtues that you had practised.
Full reference and source
Sahih Muslim 123 b In-book : Book 1, Hadith 231 USC-MSA web (English) : Book 1, Hadith 223 (deprecated)
View source on Sunnah.com (opens in a new tab)