I vowed to use a sum of money to paint the wall that marks the direction of the Qiblah in the masjid where I perform the prayer once I would win a lawsuit. I actually won the lawsuit, however, I found that the whole masjid had been renewed and painted. What should I do about my vow?
All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
If your vow was a mere intention that was not verbally expressed, then it is not valid or binding. If you verbally expressed it, then you are required to fulfill it as you specified it. Since the specified masjid does not need painting, at the moment at least, you can fulfill your vow by allocating the sum for the masjid's other needs, such as its minaret, carpets, and so on. If the masjid does not need anything of these, then you can spend the sum on the needs of another masjid.
The following is stated in Kashshaf Al-Qina‘: "It is permissible to spend the sum allocated for building the masjid in building its minaret or pulpit, buying a ladder for ascending the roof, establishing a sunshade, and so on. All these are included in the masjid's interests and needs."
In Matalib ’Uli An-Nuha, the following was stated: "Things that are not needed by a masjid or school, such as mats, oil, excesses, new instruments, and so on—then once they are sold, it is permissible to spend the price on other needs. If the masjid does not need anything, it could be spent on another masjid."
In At-Taj wal-Ikleel ‘Ala Mukhtasar Khaleel, a book on the Maliki school of Fiqh, it is stated that: "What is dedicated for the sake of Allaah, it is permissible to use some of it to do what is more beneficial as well as what is more needed by the people."
Some Islamic jurists, however, hold the opinion that the sum is to be kept until the masjid specified in the vow needs it and that it should not be spent on another masjid. In his book Al-Fataawa Al-Kubra, Ibn Hajar Al-Haytami was asked about a person who vowed to renovate a certain masjid and collected materials for this purpose but could not do so, is he permitted to renovate another one instead? His answer was:
It is impermissible to use the materials needed by a masjid to renew another one or to sell them. Rather, they must be kept for the needs of this masjid in particular. If he vowed to renovate a specific masjid or a certain place in the masjid, then he is not permitted to make any changes, if he verbally made the vow. However, if he did so through intention only, then this is not binding. It is impermissible to use the masjid's mats or carpets to furnish another place, whether due to a need or not, or even for another masjid.
Allaah Knows best.
You can search for fatwa through many choices