Melt the butter in a large frying pan and add the onion. Cook about 15 minutes until browned and softened. Add the mushrooms and cook 3 minutes.
Add the garlic and ginger and cook 1 minute. Add the flour and cook 2 minutes until golden.
Add the coconut milk and chile paste. Bring to a simmer to thicken.
Remove from heat and stir in the green beans. Add the lime juice and stir to combine.
Store in the fridge up to 2 days before cooking
When ready to use, pour into a baking dish.
Bake at 400 for about 30 minutes. Remove from oven, top with wontons, and serve.