Sayyiduna Umar (may Allah be pleased with him) used to accept wealth given in the way of Allah and did not consider there to be anything wrong in it.
Hadith Referenceسنن سعید بن منصور / كتاب الجهاد / 3537
Hadith Gradingمحدثین:مرسل ولکن الحدیث صحيح
Hadith Takhrij«مرسل ولکن الحدیث صحيح، «انفرد به المصنف من هذا الطريق»»
Brief Explanation
First part (The statement of Sayyiduna Umar radi Allahu anhu): ✔️ It is narrated by trustworthy narrators; the athar is authentic.
Second part (The incident of Shaykh Ansari): ❌ It is weak due to the presence of a majhul (unknown) shaykh in the chain of narration.
However, from Bakr bin Sawadah's own commentary, it is clear that: "A person has the right of personal disposal over something given in the way of Allah (fi sabil Allah), once it has been entrusted to him."