Yahya related to me from Malik from Nafi from Ibn Umar that the Messenger of Allah ﷺ forbade selling fruit until it had started to ripen. He forbade the transaction to both buyer and seller.
أَنَّ رَسُولَ اللَّهِ ﷺ نَهَى عَنْ بَيْعِ الثِّمَارِ حَتَّى يَبْدُوَ صَلاَحُهَا نَهَى الْبَائِعَ وَالْمُشْتَرِيَ