From Sahih Muslim (Hadith 4076):
Fadila b. 'Ubaid (Allah be pleased with him) reported:I bought on the day (of the Victory of Khaibar) a necklace for twelve dinars (gold coins). It was made of gold studded with gems. I separated (gold from gems) in it, and found (gold) of more (worth) than twelve dinars. I made a mention of it to Allah's Apostle (ﷺ), whereupon he said: It should not be sold unless it is separated
Reference: Muslim 4076