From 1ed6d987b3ed4bdfa378f3f35f18a01a064a2a43 Mon Sep 17 00:00:00 2001 From: oldchili <130549691+oldchili@users.noreply.github.com> Date: Wed, 6 Dec 2023 14:41:58 +0200 Subject: [PATCH] peek() to check has explicitly --- src/StickyOracle.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/StickyOracle.sol b/src/StickyOracle.sol index a58bf40b..2e84b5fc 100644 --- a/src/StickyOracle.sol +++ b/src/StickyOracle.sol @@ -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); } }