Prepare the frites by peeling the potatoes and cutting them into 4 mm/⅛ inch wide matchsticks. I like to use large baking potatoes, so the frites are nice and long. Place them in a bowl of cold water to stop them browning.
Heat the vegetable oil in a large pan or wok to approx. 165 ̊C/325 ̊F.
Drain the potato matchsticks and pat dry. Fry them, in batches if needed, taking care not to crowd the pan. Cook for 3-4 minutes. They should not brown at all, but still be almost cooked. Remove and drain on paper towels.
Trim the gills from the mushrooms, then dice the stems and cups into ½-1 cm/¼-⅜ inch pieces. Place a small frying pan over a medium heat and add 2 tablespoons of the coconut oil. Add the onions and soften slightly for a few minutes. Then add the garlic and wine, if using, and cook for another 2-3 minutes over a high heat to reduce all the liquid. Remove from the heat.
Tip the onion mixture into a large bowl and add all the remaining ingredients including the remaining coconut oil. Wet your hands, and then mix well. Shape the mixture into burger-like patties.
Place a large frying pan onto a medium heat and add 2 tablespoons of oil. Gently fry the patties for 3-5 minutes on each side until they are just browning.
Meanwhile, heat up the oil for the frites to 190 ̊C/375 ̊F and cook the fries for a second time for 2-3 minutes until golden and crispy. Drain on paper towels, then season well with salt. Serve immediately.