Preheat your oven to 350°F (175°C). Grease a 4x8-inch loaf pan.
In a mixing bowl, mash the ripe bananas with a fork until smooth. Stir in the melted butter.
Mix in the baking soda and salt.
Add the sugar, beaten egg, and vanilla extract, and mix until well combined.
Stir in the flour until just incorporated. If using, fold in the chopped walnuts.
Pour the batter into the prepared loaf pan.
Bake for 60-65 minutes, or until a toothpick inserted into the center comes out clean.
Let the bread cool in the pan for about 10 minutes, then transfer to a wire rack to cool completely.