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

Update FeeBankCharger.sol: Refactoring the Modifier #123

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion contracts/FeeBankCharger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@
* @dev Modifier to check if the sender is a feeBank contract.
*/
modifier onlyFeeBank() {
if (msg.sender != address(feeBank)) revert OnlyFeeBankAccess();
checkFeeBank();
_;
}

constructor(IERC20 token) {
feeBank = new FeeBank(this, token, msg.sender);
}

/**
* @dev Internal function to be called by the modifier
*/
function checkFeeBank() internal view {

Check failure on line 38 in contracts/FeeBankCharger.sol

View workflow job for this annotation

GitHub Actions / lint

'checkFeeBank' should start with _
if (msg.sender != address(feeBank)) revert OnlyFeeBankAccess();
}

/**
* @notice See {IFeeBankCharger-availableCredit}.
*/
Expand Down
Loading