Heat 1 tablespoon of the oil in a frying pan, add the onion and sauté over a medium heat for about 5 minutes. Add the vinegar and sugar and cook for a further 15 minutes, stirring occasionally, until caramelized.
Meanwhile, cook the potatoes and sweet potatoes in a saucepan of boiling water for 12–15 minutes until tender.
Mix together the flour and pepper on a plate. Toss the liver in the flour to coat. Heat the remaining oil in a separate frying pan, add the liver and cook over a high heat for 2–3 minutes on each side until golden, taking care not to overcook it.
Drain the potatoes, then return to the pan and mash with the butter and salt and pepper. Stir in the rocket, then serve with the liver and onions.