Skip to content

Commit

Permalink
Merge 981f8b7 into b19486a
Browse files Browse the repository at this point in the history
  • Loading branch information
kamescg committed Oct 6, 2021
2 parents b19486a + 981f8b7 commit 955bc0d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions contracts/libraries/TwabLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,7 @@ library TwabLib {
uint224 heldBalance = (afterOrAtStart.amount - beforeOrAtStart.amount) /
(afterOrAtStart.timestamp - beforeOrAtStart.timestamp);

uint224 amount = beforeOrAtStart.amount +
heldBalance *
(_targetTimestamp - beforeOrAtStart.timestamp);

return ObservationLib.Observation({ amount: amount, timestamp: _targetTimestamp });
return _computeNextTwab(beforeOrAtStart, heldBalance, _targetTimestamp);
}

/**
Expand Down

0 comments on commit 955bc0d

Please sign in to comment.