I'm looking at this code for the first time, but this docstring does not at all match what's happening in the function. The deadline for refunds is not checked at all in this function.