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

Incorrect Cw4ExecuteMsg used during remove_hook #637

Closed
sushiwushi opened this issue Jan 27, 2022 · 1 comment · Fixed by #638
Closed

Incorrect Cw4ExecuteMsg used during remove_hook #637

sushiwushi opened this issue Jan 27, 2022 · 1 comment · Fixed by #638
Assignees

Comments

@sushiwushi
Copy link

Quoting from https://github.com/CosmWasm/cw-plus/blob/main/packages/cw4/src/helpers.rs#L45-L48:

pub fn remove_hook<T: Into<String>>(&self, addr: T) -> StdResult<CosmosMsg> {
        let msg = Cw4ExecuteMsg::AddHook { addr: addr.into() }; //uses AddHook instead of RemoveHook
        self.encode_msg(msg)
    }

Probably should be:

pub fn remove_hook<T: Into<String>>(&self, addr: T) -> StdResult<CosmosMsg> {
        let msg = Cw4ExecuteMsg::RemoveHook { addr: addr.into() };
        self.encode_msg(msg)
    }

PS: This was found during an audit.

@maurolacy
Copy link
Contributor

Thanks, we'll fix it asap.

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 a pull request may close this issue.

2 participants