Skip to content

Commit

Permalink
feat: update constant name
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenvaleri committed May 3, 2024
1 parent 576af18 commit 471bfb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/PointTokenVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract PointTokenVault is UUPSUpgradeable, AccessControlUpgradeable, Multicall
bytes32 public constant MERKLE_UPDATER_ROLE = keccak256("MERKLE_UPDATER_ROLE");
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");

uint256 public constant MAX_UINT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
uint256 public constant MAX_UINT_256 = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

// Deposit asset balancess.
mapping(address => mapping(ERC20 => uint256)) public balances; // user => point-earning token => balance
Expand Down Expand Up @@ -88,7 +88,8 @@ contract PointTokenVault is UUPSUpgradeable, AccessControlUpgradeable, Multicall
// Rebasing and fee-on-transfer tokens must be wrapped before depositing.
function deposit(ERC20 _token, uint256 _amount, address _receiver) public {
uint256 cap = caps[address(_token)];
if (cap != MAX_UINT) {

if (cap != MAX_UINT_256) {
if (_amount + _token.balanceOf(address(this)) > cap) {
revert DepositExceedsCap();
}
Expand Down

0 comments on commit 471bfb0

Please sign in to comment.