Heat sufficient oil in a deep kadai. Deep-fry potatoes till they are golden. Drain onto an absorbent paper. Leaving about two tablespoons of oil in the kadai, remove excess.
Add onion paste and sauté till golden brown.
Add ginger and garlic pastes and sauté for two minutes. Add salt, turmeric powder and red chilli powder and stir. Add fried potatoes.
Add about half a cup of water and cook at low heat for five minutes. Mix sugar in vinegar and add to potatoes.
Heat two tablespoons of the remaining oil in another pan. Add whole red chillies, mustard seeds, cumin seeds and onion seeds. When mustard seeds begin to crackle and red chillies darken, pour the tempering over the potatoes.