Heat the oil in a pan and add the chopped onions, mint, and peas. Cover and leave for a few minutes to steam. Mash with a potato masher. You can do this with a food processor as well, just pulse it until smooth. Whether mashing or pulsing, when it's done add the butter and season very carefully, to taste.