Cut a slit into each pit lengthwise, then remove the pit.
Fill the dates by piping or spooning in around 1 teaspoon of peanut butter, then sprinkle on the chopped nuts (if using). Close up the dates and set them in the fridge while you prepare the chocolate.
In a heat-safe bowl, melt the chocolate in the microwave for 30 seconds at a time, stirring after every interval until smooth. Add in the coconut oil and mix until well combined and glossy. If the mixture is too thick, add coconut oil a little at a time.
Line a sheet with parchment paper and set aside. Take the dates out of the fridge and dip them, one at a time, into the chocolate mixture until fully coated. Place the dates onto the parchment-lined sheet and top them with a sprinkle of flaky salt, if using.
Let the dates set in the fridge until the chocolate hardens, around 10 minutes. Store the dates in the fridge for up to one week or 1-2 months in the freezer.