Keith Brown, said that Mr Mackay had been suspended from the SNP but that he would have to come to his own decision" on whether he should stand down from Holyrood.
He said he had not spoken to Mr Mackay since he was forced to resign last week after revelations he had bombarded a 16-year-old schoolboy with texts.
It's an extremely serious situation, serious for the young individual involved and its been treated very seriously by the government and the First Minister.
"As for Derek Mackay's own future in the parliament, that's only something he can decide it's not something over which the SNP has control. As things stand Derek Mackay is a suspended member of the SNP and there will be a process through which we have to go, but as to whether he stays in the parliament it's entirely his decision."
Pressed further he added: "Derek will have to come to his own decision but there's a very serious process to go through and I don't want to jeopardise that.
"I wasn't aware of his text habits and communicating with people of that age, I was completely unaware of that. It came as a shock to people throughout the party and you could see the shock not just in the SNP but other parties as well."
As a result of resigning, rather than being sacked from his government post, he is still entitled to pick up a "resettlement grant" from the Scottish Parliament of nearly £12,000.
The boy at the centre of the allegations has spoken to Police Scotland and the force is believed to be assessing the information.