The if-branch of Basket.changeLicenseFee function ensures that pendingLicenseFee.licenseFee == newLicenseFee which means setting licenseFee = newLicenseFee is equivalent to licenseFee = pendingLicenseFee.licenseFee but the former saves an expensive storage load operation.
Handle
cmichel
Vulnerability details
The
if
-branch ofBasket.changeLicenseFee
function ensures thatpendingLicenseFee.licenseFee == newLicenseFee
which means settinglicenseFee = newLicenseFee
is equivalent tolicenseFee = pendingLicenseFee.licenseFee
but the former saves an expensive storage load operation.