Heat the oil in a deep, heavy-bottomed pan until a breadcrumb sizzles and turns brown when dropped in it. (CAUTION: hot oil can be dangerous. Do not leave unattended.)
Place the mashed potatoes, grated potatoes, onions, garlic and cheese into a bowl and season, to taste, with salt and freshly ground pepper.
Mix together well, then mould the mixture into large, flat, round potato cakes. You should be able to make 8-10 potato cakes.
Dredge each cake in the flour, then dip into the beaten egg. Finally dip each cake into the polenta to coat completely.
Carefully place the potato cakes into the hot oil and deep-fry for 4-6 minutes, or until golden-brown and cooked through. Carefully remove with a slotted spoon and drain on kitchen paper.
For the pea purée, fry the shallots in the oil for 2-3 minutes, or until softened.
Add the wine and bring to the boil. Reduce the heat and simmer until almost all of the liquid has evaporated.
Add the stock and bring to the boil. Remove from the heat and allow to cool for five minutes.
Place the stock mixture into a food processor. Add the peas and mint and pulse together to create a coarse purée.
Transfer the pea purée to a bowl, add the crème fraîche and stir to combine.
To serve, place two potato cakes onto each plate and serve with a dollop of pea purée.