Heat your oven to 200°C/fan 180°C/Gas 6. Pop the chicken legs on a lightly oiled baking tray or in a roasting tin. Rub a quarter of the pot of butter into the chicken legs. Season with salt and pepper.
Roast the chicken for 40 mins till they are golden and cooked through. A skewer inserted near the joint should make the juices run. When they are clear, it's ready.
While the chicken roasts, peel and roughly chop the sweet potatoes. Peel and finely slice the red onion. Rinse the spinach. Slice off any thick stalks. Finely slice the leaves.
Fill a kettle and boil it. Crumble a stock cube into a measuring jug. Add 450ml hot water from the kettle. Stir to mix.
Fill a pan with hot water. Add a pinch of salt. Bring to the boil. Add the sweet potatoes. Simmer for 15-20 mins till the potatoes are tender. Add the spinach for the final min.
While the potatoes cook, warm a splash of oil in a pan. Add the onions. Season. Fry over a low heat for 8-10 mins. Stir every so often till the onion is soft and glossy.
Stir the flour into the onion. Stir and cook for 2 mins. Slowly whisk in the stock. Bring to the boil. Turn the heat down. Simmer the gravy for 5 mins till it’s smooth and thick. Taste and season.
Drain the potatoes and spinach. Tip them back into the pan. Add the remaining butter. Season and mash. Serve with the roast chicken and onion gravy.