The Messenger of Allah ﷺ forbade the sale of fruits till they were clearly in good condition, forbidding it both to the seller and to the buyer.
أَنَّ رَسُولَ اللَّهِ ﷺ نَهَى عَنْ بَيْعِ الثِّمَارِ حَتَّى يَبْدُوَ صَلاَحُهَا نَهَى الْبَائِعَ وَالْمُشْتَرِيَ