Skip to content

Commit

Permalink
fix: Remove redundant casting for block.timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmtzinf committed Dec 22, 2021
1 parent 4e8cfe3 commit 941539f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/protocol/libraries/logic/ReserveLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ library ReserveLogic {
uint40 timestamp = reserve.lastUpdateTimestamp;

//solium-disable-next-line
if (timestamp == uint40(block.timestamp)) {
if (timestamp == block.timestamp) {
//if the index was updated in the same block, no need to perform any calculation
return reserve.liquidityIndex;
}
Expand All @@ -78,7 +78,7 @@ library ReserveLogic {
uint40 timestamp = reserve.lastUpdateTimestamp;

//solium-disable-next-line
if (timestamp == uint40(block.timestamp)) {
if (timestamp == block.timestamp) {
//if the index was updated in the same block, no need to perform any calculation
return reserve.variableBorrowIndex;
}
Expand Down

0 comments on commit 941539f

Please sign in to comment.