Cut the chicken into pieces: drumsticks, thighs, wings, and breasts. If using only chicken legs divide them at the joint into chicken thighs and drumsticks. Salt the chicken parts.
Melt the butter in a large heavy-bottomed pan. Fry the chicken parts until golden on all sides, about 2-3 minutes on each side together with the finely chopped onion.
Add the garlic during the last 2-3 minutes.
Pour some chicken stock into the pan to cover about ¾ of the chicken.
Cover, turn the heat down, and simmer for about 30 minutes or until the chicken is cooked through. To make sure that the chicken is done, make a small cut into the thickest part of a thigh with a sharp knife, there should be no blood or any pink at all around the bone.
Mix the smetana or crème fraiche with flour and the egg yolk. Pour the mixture into the pan, bring to a boil and let bubble for about 1 minute.
Remove from the heat, adjust the taste with salt and pepper, add the chopped parsley and dill and serve hot with polenta (or rice or potatoes) and salad or pickled vegetables.