Domain walls and superpotentials from M-theory on Calabi–Yau three-folds