From a9bf35952934da3112b9f61929e41d24d1d3ef58 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Tue, 15 Aug 2023 19:43:02 -0700 Subject: [PATCH] Removed unneccessary RingBuffer.wrap --- src/libraries/TwabLib.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/TwabLib.sol b/src/libraries/TwabLib.sol index 4b19ce1..54df2bb 100644 --- a/src/libraries/TwabLib.sol +++ b/src/libraries/TwabLib.sol @@ -405,7 +405,7 @@ library TwabLib { // Create a new Observation if it's the first period or the current time falls within a new period if (_accountDetails.cardinality == 0 || currentPeriod > newestObservationPeriod) { return ( - uint16(RingBufferLib.wrap(_accountDetails.nextObservationIndex, MAX_CARDINALITY)), + _accountDetails.nextObservationIndex, newestObservation, true );