Skip to content

Commit

Permalink
chore: rebase to storage pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Jan 27, 2024
1 parent 4a804ae commit f5d7be5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/TokenizedStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,6 @@ contract TokenizedStrategy {
// Cache storage pointer since its used repeatedly.
StrategyData storage S = _strategyStorage();

uint256 oldTotalAssets = S.totalAssets;

// Tell the strategy to report the real total assets it has.
// It should do all reward selling and redepositing now and
// account for deployed and loose `asset` so we can accurately
Expand All @@ -1107,7 +1105,9 @@ contract TokenizedStrategy {
uint256 newTotalAssets = IBaseStrategy(address(this))
.harvestAndReport();

// Get the amount of shares we need to burn
uint256 oldTotalAssets = _totalAssets(S);

// Get the amount of shares we need to burn from previous reports.
uint256 sharesToBurn = _unlockedShares(S);

// Initialize variables needed throughout.
Expand Down Expand Up @@ -1186,7 +1186,6 @@ contract TokenizedStrategy {
_mint(S, protocolFeesRecipient, protocolFeeShares);
}
}

} else {
// Expect we have a loss.
unchecked {
Expand Down

0 comments on commit f5d7be5

Please sign in to comment.