Melt the butter in a saucepan over medium heat. Add the onion and cook until softened, about 5 minutes. Add the beans and salt. Cook, stirring, until warmed through, about 10 minutes.