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: add onlyRegisteredApp for Vault.collectFee #107

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

chefburger
Copy link
Collaborator

@chefburger chefburger commented Jul 2, 2024

@@ -157,7 +157,7 @@ contract Vault is IVault, VaultToken, Ownable {
}

/// @inheritdoc IVault
function collectFee(Currency currency, uint256 amount, address recipient) external {
function collectFee(Currency currency, uint256 amount, address recipient) external onlyRegisteredApp {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be good to add a test to check if theres revert if called by non registered app

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, there is already that check. can see the test case i updated below

ChefMist
ChefMist previously approved these changes Jul 2, 2024
@ChefMist ChefMist merged commit df64445 into main Jul 2, 2024
2 checks passed
@ChefMist ChefMist deleted the fix/add-onlyRegisteredApp-for-collectFee branch July 2, 2024 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants