Skip to content

Commit

Permalink
return invalid error instead of None (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidatwhiletrue authored Apr 11, 2024
1 parent 074fb46 commit de1bb44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cep18/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ pub fn get_optional_named_arg_with_user_errors<T: FromBytes>(
) -> Option<T> {
match get_named_arg_with_user_errors::<T>(name, Cep18Error::Phantom, invalid) {
Ok(val) => Some(val),
Err(_) => None,
Err(Cep18Error::Phantom) => None,
Err(_) => runtime::revert(invalid),
}
}

Expand Down

0 comments on commit de1bb44

Please sign in to comment.