Why don't you filter for completed purchases instead? If we add an additional state at some point, this function will break.