Gas: Unnecessary assignment in SavingsAccount.withdrawAll
#147
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
Handle
cmichel
Vulnerability details
The function computes
uint256 _amount = balanceInShares[msg.sender][_token][_strategyList[i]];
but this value is never used and reassigned in the next line to_amount = IYield(_strategyList[i]).unlockTokens(_token, balanceInShares[msg.sender][_token][_strategyList[i]]);
.The first line can therefore be removed.
The text was updated successfully, but these errors were encountered: