It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that when Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) intended to enlarge the mosque of the Messenger of Allah (peace and blessings be upon him), the extension reached the house of Sayyiduna al-Abbas (may Allah be pleased with him). Sayyiduna Umar (may Allah be pleased with him) wanted to include it in the mosque and give him compensation for it, but Sayyiduna al-Abbas (may Allah be pleased with him) refused and said: "This is land granted by the Messenger of Allah (peace and blessings be upon him)." The two disagreed, and they appointed Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him) to judge between them. They both came to him at his home - he used to be called the Master of the Muslims. Sayyiduna Ubayy (may Allah be pleased with him) ordered that a cushion be laid out for them, and the two of them sat before Sayyiduna Ubayy (may Allah be pleased with him). Sayyiduna Umar (may Allah be pleased with him) mentioned what he intended, and Sayyiduna al-Abbas (may Allah be pleased with him) mentioned that it was a plot granted by the Messenger of Allah (peace and blessings be upon him). Sayyiduna Ubayy (may Allah be pleased with him) said (narrating a report): "Allah Almighty commanded His servant and Prophet Dawud (peace be upon him) to build a house for Him. Dawud (peace be upon him) said: 'O my Lord, where shall this house be?' Allah said: 'Where you see the angel drawing his sword.' Dawud (peace be upon him) saw him on the rock, and at that time there was a threshing floor there belonging to a youth of the Children of Israel.
Dawud (peace be upon him) came to him and said: 'I have been commanded to build a house for Allah in this place.' The young man said: 'Has Allah commanded you to take it from me without my consent?' Dawud (peace be upon him) said: 'No.' Then Allah revealed to Dawud (peace be upon him): 'I have placed the treasures of the earth in your hand, so satisfy him.' So Dawud (peace be upon him) came to him and said: 'I have been commanded to satisfy you; you shall have a qintar of gold for it.' He said: 'I accept, O Dawud - but is it (the land) better, or the qintar?' Dawud (peace be upon him) said: 'Rather, it is better.' He said: 'Then satisfy me.' Dawud (peace be upon him) said: 'You shall have three qintars for it.' He kept pressing Dawud (peace be upon him) hard until he was satisfied with nine qintars." Sayyiduna al-Abbas (may Allah be pleased with him) said: "O Allah, I will take no compensation for it, and I have given it in charity to the community of the Muslims." Sayyiduna Umar (may Allah be pleased with him) accepted it from him and included it in the mosque of the Messenger of Allah (peace and blessings be upon him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الوقف / 11937