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

Validate IBC event types #3229

Closed
sug0 opened this issue May 13, 2024 · 1 comment · Fixed by #3319
Closed

Validate IBC event types #3229

sug0 opened this issue May 13, 2024 · 1 comment · Fixed by #3319
Assignees

Comments

@sug0
Copy link
Contributor

sug0 commented May 13, 2024

IBC event types are currently not being validated. We should check if they are valid event types, using ibc-rs.

fn validate_ibc_event_type(
namada_event: &Event,
) -> Result<IbcEventType, EventError> {
if namada_event.kind().domain() != IbcEvent::DOMAIN {
return Err(EventError::InvalidEventType);
}
let event_type = namada_event.kind().sub_domain();
// if !matches!(
// event_type,
// // TODO: add other ibc event types that we use in namada
// "update_client" | "send_packet" | "write_acknowledgement"
//) {
// return Err(EventError::InvalidEventType);
//}
Ok(IbcEventType(event_type.to_owned()))
}

@yito88
Copy link
Member

yito88 commented May 27, 2024

We can remove the validation by #3317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants