It's not a function of the wallet but of the transaction so it more naturally belongs there.
This contains no change in logic, but is preparation for cleanup and possible alternative strategies.