Skip to content

Commit

Permalink
peek() to check has explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
oldchili committed Dec 6, 2023
1 parent d10f0de commit 1ed6d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StickyOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ contract StickyOracle {

function peek() external view toll returns (uint128, bool) {
uint128 cap_ = cap;
(uint128 cur,) = pip.peek();
return (_min(cur, cap_), cur > 0 && cap_ > 0);
(uint128 cur, bool has) = pip.peek();
return (_min(cur, cap_), has && cap_ > 0);
}
}

0 comments on commit 1ed6d98

Please sign in to comment.