Skip to content

Commit

Permalink
updated treasury
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir-Deon committed Apr 5, 2024
1 parent 1ad4dbc commit d8a7cdf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contracts/Treasury.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
pragma solidity ^0.8.18;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/ITreasury.sol";
Expand All @@ -23,7 +22,6 @@ contract Treasury is ITreasury, AccessControl, ReentrancyGuard {
address indexed _token,
uint256 _amount
);
event UnauthorizedAccess(address indexed _user, bool status);

bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant VAULT_ROLE = keccak256("VAULT_ROLE");
Expand Down Expand Up @@ -66,7 +64,7 @@ contract Treasury is ITreasury, AccessControl, ReentrancyGuard {
uint256 _amount,
string memory _asset
) external isPaused nonReentrant {
require(hasRole(VAULT_ROLE, msg.sender), " Not vault");
require(hasRole(VAULT_ROLE, msg.sender), "Not vault");
require(
IERC20(currencies[_asset]).balanceOf(address(this)) >= _amount,
"Insufficient balance"
Expand Down

0 comments on commit d8a7cdf

Please sign in to comment.