Ingredients
Preheat oven to 350°F (175°C). Line a 9x9-inch baking pan with parchment paper.
In a large bowl, whisk together melted butter, brown sugar, and granulated sugar until smooth.
Add eggs, vanilla extract, and sourdough discard. Mix until fully combined.
In a separate bowl, whisk together flour, baking soda, and salt.
Add dry ingredients to wet ingredients and stir until just combined.
Fold in chocolate chips (and walnuts if using).
Spread batter evenly into prepared pan.
Bake 25–30 minutes, or until golden brown and a toothpick inserted in the center comes out with a few moist crumbs.
Cool completely before slicing into bars.