Provider discovery + Account edit

why 3 ifs instead of one?