Submitted by 0xRajeev
updateLastRentalTime() function tracks when the user last rented so they cannot rent and immediately withdraw thus bypassing minimum rental duration.
This function currently always returns true and so there is no need to assert its return value, as done in newRental(), unless it was meant to return false in some scenarios which indicates missing constraint/logic. It is not clear what that might be.
Given that the minimum rental duration is one of the two key protection mechanisms, any missing logic/constraint here could affect the project significantly.
Recommend validating constraint/logic to see if function should return false in any scenario. Remove assert at call site if otherwise.
Splidge (Reality Cards) comment:
dmvt (Judge) commented:
Splidge (Reality Cards) commented:
