Preheat the oven to 350°F (175°C) and grease a 9x5-inch loaf pan or line it with parchment paper.
In a large mixing bowl, combine the mashed bananas, melted coconut oil, granulated sugar, brown sugar, eggs, and vanilla extract. Mix until well blended.
Add in the cocoa powder, baking soda, and salt. Stir until combined.
Gradually add the all-purpose flour to the mixture and mix until just incorporated. Be careful not to overmix.
Fold in the semi-sweet chocolate chips and walnuts (if using) until evenly distributed through the batter.
Pour the batter into the prepared loaf pan and smooth the top with a spatula.
Bake in the preheated oven for 55-60 minutes, or until a toothpick inserted into the center comes out clean.
Allow the bread to cool in the pan for 10 minutes before transferring it to a wire rack to cool completely.