Heat the chicken stock in a lidded saucepan.
Add the chicken breast and bring to a low simmer.
Cover with a lid and cook for 10 minutes.
Remove the chicken breasts from the water with tongs and place on a plate.
Pour the cooking liquor into a large jug.
Melt 25g/1oz of the butter in a large heavy-based saucepan over a low heat.
Stir in the leeks and fry gently for two minutes, stirring occasionally until just softened.
Add the garlic and cook for a further minute.
Add the remaining butter and stir in the flour as soon as the butter has melted.
Cook for 30 seconds, stirring constantly.
Slowly pour the milk into the pan, just a little at a time, stirring well between each adding.
Gradually add 250ml/10fl oz of the reserved stock and the wine, if using, stirring until the sauce is smooth and thickened slightly.
Bring to a gentle simmer and cook for 3 minutes.
Season the mixture, to taste, with salt and freshly ground black pepper.
Remove from the heat and stir in the cream.
Pour into a large bowl and cover the surface of the sauce with cling ilm to prevent a skin forming.
Set aside to cool.
Preheat the oven to 200C/400F/Gas 6.
Put a baking tray in the oven to heat.
For the pastry, put the flour and butter in a food processor and blend on the pulse setting until the mixture resembles fine breadcrumbs.
With the motor running, add the beaten egg and water and blend until the mixture forms a ball.
Portion off 250g/10oz of pastry for the lid.
Roll the remaining pastry out on a lightly floured surface, turning the pastry frequently until around 5mm/¼in thick and 4cm/1½in larger than the pie dish.
Lift the pastry over the rolling pin and place it gently into the pie dish.
Press the pastry firmly up the sides, making sure there are no air bubbles.
Leave the excess pastry overhanging the sides.
Cut the chicken breasts into 3cm/1¼in pieces.
Stir the chicken, ham and leeks into the cooled sauce.
Pour the chicken filling into the pie dish.
Brush the rim of the dish with beaten egg.
Roll out the reserved pastry for the lid.
Cover the pie with the pastry lid and press the edges together firmly to seal.
Trim any excess pastry.
Make a small hole in the centre of the pie with the tip of a knife.
Glaze the top of the pie with beaten egg.
Bake on the preheated tray in the centre of the oven for 35-40 minutes or until the pie is golden-brown all over and the filling is piping hot.