Skip to content

Commit

Permalink
fix: remove shares code from qwmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekidd committed Jul 1, 2024
1 parent 7f4d005 commit 5be2adb
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/contracts/QWManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -150,29 +150,4 @@ contract QWManager is IQWManager, Ownable {
IERC20 token = IERC20(_tokenAddress);
token.transferFrom(_user, address(this), _amount);
}

// Internal Functions

/**
* @notice Internal function to update shares on deposit.
* @param user The address of the user whose shares are being updated.
* @param sharesAmount The amount of shares to add to the user's balance.
* @param totalSharesProtocol The total shares in the protocol before the deposit.
* @param protocol The address of the protocol.
*/
function _updateSharesOnDeposit(address user, uint256 sharesAmount, uint256 totalSharesProtocol, address protocol) internal {
shares[protocol][user] += sharesAmount;
totalShares[protocol] = totalSharesProtocol + sharesAmount;
}

/**
* @notice Internal function to update shares on withdrawal.
* @param user The address of the user whose shares are being updated.
* @param userShares The amount of shares to subtract from the user's balance.
* @param protocol The address of the protocol.
*/
function _updateSharesOnWithdrawal(address user, uint256 userShares, address protocol) internal {
shares[protocol][user] -= userShares;
totalShares[protocol] -= userShares;
}
}

0 comments on commit 5be2adb

Please sign in to comment.