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

delete controllers[] in removeVault? #107

Open
gpersoon opened this issue Oct 12, 2021 · 0 comments
Open

delete controllers[] in removeVault? #107

gpersoon opened this issue Oct 12, 2021 · 0 comments

Comments

@gpersoon
Copy link

The function removeVault() deletes info about a vault.

Perhaps it should also delete controllers[]?

Example code:

delete controllers[_vault];

* @notice Removes a token from being able to be deposited for a given vault
* @param _vault The address of the vault
*/
function removeVault(
address _vault
)
external
override
notHalted
onlyStrategist
{
require(tokens[_vault] != address(0), "!_vault");
delete tokens[_vault];
delete allowedVaults[_vault];
emit VaultRemoved(_vault);
}

function setController(
address _vault,
address _controller
)
external
notHalted
onlyStrategist
{
require(allowedVaults[_vault], "!_vault");
require(allowedControllers[_controller], "!_controller");
controllers[_vault] = _controller;
emit SetController(_vault, _controller);
}

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

No branches or pull requests

1 participant