Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [N-02] Misleading documentation #50

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions contracts/AcceleratingDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ contract AcceleratingDistributor is ReentrancyGuard, Ownable, Multicall {
function recoverToken(address token) external onlyOwner {
// If the token is an enabled staking token then we want to preform a skim action where we send back any extra
// tokens that are not accounted for in the cumulativeStaked variable. This lets the owner recover extra tokens
// sent to the contract that were not explicitly staked. if the token is not enabled for staking then we simply
// send back the full amount of tokens that the contract has.
// sent to the contract that were not explicitly staked. If the token has not been initialized for staking then
// we simply send back the full amount of tokens that the contract has.
uint256 amount = IERC20(token).balanceOf(address(this));
if (stakingTokens[token].lastUpdateTime != 0) amount -= stakingTokens[token].cumulativeStaked;
require(amount > 0, "Can't recover 0 tokens");
Expand Down