with no interest from the east since their was always a risk Iran would economically mingle with the west and take their contracts instead.
What's there to lose in making offers, even if they're turned down? The theoretical possibility that Iran may sign contracts with western companies as well is not a rational reason for China to refrain from investing as long as Iran's interested.
The problem is rather that Rohani made a mockery of diplomatic protocol and insulted Xi during his official visit in the wake of the JCPOA (having him stay at a hotel room deprived of water closet, leaving Tehran for Rome whilst Xi was still in Iran), and telling him bluntly he's not interested in Chinese investment.
I think one of the primary reasons China is avoiding doing heavy investments in Iran is because of the potential for JCPOA 2.0, and they would rather see it dead before they start investing.
Actually if the JCPOA were to be reactivated and sanctions lifted, it'd facilitate investment from China. Beijing is still somewhat wary of USA sanctions. This will change on the day Washington escalates in the South China Sea or elsewhere against Chinese interests, which is only a question of when not if. But for the time being China tends to be risk-averse, which is understandable because time plays to Beijing's advantage given that with each passing day, the gap between China and the USA in terms of military and economic power is decreasing.
Ever since the Rohani presidency, the idea has made its way among certain CPC cadres that Iran is "not interested" in deepening ties with the East and that she's "looking to the west". This notion however is obviously baseless. Yes, liberal factions in Iran (reformists, moderates) dream of doing away with the anti-imperialist revolutionary heritage and to turn Iran into a submissive western client but that's not the case of the principlists and other currents loyal to the Islamic Revolution.
Moreover, there are two insurmountable obstacles to the liberal project: one, the revolutionary core of the system will not allow them to bring their plans to a conclusion and bury the principles upon which the Islamic Republic is built; two, Tel Aviv and the hawkish party in D.C. will undermine or tear up any deal with Iran stuck by the rival American faction and the Europeans.
When it comes to the principlists, the so-called pragmatic current among them might want Iran to be able simply to trade with Europe (not the USA) without operating any political rapprochement, unless accompanied by greater independence of EU regimes towards Washington and Tel Aviv, which is highly improbable. The precondition to that however would be a nuclear deal acquiesced to by Washington - even then, those same pragmatic principlists have no intention to prevent China from continuing to be Iran's leading investment and trade partner.
I mean, China is the one that has deep economic ties to both the USA and the EU (not to mention Canada, Australia and the rest of the pack), politically too China's relationship with the west is far less confrontational, less violent than Iran's. And somehow it's Iran who's looking west? Makes no sense.
Although to be fair, pragmatic principlists who still believe in any remote possibility of striking a deal albeit limited in scope with the USA regime without sacrificing Iran's means deterrence if not Iran's sovereignty which to said principlists are a red line, can be criticized for not realizing that it's simply never going to happen: Washington sees in diplomacy an instrument to disarm and then destroy Iran, not to do Iran any favors nor to settle on a mutually beneficial win-win arrangement; and there's no way to bring about a revision of US policy in this regard. Just that China's hardly in a position to fault principlists for this, considering Beijing's historic record of political normalization with the Americans in 1972, followed by economic opening to the west under Deng Xiaoping.
This all being said, it's still up to the Raisi team to send the right signals now and make Beijing realize they have nothing in common with Rohani and that Iran is interested in attracting Chinese investment on a larger scale indeed.