Heat the oil in a wok until very hot and stir-fry the onion, garlic, beans, ginger, and chilies (if using) for 30 seconds. Add the salt, soy sauce, and wine and stir-fry for another 4 to 5 minutes.
Add the bean sprouts and stir-fry for 1 minute. Add the vinegar and cook for another 30 seconds. Add the sesame oil, stir to mix, remove from the heat, and transfer